@workos/openapi-spec 0.81.0 → 0.83.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.
@@ -10984,6 +10984,14 @@ paths:
10984
10984
  Optional parameter to scope the connection to a specific
10985
10985
  organization.
10986
10986
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
10987
+ connected_account_id:
10988
+ type: string
10989
+ minLength: 1
10990
+ description: >-
10991
+ A [connected account](/reference/pipes/connected-account)
10992
+ identifier. Use this to select a specific connection when
10993
+ the user has several for this provider.
10994
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
10987
10995
  required:
10988
10996
  - user_id
10989
10997
  responses:
@@ -11020,7 +11028,7 @@ paths:
11020
11028
  '401':
11021
11029
  description: Unauthorized
11022
11030
  '404':
11023
- description: Data integration not found for the given provider slug.
11031
+ description: The data integration or selected connected account was not found.
11024
11032
  content:
11025
11033
  application/json:
11026
11034
  schema:
@@ -11098,6 +11106,14 @@ paths:
11098
11106
  Optional parameter to scope the connection to a specific
11099
11107
  organization.
11100
11108
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
11109
+ connected_account_id:
11110
+ type: string
11111
+ minLength: 1
11112
+ description: >-
11113
+ A [connected account](/reference/pipes/connected-account)
11114
+ identifier. Use this to select a specific connection when
11115
+ the user has several for this provider.
11116
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
11101
11117
  required:
11102
11118
  - user_id
11103
11119
  responses:
@@ -11123,7 +11139,7 @@ paths:
11123
11139
  '401':
11124
11140
  description: Unauthorized
11125
11141
  '404':
11126
- description: Data integration not found for the given provider slug.
11142
+ description: The data integration or selected connected account was not found.
11127
11143
  content:
11128
11144
  application/json:
11129
11145
  schema:
@@ -22156,6 +22172,17 @@ paths:
22156
22172
  schema:
22157
22173
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
22158
22174
  type: string
22175
+ - name: connected_account_id
22176
+ required: false
22177
+ in: query
22178
+ description: >-
22179
+ A [connected account](/reference/pipes/connected-account)
22180
+ identifier. Use this to select a specific connection when the user
22181
+ has several for this provider.
22182
+ schema:
22183
+ minLength: 1
22184
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
22185
+ type: string
22159
22186
  responses:
22160
22187
  '200':
22161
22188
  description: The connected account was retrieved successfully.
@@ -22163,6 +22190,19 @@ paths:
22163
22190
  application/json:
22164
22191
  schema:
22165
22192
  $ref: '#/components/schemas/ConnectedAccount'
22193
+ '400':
22194
+ description: The connected account selector is malformed.
22195
+ content:
22196
+ application/json:
22197
+ schema:
22198
+ type: object
22199
+ properties:
22200
+ message:
22201
+ type: string
22202
+ description: A human-readable description of the error.
22203
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
22204
+ required:
22205
+ - message
22166
22206
  '401':
22167
22207
  description: The request is missing a valid API key.
22168
22208
  '404':
@@ -22228,9 +22268,32 @@ paths:
22228
22268
  schema:
22229
22269
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
22230
22270
  type: string
22271
+ - name: connected_account_id
22272
+ required: false
22273
+ in: query
22274
+ description: >-
22275
+ A [connected account](/reference/pipes/connected-account)
22276
+ identifier. Use this to select the connection to delete.
22277
+ schema:
22278
+ minLength: 1
22279
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
22280
+ type: string
22231
22281
  responses:
22232
22282
  '204':
22233
22283
  description: The connected account was deleted successfully.
22284
+ '400':
22285
+ description: The connected account selector is malformed.
22286
+ content:
22287
+ application/json:
22288
+ schema:
22289
+ type: object
22290
+ properties:
22291
+ message:
22292
+ type: string
22293
+ description: A human-readable description of the error.
22294
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
22295
+ required:
22296
+ - message
22234
22297
  '401':
22235
22298
  description: The request is missing a valid API key.
22236
22299
  '404':
@@ -22389,6 +22452,16 @@ paths:
22389
22452
  schema:
22390
22453
  example: org_01EHZNVPK3SFK441A1RGBFSHRT
22391
22454
  type: string
22455
+ - name: connected_account_id
22456
+ required: false
22457
+ in: query
22458
+ description: >-
22459
+ A [connected account](/reference/pipes/connected-account)
22460
+ identifier. Use this to select the connection to update.
22461
+ schema:
22462
+ minLength: 1
22463
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
22464
+ type: string
22392
22465
  requestBody:
22393
22466
  required: true
22394
22467
  content:
@@ -22402,6 +22475,19 @@ paths:
22402
22475
  application/json:
22403
22476
  schema:
22404
22477
  $ref: '#/components/schemas/ConnectedAccount'
22478
+ '400':
22479
+ description: The connected account selector is malformed.
22480
+ content:
22481
+ application/json:
22482
+ schema:
22483
+ type: object
22484
+ properties:
22485
+ message:
22486
+ type: string
22487
+ description: A human-readable description of the error.
22488
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
22489
+ required:
22490
+ - message
22405
22491
  '401':
22406
22492
  description: The request is missing a valid API key.
22407
22493
  '404':
@@ -43143,7 +43229,7 @@ components:
43143
43229
  items:
43144
43230
  type: string
43145
43231
  description: The OAuth scopes granted for this connection.
43146
- example:
43232
+ example: &ref_34
43147
43233
  - repo
43148
43234
  - user:email
43149
43235
  auth_method:
@@ -43193,7 +43279,7 @@ components:
43193
43279
  `installation` scope, excluding any it declares as
43194
43280
  secret. Only present when `auth_method` is
43195
43281
  `client_credentials`.
43196
- example:
43282
+ example: &ref_35
43197
43283
  instance_url: https://example.my.salesforce.com
43198
43284
  state:
43199
43285
  type: string
@@ -43256,6 +43342,151 @@ components:
43256
43342
  - createdAt
43257
43343
  - updatedAt
43258
43344
  - type: 'null'
43345
+ connected_accounts:
43346
+ type: array
43347
+ items:
43348
+ type: object
43349
+ properties:
43350
+ object:
43351
+ type: string
43352
+ description: Distinguishes the connected account object.
43353
+ const: connected_account
43354
+ id:
43355
+ type: string
43356
+ description: The unique identifier of the connected account.
43357
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
43358
+ user_id:
43359
+ type:
43360
+ - string
43361
+ - 'null'
43362
+ description: >-
43363
+ The [User](/reference/authkit/user) identifier
43364
+ associated with this connection.
43365
+ example: user_01EHZNVPK3SFK441A1RGBFSHRT
43366
+ organization_id:
43367
+ type:
43368
+ - string
43369
+ - 'null'
43370
+ description: >-
43371
+ The [Organization](/reference/organization) identifier
43372
+ associated with this connection, or `null` if not scoped
43373
+ to an organization.
43374
+ example: null
43375
+ scopes:
43376
+ type: array
43377
+ items:
43378
+ type: string
43379
+ description: The OAuth scopes granted for this connection.
43380
+ example: *ref_34
43381
+ auth_method:
43382
+ type: string
43383
+ enum:
43384
+ - oauth
43385
+ - api_key
43386
+ - client_credentials
43387
+ description: >-
43388
+ The authentication method used for this connection
43389
+ (`oauth`, `api_key`, or `client_credentials`). Defaults
43390
+ to `oauth` if absent.
43391
+ example: oauth
43392
+ api_key_last_4:
43393
+ type:
43394
+ - string
43395
+ - 'null'
43396
+ description: >-
43397
+ The last four characters of the API key, or `null` for
43398
+ OAuth connections.
43399
+ example: null
43400
+ client_id:
43401
+ type:
43402
+ - string
43403
+ - 'null'
43404
+ description: >-
43405
+ The client ID supplied for this connection. Only present
43406
+ when `auth_method` is `client_credentials`.
43407
+ example: 3MVG9dZJodJWxft2VoStSCVwPFsx0eDcpVc
43408
+ client_secret_last_4:
43409
+ type:
43410
+ - string
43411
+ - 'null'
43412
+ description: >-
43413
+ The last four characters of the client secret supplied
43414
+ for this connection, or `null` when it can't be read.
43415
+ Only present when `auth_method` is `client_credentials`.
43416
+ example: cdef
43417
+ config:
43418
+ type: object
43419
+ additionalProperties:
43420
+ type: string
43421
+ description: >-
43422
+ The connection-level configuration values stored for
43423
+ this connection — the fields the provider declares at
43424
+ `installation` scope, excluding any it declares as
43425
+ secret. Only present when `auth_method` is
43426
+ `client_credentials`.
43427
+ example: *ref_35
43428
+ state:
43429
+ type: string
43430
+ enum:
43431
+ - connected
43432
+ - needs_reauthorization
43433
+ - disconnected
43434
+ description: >-
43435
+ The state of the connected account:
43436
+
43437
+ - `connected`: The connection is active and tokens are
43438
+ valid.
43439
+
43440
+ - `needs_reauthorization`: The user needs to reauthorize
43441
+ the connection, typically because required scopes have
43442
+ changed.
43443
+
43444
+ - `disconnected`: The connection has been disconnected.
43445
+ example: connected
43446
+ created_at:
43447
+ type: string
43448
+ description: The timestamp when the connection was created.
43449
+ example: '2024-01-16T14:20:00.000Z'
43450
+ updated_at:
43451
+ type: string
43452
+ description: The timestamp when the connection was last updated.
43453
+ example: '2024-01-16T14:20:00.000Z'
43454
+ userlandUserId:
43455
+ type:
43456
+ - string
43457
+ - 'null'
43458
+ deprecated: true
43459
+ description: Use `user_id` instead.
43460
+ organizationId:
43461
+ type:
43462
+ - string
43463
+ - 'null'
43464
+ deprecated: true
43465
+ description: Use `organization_id` instead.
43466
+ createdAt:
43467
+ type: string
43468
+ deprecated: true
43469
+ description: Use `created_at` instead.
43470
+ updatedAt:
43471
+ type: string
43472
+ deprecated: true
43473
+ description: Use `updated_at` instead.
43474
+ required:
43475
+ - object
43476
+ - id
43477
+ - user_id
43478
+ - organization_id
43479
+ - scopes
43480
+ - state
43481
+ - created_at
43482
+ - updated_at
43483
+ - userlandUserId
43484
+ - organizationId
43485
+ - createdAt
43486
+ - updatedAt
43487
+ description: >-
43488
+ The user's connected accounts for this provider in the
43489
+ requested ownership context.
43259
43490
  required:
43260
43491
  - object
43261
43492
  - id
@@ -43273,10 +43504,11 @@ components:
43273
43504
  - createdAt
43274
43505
  - updatedAt
43275
43506
  - connected_account
43507
+ - connected_accounts
43276
43508
  description: >-
43277
- A list of [providers](/reference/pipes/provider), each including a
43278
- [`connected_account`](/reference/pipes/connected-account) field with
43279
- the user's connection status.
43509
+ A list of [providers](/reference/pipes/provider), each including the
43510
+ legacy `connected_account` field and the additive
43511
+ `connected_accounts` collection.
43280
43512
  required:
43281
43513
  - object
43282
43514
  - data
package/dist/types.d.ts CHANGED
@@ -17797,7 +17797,7 @@ export interface components {
17797
17797
  * @constant
17798
17798
  */
17799
17799
  object: "list";
17800
- /** @description A list of [providers](/reference/pipes/provider), each including a [`connected_account`](/reference/pipes/connected-account) field with the user's connection status. */
17800
+ /** @description A list of [providers](/reference/pipes/provider), each including the legacy `connected_account` field and the additive `connected_accounts` collection. */
17801
17801
  data: {
17802
17802
  /**
17803
17803
  * @description Distinguishes the data provider object.
@@ -17984,6 +17984,106 @@ export interface components {
17984
17984
  */
17985
17985
  updatedAt: string;
17986
17986
  } | null;
17987
+ /** @description The user's connected accounts for this provider in the requested ownership context. */
17988
+ connected_accounts: {
17989
+ /**
17990
+ * @description Distinguishes the connected account object.
17991
+ * @constant
17992
+ */
17993
+ object: "connected_account";
17994
+ /**
17995
+ * @description The unique identifier of the connected account.
17996
+ * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
17997
+ */
17998
+ id: string;
17999
+ /**
18000
+ * @description The [User](/reference/authkit/user) identifier associated with this connection.
18001
+ * @example user_01EHZNVPK3SFK441A1RGBFSHRT
18002
+ */
18003
+ user_id: string | null;
18004
+ /**
18005
+ * @description The [Organization](/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization.
18006
+ * @example null
18007
+ */
18008
+ organization_id: string | null;
18009
+ /**
18010
+ * @description The OAuth scopes granted for this connection.
18011
+ * @example [
18012
+ * "repo",
18013
+ * "user:email"
18014
+ * ]
18015
+ */
18016
+ scopes: string[];
18017
+ /**
18018
+ * @description The authentication method used for this connection (`oauth`, `api_key`, or `client_credentials`). Defaults to `oauth` if absent.
18019
+ * @example oauth
18020
+ * @enum {string}
18021
+ */
18022
+ auth_method?: "oauth" | "api_key" | "client_credentials";
18023
+ /**
18024
+ * @description The last four characters of the API key, or `null` for OAuth connections.
18025
+ * @example null
18026
+ */
18027
+ api_key_last_4?: string | null;
18028
+ /**
18029
+ * @description The client ID supplied for this connection. Only present when `auth_method` is `client_credentials`.
18030
+ * @example 3MVG9dZJodJWxft2VoStSCVwPFsx0eDcpVc
18031
+ */
18032
+ client_id?: string | null;
18033
+ /**
18034
+ * @description The last four characters of the client secret supplied for this connection, or `null` when it can't be read. Only present when `auth_method` is `client_credentials`.
18035
+ * @example cdef
18036
+ */
18037
+ client_secret_last_4?: string | null;
18038
+ /**
18039
+ * @description The connection-level configuration values stored for this connection — the fields the provider declares at `installation` scope, excluding any it declares as secret. Only present when `auth_method` is `client_credentials`.
18040
+ * @example {
18041
+ * "instance_url": "https://example.my.salesforce.com"
18042
+ * }
18043
+ */
18044
+ config?: {
18045
+ [key: string]: string;
18046
+ };
18047
+ /**
18048
+ * @description The state of the connected account:
18049
+ * - `connected`: The connection is active and tokens are valid.
18050
+ * - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have changed.
18051
+ * - `disconnected`: The connection has been disconnected.
18052
+ * @example connected
18053
+ * @enum {string}
18054
+ */
18055
+ state: "connected" | "needs_reauthorization" | "disconnected";
18056
+ /**
18057
+ * @description The timestamp when the connection was created.
18058
+ * @example 2024-01-16T14:20:00.000Z
18059
+ */
18060
+ created_at: string;
18061
+ /**
18062
+ * @description The timestamp when the connection was last updated.
18063
+ * @example 2024-01-16T14:20:00.000Z
18064
+ */
18065
+ updated_at: string;
18066
+ /**
18067
+ * @deprecated
18068
+ * @description Use `user_id` instead.
18069
+ */
18070
+ userlandUserId: string | null;
18071
+ /**
18072
+ * @deprecated
18073
+ * @description Use `organization_id` instead.
18074
+ */
18075
+ organizationId: string | null;
18076
+ /**
18077
+ * @deprecated
18078
+ * @description Use `created_at` instead.
18079
+ */
18080
+ createdAt: string;
18081
+ /**
18082
+ * @deprecated
18083
+ * @description Use `updated_at` instead.
18084
+ */
18085
+ updatedAt: string;
18086
+ }[];
17987
18087
  }[];
17988
18088
  };
17989
18089
  PortalLinkResponse: {
@@ -29098,6 +29198,11 @@ export interface operations {
29098
29198
  * @example org_01EHZNVPK3SFK441A1RGBFSHRT
29099
29199
  */
29100
29200
  organization_id?: string;
29201
+ /**
29202
+ * @description A [connected account](/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
29203
+ * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
29204
+ */
29205
+ connected_account_id?: string;
29101
29206
  };
29102
29207
  };
29103
29208
  };
@@ -29149,7 +29254,7 @@ export interface operations {
29149
29254
  };
29150
29255
  content?: never;
29151
29256
  };
29152
- /** @description Data integration not found for the given provider slug. */
29257
+ /** @description The data integration or selected connected account was not found. */
29153
29258
  404: {
29154
29259
  headers: {
29155
29260
  [name: string]: unknown;
@@ -29219,6 +29324,11 @@ export interface operations {
29219
29324
  * @example org_01EHZNVPK3SFK441A1RGBFSHRT
29220
29325
  */
29221
29326
  organization_id?: string;
29327
+ /**
29328
+ * @description A [connected account](/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
29329
+ * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
29330
+ */
29331
+ connected_account_id?: string;
29222
29332
  };
29223
29333
  };
29224
29334
  };
@@ -29254,7 +29364,7 @@ export interface operations {
29254
29364
  };
29255
29365
  content?: never;
29256
29366
  };
29257
- /** @description Data integration not found for the given provider slug. */
29367
+ /** @description The data integration or selected connected account was not found. */
29258
29368
  404: {
29259
29369
  headers: {
29260
29370
  [name: string]: unknown;
@@ -38745,6 +38855,8 @@ export interface operations {
38745
38855
  query?: {
38746
38856
  /** @description An [Organization](/reference/organization) identifier. Optional parameter if the connection is scoped to an organization. */
38747
38857
  organization_id?: string;
38858
+ /** @description A [connected account](/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider. */
38859
+ connected_account_id?: string;
38748
38860
  };
38749
38861
  header?: never;
38750
38862
  path: {
@@ -38766,6 +38878,21 @@ export interface operations {
38766
38878
  "application/json": components["schemas"]["ConnectedAccount"];
38767
38879
  };
38768
38880
  };
38881
+ /** @description The connected account selector is malformed. */
38882
+ 400: {
38883
+ headers: {
38884
+ [name: string]: unknown;
38885
+ };
38886
+ content: {
38887
+ "application/json": {
38888
+ /**
38889
+ * @description A human-readable description of the error.
38890
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
38891
+ */
38892
+ message: string;
38893
+ };
38894
+ };
38895
+ };
38769
38896
  /** @description The request is missing a valid API key. */
38770
38897
  401: {
38771
38898
  headers: {
@@ -38810,6 +38937,8 @@ export interface operations {
38810
38937
  query?: {
38811
38938
  /** @description An [Organization](/reference/organization) identifier. Optional parameter if the connection is scoped to an organization. */
38812
38939
  organization_id?: string;
38940
+ /** @description A [connected account](/reference/pipes/connected-account) identifier. Use this to select the connection to update. */
38941
+ connected_account_id?: string;
38813
38942
  };
38814
38943
  header?: never;
38815
38944
  path: {
@@ -38835,6 +38964,21 @@ export interface operations {
38835
38964
  "application/json": components["schemas"]["ConnectedAccount"];
38836
38965
  };
38837
38966
  };
38967
+ /** @description The connected account selector is malformed. */
38968
+ 400: {
38969
+ headers: {
38970
+ [name: string]: unknown;
38971
+ };
38972
+ content: {
38973
+ "application/json": {
38974
+ /**
38975
+ * @description A human-readable description of the error.
38976
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
38977
+ */
38978
+ message: string;
38979
+ };
38980
+ };
38981
+ };
38838
38982
  /** @description The request is missing a valid API key. */
38839
38983
  401: {
38840
38984
  headers: {
@@ -38963,6 +39107,8 @@ export interface operations {
38963
39107
  query?: {
38964
39108
  /** @description An [Organization](/reference/organization) identifier. Optional parameter if the connection is scoped to an organization. */
38965
39109
  organization_id?: string;
39110
+ /** @description A [connected account](/reference/pipes/connected-account) identifier. Use this to select the connection to delete. */
39111
+ connected_account_id?: string;
38966
39112
  };
38967
39113
  header?: never;
38968
39114
  path: {
@@ -38982,6 +39128,21 @@ export interface operations {
38982
39128
  };
38983
39129
  content?: never;
38984
39130
  };
39131
+ /** @description The connected account selector is malformed. */
39132
+ 400: {
39133
+ headers: {
39134
+ [name: string]: unknown;
39135
+ };
39136
+ content: {
39137
+ "application/json": {
39138
+ /**
39139
+ * @description A human-readable description of the error.
39140
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
39141
+ */
39142
+ message: string;
39143
+ };
39144
+ };
39145
+ };
38985
39146
  /** @description The request is missing a valid API key. */
38986
39147
  401: {
38987
39148
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos/openapi-spec",
3
- "version": "0.81.0",
3
+ "version": "0.83.0",
4
4
  "type": "module",
5
5
  "description": "WorkOS OpenAPI specification, TypeScript types, and SDK resolution policy",
6
6
  "license": "MIT",