@seamapi/http 1.25.1 → 1.26.1
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/dist/connect.cjs +0 -536
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +88 -207
- package/lib/seam/connect/resolve-action-attempt.d.ts +116 -116
- package/lib/seam/connect/routes/acs-access-groups.d.ts +0 -2
- package/lib/seam/connect/routes/acs-access-groups.js +0 -4
- package/lib/seam/connect/routes/acs-access-groups.js.map +1 -1
- package/lib/seam/connect/routes/acs-credentials.d.ts +0 -6
- package/lib/seam/connect/routes/acs-credentials.js +0 -12
- package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
- package/lib/seam/connect/routes/acs-users.d.ts +0 -2
- package/lib/seam/connect/routes/acs-users.js +0 -4
- package/lib/seam/connect/routes/acs-users.js.map +1 -1
- package/lib/seam/connect/routes/acs.d.ts +0 -4
- package/lib/seam/connect/routes/acs.js +0 -8
- package/lib/seam/connect/routes/acs.js.map +1 -1
- package/lib/seam/connect/routes/devices.d.ts +0 -4
- package/lib/seam/connect/routes/devices.js +0 -8
- package/lib/seam/connect/routes/devices.js.map +1 -1
- package/lib/seam/connect/routes/index.d.ts +0 -5
- package/lib/seam/connect/routes/index.js +0 -5
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/thermostats.d.ts +0 -4
- package/lib/seam/connect/routes/thermostats.js +0 -8
- package/lib/seam/connect/routes/thermostats.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/lib/seam/connect/routes/acs-access-groups.ts +0 -8
- package/src/lib/seam/connect/routes/acs-credentials.ts +0 -31
- package/src/lib/seam/connect/routes/acs-users.ts +0 -5
- package/src/lib/seam/connect/routes/acs.ts +0 -13
- package/src/lib/seam/connect/routes/devices.ts +0 -17
- package/src/lib/seam/connect/routes/index.ts +0 -5
- package/src/lib/seam/connect/routes/thermostats.ts +0 -19
- package/src/lib/version.ts +1 -1
- package/lib/seam/connect/routes/acs-access-groups-unmanaged.d.ts +0 -27
- package/lib/seam/connect/routes/acs-access-groups-unmanaged.js +0 -100
- package/lib/seam/connect/routes/acs-access-groups-unmanaged.js.map +0 -1
- package/lib/seam/connect/routes/acs-credential-pools.d.ts +0 -23
- package/lib/seam/connect/routes/acs-credential-pools.js +0 -92
- package/lib/seam/connect/routes/acs-credential-pools.js.map +0 -1
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.d.ts +0 -23
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.js +0 -92
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.js.map +0 -1
- package/lib/seam/connect/routes/acs-credentials-unmanaged.d.ts +0 -27
- package/lib/seam/connect/routes/acs-credentials-unmanaged.js +0 -100
- package/lib/seam/connect/routes/acs-credentials-unmanaged.js.map +0 -1
- package/lib/seam/connect/routes/acs-users-unmanaged.d.ts +0 -27
- package/lib/seam/connect/routes/acs-users-unmanaged.js +0 -100
- package/lib/seam/connect/routes/acs-users-unmanaged.js.map +0 -1
- package/src/lib/seam/connect/routes/acs-access-groups-unmanaged.ts +0 -209
- package/src/lib/seam/connect/routes/acs-credential-pools.ts +0 -183
- package/src/lib/seam/connect/routes/acs-credential-provisioning-automations.ts +0 -189
- package/src/lib/seam/connect/routes/acs-credentials-unmanaged.ts +0 -206
- package/src/lib/seam/connect/routes/acs-users-unmanaged.ts +0 -203
|
@@ -171,15 +171,6 @@ export class SeamHttpDevices {
|
|
|
171
171
|
return SeamHttpDevicesSimulate.fromClient(this.client, this.defaults)
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
delete(body?: DevicesDeleteParams): SeamHttpRequest<void, undefined> {
|
|
175
|
-
return new SeamHttpRequest(this, {
|
|
176
|
-
pathname: '/devices/delete',
|
|
177
|
-
method: 'post',
|
|
178
|
-
body,
|
|
179
|
-
responseKey: undefined,
|
|
180
|
-
})
|
|
181
|
-
}
|
|
182
|
-
|
|
183
174
|
get(body?: DevicesGetParams): SeamHttpRequest<DevicesGetResponse, 'device'> {
|
|
184
175
|
return new SeamHttpRequest(this, {
|
|
185
176
|
pathname: '/devices/get',
|
|
@@ -221,14 +212,6 @@ export class SeamHttpDevices {
|
|
|
221
212
|
}
|
|
222
213
|
}
|
|
223
214
|
|
|
224
|
-
export type DevicesDeleteParams = RouteRequestBody<'/devices/delete'>
|
|
225
|
-
|
|
226
|
-
export type DevicesDeleteResponse = SetNonNullable<
|
|
227
|
-
Required<RouteResponse<'/devices/delete'>>
|
|
228
|
-
>
|
|
229
|
-
|
|
230
|
-
export type DevicesDeleteOptions = never
|
|
231
|
-
|
|
232
215
|
export type DevicesGetParams = RouteRequestBody<'/devices/get'>
|
|
233
216
|
|
|
234
217
|
export type DevicesGetResponse = SetNonNullable<
|
|
@@ -3,17 +3,12 @@ export * from './access-codes-simulate.js'
|
|
|
3
3
|
export * from './access-codes-unmanaged.js'
|
|
4
4
|
export * from './acs.js'
|
|
5
5
|
export * from './acs-access-groups.js'
|
|
6
|
-
export * from './acs-access-groups-unmanaged.js'
|
|
7
|
-
export * from './acs-credential-pools.js'
|
|
8
|
-
export * from './acs-credential-provisioning-automations.js'
|
|
9
6
|
export * from './acs-credentials.js'
|
|
10
|
-
export * from './acs-credentials-unmanaged.js'
|
|
11
7
|
export * from './acs-encoders.js'
|
|
12
8
|
export * from './acs-encoders-simulate.js'
|
|
13
9
|
export * from './acs-entrances.js'
|
|
14
10
|
export * from './acs-systems.js'
|
|
15
11
|
export * from './acs-users.js'
|
|
16
|
-
export * from './acs-users-unmanaged.js'
|
|
17
12
|
export * from './action-attempts.js'
|
|
18
13
|
export * from './bridges.js'
|
|
19
14
|
export * from './client-sessions.js'
|
|
@@ -222,17 +222,6 @@ export class SeamHttpThermostats {
|
|
|
222
222
|
})
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
get(
|
|
226
|
-
body?: ThermostatsGetParams,
|
|
227
|
-
): SeamHttpRequest<ThermostatsGetResponse, 'thermostat'> {
|
|
228
|
-
return new SeamHttpRequest(this, {
|
|
229
|
-
pathname: '/thermostats/get',
|
|
230
|
-
method: 'post',
|
|
231
|
-
body,
|
|
232
|
-
responseKey: 'thermostat',
|
|
233
|
-
})
|
|
234
|
-
}
|
|
235
|
-
|
|
236
225
|
heat(
|
|
237
226
|
body?: ThermostatsHeatBody,
|
|
238
227
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
@@ -384,14 +373,6 @@ export type ThermostatsDeleteClimatePresetResponse = SetNonNullable<
|
|
|
384
373
|
|
|
385
374
|
export type ThermostatsDeleteClimatePresetOptions = never
|
|
386
375
|
|
|
387
|
-
export type ThermostatsGetParams = RouteRequestBody<'/thermostats/get'>
|
|
388
|
-
|
|
389
|
-
export type ThermostatsGetResponse = SetNonNullable<
|
|
390
|
-
Required<RouteResponse<'/thermostats/get'>>
|
|
391
|
-
>
|
|
392
|
-
|
|
393
|
-
export type ThermostatsGetOptions = never
|
|
394
|
-
|
|
395
376
|
export type ThermostatsHeatBody = RouteRequestBody<'/thermostats/heat'>
|
|
396
377
|
|
|
397
378
|
export type ThermostatsHeatResponse = SetNonNullable<
|
package/src/lib/version.ts
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
|
|
2
|
-
import { type Client } from '../../../../lib/seam/connect/client.js';
|
|
3
|
-
import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../lib/seam/connect/options.js';
|
|
4
|
-
import { SeamHttpRequest } from '../../../../lib/seam/connect/seam-http-request.js';
|
|
5
|
-
import { SeamPaginator } from '../../../../lib/seam/connect/seam-paginator.js';
|
|
6
|
-
import type { SetNonNullable } from '../../../../lib/types.js';
|
|
7
|
-
export declare class SeamHttpAcsAccessGroupsUnmanaged {
|
|
8
|
-
client: Client;
|
|
9
|
-
readonly defaults: Required<SeamHttpRequestOptions>;
|
|
10
|
-
constructor(apiKeyOrOptions?: string | SeamHttpOptions);
|
|
11
|
-
static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpAcsAccessGroupsUnmanaged;
|
|
12
|
-
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAcsAccessGroupsUnmanaged;
|
|
13
|
-
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAcsAccessGroupsUnmanaged;
|
|
14
|
-
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpAcsAccessGroupsUnmanaged>;
|
|
15
|
-
static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpAcsAccessGroupsUnmanaged;
|
|
16
|
-
static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpAcsAccessGroupsUnmanaged;
|
|
17
|
-
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(request: SeamHttpRequest<TResponse, TResponseKey>): SeamPaginator<TResponse, TResponseKey>;
|
|
18
|
-
updateClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken']): Promise<void>;
|
|
19
|
-
get(body?: AcsAccessGroupsUnmanagedGetParams): SeamHttpRequest<AcsAccessGroupsUnmanagedGetResponse, 'acs_access_group'>;
|
|
20
|
-
list(body?: AcsAccessGroupsUnmanagedListParams): SeamHttpRequest<AcsAccessGroupsUnmanagedListResponse, 'acs_access_groups'>;
|
|
21
|
-
}
|
|
22
|
-
export type AcsAccessGroupsUnmanagedGetParams = RouteRequestBody<'/acs/access_groups/unmanaged/get'>;
|
|
23
|
-
export type AcsAccessGroupsUnmanagedGetResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/unmanaged/get'>>>;
|
|
24
|
-
export type AcsAccessGroupsUnmanagedGetOptions = never;
|
|
25
|
-
export type AcsAccessGroupsUnmanagedListParams = RouteRequestBody<'/acs/access_groups/unmanaged/list'>;
|
|
26
|
-
export type AcsAccessGroupsUnmanagedListResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/unmanaged/list'>>>;
|
|
27
|
-
export type AcsAccessGroupsUnmanagedListOptions = never;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Automatically generated by generate-routes.ts.
|
|
3
|
-
* Do not edit this file or add other files to this directory.
|
|
4
|
-
*/
|
|
5
|
-
import { getAuthHeadersForClientSessionToken, warnOnInsecureuserIdentifierKey, } from '../../../../lib/seam/connect/auth.js';
|
|
6
|
-
import { createClient } from '../../../../lib/seam/connect/client.js';
|
|
7
|
-
import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, SeamHttpInvalidOptionsError, } from '../../../../lib/seam/connect/options.js';
|
|
8
|
-
import { limitToSeamHttpRequestOptions, parseOptions, } from '../../../../lib/seam/connect/parse-options.js';
|
|
9
|
-
import { SeamHttpRequest } from '../../../../lib/seam/connect/seam-http-request.js';
|
|
10
|
-
import { SeamPaginator } from '../../../../lib/seam/connect/seam-paginator.js';
|
|
11
|
-
import { SeamHttpClientSessions } from './client-sessions.js';
|
|
12
|
-
export class SeamHttpAcsAccessGroupsUnmanaged {
|
|
13
|
-
constructor(apiKeyOrOptions = {}) {
|
|
14
|
-
const options = parseOptions(apiKeyOrOptions);
|
|
15
|
-
this.client = 'client' in options ? options.client : createClient(options);
|
|
16
|
-
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
17
|
-
}
|
|
18
|
-
static fromClient(client, options = {}) {
|
|
19
|
-
const constructorOptions = { ...options, client };
|
|
20
|
-
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
21
|
-
throw new SeamHttpInvalidOptionsError('Missing client');
|
|
22
|
-
}
|
|
23
|
-
return new SeamHttpAcsAccessGroupsUnmanaged(constructorOptions);
|
|
24
|
-
}
|
|
25
|
-
static fromApiKey(apiKey, options = {}) {
|
|
26
|
-
const constructorOptions = { ...options, apiKey };
|
|
27
|
-
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
28
|
-
throw new SeamHttpInvalidOptionsError('Missing apiKey');
|
|
29
|
-
}
|
|
30
|
-
return new SeamHttpAcsAccessGroupsUnmanaged(constructorOptions);
|
|
31
|
-
}
|
|
32
|
-
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
33
|
-
const constructorOptions = { ...options, clientSessionToken };
|
|
34
|
-
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
35
|
-
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken');
|
|
36
|
-
}
|
|
37
|
-
return new SeamHttpAcsAccessGroupsUnmanaged(constructorOptions);
|
|
38
|
-
}
|
|
39
|
-
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
40
|
-
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
41
|
-
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
42
|
-
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
43
|
-
throw new SeamHttpInvalidOptionsError('The client option cannot be used with SeamHttp.fromPublishableKey');
|
|
44
|
-
}
|
|
45
|
-
const client = createClient(clientOptions);
|
|
46
|
-
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
47
|
-
const { token } = await clientSessions.getOrCreate({
|
|
48
|
-
user_identifier_key: userIdentifierKey,
|
|
49
|
-
});
|
|
50
|
-
return SeamHttpAcsAccessGroupsUnmanaged.fromClientSessionToken(token, options);
|
|
51
|
-
}
|
|
52
|
-
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
53
|
-
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
54
|
-
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
55
|
-
throw new SeamHttpInvalidOptionsError('Missing consoleSessionToken or workspaceId');
|
|
56
|
-
}
|
|
57
|
-
return new SeamHttpAcsAccessGroupsUnmanaged(constructorOptions);
|
|
58
|
-
}
|
|
59
|
-
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
60
|
-
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
61
|
-
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
62
|
-
throw new SeamHttpInvalidOptionsError('Missing personalAccessToken or workspaceId');
|
|
63
|
-
}
|
|
64
|
-
return new SeamHttpAcsAccessGroupsUnmanaged(constructorOptions);
|
|
65
|
-
}
|
|
66
|
-
createPaginator(request) {
|
|
67
|
-
return new SeamPaginator(this, request);
|
|
68
|
-
}
|
|
69
|
-
async updateClientSessionToken(clientSessionToken) {
|
|
70
|
-
const { headers } = this.client.defaults;
|
|
71
|
-
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
72
|
-
clientSessionToken,
|
|
73
|
-
});
|
|
74
|
-
for (const key of Object.keys(authHeaders)) {
|
|
75
|
-
if (headers[key] == null) {
|
|
76
|
-
throw new Error('Cannot update a clientSessionToken on a client created without a clientSessionToken');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
80
|
-
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
81
|
-
await clientSessions.get();
|
|
82
|
-
}
|
|
83
|
-
get(body) {
|
|
84
|
-
return new SeamHttpRequest(this, {
|
|
85
|
-
pathname: '/acs/access_groups/unmanaged/get',
|
|
86
|
-
method: 'post',
|
|
87
|
-
body,
|
|
88
|
-
responseKey: 'acs_access_group',
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
list(body) {
|
|
92
|
-
return new SeamHttpRequest(this, {
|
|
93
|
-
pathname: '/acs/access_groups/unmanaged/list',
|
|
94
|
-
method: 'post',
|
|
95
|
-
body,
|
|
96
|
-
responseKey: 'acs_access_groups',
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
//# sourceMappingURL=acs-access-groups-unmanaged.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acs-access-groups-unmanaged.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/acs-access-groups-unmanaged.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,mCAAmC,EACnC,+BAA+B,GAChC,MAAM,0BAA0B,CAAA;AACjC,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;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAGlE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,MAAM,OAAO,gCAAgC;IAI3C,YAAY,kBAA4C,EAAE;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import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
|
|
2
|
-
import { type Client } from '../../../../lib/seam/connect/client.js';
|
|
3
|
-
import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../lib/seam/connect/options.js';
|
|
4
|
-
import { SeamHttpRequest } from '../../../../lib/seam/connect/seam-http-request.js';
|
|
5
|
-
import { SeamPaginator } from '../../../../lib/seam/connect/seam-paginator.js';
|
|
6
|
-
import type { SetNonNullable } from '../../../../lib/types.js';
|
|
7
|
-
export declare class SeamHttpAcsCredentialPools {
|
|
8
|
-
client: Client;
|
|
9
|
-
readonly defaults: Required<SeamHttpRequestOptions>;
|
|
10
|
-
constructor(apiKeyOrOptions?: string | SeamHttpOptions);
|
|
11
|
-
static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpAcsCredentialPools;
|
|
12
|
-
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAcsCredentialPools;
|
|
13
|
-
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAcsCredentialPools;
|
|
14
|
-
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpAcsCredentialPools>;
|
|
15
|
-
static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpAcsCredentialPools;
|
|
16
|
-
static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpAcsCredentialPools;
|
|
17
|
-
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(request: SeamHttpRequest<TResponse, TResponseKey>): SeamPaginator<TResponse, TResponseKey>;
|
|
18
|
-
updateClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken']): Promise<void>;
|
|
19
|
-
list(body?: AcsCredentialPoolsListParams): SeamHttpRequest<AcsCredentialPoolsListResponse, 'acs_credential_pools'>;
|
|
20
|
-
}
|
|
21
|
-
export type AcsCredentialPoolsListParams = RouteRequestBody<'/acs/credential_pools/list'>;
|
|
22
|
-
export type AcsCredentialPoolsListResponse = SetNonNullable<Required<RouteResponse<'/acs/credential_pools/list'>>>;
|
|
23
|
-
export type AcsCredentialPoolsListOptions = never;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Automatically generated by generate-routes.ts.
|
|
3
|
-
* Do not edit this file or add other files to this directory.
|
|
4
|
-
*/
|
|
5
|
-
import { getAuthHeadersForClientSessionToken, warnOnInsecureuserIdentifierKey, } from '../../../../lib/seam/connect/auth.js';
|
|
6
|
-
import { createClient } from '../../../../lib/seam/connect/client.js';
|
|
7
|
-
import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, SeamHttpInvalidOptionsError, } from '../../../../lib/seam/connect/options.js';
|
|
8
|
-
import { limitToSeamHttpRequestOptions, parseOptions, } from '../../../../lib/seam/connect/parse-options.js';
|
|
9
|
-
import { SeamHttpRequest } from '../../../../lib/seam/connect/seam-http-request.js';
|
|
10
|
-
import { SeamPaginator } from '../../../../lib/seam/connect/seam-paginator.js';
|
|
11
|
-
import { SeamHttpClientSessions } from './client-sessions.js';
|
|
12
|
-
export class SeamHttpAcsCredentialPools {
|
|
13
|
-
constructor(apiKeyOrOptions = {}) {
|
|
14
|
-
const options = parseOptions(apiKeyOrOptions);
|
|
15
|
-
this.client = 'client' in options ? options.client : createClient(options);
|
|
16
|
-
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
17
|
-
}
|
|
18
|
-
static fromClient(client, options = {}) {
|
|
19
|
-
const constructorOptions = { ...options, client };
|
|
20
|
-
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
21
|
-
throw new SeamHttpInvalidOptionsError('Missing client');
|
|
22
|
-
}
|
|
23
|
-
return new SeamHttpAcsCredentialPools(constructorOptions);
|
|
24
|
-
}
|
|
25
|
-
static fromApiKey(apiKey, options = {}) {
|
|
26
|
-
const constructorOptions = { ...options, apiKey };
|
|
27
|
-
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
28
|
-
throw new SeamHttpInvalidOptionsError('Missing apiKey');
|
|
29
|
-
}
|
|
30
|
-
return new SeamHttpAcsCredentialPools(constructorOptions);
|
|
31
|
-
}
|
|
32
|
-
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
33
|
-
const constructorOptions = { ...options, clientSessionToken };
|
|
34
|
-
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
35
|
-
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken');
|
|
36
|
-
}
|
|
37
|
-
return new SeamHttpAcsCredentialPools(constructorOptions);
|
|
38
|
-
}
|
|
39
|
-
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
40
|
-
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
41
|
-
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
42
|
-
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
43
|
-
throw new SeamHttpInvalidOptionsError('The client option cannot be used with SeamHttp.fromPublishableKey');
|
|
44
|
-
}
|
|
45
|
-
const client = createClient(clientOptions);
|
|
46
|
-
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
47
|
-
const { token } = await clientSessions.getOrCreate({
|
|
48
|
-
user_identifier_key: userIdentifierKey,
|
|
49
|
-
});
|
|
50
|
-
return SeamHttpAcsCredentialPools.fromClientSessionToken(token, options);
|
|
51
|
-
}
|
|
52
|
-
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
53
|
-
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
54
|
-
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
55
|
-
throw new SeamHttpInvalidOptionsError('Missing consoleSessionToken or workspaceId');
|
|
56
|
-
}
|
|
57
|
-
return new SeamHttpAcsCredentialPools(constructorOptions);
|
|
58
|
-
}
|
|
59
|
-
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
60
|
-
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
61
|
-
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
62
|
-
throw new SeamHttpInvalidOptionsError('Missing personalAccessToken or workspaceId');
|
|
63
|
-
}
|
|
64
|
-
return new SeamHttpAcsCredentialPools(constructorOptions);
|
|
65
|
-
}
|
|
66
|
-
createPaginator(request) {
|
|
67
|
-
return new SeamPaginator(this, request);
|
|
68
|
-
}
|
|
69
|
-
async updateClientSessionToken(clientSessionToken) {
|
|
70
|
-
const { headers } = this.client.defaults;
|
|
71
|
-
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
72
|
-
clientSessionToken,
|
|
73
|
-
});
|
|
74
|
-
for (const key of Object.keys(authHeaders)) {
|
|
75
|
-
if (headers[key] == null) {
|
|
76
|
-
throw new Error('Cannot update a clientSessionToken on a client created without a clientSessionToken');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
80
|
-
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
81
|
-
await clientSessions.get();
|
|
82
|
-
}
|
|
83
|
-
list(body) {
|
|
84
|
-
return new SeamHttpRequest(this, {
|
|
85
|
-
pathname: '/acs/credential_pools/list',
|
|
86
|
-
method: 'post',
|
|
87
|
-
body,
|
|
88
|
-
responseKey: 'acs_credential_pools',
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=acs-credential-pools.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acs-credential-pools.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/acs-credential-pools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,mCAAmC,EACnC,+BAA+B,GAChC,MAAM,0BAA0B,CAAA;AACjC,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;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAGlE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,MAAM,OAAO,0BAA0B;IAIrC,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,O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M,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAA;QACxC,MAAM,WAAW,GAAG,mCAAmC,CAAC;YACtD,kBAAkB;SACnB,CAAC,CAAA;QACF,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;YAC3C,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;gBACzB,MAAM,IAAI,KAAK,CACb,qFAAqF,CACtF,CAAA;YACH,CAAC;QACH,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,WAAW,EAAE,CAAA;QAC7D,MAAM,cAAc,GAAG,sBAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACrE,MAAM,cAAc,CAAC,GAAG,EAAE,CAAA;IAC5B,CAAC;IAED,IAAI,CACF,IAAmC;QAEnC,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE;YAC/B,QAAQ,EAAE,4BAA4B;YACtC,MAAM,EAAE,MAAM;YACd,IAAI;YACJ,WAAW,EAAE,sBAAsB;SACpC,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
|
|
2
|
-
import { type Client } from '../../../../lib/seam/connect/client.js';
|
|
3
|
-
import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../lib/seam/connect/options.js';
|
|
4
|
-
import { SeamHttpRequest } from '../../../../lib/seam/connect/seam-http-request.js';
|
|
5
|
-
import { SeamPaginator } from '../../../../lib/seam/connect/seam-paginator.js';
|
|
6
|
-
import type { SetNonNullable } from '../../../../lib/types.js';
|
|
7
|
-
export declare class SeamHttpAcsCredentialProvisioningAutomations {
|
|
8
|
-
client: Client;
|
|
9
|
-
readonly defaults: Required<SeamHttpRequestOptions>;
|
|
10
|
-
constructor(apiKeyOrOptions?: string | SeamHttpOptions);
|
|
11
|
-
static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpAcsCredentialProvisioningAutomations;
|
|
12
|
-
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAcsCredentialProvisioningAutomations;
|
|
13
|
-
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAcsCredentialProvisioningAutomations;
|
|
14
|
-
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpAcsCredentialProvisioningAutomations>;
|
|
15
|
-
static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpAcsCredentialProvisioningAutomations;
|
|
16
|
-
static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpAcsCredentialProvisioningAutomations;
|
|
17
|
-
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(request: SeamHttpRequest<TResponse, TResponseKey>): SeamPaginator<TResponse, TResponseKey>;
|
|
18
|
-
updateClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken']): Promise<void>;
|
|
19
|
-
launch(body?: AcsCredentialProvisioningAutomationsLaunchBody): SeamHttpRequest<AcsCredentialProvisioningAutomationsLaunchResponse, 'acs_credential_provisioning_automation'>;
|
|
20
|
-
}
|
|
21
|
-
export type AcsCredentialProvisioningAutomationsLaunchBody = RouteRequestBody<'/acs/credential_provisioning_automations/launch'>;
|
|
22
|
-
export type AcsCredentialProvisioningAutomationsLaunchResponse = SetNonNullable<Required<RouteResponse<'/acs/credential_provisioning_automations/launch'>>>;
|
|
23
|
-
export type AcsCredentialProvisioningAutomationsLaunchOptions = never;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Automatically generated by generate-routes.ts.
|
|
3
|
-
* Do not edit this file or add other files to this directory.
|
|
4
|
-
*/
|
|
5
|
-
import { getAuthHeadersForClientSessionToken, warnOnInsecureuserIdentifierKey, } from '../../../../lib/seam/connect/auth.js';
|
|
6
|
-
import { createClient } from '../../../../lib/seam/connect/client.js';
|
|
7
|
-
import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, SeamHttpInvalidOptionsError, } from '../../../../lib/seam/connect/options.js';
|
|
8
|
-
import { limitToSeamHttpRequestOptions, parseOptions, } from '../../../../lib/seam/connect/parse-options.js';
|
|
9
|
-
import { SeamHttpRequest } from '../../../../lib/seam/connect/seam-http-request.js';
|
|
10
|
-
import { SeamPaginator } from '../../../../lib/seam/connect/seam-paginator.js';
|
|
11
|
-
import { SeamHttpClientSessions } from './client-sessions.js';
|
|
12
|
-
export class SeamHttpAcsCredentialProvisioningAutomations {
|
|
13
|
-
constructor(apiKeyOrOptions = {}) {
|
|
14
|
-
const options = parseOptions(apiKeyOrOptions);
|
|
15
|
-
this.client = 'client' in options ? options.client : createClient(options);
|
|
16
|
-
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
17
|
-
}
|
|
18
|
-
static fromClient(client, options = {}) {
|
|
19
|
-
const constructorOptions = { ...options, client };
|
|
20
|
-
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
21
|
-
throw new SeamHttpInvalidOptionsError('Missing client');
|
|
22
|
-
}
|
|
23
|
-
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions);
|
|
24
|
-
}
|
|
25
|
-
static fromApiKey(apiKey, options = {}) {
|
|
26
|
-
const constructorOptions = { ...options, apiKey };
|
|
27
|
-
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
28
|
-
throw new SeamHttpInvalidOptionsError('Missing apiKey');
|
|
29
|
-
}
|
|
30
|
-
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions);
|
|
31
|
-
}
|
|
32
|
-
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
33
|
-
const constructorOptions = { ...options, clientSessionToken };
|
|
34
|
-
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
35
|
-
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken');
|
|
36
|
-
}
|
|
37
|
-
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions);
|
|
38
|
-
}
|
|
39
|
-
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
40
|
-
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
41
|
-
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
42
|
-
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
43
|
-
throw new SeamHttpInvalidOptionsError('The client option cannot be used with SeamHttp.fromPublishableKey');
|
|
44
|
-
}
|
|
45
|
-
const client = createClient(clientOptions);
|
|
46
|
-
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
47
|
-
const { token } = await clientSessions.getOrCreate({
|
|
48
|
-
user_identifier_key: userIdentifierKey,
|
|
49
|
-
});
|
|
50
|
-
return SeamHttpAcsCredentialProvisioningAutomations.fromClientSessionToken(token, options);
|
|
51
|
-
}
|
|
52
|
-
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
53
|
-
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
54
|
-
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
55
|
-
throw new SeamHttpInvalidOptionsError('Missing consoleSessionToken or workspaceId');
|
|
56
|
-
}
|
|
57
|
-
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions);
|
|
58
|
-
}
|
|
59
|
-
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
60
|
-
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
61
|
-
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
62
|
-
throw new SeamHttpInvalidOptionsError('Missing personalAccessToken or workspaceId');
|
|
63
|
-
}
|
|
64
|
-
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions);
|
|
65
|
-
}
|
|
66
|
-
createPaginator(request) {
|
|
67
|
-
return new SeamPaginator(this, request);
|
|
68
|
-
}
|
|
69
|
-
async updateClientSessionToken(clientSessionToken) {
|
|
70
|
-
const { headers } = this.client.defaults;
|
|
71
|
-
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
72
|
-
clientSessionToken,
|
|
73
|
-
});
|
|
74
|
-
for (const key of Object.keys(authHeaders)) {
|
|
75
|
-
if (headers[key] == null) {
|
|
76
|
-
throw new Error('Cannot update a clientSessionToken on a client created without a clientSessionToken');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
80
|
-
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
81
|
-
await clientSessions.get();
|
|
82
|
-
}
|
|
83
|
-
launch(body) {
|
|
84
|
-
return new SeamHttpRequest(this, {
|
|
85
|
-
pathname: '/acs/credential_provisioning_automations/launch',
|
|
86
|
-
method: 'post',
|
|
87
|
-
body,
|
|
88
|
-
responseKey: 'acs_credential_provisioning_automation',
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=acs-credential-provisioning-automations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acs-credential-provisioning-automations.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/acs-credential-provisioning-automations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,mCAAmC,EACnC,+BAA+B,GAChC,MAAM,0BAA0B,CAAA;AACjC,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;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAGlE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,MAAM,OAAO,4CAA4C;IAIvD,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,kB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CAAC,EAAE,CAAC;YAC3C,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;gBACzB,MAAM,IAAI,KAAK,CACb,qFAAqF,CACtF,CAAA;YACH,CAAC;QACH,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,WAAW,EAAE,CAAA;QAC7D,MAAM,cAAc,GAAG,sBAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACrE,MAAM,cAAc,CAAC,GAAG,EAAE,CAAA;IAC5B,CAAC;IAED,MAAM,CACJ,IAAqD;QAKrD,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE;YAC/B,QAAQ,EAAE,iDAAiD;YAC3D,MAAM,EAAE,MAAM;YACd,IAAI;YACJ,WAAW,EAAE,wCAAwC;SACtD,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
|
|
2
|
-
import { type Client } from '../../../../lib/seam/connect/client.js';
|
|
3
|
-
import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../lib/seam/connect/options.js';
|
|
4
|
-
import { SeamHttpRequest } from '../../../../lib/seam/connect/seam-http-request.js';
|
|
5
|
-
import { SeamPaginator } from '../../../../lib/seam/connect/seam-paginator.js';
|
|
6
|
-
import type { SetNonNullable } from '../../../../lib/types.js';
|
|
7
|
-
export declare class SeamHttpAcsCredentialsUnmanaged {
|
|
8
|
-
client: Client;
|
|
9
|
-
readonly defaults: Required<SeamHttpRequestOptions>;
|
|
10
|
-
constructor(apiKeyOrOptions?: string | SeamHttpOptions);
|
|
11
|
-
static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpAcsCredentialsUnmanaged;
|
|
12
|
-
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAcsCredentialsUnmanaged;
|
|
13
|
-
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAcsCredentialsUnmanaged;
|
|
14
|
-
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpAcsCredentialsUnmanaged>;
|
|
15
|
-
static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpAcsCredentialsUnmanaged;
|
|
16
|
-
static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpAcsCredentialsUnmanaged;
|
|
17
|
-
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(request: SeamHttpRequest<TResponse, TResponseKey>): SeamPaginator<TResponse, TResponseKey>;
|
|
18
|
-
updateClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken']): Promise<void>;
|
|
19
|
-
get(body?: AcsCredentialsUnmanagedGetParams): SeamHttpRequest<AcsCredentialsUnmanagedGetResponse, 'acs_credential'>;
|
|
20
|
-
list(body?: AcsCredentialsUnmanagedListParams): SeamHttpRequest<AcsCredentialsUnmanagedListResponse, 'acs_credentials'>;
|
|
21
|
-
}
|
|
22
|
-
export type AcsCredentialsUnmanagedGetParams = RouteRequestBody<'/acs/credentials/unmanaged/get'>;
|
|
23
|
-
export type AcsCredentialsUnmanagedGetResponse = SetNonNullable<Required<RouteResponse<'/acs/credentials/unmanaged/get'>>>;
|
|
24
|
-
export type AcsCredentialsUnmanagedGetOptions = never;
|
|
25
|
-
export type AcsCredentialsUnmanagedListParams = RouteRequestBody<'/acs/credentials/unmanaged/list'>;
|
|
26
|
-
export type AcsCredentialsUnmanagedListResponse = SetNonNullable<Required<RouteResponse<'/acs/credentials/unmanaged/list'>>>;
|
|
27
|
-
export type AcsCredentialsUnmanagedListOptions = never;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Automatically generated by generate-routes.ts.
|
|
3
|
-
* Do not edit this file or add other files to this directory.
|
|
4
|
-
*/
|
|
5
|
-
import { getAuthHeadersForClientSessionToken, warnOnInsecureuserIdentifierKey, } from '../../../../lib/seam/connect/auth.js';
|
|
6
|
-
import { createClient } from '../../../../lib/seam/connect/client.js';
|
|
7
|
-
import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, SeamHttpInvalidOptionsError, } from '../../../../lib/seam/connect/options.js';
|
|
8
|
-
import { limitToSeamHttpRequestOptions, parseOptions, } from '../../../../lib/seam/connect/parse-options.js';
|
|
9
|
-
import { SeamHttpRequest } from '../../../../lib/seam/connect/seam-http-request.js';
|
|
10
|
-
import { SeamPaginator } from '../../../../lib/seam/connect/seam-paginator.js';
|
|
11
|
-
import { SeamHttpClientSessions } from './client-sessions.js';
|
|
12
|
-
export class SeamHttpAcsCredentialsUnmanaged {
|
|
13
|
-
constructor(apiKeyOrOptions = {}) {
|
|
14
|
-
const options = parseOptions(apiKeyOrOptions);
|
|
15
|
-
this.client = 'client' in options ? options.client : createClient(options);
|
|
16
|
-
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
17
|
-
}
|
|
18
|
-
static fromClient(client, options = {}) {
|
|
19
|
-
const constructorOptions = { ...options, client };
|
|
20
|
-
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
21
|
-
throw new SeamHttpInvalidOptionsError('Missing client');
|
|
22
|
-
}
|
|
23
|
-
return new SeamHttpAcsCredentialsUnmanaged(constructorOptions);
|
|
24
|
-
}
|
|
25
|
-
static fromApiKey(apiKey, options = {}) {
|
|
26
|
-
const constructorOptions = { ...options, apiKey };
|
|
27
|
-
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
28
|
-
throw new SeamHttpInvalidOptionsError('Missing apiKey');
|
|
29
|
-
}
|
|
30
|
-
return new SeamHttpAcsCredentialsUnmanaged(constructorOptions);
|
|
31
|
-
}
|
|
32
|
-
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
33
|
-
const constructorOptions = { ...options, clientSessionToken };
|
|
34
|
-
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
35
|
-
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken');
|
|
36
|
-
}
|
|
37
|
-
return new SeamHttpAcsCredentialsUnmanaged(constructorOptions);
|
|
38
|
-
}
|
|
39
|
-
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
40
|
-
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
41
|
-
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
42
|
-
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
43
|
-
throw new SeamHttpInvalidOptionsError('The client option cannot be used with SeamHttp.fromPublishableKey');
|
|
44
|
-
}
|
|
45
|
-
const client = createClient(clientOptions);
|
|
46
|
-
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
47
|
-
const { token } = await clientSessions.getOrCreate({
|
|
48
|
-
user_identifier_key: userIdentifierKey,
|
|
49
|
-
});
|
|
50
|
-
return SeamHttpAcsCredentialsUnmanaged.fromClientSessionToken(token, options);
|
|
51
|
-
}
|
|
52
|
-
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
53
|
-
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
54
|
-
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
55
|
-
throw new SeamHttpInvalidOptionsError('Missing consoleSessionToken or workspaceId');
|
|
56
|
-
}
|
|
57
|
-
return new SeamHttpAcsCredentialsUnmanaged(constructorOptions);
|
|
58
|
-
}
|
|
59
|
-
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
60
|
-
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
61
|
-
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
62
|
-
throw new SeamHttpInvalidOptionsError('Missing personalAccessToken or workspaceId');
|
|
63
|
-
}
|
|
64
|
-
return new SeamHttpAcsCredentialsUnmanaged(constructorOptions);
|
|
65
|
-
}
|
|
66
|
-
createPaginator(request) {
|
|
67
|
-
return new SeamPaginator(this, request);
|
|
68
|
-
}
|
|
69
|
-
async updateClientSessionToken(clientSessionToken) {
|
|
70
|
-
const { headers } = this.client.defaults;
|
|
71
|
-
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
72
|
-
clientSessionToken,
|
|
73
|
-
});
|
|
74
|
-
for (const key of Object.keys(authHeaders)) {
|
|
75
|
-
if (headers[key] == null) {
|
|
76
|
-
throw new Error('Cannot update a clientSessionToken on a client created without a clientSessionToken');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
80
|
-
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
81
|
-
await clientSessions.get();
|
|
82
|
-
}
|
|
83
|
-
get(body) {
|
|
84
|
-
return new SeamHttpRequest(this, {
|
|
85
|
-
pathname: '/acs/credentials/unmanaged/get',
|
|
86
|
-
method: 'post',
|
|
87
|
-
body,
|
|
88
|
-
responseKey: 'acs_credential',
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
list(body) {
|
|
92
|
-
return new SeamHttpRequest(this, {
|
|
93
|
-
pathname: '/acs/credentials/unmanaged/list',
|
|
94
|
-
method: 'post',
|
|
95
|
-
body,
|
|
96
|
-
responseKey: 'acs_credentials',
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
//# sourceMappingURL=acs-credentials-unmanaged.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acs-credentials-unmanaged.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/acs-credentials-unmanaged.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,mCAAmC,EACnC,+BAA+B,GAChC,MAAM,0BAA0B,CAAA;AACjC,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;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAGlE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,MAAM,OAAO,+BAA+B;IAI1C,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,C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