@workos/openapi-spec 0.116.0 → 0.118.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/dist/open-api-spec.yaml +553 -192
- package/dist/services.mjs +5 -0
- package/dist/types.d.ts +314 -16
- package/package.json +1 -1
package/dist/services.mjs
CHANGED
|
@@ -477,6 +477,11 @@ const serviceEndpoints = {
|
|
|
477
477
|
"path": "/directories/{id}",
|
|
478
478
|
"name": "get_directory"
|
|
479
479
|
},
|
|
480
|
+
{
|
|
481
|
+
"method": "POST",
|
|
482
|
+
"path": "/directories/{id}/sync",
|
|
483
|
+
"name": "create_directory_sync"
|
|
484
|
+
},
|
|
480
485
|
{
|
|
481
486
|
"method": "GET",
|
|
482
487
|
"path": "/directory_groups",
|
package/dist/types.d.ts
CHANGED
|
@@ -1641,6 +1641,26 @@ export interface paths {
|
|
|
1641
1641
|
patch?: never;
|
|
1642
1642
|
trace?: never;
|
|
1643
1643
|
};
|
|
1644
|
+
"/directories/{id}/sync": {
|
|
1645
|
+
parameters: {
|
|
1646
|
+
query?: never;
|
|
1647
|
+
header?: never;
|
|
1648
|
+
path?: never;
|
|
1649
|
+
cookie?: never;
|
|
1650
|
+
};
|
|
1651
|
+
get?: never;
|
|
1652
|
+
put?: never;
|
|
1653
|
+
/**
|
|
1654
|
+
* Sync a Directory
|
|
1655
|
+
* @description Request an asynchronous sync from the directory provider. Currently supports Google Workspace directories in linked or validating state. Manual requests share a five-minute per-directory cooldown across the API, Dashboard, Admin Portal, and MCP. Acceptance means the request was queued, not that the sync has started or completed. A running sync prevents another request from being queued.
|
|
1656
|
+
*/
|
|
1657
|
+
post: operations["DirectoriesController_syncDirectory"];
|
|
1658
|
+
delete?: never;
|
|
1659
|
+
options?: never;
|
|
1660
|
+
head?: never;
|
|
1661
|
+
patch?: never;
|
|
1662
|
+
trace?: never;
|
|
1663
|
+
};
|
|
1644
1664
|
"/directory_groups": {
|
|
1645
1665
|
parameters: {
|
|
1646
1666
|
query?: never;
|
|
@@ -8565,6 +8585,32 @@ export interface components {
|
|
|
8565
8585
|
after: string | null;
|
|
8566
8586
|
};
|
|
8567
8587
|
};
|
|
8588
|
+
DirectorySyncResponse: {
|
|
8589
|
+
/**
|
|
8590
|
+
* @description The sync request was queued for asynchronous processing. This does not indicate that the sync has started or completed.
|
|
8591
|
+
* @example queued
|
|
8592
|
+
* @constant
|
|
8593
|
+
*/
|
|
8594
|
+
status: "queued";
|
|
8595
|
+
};
|
|
8596
|
+
DirectorySyncRateLimitError: {
|
|
8597
|
+
/**
|
|
8598
|
+
* @description The error code identifying the type of error.
|
|
8599
|
+
* @example directory_sync_rate_limited
|
|
8600
|
+
* @constant
|
|
8601
|
+
*/
|
|
8602
|
+
code: "directory_sync_rate_limited";
|
|
8603
|
+
/**
|
|
8604
|
+
* @description A human-readable description of the error.
|
|
8605
|
+
* @example Request could not be processed.
|
|
8606
|
+
*/
|
|
8607
|
+
message: string;
|
|
8608
|
+
/**
|
|
8609
|
+
* @description The number of seconds to wait before requesting another manual sync of this directory.
|
|
8610
|
+
* @example 120
|
|
8611
|
+
*/
|
|
8612
|
+
retry_after_seconds: number;
|
|
8613
|
+
};
|
|
8568
8614
|
DirectoryGroup: {
|
|
8569
8615
|
/**
|
|
8570
8616
|
* @description Distinguishes the Directory Group object.
|
|
@@ -18179,6 +18225,19 @@ export interface components {
|
|
|
18179
18225
|
*/
|
|
18180
18226
|
url: string;
|
|
18181
18227
|
};
|
|
18228
|
+
AuthMethodMismatchError: {
|
|
18229
|
+
/**
|
|
18230
|
+
* @description Error code indicating the endpoint does not match the installation auth method.
|
|
18231
|
+
* @example auth_method_mismatch
|
|
18232
|
+
* @constant
|
|
18233
|
+
*/
|
|
18234
|
+
code: "auth_method_mismatch";
|
|
18235
|
+
/**
|
|
18236
|
+
* @description A human-readable explanation of the mismatch.
|
|
18237
|
+
* @example This installation uses oauth authentication. Use the POST /:slug/token endpoint instead.
|
|
18238
|
+
*/
|
|
18239
|
+
message: string;
|
|
18240
|
+
};
|
|
18182
18241
|
DataIntegrationAccessTokenResponse: {
|
|
18183
18242
|
/**
|
|
18184
18243
|
* @description Indicates whether the access token is valid and ready for use, or if reauthorization is required.
|
|
@@ -18243,19 +18302,6 @@ export interface components {
|
|
|
18243
18302
|
*/
|
|
18244
18303
|
message: string;
|
|
18245
18304
|
};
|
|
18246
|
-
AuthMethodMismatchError: {
|
|
18247
|
-
/**
|
|
18248
|
-
* @description Error code indicating the endpoint does not match the installation auth method.
|
|
18249
|
-
* @example auth_method_mismatch
|
|
18250
|
-
* @constant
|
|
18251
|
-
*/
|
|
18252
|
-
code: "auth_method_mismatch";
|
|
18253
|
-
/**
|
|
18254
|
-
* @description A human-readable explanation of the mismatch.
|
|
18255
|
-
* @example This installation uses oauth authentication. Use the POST /:slug/token endpoint instead.
|
|
18256
|
-
*/
|
|
18257
|
-
message: string;
|
|
18258
|
-
};
|
|
18259
18305
|
DataIntegrationVendedCredential: {
|
|
18260
18306
|
/**
|
|
18261
18307
|
* @description Distinguishes the credential object.
|
|
@@ -29904,13 +29950,25 @@ export interface operations {
|
|
|
29904
29950
|
};
|
|
29905
29951
|
};
|
|
29906
29952
|
};
|
|
29907
|
-
/** @description The data integration or selected connected account was not found. */
|
|
29953
|
+
/** @description The data integration or selected connected account was not found (`entity_not_found`). */
|
|
29908
29954
|
404: {
|
|
29909
29955
|
headers: {
|
|
29910
29956
|
[name: string]: unknown;
|
|
29911
29957
|
};
|
|
29912
29958
|
content: {
|
|
29913
29959
|
"application/json": {
|
|
29960
|
+
/**
|
|
29961
|
+
* @description The error code identifying the type of error.
|
|
29962
|
+
* @example entity_not_found
|
|
29963
|
+
* @constant
|
|
29964
|
+
*/
|
|
29965
|
+
code: "entity_not_found";
|
|
29966
|
+
/**
|
|
29967
|
+
* @description A human-readable description of the error.
|
|
29968
|
+
* @example Request could not be processed.
|
|
29969
|
+
*/
|
|
29970
|
+
message: string;
|
|
29971
|
+
} | {
|
|
29914
29972
|
/**
|
|
29915
29973
|
* @description A human-readable description of the error.
|
|
29916
29974
|
* @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
|
|
@@ -30140,6 +30198,87 @@ export interface operations {
|
|
|
30140
30198
|
config?: {
|
|
30141
30199
|
[key: string]: string;
|
|
30142
30200
|
};
|
|
30201
|
+
} | {
|
|
30202
|
+
/**
|
|
30203
|
+
* @description 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.
|
|
30204
|
+
* @example user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
30205
|
+
*/
|
|
30206
|
+
user_id: string;
|
|
30207
|
+
/**
|
|
30208
|
+
* @description An organization ID to scope the authorization to a specific organization. Required when `connection_owner` is `organization`.
|
|
30209
|
+
* @example org_01EHZNVPK3SFK441A1RGBFSHRT
|
|
30210
|
+
*/
|
|
30211
|
+
organization_id?: string;
|
|
30212
|
+
/**
|
|
30213
|
+
* @description 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`.
|
|
30214
|
+
* @example user
|
|
30215
|
+
* @enum {string}
|
|
30216
|
+
*/
|
|
30217
|
+
connection_owner?: "user" | "organization";
|
|
30218
|
+
/**
|
|
30219
|
+
* Format: uri
|
|
30220
|
+
* @description The URL to redirect the user to after authorization.
|
|
30221
|
+
* @example https://example.com/callback
|
|
30222
|
+
*/
|
|
30223
|
+
return_to?: string;
|
|
30224
|
+
/**
|
|
30225
|
+
* @description 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.
|
|
30226
|
+
* @example {
|
|
30227
|
+
* "subdomain": "acme"
|
|
30228
|
+
* }
|
|
30229
|
+
*/
|
|
30230
|
+
config?: {
|
|
30231
|
+
[key: string]: string;
|
|
30232
|
+
};
|
|
30233
|
+
/**
|
|
30234
|
+
* @description Create another connection. The first connection for an owner shape fills the compatibility slot; later connections are standard. Creating an additional connection is not yet available: until it is, `add` succeeds only when the owner has no connection for this integration and otherwise returns 404 `multiple_connections_unavailable`. Omit `connection_intent` to use the compatibility connection, or send `reauthorize` with `connected_account_id` to reauthorize one exact connection.
|
|
30235
|
+
* @example add
|
|
30236
|
+
* @constant
|
|
30237
|
+
*/
|
|
30238
|
+
connection_intent: "add";
|
|
30239
|
+
} | {
|
|
30240
|
+
/**
|
|
30241
|
+
* @description 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.
|
|
30242
|
+
* @example user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
30243
|
+
*/
|
|
30244
|
+
user_id: string;
|
|
30245
|
+
/**
|
|
30246
|
+
* @description An organization ID to scope the authorization to a specific organization. Required when `connection_owner` is `organization`.
|
|
30247
|
+
* @example org_01EHZNVPK3SFK441A1RGBFSHRT
|
|
30248
|
+
*/
|
|
30249
|
+
organization_id?: string;
|
|
30250
|
+
/**
|
|
30251
|
+
* @description 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`.
|
|
30252
|
+
* @example user
|
|
30253
|
+
* @enum {string}
|
|
30254
|
+
*/
|
|
30255
|
+
connection_owner?: "user" | "organization";
|
|
30256
|
+
/**
|
|
30257
|
+
* Format: uri
|
|
30258
|
+
* @description The URL to redirect the user to after authorization.
|
|
30259
|
+
* @example https://example.com/callback
|
|
30260
|
+
*/
|
|
30261
|
+
return_to?: string;
|
|
30262
|
+
/**
|
|
30263
|
+
* @description 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.
|
|
30264
|
+
* @example {
|
|
30265
|
+
* "subdomain": "acme"
|
|
30266
|
+
* }
|
|
30267
|
+
*/
|
|
30268
|
+
config?: {
|
|
30269
|
+
[key: string]: string;
|
|
30270
|
+
};
|
|
30271
|
+
/**
|
|
30272
|
+
* @description Reauthorize exactly the connection named by `connected_account_id`.
|
|
30273
|
+
* @example reauthorize
|
|
30274
|
+
* @constant
|
|
30275
|
+
*/
|
|
30276
|
+
connection_intent: "reauthorize";
|
|
30277
|
+
/**
|
|
30278
|
+
* @description The exact connected account to reauthorize. Required with `connection_intent: reauthorize`.
|
|
30279
|
+
* @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
|
|
30280
|
+
*/
|
|
30281
|
+
connected_account_id: string;
|
|
30143
30282
|
};
|
|
30144
30283
|
};
|
|
30145
30284
|
};
|
|
@@ -30190,13 +30329,25 @@ export interface operations {
|
|
|
30190
30329
|
};
|
|
30191
30330
|
};
|
|
30192
30331
|
};
|
|
30193
|
-
/** @description
|
|
30332
|
+
/** @description The integration or user was not found (`entity_not_found`); `connected_account_not_found` when `connected_account_id` does not name a connection for this owner and integration; or `multiple_connections_unavailable` when `connection_intent: add` would create an additional connection before that capability is available. */
|
|
30194
30333
|
404: {
|
|
30195
30334
|
headers: {
|
|
30196
30335
|
[name: string]: unknown;
|
|
30197
30336
|
};
|
|
30198
30337
|
content: {
|
|
30199
30338
|
"application/json": {
|
|
30339
|
+
/**
|
|
30340
|
+
* @description The error code identifying the type of error.
|
|
30341
|
+
* @example multiple_connections_unavailable
|
|
30342
|
+
* @enum {string}
|
|
30343
|
+
*/
|
|
30344
|
+
code: "multiple_connections_unavailable" | "connected_account_not_found" | "entity_not_found";
|
|
30345
|
+
/**
|
|
30346
|
+
* @description A human-readable description of the error.
|
|
30347
|
+
* @example Request could not be processed.
|
|
30348
|
+
*/
|
|
30349
|
+
message: string;
|
|
30350
|
+
} | {
|
|
30200
30351
|
/**
|
|
30201
30352
|
* @description A human-readable description of the error.
|
|
30202
30353
|
* @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
|
|
@@ -30205,6 +30356,15 @@ export interface operations {
|
|
|
30205
30356
|
};
|
|
30206
30357
|
};
|
|
30207
30358
|
};
|
|
30359
|
+
/** @description The selected connected account does not use OAuth authentication. */
|
|
30360
|
+
422: {
|
|
30361
|
+
headers: {
|
|
30362
|
+
[name: string]: unknown;
|
|
30363
|
+
};
|
|
30364
|
+
content: {
|
|
30365
|
+
"application/json": components["schemas"]["AuthMethodMismatchError"];
|
|
30366
|
+
};
|
|
30367
|
+
};
|
|
30208
30368
|
};
|
|
30209
30369
|
};
|
|
30210
30370
|
DataIntegrationsController_upsertClientCredentials: {
|
|
@@ -30409,13 +30569,25 @@ export interface operations {
|
|
|
30409
30569
|
};
|
|
30410
30570
|
};
|
|
30411
30571
|
};
|
|
30412
|
-
/** @description The data integration or selected connected account was not found. */
|
|
30572
|
+
/** @description The data integration or selected connected account was not found (`entity_not_found`). */
|
|
30413
30573
|
404: {
|
|
30414
30574
|
headers: {
|
|
30415
30575
|
[name: string]: unknown;
|
|
30416
30576
|
};
|
|
30417
30577
|
content: {
|
|
30418
30578
|
"application/json": {
|
|
30579
|
+
/**
|
|
30580
|
+
* @description The error code identifying the type of error.
|
|
30581
|
+
* @example entity_not_found
|
|
30582
|
+
* @constant
|
|
30583
|
+
*/
|
|
30584
|
+
code: "entity_not_found";
|
|
30585
|
+
/**
|
|
30586
|
+
* @description A human-readable description of the error.
|
|
30587
|
+
* @example Request could not be processed.
|
|
30588
|
+
*/
|
|
30589
|
+
message: string;
|
|
30590
|
+
} | {
|
|
30419
30591
|
/**
|
|
30420
30592
|
* @description A human-readable description of the error.
|
|
30421
30593
|
* @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
|
|
@@ -31338,6 +31510,132 @@ export interface operations {
|
|
|
31338
31510
|
};
|
|
31339
31511
|
};
|
|
31340
31512
|
};
|
|
31513
|
+
DirectoriesController_syncDirectory: {
|
|
31514
|
+
parameters: {
|
|
31515
|
+
query?: never;
|
|
31516
|
+
header?: never;
|
|
31517
|
+
path: {
|
|
31518
|
+
/** @description Unique identifier for the Directory. */
|
|
31519
|
+
id: string;
|
|
31520
|
+
};
|
|
31521
|
+
cookie?: never;
|
|
31522
|
+
};
|
|
31523
|
+
requestBody?: never;
|
|
31524
|
+
responses: {
|
|
31525
|
+
202: {
|
|
31526
|
+
headers: {
|
|
31527
|
+
[name: string]: unknown;
|
|
31528
|
+
};
|
|
31529
|
+
content: {
|
|
31530
|
+
"application/json": components["schemas"]["DirectorySyncResponse"];
|
|
31531
|
+
};
|
|
31532
|
+
};
|
|
31533
|
+
/** @description Forbidden */
|
|
31534
|
+
403: {
|
|
31535
|
+
headers: {
|
|
31536
|
+
[name: string]: unknown;
|
|
31537
|
+
};
|
|
31538
|
+
content: {
|
|
31539
|
+
"application/json": {
|
|
31540
|
+
/**
|
|
31541
|
+
* @description A human-readable description of the error.
|
|
31542
|
+
* @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
|
|
31543
|
+
*/
|
|
31544
|
+
message: string;
|
|
31545
|
+
};
|
|
31546
|
+
};
|
|
31547
|
+
};
|
|
31548
|
+
/** @description Not Found */
|
|
31549
|
+
404: {
|
|
31550
|
+
headers: {
|
|
31551
|
+
[name: string]: unknown;
|
|
31552
|
+
};
|
|
31553
|
+
content: {
|
|
31554
|
+
"application/json": {
|
|
31555
|
+
/**
|
|
31556
|
+
* @description A human-readable description of the error.
|
|
31557
|
+
* @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
|
|
31558
|
+
*/
|
|
31559
|
+
message: string;
|
|
31560
|
+
};
|
|
31561
|
+
};
|
|
31562
|
+
};
|
|
31563
|
+
/** @description A sync is already in progress. No additional sync was queued. */
|
|
31564
|
+
409: {
|
|
31565
|
+
headers: {
|
|
31566
|
+
[name: string]: unknown;
|
|
31567
|
+
};
|
|
31568
|
+
content: {
|
|
31569
|
+
"application/json": {
|
|
31570
|
+
/**
|
|
31571
|
+
* @description The error code identifying the type of error.
|
|
31572
|
+
* @example directory_sync_in_progress
|
|
31573
|
+
* @constant
|
|
31574
|
+
*/
|
|
31575
|
+
code: "directory_sync_in_progress";
|
|
31576
|
+
/**
|
|
31577
|
+
* @description A human-readable description of the error.
|
|
31578
|
+
* @example Request could not be processed.
|
|
31579
|
+
*/
|
|
31580
|
+
message: string;
|
|
31581
|
+
};
|
|
31582
|
+
};
|
|
31583
|
+
};
|
|
31584
|
+
/** @description The directory provider or state does not support manual sync. */
|
|
31585
|
+
422: {
|
|
31586
|
+
headers: {
|
|
31587
|
+
[name: string]: unknown;
|
|
31588
|
+
};
|
|
31589
|
+
content: {
|
|
31590
|
+
"application/json": {
|
|
31591
|
+
/**
|
|
31592
|
+
* @description The error code identifying the type of error.
|
|
31593
|
+
* @example directory_sync_unsupported
|
|
31594
|
+
* @constant
|
|
31595
|
+
*/
|
|
31596
|
+
code: "directory_sync_unsupported";
|
|
31597
|
+
/**
|
|
31598
|
+
* @description A human-readable description of the error.
|
|
31599
|
+
* @example Request could not be processed.
|
|
31600
|
+
*/
|
|
31601
|
+
message: string;
|
|
31602
|
+
};
|
|
31603
|
+
};
|
|
31604
|
+
};
|
|
31605
|
+
/** @description The directory is within the manual-sync cooldown window. */
|
|
31606
|
+
429: {
|
|
31607
|
+
headers: {
|
|
31608
|
+
/** @description Seconds to wait before requesting another manual sync. */
|
|
31609
|
+
"Retry-After"?: number;
|
|
31610
|
+
[name: string]: unknown;
|
|
31611
|
+
};
|
|
31612
|
+
content: {
|
|
31613
|
+
"application/json": components["schemas"]["DirectorySyncRateLimitError"];
|
|
31614
|
+
};
|
|
31615
|
+
};
|
|
31616
|
+
/** @description Directory syncing is temporarily paused. No sync was queued. */
|
|
31617
|
+
503: {
|
|
31618
|
+
headers: {
|
|
31619
|
+
[name: string]: unknown;
|
|
31620
|
+
};
|
|
31621
|
+
content: {
|
|
31622
|
+
"application/json": {
|
|
31623
|
+
/**
|
|
31624
|
+
* @description The error code identifying the type of error.
|
|
31625
|
+
* @example directory_sync_disabled
|
|
31626
|
+
* @constant
|
|
31627
|
+
*/
|
|
31628
|
+
code: "directory_sync_disabled";
|
|
31629
|
+
/**
|
|
31630
|
+
* @description A human-readable description of the error.
|
|
31631
|
+
* @example Request could not be processed.
|
|
31632
|
+
*/
|
|
31633
|
+
message: string;
|
|
31634
|
+
};
|
|
31635
|
+
};
|
|
31636
|
+
};
|
|
31637
|
+
};
|
|
31638
|
+
};
|
|
31341
31639
|
DirectoryGroupsController_list: {
|
|
31342
31640
|
parameters: {
|
|
31343
31641
|
query?: {
|