@workos/openapi-spec 0.106.0 → 0.108.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/types.d.ts CHANGED
@@ -2236,7 +2236,7 @@ export interface paths {
2236
2236
  put: operations["DataIntegrationsOrganizationController_updateOrganizationDataInstallation"];
2237
2237
  /**
2238
2238
  * Import an organization connected account
2239
- * @description Imports an organization-owned [connected account](/reference/pipes/connected-account) by providing OAuth tokens directly. Use this to migrate existing connections or set up connections without going through the OAuth flow.
2239
+ * @description Imports an organization-owned [connected account](/reference/pipes/connected-account) by providing OAuth tokens directly. Omit `connection_intent` to create only the compatibility connection, or set it to `add` to explicitly create another connection. This creation-only endpoint does not accept `connected_account_id` or reauthorization intent.
2240
2240
  */
2241
2241
  post: operations["DataIntegrationsOrganizationController_createOrganizationDataInstallation"];
2242
2242
  /**
@@ -5529,6 +5529,49 @@ export interface components {
5529
5529
  /** @description Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations. */
5530
5530
  custom_provider?: components["schemas"]["UpdateCustomProviderDefinitionDto"];
5531
5531
  };
5532
+ CreateOrganizationConnectedAccountDto: {
5533
+ /**
5534
+ * @description The OAuth access token for the connected account.
5535
+ * @example gho_16C7e42F292c6912E7710c838347Ae178B4a
5536
+ */
5537
+ access_token?: string;
5538
+ /**
5539
+ * @description The OAuth refresh token for the connected account.
5540
+ * @example ghr_xxxxxxxxxxxxxxxxxxxx
5541
+ */
5542
+ refresh_token?: string;
5543
+ /**
5544
+ * Format: date-time
5545
+ * @description The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire.
5546
+ * @example 2025-12-31T23:59:59.000Z
5547
+ */
5548
+ expires_at?: string;
5549
+ /**
5550
+ * @description The OAuth scopes granted for this connection.
5551
+ * @example [
5552
+ * "repo",
5553
+ * "user:email"
5554
+ * ]
5555
+ */
5556
+ scopes?: string[];
5557
+ /**
5558
+ * @description Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
5559
+ * @example connected
5560
+ * @enum {string}
5561
+ */
5562
+ state?: "connected" | "needs_reauthorization";
5563
+ /**
5564
+ * @description The [User](/reference/authkit/user) identifier of the organization member on whose behalf the connected account is being imported or updated. The user must be an active member of the organization.
5565
+ * @example user_01EHZNVPK3SFK441A1RGBFSHRT
5566
+ */
5567
+ user_id: string;
5568
+ /**
5569
+ * @description Set to `add` to create another connected account. Omit this field for permanent compatibility behavior.
5570
+ * @example add
5571
+ * @constant
5572
+ */
5573
+ connection_intent?: "add";
5574
+ };
5532
5575
  OrganizationConnectedAccountDto: {
5533
5576
  /**
5534
5577
  * @description The OAuth access token for the connected account.
@@ -5566,6 +5609,44 @@ export interface components {
5566
5609
  */
5567
5610
  user_id: string;
5568
5611
  };
5612
+ CreateConnectedAccountDto: {
5613
+ /**
5614
+ * @description The OAuth access token for the connected account.
5615
+ * @example gho_16C7e42F292c6912E7710c838347Ae178B4a
5616
+ */
5617
+ access_token?: string;
5618
+ /**
5619
+ * @description The OAuth refresh token for the connected account.
5620
+ * @example ghr_xxxxxxxxxxxxxxxxxxxx
5621
+ */
5622
+ refresh_token?: string;
5623
+ /**
5624
+ * Format: date-time
5625
+ * @description The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire.
5626
+ * @example 2025-12-31T23:59:59.000Z
5627
+ */
5628
+ expires_at?: string;
5629
+ /**
5630
+ * @description The OAuth scopes granted for this connection.
5631
+ * @example [
5632
+ * "repo",
5633
+ * "user:email"
5634
+ * ]
5635
+ */
5636
+ scopes?: string[];
5637
+ /**
5638
+ * @description Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
5639
+ * @example connected
5640
+ * @enum {string}
5641
+ */
5642
+ state?: "connected" | "needs_reauthorization";
5643
+ /**
5644
+ * @description Set to `add` to create another connected account. Omit this field for permanent compatibility behavior.
5645
+ * @example add
5646
+ * @constant
5647
+ */
5648
+ connection_intent?: "add";
5649
+ };
5569
5650
  ConnectedAccountDto: {
5570
5651
  /**
5571
5652
  * @description The OAuth access token for the connected account.
@@ -16796,6 +16877,51 @@ export interface components {
16796
16877
  * @constant
16797
16878
  */
16798
16879
  object: "event";
16880
+ } | {
16881
+ /**
16882
+ * @description Unique identifier for the event.
16883
+ * @example event_01EHZNVPK3SFK441A1RGBFSHRT
16884
+ */
16885
+ id: string;
16886
+ /** @constant */
16887
+ event: "vault.dek.rekeyed";
16888
+ /** @description The event payload. */
16889
+ data: {
16890
+ /**
16891
+ * @description The unique identifier of the actor.
16892
+ * @example user_01EHWNCE74X7JSDV0X3SZ3KJNY
16893
+ */
16894
+ actor_id: string;
16895
+ /** @enum {string} */
16896
+ actor_source: "api" | "dashboard";
16897
+ /**
16898
+ * @description The name of the actor.
16899
+ * @example Jane Doe
16900
+ */
16901
+ actor_name: string;
16902
+ /**
16903
+ * @description The unique identifiers of the re-encrypted data encryption keys.
16904
+ * @example [
16905
+ * "dek_01EHWNCE74X7JSDV0X3SZ3KJNY"
16906
+ * ]
16907
+ */
16908
+ key_ids: string[];
16909
+ key_context: {
16910
+ [key: string]: string;
16911
+ };
16912
+ };
16913
+ /**
16914
+ * Format: date-time
16915
+ * @description An ISO 8601 timestamp.
16916
+ * @example 2026-01-15T12:00:00.000Z
16917
+ */
16918
+ created_at: string;
16919
+ context?: components["schemas"]["EventContextDto"];
16920
+ /**
16921
+ * @description Distinguishes the Event object.
16922
+ * @constant
16923
+ */
16924
+ object: "event";
16799
16925
  } | {
16800
16926
  /**
16801
16927
  * @description Unique identifier for the event.
@@ -29568,10 +29694,88 @@ export interface operations {
29568
29694
  */
29569
29695
  organization_id?: string;
29570
29696
  /**
29571
- * @description A [connected account](/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
29697
+ * @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.
29698
+ * @example user
29699
+ * @enum {string}
29700
+ */
29701
+ connection_owner?: "user" | "organization";
29702
+ /**
29703
+ * @description The API key secret to store for this integration.
29704
+ * @example sk-1234567890abcdef
29705
+ */
29706
+ secret: string;
29707
+ } | {
29708
+ /**
29709
+ * @description A [User](/reference/authkit/user) identifier.
29710
+ * @example user_01EHZNVPK3SFK441A1RGBFSHRT
29711
+ */
29712
+ user_id: string;
29713
+ /**
29714
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
29715
+ * @example org_01EHZNVPK3SFK441A1RGBFSHRT
29716
+ */
29717
+ organization_id?: string;
29718
+ /**
29719
+ * @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.
29720
+ * @example user
29721
+ * @enum {string}
29722
+ */
29723
+ connection_owner?: "user" | "organization";
29724
+ /**
29725
+ * @description The API key secret to store for this integration.
29726
+ * @example sk-1234567890abcdef
29727
+ */
29728
+ secret: string;
29729
+ /**
29730
+ * @description Create another connection. The first connection for an owner shape fills the compatibility slot; later connections are standard.
29731
+ * @example add
29732
+ * @constant
29733
+ */
29734
+ connection_intent: "add";
29735
+ } | {
29736
+ /**
29737
+ * @description A [User](/reference/authkit/user) identifier.
29738
+ * @example user_01EHZNVPK3SFK441A1RGBFSHRT
29739
+ */
29740
+ user_id: string;
29741
+ /**
29742
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
29743
+ * @example org_01EHZNVPK3SFK441A1RGBFSHRT
29744
+ */
29745
+ organization_id?: string;
29746
+ /**
29747
+ * @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.
29748
+ * @example user
29749
+ * @enum {string}
29750
+ */
29751
+ connection_owner?: "user" | "organization";
29752
+ /**
29753
+ * @description The API key secret to store for this integration.
29754
+ * @example sk-1234567890abcdef
29755
+ */
29756
+ secret: string;
29757
+ /**
29758
+ * @description Reauthorize exactly the connection named by `connected_account_id`.
29759
+ * @example reauthorize
29760
+ * @constant
29761
+ */
29762
+ connection_intent: "reauthorize";
29763
+ /**
29764
+ * @description The exact connected account to reauthorize. Required with `connection_intent: reauthorize`.
29572
29765
  * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
29573
29766
  */
29574
- connected_account_id?: string;
29767
+ connected_account_id: string;
29768
+ } | {
29769
+ /**
29770
+ * @description A [User](/reference/authkit/user) identifier.
29771
+ * @example user_01EHZNVPK3SFK441A1RGBFSHRT
29772
+ */
29773
+ user_id: string;
29774
+ /**
29775
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
29776
+ * @example org_01EHZNVPK3SFK441A1RGBFSHRT
29777
+ */
29778
+ organization_id?: string;
29575
29779
  /**
29576
29780
  * @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.
29577
29781
  * @example user
@@ -29583,6 +29787,11 @@ export interface operations {
29583
29787
  * @example sk-1234567890abcdef
29584
29788
  */
29585
29789
  secret: string;
29790
+ /**
29791
+ * @description The exact connected account to reauthorize. The reauthorize intent may be omitted for compatibility.
29792
+ * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
29793
+ */
29794
+ connected_account_id: string;
29586
29795
  };
29587
29796
  };
29588
29797
  };
@@ -29820,10 +30029,130 @@ export interface operations {
29820
30029
  */
29821
30030
  organization_id?: string;
29822
30031
  /**
29823
- * @description A [connected account](/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
30032
+ * @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.
30033
+ * @example user
30034
+ * @enum {string}
30035
+ */
30036
+ connection_owner?: "user" | "organization";
30037
+ /**
30038
+ * @description The OAuth client ID to store for this integration.
30039
+ * @example 3MVG9...
30040
+ */
30041
+ client_id: string;
30042
+ /**
30043
+ * @description The OAuth client secret to store for this integration.
30044
+ * @example shhh-secret
30045
+ */
30046
+ client_secret: string;
30047
+ /**
30048
+ * @description Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
30049
+ * @example {
30050
+ * "salesforce_host": "acme.my.salesforce.com"
30051
+ * }
30052
+ */
30053
+ config?: {
30054
+ [key: string]: string;
30055
+ };
30056
+ } | {
30057
+ /**
30058
+ * @description A [User](/reference/authkit/user) identifier.
30059
+ * @example user_01EHZNVPK3SFK441A1RGBFSHRT
30060
+ */
30061
+ user_id: string;
30062
+ /**
30063
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
30064
+ * @example org_01EHZNVPK3SFK441A1RGBFSHRT
30065
+ */
30066
+ organization_id?: string;
30067
+ /**
30068
+ * @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.
30069
+ * @example user
30070
+ * @enum {string}
30071
+ */
30072
+ connection_owner?: "user" | "organization";
30073
+ /**
30074
+ * @description The OAuth client ID to store for this integration.
30075
+ * @example 3MVG9...
30076
+ */
30077
+ client_id: string;
30078
+ /**
30079
+ * @description The OAuth client secret to store for this integration.
30080
+ * @example shhh-secret
30081
+ */
30082
+ client_secret: string;
30083
+ /**
30084
+ * @description Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
30085
+ * @example {
30086
+ * "salesforce_host": "acme.my.salesforce.com"
30087
+ * }
30088
+ */
30089
+ config?: {
30090
+ [key: string]: string;
30091
+ };
30092
+ /**
30093
+ * @description Create another connection. The first connection for an owner shape fills the compatibility slot; later connections are standard.
30094
+ * @example add
30095
+ * @constant
30096
+ */
30097
+ connection_intent: "add";
30098
+ } | {
30099
+ /**
30100
+ * @description A [User](/reference/authkit/user) identifier.
30101
+ * @example user_01EHZNVPK3SFK441A1RGBFSHRT
30102
+ */
30103
+ user_id: string;
30104
+ /**
30105
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
30106
+ * @example org_01EHZNVPK3SFK441A1RGBFSHRT
30107
+ */
30108
+ organization_id?: string;
30109
+ /**
30110
+ * @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.
30111
+ * @example user
30112
+ * @enum {string}
30113
+ */
30114
+ connection_owner?: "user" | "organization";
30115
+ /**
30116
+ * @description The OAuth client ID to store for this integration.
30117
+ * @example 3MVG9...
30118
+ */
30119
+ client_id: string;
30120
+ /**
30121
+ * @description The OAuth client secret to store for this integration.
30122
+ * @example shhh-secret
30123
+ */
30124
+ client_secret: string;
30125
+ /**
30126
+ * @description Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
30127
+ * @example {
30128
+ * "salesforce_host": "acme.my.salesforce.com"
30129
+ * }
30130
+ */
30131
+ config?: {
30132
+ [key: string]: string;
30133
+ };
30134
+ /**
30135
+ * @description Reauthorize exactly the connection named by `connected_account_id`.
30136
+ * @example reauthorize
30137
+ * @constant
30138
+ */
30139
+ connection_intent: "reauthorize";
30140
+ /**
30141
+ * @description The exact connected account to reauthorize. Required with `connection_intent: reauthorize`.
29824
30142
  * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
29825
30143
  */
29826
- connected_account_id?: string;
30144
+ connected_account_id: string;
30145
+ } | {
30146
+ /**
30147
+ * @description A [User](/reference/authkit/user) identifier.
30148
+ * @example user_01EHZNVPK3SFK441A1RGBFSHRT
30149
+ */
30150
+ user_id: string;
30151
+ /**
30152
+ * @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
30153
+ * @example org_01EHZNVPK3SFK441A1RGBFSHRT
30154
+ */
30155
+ organization_id?: string;
29827
30156
  /**
29828
30157
  * @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.
29829
30158
  * @example user
@@ -29849,6 +30178,11 @@ export interface operations {
29849
30178
  config?: {
29850
30179
  [key: string]: string;
29851
30180
  };
30181
+ /**
30182
+ * @description The exact connected account to reauthorize. The reauthorize intent may be omitted for compatibility.
30183
+ * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
30184
+ */
30185
+ connected_account_id: string;
29852
30186
  };
29853
30187
  };
29854
30188
  };
@@ -33342,10 +33676,12 @@ export interface operations {
33342
33676
  DataIntegrationsOrganizationController_updateOrganizationDataInstallation: {
33343
33677
  parameters: {
33344
33678
  query?: {
33345
- /** @description Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered. */
33679
+ /** @description Accepted for compatibility; does not change update targeting. Omit intent and selector to update the compatibility connection, or supply `connected_account_id` to update an exact connection. */
33346
33680
  supports_multiple_connections?: boolean;
33347
33681
  /** @description A [connected account](/reference/pipes/connected-account) identifier. Use this to select the connection to update. */
33348
33682
  connected_account_id?: string;
33683
+ /** @description Set to `reauthorize` with `connected_account_id` to update one exact connection. The intent may be omitted when supplying an ID. Omit both for permanent compatibility behavior. */
33684
+ connection_intent?: "reauthorize";
33349
33685
  };
33350
33686
  header?: never;
33351
33687
  path: {
@@ -33507,7 +33843,7 @@ export interface operations {
33507
33843
  };
33508
33844
  requestBody: {
33509
33845
  content: {
33510
- "application/json": components["schemas"]["OrganizationConnectedAccountDto"];
33846
+ "application/json": components["schemas"]["CreateOrganizationConnectedAccountDto"];
33511
33847
  };
33512
33848
  };
33513
33849
  responses: {
@@ -33582,7 +33918,7 @@ export interface operations {
33582
33918
  };
33583
33919
  };
33584
33920
  };
33585
- /** @description A connected account already exists for this organization and integration. */
33921
+ /** @description The compatibility connection already exists for this organization and integration. */
33586
33922
  409: {
33587
33923
  headers: {
33588
33924
  [name: string]: unknown;
@@ -33643,6 +33979,27 @@ export interface operations {
33643
33979
  };
33644
33980
  };
33645
33981
  };
33982
+ /** @description Another connection is being created for this owner and provider. Retry the request. */
33983
+ 503: {
33984
+ headers: {
33985
+ [name: string]: unknown;
33986
+ };
33987
+ content: {
33988
+ "application/json": {
33989
+ /**
33990
+ * @description The error code identifying the type of error.
33991
+ * @example concurrent_request
33992
+ * @constant
33993
+ */
33994
+ code: "concurrent_request";
33995
+ /**
33996
+ * @description A human-readable description of the error.
33997
+ * @example Request could not be processed.
33998
+ */
33999
+ message: string;
34000
+ };
34001
+ };
34002
+ };
33646
34003
  };
33647
34004
  };
33648
34005
  DataIntegrationsOrganizationController_deleteOrganizationDataInstallation: {
@@ -40889,10 +41246,12 @@ export interface operations {
40889
41246
  query?: {
40890
41247
  /** @description An [Organization](/reference/organization) identifier. Optional parameter if the connection is scoped to an organization. */
40891
41248
  organization_id?: string;
40892
- /** @description Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered. */
41249
+ /** @description Accepted for compatibility; does not change update targeting. Omit intent and selector to update the compatibility connection, or supply `connected_account_id` to update an exact connection. */
40893
41250
  supports_multiple_connections?: boolean;
40894
41251
  /** @description A [connected account](/reference/pipes/connected-account) identifier. Use this to select the connection to update. */
40895
41252
  connected_account_id?: string;
41253
+ /** @description Set to `reauthorize` with `connected_account_id` to update one exact connection. The intent may be omitted when supplying an ID. Omit both for permanent compatibility behavior. */
41254
+ connection_intent?: "reauthorize";
40896
41255
  };
40897
41256
  header?: never;
40898
41257
  path: {
@@ -41050,7 +41409,7 @@ export interface operations {
41050
41409
  };
41051
41410
  requestBody: {
41052
41411
  content: {
41053
- "application/json": components["schemas"]["ConnectedAccountDto"];
41412
+ "application/json": components["schemas"]["CreateConnectedAccountDto"];
41054
41413
  };
41055
41414
  };
41056
41415
  responses: {
@@ -41146,7 +41505,7 @@ export interface operations {
41146
41505
  };
41147
41506
  };
41148
41507
  };
41149
- /** @description The WorkOS OAuth grant behind `refresh_token` is being changed by another request. Retry the request. */
41508
+ /** @description Another connection is being created for this owner and provider, or the WorkOS OAuth grant behind `refresh_token` is being changed. Retry the request. */
41150
41509
  503: {
41151
41510
  headers: {
41152
41511
  [name: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos/openapi-spec",
3
- "version": "0.106.0",
3
+ "version": "0.108.0",
4
4
  "type": "module",
5
5
  "description": "WorkOS OpenAPI specification, TypeScript types, and SDK resolution policy",
6
6
  "license": "MIT",