@workos/openapi-spec 0.83.0 → 0.85.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.
@@ -10252,9 +10252,13 @@ paths:
10252
10252
  create an API key integration; you may optionally supply an `api_key`
10253
10253
  block to install a first tenant in the same call. Set `auth_methods` to
10254
10254
  `["client_credentials"]` to create a client-credentials integration;
10255
- client credentials are installed per-tenant afterwards. For a built-in
10256
- provider, pass its slug as `provider`. For a custom provider, pass a new
10257
- slug plus a `custom_provider` definition.
10255
+ client credentials are installed per-tenant afterwards. Set `ownership`
10256
+ to `organization` to create the integration organizations connect to
10257
+ instead of the default user-owned one; a provider may have one of each.
10258
+ For a built-in provider, pass its slug as `provider`. For a custom
10259
+ provider, pass a new slug plus a `custom_provider` definition, or the
10260
+ slug of an existing custom provider (without `custom_provider`) to add
10261
+ the other ownership.
10258
10262
  operationId: DataIntegrationsManagementController_createDataIntegration
10259
10263
  parameters: []
10260
10264
  requestBody:
@@ -10975,14 +10979,19 @@ paths:
10975
10979
  properties:
10976
10980
  user_id:
10977
10981
  type: string
10978
- description: A [User](/reference/authkit/user) identifier.
10982
+ description: >-
10983
+ A [User](/reference/authkit/user) identifier. When
10984
+ `connection_owner` is `organization`, this is the user the
10985
+ credentials are vended on behalf of; they must be an active
10986
+ member of the organization.
10979
10987
  example: user_01EHZNVPK3SFK441A1RGBFSHRT
10980
10988
  organization_id:
10981
10989
  type: string
10982
10990
  description: >-
10983
10991
  An [Organization](/reference/organization) identifier.
10984
10992
  Optional parameter to scope the connection to a specific
10985
- organization.
10993
+ organization. Required when `connection_owner` is
10994
+ `organization`.
10986
10995
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
10987
10996
  connected_account_id:
10988
10997
  type: string
@@ -10992,6 +11001,17 @@ paths:
10992
11001
  identifier. Use this to select a specific connection when
10993
11002
  the user has several for this provider.
10994
11003
  example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
11004
+ connection_owner:
11005
+ type: string
11006
+ enum:
11007
+ - user
11008
+ - organization
11009
+ description: >-
11010
+ Which connection to vend from. `user` (the default) vends
11011
+ the user's own connection and requires `user_id`.
11012
+ `organization` vends the organization's shared connection
11013
+ and requires `organization_id`.
11014
+ example: user
10995
11015
  required:
10996
11016
  - user_id
10997
11017
  responses:
@@ -11027,6 +11047,21 @@ paths:
11027
11047
  - message
11028
11048
  '401':
11029
11049
  description: Unauthorized
11050
+ '403':
11051
+ description: >-
11052
+ The user is not an active member of the organization named for an
11053
+ organization connection.
11054
+ content:
11055
+ application/json:
11056
+ schema:
11057
+ type: object
11058
+ properties:
11059
+ message:
11060
+ type: string
11061
+ description: A human-readable description of the error.
11062
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
11063
+ required:
11064
+ - message
11030
11065
  '404':
11031
11066
  description: The data integration or selected connected account was not found.
11032
11067
  content:
@@ -11097,14 +11132,19 @@ paths:
11097
11132
  properties:
11098
11133
  user_id:
11099
11134
  type: string
11100
- description: A [User](/reference/authkit/user) identifier.
11135
+ description: >-
11136
+ A [User](/reference/authkit/user) identifier. When
11137
+ `connection_owner` is `organization`, this is the user the
11138
+ credentials are vended on behalf of; they must be an active
11139
+ member of the organization.
11101
11140
  example: user_01EHZNVPK3SFK441A1RGBFSHRT
11102
11141
  organization_id:
11103
11142
  type: string
11104
11143
  description: >-
11105
11144
  An [Organization](/reference/organization) identifier.
11106
11145
  Optional parameter to scope the connection to a specific
11107
- organization.
11146
+ organization. Required when `connection_owner` is
11147
+ `organization`.
11108
11148
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
11109
11149
  connected_account_id:
11110
11150
  type: string
@@ -11114,6 +11154,17 @@ paths:
11114
11154
  identifier. Use this to select a specific connection when
11115
11155
  the user has several for this provider.
11116
11156
  example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
11157
+ connection_owner:
11158
+ type: string
11159
+ enum:
11160
+ - user
11161
+ - organization
11162
+ description: >-
11163
+ Which connection to vend from. `user` (the default) vends
11164
+ the user's own connection and requires `user_id`.
11165
+ `organization` vends the organization's shared connection
11166
+ and requires `organization_id`.
11167
+ example: user
11117
11168
  required:
11118
11169
  - user_id
11119
11170
  responses:
@@ -11138,6 +11189,21 @@ paths:
11138
11189
  - message
11139
11190
  '401':
11140
11191
  description: Unauthorized
11192
+ '403':
11193
+ description: >-
11194
+ The user is not an active member of the organization named for an
11195
+ organization connection.
11196
+ content:
11197
+ application/json:
11198
+ schema:
11199
+ type: object
11200
+ properties:
11201
+ message:
11202
+ type: string
11203
+ description: A human-readable description of the error.
11204
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
11205
+ required:
11206
+ - message
11141
11207
  '404':
11142
11208
  description: The data integration or selected connected account was not found.
11143
11209
  content:
@@ -26408,6 +26474,18 @@ components:
26408
26474
  be supplied. A custom provider slug cannot shadow an existing global
26409
26475
  provider slug.
26410
26476
  example: github
26477
+ ownership:
26478
+ type: string
26479
+ enum:
26480
+ - userland_user
26481
+ - organization
26482
+ description: >-
26483
+ Who owns the Data Integration. `userland_user` (the default) creates
26484
+ the integration users connect their own accounts to; `organization`
26485
+ creates the root organizations connect to. Ownership is fixed at
26486
+ creation, and one integration of each ownership may exist per
26487
+ provider. Independent of `credentials.type`.
26488
+ example: userland_user
26411
26489
  description:
26412
26490
  type:
26413
26491
  - string
@@ -26631,16 +26709,16 @@ components:
26631
26709
  type: string
26632
26710
  description: >-
26633
26711
  The URL to go to when an admin clicks on your logo in the Admin
26634
- Portal. If not specified, the return URL configured on the
26635
- [Redirects](https://dashboard.workos.com/redirects) page will be
26712
+ Portal. If not specified, the return URL configured on the [Admin
26713
+ Portal](https://dashboard.workos.com/admin-portal) page will be
26636
26714
  used.
26637
26715
  example: https://example.com/admin-portal/return
26638
26716
  success_url:
26639
26717
  type: string
26640
26718
  description: >-
26641
26719
  The URL to redirect the admin to when they finish setup. If not
26642
- specified, the success URL configured on the
26643
- [Redirects](https://dashboard.workos.com/redirects) page will be
26720
+ specified, the success URL configured on the [Admin
26721
+ Portal](https://dashboard.workos.com/admin-portal) page will be
26644
26722
  used.
26645
26723
  example: https://example.com/admin-portal/success
26646
26724
  organization:
@@ -42370,6 +42448,16 @@ components:
42370
42448
  type: string
42371
42449
  description: The integration type derived from the provider.
42372
42450
  example: github
42451
+ ownership:
42452
+ type: string
42453
+ enum:
42454
+ - userland_user
42455
+ - organization
42456
+ description: >-
42457
+ Who owns the Data Integration: `userland_user` when users connect
42458
+ their own accounts, `organization` when organizations connect. Fixed
42459
+ at creation.
42460
+ example: userland_user
42373
42461
  description:
42374
42462
  type:
42375
42463
  - string
@@ -42477,15 +42565,21 @@ components:
42477
42565
  description: Unique identifier of the installation.
42478
42566
  example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
42479
42567
  user_id:
42480
- type: string
42481
- description: The User the API key was installed for.
42568
+ type:
42569
+ - string
42570
+ - 'null'
42571
+ description: >-
42572
+ The User the API key was installed for. Null on an
42573
+ `organization`-owned integration, whose installations belong
42574
+ to the organization.
42482
42575
  example: user_01EHZNVPK3SFK441A1RGBFSHRT
42483
42576
  organization_id:
42484
42577
  type:
42485
42578
  - string
42486
42579
  - 'null'
42487
42580
  description: >-
42488
- The Organization the installation is scoped to, or null when
42581
+ The Organization the installation is scoped to (or owned by,
42582
+ on an `organization`-owned integration), or null when
42489
42583
  unscoped.
42490
42584
  example: null
42491
42585
  api_key_last_4:
@@ -42611,6 +42705,7 @@ components:
42611
42705
  - id
42612
42706
  - slug
42613
42707
  - integration_type
42708
+ - ownership
42614
42709
  - description
42615
42710
  - enabled
42616
42711
  - state
package/dist/policy.d.mts CHANGED
@@ -49,7 +49,7 @@ interface OperationHint {
49
49
  * Per-operation overrides for the operation resolver. Keyed by `"METHOD /path"`.
50
50
  * Only operations that need overrides are listed; the algorithm handles the rest.
51
51
  */
52
- declare const operationHints: Record<string, OperationHint>;
52
+ export declare const operationHints: Record<string, OperationHint>;
53
53
  //#endregion
54
54
  //#region src/policy/mount-rules.d.ts
55
55
  /**
@@ -65,7 +65,7 @@ declare const operationHints: Record<string, OperationHint>;
65
65
  * does not belong to its prefix family (cf. UserManagementDataProviders →
66
66
  * Pipes) needs its own exact entry here.
67
67
  */
68
- declare const mountRules: Record<string, string>;
68
+ export declare const mountRules: Record<string, string>;
69
69
  //#endregion
70
70
  //#region src/policy/model-hints.d.ts
71
71
  /**
@@ -73,21 +73,21 @@ declare const mountRules: Record<string, string>;
73
73
  * `assignModelsToServices` so hinted models land in the configured service
74
74
  * instead of the default first-reference winner.
75
75
  */
76
- declare const modelHints: Record<string, string>;
76
+ export declare const modelHints: Record<string, string>;
77
77
  //#endregion
78
78
  //#region src/policy/transforms.d.ts
79
79
  /**
80
80
  * NestJS-style operationId transform. Strips "Controller" and extracts the
81
81
  * action after the first underscore: `FooController_bar` -> `bar`.
82
82
  */
83
- declare function nestjsOperationIdTransform(id: string): string;
84
- declare function schemaNameTransform(name: string): string;
83
+ export declare function nestjsOperationIdTransform(id: string): string;
84
+ export declare function schemaNameTransform(name: string): string;
85
85
  /**
86
86
  * Pre-IR spec overlay — patch around upstream spec quirks that would otherwise
87
87
  * emit breaking SDK changes. See docs/breaking-change-playbook.md and the
88
88
  * oagen `transformSpec` docs for usage. Reach for this only when the upstream
89
89
  * fix can't land in time AND the change is genuinely additive.
90
90
  */
91
- declare function transformSpec(spec: OpenApiDocument): OpenApiDocument;
91
+ export declare function transformSpec(spec: OpenApiDocument): OpenApiDocument;
92
92
  //#endregion
93
- export { type OpenApiDocument, type OperationHint, type SplitHint, modelHints, mountRules, nestjsOperationIdTransform, operationHints, schemaNameTransform, transformSpec };
93
+ export type { OpenApiDocument, OperationHint, SplitHint };
@@ -1,12 +1,11 @@
1
1
  //#region src/policy/services.generated.d.ts
2
- declare const services: readonly ["AdminPortal", "Agents", "ApiKeys", "AuditLogs", "Authorization", "ClientApi", "Connect", "DirectorySync", "Events", "FeatureFlags", "Groups", "MultiFactorAuth", "OrganizationDomains", "OrganizationMembership", "Organizations", "Pipes", "PipesProvider", "PlatformTeams", "Radar", "SSO", "UserManagement", "Vault", "Webhooks", "Widgets"];
3
- type ServiceName = (typeof services)[number];
4
- interface ServiceEndpoint {
2
+ export declare const services: readonly ["AdminPortal", "Agents", "ApiKeys", "AuditLogs", "Authorization", "ClientApi", "Connect", "DirectorySync", "Events", "FeatureFlags", "Groups", "MultiFactorAuth", "OrganizationDomains", "OrganizationMembership", "Organizations", "Pipes", "PipesProvider", "PlatformTeams", "Radar", "SSO", "UserManagement", "Vault", "Webhooks", "Widgets"];
3
+ export type ServiceName = (typeof services)[number];
4
+ export interface ServiceEndpoint {
5
5
  method: string;
6
6
  path: string;
7
7
  name?: string;
8
8
  }
9
- declare const serviceEndpoints: Record<string, ServiceEndpoint[]>;
10
- declare const serviceAliases: Record<string, ServiceName>;
11
- //#endregion
12
- export { ServiceEndpoint, ServiceName, serviceAliases, serviceEndpoints, services };
9
+ export declare const serviceEndpoints: Record<string, ServiceEndpoint[]>;
10
+ export declare const serviceAliases: Record<string, ServiceName>;
11
+ //#endregion
package/dist/types.d.ts CHANGED
@@ -1424,7 +1424,7 @@ export interface paths {
1424
1424
  put?: never;
1425
1425
  /**
1426
1426
  * Create a data integration
1427
- * @description 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. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
1427
+ * @description 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.
1428
1428
  */
1429
1429
  post: operations["DataIntegrationsManagementController_createDataIntegration"];
1430
1430
  delete?: never;
@@ -5265,6 +5265,12 @@ export interface components {
5265
5265
  * @example github
5266
5266
  */
5267
5267
  provider: string;
5268
+ /**
5269
+ * @description Who owns the Data Integration. `userland_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`.
5270
+ * @example userland_user
5271
+ * @enum {string}
5272
+ */
5273
+ ownership?: "userland_user" | "organization";
5268
5274
  /**
5269
5275
  * @description An optional description of the Data Integration.
5270
5276
  * @example Production GitHub app
@@ -5431,12 +5437,12 @@ export interface components {
5431
5437
  };
5432
5438
  GenerateLinkDto: {
5433
5439
  /**
5434
- * @description The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
5440
+ * @description The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
5435
5441
  * @example https://example.com/admin-portal/return
5436
5442
  */
5437
5443
  return_url?: string;
5438
5444
  /**
5439
- * @description The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
5445
+ * @description The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
5440
5446
  * @example https://example.com/admin-portal/success
5441
5447
  */
5442
5448
  success_url?: string;
@@ -17322,6 +17328,12 @@ export interface components {
17322
17328
  * @example github
17323
17329
  */
17324
17330
  integration_type: string;
17331
+ /**
17332
+ * @description Who owns the Data Integration: `userland_user` when users connect their own accounts, `organization` when organizations connect. Fixed at creation.
17333
+ * @example userland_user
17334
+ * @enum {string}
17335
+ */
17336
+ ownership: "userland_user" | "organization";
17325
17337
  /**
17326
17338
  * @description An optional description of the Data Integration.
17327
17339
  * @example Production GitHub app
@@ -17388,12 +17400,12 @@ export interface components {
17388
17400
  */
17389
17401
  id: string;
17390
17402
  /**
17391
- * @description The User the API key was installed for.
17403
+ * @description The User the API key was installed for. Null on an `organization`-owned integration, whose installations belong to the organization.
17392
17404
  * @example user_01EHZNVPK3SFK441A1RGBFSHRT
17393
17405
  */
17394
- user_id: string;
17406
+ user_id: string | null;
17395
17407
  /**
17396
- * @description The Organization the installation is scoped to, or null when unscoped.
17408
+ * @description The Organization the installation is scoped to (or owned by, on an `organization`-owned integration), or null when unscoped.
17397
17409
  * @example null
17398
17410
  */
17399
17411
  organization_id: string | null;
@@ -29189,12 +29201,12 @@ export interface operations {
29189
29201
  content: {
29190
29202
  "application/json": {
29191
29203
  /**
29192
- * @description A [User](/reference/authkit/user) identifier.
29204
+ * @description A [User](/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.
29193
29205
  * @example user_01EHZNVPK3SFK441A1RGBFSHRT
29194
29206
  */
29195
29207
  user_id: string;
29196
29208
  /**
29197
- * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
29209
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
29198
29210
  * @example org_01EHZNVPK3SFK441A1RGBFSHRT
29199
29211
  */
29200
29212
  organization_id?: string;
@@ -29203,6 +29215,12 @@ export interface operations {
29203
29215
  * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
29204
29216
  */
29205
29217
  connected_account_id?: string;
29218
+ /**
29219
+ * @description 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`.
29220
+ * @example user
29221
+ * @enum {string}
29222
+ */
29223
+ connection_owner?: "user" | "organization";
29206
29224
  };
29207
29225
  };
29208
29226
  };
@@ -29254,6 +29272,21 @@ export interface operations {
29254
29272
  };
29255
29273
  content?: never;
29256
29274
  };
29275
+ /** @description The user is not an active member of the organization named for an organization connection. */
29276
+ 403: {
29277
+ headers: {
29278
+ [name: string]: unknown;
29279
+ };
29280
+ content: {
29281
+ "application/json": {
29282
+ /**
29283
+ * @description A human-readable description of the error.
29284
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
29285
+ */
29286
+ message: string;
29287
+ };
29288
+ };
29289
+ };
29257
29290
  /** @description The data integration or selected connected account was not found. */
29258
29291
  404: {
29259
29292
  headers: {
@@ -29315,12 +29348,12 @@ export interface operations {
29315
29348
  content: {
29316
29349
  "application/json": {
29317
29350
  /**
29318
- * @description A [User](/reference/authkit/user) identifier.
29351
+ * @description A [User](/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.
29319
29352
  * @example user_01EHZNVPK3SFK441A1RGBFSHRT
29320
29353
  */
29321
29354
  user_id: string;
29322
29355
  /**
29323
- * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
29356
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
29324
29357
  * @example org_01EHZNVPK3SFK441A1RGBFSHRT
29325
29358
  */
29326
29359
  organization_id?: string;
@@ -29329,6 +29362,12 @@ export interface operations {
29329
29362
  * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
29330
29363
  */
29331
29364
  connected_account_id?: string;
29365
+ /**
29366
+ * @description 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`.
29367
+ * @example user
29368
+ * @enum {string}
29369
+ */
29370
+ connection_owner?: "user" | "organization";
29332
29371
  };
29333
29372
  };
29334
29373
  };
@@ -29364,6 +29403,21 @@ export interface operations {
29364
29403
  };
29365
29404
  content?: never;
29366
29405
  };
29406
+ /** @description The user is not an active member of the organization named for an organization connection. */
29407
+ 403: {
29408
+ headers: {
29409
+ [name: string]: unknown;
29410
+ };
29411
+ content: {
29412
+ "application/json": {
29413
+ /**
29414
+ * @description A human-readable description of the error.
29415
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
29416
+ */
29417
+ message: string;
29418
+ };
29419
+ };
29420
+ };
29367
29421
  /** @description The data integration or selected connected account was not found. */
29368
29422
  404: {
29369
29423
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos/openapi-spec",
3
- "version": "0.83.0",
3
+ "version": "0.85.0",
4
4
  "type": "module",
5
5
  "description": "WorkOS OpenAPI specification, TypeScript types, and SDK resolution policy",
6
6
  "license": "MIT",
@@ -56,14 +56,14 @@
56
56
  "lodash": "^4.17.23"
57
57
  },
58
58
  "devDependencies": {
59
- "@types/node": "^26.4.1",
60
- "@workos/oagen": "^0.30.0",
59
+ "@types/node": "^26.5.0",
60
+ "@workos/oagen": "^0.30.1",
61
61
  "@workos/oagen-emitters": "^0.24.11",
62
62
  "diff2html": "^3.4.56",
63
63
  "husky": "^9.1.7",
64
64
  "js-yaml": "^5.4.1",
65
65
  "openapi-to-postmanv2": "^6.3.3",
66
- "tsdown": "^0.22.14",
66
+ "tsdown": "^0.23.0",
67
67
  "tsx": "^4.23.13",
68
68
  "typescript": "^7.0.2"
69
69
  }