@seamapi/http 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/connect.cjs +269 -2
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +70 -3
- package/lib/seam/connect/routes/acs-credential-pools.d.ts +19 -0
- package/lib/seam/connect/routes/acs-credential-pools.js +73 -0
- package/lib/seam/connect/routes/acs-credential-pools.js.map +1 -0
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.d.ts +19 -0
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.js +73 -0
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.js.map +1 -0
- package/lib/seam/connect/routes/acs-credentials.d.ts +6 -2
- package/lib/seam/connect/routes/acs-credentials.js +12 -2
- package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
- package/lib/seam/connect/routes/acs-entrances.d.ts +23 -0
- package/lib/seam/connect/routes/acs-entrances.js +81 -0
- package/lib/seam/connect/routes/acs-entrances.js.map +1 -0
- package/lib/seam/connect/routes/acs.d.ts +6 -0
- package/lib/seam/connect/routes/acs.js +12 -0
- package/lib/seam/connect/routes/acs.js.map +1 -1
- package/lib/seam/connect/routes/index.d.ts +3 -0
- package/lib/seam/connect/routes/index.js +3 -0
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/user-identities.d.ts +5 -1
- package/lib/seam/connect/routes/user-identities.js +8 -0
- package/lib/seam/connect/routes/user-identities.js.map +1 -1
- package/lib/seam/connect/routes/workspaces.d.ts +4 -0
- package/lib/seam/connect/routes/workspaces.js +8 -0
- package/lib/seam/connect/routes/workspaces.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +4 -4
- package/src/lib/seam/connect/routes/acs-credential-pools.ts +154 -0
- package/src/lib/seam/connect/routes/acs-credential-provisioning-automations.ts +162 -0
- package/src/lib/seam/connect/routes/acs-credentials.ts +33 -4
- package/src/lib/seam/connect/routes/acs-entrances.ts +173 -0
- package/src/lib/seam/connect/routes/acs.ts +18 -0
- package/src/lib/seam/connect/routes/index.ts +3 -0
- package/src/lib/seam/connect/routes/user-identities.ts +26 -1
- package/src/lib/seam/connect/routes/workspaces.ts +20 -0
- package/src/lib/version.ts +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { type Client } from '../../../../lib/seam/connect/client.js';
|
|
2
2
|
import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../lib/seam/connect/options.js';
|
|
3
3
|
import { SeamHttpAcsAccessGroups } from './acs-access-groups.js';
|
|
4
|
+
import { SeamHttpAcsCredentialPools } from './acs-credential-pools.js';
|
|
5
|
+
import { SeamHttpAcsCredentialProvisioningAutomations } from './acs-credential-provisioning-automations.js';
|
|
4
6
|
import { SeamHttpAcsCredentials } from './acs-credentials.js';
|
|
7
|
+
import { SeamHttpAcsEntrances } from './acs-entrances.js';
|
|
5
8
|
import { SeamHttpAcsSystems } from './acs-systems.js';
|
|
6
9
|
import { SeamHttpAcsUsers } from './acs-users.js';
|
|
7
10
|
export declare class SeamHttpAcs {
|
|
@@ -15,7 +18,10 @@ export declare class SeamHttpAcs {
|
|
|
15
18
|
static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpAcs;
|
|
16
19
|
static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpAcs;
|
|
17
20
|
get accessGroups(): SeamHttpAcsAccessGroups;
|
|
21
|
+
get credentialPools(): SeamHttpAcsCredentialPools;
|
|
22
|
+
get credentialProvisioningAutomations(): SeamHttpAcsCredentialProvisioningAutomations;
|
|
18
23
|
get credentials(): SeamHttpAcsCredentials;
|
|
24
|
+
get entrances(): SeamHttpAcsEntrances;
|
|
19
25
|
get systems(): SeamHttpAcsSystems;
|
|
20
26
|
get users(): SeamHttpAcsUsers;
|
|
21
27
|
}
|
|
@@ -7,7 +7,10 @@ import { createClient } from '../../../../lib/seam/connect/client.js';
|
|
|
7
7
|
import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, SeamHttpInvalidOptionsError, } from '../../../../lib/seam/connect/options.js';
|
|
8
8
|
import { limitToSeamHttpRequestOptions, parseOptions, } from '../../../../lib/seam/connect/parse-options.js';
|
|
9
9
|
import { SeamHttpAcsAccessGroups } from './acs-access-groups.js';
|
|
10
|
+
import { SeamHttpAcsCredentialPools } from './acs-credential-pools.js';
|
|
11
|
+
import { SeamHttpAcsCredentialProvisioningAutomations } from './acs-credential-provisioning-automations.js';
|
|
10
12
|
import { SeamHttpAcsCredentials } from './acs-credentials.js';
|
|
13
|
+
import { SeamHttpAcsEntrances } from './acs-entrances.js';
|
|
11
14
|
import { SeamHttpAcsSystems } from './acs-systems.js';
|
|
12
15
|
import { SeamHttpAcsUsers } from './acs-users.js';
|
|
13
16
|
import { SeamHttpClientSessions } from './client-sessions.js';
|
|
@@ -68,9 +71,18 @@ export class SeamHttpAcs {
|
|
|
68
71
|
get accessGroups() {
|
|
69
72
|
return SeamHttpAcsAccessGroups.fromClient(this.client, this.defaults);
|
|
70
73
|
}
|
|
74
|
+
get credentialPools() {
|
|
75
|
+
return SeamHttpAcsCredentialPools.fromClient(this.client, this.defaults);
|
|
76
|
+
}
|
|
77
|
+
get credentialProvisioningAutomations() {
|
|
78
|
+
return SeamHttpAcsCredentialProvisioningAutomations.fromClient(this.client, this.defaults);
|
|
79
|
+
}
|
|
71
80
|
get credentials() {
|
|
72
81
|
return SeamHttpAcsCredentials.fromClient(this.client, this.defaults);
|
|
73
82
|
}
|
|
83
|
+
get entrances() {
|
|
84
|
+
return SeamHttpAcsEntrances.fromClient(this.client, this.defaults);
|
|
85
|
+
}
|
|
74
86
|
get systems() {
|
|
75
87
|
return SeamHttpAcsSystems.fromClient(this.client, this.defaults);
|
|
76
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acs.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/acs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAA;AAC1E,OAAO,EAAe,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,wCAAwC,EACxC,wCAAwC,EAExC,2BAA2B,GAQ5B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,6BAA6B,EAC7B,YAAY,GACb,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,MAAM,OAAO,WAAW;IAItB,YAAY,kBAA4C,EAAE;QACxD,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,CAAA;QAC7C,IAAI,CAAC,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A;SACF;QACD,OAAO,IAAI,WAAW,CAAC,kBAAkB,CAAC,CAAA;IAC5C,CAAC;IAED,IAAI,YAAY;QACd,OAAO,uBAAuB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvE,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,0BAA0B,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC1E,CAAC;IAED,IAAI,iCAAiC;QACnC,OAAO,4CAA4C,CAAC,UAAU,CAC5D,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,QAAQ,CACd,CAAA;IACH,CAAC;IAED,IAAI,WAAW;QACb,OAAO,sBAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IACtE,CAAC;IAED,IAAI,SAAS;QACX,OAAO,oBAAoB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IACpE,CAAC;IAED,IAAI,OAAO;QACT,OAAO,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IAClE,CAAC;IAED,IAAI,KAAK;QACP,OAAO,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IAChE,CAAC;CACF"}
|
|
@@ -2,7 +2,10 @@ export * from './access-codes.js';
|
|
|
2
2
|
export * from './access-codes-unmanaged.js';
|
|
3
3
|
export * from './acs.js';
|
|
4
4
|
export * from './acs-access-groups.js';
|
|
5
|
+
export * from './acs-credential-pools.js';
|
|
6
|
+
export * from './acs-credential-provisioning-automations.js';
|
|
5
7
|
export * from './acs-credentials.js';
|
|
8
|
+
export * from './acs-entrances.js';
|
|
6
9
|
export * from './acs-systems.js';
|
|
7
10
|
export * from './acs-users.js';
|
|
8
11
|
export * from './action-attempts.js';
|
|
@@ -2,7 +2,10 @@ export * from './access-codes.js';
|
|
|
2
2
|
export * from './access-codes-unmanaged.js';
|
|
3
3
|
export * from './acs.js';
|
|
4
4
|
export * from './acs-access-groups.js';
|
|
5
|
+
export * from './acs-credential-pools.js';
|
|
6
|
+
export * from './acs-credential-provisioning-automations.js';
|
|
5
7
|
export * from './acs-credentials.js';
|
|
8
|
+
export * from './acs-entrances.js';
|
|
6
9
|
export * from './acs-systems.js';
|
|
7
10
|
export * from './acs-users.js';
|
|
8
11
|
export * from './action-attempts.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,UAAU,CAAA;AACxB,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,wBAAwB,CAAA;AACtC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,qCAAqC,CAAA;AACnD,cAAc,kBAAkB,CAAA;AAChC,cAAc,4CAA4C,CAAA;AAC1D,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,UAAU,CAAA;AACxB,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,8CAA8C,CAAA;AAC5D,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,wBAAwB,CAAA;AACtC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,qCAAqC,CAAA;AACnD,cAAc,kBAAkB,CAAA;AAChC,cAAc,4CAA4C,CAAA;AAC1D,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
|
|
1
|
+
import type { RouteRequestBody, RouteRequestParams, RouteResponse } from '@seamapi/types/connect';
|
|
2
2
|
import type { SetNonNullable } from 'type-fest';
|
|
3
3
|
import { type Client } from '../../../../lib/seam/connect/client.js';
|
|
4
4
|
import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../lib/seam/connect/options.js';
|
|
@@ -16,6 +16,7 @@ export declare class SeamHttpUserIdentities {
|
|
|
16
16
|
create(body?: UserIdentitiesCreateBody): Promise<UserIdentitiesCreateResponse['user_identity']>;
|
|
17
17
|
get(body?: UserIdentitiesGetParams): Promise<UserIdentitiesGetResponse['user_identity']>;
|
|
18
18
|
grantAccessToDevice(body?: UserIdentitiesGrantAccessToDeviceBody): Promise<void>;
|
|
19
|
+
list(params?: UserIdentitiesListParams): Promise<UserIdentitiesListResponse['user_identities']>;
|
|
19
20
|
listAccessibleDevices(body?: UserIdentitiesListAccessibleDevicesParams): Promise<UserIdentitiesListAccessibleDevicesResponse['accessible_devices']>;
|
|
20
21
|
listAcsUsers(body?: UserIdentitiesListAcsUsersParams): Promise<UserIdentitiesListAcsUsersResponse['acs_users']>;
|
|
21
22
|
removeAcsUser(body?: UserIdentitiesRemoveAcsUserBody): Promise<void>;
|
|
@@ -33,6 +34,9 @@ export type UserIdentitiesGetOptions = never;
|
|
|
33
34
|
export type UserIdentitiesGrantAccessToDeviceBody = RouteRequestBody<'/user_identities/grant_access_to_device'>;
|
|
34
35
|
export type UserIdentitiesGrantAccessToDeviceResponse = SetNonNullable<Required<RouteResponse<'/user_identities/grant_access_to_device'>>>;
|
|
35
36
|
export type UserIdentitiesGrantAccessToDeviceOptions = never;
|
|
37
|
+
export type UserIdentitiesListParams = RouteRequestParams<'/user_identities/list'>;
|
|
38
|
+
export type UserIdentitiesListResponse = SetNonNullable<Required<RouteResponse<'/user_identities/list'>>>;
|
|
39
|
+
export type UserIdentitiesListOptions = never;
|
|
36
40
|
export type UserIdentitiesListAccessibleDevicesParams = RouteRequestBody<'/user_identities/list_accessible_devices'>;
|
|
37
41
|
export type UserIdentitiesListAccessibleDevicesResponse = SetNonNullable<Required<RouteResponse<'/user_identities/list_accessible_devices'>>>;
|
|
38
42
|
export type UserIdentitiesListAccessibleDevicesOptions = never;
|
|
@@ -91,6 +91,14 @@ export class SeamHttpUserIdentities {
|
|
|
91
91
|
data: body,
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
+
async list(params) {
|
|
95
|
+
const { data } = await this.client.request({
|
|
96
|
+
url: '/user_identities/list',
|
|
97
|
+
method: 'get',
|
|
98
|
+
params,
|
|
99
|
+
});
|
|
100
|
+
return data.user_identities;
|
|
101
|
+
}
|
|
94
102
|
async listAccessibleDevices(body) {
|
|
95
103
|
const { data } = await this.client.request({
|
|
96
104
|
url: '/user_identities/list_accessible_devices',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-identities.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/user-identities.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"user-identities.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/user-identities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAA;AAC1E,OAAO,EAAe,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,wCAAwC,EACxC,wCAAwC,EAExC,2BAA2B,GAQ5B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,6BAA6B,EAC7B,YAAY,GACb,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,MAAM,OAAO,sBAAsB;IAIjC,YAAY,kBAA4C,EAAE;QACxD,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,CAAA;QAC7C,IAAI,CAAC,MAAM,GAAG,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;QAC1E,IAAI,CAAC,QAAQ,GAAG,6BAA6B,CAAC,OAAO,CAAC,CAAA;IACxD,CAAC;IAED,MAAM,CAAC,UAAU,CACf,MAA2C,EAC3C,UAAqD,EAAE;QAEvD,MAAM,kBAAkB,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,CAAA;QACjD,IAAI,CAAC,2BAA2B,CAAC,kBAAkB,CAAC,EAAE;YACpD,MAAM,IAAI,2BAA2B,CAAC,gBAAgB,CAAC,CAAA;SACxD;QACD,OAAO,IAAI,sBA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7D,GAAG,EAAE,kCAAkC;YACvC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,IAA6C;QAE7C,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAA6C;YACpE,GAAG,EAAE,0CAA0C;YAC/C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -12,10 +12,14 @@ export declare class SeamHttpWorkspaces {
|
|
|
12
12
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpWorkspaces>;
|
|
13
13
|
static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpWorkspaces;
|
|
14
14
|
static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpWorkspaces;
|
|
15
|
+
create(body?: WorkspacesCreateBody): Promise<WorkspacesCreateResponse['workspace']>;
|
|
15
16
|
get(params?: WorkspacesGetParams): Promise<WorkspacesGetResponse['workspace']>;
|
|
16
17
|
list(params?: WorkspacesListParams): Promise<WorkspacesListResponse['workspaces']>;
|
|
17
18
|
resetSandbox(body?: WorkspacesResetSandboxBody): Promise<void>;
|
|
18
19
|
}
|
|
20
|
+
export type WorkspacesCreateBody = RouteRequestBody<'/workspaces/create'>;
|
|
21
|
+
export type WorkspacesCreateResponse = SetNonNullable<Required<RouteResponse<'/workspaces/create'>>>;
|
|
22
|
+
export type WorkspacesCreateOptions = never;
|
|
19
23
|
export type WorkspacesGetParams = RouteRequestParams<'/workspaces/get'>;
|
|
20
24
|
export type WorkspacesGetResponse = SetNonNullable<Required<RouteResponse<'/workspaces/get'>>>;
|
|
21
25
|
export type WorkspacesGetOptions = never;
|
|
@@ -61,6 +61,14 @@ export class SeamHttpWorkspaces {
|
|
|
61
61
|
}
|
|
62
62
|
return new SeamHttpWorkspaces(constructorOptions);
|
|
63
63
|
}
|
|
64
|
+
async create(body) {
|
|
65
|
+
const { data } = await this.client.request({
|
|
66
|
+
url: '/workspaces/create',
|
|
67
|
+
method: 'post',
|
|
68
|
+
data: body,
|
|
69
|
+
});
|
|
70
|
+
return data.workspace;
|
|
71
|
+
}
|
|
64
72
|
async get(params) {
|
|
65
73
|
const { data } = await this.client.request({
|
|
66
74
|
url: '/workspaces/get',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/workspaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAA;AAC1E,OAAO,EAAe,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,wCAAwC,EACxC,wCAAwC,EAExC,2BAA2B,GAQ5B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,6BAA6B,EAC7B,YAAY,GACb,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,MAAM,OAAO,kBAAkB;IAI7B,YAAY,kBAA4C,EAAE;QACxD,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,CAAA;QAC7C,IAAI,CAAC,MAAM,GAAG,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA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,OAAO,IAAI,CAAC,SAAS,CAAA;IACvB,CAAC;IAED,KAAK,CAAC,GAAG,CACP,MAA4B;QAE5B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwB;YAChE,GAAG,EAAE,iBAAiB;YACtB,MAAM,EAAE,KAAK;YACb,MAAM;SACP,CAAC,CAAA;QAEF,OAAO,IAAI,CAAC,SAAS,CAAA;IACvB,CAAC;IAED,KAAK,CAAC,IAAI,CACR,MAA6B;QAE7B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAyB;YACjE,GAAG,EAAE,kBAAkB;YACvB,MAAM,EAAE,KAAK;YACb,MAAM;SACP,CAAC,CAAA;QAEF,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,IAAiC;QAClD,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAiC;YACxD,GAAG,EAAE,2BAA2B;YAChC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const seamapiJavascriptHttpVersion = "0.
|
|
1
|
+
declare const seamapiJavascriptHttpVersion = "0.10.0";
|
|
2
2
|
export default seamapiJavascriptHttpVersion;
|
package/lib/version.js
CHANGED
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/lib/version.ts"],"names":[],"mappings":"AAAA,MAAM,4BAA4B,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/lib/version.ts"],"names":[],"mappings":"AAAA,MAAM,4BAA4B,GAAG,QAAQ,CAAA;AAE7C,eAAe,4BAA4B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamapi/http",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "JavaScript HTTP client for the Seam API written in TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"npm": ">= 8.1.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@seamapi/types": "^1.
|
|
87
|
+
"@seamapi/types": "^1.58.0",
|
|
88
88
|
"type-fest": "^4.0.0"
|
|
89
89
|
},
|
|
90
90
|
"peerDependenciesMeta": {
|
|
@@ -98,11 +98,11 @@
|
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"axios": "^1.5.0",
|
|
100
100
|
"axios-better-stacktrace": "^2.1.5",
|
|
101
|
-
"axios-retry": "^3.8.1"
|
|
102
|
-
"@seamapi/types": "^1.44.1"
|
|
101
|
+
"axios-retry": "^3.8.1"
|
|
103
102
|
},
|
|
104
103
|
"devDependencies": {
|
|
105
104
|
"@seamapi/fake-seam-connect": "^1.43.0",
|
|
105
|
+
"@seamapi/types": "^1.58.0",
|
|
106
106
|
"@types/eslint": "^8.44.2",
|
|
107
107
|
"@types/node": "^18.11.18",
|
|
108
108
|
"ava": "^5.0.1",
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Automatically generated by generate-routes.ts.
|
|
3
|
+
* Do not edit this file or add other files to this directory.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
|
|
7
|
+
import type { SetNonNullable } from 'type-fest'
|
|
8
|
+
|
|
9
|
+
import { warnOnInsecureuserIdentifierKey } from 'lib/seam/connect/auth.js'
|
|
10
|
+
import { type Client, createClient } from 'lib/seam/connect/client.js'
|
|
11
|
+
import {
|
|
12
|
+
isSeamHttpOptionsWithApiKey,
|
|
13
|
+
isSeamHttpOptionsWithClient,
|
|
14
|
+
isSeamHttpOptionsWithClientSessionToken,
|
|
15
|
+
isSeamHttpOptionsWithConsoleSessionToken,
|
|
16
|
+
isSeamHttpOptionsWithPersonalAccessToken,
|
|
17
|
+
type SeamHttpFromPublishableKeyOptions,
|
|
18
|
+
SeamHttpInvalidOptionsError,
|
|
19
|
+
type SeamHttpOptions,
|
|
20
|
+
type SeamHttpOptionsWithApiKey,
|
|
21
|
+
type SeamHttpOptionsWithClient,
|
|
22
|
+
type SeamHttpOptionsWithClientSessionToken,
|
|
23
|
+
type SeamHttpOptionsWithConsoleSessionToken,
|
|
24
|
+
type SeamHttpOptionsWithPersonalAccessToken,
|
|
25
|
+
type SeamHttpRequestOptions,
|
|
26
|
+
} from 'lib/seam/connect/options.js'
|
|
27
|
+
import {
|
|
28
|
+
limitToSeamHttpRequestOptions,
|
|
29
|
+
parseOptions,
|
|
30
|
+
} from 'lib/seam/connect/parse-options.js'
|
|
31
|
+
|
|
32
|
+
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
33
|
+
|
|
34
|
+
export class SeamHttpAcsCredentialPools {
|
|
35
|
+
client: Client
|
|
36
|
+
readonly defaults: Required<SeamHttpRequestOptions>
|
|
37
|
+
|
|
38
|
+
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
39
|
+
const options = parseOptions(apiKeyOrOptions)
|
|
40
|
+
this.client = 'client' in options ? options.client : createClient(options)
|
|
41
|
+
this.defaults = limitToSeamHttpRequestOptions(options)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static fromClient(
|
|
45
|
+
client: SeamHttpOptionsWithClient['client'],
|
|
46
|
+
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
47
|
+
): SeamHttpAcsCredentialPools {
|
|
48
|
+
const constructorOptions = { ...options, client }
|
|
49
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
50
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
51
|
+
}
|
|
52
|
+
return new SeamHttpAcsCredentialPools(constructorOptions)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static fromApiKey(
|
|
56
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
57
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
58
|
+
): SeamHttpAcsCredentialPools {
|
|
59
|
+
const constructorOptions = { ...options, apiKey }
|
|
60
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
61
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
62
|
+
}
|
|
63
|
+
return new SeamHttpAcsCredentialPools(constructorOptions)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static fromClientSessionToken(
|
|
67
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
68
|
+
options: Omit<
|
|
69
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
70
|
+
'clientSessionToken'
|
|
71
|
+
> = {},
|
|
72
|
+
): SeamHttpAcsCredentialPools {
|
|
73
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
74
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
75
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
76
|
+
}
|
|
77
|
+
return new SeamHttpAcsCredentialPools(constructorOptions)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
static async fromPublishableKey(
|
|
81
|
+
publishableKey: string,
|
|
82
|
+
userIdentifierKey: string,
|
|
83
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
84
|
+
): Promise<SeamHttpAcsCredentialPools> {
|
|
85
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
86
|
+
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
87
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
88
|
+
throw new SeamHttpInvalidOptionsError(
|
|
89
|
+
'The client option cannot be used with SeamHttp.fromPublishableKey',
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
const client = createClient(clientOptions)
|
|
93
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client)
|
|
94
|
+
const { token } = await clientSessions.getOrCreate({
|
|
95
|
+
user_identifier_key: userIdentifierKey,
|
|
96
|
+
})
|
|
97
|
+
return SeamHttpAcsCredentialPools.fromClientSessionToken(token, options)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
static fromConsoleSessionToken(
|
|
101
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
102
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
103
|
+
options: Omit<
|
|
104
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
105
|
+
'consoleSessionToken' | 'workspaceId'
|
|
106
|
+
> = {},
|
|
107
|
+
): SeamHttpAcsCredentialPools {
|
|
108
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
109
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
110
|
+
throw new SeamHttpInvalidOptionsError(
|
|
111
|
+
'Missing consoleSessionToken or workspaceId',
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
return new SeamHttpAcsCredentialPools(constructorOptions)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
static fromPersonalAccessToken(
|
|
118
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
119
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
120
|
+
options: Omit<
|
|
121
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
122
|
+
'personalAccessToken' | 'workspaceId'
|
|
123
|
+
> = {},
|
|
124
|
+
): SeamHttpAcsCredentialPools {
|
|
125
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
126
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
127
|
+
throw new SeamHttpInvalidOptionsError(
|
|
128
|
+
'Missing personalAccessToken or workspaceId',
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
return new SeamHttpAcsCredentialPools(constructorOptions)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
async list(
|
|
135
|
+
body?: AcsCredentialPoolsListParams,
|
|
136
|
+
): Promise<AcsCredentialPoolsListResponse['acs_credential_pools']> {
|
|
137
|
+
const { data } = await this.client.request<AcsCredentialPoolsListResponse>({
|
|
138
|
+
url: '/acs/credential_pools/list',
|
|
139
|
+
method: 'post',
|
|
140
|
+
data: body,
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
return data.acs_credential_pools
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type AcsCredentialPoolsListParams =
|
|
148
|
+
RouteRequestBody<'/acs/credential_pools/list'>
|
|
149
|
+
|
|
150
|
+
export type AcsCredentialPoolsListResponse = SetNonNullable<
|
|
151
|
+
Required<RouteResponse<'/acs/credential_pools/list'>>
|
|
152
|
+
>
|
|
153
|
+
|
|
154
|
+
export type AcsCredentialPoolsListOptions = never
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Automatically generated by generate-routes.ts.
|
|
3
|
+
* Do not edit this file or add other files to this directory.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
|
|
7
|
+
import type { SetNonNullable } from 'type-fest'
|
|
8
|
+
|
|
9
|
+
import { warnOnInsecureuserIdentifierKey } from 'lib/seam/connect/auth.js'
|
|
10
|
+
import { type Client, createClient } from 'lib/seam/connect/client.js'
|
|
11
|
+
import {
|
|
12
|
+
isSeamHttpOptionsWithApiKey,
|
|
13
|
+
isSeamHttpOptionsWithClient,
|
|
14
|
+
isSeamHttpOptionsWithClientSessionToken,
|
|
15
|
+
isSeamHttpOptionsWithConsoleSessionToken,
|
|
16
|
+
isSeamHttpOptionsWithPersonalAccessToken,
|
|
17
|
+
type SeamHttpFromPublishableKeyOptions,
|
|
18
|
+
SeamHttpInvalidOptionsError,
|
|
19
|
+
type SeamHttpOptions,
|
|
20
|
+
type SeamHttpOptionsWithApiKey,
|
|
21
|
+
type SeamHttpOptionsWithClient,
|
|
22
|
+
type SeamHttpOptionsWithClientSessionToken,
|
|
23
|
+
type SeamHttpOptionsWithConsoleSessionToken,
|
|
24
|
+
type SeamHttpOptionsWithPersonalAccessToken,
|
|
25
|
+
type SeamHttpRequestOptions,
|
|
26
|
+
} from 'lib/seam/connect/options.js'
|
|
27
|
+
import {
|
|
28
|
+
limitToSeamHttpRequestOptions,
|
|
29
|
+
parseOptions,
|
|
30
|
+
} from 'lib/seam/connect/parse-options.js'
|
|
31
|
+
|
|
32
|
+
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
33
|
+
|
|
34
|
+
export class SeamHttpAcsCredentialProvisioningAutomations {
|
|
35
|
+
client: Client
|
|
36
|
+
readonly defaults: Required<SeamHttpRequestOptions>
|
|
37
|
+
|
|
38
|
+
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
39
|
+
const options = parseOptions(apiKeyOrOptions)
|
|
40
|
+
this.client = 'client' in options ? options.client : createClient(options)
|
|
41
|
+
this.defaults = limitToSeamHttpRequestOptions(options)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static fromClient(
|
|
45
|
+
client: SeamHttpOptionsWithClient['client'],
|
|
46
|
+
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
47
|
+
): SeamHttpAcsCredentialProvisioningAutomations {
|
|
48
|
+
const constructorOptions = { ...options, client }
|
|
49
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
50
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
51
|
+
}
|
|
52
|
+
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static fromApiKey(
|
|
56
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
57
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
58
|
+
): SeamHttpAcsCredentialProvisioningAutomations {
|
|
59
|
+
const constructorOptions = { ...options, apiKey }
|
|
60
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
61
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
62
|
+
}
|
|
63
|
+
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static fromClientSessionToken(
|
|
67
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
68
|
+
options: Omit<
|
|
69
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
70
|
+
'clientSessionToken'
|
|
71
|
+
> = {},
|
|
72
|
+
): SeamHttpAcsCredentialProvisioningAutomations {
|
|
73
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
74
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
75
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
76
|
+
}
|
|
77
|
+
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
static async fromPublishableKey(
|
|
81
|
+
publishableKey: string,
|
|
82
|
+
userIdentifierKey: string,
|
|
83
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
84
|
+
): Promise<SeamHttpAcsCredentialProvisioningAutomations> {
|
|
85
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
86
|
+
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
87
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
88
|
+
throw new SeamHttpInvalidOptionsError(
|
|
89
|
+
'The client option cannot be used with SeamHttp.fromPublishableKey',
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
const client = createClient(clientOptions)
|
|
93
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client)
|
|
94
|
+
const { token } = await clientSessions.getOrCreate({
|
|
95
|
+
user_identifier_key: userIdentifierKey,
|
|
96
|
+
})
|
|
97
|
+
return SeamHttpAcsCredentialProvisioningAutomations.fromClientSessionToken(
|
|
98
|
+
token,
|
|
99
|
+
options,
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
static fromConsoleSessionToken(
|
|
104
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
105
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
106
|
+
options: Omit<
|
|
107
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
108
|
+
'consoleSessionToken' | 'workspaceId'
|
|
109
|
+
> = {},
|
|
110
|
+
): SeamHttpAcsCredentialProvisioningAutomations {
|
|
111
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
112
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
113
|
+
throw new SeamHttpInvalidOptionsError(
|
|
114
|
+
'Missing consoleSessionToken or workspaceId',
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
static fromPersonalAccessToken(
|
|
121
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
122
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
123
|
+
options: Omit<
|
|
124
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
125
|
+
'personalAccessToken' | 'workspaceId'
|
|
126
|
+
> = {},
|
|
127
|
+
): SeamHttpAcsCredentialProvisioningAutomations {
|
|
128
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
129
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
130
|
+
throw new SeamHttpInvalidOptionsError(
|
|
131
|
+
'Missing personalAccessToken or workspaceId',
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
async launch(
|
|
138
|
+
body?: AcsCredentialProvisioningAutomationsLaunchBody,
|
|
139
|
+
): Promise<
|
|
140
|
+
AcsCredentialProvisioningAutomationsLaunchResponse['acs_credential_provisioning_automation']
|
|
141
|
+
> {
|
|
142
|
+
const { data } =
|
|
143
|
+
await this.client.request<AcsCredentialProvisioningAutomationsLaunchResponse>(
|
|
144
|
+
{
|
|
145
|
+
url: '/acs/credential_provisioning_automations/launch',
|
|
146
|
+
method: 'post',
|
|
147
|
+
data: body,
|
|
148
|
+
},
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
return data.acs_credential_provisioning_automation
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type AcsCredentialProvisioningAutomationsLaunchBody =
|
|
156
|
+
RouteRequestBody<'/acs/credential_provisioning_automations/launch'>
|
|
157
|
+
|
|
158
|
+
export type AcsCredentialProvisioningAutomationsLaunchResponse = SetNonNullable<
|
|
159
|
+
Required<RouteResponse<'/acs/credential_provisioning_automations/launch'>>
|
|
160
|
+
>
|
|
161
|
+
|
|
162
|
+
export type AcsCredentialProvisioningAutomationsLaunchOptions = never
|
|
@@ -131,12 +131,16 @@ export class SeamHttpAcsCredentials {
|
|
|
131
131
|
return new SeamHttpAcsCredentials(constructorOptions)
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
async assign(
|
|
135
|
-
|
|
134
|
+
async assign(
|
|
135
|
+
body?: AcsCredentialsAssignBody,
|
|
136
|
+
): Promise<AcsCredentialsAssignResponse['acs_credential']> {
|
|
137
|
+
const { data } = await this.client.request<AcsCredentialsAssignResponse>({
|
|
136
138
|
url: '/acs/credentials/assign',
|
|
137
139
|
method: 'post',
|
|
138
140
|
data: body,
|
|
139
141
|
})
|
|
142
|
+
|
|
143
|
+
return data.acs_credential
|
|
140
144
|
}
|
|
141
145
|
|
|
142
146
|
async create(
|
|
@@ -183,12 +187,28 @@ export class SeamHttpAcsCredentials {
|
|
|
183
187
|
return data.acs_credentials
|
|
184
188
|
}
|
|
185
189
|
|
|
186
|
-
async unassign(
|
|
187
|
-
|
|
190
|
+
async unassign(
|
|
191
|
+
body?: AcsCredentialsUnassignBody,
|
|
192
|
+
): Promise<AcsCredentialsUnassignResponse['acs_credential']> {
|
|
193
|
+
const { data } = await this.client.request<AcsCredentialsUnassignResponse>({
|
|
188
194
|
url: '/acs/credentials/unassign',
|
|
189
195
|
method: 'post',
|
|
190
196
|
data: body,
|
|
191
197
|
})
|
|
198
|
+
|
|
199
|
+
return data.acs_credential
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
async update(
|
|
203
|
+
body?: AcsCredentialsUpdateBody,
|
|
204
|
+
): Promise<AcsCredentialsUpdateResponse['acs_credential']> {
|
|
205
|
+
const { data } = await this.client.request<AcsCredentialsUpdateResponse>({
|
|
206
|
+
url: '/acs/credentials/update',
|
|
207
|
+
method: 'post',
|
|
208
|
+
data: body,
|
|
209
|
+
})
|
|
210
|
+
|
|
211
|
+
return data.acs_credential
|
|
192
212
|
}
|
|
193
213
|
}
|
|
194
214
|
|
|
@@ -243,3 +263,12 @@ export type AcsCredentialsUnassignResponse = SetNonNullable<
|
|
|
243
263
|
>
|
|
244
264
|
|
|
245
265
|
export type AcsCredentialsUnassignOptions = never
|
|
266
|
+
|
|
267
|
+
export type AcsCredentialsUpdateBody =
|
|
268
|
+
RouteRequestBody<'/acs/credentials/update'>
|
|
269
|
+
|
|
270
|
+
export type AcsCredentialsUpdateResponse = SetNonNullable<
|
|
271
|
+
Required<RouteResponse<'/acs/credentials/update'>>
|
|
272
|
+
>
|
|
273
|
+
|
|
274
|
+
export type AcsCredentialsUpdateOptions = never
|