-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(insight): added hosted insight version API (#748)
* feat(insight): added hosted insight version API * feat(insight): import path fix * feat(insight): import path fix * feat(insight): new setting as optional on update * feat(insight): proper types * feat(insight): rename arg
- Loading branch information
Showing
6 changed files
with
280 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 128 additions & 0 deletions
128
src/resources/HostedInterfacesCore/HostedInterfaceVersionsCore.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
import {Paginated} from '../BaseInterfaces.js'; | ||
|
||
export interface HostedInterfaceChangeInfo { | ||
/** | ||
* The change date and time in ISO-8601 format. | ||
*/ | ||
date: string; | ||
/** | ||
* The user identity in the following form: `user@domain-provider`. | ||
*/ | ||
by: string; | ||
/** | ||
* The user's first name specified in the provider's user profile (e.g., the Google account). | ||
*/ | ||
firstName?: string; | ||
/** | ||
* The user's last name specified in the provider's user profile (e.g., the Google account). | ||
*/ | ||
lastName?: string; | ||
} | ||
|
||
export interface HostedInterfaceVersionInfo { | ||
/** | ||
* The version number. | ||
*/ | ||
version: number; | ||
/** | ||
* The optional version label. | ||
*/ | ||
label?: string; | ||
/** | ||
* The version creation information. | ||
*/ | ||
created: HostedInterfaceChangeInfo; | ||
/** | ||
* The version update information. | ||
*/ | ||
updated: HostedInterfaceChangeInfo; | ||
/** | ||
* Indicates whether the version is currently published. | ||
*/ | ||
isPublished: boolean; | ||
} | ||
|
||
/** | ||
* @param <T> - Hosted interface config model | ||
*/ | ||
export interface HostedInterfaceVersion<T> { | ||
/** | ||
* The version number. | ||
*/ | ||
version: number; | ||
/** | ||
* The optional version label. | ||
*/ | ||
label?: string; | ||
/** | ||
* The version creation information. | ||
*/ | ||
created: HostedInterfaceChangeInfo; | ||
/** | ||
* The version update information. | ||
*/ | ||
updated: HostedInterfaceChangeInfo; | ||
/** | ||
* Indicates whether the version is currently published. | ||
*/ | ||
isPublished: boolean; | ||
/** | ||
* This version's interface config. | ||
*/ | ||
configuration: T; | ||
/** | ||
* When an interface is restored, indicates the source version number. | ||
*/ | ||
restoredFromVersion?: number; | ||
} | ||
|
||
export interface ListHostedInterfaceVersionsParams extends Paginated { | ||
/** | ||
* The zero-based page to retrieve. | ||
* | ||
* @default `0` | ||
*/ | ||
page?: number; | ||
/** | ||
* The number of versions to return per page. | ||
* | ||
* @default `10` | ||
*/ | ||
perPage?: number; | ||
/** | ||
* A substring that must appear in a version label for this configuration to appear in results. | ||
*/ | ||
filter?: string; | ||
/** | ||
* The sort order to apply on the interface version number. | ||
* | ||
* **Allowed values:** | ||
* - `undefined`: Configurations are returned in no specific order. | ||
* - `asc`: Sort version by number in ascending order. | ||
* - `desc`: Sort version by number in descending order. | ||
* | ||
* @default `undefined` | ||
*/ | ||
order?: 'asc' | 'desc'; | ||
} | ||
|
||
export interface UpdateVersionedHostedInterfaceExtraParams { | ||
/** | ||
* The label to describe this particular interface version being created. | ||
*/ | ||
versionLabel?: string; | ||
} | ||
|
||
export interface UpdateInterfaceVersionLabelParams { | ||
/** | ||
* The optional version label. | ||
*/ | ||
label?: string; | ||
} | ||
|
||
export interface RestoreInterfaceVersionParams { | ||
/** | ||
* The optional version label. | ||
*/ | ||
label?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './HostedInterfaceCoreConfig.model.js'; | ||
export * from './HostedInterfaceVersionsCore.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters