@workos/openapi-spec 0.85.0 → 0.87.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.
@@ -10588,8 +10588,9 @@ paths:
10588
10588
  put:
10589
10589
  description: >-
10590
10590
  Creates or updates an API-key-based installation for the specified
10591
- integration and user. If an installation already exists, the stored API
10592
- key is rotated to the new value.
10591
+ integration, owned by the user or, when `connection_owner` is
10592
+ `organization`, shared by the organization. If an installation already
10593
+ exists, the stored API key is rotated to the new value.
10593
10594
  operationId: DataIntegrationsController_upsertApiKey
10594
10595
  parameters:
10595
10596
  - name: slug
@@ -10615,8 +10616,30 @@ paths:
10615
10616
  description: >-
10616
10617
  An [Organization](/reference/organization) identifier.
10617
10618
  Optional parameter to scope the connection to a specific
10618
- organization.
10619
+ organization. Required when `connection_owner` is
10620
+ `organization`.
10619
10621
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
10622
+ connected_account_id:
10623
+ type: string
10624
+ pattern: ^data_installation_.+$
10625
+ description: >-
10626
+ A [connected account](/reference/pipes/connected-account)
10627
+ identifier. Use this to rotate a specific existing
10628
+ connection.
10629
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
10630
+ connection_owner:
10631
+ type: string
10632
+ enum:
10633
+ - user
10634
+ - organization
10635
+ description: >-
10636
+ Whose connection to create or rotate. `user` (the default)
10637
+ addresses the connection owned by `user_id`. `organization`
10638
+ addresses the connection shared by every member of
10639
+ `organization_id`; `user_id` then identifies the member
10640
+ performing the request and must be an active member of the
10641
+ organization.
10642
+ example: user
10620
10643
  secret:
10621
10644
  type: string
10622
10645
  minLength: 1
@@ -10672,7 +10695,7 @@ paths:
10672
10695
  required:
10673
10696
  - message
10674
10697
  '404':
10675
- description: Data integration not found for the given provider slug.
10698
+ description: The data integration or selected connected account was not found.
10676
10699
  content:
10677
10700
  application/json:
10678
10701
  schema:
@@ -10686,19 +10709,12 @@ paths:
10686
10709
  - message
10687
10710
  '409':
10688
10711
  description: >-
10689
- Several connected accounts match this user for the provider; one
10690
- must be named.
10712
+ Several connected accounts match the connection owner for the
10713
+ provider; one must be named.
10691
10714
  content:
10692
10715
  application/json:
10693
10716
  schema:
10694
- type: object
10695
- properties:
10696
- message:
10697
- type: string
10698
- description: A human-readable description of the error.
10699
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
10700
- required:
10701
- - message
10717
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
10702
10718
  '422':
10703
10719
  description: >-
10704
10720
  The matched installation uses a different auth method than this
@@ -10818,8 +10834,9 @@ paths:
10818
10834
  put:
10819
10835
  description: >-
10820
10836
  Creates or updates a client-credentials-based installation for the
10821
- specified integration and user. If an installation already exists, the
10822
- stored client credentials are rotated to the new values.
10837
+ specified integration, owned by the user or, when `connection_owner` is
10838
+ `organization`, shared by the organization. If an installation already
10839
+ exists, the stored client credentials are rotated to the new values.
10823
10840
  operationId: DataIntegrationsController_upsertClientCredentials
10824
10841
  parameters:
10825
10842
  - name: slug
@@ -10845,8 +10862,30 @@ paths:
10845
10862
  description: >-
10846
10863
  An [Organization](/reference/organization) identifier.
10847
10864
  Optional parameter to scope the connection to a specific
10848
- organization.
10865
+ organization. Required when `connection_owner` is
10866
+ `organization`.
10849
10867
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
10868
+ connected_account_id:
10869
+ type: string
10870
+ pattern: ^data_installation_.+$
10871
+ description: >-
10872
+ A [connected account](/reference/pipes/connected-account)
10873
+ identifier. Use this to rotate a specific existing
10874
+ connection.
10875
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
10876
+ connection_owner:
10877
+ type: string
10878
+ enum:
10879
+ - user
10880
+ - organization
10881
+ description: >-
10882
+ Whose connection to create or rotate. `user` (the default)
10883
+ addresses the connection owned by `user_id`. `organization`
10884
+ addresses the connection shared by every member of
10885
+ `organization_id`; `user_id` then identifies the member
10886
+ performing the request and must be an active member of the
10887
+ organization.
10888
+ example: user
10850
10889
  client_id:
10851
10890
  type: string
10852
10891
  minLength: 1
@@ -10917,7 +10956,7 @@ paths:
10917
10956
  required:
10918
10957
  - message
10919
10958
  '404':
10920
- description: Data integration not found for the given provider slug.
10959
+ description: The data integration or selected connected account was not found.
10921
10960
  content:
10922
10961
  application/json:
10923
10962
  schema:
@@ -10931,19 +10970,12 @@ paths:
10931
10970
  - message
10932
10971
  '409':
10933
10972
  description: >-
10934
- Several connected accounts match this user for the provider; one
10935
- must be named.
10973
+ Several connected accounts match the connection owner for the
10974
+ provider; one must be named.
10936
10975
  content:
10937
10976
  application/json:
10938
10977
  schema:
10939
- type: object
10940
- properties:
10941
- message:
10942
- type: string
10943
- description: A human-readable description of the error.
10944
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
10945
- required:
10946
- - message
10978
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
10947
10979
  '422':
10948
10980
  description: >-
10949
10981
  The matched installation uses a different auth method than this
@@ -11082,14 +11114,7 @@ paths:
11082
11114
  content:
11083
11115
  application/json:
11084
11116
  schema:
11085
- type: object
11086
- properties:
11087
- message:
11088
- type: string
11089
- description: A human-readable description of the error.
11090
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
11091
- required:
11092
- - message
11117
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
11093
11118
  '422':
11094
11119
  description: >-
11095
11120
  The installation uses an auth method that is not yet supported by
@@ -11224,14 +11249,7 @@ paths:
11224
11249
  content:
11225
11250
  application/json:
11226
11251
  schema:
11227
- type: object
11228
- properties:
11229
- message:
11230
- type: string
11231
- description: A human-readable description of the error.
11232
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
11233
- required:
11234
- - message
11252
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
11235
11253
  '422':
11236
11254
  description: >-
11237
11255
  The matched installation uses a different auth method than this
@@ -22291,14 +22309,7 @@ paths:
22291
22309
  content:
22292
22310
  application/json:
22293
22311
  schema:
22294
- type: object
22295
- properties:
22296
- message:
22297
- type: string
22298
- description: A human-readable description of the error.
22299
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
22300
- required:
22301
- - message
22312
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
22302
22313
  summary: Get a connected account
22303
22314
  tags:
22304
22315
  - user-management.data-providers
@@ -22382,14 +22393,7 @@ paths:
22382
22393
  content:
22383
22394
  application/json:
22384
22395
  schema:
22385
- type: object
22386
- properties:
22387
- message:
22388
- type: string
22389
- description: A human-readable description of the error.
22390
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
22391
- required:
22392
- - message
22396
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
22393
22397
  summary: Delete a connected account
22394
22398
  tags:
22395
22399
  - user-management.data-providers
@@ -22576,14 +22580,7 @@ paths:
22576
22580
  content:
22577
22581
  application/json:
22578
22582
  schema:
22579
- type: object
22580
- properties:
22581
- message:
22582
- type: string
22583
- description: A human-readable description of the error.
22584
- example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
22585
- required:
22586
- - message
22583
+ $ref: '#/components/schemas/AccountSelectionRequiredError'
22587
22584
  summary: Update a connected account
22588
22585
  tags:
22589
22586
  - user-management.data-providers
@@ -42847,6 +42844,25 @@ components:
42847
42844
  required:
42848
42845
  - active
42849
42846
  - error
42847
+ AccountSelectionRequiredError:
42848
+ type: object
42849
+ properties:
42850
+ code:
42851
+ type: string
42852
+ description: >-
42853
+ Indicates that several connected accounts match and the request must
42854
+ name one.
42855
+ example: account_selection_required
42856
+ const: account_selection_required
42857
+ message:
42858
+ type: string
42859
+ description: A human-readable explanation of the ambiguity.
42860
+ example: >-
42861
+ Several connected accounts match this user for this provider. Name
42862
+ one with a connected account id.
42863
+ required:
42864
+ - code
42865
+ - message
42850
42866
  AuthMethodMismatchError:
42851
42867
  type: object
42852
42868
  properties:
package/dist/types.d.ts CHANGED
@@ -1471,7 +1471,7 @@ export interface paths {
1471
1471
  get?: never;
1472
1472
  /**
1473
1473
  * Upsert an API key for a connected account
1474
- * @description Creates or updates an API-key-based installation for the specified integration and user. If an installation already exists, the stored API key is rotated to the new value.
1474
+ * @description 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.
1475
1475
  */
1476
1476
  put: operations["DataIntegrationsController_upsertApiKey"];
1477
1477
  post?: never;
@@ -1511,7 +1511,7 @@ export interface paths {
1511
1511
  get?: never;
1512
1512
  /**
1513
1513
  * Upsert client credentials for a connected account
1514
- * @description Creates or updates a client-credentials-based installation for the specified integration and user. If an installation already exists, the stored client credentials are rotated to the new values.
1514
+ * @description 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.
1515
1515
  */
1516
1516
  put: operations["DataIntegrationsController_upsertClientCredentials"];
1517
1517
  post?: never;
@@ -17580,6 +17580,19 @@ export interface components {
17580
17580
  */
17581
17581
  error: "needs_reauthorization" | "not_installed";
17582
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
+ };
17583
17596
  AuthMethodMismatchError: {
17584
17597
  /**
17585
17598
  * @description Error code indicating the endpoint does not match the installation auth method.
@@ -28822,10 +28835,21 @@ export interface operations {
28822
28835
  */
28823
28836
  user_id: string;
28824
28837
  /**
28825
- * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
28838
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
28826
28839
  * @example org_01EHZNVPK3SFK441A1RGBFSHRT
28827
28840
  */
28828
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;
28847
+ /**
28848
+ * @description 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.
28849
+ * @example user
28850
+ * @enum {string}
28851
+ */
28852
+ connection_owner?: "user" | "organization";
28829
28853
  /**
28830
28854
  * @description The API key secret to store for this integration.
28831
28855
  * @example sk-1234567890abcdef
@@ -28895,7 +28919,7 @@ export interface operations {
28895
28919
  };
28896
28920
  };
28897
28921
  };
28898
- /** @description Data integration not found for the given provider slug. */
28922
+ /** @description The data integration or selected connected account was not found. */
28899
28923
  404: {
28900
28924
  headers: {
28901
28925
  [name: string]: unknown;
@@ -28910,19 +28934,13 @@ export interface operations {
28910
28934
  };
28911
28935
  };
28912
28936
  };
28913
- /** @description Several connected accounts match this user for the provider; one must be named. */
28937
+ /** @description Several connected accounts match the connection owner for the provider; one must be named. */
28914
28938
  409: {
28915
28939
  headers: {
28916
28940
  [name: string]: unknown;
28917
28941
  };
28918
28942
  content: {
28919
- "application/json": {
28920
- /**
28921
- * @description A human-readable description of the error.
28922
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
28923
- */
28924
- message: string;
28925
- };
28943
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
28926
28944
  };
28927
28945
  };
28928
28946
  /** @description The matched installation uses a different auth method than this endpoint expects. */
@@ -29060,10 +29078,21 @@ export interface operations {
29060
29078
  */
29061
29079
  user_id: string;
29062
29080
  /**
29063
- * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
29081
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
29064
29082
  * @example org_01EHZNVPK3SFK441A1RGBFSHRT
29065
29083
  */
29066
29084
  organization_id?: string;
29085
+ /**
29086
+ * @description A [connected account](/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
29087
+ * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
29088
+ */
29089
+ connected_account_id?: string;
29090
+ /**
29091
+ * @description 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.
29092
+ * @example user
29093
+ * @enum {string}
29094
+ */
29095
+ connection_owner?: "user" | "organization";
29067
29096
  /**
29068
29097
  * @description The OAuth client ID to store for this integration.
29069
29098
  * @example 3MVG9...
@@ -29146,7 +29175,7 @@ export interface operations {
29146
29175
  };
29147
29176
  };
29148
29177
  };
29149
- /** @description Data integration not found for the given provider slug. */
29178
+ /** @description The data integration or selected connected account was not found. */
29150
29179
  404: {
29151
29180
  headers: {
29152
29181
  [name: string]: unknown;
@@ -29161,19 +29190,13 @@ export interface operations {
29161
29190
  };
29162
29191
  };
29163
29192
  };
29164
- /** @description Several connected accounts match this user for the provider; one must be named. */
29193
+ /** @description Several connected accounts match the connection owner for the provider; one must be named. */
29165
29194
  409: {
29166
29195
  headers: {
29167
29196
  [name: string]: unknown;
29168
29197
  };
29169
29198
  content: {
29170
- "application/json": {
29171
- /**
29172
- * @description A human-readable description of the error.
29173
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
29174
- */
29175
- message: string;
29176
- };
29199
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
29177
29200
  };
29178
29201
  };
29179
29202
  /** @description The matched installation uses a different auth method than this endpoint expects. */
@@ -29308,13 +29331,7 @@ export interface operations {
29308
29331
  [name: string]: unknown;
29309
29332
  };
29310
29333
  content: {
29311
- "application/json": {
29312
- /**
29313
- * @description A human-readable description of the error.
29314
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
29315
- */
29316
- message: string;
29317
- };
29334
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
29318
29335
  };
29319
29336
  };
29320
29337
  /** @description The installation uses an auth method that is not yet supported by this endpoint. */
@@ -29439,13 +29456,7 @@ export interface operations {
29439
29456
  [name: string]: unknown;
29440
29457
  };
29441
29458
  content: {
29442
- "application/json": {
29443
- /**
29444
- * @description A human-readable description of the error.
29445
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
29446
- */
29447
- message: string;
29448
- };
29459
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
29449
29460
  };
29450
29461
  };
29451
29462
  /** @description The matched installation uses a different auth method than this endpoint expects. */
@@ -38975,13 +38986,7 @@ export interface operations {
38975
38986
  [name: string]: unknown;
38976
38987
  };
38977
38988
  content: {
38978
- "application/json": {
38979
- /**
38980
- * @description A human-readable description of the error.
38981
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
38982
- */
38983
- message: string;
38984
- };
38989
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
38985
38990
  };
38986
38991
  };
38987
38992
  };
@@ -39061,13 +39066,7 @@ export interface operations {
39061
39066
  [name: string]: unknown;
39062
39067
  };
39063
39068
  content: {
39064
- "application/json": {
39065
- /**
39066
- * @description A human-readable description of the error.
39067
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
39068
- */
39069
- message: string;
39070
- };
39069
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
39071
39070
  };
39072
39071
  };
39073
39072
  };
@@ -39225,13 +39224,7 @@ export interface operations {
39225
39224
  [name: string]: unknown;
39226
39225
  };
39227
39226
  content: {
39228
- "application/json": {
39229
- /**
39230
- * @description A human-readable description of the error.
39231
- * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
39232
- */
39233
- message: string;
39234
- };
39227
+ "application/json": components["schemas"]["AccountSelectionRequiredError"];
39235
39228
  };
39236
39229
  };
39237
39230
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos/openapi-spec",
3
- "version": "0.85.0",
3
+ "version": "0.87.0",
4
4
  "type": "module",
5
5
  "description": "WorkOS OpenAPI specification, TypeScript types, and SDK resolution policy",
6
6
  "license": "MIT",