@workos/openapi-spec 0.84.0 → 0.86.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:
@@ -10613,6 +10617,14 @@ paths:
10613
10617
  Optional parameter to scope the connection to a specific
10614
10618
  organization.
10615
10619
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
10620
+ connected_account_id:
10621
+ type: string
10622
+ pattern: ^data_installation_.+$
10623
+ description: >-
10624
+ A [connected account](/reference/pipes/connected-account)
10625
+ identifier. Use this to rotate a specific existing
10626
+ connection.
10627
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
10616
10628
  secret:
10617
10629
  type: string
10618
10630
  minLength: 1
@@ -10668,7 +10680,7 @@ paths:
10668
10680
  required:
10669
10681
  - message
10670
10682
  '404':
10671
- description: Data integration not found for the given provider slug.
10683
+ description: The data integration or selected connected account was not found.
10672
10684
  content:
10673
10685
  application/json:
10674
10686
  schema:
@@ -10687,14 +10699,7 @@ paths:
10687
10699
  content:
10688
10700
  application/json:
10689
10701
  schema:
10690
- type: object
10691
- properties:
10692
- message:
10693
- type: string
10694
- description: A human-readable description of the error.
10695
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
10696
- required:
10697
- - message
10702
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
10698
10703
  '422':
10699
10704
  description: >-
10700
10705
  The matched installation uses a different auth method than this
@@ -10843,6 +10848,14 @@ paths:
10843
10848
  Optional parameter to scope the connection to a specific
10844
10849
  organization.
10845
10850
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
10851
+ connected_account_id:
10852
+ type: string
10853
+ pattern: ^data_installation_.+$
10854
+ description: >-
10855
+ A [connected account](/reference/pipes/connected-account)
10856
+ identifier. Use this to rotate a specific existing
10857
+ connection.
10858
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
10846
10859
  client_id:
10847
10860
  type: string
10848
10861
  minLength: 1
@@ -10913,7 +10926,7 @@ paths:
10913
10926
  required:
10914
10927
  - message
10915
10928
  '404':
10916
- description: Data integration not found for the given provider slug.
10929
+ description: The data integration or selected connected account was not found.
10917
10930
  content:
10918
10931
  application/json:
10919
10932
  schema:
@@ -10932,14 +10945,7 @@ paths:
10932
10945
  content:
10933
10946
  application/json:
10934
10947
  schema:
10935
- type: object
10936
- properties:
10937
- message:
10938
- type: string
10939
- description: A human-readable description of the error.
10940
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
10941
- required:
10942
- - message
10948
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
10943
10949
  '422':
10944
10950
  description: >-
10945
10951
  The matched installation uses a different auth method than this
@@ -10975,14 +10981,19 @@ paths:
10975
10981
  properties:
10976
10982
  user_id:
10977
10983
  type: string
10978
- description: A [User](/reference/authkit/user) identifier.
10984
+ description: >-
10985
+ A [User](/reference/authkit/user) identifier. When
10986
+ `connection_owner` is `organization`, this is the user the
10987
+ credentials are vended on behalf of; they must be an active
10988
+ member of the organization.
10979
10989
  example: user_01EHZNVPK3SFK441A1RGBFSHRT
10980
10990
  organization_id:
10981
10991
  type: string
10982
10992
  description: >-
10983
10993
  An [Organization](/reference/organization) identifier.
10984
10994
  Optional parameter to scope the connection to a specific
10985
- organization.
10995
+ organization. Required when `connection_owner` is
10996
+ `organization`.
10986
10997
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
10987
10998
  connected_account_id:
10988
10999
  type: string
@@ -10992,6 +11003,17 @@ paths:
10992
11003
  identifier. Use this to select a specific connection when
10993
11004
  the user has several for this provider.
10994
11005
  example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
11006
+ connection_owner:
11007
+ type: string
11008
+ enum:
11009
+ - user
11010
+ - organization
11011
+ description: >-
11012
+ Which connection to vend from. `user` (the default) vends
11013
+ the user's own connection and requires `user_id`.
11014
+ `organization` vends the organization's shared connection
11015
+ and requires `organization_id`.
11016
+ example: user
10995
11017
  required:
10996
11018
  - user_id
10997
11019
  responses:
@@ -11027,8 +11049,10 @@ paths:
11027
11049
  - message
11028
11050
  '401':
11029
11051
  description: Unauthorized
11030
- '404':
11031
- description: The data integration or selected connected account was not found.
11052
+ '403':
11053
+ description: >-
11054
+ The user is not an active member of the organization named for an
11055
+ organization connection.
11032
11056
  content:
11033
11057
  application/json:
11034
11058
  schema:
@@ -11040,10 +11064,8 @@ paths:
11040
11064
  example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
11041
11065
  required:
11042
11066
  - message
11043
- '409':
11044
- description: >-
11045
- Several connected accounts match this user for the provider; one
11046
- must be named.
11067
+ '404':
11068
+ description: The data integration or selected connected account was not found.
11047
11069
  content:
11048
11070
  application/json:
11049
11071
  schema:
@@ -11055,6 +11077,14 @@ paths:
11055
11077
  example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
11056
11078
  required:
11057
11079
  - message
11080
+ '409':
11081
+ description: >-
11082
+ Several connected accounts match this user for the provider; one
11083
+ must be named.
11084
+ content:
11085
+ application/json:
11086
+ schema:
11087
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
11058
11088
  '422':
11059
11089
  description: >-
11060
11090
  The installation uses an auth method that is not yet supported by
@@ -11097,14 +11127,19 @@ paths:
11097
11127
  properties:
11098
11128
  user_id:
11099
11129
  type: string
11100
- description: A [User](/reference/authkit/user) identifier.
11130
+ description: >-
11131
+ A [User](/reference/authkit/user) identifier. When
11132
+ `connection_owner` is `organization`, this is the user the
11133
+ credentials are vended on behalf of; they must be an active
11134
+ member of the organization.
11101
11135
  example: user_01EHZNVPK3SFK441A1RGBFSHRT
11102
11136
  organization_id:
11103
11137
  type: string
11104
11138
  description: >-
11105
11139
  An [Organization](/reference/organization) identifier.
11106
11140
  Optional parameter to scope the connection to a specific
11107
- organization.
11141
+ organization. Required when `connection_owner` is
11142
+ `organization`.
11108
11143
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
11109
11144
  connected_account_id:
11110
11145
  type: string
@@ -11114,6 +11149,17 @@ paths:
11114
11149
  identifier. Use this to select a specific connection when
11115
11150
  the user has several for this provider.
11116
11151
  example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
11152
+ connection_owner:
11153
+ type: string
11154
+ enum:
11155
+ - user
11156
+ - organization
11157
+ description: >-
11158
+ Which connection to vend from. `user` (the default) vends
11159
+ the user's own connection and requires `user_id`.
11160
+ `organization` vends the organization's shared connection
11161
+ and requires `organization_id`.
11162
+ example: user
11117
11163
  required:
11118
11164
  - user_id
11119
11165
  responses:
@@ -11138,8 +11184,10 @@ paths:
11138
11184
  - message
11139
11185
  '401':
11140
11186
  description: Unauthorized
11141
- '404':
11142
- description: The data integration or selected connected account was not found.
11187
+ '403':
11188
+ description: >-
11189
+ The user is not an active member of the organization named for an
11190
+ organization connection.
11143
11191
  content:
11144
11192
  application/json:
11145
11193
  schema:
@@ -11151,10 +11199,8 @@ paths:
11151
11199
  example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
11152
11200
  required:
11153
11201
  - message
11154
- '409':
11155
- description: >-
11156
- Several connected accounts match this user for the provider; one
11157
- must be named.
11202
+ '404':
11203
+ description: The data integration or selected connected account was not found.
11158
11204
  content:
11159
11205
  application/json:
11160
11206
  schema:
@@ -11166,6 +11212,14 @@ paths:
11166
11212
  example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
11167
11213
  required:
11168
11214
  - message
11215
+ '409':
11216
+ description: >-
11217
+ Several connected accounts match this user for the provider; one
11218
+ must be named.
11219
+ content:
11220
+ application/json:
11221
+ schema:
11222
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
11169
11223
  '422':
11170
11224
  description: >-
11171
11225
  The matched installation uses a different auth method than this
@@ -22225,14 +22279,7 @@ paths:
22225
22279
  content:
22226
22280
  application/json:
22227
22281
  schema:
22228
- type: object
22229
- properties:
22230
- message:
22231
- type: string
22232
- description: A human-readable description of the error.
22233
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
22234
- required:
22235
- - message
22282
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
22236
22283
  summary: Get a connected account
22237
22284
  tags:
22238
22285
  - user-management.data-providers
@@ -22316,14 +22363,7 @@ paths:
22316
22363
  content:
22317
22364
  application/json:
22318
22365
  schema:
22319
- type: object
22320
- properties:
22321
- message:
22322
- type: string
22323
- description: A human-readable description of the error.
22324
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
22325
- required:
22326
- - message
22366
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
22327
22367
  summary: Delete a connected account
22328
22368
  tags:
22329
22369
  - user-management.data-providers
@@ -22510,14 +22550,7 @@ paths:
22510
22550
  content:
22511
22551
  application/json:
22512
22552
  schema:
22513
- type: object
22514
- properties:
22515
- message:
22516
- type: string
22517
- description: A human-readable description of the error.
22518
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
22519
- required:
22520
- - message
22553
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
22521
22554
  summary: Update a connected account
22522
22555
  tags:
22523
22556
  - user-management.data-providers
@@ -26408,6 +26441,18 @@ components:
26408
26441
  be supplied. A custom provider slug cannot shadow an existing global
26409
26442
  provider slug.
26410
26443
  example: github
26444
+ ownership:
26445
+ type: string
26446
+ enum:
26447
+ - userland_user
26448
+ - organization
26449
+ description: >-
26450
+ Who owns the Data Integration. `userland_user` (the default) creates
26451
+ the integration users connect their own accounts to; `organization`
26452
+ creates the root organizations connect to. Ownership is fixed at
26453
+ creation, and one integration of each ownership may exist per
26454
+ provider. Independent of `credentials.type`.
26455
+ example: userland_user
26411
26456
  description:
26412
26457
  type:
26413
26458
  - string
@@ -42370,6 +42415,16 @@ components:
42370
42415
  type: string
42371
42416
  description: The integration type derived from the provider.
42372
42417
  example: github
42418
+ ownership:
42419
+ type: string
42420
+ enum:
42421
+ - userland_user
42422
+ - organization
42423
+ description: >-
42424
+ Who owns the Data Integration: `userland_user` when users connect
42425
+ their own accounts, `organization` when organizations connect. Fixed
42426
+ at creation.
42427
+ example: userland_user
42373
42428
  description:
42374
42429
  type:
42375
42430
  - string
@@ -42477,15 +42532,21 @@ components:
42477
42532
  description: Unique identifier of the installation.
42478
42533
  example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
42479
42534
  user_id:
42480
- type: string
42481
- description: The User the API key was installed for.
42535
+ type:
42536
+ - string
42537
+ - 'null'
42538
+ description: >-
42539
+ The User the API key was installed for. Null on an
42540
+ `organization`-owned integration, whose installations belong
42541
+ to the organization.
42482
42542
  example: user_01EHZNVPK3SFK441A1RGBFSHRT
42483
42543
  organization_id:
42484
42544
  type:
42485
42545
  - string
42486
42546
  - 'null'
42487
42547
  description: >-
42488
- The Organization the installation is scoped to, or null when
42548
+ The Organization the installation is scoped to (or owned by,
42549
+ on an `organization`-owned integration), or null when
42489
42550
  unscoped.
42490
42551
  example: null
42491
42552
  api_key_last_4:
@@ -42611,6 +42672,7 @@ components:
42611
42672
  - id
42612
42673
  - slug
42613
42674
  - integration_type
42675
+ - ownership
42614
42676
  - description
42615
42677
  - enabled
42616
42678
  - state
@@ -42752,6 +42814,25 @@ components:
42752
42814
  required:
42753
42815
  - active
42754
42816
  - error
42817
+ AccountSelectionRequiredError:
42818
+ type: object
42819
+ properties:
42820
+ code:
42821
+ type: string
42822
+ description: >-
42823
+ Indicates that several connected accounts match and the request must
42824
+ name one.
42825
+ example: account_selection_required
42826
+ const: account_selection_required
42827
+ message:
42828
+ type: string
42829
+ description: A human-readable explanation of the ambiguity.
42830
+ example: >-
42831
+ Several connected accounts match this user for this provider. Name
42832
+ one with a connected account id.
42833
+ required:
42834
+ - code
42835
+ - message
42755
42836
  AuthMethodMismatchError:
42756
42837
  type: object
42757
42838
  properties:
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
@@ -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;
@@ -17568,6 +17580,19 @@ export interface components {
17568
17580
  */
17569
17581
  error: "needs_reauthorization" | "not_installed";
17570
17582
  };
17583
+ AccountSelectionRequiredError: {
17584
+ /**
17585
+ * @description Indicates that several connected accounts match and the request must name one.
17586
+ * @example account_selection_required
17587
+ * @constant
17588
+ */
17589
+ code: "account_selection_required";
17590
+ /**
17591
+ * @description A human-readable explanation of the ambiguity.
17592
+ * @example Several connected accounts match this user for this provider. Name one with a connected account id.
17593
+ */
17594
+ message: string;
17595
+ };
17571
17596
  AuthMethodMismatchError: {
17572
17597
  /**
17573
17598
  * @description Error code indicating the endpoint does not match the installation auth method.
@@ -28814,6 +28839,11 @@ export interface operations {
28814
28839
  * @example org_01EHZNVPK3SFK441A1RGBFSHRT
28815
28840
  */
28816
28841
  organization_id?: string;
28842
+ /**
28843
+ * @description A [connected account](/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
28844
+ * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
28845
+ */
28846
+ connected_account_id?: string;
28817
28847
  /**
28818
28848
  * @description The API key secret to store for this integration.
28819
28849
  * @example sk-1234567890abcdef
@@ -28883,7 +28913,7 @@ export interface operations {
28883
28913
  };
28884
28914
  };
28885
28915
  };
28886
- /** @description Data integration not found for the given provider slug. */
28916
+ /** @description The data integration or selected connected account was not found. */
28887
28917
  404: {
28888
28918
  headers: {
28889
28919
  [name: string]: unknown;
@@ -28904,13 +28934,7 @@ export interface operations {
28904
28934
  [name: string]: unknown;
28905
28935
  };
28906
28936
  content: {
28907
- "application/json": {
28908
- /**
28909
- * @description A human-readable description of the error.
28910
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
28911
- */
28912
- message: string;
28913
- };
28937
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
28914
28938
  };
28915
28939
  };
28916
28940
  /** @description The matched installation uses a different auth method than this endpoint expects. */
@@ -29052,6 +29076,11 @@ export interface operations {
29052
29076
  * @example org_01EHZNVPK3SFK441A1RGBFSHRT
29053
29077
  */
29054
29078
  organization_id?: string;
29079
+ /**
29080
+ * @description A [connected account](/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
29081
+ * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
29082
+ */
29083
+ connected_account_id?: string;
29055
29084
  /**
29056
29085
  * @description The OAuth client ID to store for this integration.
29057
29086
  * @example 3MVG9...
@@ -29134,7 +29163,7 @@ export interface operations {
29134
29163
  };
29135
29164
  };
29136
29165
  };
29137
- /** @description Data integration not found for the given provider slug. */
29166
+ /** @description The data integration or selected connected account was not found. */
29138
29167
  404: {
29139
29168
  headers: {
29140
29169
  [name: string]: unknown;
@@ -29155,13 +29184,7 @@ export interface operations {
29155
29184
  [name: string]: unknown;
29156
29185
  };
29157
29186
  content: {
29158
- "application/json": {
29159
- /**
29160
- * @description A human-readable description of the error.
29161
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
29162
- */
29163
- message: string;
29164
- };
29187
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
29165
29188
  };
29166
29189
  };
29167
29190
  /** @description The matched installation uses a different auth method than this endpoint expects. */
@@ -29189,12 +29212,12 @@ export interface operations {
29189
29212
  content: {
29190
29213
  "application/json": {
29191
29214
  /**
29192
- * @description A [User](/reference/authkit/user) identifier.
29215
+ * @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
29216
  * @example user_01EHZNVPK3SFK441A1RGBFSHRT
29194
29217
  */
29195
29218
  user_id: string;
29196
29219
  /**
29197
- * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
29220
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
29198
29221
  * @example org_01EHZNVPK3SFK441A1RGBFSHRT
29199
29222
  */
29200
29223
  organization_id?: string;
@@ -29203,6 +29226,12 @@ export interface operations {
29203
29226
  * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
29204
29227
  */
29205
29228
  connected_account_id?: string;
29229
+ /**
29230
+ * @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`.
29231
+ * @example user
29232
+ * @enum {string}
29233
+ */
29234
+ connection_owner?: "user" | "organization";
29206
29235
  };
29207
29236
  };
29208
29237
  };
@@ -29254,8 +29283,8 @@ export interface operations {
29254
29283
  };
29255
29284
  content?: never;
29256
29285
  };
29257
- /** @description The data integration or selected connected account was not found. */
29258
- 404: {
29286
+ /** @description The user is not an active member of the organization named for an organization connection. */
29287
+ 403: {
29259
29288
  headers: {
29260
29289
  [name: string]: unknown;
29261
29290
  };
@@ -29269,8 +29298,8 @@ export interface operations {
29269
29298
  };
29270
29299
  };
29271
29300
  };
29272
- /** @description Several connected accounts match this user for the provider; one must be named. */
29273
- 409: {
29301
+ /** @description The data integration or selected connected account was not found. */
29302
+ 404: {
29274
29303
  headers: {
29275
29304
  [name: string]: unknown;
29276
29305
  };
@@ -29284,6 +29313,15 @@ export interface operations {
29284
29313
  };
29285
29314
  };
29286
29315
  };
29316
+ /** @description Several connected accounts match this user for the provider; one must be named. */
29317
+ 409: {
29318
+ headers: {
29319
+ [name: string]: unknown;
29320
+ };
29321
+ content: {
29322
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
29323
+ };
29324
+ };
29287
29325
  /** @description The installation uses an auth method that is not yet supported by this endpoint. */
29288
29326
  422: {
29289
29327
  headers: {
@@ -29315,12 +29353,12 @@ export interface operations {
29315
29353
  content: {
29316
29354
  "application/json": {
29317
29355
  /**
29318
- * @description A [User](/reference/authkit/user) identifier.
29356
+ * @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
29357
  * @example user_01EHZNVPK3SFK441A1RGBFSHRT
29320
29358
  */
29321
29359
  user_id: string;
29322
29360
  /**
29323
- * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
29361
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
29324
29362
  * @example org_01EHZNVPK3SFK441A1RGBFSHRT
29325
29363
  */
29326
29364
  organization_id?: string;
@@ -29329,6 +29367,12 @@ export interface operations {
29329
29367
  * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
29330
29368
  */
29331
29369
  connected_account_id?: string;
29370
+ /**
29371
+ * @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`.
29372
+ * @example user
29373
+ * @enum {string}
29374
+ */
29375
+ connection_owner?: "user" | "organization";
29332
29376
  };
29333
29377
  };
29334
29378
  };
@@ -29364,8 +29408,8 @@ export interface operations {
29364
29408
  };
29365
29409
  content?: never;
29366
29410
  };
29367
- /** @description The data integration or selected connected account was not found. */
29368
- 404: {
29411
+ /** @description The user is not an active member of the organization named for an organization connection. */
29412
+ 403: {
29369
29413
  headers: {
29370
29414
  [name: string]: unknown;
29371
29415
  };
@@ -29379,8 +29423,8 @@ export interface operations {
29379
29423
  };
29380
29424
  };
29381
29425
  };
29382
- /** @description Several connected accounts match this user for the provider; one must be named. */
29383
- 409: {
29426
+ /** @description The data integration or selected connected account was not found. */
29427
+ 404: {
29384
29428
  headers: {
29385
29429
  [name: string]: unknown;
29386
29430
  };
@@ -29394,6 +29438,15 @@ export interface operations {
29394
29438
  };
29395
29439
  };
29396
29440
  };
29441
+ /** @description Several connected accounts match this user for the provider; one must be named. */
29442
+ 409: {
29443
+ headers: {
29444
+ [name: string]: unknown;
29445
+ };
29446
+ content: {
29447
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
29448
+ };
29449
+ };
29397
29450
  /** @description The matched installation uses a different auth method than this endpoint expects. */
29398
29451
  422: {
29399
29452
  headers: {
@@ -38921,13 +38974,7 @@ export interface operations {
38921
38974
  [name: string]: unknown;
38922
38975
  };
38923
38976
  content: {
38924
- "application/json": {
38925
- /**
38926
- * @description A human-readable description of the error.
38927
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
38928
- */
38929
- message: string;
38930
- };
38977
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
38931
38978
  };
38932
38979
  };
38933
38980
  };
@@ -39007,13 +39054,7 @@ export interface operations {
39007
39054
  [name: string]: unknown;
39008
39055
  };
39009
39056
  content: {
39010
- "application/json": {
39011
- /**
39012
- * @description A human-readable description of the error.
39013
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
39014
- */
39015
- message: string;
39016
- };
39057
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
39017
39058
  };
39018
39059
  };
39019
39060
  };
@@ -39171,13 +39212,7 @@ export interface operations {
39171
39212
  [name: string]: unknown;
39172
39213
  };
39173
39214
  content: {
39174
- "application/json": {
39175
- /**
39176
- * @description A human-readable description of the error.
39177
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
39178
- */
39179
- message: string;
39180
- };
39215
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
39181
39216
  };
39182
39217
  };
39183
39218
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos/openapi-spec",
3
- "version": "0.84.0",
3
+ "version": "0.86.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
  }