@workos-inc/node 10.13.0 → 11.0.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 +22 -0
- package/lib/{factory-DQwwZIi5.mjs → factory-BbGPjwhL.mjs} +792 -187
- package/lib/factory-BbGPjwhL.mjs.map +1 -0
- package/lib/{factory-C4y25QQJ.d.mts → factory-C86kGSc7.d.cts} +1541 -244
- package/lib/{factory-BfdUyn2X.cjs → factory-DJd6WXWm.cjs} +797 -186
- package/lib/factory-DJd6WXWm.cjs.map +1 -0
- package/lib/{factory-C4y25QQJ.d.cts → factory-G1JU2hJz.d.mts} +1541 -245
- package/lib/index.cjs +158 -4
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +210 -132
- package/lib/index.d.mts +210 -132
- package/lib/index.mjs +137 -5
- package/lib/index.mjs.map +1 -1
- package/lib/index.worker.cjs +2 -1
- package/lib/index.worker.d.cts +2 -2
- package/lib/index.worker.d.mts +2 -2
- package/lib/index.worker.mjs +2 -2
- package/lib/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/lib/webapi-C2FQ2NNL.mjs +2445 -0
- package/lib/webapi-C2FQ2NNL.mjs.map +1 -0
- package/lib/webapi-MD5xmNba.cjs +2503 -0
- package/lib/webapi-MD5xmNba.cjs.map +1 -0
- package/package.json +4 -4
- package/lib/factory-BfdUyn2X.cjs.map +0 -1
- package/lib/factory-DQwwZIi5.mjs.map +0 -1
- package/lib/webapi-BlhUk1KL.mjs +0 -2905
- package/lib/webapi-BlhUk1KL.mjs.map +0 -1
- package/lib/webapi-D3QZrB15.cjs +0 -2952
- package/lib/webapi-D3QZrB15.cjs.map +0 -1
|
@@ -122,9 +122,32 @@ var HttpClient = class HttpClient {
|
|
|
122
122
|
this.MAX_RETRY_ATTEMPTS = options?.maxRetries ?? 3;
|
|
123
123
|
}
|
|
124
124
|
static getResourceURL(baseURL, path, params) {
|
|
125
|
+
HttpClient.assertNoDotSegments(path);
|
|
125
126
|
const queryString = HttpClient.getQueryString(params);
|
|
126
127
|
return new URL([path, queryString].filter(Boolean).join("?"), baseURL).toString();
|
|
127
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Reject request paths that contain a single-dot or double-dot segment.
|
|
131
|
+
*
|
|
132
|
+
* SDK path templates never contain such segments themselves, but a
|
|
133
|
+
* caller-supplied identifier interpolated with bare `encodeURIComponent`
|
|
134
|
+
* (the form the generated modules use) passes `.` and `..` through
|
|
135
|
+
* unchanged, and the WHATWG `URL` parser then collapses them, retargeting
|
|
136
|
+
* the request to a different endpoint (for example
|
|
137
|
+
* `/organizations/../api_keys` resolves to `/api_keys`). The parser also
|
|
138
|
+
* treats the percent-encoded forms (`%2e`, case-insensitive) as dots, so
|
|
139
|
+
* those are matched as well. Encoded values never trip this check because
|
|
140
|
+
* `encodeURIComponent` turns `%` into `%25` and `/` into `%2F`, keeping
|
|
141
|
+
* each identifier inside its own segment. Fail closed before any request
|
|
142
|
+
* is built.
|
|
143
|
+
*/
|
|
144
|
+
static assertNoDotSegments(path) {
|
|
145
|
+
const pathOnly = path.split(/[?#]/, 1)[0];
|
|
146
|
+
for (const segment of pathOnly.split("/")) {
|
|
147
|
+
const normalized = segment.replace(/%2e/gi, ".");
|
|
148
|
+
if (normalized === "." || normalized === "..") throw new TypeError(`Invalid request path "${path}": a path segment must not be "." or "..".`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
128
151
|
static getQueryString(queryObj) {
|
|
129
152
|
if (!queryObj) return void 0;
|
|
130
153
|
const sanitizedQueryObj = {};
|
|
@@ -273,10 +296,19 @@ var FetchHttpClient = class FetchHttpClient extends HttpClient {
|
|
|
273
296
|
const timeout = this.options?.timeout ?? DEFAULT_FETCH_TIMEOUT;
|
|
274
297
|
const abortController = new AbortController();
|
|
275
298
|
const timeoutId = setTimeout(() => {
|
|
276
|
-
abortController
|
|
299
|
+
abortController.abort();
|
|
277
300
|
}, timeout);
|
|
301
|
+
const timeoutError = (responseHeaders) => new HttpClientError({
|
|
302
|
+
message: `Request timeout after ${timeout}ms`,
|
|
303
|
+
response: {
|
|
304
|
+
status: 408,
|
|
305
|
+
headers: responseHeaders ?? new Headers(),
|
|
306
|
+
data: { error: "Request timeout" }
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
let res;
|
|
278
310
|
try {
|
|
279
|
-
|
|
311
|
+
res = await this._fetchFn(url, {
|
|
280
312
|
method,
|
|
281
313
|
headers: {
|
|
282
314
|
Accept: "application/json, text/plain, */*",
|
|
@@ -286,12 +318,12 @@ var FetchHttpClient = class FetchHttpClient extends HttpClient {
|
|
|
286
318
|
"User-Agent": (userAgent || "workos-node").toString()
|
|
287
319
|
},
|
|
288
320
|
body: requestBody,
|
|
289
|
-
signal: abortController
|
|
321
|
+
signal: abortController.signal
|
|
290
322
|
});
|
|
291
|
-
if (timeoutId) clearTimeout(timeoutId);
|
|
292
323
|
if (!res.ok) {
|
|
293
324
|
const requestID = res.headers.get("X-Request-ID") ?? "";
|
|
294
325
|
const rawBody = await res.text();
|
|
326
|
+
clearTimeout(timeoutId);
|
|
295
327
|
let responseJson;
|
|
296
328
|
try {
|
|
297
329
|
responseJson = JSON.parse(rawBody);
|
|
@@ -314,17 +346,21 @@ var FetchHttpClient = class FetchHttpClient extends HttpClient {
|
|
|
314
346
|
}
|
|
315
347
|
});
|
|
316
348
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
data: { error: "Request timeout" }
|
|
349
|
+
const response = res;
|
|
350
|
+
const rawBody = (async () => {
|
|
351
|
+
try {
|
|
352
|
+
return await response.text();
|
|
353
|
+
} catch (error) {
|
|
354
|
+
throw abortController.signal.aborted ? timeoutError(response.headers) : error;
|
|
355
|
+
} finally {
|
|
356
|
+
clearTimeout(timeoutId);
|
|
326
357
|
}
|
|
327
|
-
});
|
|
358
|
+
})();
|
|
359
|
+
rawBody.catch(() => void 0);
|
|
360
|
+
return new FetchHttpClientResponse(res, rawBody);
|
|
361
|
+
} catch (error) {
|
|
362
|
+
clearTimeout(timeoutId);
|
|
363
|
+
if (abortController.signal.aborted) throw timeoutError(res?.headers);
|
|
328
364
|
throw error;
|
|
329
365
|
}
|
|
330
366
|
}
|
|
@@ -384,16 +420,18 @@ var FetchHttpClient = class FetchHttpClient extends HttpClient {
|
|
|
384
420
|
};
|
|
385
421
|
var FetchHttpClientResponse = class FetchHttpClientResponse extends HttpClientResponse {
|
|
386
422
|
_res;
|
|
387
|
-
|
|
423
|
+
_rawBody;
|
|
424
|
+
constructor(res, rawBody) {
|
|
388
425
|
super(res.status, FetchHttpClientResponse._transformHeadersToObject(res.headers));
|
|
389
426
|
this._res = res;
|
|
427
|
+
this._rawBody = rawBody;
|
|
390
428
|
}
|
|
391
429
|
getRawResponse() {
|
|
392
430
|
return this._res;
|
|
393
431
|
}
|
|
394
432
|
async toJSON() {
|
|
433
|
+
const rawBody = await this._rawBody;
|
|
395
434
|
if (!this._res.headers.get("content-type")?.includes("application/json")) return null;
|
|
396
|
-
const rawBody = await this._res.text();
|
|
397
435
|
try {
|
|
398
436
|
return JSON.parse(rawBody);
|
|
399
437
|
} catch (error) {
|
|
@@ -2203,7 +2241,7 @@ let _josePromise;
|
|
|
2203
2241
|
* @returns Promise that resolves to the jose module
|
|
2204
2242
|
*/
|
|
2205
2243
|
function getJose() {
|
|
2206
|
-
return _josePromise ??= Promise.resolve().then(() => require("./webapi-
|
|
2244
|
+
return _josePromise ??= Promise.resolve().then(() => require("./webapi-MD5xmNba.cjs"));
|
|
2207
2245
|
}
|
|
2208
2246
|
//#endregion
|
|
2209
2247
|
//#region src/agents/serializers/agent-blueprint.serializer.ts
|
|
@@ -2811,7 +2849,7 @@ var ApiKeys = class {
|
|
|
2811
2849
|
* @throws {NotFoundException} 404
|
|
2812
2850
|
*/
|
|
2813
2851
|
async deleteApiKey(id) {
|
|
2814
|
-
await this.workos.delete(`/api_keys/${id}`);
|
|
2852
|
+
await this.workos.delete(`/api_keys/${encodeURIComponent(id)}`);
|
|
2815
2853
|
}
|
|
2816
2854
|
/**
|
|
2817
2855
|
* List API keys for an organization
|
|
@@ -2828,7 +2866,7 @@ var ApiKeys = class {
|
|
|
2828
2866
|
*/
|
|
2829
2867
|
async listOrganizationApiKeys(options) {
|
|
2830
2868
|
const { organizationId, ...paginationOptions } = options;
|
|
2831
|
-
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/organizations/${organizationId}/api_keys`, deserializeApiKey, paginationOptions), (params) => fetchAndDeserialize(this.workos, `/organizations/${organizationId}/api_keys`, deserializeApiKey, params), paginationOptions);
|
|
2869
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/organizations/${encodeURIComponent(organizationId)}/api_keys`, deserializeApiKey, paginationOptions), (params) => fetchAndDeserialize(this.workos, `/organizations/${encodeURIComponent(organizationId)}/api_keys`, deserializeApiKey, params), paginationOptions);
|
|
2832
2870
|
}
|
|
2833
2871
|
/**
|
|
2834
2872
|
* Create an API key for an organization
|
|
@@ -2846,7 +2884,7 @@ var ApiKeys = class {
|
|
|
2846
2884
|
*/
|
|
2847
2885
|
async createOrganizationApiKey(options, requestOptions = {}) {
|
|
2848
2886
|
const { organizationId } = options;
|
|
2849
|
-
const { data } = await this.workos.post(`/organizations/${organizationId}/api_keys`, serializeCreateOrganizationApiKeyOptions(options), requestOptions);
|
|
2887
|
+
const { data } = await this.workos.post(`/organizations/${encodeURIComponent(organizationId)}/api_keys`, serializeCreateOrganizationApiKeyOptions(options), requestOptions);
|
|
2850
2888
|
return deserializeCreatedApiKey(data);
|
|
2851
2889
|
}
|
|
2852
2890
|
};
|
|
@@ -3203,6 +3241,43 @@ var Connect = class {
|
|
|
3203
3241
|
}
|
|
3204
3242
|
};
|
|
3205
3243
|
//#endregion
|
|
3244
|
+
//#region src/common/utils/encode-path-parameter.ts
|
|
3245
|
+
/**
|
|
3246
|
+
* Encode a caller-supplied identifier for safe interpolation into a single URL
|
|
3247
|
+
* path segment.
|
|
3248
|
+
*
|
|
3249
|
+
* SDK path templates interpolate caller-supplied identifiers (user IDs,
|
|
3250
|
+
* invitation tokens, MFA factor IDs, organization IDs, external IDs, role and
|
|
3251
|
+
* permission slugs, ...) into the request path. Without encoding, a value such
|
|
3252
|
+
* as `../../user_management/users/user_01ABC` would be resolved by the WHATWG
|
|
3253
|
+
* `URL` parser (see `HttpClient.getResourceURL`) into a different API path,
|
|
3254
|
+
* letting an attacker who influences one identifier retarget the request to an
|
|
3255
|
+
* arbitrary same-verb endpoint. `encodeURIComponent` neutralizes this by
|
|
3256
|
+
* percent-encoding the path/query/fragment metacharacters (`/`, `?`, `#`, ...)
|
|
3257
|
+
* that enable the injection, keeping one parameter mapped to exactly one path
|
|
3258
|
+
* segment.
|
|
3259
|
+
*
|
|
3260
|
+
* `encodeURIComponent` alone is not sufficient for the two dot-only segments
|
|
3261
|
+
* `.` and `..`: it leaves them unchanged, and the WHATWG `URL` parser then
|
|
3262
|
+
* removes them as relative path segments (even when a value like `..` is a
|
|
3263
|
+
* single segment, a template such as `/feature-flags/${slug}/enable` supplies
|
|
3264
|
+
* the trailing segment, so `..` still climbs and retargets the request).
|
|
3265
|
+
* Percent-encoding the dots does not help because the parser also treats the
|
|
3266
|
+
* `%2e` forms as dot segments. A `.` or `..` is never a valid WorkOS
|
|
3267
|
+
* identifier, so we fail closed and throw rather than emit an ambiguous path.
|
|
3268
|
+
*
|
|
3269
|
+
* The one deviation from `encodeURIComponent` is that a literal `:` is kept
|
|
3270
|
+
* unescaped. Colons are valid path-segment characters (RFC 3986 `pchar`) and
|
|
3271
|
+
* are used by WorkOS RBAC slugs (e.g. `users:read`); an interpolated value is
|
|
3272
|
+
* always preceded by a `/`-delimited segment, so a `:` can never be read as a
|
|
3273
|
+
* URL scheme. Preserving it keeps the wire format identical for existing slugs.
|
|
3274
|
+
*/
|
|
3275
|
+
function encodePathParameter(value) {
|
|
3276
|
+
const encoded = encodeURIComponent(value).replace(/%3A/gi, ":");
|
|
3277
|
+
if (encoded === "." || encoded === "..") throw new TypeError("Invalid path parameter: a path parameter must not be \".\" or \"..\".");
|
|
3278
|
+
return encoded;
|
|
3279
|
+
}
|
|
3280
|
+
//#endregion
|
|
3206
3281
|
//#region src/directory-sync/directory-sync.ts
|
|
3207
3282
|
var DirectorySync = class {
|
|
3208
3283
|
workos;
|
|
@@ -3235,7 +3310,7 @@ var DirectorySync = class {
|
|
|
3235
3310
|
* @throws {NotFoundException} 404
|
|
3236
3311
|
*/
|
|
3237
3312
|
async getDirectory(id) {
|
|
3238
|
-
const { data } = await this.workos.get(`/directories/${id}`);
|
|
3313
|
+
const { data } = await this.workos.get(`/directories/${encodePathParameter(id)}`);
|
|
3239
3314
|
return deserializeDirectory(data);
|
|
3240
3315
|
}
|
|
3241
3316
|
/**
|
|
@@ -3251,7 +3326,7 @@ var DirectorySync = class {
|
|
|
3251
3326
|
* @throws 403 response from the API.
|
|
3252
3327
|
*/
|
|
3253
3328
|
async deleteDirectory(id) {
|
|
3254
|
-
await this.workos.delete(`/directories/${id}`);
|
|
3329
|
+
await this.workos.delete(`/directories/${encodePathParameter(id)}`);
|
|
3255
3330
|
}
|
|
3256
3331
|
/**
|
|
3257
3332
|
* List Directory Groups
|
|
@@ -3293,7 +3368,7 @@ var DirectorySync = class {
|
|
|
3293
3368
|
* @throws {NotFoundException} 404
|
|
3294
3369
|
*/
|
|
3295
3370
|
async getUser(user) {
|
|
3296
|
-
const { data } = await this.workos.get(`/directory_users/${user}`);
|
|
3371
|
+
const { data } = await this.workos.get(`/directory_users/${encodePathParameter(user)}`);
|
|
3297
3372
|
return deserializeDirectoryUserWithGroups(data);
|
|
3298
3373
|
}
|
|
3299
3374
|
/**
|
|
@@ -3309,7 +3384,7 @@ var DirectorySync = class {
|
|
|
3309
3384
|
* @throws {NotFoundException} 404
|
|
3310
3385
|
*/
|
|
3311
3386
|
async getGroup(group) {
|
|
3312
|
-
const { data } = await this.workos.get(`/directory_groups/${group}`);
|
|
3387
|
+
const { data } = await this.workos.get(`/directory_groups/${encodePathParameter(group)}`);
|
|
3313
3388
|
return deserializeDirectoryGroup(data);
|
|
3314
3389
|
}
|
|
3315
3390
|
};
|
|
@@ -3390,7 +3465,7 @@ var Organizations = class {
|
|
|
3390
3465
|
* @throws 403 response from the API.
|
|
3391
3466
|
*/
|
|
3392
3467
|
async deleteOrganization(id) {
|
|
3393
|
-
await this.workos.delete(`/organizations/${id}`);
|
|
3468
|
+
await this.workos.delete(`/organizations/${encodePathParameter(id)}`);
|
|
3394
3469
|
}
|
|
3395
3470
|
/**
|
|
3396
3471
|
* Get an Organization
|
|
@@ -3405,7 +3480,7 @@ var Organizations = class {
|
|
|
3405
3480
|
* @throws {NotFoundException} 404
|
|
3406
3481
|
*/
|
|
3407
3482
|
async getOrganization(id) {
|
|
3408
|
-
const { data } = await this.workos.get(`/organizations/${id}`);
|
|
3483
|
+
const { data } = await this.workos.get(`/organizations/${encodePathParameter(id)}`);
|
|
3409
3484
|
return deserializeOrganization(data);
|
|
3410
3485
|
}
|
|
3411
3486
|
/**
|
|
@@ -3421,7 +3496,7 @@ var Organizations = class {
|
|
|
3421
3496
|
* @throws {NotFoundException} 404
|
|
3422
3497
|
*/
|
|
3423
3498
|
async getOrganizationByExternalId(externalId) {
|
|
3424
|
-
const { data } = await this.workos.get(`/organizations/external_id/${externalId}`);
|
|
3499
|
+
const { data } = await this.workos.get(`/organizations/external_id/${encodePathParameter(externalId)}`);
|
|
3425
3500
|
return deserializeOrganization(data);
|
|
3426
3501
|
}
|
|
3427
3502
|
/**
|
|
@@ -3438,7 +3513,7 @@ var Organizations = class {
|
|
|
3438
3513
|
*/
|
|
3439
3514
|
async updateOrganization(options) {
|
|
3440
3515
|
const { organization: organizationId, ...payload } = options;
|
|
3441
|
-
const { data } = await this.workos.put(`/organizations/${organizationId}`, serializeUpdateOrganizationOptions(payload));
|
|
3516
|
+
const { data } = await this.workos.put(`/organizations/${encodePathParameter(organizationId)}`, serializeUpdateOrganizationOptions(payload));
|
|
3442
3517
|
return deserializeOrganization(data);
|
|
3443
3518
|
}
|
|
3444
3519
|
/**
|
|
@@ -3452,7 +3527,7 @@ var Organizations = class {
|
|
|
3452
3527
|
*/
|
|
3453
3528
|
async listItContacts(options) {
|
|
3454
3529
|
const { organizationId } = options;
|
|
3455
|
-
const { data } = await this.workos.get(`/organizations/${organizationId}/it_contacts`);
|
|
3530
|
+
const { data } = await this.workos.get(`/organizations/${encodePathParameter(organizationId)}/it_contacts`);
|
|
3456
3531
|
return {
|
|
3457
3532
|
object: data.object,
|
|
3458
3533
|
data: data.data.map(deserializeItContact),
|
|
@@ -3477,7 +3552,7 @@ var Organizations = class {
|
|
|
3477
3552
|
*/
|
|
3478
3553
|
async createItContact(options) {
|
|
3479
3554
|
const { organizationId, ...payload } = options;
|
|
3480
|
-
const { data } = await this.workos.post(`/organizations/${organizationId}/it_contacts`, serializeCreateItContactOptions(payload));
|
|
3555
|
+
const { data } = await this.workos.post(`/organizations/${encodePathParameter(organizationId)}/it_contacts`, serializeCreateItContactOptions(payload));
|
|
3481
3556
|
return deserializeItContact(data);
|
|
3482
3557
|
}
|
|
3483
3558
|
/**
|
|
@@ -3492,7 +3567,7 @@ var Organizations = class {
|
|
|
3492
3567
|
*/
|
|
3493
3568
|
async deleteItContact(options) {
|
|
3494
3569
|
const { organizationId, contactId } = options;
|
|
3495
|
-
await this.workos.delete(`/organizations/${organizationId}/it_contacts/${contactId}`);
|
|
3570
|
+
await this.workos.delete(`/organizations/${encodePathParameter(organizationId)}/it_contacts/${encodePathParameter(contactId)}`);
|
|
3496
3571
|
}
|
|
3497
3572
|
/**
|
|
3498
3573
|
* Invite an IT Contact
|
|
@@ -3508,7 +3583,7 @@ var Organizations = class {
|
|
|
3508
3583
|
*/
|
|
3509
3584
|
async inviteItContact(options) {
|
|
3510
3585
|
const { organizationId, contactId, ...payload } = options;
|
|
3511
|
-
await this.workos.post(`/organizations/${organizationId}/it_contacts/${contactId}/invite`, serializeInviteItContactOptions(payload));
|
|
3586
|
+
await this.workos.post(`/organizations/${encodePathParameter(organizationId)}/it_contacts/${encodePathParameter(contactId)}/invite`, serializeInviteItContactOptions(payload));
|
|
3512
3587
|
}
|
|
3513
3588
|
/**
|
|
3514
3589
|
* Revoke an IT Contact's invitation
|
|
@@ -3521,7 +3596,7 @@ var Organizations = class {
|
|
|
3521
3596
|
*/
|
|
3522
3597
|
async revokeItContact(options) {
|
|
3523
3598
|
const { organizationId, contactId } = options;
|
|
3524
|
-
await this.workos.post(`/organizations/${organizationId}/it_contacts/${contactId}/revoke`, {});
|
|
3599
|
+
await this.workos.post(`/organizations/${encodePathParameter(organizationId)}/it_contacts/${encodePathParameter(contactId)}/revoke`, {});
|
|
3525
3600
|
}
|
|
3526
3601
|
};
|
|
3527
3602
|
//#endregion
|
|
@@ -3550,7 +3625,7 @@ var OrganizationDomains = class {
|
|
|
3550
3625
|
* @throws {NotFoundException} 404
|
|
3551
3626
|
*/
|
|
3552
3627
|
async getOrganizationDomain(id) {
|
|
3553
|
-
const { data } = await this.workos.get(`/organization_domains/${id}`);
|
|
3628
|
+
const { data } = await this.workos.get(`/organization_domains/${encodePathParameter(id)}`);
|
|
3554
3629
|
return deserializeOrganizationDomain(data);
|
|
3555
3630
|
}
|
|
3556
3631
|
/**
|
|
@@ -3566,7 +3641,7 @@ var OrganizationDomains = class {
|
|
|
3566
3641
|
* @throws {BadRequestException} 400
|
|
3567
3642
|
*/
|
|
3568
3643
|
async verifyOrganizationDomain(id) {
|
|
3569
|
-
const { data } = await this.workos.post(`/organization_domains/${id}/verify`, {});
|
|
3644
|
+
const { data } = await this.workos.post(`/organization_domains/${encodePathParameter(id)}/verify`, {});
|
|
3570
3645
|
return deserializeOrganizationDomain(data);
|
|
3571
3646
|
}
|
|
3572
3647
|
/**
|
|
@@ -3594,7 +3669,7 @@ var OrganizationDomains = class {
|
|
|
3594
3669
|
* @throws {NotFoundException} 404
|
|
3595
3670
|
*/
|
|
3596
3671
|
async deleteOrganizationDomain(id) {
|
|
3597
|
-
await this.workos.delete(`/organization_domains/${id}`);
|
|
3672
|
+
await this.workos.delete(`/organization_domains/${encodePathParameter(id)}`);
|
|
3598
3673
|
}
|
|
3599
3674
|
};
|
|
3600
3675
|
//#endregion
|
|
@@ -3622,7 +3697,7 @@ var Passwordless = class {
|
|
|
3622
3697
|
return deserializePasswordlessSession(data);
|
|
3623
3698
|
}
|
|
3624
3699
|
async sendSession(sessionId) {
|
|
3625
|
-
const { data } = await this.workos.post(`/passwordless/sessions/${sessionId}/send`, {});
|
|
3700
|
+
const { data } = await this.workos.post(`/passwordless/sessions/${encodePathParameter(sessionId)}/send`, {});
|
|
3626
3701
|
return data;
|
|
3627
3702
|
}
|
|
3628
3703
|
};
|
|
@@ -3634,6 +3709,17 @@ const deserializeDataIntegrationCredential = (response) => ({
|
|
|
3634
3709
|
redactedClientSecret: response.redacted_client_secret ?? null
|
|
3635
3710
|
});
|
|
3636
3711
|
//#endregion
|
|
3712
|
+
//#region src/pipes/serializers/data-integration-installation.serializer.ts
|
|
3713
|
+
const deserializeDataIntegrationInstallation = (response) => ({
|
|
3714
|
+
id: response.id,
|
|
3715
|
+
connectionRole: response.connection_role,
|
|
3716
|
+
accountIdentifier: response.account_identifier ?? null,
|
|
3717
|
+
accountDisplayName: response.account_display_name ?? null,
|
|
3718
|
+
userId: response.user_id ?? null,
|
|
3719
|
+
organizationId: response.organization_id ?? null,
|
|
3720
|
+
apiKeyLast4: response.api_key_last_4 ?? null
|
|
3721
|
+
});
|
|
3722
|
+
//#endregion
|
|
3637
3723
|
//#region src/pipes/serializers/data-integration-custom-provider.serializer.ts
|
|
3638
3724
|
const deserializeDataIntegrationCustomProvider = (response) => ({
|
|
3639
3725
|
name: response.name,
|
|
@@ -3655,12 +3741,16 @@ const deserializeDataIntegration = (response) => ({
|
|
|
3655
3741
|
id: response.id,
|
|
3656
3742
|
slug: response.slug,
|
|
3657
3743
|
integrationType: response.integration_type,
|
|
3744
|
+
ownership: response.ownership,
|
|
3658
3745
|
description: response.description ?? null,
|
|
3659
3746
|
enabled: response.enabled,
|
|
3660
3747
|
state: response.state,
|
|
3661
3748
|
scopes: response.scopes ?? null,
|
|
3662
3749
|
redirectUri: response.redirect_uri,
|
|
3663
|
-
|
|
3750
|
+
authMethods: response.auth_methods,
|
|
3751
|
+
credentials: response.credentials != null ? deserializeDataIntegrationCredential(response.credentials) : null,
|
|
3752
|
+
installation: response.installation != null ? deserializeDataIntegrationInstallation(response.installation) : null,
|
|
3753
|
+
config: response.config,
|
|
3664
3754
|
customProvider: response.custom_provider != null ? deserializeDataIntegrationCustomProvider(response.custom_provider) : null,
|
|
3665
3755
|
createdAt: new Date(response.created_at),
|
|
3666
3756
|
updatedAt: new Date(response.updated_at)
|
|
@@ -3670,11 +3760,17 @@ const deserializeDataIntegration = (response) => ({
|
|
|
3670
3760
|
const deserializeConnectedAccount = (response) => ({
|
|
3671
3761
|
object: response.object,
|
|
3672
3762
|
id: response.id,
|
|
3763
|
+
connectionRole: response.connection_role,
|
|
3764
|
+
accountIdentifier: response.account_identifier ?? null,
|
|
3765
|
+
accountDisplayName: response.account_display_name ?? null,
|
|
3673
3766
|
userId: response.user_id ?? null,
|
|
3674
3767
|
organizationId: response.organization_id ?? null,
|
|
3675
3768
|
scopes: response.scopes,
|
|
3676
3769
|
authMethod: response.auth_method,
|
|
3677
3770
|
apiKeyLast4: response.api_key_last_4 ?? null,
|
|
3771
|
+
clientId: response.client_id ?? null,
|
|
3772
|
+
clientSecretLast4: response.client_secret_last_4 ?? null,
|
|
3773
|
+
config: response.config,
|
|
3678
3774
|
state: response.state,
|
|
3679
3775
|
createdAt: response.created_at,
|
|
3680
3776
|
updatedAt: response.updated_at
|
|
@@ -3683,22 +3779,52 @@ const deserializeConnectedAccount = (response) => ({
|
|
|
3683
3779
|
//#region src/pipes/serializers/data-integration-authorize-url-response.serializer.ts
|
|
3684
3780
|
const deserializeDataIntegrationAuthorizeUrlResponse = (response) => ({ url: response.url });
|
|
3685
3781
|
//#endregion
|
|
3686
|
-
//#region src/pipes/serializers/data-integration-
|
|
3687
|
-
const
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3782
|
+
//#region src/pipes/serializers/data-integration-vended-credential.serializer.ts
|
|
3783
|
+
const deserializeDataIntegrationVendedCredential = (response) => {
|
|
3784
|
+
switch (response.auth_method) {
|
|
3785
|
+
case "oauth": return {
|
|
3786
|
+
authMethod: "oauth",
|
|
3787
|
+
object: response.object,
|
|
3788
|
+
value: response.value,
|
|
3789
|
+
expiresAt: response.expires_at,
|
|
3790
|
+
scopes: response.scopes,
|
|
3791
|
+
missingScopes: response.missing_scopes,
|
|
3792
|
+
config: response.config
|
|
3793
|
+
};
|
|
3794
|
+
case "api_key": return {
|
|
3795
|
+
authMethod: "api_key",
|
|
3796
|
+
object: response.object,
|
|
3797
|
+
value: response.value,
|
|
3798
|
+
config: response.config
|
|
3799
|
+
};
|
|
3800
|
+
case "client_credentials": return {
|
|
3801
|
+
authMethod: "client_credentials",
|
|
3802
|
+
object: response.object,
|
|
3803
|
+
value: response.value,
|
|
3804
|
+
expiresAt: response.expires_at,
|
|
3805
|
+
scopes: response.scopes,
|
|
3806
|
+
missingScopes: response.missing_scopes,
|
|
3807
|
+
metadata: response.metadata,
|
|
3808
|
+
config: response.config
|
|
3809
|
+
};
|
|
3810
|
+
default: throw new Error("Unknown auth_method: " + String(response.auth_method));
|
|
3811
|
+
}
|
|
3812
|
+
};
|
|
3695
3813
|
//#endregion
|
|
3696
3814
|
//#region src/pipes/serializers/data-integration-credentials-response.serializer.ts
|
|
3697
|
-
const deserializeDataIntegrationCredentialsResponse = (response) =>
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3815
|
+
const deserializeDataIntegrationCredentialsResponse = (response) => {
|
|
3816
|
+
switch (response.active) {
|
|
3817
|
+
case true: return {
|
|
3818
|
+
active: true,
|
|
3819
|
+
credential: deserializeDataIntegrationVendedCredential(response.credential)
|
|
3820
|
+
};
|
|
3821
|
+
case false: return {
|
|
3822
|
+
active: false,
|
|
3823
|
+
error: response.error
|
|
3824
|
+
};
|
|
3825
|
+
default: throw new Error("Unknown active: " + String(response.active));
|
|
3826
|
+
}
|
|
3827
|
+
};
|
|
3702
3828
|
//#endregion
|
|
3703
3829
|
//#region src/pipes/serializers/data-integration-access-token-response-access-token.serializer.ts
|
|
3704
3830
|
const deserializeDataIntegrationAccessTokenResponseAccessToken = (response) => ({
|
|
@@ -3728,11 +3854,17 @@ const deserializeDataIntegrationAccessTokenResponse = (response) => {
|
|
|
3728
3854
|
const deserializeDataIntegrationsListResponseDataConnectedAccount = (response) => ({
|
|
3729
3855
|
object: response.object,
|
|
3730
3856
|
id: response.id,
|
|
3857
|
+
connectionRole: response.connection_role,
|
|
3858
|
+
accountIdentifier: response.account_identifier ?? null,
|
|
3859
|
+
accountDisplayName: response.account_display_name ?? null,
|
|
3731
3860
|
userId: response.user_id ?? null,
|
|
3732
3861
|
organizationId: response.organization_id ?? null,
|
|
3733
3862
|
scopes: response.scopes,
|
|
3734
3863
|
authMethod: response.auth_method,
|
|
3735
3864
|
apiKeyLast4: response.api_key_last_4 ?? null,
|
|
3865
|
+
clientId: response.client_id ?? null,
|
|
3866
|
+
clientSecretLast4: response.client_secret_last_4 ?? null,
|
|
3867
|
+
config: response.config,
|
|
3736
3868
|
state: response.state,
|
|
3737
3869
|
createdAt: response.created_at,
|
|
3738
3870
|
updatedAt: response.updated_at,
|
|
@@ -3750,10 +3882,12 @@ const deserializeDataIntegrationsListResponseData = (response) => ({
|
|
|
3750
3882
|
credentialsType: response.credentials_type,
|
|
3751
3883
|
scopes: response.scopes ?? null,
|
|
3752
3884
|
authMethods: response.auth_methods,
|
|
3885
|
+
connectionOwner: response.connection_owner,
|
|
3753
3886
|
ownership: response.ownership,
|
|
3754
3887
|
createdAt: response.created_at,
|
|
3755
3888
|
updatedAt: response.updated_at,
|
|
3756
|
-
connectedAccount: response.connected_account != null ? deserializeDataIntegrationsListResponseDataConnectedAccount(response.connected_account) : null
|
|
3889
|
+
connectedAccount: response.connected_account != null ? deserializeDataIntegrationsListResponseDataConnectedAccount(response.connected_account) : null,
|
|
3890
|
+
connectedAccounts: response.connected_accounts != null ? response.connected_accounts.map(deserializeDataIntegrationsListResponseDataConnectedAccount) : void 0
|
|
3757
3891
|
});
|
|
3758
3892
|
//#endregion
|
|
3759
3893
|
//#region src/pipes/serializers/data-integrations-list-response.serializer.ts
|
|
@@ -3762,13 +3896,20 @@ const deserializeDataIntegrationsListResponse = (response) => ({
|
|
|
3762
3896
|
data: response.data.map(deserializeDataIntegrationsListResponseData)
|
|
3763
3897
|
});
|
|
3764
3898
|
//#endregion
|
|
3765
|
-
//#region src/pipes/serializers/data-integration-credentials-
|
|
3766
|
-
const
|
|
3899
|
+
//#region src/pipes/serializers/data-integration-credentials-input.serializer.ts
|
|
3900
|
+
const serializeDataIntegrationCredentialsInput = (model) => ({
|
|
3767
3901
|
type: model.type,
|
|
3768
3902
|
client_id: model.clientId,
|
|
3769
3903
|
client_secret: model.clientSecret
|
|
3770
3904
|
});
|
|
3771
3905
|
//#endregion
|
|
3906
|
+
//#region src/pipes/serializers/api-key-installation.serializer.ts
|
|
3907
|
+
const serializeApiKeyInstallation = (model) => ({
|
|
3908
|
+
secret: model.secret,
|
|
3909
|
+
user_id: model.userId,
|
|
3910
|
+
organization_id: model.organizationId
|
|
3911
|
+
});
|
|
3912
|
+
//#endregion
|
|
3772
3913
|
//#region src/pipes/serializers/custom-provider-definition.serializer.ts
|
|
3773
3914
|
const serializeCustomProviderDefinition = (model) => ({
|
|
3774
3915
|
name: model.name,
|
|
@@ -3787,13 +3928,58 @@ const serializeCustomProviderDefinition = (model) => ({
|
|
|
3787
3928
|
//#region src/pipes/serializers/create-data-integration.serializer.ts
|
|
3788
3929
|
const serializeCreateDataIntegration = (model) => ({
|
|
3789
3930
|
provider: model.provider,
|
|
3931
|
+
ownership: model.ownership,
|
|
3932
|
+
auth_methods: model.authMethods,
|
|
3933
|
+
config: model.config,
|
|
3934
|
+
api_key: model.apiKey != null ? serializeApiKeyInstallation(model.apiKey) : void 0,
|
|
3790
3935
|
description: model.description,
|
|
3791
3936
|
enabled: model.enabled,
|
|
3792
3937
|
scopes: model.scopes,
|
|
3793
|
-
credentials: model.credentials != null ?
|
|
3938
|
+
credentials: model.credentials != null ? serializeDataIntegrationCredentialsInput(model.credentials) : void 0,
|
|
3794
3939
|
custom_provider: model.customProvider != null ? serializeCustomProviderDefinition(model.customProvider) : void 0
|
|
3795
3940
|
});
|
|
3796
3941
|
//#endregion
|
|
3942
|
+
//#region src/pipes/serializers/data-integrations-create-api-key-connection-request.serializer.ts
|
|
3943
|
+
const serializeDataIntegrationsCreateApiKeyConnectionRequest = (model) => ({
|
|
3944
|
+
user_id: model.userId,
|
|
3945
|
+
organization_id: model.organizationId,
|
|
3946
|
+
connection_owner: model.connectionOwner,
|
|
3947
|
+
secret: model.secret,
|
|
3948
|
+
connection_intent: model.connectionIntent
|
|
3949
|
+
});
|
|
3950
|
+
//#endregion
|
|
3951
|
+
//#region src/pipes/serializers/data-integrations-create-client-credentials-connection-request.serializer.ts
|
|
3952
|
+
const serializeDataIntegrationsCreateClientCredentialsConnectionRequest = (model) => ({
|
|
3953
|
+
user_id: model.userId,
|
|
3954
|
+
organization_id: model.organizationId,
|
|
3955
|
+
connection_owner: model.connectionOwner,
|
|
3956
|
+
client_id: model.clientId,
|
|
3957
|
+
client_secret: model.clientSecret,
|
|
3958
|
+
config: model.config,
|
|
3959
|
+
connection_intent: model.connectionIntent
|
|
3960
|
+
});
|
|
3961
|
+
//#endregion
|
|
3962
|
+
//#region src/pipes/serializers/create-connected-account.serializer.ts
|
|
3963
|
+
const serializeCreateConnectedAccount = (model) => ({
|
|
3964
|
+
access_token: model.accessToken,
|
|
3965
|
+
refresh_token: model.refreshToken,
|
|
3966
|
+
expires_at: model.expiresAt != null ? model.expiresAt.toISOString() : void 0,
|
|
3967
|
+
scopes: model.scopes,
|
|
3968
|
+
state: model.state,
|
|
3969
|
+
connection_intent: model.connectionIntent
|
|
3970
|
+
});
|
|
3971
|
+
//#endregion
|
|
3972
|
+
//#region src/pipes/serializers/create-organization-connected-account.serializer.ts
|
|
3973
|
+
const serializeCreateOrganizationConnectedAccount = (model) => ({
|
|
3974
|
+
access_token: model.accessToken,
|
|
3975
|
+
refresh_token: model.refreshToken,
|
|
3976
|
+
expires_at: model.expiresAt != null ? model.expiresAt.toISOString() : void 0,
|
|
3977
|
+
scopes: model.scopes,
|
|
3978
|
+
state: model.state,
|
|
3979
|
+
user_id: model.userId,
|
|
3980
|
+
connection_intent: model.connectionIntent
|
|
3981
|
+
});
|
|
3982
|
+
//#endregion
|
|
3797
3983
|
//#region src/pipes/serializers/update-custom-provider-definition.serializer.ts
|
|
3798
3984
|
const serializeUpdateCustomProviderDefinition = (model) => ({
|
|
3799
3985
|
name: model.name,
|
|
@@ -3814,7 +4000,8 @@ const serializeUpdateDataIntegration = (model) => ({
|
|
|
3814
4000
|
description: model.description,
|
|
3815
4001
|
enabled: model.enabled,
|
|
3816
4002
|
scopes: model.scopes,
|
|
3817
|
-
|
|
4003
|
+
api_key: model.apiKey != null ? serializeApiKeyInstallation(model.apiKey) : void 0,
|
|
4004
|
+
credentials: model.credentials != null ? serializeDataIntegrationCredentialsInput(model.credentials) : void 0,
|
|
3818
4005
|
custom_provider: model.customProvider != null ? serializeUpdateCustomProviderDefinition(model.customProvider) : void 0
|
|
3819
4006
|
});
|
|
3820
4007
|
//#endregion
|
|
@@ -3822,6 +4009,9 @@ const serializeUpdateDataIntegration = (model) => ({
|
|
|
3822
4009
|
const serializeDataIntegrationsUpsertApiKeyRequest = (model) => ({
|
|
3823
4010
|
user_id: model.userId,
|
|
3824
4011
|
organization_id: model.organizationId,
|
|
4012
|
+
connected_account_id: model.connectedAccountId,
|
|
4013
|
+
connection_intent: model.connectionIntent,
|
|
4014
|
+
connection_owner: model.connectionOwner,
|
|
3825
4015
|
secret: model.secret
|
|
3826
4016
|
});
|
|
3827
4017
|
//#endregion
|
|
@@ -3829,23 +4019,53 @@ const serializeDataIntegrationsUpsertApiKeyRequest = (model) => ({
|
|
|
3829
4019
|
const serializeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest = (model) => ({
|
|
3830
4020
|
user_id: model.userId,
|
|
3831
4021
|
organization_id: model.organizationId,
|
|
3832
|
-
|
|
4022
|
+
connection_owner: model.connectionOwner,
|
|
4023
|
+
return_to: model.returnTo,
|
|
4024
|
+
config: model.config
|
|
4025
|
+
});
|
|
4026
|
+
//#endregion
|
|
4027
|
+
//#region src/pipes/serializers/data-integrations-upsert-client-credentials-request.serializer.ts
|
|
4028
|
+
const serializeDataIntegrationsUpsertClientCredentialsRequest = (model) => ({
|
|
4029
|
+
user_id: model.userId,
|
|
4030
|
+
organization_id: model.organizationId,
|
|
4031
|
+
connected_account_id: model.connectedAccountId,
|
|
4032
|
+
connection_intent: model.connectionIntent,
|
|
4033
|
+
connection_owner: model.connectionOwner,
|
|
4034
|
+
client_id: model.clientId,
|
|
4035
|
+
client_secret: model.clientSecret,
|
|
4036
|
+
config: model.config
|
|
3833
4037
|
});
|
|
3834
4038
|
//#endregion
|
|
3835
4039
|
//#region src/pipes/serializers/data-integrations-vend-credentials-request.serializer.ts
|
|
3836
4040
|
const serializeDataIntegrationsVendCredentialsRequest = (model) => ({
|
|
3837
4041
|
user_id: model.userId,
|
|
3838
|
-
organization_id: model.organizationId
|
|
4042
|
+
organization_id: model.organizationId,
|
|
4043
|
+
connected_account_id: model.connectedAccountId,
|
|
4044
|
+
connection_owner: model.connectionOwner,
|
|
4045
|
+
supports_multiple_connections: model.supportsMultipleConnections
|
|
3839
4046
|
});
|
|
3840
4047
|
//#endregion
|
|
3841
4048
|
//#region src/pipes/serializers/data-integrations-get-user-token-request.serializer.ts
|
|
3842
4049
|
const serializeDataIntegrationsGetUserTokenRequest = (model) => ({
|
|
3843
4050
|
user_id: model.userId,
|
|
3844
|
-
organization_id: model.organizationId
|
|
4051
|
+
organization_id: model.organizationId,
|
|
4052
|
+
connected_account_id: model.connectedAccountId,
|
|
4053
|
+
connection_owner: model.connectionOwner,
|
|
4054
|
+
supports_multiple_connections: model.supportsMultipleConnections
|
|
4055
|
+
});
|
|
4056
|
+
//#endregion
|
|
4057
|
+
//#region src/pipes/serializers/organization-connected-account.serializer.ts
|
|
4058
|
+
const serializeOrganizationConnectedAccount = (model) => ({
|
|
4059
|
+
access_token: model.accessToken,
|
|
4060
|
+
refresh_token: model.refreshToken,
|
|
4061
|
+
expires_at: model.expiresAt != null ? model.expiresAt.toISOString() : void 0,
|
|
4062
|
+
scopes: model.scopes,
|
|
4063
|
+
state: model.state,
|
|
4064
|
+
user_id: model.userId
|
|
3845
4065
|
});
|
|
3846
4066
|
//#endregion
|
|
3847
|
-
//#region src/pipes/serializers/connected-account-
|
|
3848
|
-
const
|
|
4067
|
+
//#region src/pipes/serializers/connected-account-input.serializer.ts
|
|
4068
|
+
const serializeConnectedAccountInput = (model) => ({
|
|
3849
4069
|
access_token: model.accessToken,
|
|
3850
4070
|
refresh_token: model.refreshToken,
|
|
3851
4071
|
expires_at: model.expiresAt != null ? model.expiresAt.toISOString() : void 0,
|
|
@@ -3862,10 +4082,12 @@ var Pipes = class {
|
|
|
3862
4082
|
/**
|
|
3863
4083
|
* List data integrations
|
|
3864
4084
|
*
|
|
3865
|
-
* Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers.
|
|
4085
|
+
* Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations. Both user-owned and organization-owned roots are returned, each as its own row with an `ownership`; filter with `ownership` to return only one kind.
|
|
3866
4086
|
* @param options - Pagination and filter options.
|
|
3867
|
-
* @returns {Promise<AutoPaginatable<DataIntegration,
|
|
4087
|
+
* @returns {Promise<AutoPaginatable<DataIntegration, ListDataIntegrationsOptions>>}
|
|
3868
4088
|
* @throws {UnauthorizedException} 401
|
|
4089
|
+
* @throws {NotFoundException} 404
|
|
4090
|
+
* @throws {UnprocessableEntityException} 422
|
|
3869
4091
|
*/
|
|
3870
4092
|
async listDataIntegrations(options) {
|
|
3871
4093
|
const paginationOptions = options;
|
|
@@ -3874,22 +4096,31 @@ var Pipes = class {
|
|
|
3874
4096
|
/**
|
|
3875
4097
|
* Create a data integration
|
|
3876
4098
|
*
|
|
3877
|
-
* Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials
|
|
4099
|
+
* Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. Set `ownership` to `organization` to create the integration organizations connect to instead of the default user-owned one; a provider may have one of each. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition, or the slug of an existing custom provider (without `custom_provider`) to add the other ownership.
|
|
3878
4100
|
* @param options - Object containing provider.
|
|
3879
4101
|
* @param options.provider - The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
|
|
3880
4102
|
* @example "github"
|
|
4103
|
+
* @param options.ownership - Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`.
|
|
4104
|
+
* @example "user"
|
|
3881
4105
|
* @param options.description - An optional description of the Data Integration.
|
|
3882
4106
|
* @example "Production GitHub app"
|
|
3883
4107
|
* @param options.enabled - Whether the Data Integration is enabled. Defaults to `false`.
|
|
3884
4108
|
* @example true
|
|
3885
4109
|
* @param options.scopes - The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
|
|
3886
4110
|
* @example ["repo","read:org"]
|
|
3887
|
-
* @param options.
|
|
4111
|
+
* @param options.authMethods - How accounts authenticate with the provider. Defaults to `["oauth"]`. Use `["api_key"]` to declare an API key integration; `credentials` is then not required and keys are supplied per-tenant (optionally via `api_key` on this request). Use `["client_credentials"]` to declare a client-credentials integration; `credentials` is likewise not required and client credentials are supplied per-tenant.
|
|
4112
|
+
* @example ["oauth"]
|
|
4113
|
+
* @param options.config - Provider-specific config values (e.g. a Snowflake `account`), keyed by the config field. Only fields the built-in provider declares are accepted.
|
|
4114
|
+
* @example {"account":"myorg-myaccount"}
|
|
4115
|
+
* @param options.credentials - The OAuth credentials to configure for the Data Integration. Required for OAuth integrations; omit when `auth_methods` is `["api_key"]`.
|
|
4116
|
+
* @param options.apiKey - An optional API key to install for the first tenant on an `api_key` integration. Omit to declare a keyless integration; tenants can be added later via the per-installation API key path.
|
|
3888
4117
|
* @param options.customProvider - The OAuth definition for a custom provider. Supply this to define a custom provider; omit it to create an integration for a built-in provider.
|
|
3889
4118
|
* @returns {Promise<DataIntegration>}
|
|
3890
4119
|
* @throws {BadRequestException} 400
|
|
3891
4120
|
* @throws {UnauthorizedException} 401
|
|
4121
|
+
* @throws {AuthorizationException} 403
|
|
3892
4122
|
* @throws {NotFoundException} 404
|
|
4123
|
+
* @throws {ConflictException} 409
|
|
3893
4124
|
* @throws {UnprocessableEntityException} 422
|
|
3894
4125
|
*/
|
|
3895
4126
|
async createDataIntegration(options) {
|
|
@@ -3900,7 +4131,7 @@ var Pipes = class {
|
|
|
3900
4131
|
/**
|
|
3901
4132
|
* Get a data integration
|
|
3902
4133
|
*
|
|
3903
|
-
* Retrieves
|
|
4134
|
+
* Retrieves the user-owned data integration by its slug.
|
|
3904
4135
|
* @param options - The request options.
|
|
3905
4136
|
* @param options.slug - The slug identifier of the data integration.
|
|
3906
4137
|
* @example "github"
|
|
@@ -3916,7 +4147,7 @@ var Pipes = class {
|
|
|
3916
4147
|
/**
|
|
3917
4148
|
* Update a data integration
|
|
3918
4149
|
*
|
|
3919
|
-
* Updates the description, enabled state, or custom credentials of
|
|
4150
|
+
* Updates the description, enabled state, or custom credentials of the user-owned data integration. For custom providers, `custom_provider` updates the OAuth definition.
|
|
3920
4151
|
* @param options - The request body.
|
|
3921
4152
|
* @param options.slug - The slug identifier of the data integration.
|
|
3922
4153
|
* @example "github"
|
|
@@ -3926,12 +4157,15 @@ var Pipes = class {
|
|
|
3926
4157
|
* @example true
|
|
3927
4158
|
* @param options.scopes - The OAuth scopes to request for the Data Integration. Pass `null` to reset to the provider's configured scopes.
|
|
3928
4159
|
* @example ["repo","read:org"]
|
|
3929
|
-
* @param options.credentials - New credentials for the Data Integration. When provided, rotates the stored client secret.
|
|
4160
|
+
* @param options.credentials - New OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`.
|
|
4161
|
+
* @param options.apiKey - An API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`).
|
|
3930
4162
|
* @param options.customProvider - Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations.
|
|
3931
4163
|
* @returns {Promise<DataIntegration>}
|
|
3932
4164
|
* @throws {BadRequestException} 400
|
|
3933
4165
|
* @throws {UnauthorizedException} 401
|
|
4166
|
+
* @throws {AuthorizationException} 403
|
|
3934
4167
|
* @throws {NotFoundException} 404
|
|
4168
|
+
* @throws {ConflictException} 409
|
|
3935
4169
|
* @throws {UnprocessableEntityException} 422
|
|
3936
4170
|
*/
|
|
3937
4171
|
async updateDataIntegration(options) {
|
|
@@ -3942,7 +4176,7 @@ var Pipes = class {
|
|
|
3942
4176
|
/**
|
|
3943
4177
|
* Delete a data integration
|
|
3944
4178
|
*
|
|
3945
|
-
* Deletes
|
|
4179
|
+
* Deletes the user-owned data integration and all of its connected installations. For a custom provider, the provider definition is deleted once no organization-owned root references it either.
|
|
3946
4180
|
* @param options - The request options.
|
|
3947
4181
|
* @param options.slug - The slug identifier of the data integration.
|
|
3948
4182
|
* @example "github"
|
|
@@ -3955,16 +4189,34 @@ var Pipes = class {
|
|
|
3955
4189
|
await this.workos.delete(`/data-integrations/${encodeURIComponent(slug)}`);
|
|
3956
4190
|
}
|
|
3957
4191
|
/**
|
|
4192
|
+
* Create another API key connected account
|
|
4193
|
+
*
|
|
4194
|
+
* Requires `connectionIntent: 'add'` and does not accept an account selector.
|
|
4195
|
+
* Until additional connections are available, this creates the first connection
|
|
4196
|
+
* or returns 404 `multiple_connections_unavailable` if one already exists.
|
|
4197
|
+
* Use `updateDataIntegrationApiKey` to rotate the compatibility connection or
|
|
4198
|
+
* update an exact connection.
|
|
4199
|
+
*/
|
|
4200
|
+
async createDataIntegrationApiKey(options) {
|
|
4201
|
+
const { slug, ...payload } = options;
|
|
4202
|
+
const { data } = await this.workos.post(`/data-integrations/${encodeURIComponent(slug)}/api-key`, serializeDataIntegrationsCreateApiKeyConnectionRequest(payload));
|
|
4203
|
+
return deserializeConnectedAccount(data);
|
|
4204
|
+
}
|
|
4205
|
+
/**
|
|
3958
4206
|
* Upsert an API key for a connected account
|
|
3959
4207
|
*
|
|
3960
|
-
* Creates or updates an API-key-based installation for the specified integration
|
|
4208
|
+
* Creates or updates an API-key-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored API key is rotated to the new value.
|
|
3961
4209
|
* @param options - Object containing userId, secret.
|
|
3962
4210
|
* @param options.slug - The identifier of the integration.
|
|
3963
4211
|
* @example "github"
|
|
3964
4212
|
* @param options.userId - A [User](https://workos.com/docs/reference/authkit/user) identifier.
|
|
3965
4213
|
* @example "user_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
3966
|
-
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
|
|
4214
|
+
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
|
|
3967
4215
|
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4216
|
+
* @param options.connectedAccountId - A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
|
|
4217
|
+
* @example "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4218
|
+
* @param options.connectionOwner - Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
|
|
4219
|
+
* @example "user"
|
|
3968
4220
|
* @param options.secret - The API key secret to store for this integration.
|
|
3969
4221
|
* @example "sk-1234567890abcdef"
|
|
3970
4222
|
* @returns {Promise<ConnectedAccount>}
|
|
@@ -3972,6 +4224,7 @@ var Pipes = class {
|
|
|
3972
4224
|
* @throws {UnauthorizedException} 401
|
|
3973
4225
|
* @throws {AuthorizationException} 403
|
|
3974
4226
|
* @throws {NotFoundException} 404
|
|
4227
|
+
* @throws {ConflictException} 409
|
|
3975
4228
|
* @throws {UnprocessableEntityException} 422
|
|
3976
4229
|
*/
|
|
3977
4230
|
async updateDataIntegrationApiKey(options) {
|
|
@@ -3986,12 +4239,16 @@ var Pipes = class {
|
|
|
3986
4239
|
* @param options - Object containing userId.
|
|
3987
4240
|
* @param options.slug - The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
|
|
3988
4241
|
* @example "github"
|
|
3989
|
-
* @param options.userId - The ID of the user to authorize.
|
|
4242
|
+
* @param options.userId - The ID of the user to authorize. When `connection_owner` is `organization`, this is the user authorizing on behalf of the organization; they must be an active member of the organization and do not become the owner of the resulting connected account.
|
|
3990
4243
|
* @example "user_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
3991
|
-
* @param options.organizationId - An organization ID to scope the authorization to a specific organization.
|
|
4244
|
+
* @param options.organizationId - An organization ID to scope the authorization to a specific organization. Required when `connection_owner` is `organization`.
|
|
3992
4245
|
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4246
|
+
* @param options.connectionOwner - Who will own the connected account. `user` (the default) connects the user's own account. `organization` connects the organization's shared account and requires `organization_id`.
|
|
4247
|
+
* @example "user"
|
|
3993
4248
|
* @param options.returnTo - The URL to redirect the user to after authorization.
|
|
3994
4249
|
* @example "https://example.com/callback"
|
|
4250
|
+
* @param options.config - Connect-time config values for the provider-declared `installation`-scope fields (e.g. a Zendesk `subdomain`), keyed by the config field. Only fields the provider declares may be supplied, and required fields must be provided unless already pinned on the integration.
|
|
4251
|
+
* @example {"subdomain":"acme"}
|
|
3995
4252
|
* @returns {Promise<DataIntegrationAuthorizeUrlResponse>}
|
|
3996
4253
|
* @throws {BadRequestException} 400
|
|
3997
4254
|
* @throws {UnauthorizedException} 401
|
|
@@ -4004,20 +4261,63 @@ var Pipes = class {
|
|
|
4004
4261
|
return deserializeDataIntegrationAuthorizeUrlResponse(data);
|
|
4005
4262
|
}
|
|
4006
4263
|
/**
|
|
4264
|
+
* Create another client credentials connected account
|
|
4265
|
+
*
|
|
4266
|
+
* Requires `connectionIntent: 'add'` and does not accept an account selector.
|
|
4267
|
+
* Until additional connections are available, this creates the first connection
|
|
4268
|
+
* or returns 404 `multiple_connections_unavailable` if one already exists.
|
|
4269
|
+
* Use `updateDataIntegrationClientCredentials` to rotate the compatibility
|
|
4270
|
+
* connection or update an exact connection.
|
|
4271
|
+
*/
|
|
4272
|
+
async createDataIntegrationClientCredential(options) {
|
|
4273
|
+
const { slug, ...payload } = options;
|
|
4274
|
+
const { data } = await this.workos.post(`/data-integrations/${encodeURIComponent(slug)}/client-credentials`, serializeDataIntegrationsCreateClientCredentialsConnectionRequest(payload));
|
|
4275
|
+
return deserializeConnectedAccount(data);
|
|
4276
|
+
}
|
|
4277
|
+
/**
|
|
4278
|
+
* Upsert client credentials for a connected account
|
|
4279
|
+
*
|
|
4280
|
+
* Creates or updates a client-credentials-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored client credentials are rotated to the new values.
|
|
4281
|
+
* @param options - The request options.
|
|
4282
|
+
* @param options.slug - The identifier of the integration.
|
|
4283
|
+
* @example "salesforce"
|
|
4284
|
+
* @returns {Promise<ConnectedAccount>}
|
|
4285
|
+
* @throws {BadRequestException} 400
|
|
4286
|
+
* @throws {UnauthorizedException} 401
|
|
4287
|
+
* @throws {AuthorizationException} 403
|
|
4288
|
+
* @throws {NotFoundException} 404
|
|
4289
|
+
* @throws {ConflictException} 409
|
|
4290
|
+
* @throws {UnprocessableEntityException} 422
|
|
4291
|
+
*/
|
|
4292
|
+
async updateDataIntegrationClientCredentials(options) {
|
|
4293
|
+
const { slug, ...payload } = options;
|
|
4294
|
+
const { data } = await this.workos.put(`/data-integrations/${encodeURIComponent(slug)}/client-credentials`, serializeDataIntegrationsUpsertClientCredentialsRequest(payload));
|
|
4295
|
+
return deserializeConnectedAccount(data);
|
|
4296
|
+
}
|
|
4297
|
+
/**
|
|
4007
4298
|
* Vend credentials for a connected account
|
|
4008
4299
|
*
|
|
4009
|
-
* Returns credentials for a user
|
|
4300
|
+
* Returns credentials for a user-owned or organization-owned connected account. OAuth and client-credentials installations return an access token; API-key installations return the stored secret. Every active credential includes provider-declared, non-secret `config` from the connection snapshot with current defaults. Client-credentials responses also include provider token `metadata`.
|
|
4010
4301
|
* @param options - Object containing userId.
|
|
4011
4302
|
* @param options.slug - The identifier of the integration.
|
|
4012
4303
|
* @example "github"
|
|
4013
|
-
* @param options.userId - A [User](https://workos.com/docs/reference/authkit/user) identifier.
|
|
4304
|
+
* @param options.userId - A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
|
|
4014
4305
|
* @example "user_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4015
|
-
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
|
|
4306
|
+
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
|
|
4016
4307
|
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4308
|
+
* @param options.connectedAccountId - A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
|
|
4309
|
+
* @example "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4310
|
+
* @param options.connectionOwner - Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
|
|
4311
|
+
* @example "user"
|
|
4312
|
+
* @param options.supportsMultipleConnections - Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
|
|
4313
|
+
* @example true
|
|
4017
4314
|
* @returns {Promise<DataIntegrationCredentialsResponse>}
|
|
4018
4315
|
* @throws {BadRequestException} 400
|
|
4019
4316
|
* @throws {UnauthorizedException} 401
|
|
4317
|
+
* @throws {AuthorizationException} 403
|
|
4020
4318
|
* @throws {NotFoundException} 404
|
|
4319
|
+
* @throws {ConflictException} 409
|
|
4320
|
+
* @throws {UnprocessableEntityException} 422
|
|
4021
4321
|
*/
|
|
4022
4322
|
async createDataIntegrationCredential(options) {
|
|
4023
4323
|
const { slug, ...payload } = options;
|
|
@@ -4025,20 +4325,79 @@ var Pipes = class {
|
|
|
4025
4325
|
return deserializeDataIntegrationCredentialsResponse(data);
|
|
4026
4326
|
}
|
|
4027
4327
|
/**
|
|
4328
|
+
* Get an organization-owned data integration
|
|
4329
|
+
*
|
|
4330
|
+
* Retrieves the organization-owned data integration for a provider by its slug. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
|
|
4331
|
+
* @param options - The request options.
|
|
4332
|
+
* @param options.slug - The slug identifier of the data integration.
|
|
4333
|
+
* @example "github"
|
|
4334
|
+
* @returns {Promise<DataIntegration>}
|
|
4335
|
+
* @throws {UnauthorizedException} 401
|
|
4336
|
+
* @throws {NotFoundException} 404
|
|
4337
|
+
*/
|
|
4338
|
+
async getOrganizationDataIntegration(options) {
|
|
4339
|
+
const { slug } = options;
|
|
4340
|
+
const { data } = await this.workos.get(`/data-integrations/${encodeURIComponent(slug)}/organization`);
|
|
4341
|
+
return deserializeDataIntegration(data);
|
|
4342
|
+
}
|
|
4343
|
+
/**
|
|
4344
|
+
* Update an organization-owned data integration
|
|
4345
|
+
*
|
|
4346
|
+
* Updates the description, enabled state, or custom credentials of the organization-owned data integration for a provider. For custom providers, `custom_provider` updates the OAuth definition, which is shared with the user-owned root. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
|
|
4347
|
+
* @param options - The request options.
|
|
4348
|
+
* @param options.slug - The slug identifier of the data integration.
|
|
4349
|
+
* @example "github"
|
|
4350
|
+
* @returns {Promise<DataIntegration>}
|
|
4351
|
+
* @throws {BadRequestException} 400
|
|
4352
|
+
* @throws {UnauthorizedException} 401
|
|
4353
|
+
* @throws {AuthorizationException} 403
|
|
4354
|
+
* @throws {NotFoundException} 404
|
|
4355
|
+
* @throws {ConflictException} 409
|
|
4356
|
+
* @throws {UnprocessableEntityException} 422
|
|
4357
|
+
*/
|
|
4358
|
+
async updateOrganizationDataIntegration(options) {
|
|
4359
|
+
const { slug, ...payload } = options;
|
|
4360
|
+
const { data } = await this.workos.put(`/data-integrations/${encodeURIComponent(slug)}/organization`, serializeUpdateDataIntegration(payload));
|
|
4361
|
+
return deserializeDataIntegration(data);
|
|
4362
|
+
}
|
|
4363
|
+
/**
|
|
4364
|
+
* Delete an organization-owned data integration
|
|
4365
|
+
*
|
|
4366
|
+
* Deletes the organization-owned data integration for a provider and all of its connected installations. For a custom provider, the provider definition is deleted once no user-owned root references it either. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
|
|
4367
|
+
* @param options - The request options.
|
|
4368
|
+
* @param options.slug - The slug identifier of the data integration.
|
|
4369
|
+
* @example "github"
|
|
4370
|
+
* @returns {Promise<void>}
|
|
4371
|
+
* @throws {UnauthorizedException} 401
|
|
4372
|
+
* @throws {NotFoundException} 404
|
|
4373
|
+
*/
|
|
4374
|
+
async deleteOrganizationDataIntegration(options) {
|
|
4375
|
+
const { slug } = options;
|
|
4376
|
+
await this.workos.delete(`/data-integrations/${encodeURIComponent(slug)}/organization`);
|
|
4377
|
+
}
|
|
4378
|
+
/**
|
|
4028
4379
|
* Get an access token for a connected account
|
|
4029
4380
|
*
|
|
4030
4381
|
* Fetches a valid OAuth access token for a user's connected account. WorkOS automatically handles token refresh, ensuring you always receive a valid, non-expired token.
|
|
4031
4382
|
* @param options - Object containing userId.
|
|
4032
4383
|
* @param options.provider - The identifier of the integration.
|
|
4033
4384
|
* @example "github"
|
|
4034
|
-
* @param options.userId - A [User](https://workos.com/docs/reference/authkit/user) identifier.
|
|
4385
|
+
* @param options.userId - A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
|
|
4035
4386
|
* @example "user_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4036
|
-
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
|
|
4387
|
+
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
|
|
4037
4388
|
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4389
|
+
* @param options.connectedAccountId - A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
|
|
4390
|
+
* @example "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4391
|
+
* @param options.connectionOwner - Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
|
|
4392
|
+
* @example "user"
|
|
4393
|
+
* @param options.supportsMultipleConnections - Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
|
|
4394
|
+
* @example true
|
|
4038
4395
|
* @returns {Promise<DataIntegrationAccessTokenResponse>}
|
|
4039
4396
|
* @throws {BadRequestException} 400
|
|
4040
4397
|
* @throws {UnauthorizedException} 401
|
|
4398
|
+
* @throws {AuthorizationException} 403
|
|
4041
4399
|
* @throws {NotFoundException} 404
|
|
4400
|
+
* @throws {ConflictException} 409
|
|
4042
4401
|
* @throws {UnprocessableEntityException} 422
|
|
4043
4402
|
*/
|
|
4044
4403
|
async getAccessToken(options) {
|
|
@@ -4047,6 +4406,128 @@ var Pipes = class {
|
|
|
4047
4406
|
return deserializeDataIntegrationAccessTokenResponse(data);
|
|
4048
4407
|
}
|
|
4049
4408
|
/**
|
|
4409
|
+
* Get an organization connected account
|
|
4410
|
+
*
|
|
4411
|
+
* Retrieves an organization's [connected account](https://workos.com/docs/reference/pipes/connected-account) for a specific provider.
|
|
4412
|
+
* @param options - Additional query options.
|
|
4413
|
+
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier.
|
|
4414
|
+
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4415
|
+
* @param options.slug - The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
|
|
4416
|
+
* @example "github"
|
|
4417
|
+
* @param options.supportsMultipleConnections - Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
|
|
4418
|
+
* @example true
|
|
4419
|
+
* @param options.connectedAccountId - A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the organization has several for this provider.
|
|
4420
|
+
* @example "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4421
|
+
* @returns {Promise<ConnectedAccount>}
|
|
4422
|
+
* @throws {BadRequestException} 400
|
|
4423
|
+
* @throws {UnauthorizedException} 401
|
|
4424
|
+
* @throws {NotFoundException} 404
|
|
4425
|
+
* @throws {ConflictException} 409
|
|
4426
|
+
*/
|
|
4427
|
+
async getOrganizationConnectedAccount(options) {
|
|
4428
|
+
const { organizationId, slug } = options;
|
|
4429
|
+
const { data } = await this.workos.get(`/organizations/${encodeURIComponent(organizationId)}/connected_accounts/${encodeURIComponent(slug)}`, { query: {
|
|
4430
|
+
...options.supportsMultipleConnections !== void 0 && { supports_multiple_connections: options.supportsMultipleConnections },
|
|
4431
|
+
...options.connectedAccountId !== void 0 && { connected_account_id: options.connectedAccountId }
|
|
4432
|
+
} });
|
|
4433
|
+
return deserializeConnectedAccount(data);
|
|
4434
|
+
}
|
|
4435
|
+
/**
|
|
4436
|
+
* Import an organization connected account
|
|
4437
|
+
*
|
|
4438
|
+
* Imports an organization-owned [connected account](https://workos.com/docs/reference/pipes/connected-account) by providing OAuth tokens directly. Omit `connectionIntent` for compatibility behavior or set it to `add` to explicitly create a connection. Additional connection creation is subject to API availability.
|
|
4439
|
+
* @param options - The request options.
|
|
4440
|
+
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier.
|
|
4441
|
+
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4442
|
+
* @param options.slug - The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
|
|
4443
|
+
* @example "github"
|
|
4444
|
+
* @returns {Promise<ConnectedAccount>}
|
|
4445
|
+
* @throws {UnauthorizedException} 401
|
|
4446
|
+
* @throws {AuthorizationException} 403
|
|
4447
|
+
* @throws {NotFoundException} 404
|
|
4448
|
+
* @throws {ConflictException} 409
|
|
4449
|
+
* @throws {UnprocessableEntityException} 422
|
|
4450
|
+
*/
|
|
4451
|
+
async createOrganizationConnectedAccount(options) {
|
|
4452
|
+
const { organizationId, slug, ...payload } = options;
|
|
4453
|
+
const { data } = await this.workos.post(`/organizations/${encodeURIComponent(organizationId)}/connected_accounts/${encodeURIComponent(slug)}`, serializeCreateOrganizationConnectedAccount(payload));
|
|
4454
|
+
return deserializeConnectedAccount(data);
|
|
4455
|
+
}
|
|
4456
|
+
/**
|
|
4457
|
+
* Update an organization connected account
|
|
4458
|
+
*
|
|
4459
|
+
* Updates an organization's [connected account](https://workos.com/docs/reference/pipes/connected-account) tokens, scopes, or state for a specific provider.
|
|
4460
|
+
* @param options - Additional query options.
|
|
4461
|
+
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier.
|
|
4462
|
+
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4463
|
+
* @param options.slug - The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
|
|
4464
|
+
* @example "github"
|
|
4465
|
+
* @param options.supportsMultipleConnections - Accepted for compatibility; does not change update targeting.
|
|
4466
|
+
* @param options.connectedAccountId - A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
|
|
4467
|
+
* @example "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4468
|
+
* @param options.connectionIntent - Set to `reauthorize` with `connectedAccountId`, or omit both to update the compatibility connection.
|
|
4469
|
+
* @returns {Promise<ConnectedAccount>}
|
|
4470
|
+
* @throws {BadRequestException} 400
|
|
4471
|
+
* @throws {UnauthorizedException} 401
|
|
4472
|
+
* @throws {AuthorizationException} 403
|
|
4473
|
+
* @throws {NotFoundException} 404
|
|
4474
|
+
* @throws {ConflictException} 409
|
|
4475
|
+
* @throws {UnprocessableEntityException} 422
|
|
4476
|
+
*/
|
|
4477
|
+
async updateOrganizationConnectedAccount(options) {
|
|
4478
|
+
const { organizationId, slug, supportsMultipleConnections, connectedAccountId, connectionIntent, ...payload } = options;
|
|
4479
|
+
const { data } = await this.workos.put(`/organizations/${encodeURIComponent(organizationId)}/connected_accounts/${encodeURIComponent(slug)}`, serializeOrganizationConnectedAccount(payload), { query: {
|
|
4480
|
+
supports_multiple_connections: supportsMultipleConnections,
|
|
4481
|
+
connected_account_id: connectedAccountId,
|
|
4482
|
+
connection_intent: connectionIntent
|
|
4483
|
+
} });
|
|
4484
|
+
return deserializeConnectedAccount(data);
|
|
4485
|
+
}
|
|
4486
|
+
/**
|
|
4487
|
+
* Delete an organization connected account
|
|
4488
|
+
*
|
|
4489
|
+
* Disconnects the organization's account for the provider, including removing any stored access and refresh tokens. A member will need to reauthorize if the organization wants to reconnect. This does not revoke access on the provider side.
|
|
4490
|
+
* @param options - Additional query options.
|
|
4491
|
+
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier.
|
|
4492
|
+
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4493
|
+
* @param options.slug - The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
|
|
4494
|
+
* @example "github"
|
|
4495
|
+
* @param options.supportsMultipleConnections - Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
|
|
4496
|
+
* @example true
|
|
4497
|
+
* @param options.connectedAccountId - A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
|
|
4498
|
+
* @example "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4499
|
+
* @returns {Promise<void>}
|
|
4500
|
+
* @throws {BadRequestException} 400
|
|
4501
|
+
* @throws {UnauthorizedException} 401
|
|
4502
|
+
* @throws {NotFoundException} 404
|
|
4503
|
+
* @throws {ConflictException} 409
|
|
4504
|
+
*/
|
|
4505
|
+
async deleteOrganizationConnectedAccount(options) {
|
|
4506
|
+
const { organizationId, slug } = options;
|
|
4507
|
+
await this.workos.delete(`/organizations/${encodeURIComponent(organizationId)}/connected_accounts/${encodeURIComponent(slug)}`, {
|
|
4508
|
+
supports_multiple_connections: options.supportsMultipleConnections,
|
|
4509
|
+
connected_account_id: options.connectedAccountId
|
|
4510
|
+
});
|
|
4511
|
+
}
|
|
4512
|
+
/**
|
|
4513
|
+
* List providers for an organization
|
|
4514
|
+
*
|
|
4515
|
+
* Retrieves the organization-owned providers configured for your environment and the organization's [connected account](https://workos.com/docs/reference/pipes/connected-account) information for each. Providers owned by individual users are not included.
|
|
4516
|
+
* @param options - Additional query options.
|
|
4517
|
+
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier to list providers and connected accounts for.
|
|
4518
|
+
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4519
|
+
* @param options.supportsMultipleConnections - Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
|
|
4520
|
+
* @example true
|
|
4521
|
+
* @returns {Promise<DataIntegrationsListResponse>}
|
|
4522
|
+
* @throws {UnauthorizedException} 401
|
|
4523
|
+
* @throws {NotFoundException} 404
|
|
4524
|
+
*/
|
|
4525
|
+
async listOrganizationDataProviders(options) {
|
|
4526
|
+
const { organizationId } = options;
|
|
4527
|
+
const { data } = await this.workos.get(`/organizations/${encodeURIComponent(organizationId)}/data_providers`, { query: { ...options.supportsMultipleConnections !== void 0 && { supports_multiple_connections: options.supportsMultipleConnections } } });
|
|
4528
|
+
return deserializeDataIntegrationsListResponse(data);
|
|
4529
|
+
}
|
|
4530
|
+
/**
|
|
4050
4531
|
* Get a connected account
|
|
4051
4532
|
*
|
|
4052
4533
|
* Retrieves a user's [connected account](https://workos.com/docs/reference/pipes/connected-account) for a specific provider.
|
|
@@ -4057,19 +4538,29 @@ var Pipes = class {
|
|
|
4057
4538
|
* @example "github"
|
|
4058
4539
|
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
|
|
4059
4540
|
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4541
|
+
* @param options.supportsMultipleConnections - Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
|
|
4542
|
+
* @example true
|
|
4543
|
+
* @param options.connectedAccountId - A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
|
|
4544
|
+
* @example "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4060
4545
|
* @returns {Promise<ConnectedAccount>}
|
|
4546
|
+
* @throws {BadRequestException} 400
|
|
4061
4547
|
* @throws {UnauthorizedException} 401
|
|
4062
4548
|
* @throws {NotFoundException} 404
|
|
4549
|
+
* @throws {ConflictException} 409
|
|
4063
4550
|
*/
|
|
4064
4551
|
async getUserConnectedAccount(options) {
|
|
4065
4552
|
const { userId, slug } = options;
|
|
4066
|
-
const { data } = await this.workos.get(`/user_management/users/${encodeURIComponent(userId)}/connected_accounts/${encodeURIComponent(slug)}`, { query: {
|
|
4553
|
+
const { data } = await this.workos.get(`/user_management/users/${encodeURIComponent(userId)}/connected_accounts/${encodeURIComponent(slug)}`, { query: {
|
|
4554
|
+
...options.organizationId !== void 0 && { organization_id: options.organizationId },
|
|
4555
|
+
...options.supportsMultipleConnections !== void 0 && { supports_multiple_connections: options.supportsMultipleConnections },
|
|
4556
|
+
...options.connectedAccountId !== void 0 && { connected_account_id: options.connectedAccountId }
|
|
4557
|
+
} });
|
|
4067
4558
|
return deserializeConnectedAccount(data);
|
|
4068
4559
|
}
|
|
4069
4560
|
/**
|
|
4070
4561
|
* Import a connected account
|
|
4071
4562
|
*
|
|
4072
|
-
* Imports a [connected account](https://workos.com/docs/reference/pipes/connected-account) for a user by providing OAuth tokens directly.
|
|
4563
|
+
* Imports a [connected account](https://workos.com/docs/reference/pipes/connected-account) for a user by providing OAuth tokens directly. Omit `connectionIntent` for compatibility behavior or set it to `add` to explicitly create a connection. Additional connection creation is subject to API availability.
|
|
4073
4564
|
* @param options - The request body.
|
|
4074
4565
|
* @param options.userId - A [User](https://workos.com/docs/reference/authkit/user) identifier.
|
|
4075
4566
|
* @example "user_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
@@ -4095,7 +4586,7 @@ var Pipes = class {
|
|
|
4095
4586
|
*/
|
|
4096
4587
|
async createUserConnectedAccount(options) {
|
|
4097
4588
|
const { userId, slug, organizationId, ...payload } = options;
|
|
4098
|
-
const { data } = await this.workos.post(`/user_management/users/${encodeURIComponent(userId)}/connected_accounts/${encodeURIComponent(slug)}`,
|
|
4589
|
+
const { data } = await this.workos.post(`/user_management/users/${encodeURIComponent(userId)}/connected_accounts/${encodeURIComponent(slug)}`, serializeCreateConnectedAccount(payload), { query: { organization_id: organizationId } });
|
|
4099
4590
|
return deserializeConnectedAccount(data);
|
|
4100
4591
|
}
|
|
4101
4592
|
/**
|
|
@@ -4109,6 +4600,10 @@ var Pipes = class {
|
|
|
4109
4600
|
* @example "github"
|
|
4110
4601
|
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
|
|
4111
4602
|
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4603
|
+
* @param options.supportsMultipleConnections - Accepted for compatibility; does not change update targeting.
|
|
4604
|
+
* @param options.connectedAccountId - A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
|
|
4605
|
+
* @example "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4606
|
+
* @param options.connectionIntent - Set to `reauthorize` with `connectedAccountId`, or omit both to update the compatibility connection.
|
|
4112
4607
|
* @param options.accessToken - The OAuth access token for the connected account.
|
|
4113
4608
|
* @example "gho_16C7e42F292c6912E7710c838347Ae178B4a"
|
|
4114
4609
|
* @param options.refreshToken - The OAuth refresh token for the connected account.
|
|
@@ -4120,18 +4615,26 @@ var Pipes = class {
|
|
|
4120
4615
|
* @param options.state - Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
|
|
4121
4616
|
* @example "connected"
|
|
4122
4617
|
* @returns {Promise<ConnectedAccount>}
|
|
4618
|
+
* @throws {BadRequestException} 400
|
|
4123
4619
|
* @throws {UnauthorizedException} 401
|
|
4124
4620
|
* @throws {NotFoundException} 404
|
|
4621
|
+
* @throws {ConflictException} 409
|
|
4622
|
+
* @throws {UnprocessableEntityException} 422
|
|
4125
4623
|
*/
|
|
4126
4624
|
async updateUserConnectedAccount(options) {
|
|
4127
|
-
const { userId, slug, organizationId, ...payload } = options;
|
|
4128
|
-
const { data } = await this.workos.put(`/user_management/users/${encodeURIComponent(userId)}/connected_accounts/${encodeURIComponent(slug)}`,
|
|
4625
|
+
const { userId, slug, organizationId, supportsMultipleConnections, connectedAccountId, connectionIntent, ...payload } = options;
|
|
4626
|
+
const { data } = await this.workos.put(`/user_management/users/${encodeURIComponent(userId)}/connected_accounts/${encodeURIComponent(slug)}`, serializeConnectedAccountInput(payload), { query: {
|
|
4627
|
+
organization_id: organizationId,
|
|
4628
|
+
supports_multiple_connections: supportsMultipleConnections,
|
|
4629
|
+
connected_account_id: connectedAccountId,
|
|
4630
|
+
connection_intent: connectionIntent
|
|
4631
|
+
} });
|
|
4129
4632
|
return deserializeConnectedAccount(data);
|
|
4130
4633
|
}
|
|
4131
4634
|
/**
|
|
4132
4635
|
* Delete a connected account
|
|
4133
4636
|
*
|
|
4134
|
-
* Disconnects WorkOS's account for the user, including removing any stored access and refresh tokens. The user will need to reauthorize if they want to reconnect.
|
|
4637
|
+
* Disconnects WorkOS's account for the user, including removing any stored access and refresh tokens. The user will need to reauthorize if they want to reconnect. Access is not revoked on the provider side, except for the WorkOS OAuth provider, whose underlying AuthKit grant is revoked.
|
|
4135
4638
|
* @param options - Additional query options.
|
|
4136
4639
|
* @param options.userId - A [User](https://workos.com/docs/reference/authkit/user) identifier.
|
|
4137
4640
|
* @example "user_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
@@ -4139,13 +4642,23 @@ var Pipes = class {
|
|
|
4139
4642
|
* @example "github"
|
|
4140
4643
|
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
|
|
4141
4644
|
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4645
|
+
* @param options.supportsMultipleConnections - Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
|
|
4646
|
+
* @example true
|
|
4647
|
+
* @param options.connectedAccountId - A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
|
|
4648
|
+
* @example "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4142
4649
|
* @returns {Promise<void>}
|
|
4650
|
+
* @throws {BadRequestException} 400
|
|
4143
4651
|
* @throws {UnauthorizedException} 401
|
|
4144
4652
|
* @throws {NotFoundException} 404
|
|
4653
|
+
* @throws {ConflictException} 409
|
|
4145
4654
|
*/
|
|
4146
4655
|
async deleteUserConnectedAccount(options) {
|
|
4147
4656
|
const { userId, slug } = options;
|
|
4148
|
-
await this.workos.delete(`/user_management/users/${encodeURIComponent(userId)}/connected_accounts/${encodeURIComponent(slug)}`, {
|
|
4657
|
+
await this.workos.delete(`/user_management/users/${encodeURIComponent(userId)}/connected_accounts/${encodeURIComponent(slug)}`, {
|
|
4658
|
+
organization_id: options.organizationId,
|
|
4659
|
+
supports_multiple_connections: options.supportsMultipleConnections,
|
|
4660
|
+
connected_account_id: options.connectedAccountId
|
|
4661
|
+
});
|
|
4149
4662
|
}
|
|
4150
4663
|
/**
|
|
4151
4664
|
* List providers for a user
|
|
@@ -4156,13 +4669,18 @@ var Pipes = class {
|
|
|
4156
4669
|
* @example "user_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4157
4670
|
* @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
|
|
4158
4671
|
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
4672
|
+
* @param options.supportsMultipleConnections - Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
|
|
4673
|
+
* @example true
|
|
4159
4674
|
* @returns {Promise<DataIntegrationsListResponse>}
|
|
4160
4675
|
* @throws {UnauthorizedException} 401
|
|
4161
4676
|
* @throws {NotFoundException} 404
|
|
4162
4677
|
*/
|
|
4163
4678
|
async listUserDataProviders(options) {
|
|
4164
4679
|
const { userId } = options;
|
|
4165
|
-
const { data } = await this.workos.get(`/user_management/users/${encodeURIComponent(userId)}/data_providers`, { query: {
|
|
4680
|
+
const { data } = await this.workos.get(`/user_management/users/${encodeURIComponent(userId)}/data_providers`, { query: {
|
|
4681
|
+
...options.organizationId !== void 0 && { organization_id: options.organizationId },
|
|
4682
|
+
...options.supportsMultipleConnections !== void 0 && { supports_multiple_connections: options.supportsMultipleConnections }
|
|
4683
|
+
} });
|
|
4166
4684
|
return deserializeDataIntegrationsListResponse(data);
|
|
4167
4685
|
}
|
|
4168
4686
|
};
|
|
@@ -4384,7 +4902,7 @@ var SSO = class {
|
|
|
4384
4902
|
* @throws {NotFoundException} 404
|
|
4385
4903
|
*/
|
|
4386
4904
|
async deleteConnection(id) {
|
|
4387
|
-
await this.workos.delete(`/connections/${id}`);
|
|
4905
|
+
await this.workos.delete(`/connections/${encodePathParameter(id)}`);
|
|
4388
4906
|
}
|
|
4389
4907
|
getAuthorizationUrl(options) {
|
|
4390
4908
|
const { codeChallenge, codeChallengeMethod, connection, clientId, domainHint, loginHint, organization, provider, providerQueryParams, providerScopes, redirectUri, state } = options;
|
|
@@ -4470,7 +4988,7 @@ var SSO = class {
|
|
|
4470
4988
|
* @throws {NotFoundException} 404
|
|
4471
4989
|
*/
|
|
4472
4990
|
async getConnection(id) {
|
|
4473
|
-
const { data } = await this.workos.get(`/connections/${id}`);
|
|
4991
|
+
const { data } = await this.workos.get(`/connections/${encodePathParameter(id)}`);
|
|
4474
4992
|
return deserializeConnection(data);
|
|
4475
4993
|
}
|
|
4476
4994
|
/**
|
|
@@ -4571,7 +5089,7 @@ var MultiFactorAuth = class {
|
|
|
4571
5089
|
* @throws {NotFoundException} 404
|
|
4572
5090
|
*/
|
|
4573
5091
|
async deleteFactor(id) {
|
|
4574
|
-
await this.workos.delete(`/auth/factors/${id}`);
|
|
5092
|
+
await this.workos.delete(`/auth/factors/${encodePathParameter(id)}`);
|
|
4575
5093
|
}
|
|
4576
5094
|
/**
|
|
4577
5095
|
* Get Factor
|
|
@@ -4586,7 +5104,7 @@ var MultiFactorAuth = class {
|
|
|
4586
5104
|
* @throws {NotFoundException} 404
|
|
4587
5105
|
*/
|
|
4588
5106
|
async getFactor(id) {
|
|
4589
|
-
const { data } = await this.workos.get(`/auth/factors/${id}`);
|
|
5107
|
+
const { data } = await this.workos.get(`/auth/factors/${encodePathParameter(id)}`);
|
|
4590
5108
|
return deserializeFactor(data);
|
|
4591
5109
|
}
|
|
4592
5110
|
/**
|
|
@@ -4623,7 +5141,7 @@ var MultiFactorAuth = class {
|
|
|
4623
5141
|
* @throws {UnprocessableEntityException} 422
|
|
4624
5142
|
*/
|
|
4625
5143
|
async challengeFactor(options) {
|
|
4626
|
-
const { data } = await this.workos.post(`/auth/factors/${options.authenticationFactorId}/challenge`, { sms_template: "smsTemplate" in options ? options.smsTemplate : void 0 });
|
|
5144
|
+
const { data } = await this.workos.post(`/auth/factors/${encodePathParameter(options.authenticationFactorId)}/challenge`, { sms_template: "smsTemplate" in options ? options.smsTemplate : void 0 });
|
|
4627
5145
|
return deserializeChallenge(data);
|
|
4628
5146
|
}
|
|
4629
5147
|
/**
|
|
@@ -4637,7 +5155,7 @@ var MultiFactorAuth = class {
|
|
|
4637
5155
|
* @throws {UnprocessableEntityException} 422
|
|
4638
5156
|
*/
|
|
4639
5157
|
async verifyChallenge(options) {
|
|
4640
|
-
const { data } = await this.workos.post(`/auth/challenges/${options.authenticationChallengeId}/verify`, { code: options.code });
|
|
5158
|
+
const { data } = await this.workos.post(`/auth/challenges/${encodePathParameter(options.authenticationChallengeId)}/verify`, { code: options.code });
|
|
4641
5159
|
return deserializeVerifyResponse(data);
|
|
4642
5160
|
}
|
|
4643
5161
|
/**
|
|
@@ -4649,7 +5167,7 @@ var MultiFactorAuth = class {
|
|
|
4649
5167
|
* @throws {UnprocessableEntityException} 422
|
|
4650
5168
|
*/
|
|
4651
5169
|
async createUserAuthFactor(payload) {
|
|
4652
|
-
const { data } = await this.workos.post(`/user_management/users/${payload.userId}/auth_factors`, serializeEnrollAuthFactorOptions(payload));
|
|
5170
|
+
const { data } = await this.workos.post(`/user_management/users/${encodePathParameter(payload.userId)}/auth_factors`, serializeEnrollAuthFactorOptions(payload));
|
|
4653
5171
|
return {
|
|
4654
5172
|
authenticationFactor: deserializeFactorWithSecrets$1(data.authentication_factor),
|
|
4655
5173
|
authenticationChallenge: deserializeChallenge(data.authentication_challenge)
|
|
@@ -4665,7 +5183,7 @@ var MultiFactorAuth = class {
|
|
|
4665
5183
|
*/
|
|
4666
5184
|
async listUserAuthFactors(options) {
|
|
4667
5185
|
const { userId, ...restOfOptions } = options;
|
|
4668
|
-
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/user_management/users/${userId}/auth_factors`, deserializeFactor$1, restOfOptions), (params) => fetchAndDeserialize(this.workos, `/user_management/users/${userId}/auth_factors`, deserializeFactor$1, params), restOfOptions);
|
|
5186
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/user_management/users/${encodePathParameter(userId)}/auth_factors`, deserializeFactor$1, restOfOptions), (params) => fetchAndDeserialize(this.workos, `/user_management/users/${encodePathParameter(userId)}/auth_factors`, deserializeFactor$1, params), restOfOptions);
|
|
4669
5187
|
}
|
|
4670
5188
|
};
|
|
4671
5189
|
//#endregion
|
|
@@ -4754,6 +5272,12 @@ const deserializeAuditLogSchema = (auditLogSchema) => ({
|
|
|
4754
5272
|
createdAt: auditLogSchema.created_at
|
|
4755
5273
|
});
|
|
4756
5274
|
//#endregion
|
|
5275
|
+
//#region src/audit-logs/serializers/audit-logs-retention.serializer.ts
|
|
5276
|
+
const deserializeAuditLogsRetention = (response) => ({ retentionPeriodInDays: response.retention_period_in_days ?? null });
|
|
5277
|
+
//#endregion
|
|
5278
|
+
//#region src/audit-logs/serializers/update-audit-logs-retention.serializer.ts
|
|
5279
|
+
const serializeUpdateAuditLogsRetention = (model) => ({ retention_period: model.retentionPeriod });
|
|
5280
|
+
//#endregion
|
|
4757
5281
|
//#region src/audit-logs/audit-logs.ts
|
|
4758
5282
|
var AuditLogs = class {
|
|
4759
5283
|
workos;
|
|
@@ -4761,6 +5285,39 @@ var AuditLogs = class {
|
|
|
4761
5285
|
this.workos = workos;
|
|
4762
5286
|
}
|
|
4763
5287
|
/**
|
|
5288
|
+
* Get Retention
|
|
5289
|
+
*
|
|
5290
|
+
* Get the configured event retention period for the given Organization.
|
|
5291
|
+
* @param options - The request options.
|
|
5292
|
+
* @param options.id - Unique identifier of the Organization.
|
|
5293
|
+
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5294
|
+
* @returns {Promise<AuditLogsRetention>}
|
|
5295
|
+
* @throws {NotFoundException} 404
|
|
5296
|
+
*/
|
|
5297
|
+
async getOrganizationAuditLogsRetention(options) {
|
|
5298
|
+
const { id } = options;
|
|
5299
|
+
const { data } = await this.workos.get(`/organizations/${encodeURIComponent(id)}/audit_logs_retention`);
|
|
5300
|
+
return deserializeAuditLogsRetention(data);
|
|
5301
|
+
}
|
|
5302
|
+
/**
|
|
5303
|
+
* Set Retention
|
|
5304
|
+
*
|
|
5305
|
+
* Set the event retention period for the given Organization.
|
|
5306
|
+
* @param options - Object containing retentionPeriod.
|
|
5307
|
+
* @param options.id - Unique identifier of the Organization.
|
|
5308
|
+
* @example "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5309
|
+
* @param options.retentionPeriod - The period Audit Log events will be retained. Valid values are `1_MONTH` through `11_MONTHS` in one-month increments and `1_YEAR` through `10_YEARS` in one-year increments.
|
|
5310
|
+
* @example "1_MONTH"
|
|
5311
|
+
* @returns {Promise<AuditLogsRetention>}
|
|
5312
|
+
* @throws {NotFoundException} 404
|
|
5313
|
+
* @throws {UnprocessableEntityException} 422
|
|
5314
|
+
*/
|
|
5315
|
+
async updateOrganizationAuditLogsRetention(options) {
|
|
5316
|
+
const { id, ...payload } = options;
|
|
5317
|
+
const { data } = await this.workos.put(`/organizations/${encodeURIComponent(id)}/audit_logs_retention`, serializeUpdateAuditLogsRetention(payload));
|
|
5318
|
+
return deserializeAuditLogsRetention(data);
|
|
5319
|
+
}
|
|
5320
|
+
/**
|
|
4764
5321
|
* Create Event
|
|
4765
5322
|
*
|
|
4766
5323
|
* Create an Audit Log Event.
|
|
@@ -4812,7 +5369,7 @@ var AuditLogs = class {
|
|
|
4812
5369
|
* @throws {NotFoundException} 404
|
|
4813
5370
|
*/
|
|
4814
5371
|
async getExport(auditLogExportId) {
|
|
4815
|
-
const { data } = await this.workos.get(`/audit_logs/exports/${auditLogExportId}`);
|
|
5372
|
+
const { data } = await this.workos.get(`/audit_logs/exports/${encodePathParameter(auditLogExportId)}`);
|
|
4816
5373
|
return deserializeAuditLogExport(data);
|
|
4817
5374
|
}
|
|
4818
5375
|
/**
|
|
@@ -4824,11 +5381,11 @@ var AuditLogs = class {
|
|
|
4824
5381
|
* @throws {UnprocessableEntityException} 422
|
|
4825
5382
|
*/
|
|
4826
5383
|
async createSchema(schema, options = {}) {
|
|
4827
|
-
const { data } = await this.workos.post(`/audit_logs/actions/${schema.action}/schemas`, serializeCreateAuditLogSchemaOptions(schema), options);
|
|
5384
|
+
const { data } = await this.workos.post(`/audit_logs/actions/${encodePathParameter(schema.action)}/schemas`, serializeCreateAuditLogSchemaOptions(schema), options);
|
|
4828
5385
|
return deserializeAuditLogSchema(data);
|
|
4829
5386
|
}
|
|
4830
5387
|
async listSchemas(action, options) {
|
|
4831
|
-
const endpoint = `/audit_logs/actions/${action}/schemas`;
|
|
5388
|
+
const endpoint = `/audit_logs/actions/${encodePathParameter(action)}/schemas`;
|
|
4832
5389
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeAuditLogSchema, options), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeAuditLogSchema, params), options);
|
|
4833
5390
|
}
|
|
4834
5391
|
};
|
|
@@ -5407,8 +5964,8 @@ var CookieSession = class {
|
|
|
5407
5964
|
permissions,
|
|
5408
5965
|
entitlements,
|
|
5409
5966
|
featureFlags,
|
|
5410
|
-
user:
|
|
5411
|
-
impersonator:
|
|
5967
|
+
user: authenticationResponse.user,
|
|
5968
|
+
impersonator: authenticationResponse.impersonator
|
|
5412
5969
|
};
|
|
5413
5970
|
} catch (error) {
|
|
5414
5971
|
const terminalReason = classifyTerminalRefreshError(error);
|
|
@@ -5442,8 +5999,9 @@ var CookieSession = class {
|
|
|
5442
5999
|
const { jwtVerify } = await getJose();
|
|
5443
6000
|
const jwks = await this.userManagement.getJWKS();
|
|
5444
6001
|
if (!jwks) throw new Error("Missing client ID. Did you provide it when initializing WorkOS?");
|
|
6002
|
+
const { issuer } = this.userManagement;
|
|
5445
6003
|
try {
|
|
5446
|
-
await jwtVerify(accessToken, jwks);
|
|
6004
|
+
await jwtVerify(accessToken, jwks, issuer ? { issuer } : void 0);
|
|
5447
6005
|
return true;
|
|
5448
6006
|
} catch (e) {
|
|
5449
6007
|
if (e instanceof Error && "code" in e && typeof e.code === "string" && (e.code.startsWith("ERR_JWT_") || e.code.startsWith("ERR_JWS_"))) return false;
|
|
@@ -5513,10 +6071,11 @@ var UserManagement = class {
|
|
|
5513
6071
|
workos;
|
|
5514
6072
|
_jwks;
|
|
5515
6073
|
clientId;
|
|
6074
|
+
issuer;
|
|
5516
6075
|
constructor(workos) {
|
|
5517
6076
|
this.workos = workos;
|
|
5518
|
-
|
|
5519
|
-
this.
|
|
6077
|
+
this.clientId = workos.clientId;
|
|
6078
|
+
this.issuer = workos.options.issuer;
|
|
5520
6079
|
}
|
|
5521
6080
|
/**
|
|
5522
6081
|
* Resolve clientId from method options or fall back to constructor-provided value.
|
|
@@ -5553,7 +6112,7 @@ var UserManagement = class {
|
|
|
5553
6112
|
* @throws {NotFoundException} 404
|
|
5554
6113
|
*/
|
|
5555
6114
|
async getUser(userId) {
|
|
5556
|
-
const { data } = await this.workos.get(`/user_management/users/${userId}`);
|
|
6115
|
+
const { data } = await this.workos.get(`/user_management/users/${encodePathParameter(userId)}`);
|
|
5557
6116
|
return deserializeUser(data);
|
|
5558
6117
|
}
|
|
5559
6118
|
/**
|
|
@@ -5569,7 +6128,7 @@ var UserManagement = class {
|
|
|
5569
6128
|
* @throws {NotFoundException} 404
|
|
5570
6129
|
*/
|
|
5571
6130
|
async getUserByExternalId(externalId) {
|
|
5572
|
-
const { data } = await this.workos.get(`/user_management/users/external_id/${externalId}`);
|
|
6131
|
+
const { data } = await this.workos.get(`/user_management/users/external_id/${encodePathParameter(externalId)}`);
|
|
5573
6132
|
return deserializeUser(data);
|
|
5574
6133
|
}
|
|
5575
6134
|
/**
|
|
@@ -5818,7 +6377,7 @@ var UserManagement = class {
|
|
|
5818
6377
|
const { jwtVerify } = await getJose();
|
|
5819
6378
|
if (!jwks) throw new Error("Must provide clientId to initialize JWKS");
|
|
5820
6379
|
try {
|
|
5821
|
-
await jwtVerify(accessToken, jwks);
|
|
6380
|
+
await jwtVerify(accessToken, jwks, this.issuer ? { issuer: this.issuer } : void 0);
|
|
5822
6381
|
return true;
|
|
5823
6382
|
} catch (e) {
|
|
5824
6383
|
if (e instanceof Error && "code" in e && typeof e.code === "string" && (e.code.startsWith("ERR_JWT_") || e.code.startsWith("ERR_JWS_"))) return false;
|
|
@@ -5863,7 +6422,7 @@ var UserManagement = class {
|
|
|
5863
6422
|
* @throws {NotFoundException} 404
|
|
5864
6423
|
*/
|
|
5865
6424
|
async getEmailVerification(emailVerificationId) {
|
|
5866
|
-
const { data } = await this.workos.get(`/user_management/email_verification/${emailVerificationId}`);
|
|
6425
|
+
const { data } = await this.workos.get(`/user_management/email_verification/${encodePathParameter(emailVerificationId)}`);
|
|
5867
6426
|
return deserializeEmailVerification(data);
|
|
5868
6427
|
}
|
|
5869
6428
|
/**
|
|
@@ -5876,7 +6435,7 @@ var UserManagement = class {
|
|
|
5876
6435
|
* @throws {RateLimitExceededException} 429
|
|
5877
6436
|
*/
|
|
5878
6437
|
async sendVerificationEmail({ userId }) {
|
|
5879
|
-
const { data } = await this.workos.post(`/user_management/users/${userId}/email_verification/send`, {});
|
|
6438
|
+
const { data } = await this.workos.post(`/user_management/users/${encodePathParameter(userId)}/email_verification/send`, {});
|
|
5880
6439
|
return { user: deserializeUser(data.user) };
|
|
5881
6440
|
}
|
|
5882
6441
|
/**
|
|
@@ -5887,7 +6446,7 @@ var UserManagement = class {
|
|
|
5887
6446
|
* @throws {NotFoundException} 404
|
|
5888
6447
|
*/
|
|
5889
6448
|
async getMagicAuth(magicAuthId) {
|
|
5890
|
-
const { data } = await this.workos.get(`/user_management/magic_auth/${magicAuthId}`);
|
|
6449
|
+
const { data } = await this.workos.get(`/user_management/magic_auth/${encodePathParameter(magicAuthId)}`);
|
|
5891
6450
|
return deserializeMagicAuth(data);
|
|
5892
6451
|
}
|
|
5893
6452
|
/**
|
|
@@ -5919,7 +6478,7 @@ var UserManagement = class {
|
|
|
5919
6478
|
* @throws {UnprocessableEntityException} 422
|
|
5920
6479
|
*/
|
|
5921
6480
|
async verifyEmail({ code, userId }) {
|
|
5922
|
-
const { data } = await this.workos.post(`/user_management/users/${userId}/email_verification/confirm`, { code });
|
|
6481
|
+
const { data } = await this.workos.post(`/user_management/users/${encodePathParameter(userId)}/email_verification/confirm`, { code });
|
|
5923
6482
|
return { user: deserializeUser(data.user) };
|
|
5924
6483
|
}
|
|
5925
6484
|
/**
|
|
@@ -5930,7 +6489,7 @@ var UserManagement = class {
|
|
|
5930
6489
|
* @throws {NotFoundException} 404
|
|
5931
6490
|
*/
|
|
5932
6491
|
async getPasswordReset(passwordResetId) {
|
|
5933
|
-
const { data } = await this.workos.get(`/user_management/password_reset/${passwordResetId}`);
|
|
6492
|
+
const { data } = await this.workos.get(`/user_management/password_reset/${encodePathParameter(passwordResetId)}`);
|
|
5934
6493
|
return deserializePasswordReset(data);
|
|
5935
6494
|
}
|
|
5936
6495
|
async createPasswordReset(options) {
|
|
@@ -5964,7 +6523,7 @@ var UserManagement = class {
|
|
|
5964
6523
|
* @throws {UnprocessableEntityException} 422
|
|
5965
6524
|
*/
|
|
5966
6525
|
async updateUser(payload) {
|
|
5967
|
-
const { data } = await this.workos.put(`/user_management/users/${payload.userId}`, serializeUpdateUserOptions(payload));
|
|
6526
|
+
const { data } = await this.workos.put(`/user_management/users/${encodePathParameter(payload.userId)}`, serializeUpdateUserOptions(payload));
|
|
5968
6527
|
return deserializeUser(data);
|
|
5969
6528
|
}
|
|
5970
6529
|
/**
|
|
@@ -5977,7 +6536,7 @@ var UserManagement = class {
|
|
|
5977
6536
|
* @throws {UnprocessableEntityException} 422
|
|
5978
6537
|
*/
|
|
5979
6538
|
async listSessions(userId, options) {
|
|
5980
|
-
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/user_management/users/${userId}/sessions`, deserializeSession, options ? serializeListSessionsOptions(options) : void 0), (params) => fetchAndDeserialize(this.workos, `/user_management/users/${userId}/sessions`, deserializeSession, params), options ? serializeListSessionsOptions(options) : void 0);
|
|
6539
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/user_management/users/${encodePathParameter(userId)}/sessions`, deserializeSession, options ? serializeListSessionsOptions(options) : void 0), (params) => fetchAndDeserialize(this.workos, `/user_management/users/${encodePathParameter(userId)}/sessions`, deserializeSession, params), options ? serializeListSessionsOptions(options) : void 0);
|
|
5981
6540
|
}
|
|
5982
6541
|
/**
|
|
5983
6542
|
* Delete a user
|
|
@@ -5987,7 +6546,7 @@ var UserManagement = class {
|
|
|
5987
6546
|
* @throws {NotFoundException} 404
|
|
5988
6547
|
*/
|
|
5989
6548
|
async deleteUser(userId) {
|
|
5990
|
-
await this.workos.delete(`/user_management/users/${userId}`);
|
|
6549
|
+
await this.workos.delete(`/user_management/users/${encodePathParameter(userId)}`);
|
|
5991
6550
|
}
|
|
5992
6551
|
/**
|
|
5993
6552
|
* List API keys for a user
|
|
@@ -6000,7 +6559,7 @@ var UserManagement = class {
|
|
|
6000
6559
|
*/
|
|
6001
6560
|
async listUserApiKeys(userId, options) {
|
|
6002
6561
|
const serializedOptions = options ? serializeListUserApiKeysOptions(options) : void 0;
|
|
6003
|
-
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/user_management/users/${userId}/api_keys`, deserializeUserApiKey, serializedOptions), (params) => fetchAndDeserialize(this.workos, `/user_management/users/${userId}/api_keys`, deserializeUserApiKey, params), serializedOptions);
|
|
6562
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/user_management/users/${encodePathParameter(userId)}/api_keys`, deserializeUserApiKey, serializedOptions), (params) => fetchAndDeserialize(this.workos, `/user_management/users/${encodePathParameter(userId)}/api_keys`, deserializeUserApiKey, params), serializedOptions);
|
|
6004
6563
|
}
|
|
6005
6564
|
/**
|
|
6006
6565
|
* Create an API key for a user
|
|
@@ -6014,7 +6573,7 @@ var UserManagement = class {
|
|
|
6014
6573
|
* @throws {UnprocessableEntityException} 422
|
|
6015
6574
|
*/
|
|
6016
6575
|
async createUserApiKey(userId, options, requestOptions = {}) {
|
|
6017
|
-
const { data } = await this.workos.post(`/user_management/users/${userId}/api_keys`, serializeCreateUserApiKeyOptions(options), requestOptions);
|
|
6576
|
+
const { data } = await this.workos.post(`/user_management/users/${encodePathParameter(userId)}/api_keys`, serializeCreateUserApiKeyOptions(options), requestOptions);
|
|
6018
6577
|
return deserializeUserApiKeyWithValue(data);
|
|
6019
6578
|
}
|
|
6020
6579
|
/**
|
|
@@ -6026,7 +6585,7 @@ var UserManagement = class {
|
|
|
6026
6585
|
*/
|
|
6027
6586
|
async getUserIdentities(userId) {
|
|
6028
6587
|
if (!userId) throw new TypeError(`Incomplete arguments. Need to specify 'userId'.`);
|
|
6029
|
-
const { data } = await this.workos.get(`/user_management/users/${userId}/identities`);
|
|
6588
|
+
const { data } = await this.workos.get(`/user_management/users/${encodePathParameter(userId)}/identities`);
|
|
6030
6589
|
return deserializeIdentities(data);
|
|
6031
6590
|
}
|
|
6032
6591
|
/**
|
|
@@ -6037,7 +6596,7 @@ var UserManagement = class {
|
|
|
6037
6596
|
* @throws {NotFoundException} 404
|
|
6038
6597
|
*/
|
|
6039
6598
|
async getOrganizationMembership(organizationMembershipId) {
|
|
6040
|
-
const { data } = await this.workos.get(`/user_management/organization_memberships/${organizationMembershipId}`);
|
|
6599
|
+
const { data } = await this.workos.get(`/user_management/organization_memberships/${encodePathParameter(organizationMembershipId)}`);
|
|
6041
6600
|
return deserializeOrganizationMembership(data);
|
|
6042
6601
|
}
|
|
6043
6602
|
/**
|
|
@@ -6080,7 +6639,7 @@ var UserManagement = class {
|
|
|
6080
6639
|
* @throws {UnprocessableEntityException} 422
|
|
6081
6640
|
*/
|
|
6082
6641
|
async updateOrganizationMembership(organizationMembershipId, options) {
|
|
6083
|
-
const { data } = await this.workos.put(`/user_management/organization_memberships/${organizationMembershipId}`, serializeUpdateOrganizationMembershipOptions(options));
|
|
6642
|
+
const { data } = await this.workos.put(`/user_management/organization_memberships/${encodePathParameter(organizationMembershipId)}`, serializeUpdateOrganizationMembershipOptions(options));
|
|
6084
6643
|
return deserializeOrganizationMembership(data);
|
|
6085
6644
|
}
|
|
6086
6645
|
/**
|
|
@@ -6091,7 +6650,7 @@ var UserManagement = class {
|
|
|
6091
6650
|
* @throws {NotFoundException} 404
|
|
6092
6651
|
*/
|
|
6093
6652
|
async deleteOrganizationMembership(organizationMembershipId) {
|
|
6094
|
-
await this.workos.delete(`/user_management/organization_memberships/${organizationMembershipId}`);
|
|
6653
|
+
await this.workos.delete(`/user_management/organization_memberships/${encodePathParameter(organizationMembershipId)}`);
|
|
6095
6654
|
}
|
|
6096
6655
|
/**
|
|
6097
6656
|
* Deactivate an organization membership
|
|
@@ -6108,7 +6667,7 @@ var UserManagement = class {
|
|
|
6108
6667
|
* @throws {UnprocessableEntityException} 422
|
|
6109
6668
|
*/
|
|
6110
6669
|
async deactivateOrganizationMembership(organizationMembershipId) {
|
|
6111
|
-
const { data } = await this.workos.put(`/user_management/organization_memberships/${organizationMembershipId}/deactivate`, {});
|
|
6670
|
+
const { data } = await this.workos.put(`/user_management/organization_memberships/${encodePathParameter(organizationMembershipId)}/deactivate`, {});
|
|
6112
6671
|
return deserializeOrganizationMembership(data);
|
|
6113
6672
|
}
|
|
6114
6673
|
/**
|
|
@@ -6126,16 +6685,16 @@ var UserManagement = class {
|
|
|
6126
6685
|
* @throws {UnprocessableEntityException} 422
|
|
6127
6686
|
*/
|
|
6128
6687
|
async reactivateOrganizationMembership(organizationMembershipId) {
|
|
6129
|
-
const { data } = await this.workos.put(`/user_management/organization_memberships/${organizationMembershipId}/reactivate`, {});
|
|
6688
|
+
const { data } = await this.workos.put(`/user_management/organization_memberships/${encodePathParameter(organizationMembershipId)}/reactivate`, {});
|
|
6130
6689
|
return deserializeOrganizationMembership(data);
|
|
6131
6690
|
}
|
|
6132
6691
|
async listGroupsForOrganizationMembership(options) {
|
|
6133
6692
|
const { organizationMembershipId, ...paginationOptions } = options;
|
|
6134
|
-
const endpoint = `/user_management/organization_memberships/${organizationMembershipId}/groups`;
|
|
6693
|
+
const endpoint = `/user_management/organization_memberships/${encodePathParameter(organizationMembershipId)}/groups`;
|
|
6135
6694
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeGroup, paginationOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeGroup, params), paginationOptions);
|
|
6136
6695
|
}
|
|
6137
6696
|
async getInvitation(invitationId) {
|
|
6138
|
-
const { data } = await this.workos.get(`/user_management/invitations/${invitationId}`);
|
|
6697
|
+
const { data } = await this.workos.get(`/user_management/invitations/${encodePathParameter(invitationId)}`);
|
|
6139
6698
|
return deserializeInvitation(data);
|
|
6140
6699
|
}
|
|
6141
6700
|
/**
|
|
@@ -6146,7 +6705,7 @@ var UserManagement = class {
|
|
|
6146
6705
|
* @throws {NotFoundException} 404
|
|
6147
6706
|
*/
|
|
6148
6707
|
async findInvitationByToken(invitationToken) {
|
|
6149
|
-
const { data } = await this.workos.get(`/user_management/invitations/by_token/${invitationToken}`);
|
|
6708
|
+
const { data } = await this.workos.get(`/user_management/invitations/by_token/${encodePathParameter(invitationToken)}`);
|
|
6150
6709
|
return deserializeInvitation(data);
|
|
6151
6710
|
}
|
|
6152
6711
|
/**
|
|
@@ -6183,7 +6742,7 @@ var UserManagement = class {
|
|
|
6183
6742
|
* @throws {NotFoundException} 404
|
|
6184
6743
|
*/
|
|
6185
6744
|
async acceptInvitation(invitationId) {
|
|
6186
|
-
const { data } = await this.workos.post(`/user_management/invitations/${invitationId}/accept`, null);
|
|
6745
|
+
const { data } = await this.workos.post(`/user_management/invitations/${encodePathParameter(invitationId)}/accept`, null);
|
|
6187
6746
|
return deserializeInvitation(data);
|
|
6188
6747
|
}
|
|
6189
6748
|
/**
|
|
@@ -6194,7 +6753,7 @@ var UserManagement = class {
|
|
|
6194
6753
|
* @throws {BadRequestException} 400
|
|
6195
6754
|
*/
|
|
6196
6755
|
async revokeInvitation(invitationId) {
|
|
6197
|
-
const { data } = await this.workos.post(`/user_management/invitations/${invitationId}/revoke`, null);
|
|
6756
|
+
const { data } = await this.workos.post(`/user_management/invitations/${encodePathParameter(invitationId)}/revoke`, null);
|
|
6198
6757
|
return deserializeInvitation(data);
|
|
6199
6758
|
}
|
|
6200
6759
|
/**
|
|
@@ -6208,7 +6767,7 @@ var UserManagement = class {
|
|
|
6208
6767
|
* @throws {UnprocessableEntityException} 422
|
|
6209
6768
|
*/
|
|
6210
6769
|
async resendInvitation(invitationId, options) {
|
|
6211
|
-
const { data } = await this.workos.post(`/user_management/invitations/${invitationId}/resend`, options ? serializeResendInvitationOptions(options) : {});
|
|
6770
|
+
const { data } = await this.workos.post(`/user_management/invitations/${encodePathParameter(invitationId)}/resend`, options ? serializeResendInvitationOptions(options) : {});
|
|
6212
6771
|
return deserializeInvitation(data);
|
|
6213
6772
|
}
|
|
6214
6773
|
/**
|
|
@@ -6231,7 +6790,7 @@ var UserManagement = class {
|
|
|
6231
6790
|
* @throws {NotFoundException} 404
|
|
6232
6791
|
*/
|
|
6233
6792
|
async getWaitlist(waitlistId) {
|
|
6234
|
-
const { data } = await this.workos.get(`/user_management/waitlists/${waitlistId}`);
|
|
6793
|
+
const { data } = await this.workos.get(`/user_management/waitlists/${encodePathParameter(waitlistId)}`);
|
|
6235
6794
|
return deserializeWaitlist(data);
|
|
6236
6795
|
}
|
|
6237
6796
|
/**
|
|
@@ -6247,7 +6806,7 @@ var UserManagement = class {
|
|
|
6247
6806
|
* @throws {UnprocessableEntityException} 422
|
|
6248
6807
|
*/
|
|
6249
6808
|
async listWaitlistEntries(waitlistId, options) {
|
|
6250
|
-
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/user_management/waitlists/${waitlistId}/entries`, deserializeWaitlistEntry, options ? serializeListWaitlistEntriesOptions(options) : void 0), (params) => fetchAndDeserialize(this.workos, `/user_management/waitlists/${waitlistId}/entries`, deserializeWaitlistEntry, params), options ? serializeListWaitlistEntriesOptions(options) : void 0);
|
|
6809
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/user_management/waitlists/${encodePathParameter(waitlistId)}/entries`, deserializeWaitlistEntry, options ? serializeListWaitlistEntriesOptions(options) : void 0), (params) => fetchAndDeserialize(this.workos, `/user_management/waitlists/${encodePathParameter(waitlistId)}/entries`, deserializeWaitlistEntry, params), options ? serializeListWaitlistEntriesOptions(options) : void 0);
|
|
6251
6810
|
}
|
|
6252
6811
|
/**
|
|
6253
6812
|
* Create a waitlist entry
|
|
@@ -6263,7 +6822,7 @@ var UserManagement = class {
|
|
|
6263
6822
|
* @throws {UnprocessableEntityException} 422
|
|
6264
6823
|
*/
|
|
6265
6824
|
async createWaitlistEntry(waitlistId, payload) {
|
|
6266
|
-
const { data } = await this.workos.post(`/user_management/waitlists/${waitlistId}/entries`, serializeCreateWaitlistEntryOptions(payload));
|
|
6825
|
+
const { data } = await this.workos.post(`/user_management/waitlists/${encodePathParameter(waitlistId)}/entries`, serializeCreateWaitlistEntryOptions(payload));
|
|
6267
6826
|
return deserializeWaitlistEntry(data);
|
|
6268
6827
|
}
|
|
6269
6828
|
/**
|
|
@@ -6276,7 +6835,7 @@ var UserManagement = class {
|
|
|
6276
6835
|
* @throws {UnprocessableEntityException} 422
|
|
6277
6836
|
*/
|
|
6278
6837
|
async approveWaitlistEntry(waitlistEntryId) {
|
|
6279
|
-
const { data } = await this.workos.post(`/user_management/waitlist_entries/${waitlistEntryId}/approve`, null);
|
|
6838
|
+
const { data } = await this.workos.post(`/user_management/waitlist_entries/${encodePathParameter(waitlistEntryId)}/approve`, null);
|
|
6280
6839
|
return deserializeWaitlistEntry(data);
|
|
6281
6840
|
}
|
|
6282
6841
|
/**
|
|
@@ -6288,7 +6847,7 @@ var UserManagement = class {
|
|
|
6288
6847
|
* @throws {UnprocessableEntityException} 422
|
|
6289
6848
|
*/
|
|
6290
6849
|
async denyWaitlistEntry(waitlistEntryId) {
|
|
6291
|
-
const { data } = await this.workos.post(`/user_management/waitlist_entries/${waitlistEntryId}/deny`, null);
|
|
6850
|
+
const { data } = await this.workos.post(`/user_management/waitlist_entries/${encodePathParameter(waitlistEntryId)}/deny`, null);
|
|
6292
6851
|
return deserializeWaitlistEntry(data);
|
|
6293
6852
|
}
|
|
6294
6853
|
/**
|
|
@@ -6301,7 +6860,7 @@ var UserManagement = class {
|
|
|
6301
6860
|
* @throws {NotFoundException} 404
|
|
6302
6861
|
*/
|
|
6303
6862
|
async deleteWaitlistEntry(waitlistEntryId) {
|
|
6304
|
-
await this.workos.delete(`/user_management/waitlist_entries/${waitlistEntryId}`);
|
|
6863
|
+
await this.workos.delete(`/user_management/waitlist_entries/${encodePathParameter(waitlistEntryId)}`);
|
|
6305
6864
|
}
|
|
6306
6865
|
/**
|
|
6307
6866
|
* Revoke Session
|
|
@@ -6844,7 +7403,7 @@ var FeatureFlags = class {
|
|
|
6844
7403
|
* @throws {NotFoundException} 404
|
|
6845
7404
|
*/
|
|
6846
7405
|
async getFeatureFlag(slug) {
|
|
6847
|
-
const { data } = await this.workos.get(`/feature-flags/${slug}`);
|
|
7406
|
+
const { data } = await this.workos.get(`/feature-flags/${encodePathParameter(slug)}`);
|
|
6848
7407
|
return deserializeFeatureFlag(data);
|
|
6849
7408
|
}
|
|
6850
7409
|
/**
|
|
@@ -6860,7 +7419,7 @@ var FeatureFlags = class {
|
|
|
6860
7419
|
* @throws {NotFoundException} 404
|
|
6861
7420
|
*/
|
|
6862
7421
|
async enableFeatureFlag(slug) {
|
|
6863
|
-
const { data } = await this.workos.put(`/feature-flags/${slug}/enable`, {});
|
|
7422
|
+
const { data } = await this.workos.put(`/feature-flags/${encodePathParameter(slug)}/enable`, {});
|
|
6864
7423
|
return deserializeFeatureFlag(data);
|
|
6865
7424
|
}
|
|
6866
7425
|
/**
|
|
@@ -6876,7 +7435,7 @@ var FeatureFlags = class {
|
|
|
6876
7435
|
* @throws {NotFoundException} 404
|
|
6877
7436
|
*/
|
|
6878
7437
|
async disableFeatureFlag(slug) {
|
|
6879
|
-
const { data } = await this.workos.put(`/feature-flags/${slug}/disable`, {});
|
|
7438
|
+
const { data } = await this.workos.put(`/feature-flags/${encodePathParameter(slug)}/disable`, {});
|
|
6880
7439
|
return deserializeFeatureFlag(data);
|
|
6881
7440
|
}
|
|
6882
7441
|
/**
|
|
@@ -6891,7 +7450,7 @@ var FeatureFlags = class {
|
|
|
6891
7450
|
*/
|
|
6892
7451
|
async addFlagTarget(options) {
|
|
6893
7452
|
const { slug, targetId } = options;
|
|
6894
|
-
await this.workos.post(`/feature-flags/${slug}/targets/${targetId}`, {});
|
|
7453
|
+
await this.workos.post(`/feature-flags/${encodePathParameter(slug)}/targets/${encodePathParameter(targetId)}`, {});
|
|
6895
7454
|
}
|
|
6896
7455
|
/**
|
|
6897
7456
|
* Remove a feature flag target
|
|
@@ -6905,7 +7464,7 @@ var FeatureFlags = class {
|
|
|
6905
7464
|
*/
|
|
6906
7465
|
async removeFlagTarget(options) {
|
|
6907
7466
|
const { slug, targetId } = options;
|
|
6908
|
-
await this.workos.delete(`/feature-flags/${slug}/targets/${targetId}`);
|
|
7467
|
+
await this.workos.delete(`/feature-flags/${encodePathParameter(slug)}/targets/${encodePathParameter(targetId)}`);
|
|
6909
7468
|
}
|
|
6910
7469
|
/**
|
|
6911
7470
|
* List enabled feature flags for an organization
|
|
@@ -6917,7 +7476,7 @@ var FeatureFlags = class {
|
|
|
6917
7476
|
*/
|
|
6918
7477
|
async listOrganizationFeatureFlags(options) {
|
|
6919
7478
|
const { organizationId, ...paginationOptions } = options;
|
|
6920
|
-
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/organizations/${organizationId}/feature-flags`, deserializeFeatureFlag, paginationOptions), (params) => fetchAndDeserialize(this.workos, `/organizations/${organizationId}/feature-flags`, deserializeFeatureFlag, params), paginationOptions);
|
|
7479
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/organizations/${encodePathParameter(organizationId)}/feature-flags`, deserializeFeatureFlag, paginationOptions), (params) => fetchAndDeserialize(this.workos, `/organizations/${encodePathParameter(organizationId)}/feature-flags`, deserializeFeatureFlag, params), paginationOptions);
|
|
6921
7480
|
}
|
|
6922
7481
|
/**
|
|
6923
7482
|
* List enabled feature flags for a user
|
|
@@ -6928,7 +7487,7 @@ var FeatureFlags = class {
|
|
|
6928
7487
|
*/
|
|
6929
7488
|
async listUserFeatureFlags(options) {
|
|
6930
7489
|
const { userId, ...paginationOptions } = options;
|
|
6931
|
-
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/user_management/users/${userId}/feature-flags`, deserializeFeatureFlag, paginationOptions), (params) => fetchAndDeserialize(this.workos, `/user_management/users/${userId}/feature-flags`, deserializeFeatureFlag, params), paginationOptions);
|
|
7490
|
+
return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/user_management/users/${encodePathParameter(userId)}/feature-flags`, deserializeFeatureFlag, paginationOptions), (params) => fetchAndDeserialize(this.workos, `/user_management/users/${encodePathParameter(userId)}/feature-flags`, deserializeFeatureFlag, params), paginationOptions);
|
|
6932
7491
|
}
|
|
6933
7492
|
createRuntimeClient(options) {
|
|
6934
7493
|
return new FeatureFlagsRuntimeClient(this.workos, options);
|
|
@@ -7417,7 +7976,7 @@ var Authorization = class {
|
|
|
7417
7976
|
* @throws {NotFoundException} 404
|
|
7418
7977
|
*/
|
|
7419
7978
|
async getEnvironmentRole(slug) {
|
|
7420
|
-
const { data } = await this.workos.get(`/authorization/roles/${slug}`);
|
|
7979
|
+
const { data } = await this.workos.get(`/authorization/roles/${encodePathParameter(slug)}`);
|
|
7421
7980
|
return deserializeEnvironmentRole(data);
|
|
7422
7981
|
}
|
|
7423
7982
|
/**
|
|
@@ -7437,7 +7996,7 @@ var Authorization = class {
|
|
|
7437
7996
|
* @throws {UnprocessableEntityException} 422
|
|
7438
7997
|
*/
|
|
7439
7998
|
async updateEnvironmentRole(slug, options) {
|
|
7440
|
-
const { data } = await this.workos.patch(`/authorization/roles/${slug}`, serializeUpdateEnvironmentRoleOptions(options));
|
|
7999
|
+
const { data } = await this.workos.patch(`/authorization/roles/${encodePathParameter(slug)}`, serializeUpdateEnvironmentRoleOptions(options));
|
|
7441
8000
|
return deserializeEnvironmentRole(data);
|
|
7442
8001
|
}
|
|
7443
8002
|
/**
|
|
@@ -7457,7 +8016,7 @@ var Authorization = class {
|
|
|
7457
8016
|
* @throws {UnprocessableEntityException} 422
|
|
7458
8017
|
*/
|
|
7459
8018
|
async setEnvironmentRolePermissions(slug, options) {
|
|
7460
|
-
const { data } = await this.workos.put(`/authorization/roles/${slug}/permissions`, { permissions: options.permissions });
|
|
8019
|
+
const { data } = await this.workos.put(`/authorization/roles/${encodePathParameter(slug)}/permissions`, { permissions: options.permissions });
|
|
7461
8020
|
return deserializeEnvironmentRole(data);
|
|
7462
8021
|
}
|
|
7463
8022
|
/**
|
|
@@ -7477,7 +8036,7 @@ var Authorization = class {
|
|
|
7477
8036
|
* @throws {UnprocessableEntityException} 422
|
|
7478
8037
|
*/
|
|
7479
8038
|
async addEnvironmentRolePermission(slug, options) {
|
|
7480
|
-
const { data } = await this.workos.post(`/authorization/roles/${slug}/permissions`, { slug: options.permissionSlug });
|
|
8039
|
+
const { data } = await this.workos.post(`/authorization/roles/${encodePathParameter(slug)}/permissions`, { slug: options.permissionSlug });
|
|
7481
8040
|
return deserializeEnvironmentRole(data);
|
|
7482
8041
|
}
|
|
7483
8042
|
/**
|
|
@@ -7498,7 +8057,7 @@ var Authorization = class {
|
|
|
7498
8057
|
* @throws {UnprocessableEntityException} 422
|
|
7499
8058
|
*/
|
|
7500
8059
|
async createOrganizationRole(organizationId, options) {
|
|
7501
|
-
const { data } = await this.workos.post(`/authorization/organizations/${organizationId}/roles`, serializeCreateOrganizationRoleOptions(options));
|
|
8060
|
+
const { data } = await this.workos.post(`/authorization/organizations/${encodePathParameter(organizationId)}/roles`, serializeCreateOrganizationRoleOptions(options));
|
|
7502
8061
|
return deserializeOrganizationRole(data);
|
|
7503
8062
|
}
|
|
7504
8063
|
/**
|
|
@@ -7515,7 +8074,7 @@ var Authorization = class {
|
|
|
7515
8074
|
* @throws {NotFoundException} 404
|
|
7516
8075
|
*/
|
|
7517
8076
|
async listOrganizationRoles(organizationId) {
|
|
7518
|
-
const { data } = await this.workos.get(`/authorization/organizations/${organizationId}/roles`);
|
|
8077
|
+
const { data } = await this.workos.get(`/authorization/organizations/${encodePathParameter(organizationId)}/roles`);
|
|
7519
8078
|
return {
|
|
7520
8079
|
object: "list",
|
|
7521
8080
|
data: data.data.map(deserializeRole)
|
|
@@ -7540,7 +8099,7 @@ var Authorization = class {
|
|
|
7540
8099
|
* @throws {NotFoundException} 404
|
|
7541
8100
|
*/
|
|
7542
8101
|
async getOrganizationRole(organizationId, slug) {
|
|
7543
|
-
const { data } = await this.workos.get(`/authorization/organizations/${organizationId}/roles/${slug}`);
|
|
8102
|
+
const { data } = await this.workos.get(`/authorization/organizations/${encodePathParameter(organizationId)}/roles/${encodePathParameter(slug)}`);
|
|
7544
8103
|
return deserializeRole(data);
|
|
7545
8104
|
}
|
|
7546
8105
|
/**
|
|
@@ -7565,7 +8124,7 @@ var Authorization = class {
|
|
|
7565
8124
|
* @throws {UnprocessableEntityException} 422
|
|
7566
8125
|
*/
|
|
7567
8126
|
async updateOrganizationRole(organizationId, slug, options) {
|
|
7568
|
-
const { data } = await this.workos.patch(`/authorization/organizations/${organizationId}/roles/${slug}`, serializeUpdateOrganizationRoleOptions(options));
|
|
8127
|
+
const { data } = await this.workos.patch(`/authorization/organizations/${encodePathParameter(organizationId)}/roles/${encodePathParameter(slug)}`, serializeUpdateOrganizationRoleOptions(options));
|
|
7569
8128
|
return deserializeOrganizationRole(data);
|
|
7570
8129
|
}
|
|
7571
8130
|
/**
|
|
@@ -7589,7 +8148,7 @@ var Authorization = class {
|
|
|
7589
8148
|
* @throws {ConflictException} 409
|
|
7590
8149
|
*/
|
|
7591
8150
|
async deleteOrganizationRole(organizationId, slug) {
|
|
7592
|
-
await this.workos.delete(`/authorization/organizations/${organizationId}/roles/${slug}`);
|
|
8151
|
+
await this.workos.delete(`/authorization/organizations/${encodePathParameter(organizationId)}/roles/${encodePathParameter(slug)}`);
|
|
7593
8152
|
}
|
|
7594
8153
|
/**
|
|
7595
8154
|
* Set permissions for a custom role
|
|
@@ -7612,7 +8171,7 @@ var Authorization = class {
|
|
|
7612
8171
|
* @throws {UnprocessableEntityException} 422
|
|
7613
8172
|
*/
|
|
7614
8173
|
async setOrganizationRolePermissions(organizationId, slug, options) {
|
|
7615
|
-
const { data } = await this.workos.put(`/authorization/organizations/${organizationId}/roles/${slug}/permissions`, { permissions: options.permissions });
|
|
8174
|
+
const { data } = await this.workos.put(`/authorization/organizations/${encodePathParameter(organizationId)}/roles/${encodePathParameter(slug)}/permissions`, { permissions: options.permissions });
|
|
7616
8175
|
return deserializeOrganizationRole(data);
|
|
7617
8176
|
}
|
|
7618
8177
|
/**
|
|
@@ -7637,7 +8196,7 @@ var Authorization = class {
|
|
|
7637
8196
|
* @throws {UnprocessableEntityException} 422
|
|
7638
8197
|
*/
|
|
7639
8198
|
async addOrganizationRolePermission(organizationId, slug, options) {
|
|
7640
|
-
const { data } = await this.workos.post(`/authorization/organizations/${organizationId}/roles/${slug}/permissions`, { slug: options.permissionSlug });
|
|
8199
|
+
const { data } = await this.workos.post(`/authorization/organizations/${encodePathParameter(organizationId)}/roles/${encodePathParameter(slug)}/permissions`, { slug: options.permissionSlug });
|
|
7641
8200
|
return deserializeOrganizationRole(data);
|
|
7642
8201
|
}
|
|
7643
8202
|
/**
|
|
@@ -7664,7 +8223,7 @@ var Authorization = class {
|
|
|
7664
8223
|
* @throws {NotFoundException} 404
|
|
7665
8224
|
*/
|
|
7666
8225
|
async removeOrganizationRolePermission(organizationId, slug, options) {
|
|
7667
|
-
await this.workos.delete(`/authorization/organizations/${organizationId}/roles/${slug}/permissions/${options.permissionSlug}`);
|
|
8226
|
+
await this.workos.delete(`/authorization/organizations/${encodePathParameter(organizationId)}/roles/${encodePathParameter(slug)}/permissions/${encodePathParameter(options.permissionSlug)}`);
|
|
7668
8227
|
}
|
|
7669
8228
|
/**
|
|
7670
8229
|
* Create a permission
|
|
@@ -7705,7 +8264,7 @@ var Authorization = class {
|
|
|
7705
8264
|
* @throws {NotFoundException} 404
|
|
7706
8265
|
*/
|
|
7707
8266
|
async getPermission(slug) {
|
|
7708
|
-
const { data } = await this.workos.get(`/authorization/permissions/${slug}`);
|
|
8267
|
+
const { data } = await this.workos.get(`/authorization/permissions/${encodePathParameter(slug)}`);
|
|
7709
8268
|
return deserializePermission(data);
|
|
7710
8269
|
}
|
|
7711
8270
|
/**
|
|
@@ -7724,7 +8283,7 @@ var Authorization = class {
|
|
|
7724
8283
|
* @throws {UnprocessableEntityException} 422
|
|
7725
8284
|
*/
|
|
7726
8285
|
async updatePermission(slug, options) {
|
|
7727
|
-
const { data } = await this.workos.patch(`/authorization/permissions/${slug}`, serializeUpdatePermissionOptions(options));
|
|
8286
|
+
const { data } = await this.workos.patch(`/authorization/permissions/${encodePathParameter(slug)}`, serializeUpdatePermissionOptions(options));
|
|
7728
8287
|
return deserializePermission(data);
|
|
7729
8288
|
}
|
|
7730
8289
|
/**
|
|
@@ -7741,7 +8300,7 @@ var Authorization = class {
|
|
|
7741
8300
|
* @throws {NotFoundException} 404
|
|
7742
8301
|
*/
|
|
7743
8302
|
async deletePermission(slug) {
|
|
7744
|
-
await this.workos.delete(`/authorization/permissions/${slug}`);
|
|
8303
|
+
await this.workos.delete(`/authorization/permissions/${encodePathParameter(slug)}`);
|
|
7745
8304
|
}
|
|
7746
8305
|
/**
|
|
7747
8306
|
* Get a resource
|
|
@@ -7758,7 +8317,7 @@ var Authorization = class {
|
|
|
7758
8317
|
* @throws {UnprocessableEntityException} 422
|
|
7759
8318
|
*/
|
|
7760
8319
|
async getResource(resourceId) {
|
|
7761
|
-
const { data } = await this.workos.get(`/authorization/resources/${resourceId}`);
|
|
8320
|
+
const { data } = await this.workos.get(`/authorization/resources/${encodePathParameter(resourceId)}`);
|
|
7762
8321
|
return deserializeAuthorizationResource(data);
|
|
7763
8322
|
}
|
|
7764
8323
|
/**
|
|
@@ -7790,7 +8349,7 @@ var Authorization = class {
|
|
|
7790
8349
|
* @throws {UnprocessableEntityException} 422
|
|
7791
8350
|
*/
|
|
7792
8351
|
async updateResource(options) {
|
|
7793
|
-
const { data } = await this.workos.patch(`/authorization/resources/${options.resourceId}`, serializeUpdateResourceOptions(options));
|
|
8352
|
+
const { data } = await this.workos.patch(`/authorization/resources/${encodePathParameter(options.resourceId)}`, serializeUpdateResourceOptions(options));
|
|
7794
8353
|
return deserializeAuthorizationResource(data);
|
|
7795
8354
|
}
|
|
7796
8355
|
/**
|
|
@@ -7809,7 +8368,7 @@ var Authorization = class {
|
|
|
7809
8368
|
async deleteResource(options) {
|
|
7810
8369
|
const { resourceId, cascadeDelete } = options;
|
|
7811
8370
|
const query = cascadeDelete !== void 0 ? { cascade_delete: cascadeDelete.toString() } : void 0;
|
|
7812
|
-
await this.workos.delete(`/authorization/resources/${resourceId}`, query);
|
|
8371
|
+
await this.workos.delete(`/authorization/resources/${encodePathParameter(resourceId)}`, query);
|
|
7813
8372
|
}
|
|
7814
8373
|
/**
|
|
7815
8374
|
* List resources
|
|
@@ -7849,7 +8408,7 @@ var Authorization = class {
|
|
|
7849
8408
|
*/
|
|
7850
8409
|
async getResourceByExternalId(options) {
|
|
7851
8410
|
const { organizationId, resourceTypeSlug, externalId } = options;
|
|
7852
|
-
const { data } = await this.workos.get(`/authorization/organizations/${organizationId}/resources/${resourceTypeSlug}/${externalId}`);
|
|
8411
|
+
const { data } = await this.workos.get(`/authorization/organizations/${encodePathParameter(organizationId)}/resources/${encodePathParameter(resourceTypeSlug)}/${encodePathParameter(externalId)}`);
|
|
7853
8412
|
return deserializeAuthorizationResource(data);
|
|
7854
8413
|
}
|
|
7855
8414
|
/**
|
|
@@ -7881,7 +8440,7 @@ var Authorization = class {
|
|
|
7881
8440
|
*/
|
|
7882
8441
|
async updateResourceByExternalId(options) {
|
|
7883
8442
|
const { organizationId, resourceTypeSlug, externalId } = options;
|
|
7884
|
-
const { data } = await this.workos.patch(`/authorization/organizations/${organizationId}/resources/${resourceTypeSlug}/${externalId}`, serializeUpdateResourceByExternalIdOptions(options));
|
|
8443
|
+
const { data } = await this.workos.patch(`/authorization/organizations/${encodePathParameter(organizationId)}/resources/${encodePathParameter(resourceTypeSlug)}/${encodePathParameter(externalId)}`, serializeUpdateResourceByExternalIdOptions(options));
|
|
7885
8444
|
return deserializeAuthorizationResource(data);
|
|
7886
8445
|
}
|
|
7887
8446
|
/**
|
|
@@ -7913,7 +8472,7 @@ var Authorization = class {
|
|
|
7913
8472
|
async deleteResourceByExternalId(options) {
|
|
7914
8473
|
const { organizationId, resourceTypeSlug, externalId, cascadeDelete } = options;
|
|
7915
8474
|
const query = cascadeDelete !== void 0 ? { cascade_delete: cascadeDelete.toString() } : void 0;
|
|
7916
|
-
await this.workos.delete(`/authorization/organizations/${organizationId}/resources/${resourceTypeSlug}/${externalId}`, query);
|
|
8475
|
+
await this.workos.delete(`/authorization/organizations/${encodePathParameter(organizationId)}/resources/${encodePathParameter(resourceTypeSlug)}/${encodePathParameter(externalId)}`, query);
|
|
7917
8476
|
}
|
|
7918
8477
|
/**
|
|
7919
8478
|
* Check authorization
|
|
@@ -7926,7 +8485,7 @@ var Authorization = class {
|
|
|
7926
8485
|
* @throws {UnprocessableEntityException} 422
|
|
7927
8486
|
*/
|
|
7928
8487
|
async check(options) {
|
|
7929
|
-
const { data } = await this.workos.post(`/authorization/organization_memberships/${options.organizationMembershipId}/check`, serializeAuthorizationCheckOptions(options));
|
|
8488
|
+
const { data } = await this.workos.post(`/authorization/organization_memberships/${encodePathParameter(options.organizationMembershipId)}/check`, serializeAuthorizationCheckOptions(options));
|
|
7930
8489
|
return data;
|
|
7931
8490
|
}
|
|
7932
8491
|
/**
|
|
@@ -7945,7 +8504,7 @@ var Authorization = class {
|
|
|
7945
8504
|
*/
|
|
7946
8505
|
async listRoleAssignments(options) {
|
|
7947
8506
|
const { organizationMembershipId, ...queryOptions } = options;
|
|
7948
|
-
const endpoint = `/authorization/organization_memberships/${organizationMembershipId}/role_assignments`;
|
|
8507
|
+
const endpoint = `/authorization/organization_memberships/${encodePathParameter(organizationMembershipId)}/role_assignments`;
|
|
7949
8508
|
const serializedOptions = serializeListRoleAssignmentsOptions(queryOptions);
|
|
7950
8509
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, params), serializedOptions);
|
|
7951
8510
|
}
|
|
@@ -7965,7 +8524,7 @@ var Authorization = class {
|
|
|
7965
8524
|
*/
|
|
7966
8525
|
async listRoleAssignmentsForResource(options) {
|
|
7967
8526
|
const { resourceId, ...queryOptions } = options;
|
|
7968
|
-
const endpoint = `/authorization/resources/${resourceId}/role_assignments`;
|
|
8527
|
+
const endpoint = `/authorization/resources/${encodePathParameter(resourceId)}/role_assignments`;
|
|
7969
8528
|
const serializedOptions = serializeListRoleAssignmentsForResourceOptions(queryOptions);
|
|
7970
8529
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, params), serializedOptions);
|
|
7971
8530
|
}
|
|
@@ -7995,7 +8554,7 @@ var Authorization = class {
|
|
|
7995
8554
|
*/
|
|
7996
8555
|
async listResourceRoleAssignments(options) {
|
|
7997
8556
|
const { organizationId, resourceTypeSlug, externalId, ...queryOptions } = options;
|
|
7998
|
-
const endpoint = `/authorization/organizations/${organizationId}/resources/${resourceTypeSlug}/${externalId}/role_assignments`;
|
|
8557
|
+
const endpoint = `/authorization/organizations/${encodePathParameter(organizationId)}/resources/${encodePathParameter(resourceTypeSlug)}/${encodePathParameter(externalId)}/role_assignments`;
|
|
7999
8558
|
const serializedOptions = serializeListRoleAssignmentsForResourceOptions(queryOptions);
|
|
8000
8559
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeRoleAssignment, params), serializedOptions);
|
|
8001
8560
|
}
|
|
@@ -8010,7 +8569,7 @@ var Authorization = class {
|
|
|
8010
8569
|
* @throws {UnprocessableEntityException} 422
|
|
8011
8570
|
*/
|
|
8012
8571
|
async assignRole(options) {
|
|
8013
|
-
const { data } = await this.workos.post(`/authorization/organization_memberships/${options.organizationMembershipId}/role_assignments`, serializeAssignRoleOptions(options));
|
|
8572
|
+
const { data } = await this.workos.post(`/authorization/organization_memberships/${encodePathParameter(options.organizationMembershipId)}/role_assignments`, serializeAssignRoleOptions(options));
|
|
8014
8573
|
return deserializeRoleAssignment(data);
|
|
8015
8574
|
}
|
|
8016
8575
|
/**
|
|
@@ -8024,7 +8583,7 @@ var Authorization = class {
|
|
|
8024
8583
|
* @throws {UnprocessableEntityException} 422
|
|
8025
8584
|
*/
|
|
8026
8585
|
async removeRole(options) {
|
|
8027
|
-
await this.workos.deleteWithBody(`/authorization/organization_memberships/${options.organizationMembershipId}/role_assignments`, serializeRemoveRoleOptions(options));
|
|
8586
|
+
await this.workos.deleteWithBody(`/authorization/organization_memberships/${encodePathParameter(options.organizationMembershipId)}/role_assignments`, serializeRemoveRoleOptions(options));
|
|
8028
8587
|
}
|
|
8029
8588
|
/**
|
|
8030
8589
|
* Remove a role assignment by ID
|
|
@@ -8045,7 +8604,7 @@ var Authorization = class {
|
|
|
8045
8604
|
* @throws {NotFoundException} 404
|
|
8046
8605
|
*/
|
|
8047
8606
|
async removeRoleAssignment(options) {
|
|
8048
|
-
await this.workos.delete(`/authorization/organization_memberships/${options.organizationMembershipId}/role_assignments/${options.roleAssignmentId}`);
|
|
8607
|
+
await this.workos.delete(`/authorization/organization_memberships/${encodePathParameter(options.organizationMembershipId)}/role_assignments/${encodePathParameter(options.roleAssignmentId)}`);
|
|
8049
8608
|
}
|
|
8050
8609
|
/**
|
|
8051
8610
|
* List role assignments for a group
|
|
@@ -8063,7 +8622,7 @@ var Authorization = class {
|
|
|
8063
8622
|
*/
|
|
8064
8623
|
async listGroupRoleAssignments(options) {
|
|
8065
8624
|
const { groupId, ...paginationOptions } = options;
|
|
8066
|
-
const endpoint = `/authorization/groups/${groupId}/role_assignments`;
|
|
8625
|
+
const endpoint = `/authorization/groups/${encodePathParameter(groupId)}/role_assignments`;
|
|
8067
8626
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeGroupRoleAssignment, paginationOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeGroupRoleAssignment, params), paginationOptions);
|
|
8068
8627
|
}
|
|
8069
8628
|
/**
|
|
@@ -8086,7 +8645,7 @@ var Authorization = class {
|
|
|
8086
8645
|
* @throws {NotFoundException} 404
|
|
8087
8646
|
*/
|
|
8088
8647
|
async getGroupRoleAssignment(options) {
|
|
8089
|
-
const { data } = await this.workos.get(`/authorization/groups/${options.groupId}/role_assignments/${options.roleAssignmentId}`);
|
|
8648
|
+
const { data } = await this.workos.get(`/authorization/groups/${encodePathParameter(options.groupId)}/role_assignments/${encodePathParameter(options.roleAssignmentId)}`);
|
|
8090
8649
|
return deserializeGroupRoleAssignment(data);
|
|
8091
8650
|
}
|
|
8092
8651
|
/**
|
|
@@ -8101,7 +8660,7 @@ var Authorization = class {
|
|
|
8101
8660
|
* @throws {UnprocessableEntityException} 422
|
|
8102
8661
|
*/
|
|
8103
8662
|
async createGroupRoleAssignment(options) {
|
|
8104
|
-
const { data } = await this.workos.post(`/authorization/groups/${options.groupId}/role_assignments`, serializeCreateGroupRoleAssignmentOptions(options));
|
|
8663
|
+
const { data } = await this.workos.post(`/authorization/groups/${encodePathParameter(options.groupId)}/role_assignments`, serializeCreateGroupRoleAssignmentOptions(options));
|
|
8105
8664
|
return deserializeGroupRoleAssignment(data);
|
|
8106
8665
|
}
|
|
8107
8666
|
/**
|
|
@@ -8124,7 +8683,7 @@ var Authorization = class {
|
|
|
8124
8683
|
* @throws {NotFoundException} 404
|
|
8125
8684
|
*/
|
|
8126
8685
|
async removeGroupRoleAssignment(options) {
|
|
8127
|
-
await this.workos.delete(`/authorization/groups/${options.groupId}/role_assignments/${options.roleAssignmentId}`);
|
|
8686
|
+
await this.workos.delete(`/authorization/groups/${encodePathParameter(options.groupId)}/role_assignments/${encodePathParameter(options.roleAssignmentId)}`);
|
|
8128
8687
|
}
|
|
8129
8688
|
/**
|
|
8130
8689
|
* Remove group role assignments by criteria
|
|
@@ -8137,7 +8696,7 @@ var Authorization = class {
|
|
|
8137
8696
|
* @throws {UnprocessableEntityException} 422
|
|
8138
8697
|
*/
|
|
8139
8698
|
async removeGroupRoleAssignments(options) {
|
|
8140
|
-
await this.workos.deleteWithBody(`/authorization/groups/${options.groupId}/role_assignments`, serializeRemoveGroupRoleAssignmentsOptions(options));
|
|
8699
|
+
await this.workos.deleteWithBody(`/authorization/groups/${encodePathParameter(options.groupId)}/role_assignments`, serializeRemoveGroupRoleAssignmentsOptions(options));
|
|
8141
8700
|
}
|
|
8142
8701
|
/**
|
|
8143
8702
|
* Replace role assignments for a group
|
|
@@ -8150,7 +8709,7 @@ var Authorization = class {
|
|
|
8150
8709
|
* @throws {UnprocessableEntityException} 422
|
|
8151
8710
|
*/
|
|
8152
8711
|
async replaceGroupRoleAssignments(options) {
|
|
8153
|
-
const { data } = await this.workos.put(`/authorization/groups/${options.groupId}/role_assignments`, serializeReplaceGroupRoleAssignmentsOptions(options));
|
|
8712
|
+
const { data } = await this.workos.put(`/authorization/groups/${encodePathParameter(options.groupId)}/role_assignments`, serializeReplaceGroupRoleAssignmentsOptions(options));
|
|
8154
8713
|
return deserializeList(data, deserializeGroupRoleAssignment);
|
|
8155
8714
|
}
|
|
8156
8715
|
/**
|
|
@@ -8173,7 +8732,7 @@ var Authorization = class {
|
|
|
8173
8732
|
*/
|
|
8174
8733
|
async listResourcesForMembership(options) {
|
|
8175
8734
|
const { organizationMembershipId } = options;
|
|
8176
|
-
const endpoint = `/authorization/organization_memberships/${organizationMembershipId}/resources`;
|
|
8735
|
+
const endpoint = `/authorization/organization_memberships/${encodePathParameter(organizationMembershipId)}/resources`;
|
|
8177
8736
|
const serializedOptions = serializeListResourcesForMembershipOptions(options);
|
|
8178
8737
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeAuthorizationResource, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeAuthorizationResource, params), serializedOptions);
|
|
8179
8738
|
}
|
|
@@ -8190,7 +8749,7 @@ var Authorization = class {
|
|
|
8190
8749
|
*/
|
|
8191
8750
|
async listMembershipsForResource(options) {
|
|
8192
8751
|
const { resourceId } = options;
|
|
8193
|
-
const endpoint = `/authorization/resources/${resourceId}/organization_memberships`;
|
|
8752
|
+
const endpoint = `/authorization/resources/${encodePathParameter(resourceId)}/organization_memberships`;
|
|
8194
8753
|
const serializedOptions = serializeListMembershipsForResourceOptions(options);
|
|
8195
8754
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeAuthorizationOrganizationMembership, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeAuthorizationOrganizationMembership, params), serializedOptions);
|
|
8196
8755
|
}
|
|
@@ -8222,7 +8781,7 @@ var Authorization = class {
|
|
|
8222
8781
|
*/
|
|
8223
8782
|
async listMembershipsForResourceByExternalId(options) {
|
|
8224
8783
|
const { organizationId, resourceTypeSlug, externalId } = options;
|
|
8225
|
-
const endpoint = `/authorization/organizations/${organizationId}/resources/${resourceTypeSlug}/${externalId}/organization_memberships`;
|
|
8784
|
+
const endpoint = `/authorization/organizations/${encodePathParameter(organizationId)}/resources/${encodePathParameter(resourceTypeSlug)}/${encodePathParameter(externalId)}/organization_memberships`;
|
|
8226
8785
|
const serializedOptions = serializeListMembershipsForResourceOptions(options);
|
|
8227
8786
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeAuthorizationOrganizationMembership, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeAuthorizationOrganizationMembership, params), serializedOptions);
|
|
8228
8787
|
}
|
|
@@ -8248,7 +8807,7 @@ var Authorization = class {
|
|
|
8248
8807
|
*/
|
|
8249
8808
|
async listEffectivePermissions(options) {
|
|
8250
8809
|
const { organizationMembershipId, resourceId } = options;
|
|
8251
|
-
const endpoint = `/authorization/resources/${resourceId}/organization_memberships/${organizationMembershipId}/permissions`;
|
|
8810
|
+
const endpoint = `/authorization/resources/${encodePathParameter(resourceId)}/organization_memberships/${encodePathParameter(organizationMembershipId)}/permissions`;
|
|
8252
8811
|
const serializedOptions = serializeListEffectivePermissionsOptions(options);
|
|
8253
8812
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializePermission, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializePermission, params), serializedOptions);
|
|
8254
8813
|
}
|
|
@@ -8264,7 +8823,7 @@ var Authorization = class {
|
|
|
8264
8823
|
*/
|
|
8265
8824
|
async listEffectivePermissionsByExternalId(options) {
|
|
8266
8825
|
const { organizationMembershipId, resourceTypeSlug, externalId } = options;
|
|
8267
|
-
const endpoint = `/authorization/organization_memberships/${organizationMembershipId}/resources/${resourceTypeSlug}/${externalId}/permissions`;
|
|
8826
|
+
const endpoint = `/authorization/organization_memberships/${encodePathParameter(organizationMembershipId)}/resources/${encodePathParameter(resourceTypeSlug)}/${encodePathParameter(externalId)}/permissions`;
|
|
8268
8827
|
const serializedOptions = serializeListEffectivePermissionsOptions(options);
|
|
8269
8828
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializePermission, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializePermission, params), serializedOptions);
|
|
8270
8829
|
}
|
|
@@ -8280,6 +8839,8 @@ const CONTINUATION_BIT = 128;
|
|
|
8280
8839
|
const DATA_BITS_MASK = 127;
|
|
8281
8840
|
const DATA_BITS_PER_BYTE = 7;
|
|
8282
8841
|
const MAX_BYTES_FOR_UINT32 = 5;
|
|
8842
|
+
const FINAL_BYTE_SHIFT = 28;
|
|
8843
|
+
const FINAL_BYTE_MAX_DATA = 15;
|
|
8283
8844
|
/**
|
|
8284
8845
|
* Encodes an unsigned 32-bit integer into LEB128 format.
|
|
8285
8846
|
*
|
|
@@ -8315,6 +8876,7 @@ function decodeUInt32(data, offset = 0) {
|
|
|
8315
8876
|
const byte = data[index++];
|
|
8316
8877
|
bytesRead++;
|
|
8317
8878
|
if (bytesRead > MAX_BYTES_FOR_UINT32) throw new Error("LEB128 sequence exceeds maximum length for uint32");
|
|
8879
|
+
if (shift === FINAL_BYTE_SHIFT && (byte & DATA_BITS_MASK) > FINAL_BYTE_MAX_DATA) throw new Error("LEB128 sequence exceeds uint32 range");
|
|
8318
8880
|
result |= (byte & DATA_BITS_MASK) << shift;
|
|
8319
8881
|
if (!hasContinuationBit(byte)) return {
|
|
8320
8882
|
value: result >>> 0,
|
|
@@ -8721,7 +9283,7 @@ var Vault = class {
|
|
|
8721
9283
|
};
|
|
8722
9284
|
//#endregion
|
|
8723
9285
|
//#region package.json
|
|
8724
|
-
var version = "
|
|
9286
|
+
var version = "11.0.0";
|
|
8725
9287
|
//#endregion
|
|
8726
9288
|
//#region src/workos.ts
|
|
8727
9289
|
const DEFAULT_HOSTNAME = "api.workos.com";
|
|
@@ -8857,7 +9419,7 @@ var WorkOS = class {
|
|
|
8857
9419
|
});
|
|
8858
9420
|
throw error;
|
|
8859
9421
|
}
|
|
8860
|
-
return { data: await
|
|
9422
|
+
return { data: await this.readResponseJSON(path, res) };
|
|
8861
9423
|
}
|
|
8862
9424
|
async get(path, options = {}) {
|
|
8863
9425
|
if (!options.skipApiKeyCheck) this.requireApiKey(path);
|
|
@@ -8878,7 +9440,7 @@ var WorkOS = class {
|
|
|
8878
9440
|
});
|
|
8879
9441
|
throw error;
|
|
8880
9442
|
}
|
|
8881
|
-
return { data: await
|
|
9443
|
+
return { data: await this.readResponseJSON(path, res) };
|
|
8882
9444
|
}
|
|
8883
9445
|
async put(path, entity, options = {}) {
|
|
8884
9446
|
if (!options.skipApiKeyCheck) this.requireApiKey(path);
|
|
@@ -8898,7 +9460,7 @@ var WorkOS = class {
|
|
|
8898
9460
|
});
|
|
8899
9461
|
throw error;
|
|
8900
9462
|
}
|
|
8901
|
-
return { data: await
|
|
9463
|
+
return { data: await this.readResponseJSON(path, res) };
|
|
8902
9464
|
}
|
|
8903
9465
|
async patch(path, entity, options = {}) {
|
|
8904
9466
|
if (!options.skipApiKeyCheck) this.requireApiKey(path);
|
|
@@ -8918,7 +9480,7 @@ var WorkOS = class {
|
|
|
8918
9480
|
});
|
|
8919
9481
|
throw error;
|
|
8920
9482
|
}
|
|
8921
|
-
return { data: await
|
|
9483
|
+
return { data: await this.readResponseJSON(path, res) };
|
|
8922
9484
|
}
|
|
8923
9485
|
async delete(path, query) {
|
|
8924
9486
|
this.requireApiKey(path);
|
|
@@ -8944,6 +9506,24 @@ var WorkOS = class {
|
|
|
8944
9506
|
throw error;
|
|
8945
9507
|
}
|
|
8946
9508
|
}
|
|
9509
|
+
/**
|
|
9510
|
+
* Consume a successful response body. The request deadline covers the body,
|
|
9511
|
+
* so a stall while it is still streaming surfaces from the transport as a
|
|
9512
|
+
* 408 `HttpClientError` and is translated like a timeout before the headers.
|
|
9513
|
+
* Everything else (a `ParseError` for malformed JSON, a network failure
|
|
9514
|
+
* mid-body) propagates unchanged.
|
|
9515
|
+
*/
|
|
9516
|
+
async readResponseJSON(path, response) {
|
|
9517
|
+
try {
|
|
9518
|
+
return await response.toJSON();
|
|
9519
|
+
} catch (error) {
|
|
9520
|
+
if (error instanceof HttpClientError) this.handleHttpError({
|
|
9521
|
+
path,
|
|
9522
|
+
error
|
|
9523
|
+
});
|
|
9524
|
+
throw error;
|
|
9525
|
+
}
|
|
9526
|
+
}
|
|
8947
9527
|
emitWarning(warning) {
|
|
8948
9528
|
console.warn(`WorkOS: ${warning}`);
|
|
8949
9529
|
}
|
|
@@ -8993,6 +9573,31 @@ var WorkOS = class {
|
|
|
8993
9573
|
}
|
|
8994
9574
|
};
|
|
8995
9575
|
//#endregion
|
|
9576
|
+
//#region src/audit-logs/interfaces/update-audit-logs-retention-retention-period.interface.ts
|
|
9577
|
+
const UpdateAuditLogsRetentionRetentionPeriod = {
|
|
9578
|
+
Value1Month: "1_MONTH",
|
|
9579
|
+
Value2Months: "2_MONTHS",
|
|
9580
|
+
Value3Months: "3_MONTHS",
|
|
9581
|
+
Value4Months: "4_MONTHS",
|
|
9582
|
+
Value5Months: "5_MONTHS",
|
|
9583
|
+
Value6Months: "6_MONTHS",
|
|
9584
|
+
Value7Months: "7_MONTHS",
|
|
9585
|
+
Value8Months: "8_MONTHS",
|
|
9586
|
+
Value9Months: "9_MONTHS",
|
|
9587
|
+
Value10Months: "10_MONTHS",
|
|
9588
|
+
Value11Months: "11_MONTHS",
|
|
9589
|
+
Value1Year: "1_YEAR",
|
|
9590
|
+
Value2Years: "2_YEARS",
|
|
9591
|
+
Value3Years: "3_YEARS",
|
|
9592
|
+
Value4Years: "4_YEARS",
|
|
9593
|
+
Value5Years: "5_YEARS",
|
|
9594
|
+
Value6Years: "6_YEARS",
|
|
9595
|
+
Value7Years: "7_YEARS",
|
|
9596
|
+
Value8Years: "8_YEARS",
|
|
9597
|
+
Value9Years: "9_YEARS",
|
|
9598
|
+
Value10Years: "10_YEARS"
|
|
9599
|
+
};
|
|
9600
|
+
//#endregion
|
|
8996
9601
|
//#region src/common/interfaces/generate-link-intent.interface.ts
|
|
8997
9602
|
const GenerateLinkIntent = {
|
|
8998
9603
|
SSO: "sso",
|
|
@@ -9243,6 +9848,12 @@ Object.defineProperty(exports, "UnprocessableEntityException", {
|
|
|
9243
9848
|
return UnprocessableEntityException;
|
|
9244
9849
|
}
|
|
9245
9850
|
});
|
|
9851
|
+
Object.defineProperty(exports, "UpdateAuditLogsRetentionRetentionPeriod", {
|
|
9852
|
+
enumerable: true,
|
|
9853
|
+
get: function() {
|
|
9854
|
+
return UpdateAuditLogsRetentionRetentionPeriod;
|
|
9855
|
+
}
|
|
9856
|
+
});
|
|
9246
9857
|
Object.defineProperty(exports, "Webhooks", {
|
|
9247
9858
|
enumerable: true,
|
|
9248
9859
|
get: function() {
|
|
@@ -9274,4 +9885,4 @@ Object.defineProperty(exports, "serializeRevokeSessionOptions", {
|
|
|
9274
9885
|
}
|
|
9275
9886
|
});
|
|
9276
9887
|
|
|
9277
|
-
//# sourceMappingURL=factory-
|
|
9888
|
+
//# sourceMappingURL=factory-DJd6WXWm.cjs.map
|