@workos/openapi-spec 0.143.0 → 0.145.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/README.md +5 -1
- package/dist/open-api-spec.yaml +469 -231
- package/dist/policy.d.mts +0 -10
- package/dist/policy.mjs +5 -10
- package/dist/services.d.mts +1 -3
- package/dist/services.mjs +6 -2
- package/dist/types.d.ts +325 -147
- package/package.json +6 -6
package/dist/open-api-spec.yaml
CHANGED
|
@@ -11261,6 +11261,131 @@ paths:
|
|
|
11261
11261
|
summary: List data integrations
|
|
11262
11262
|
tags:
|
|
11263
11263
|
- pipes
|
|
11264
|
+
/data-integrations/finish:
|
|
11265
|
+
post:
|
|
11266
|
+
description: >-
|
|
11267
|
+
Saves a connection that was started with `code_challenge`. After the
|
|
11268
|
+
user authorizes, WorkOS redirects them to `return_to` with a
|
|
11269
|
+
`connect_code` and `state`. Call this endpoint from your server with
|
|
11270
|
+
that `connect_code` and the `code_verifier` behind the challenge to save
|
|
11271
|
+
the connected account.
|
|
11272
|
+
operationId: DataIntegrationsController_finishConnection
|
|
11273
|
+
parameters: []
|
|
11274
|
+
requestBody:
|
|
11275
|
+
required: true
|
|
11276
|
+
content:
|
|
11277
|
+
application/json:
|
|
11278
|
+
schema:
|
|
11279
|
+
type: object
|
|
11280
|
+
properties:
|
|
11281
|
+
connect_code:
|
|
11282
|
+
type: string
|
|
11283
|
+
pattern: ^[A-Za-z0-9_-]{43}$
|
|
11284
|
+
description: >-
|
|
11285
|
+
The `connect_code` WorkOS added to `return_to` when the user
|
|
11286
|
+
finished authorizing. It can be used once and expires 90
|
|
11287
|
+
seconds after the redirect.
|
|
11288
|
+
example: Q3n0bWh2b0tqZ1VtV2ZsYkJ3cE9aV0J6T1hGb1lYaGo
|
|
11289
|
+
code_verifier:
|
|
11290
|
+
type: string
|
|
11291
|
+
pattern: ^[A-Za-z0-9._~-]{43,128}$
|
|
11292
|
+
description: >-
|
|
11293
|
+
The code verifier `code_challenge` was derived from: 43 to
|
|
11294
|
+
128 characters from `A-Z`, `a-z`, `0-9`, `-`, `.`, `_` and
|
|
11295
|
+
`~`. A wrong verifier uses up the `connect_code`, and the
|
|
11296
|
+
user has to connect again.
|
|
11297
|
+
example: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
|
|
11298
|
+
state:
|
|
11299
|
+
type: string
|
|
11300
|
+
description: >-
|
|
11301
|
+
The `state` WorkOS added to `return_to` alongside
|
|
11302
|
+
`connect_code`. Optional; it is only used to correlate the
|
|
11303
|
+
request in logs.
|
|
11304
|
+
example: q2czJKmVAraSBg8xFpT7M9uR
|
|
11305
|
+
required:
|
|
11306
|
+
- connect_code
|
|
11307
|
+
- code_verifier
|
|
11308
|
+
responses:
|
|
11309
|
+
'200':
|
|
11310
|
+
description: OK
|
|
11311
|
+
content:
|
|
11312
|
+
application/json:
|
|
11313
|
+
schema:
|
|
11314
|
+
$ref: '#/components/schemas/DataIntegrationFinishConnectionResponse'
|
|
11315
|
+
'400':
|
|
11316
|
+
description: >-
|
|
11317
|
+
The connection could not be completed, and the user must connect
|
|
11318
|
+
again. `invalid_connect_code` when the `connect_code` is unknown,
|
|
11319
|
+
expired, already used, or from another environment, or the
|
|
11320
|
+
`code_verifier` does not match the `code_challenge`. Other codes
|
|
11321
|
+
report why saving the connection failed, such as `target_deleted`
|
|
11322
|
+
when the connected account being reauthorized was deleted in the
|
|
11323
|
+
meantime. A malformed request body returns validation messages
|
|
11324
|
+
instead.
|
|
11325
|
+
content:
|
|
11326
|
+
application/json:
|
|
11327
|
+
schema:
|
|
11328
|
+
anyOf:
|
|
11329
|
+
- type: object
|
|
11330
|
+
properties:
|
|
11331
|
+
code:
|
|
11332
|
+
type: string
|
|
11333
|
+
enum:
|
|
11334
|
+
- invalid_connect_code
|
|
11335
|
+
- authorization_code_exchange_error
|
|
11336
|
+
- authorization_state_expired
|
|
11337
|
+
- auth_method_mismatch
|
|
11338
|
+
- concurrent_request
|
|
11339
|
+
- connected_account_limit_reached
|
|
11340
|
+
- connected_account_not_found
|
|
11341
|
+
- installation_failed
|
|
11342
|
+
- invalid_authorization_url
|
|
11343
|
+
- invalid_client_id
|
|
11344
|
+
- invalid_data_integration
|
|
11345
|
+
- missing_access_token
|
|
11346
|
+
- missing_code
|
|
11347
|
+
- multiple_connections_unavailable
|
|
11348
|
+
- provider_error
|
|
11349
|
+
- reauthorization_needed
|
|
11350
|
+
- target_deleted
|
|
11351
|
+
- unexpected_response_format
|
|
11352
|
+
description: The error code identifying the type of error.
|
|
11353
|
+
example: invalid_connect_code
|
|
11354
|
+
message:
|
|
11355
|
+
type: string
|
|
11356
|
+
description: A human-readable description of the error.
|
|
11357
|
+
example: Request could not be processed.
|
|
11358
|
+
required:
|
|
11359
|
+
- code
|
|
11360
|
+
- message
|
|
11361
|
+
- type: object
|
|
11362
|
+
properties:
|
|
11363
|
+
message:
|
|
11364
|
+
oneOf:
|
|
11365
|
+
- type: string
|
|
11366
|
+
- type: array
|
|
11367
|
+
items:
|
|
11368
|
+
type: string
|
|
11369
|
+
required:
|
|
11370
|
+
- message
|
|
11371
|
+
'401':
|
|
11372
|
+
description: Unauthorized
|
|
11373
|
+
'403':
|
|
11374
|
+
description: Forbidden
|
|
11375
|
+
content:
|
|
11376
|
+
application/json:
|
|
11377
|
+
schema:
|
|
11378
|
+
type: object
|
|
11379
|
+
properties:
|
|
11380
|
+
message:
|
|
11381
|
+
type: string
|
|
11382
|
+
description: A human-readable description of the error.
|
|
11383
|
+
example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
|
|
11384
|
+
required:
|
|
11385
|
+
- message
|
|
11386
|
+
summary: Finish connection
|
|
11387
|
+
tags:
|
|
11388
|
+
- pipes
|
|
11264
11389
|
/data-integrations/{slug}:
|
|
11265
11390
|
get:
|
|
11266
11391
|
description: Retrieves the user-owned data integration by its slug.
|
|
@@ -11939,8 +12064,34 @@ paths:
|
|
|
11939
12064
|
return_to:
|
|
11940
12065
|
type: string
|
|
11941
12066
|
format: uri
|
|
11942
|
-
description:
|
|
12067
|
+
description: >-
|
|
12068
|
+
The URL to redirect the user to after authorization.
|
|
12069
|
+
Required with `code_challenge`, and must then exactly match
|
|
12070
|
+
a redirect URI registered on one of the environment's
|
|
12071
|
+
applications. Loopback URLs match on any port; wildcard
|
|
12072
|
+
redirect URIs are not honored, and a `return_to` with a
|
|
12073
|
+
query string or fragment never matches.
|
|
11943
12074
|
example: https://example.com/callback
|
|
12075
|
+
code_challenge:
|
|
12076
|
+
type: string
|
|
12077
|
+
pattern: ^[A-Za-z0-9_-]{43}$
|
|
12078
|
+
description: >-
|
|
12079
|
+
A PKCE-style code challenge: the base64url-encoded SHA-256
|
|
12080
|
+
of a `code_verifier` your app keeps. When set, the
|
|
12081
|
+
connection isn't saved when the user finishes authorizing.
|
|
12082
|
+
Instead, the user is redirected to `return_to` with a
|
|
12083
|
+
`connect_code` and `state`, and your app must call [Finish
|
|
12084
|
+
connection](/reference/pipes/connected-account/finish-connection)
|
|
12085
|
+
with the `connect_code` and `code_verifier` within 90
|
|
12086
|
+
seconds to save it.
|
|
12087
|
+
example: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
|
|
12088
|
+
code_challenge_method:
|
|
12089
|
+
type: string
|
|
12090
|
+
description: >-
|
|
12091
|
+
The method used to derive `code_challenge`. Only `S256` is
|
|
12092
|
+
supported, and it is the default. Requires `code_challenge`.
|
|
12093
|
+
example: S256
|
|
12094
|
+
const: S256
|
|
11944
12095
|
config:
|
|
11945
12096
|
type: object
|
|
11946
12097
|
additionalProperties:
|
|
@@ -11984,20 +12135,43 @@ paths:
|
|
|
11984
12135
|
schema:
|
|
11985
12136
|
$ref: '#/components/schemas/DataIntegrationAuthorizeUrlResponse'
|
|
11986
12137
|
'400':
|
|
11987
|
-
description:
|
|
12138
|
+
description: >-
|
|
12139
|
+
The request was invalid. With `code_challenge`: `invalid_return_to`
|
|
12140
|
+
when `return_to` is missing or does not exactly match a registered
|
|
12141
|
+
redirect URI, `return_to_requires_exact_match` when only a wildcard
|
|
12142
|
+
redirect URI matches it, and `connect_finish_unavailable` when
|
|
12143
|
+
`code_challenge` is not available for the environment.
|
|
11988
12144
|
content:
|
|
11989
12145
|
application/json:
|
|
11990
12146
|
schema:
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12147
|
+
anyOf:
|
|
12148
|
+
- type: object
|
|
12149
|
+
properties:
|
|
12150
|
+
code:
|
|
12151
|
+
type: string
|
|
12152
|
+
enum:
|
|
12153
|
+
- invalid_return_to
|
|
12154
|
+
- return_to_requires_exact_match
|
|
12155
|
+
- connect_finish_unavailable
|
|
12156
|
+
description: The error code identifying the type of error.
|
|
12157
|
+
example: invalid_return_to
|
|
12158
|
+
message:
|
|
12159
|
+
type: string
|
|
12160
|
+
description: A human-readable description of the error.
|
|
12161
|
+
example: Request could not be processed.
|
|
12162
|
+
required:
|
|
12163
|
+
- code
|
|
12164
|
+
- message
|
|
12165
|
+
- type: object
|
|
12166
|
+
properties:
|
|
12167
|
+
message:
|
|
12168
|
+
oneOf:
|
|
12169
|
+
- type: string
|
|
12170
|
+
- type: array
|
|
12171
|
+
items:
|
|
12172
|
+
type: string
|
|
12173
|
+
required:
|
|
12174
|
+
- message
|
|
12001
12175
|
'401':
|
|
12002
12176
|
description: Unauthorized
|
|
12003
12177
|
'403':
|
|
@@ -12662,6 +12836,7 @@ paths:
|
|
|
12662
12836
|
- repo
|
|
12663
12837
|
- user:email
|
|
12664
12838
|
missing_scopes: []
|
|
12839
|
+
metadata: {}
|
|
12665
12840
|
config: {}
|
|
12666
12841
|
'400':
|
|
12667
12842
|
description: Bad Request
|
|
@@ -16496,10 +16671,7 @@ paths:
|
|
|
16496
16671
|
- user:email
|
|
16497
16672
|
auth_method: oauth
|
|
16498
16673
|
api_key_last_4: null
|
|
16499
|
-
|
|
16500
|
-
client_secret_last_4: cdef
|
|
16501
|
-
config:
|
|
16502
|
-
instance_url: https://example.my.salesforce.com
|
|
16674
|
+
config: {}
|
|
16503
16675
|
state: connected
|
|
16504
16676
|
established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
16505
16677
|
state_reason: null
|
|
@@ -16721,10 +16893,7 @@ paths:
|
|
|
16721
16893
|
- user:email
|
|
16722
16894
|
auth_method: oauth
|
|
16723
16895
|
api_key_last_4: null
|
|
16724
|
-
|
|
16725
|
-
client_secret_last_4: cdef
|
|
16726
|
-
config:
|
|
16727
|
-
instance_url: https://example.my.salesforce.com
|
|
16896
|
+
config: {}
|
|
16728
16897
|
state: connected
|
|
16729
16898
|
established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
16730
16899
|
state_reason: null
|
|
@@ -16988,10 +17157,7 @@ paths:
|
|
|
16988
17157
|
- user:email
|
|
16989
17158
|
auth_method: oauth
|
|
16990
17159
|
api_key_last_4: null
|
|
16991
|
-
|
|
16992
|
-
client_secret_last_4: cdef
|
|
16993
|
-
config:
|
|
16994
|
-
instance_url: https://example.my.salesforce.com
|
|
17160
|
+
config: {}
|
|
16995
17161
|
state: connected
|
|
16996
17162
|
established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
16997
17163
|
state_reason: null
|
|
@@ -17159,10 +17325,7 @@ paths:
|
|
|
17159
17325
|
- user:email
|
|
17160
17326
|
auth_method: oauth
|
|
17161
17327
|
api_key_last_4: null
|
|
17162
|
-
|
|
17163
|
-
client_secret_last_4: cdef
|
|
17164
|
-
config:
|
|
17165
|
-
instance_url: https://example.my.salesforce.com
|
|
17328
|
+
config: {}
|
|
17166
17329
|
state: connected
|
|
17167
17330
|
established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
17168
17331
|
state_reason: null
|
|
@@ -47744,6 +47907,229 @@ components:
|
|
|
47744
47907
|
- object
|
|
47745
47908
|
- data
|
|
47746
47909
|
- list_metadata
|
|
47910
|
+
ConnectedAccount:
|
|
47911
|
+
type: object
|
|
47912
|
+
properties:
|
|
47913
|
+
object:
|
|
47914
|
+
type: string
|
|
47915
|
+
description: Distinguishes the connected account object.
|
|
47916
|
+
const: connected_account
|
|
47917
|
+
id:
|
|
47918
|
+
type: string
|
|
47919
|
+
description: The unique identifier of the connected account.
|
|
47920
|
+
example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
|
|
47921
|
+
connection_role:
|
|
47922
|
+
type: string
|
|
47923
|
+
enum:
|
|
47924
|
+
- compatibility
|
|
47925
|
+
- standard
|
|
47926
|
+
description: >-
|
|
47927
|
+
Whether this row is the compatibility connection visible to
|
|
47928
|
+
undeclared clients or a standard peer for plural-aware clients. The
|
|
47929
|
+
role does not indicate preference or creation order.
|
|
47930
|
+
example: compatibility
|
|
47931
|
+
account_identifier:
|
|
47932
|
+
type:
|
|
47933
|
+
- string
|
|
47934
|
+
- 'null'
|
|
47935
|
+
description: >-
|
|
47936
|
+
A best-effort identifier for the provider account this connection
|
|
47937
|
+
points at. It is correlation metadata, not the connection identifier
|
|
47938
|
+
or a selector.
|
|
47939
|
+
example: workspace_123
|
|
47940
|
+
account_display_name:
|
|
47941
|
+
type:
|
|
47942
|
+
- string
|
|
47943
|
+
- 'null'
|
|
47944
|
+
description: >-
|
|
47945
|
+
A mutable, non-unique display name for the provider account
|
|
47946
|
+
connection.
|
|
47947
|
+
example: Acme production
|
|
47948
|
+
user_id:
|
|
47949
|
+
type:
|
|
47950
|
+
- string
|
|
47951
|
+
- 'null'
|
|
47952
|
+
description: >-
|
|
47953
|
+
The [User](/reference/authkit/user) identifier associated with this
|
|
47954
|
+
connection.
|
|
47955
|
+
example: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
47956
|
+
organization_id:
|
|
47957
|
+
type:
|
|
47958
|
+
- string
|
|
47959
|
+
- 'null'
|
|
47960
|
+
description: >-
|
|
47961
|
+
The [Organization](/reference/organization) identifier associated
|
|
47962
|
+
with this connection, or `null` if not scoped to an organization.
|
|
47963
|
+
example: null
|
|
47964
|
+
scopes:
|
|
47965
|
+
type: array
|
|
47966
|
+
items:
|
|
47967
|
+
type: string
|
|
47968
|
+
description: The OAuth scopes granted for this connection.
|
|
47969
|
+
example:
|
|
47970
|
+
- repo
|
|
47971
|
+
- user:email
|
|
47972
|
+
auth_method:
|
|
47973
|
+
type: string
|
|
47974
|
+
enum:
|
|
47975
|
+
- oauth
|
|
47976
|
+
- api_key
|
|
47977
|
+
- client_credentials
|
|
47978
|
+
description: >-
|
|
47979
|
+
The authentication method used for this connection (`oauth`,
|
|
47980
|
+
`api_key`, or `client_credentials`). Defaults to `oauth` if absent.
|
|
47981
|
+
example: oauth
|
|
47982
|
+
api_key_last_4:
|
|
47983
|
+
type:
|
|
47984
|
+
- string
|
|
47985
|
+
- 'null'
|
|
47986
|
+
description: >-
|
|
47987
|
+
The last four characters of the API key, or `null` for OAuth
|
|
47988
|
+
connections.
|
|
47989
|
+
example: null
|
|
47990
|
+
client_id:
|
|
47991
|
+
type:
|
|
47992
|
+
- string
|
|
47993
|
+
- 'null'
|
|
47994
|
+
description: >-
|
|
47995
|
+
The client ID supplied for this connection. Only present when
|
|
47996
|
+
`auth_method` is `client_credentials`.
|
|
47997
|
+
example: 3MVG9dZJodJWxft2VoStSCVwPFsx0eDcpVc
|
|
47998
|
+
client_secret_last_4:
|
|
47999
|
+
type:
|
|
48000
|
+
- string
|
|
48001
|
+
- 'null'
|
|
48002
|
+
description: >-
|
|
48003
|
+
The last four characters of the client secret supplied for this
|
|
48004
|
+
connection, or `null` when it can't be read. Only present when
|
|
48005
|
+
`auth_method` is `client_credentials`.
|
|
48006
|
+
example: cdef
|
|
48007
|
+
config:
|
|
48008
|
+
type: object
|
|
48009
|
+
additionalProperties:
|
|
48010
|
+
type: string
|
|
48011
|
+
description: >-
|
|
48012
|
+
The connection-level configuration values stored for this connection
|
|
48013
|
+
— the fields the provider declares at `installation` scope,
|
|
48014
|
+
excluding secret and undeclared fields. Returned for every
|
|
48015
|
+
authentication method; empty when no stored values can be disclosed.
|
|
48016
|
+
example:
|
|
48017
|
+
instance_url: https://example.my.salesforce.com
|
|
48018
|
+
state:
|
|
48019
|
+
type: string
|
|
48020
|
+
enum:
|
|
48021
|
+
- connected
|
|
48022
|
+
- needs_reauthorization
|
|
48023
|
+
- disconnected
|
|
48024
|
+
description: >-
|
|
48025
|
+
The state of the connected account:
|
|
48026
|
+
|
|
48027
|
+
- `connected`: The connection is active and tokens are valid.
|
|
48028
|
+
|
|
48029
|
+
- `needs_reauthorization`: The user needs to reauthorize the
|
|
48030
|
+
connection, typically because required scopes have changed.
|
|
48031
|
+
`state_reason` explains why when WorkOS invalidated the connection
|
|
48032
|
+
itself.
|
|
48033
|
+
|
|
48034
|
+
- `disconnected`: The connection has been disconnected.
|
|
48035
|
+
example: connected
|
|
48036
|
+
established_by_user_id:
|
|
48037
|
+
type:
|
|
48038
|
+
- string
|
|
48039
|
+
- 'null'
|
|
48040
|
+
description: >-
|
|
48041
|
+
The [User](/reference/authkit/user) whose authorization established
|
|
48042
|
+
this connection. `null` when the connection is developer-managed or
|
|
48043
|
+
its establisher is unknown, and when the establishing member lost
|
|
48044
|
+
access to the organization — in which case `state_reason` is
|
|
48045
|
+
`establishing_member_membership_ended`.
|
|
48046
|
+
example: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
48047
|
+
state_reason:
|
|
48048
|
+
description: >-
|
|
48049
|
+
Why WorkOS put the connection in its current `state`, or `null` when
|
|
48050
|
+
there is no WorkOS-recorded reason:
|
|
48051
|
+
|
|
48052
|
+
- `establishing_member_membership_ended`: The member who established
|
|
48053
|
+
this organization-owned connection is no longer an active member of
|
|
48054
|
+
the organization, so its credentials were cleared. An organization
|
|
48055
|
+
admin must provide new credentials.
|
|
48056
|
+
|
|
48057
|
+
|
|
48058
|
+
Additional values may be added; treat an unrecognized value as an
|
|
48059
|
+
unknown reason.
|
|
48060
|
+
example: null
|
|
48061
|
+
oneOf:
|
|
48062
|
+
- type: string
|
|
48063
|
+
const: establishing_member_membership_ended
|
|
48064
|
+
- type: 'null'
|
|
48065
|
+
created_at:
|
|
48066
|
+
type: string
|
|
48067
|
+
description: The timestamp when the connection was created.
|
|
48068
|
+
example: '2024-01-16T14:20:00.000Z'
|
|
48069
|
+
updated_at:
|
|
48070
|
+
type: string
|
|
48071
|
+
description: The timestamp when the connection was last updated.
|
|
48072
|
+
example: '2024-01-16T14:20:00.000Z'
|
|
48073
|
+
warnings:
|
|
48074
|
+
type: array
|
|
48075
|
+
items:
|
|
48076
|
+
type: object
|
|
48077
|
+
properties:
|
|
48078
|
+
code:
|
|
48079
|
+
type: string
|
|
48080
|
+
const: duplicate_account_display_name
|
|
48081
|
+
message:
|
|
48082
|
+
type: string
|
|
48083
|
+
description: A human-readable explanation of the non-blocking warning.
|
|
48084
|
+
example: >-
|
|
48085
|
+
Another connection for this provider and owner has the same
|
|
48086
|
+
label.
|
|
48087
|
+
required:
|
|
48088
|
+
- code
|
|
48089
|
+
- message
|
|
48090
|
+
description: >-
|
|
48091
|
+
Non-blocking warnings about an explicitly supplied label. Only
|
|
48092
|
+
writes return it, and only when another connection already uses the
|
|
48093
|
+
label; reads omit it.
|
|
48094
|
+
required:
|
|
48095
|
+
- object
|
|
48096
|
+
- id
|
|
48097
|
+
- connection_role
|
|
48098
|
+
- account_identifier
|
|
48099
|
+
- account_display_name
|
|
48100
|
+
- user_id
|
|
48101
|
+
- organization_id
|
|
48102
|
+
- scopes
|
|
48103
|
+
- state
|
|
48104
|
+
- created_at
|
|
48105
|
+
- updated_at
|
|
48106
|
+
example:
|
|
48107
|
+
object: connected_account
|
|
48108
|
+
id: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
|
|
48109
|
+
connection_role: compatibility
|
|
48110
|
+
account_identifier: workspace_123
|
|
48111
|
+
account_display_name: Acme production
|
|
48112
|
+
user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
48113
|
+
organization_id: null
|
|
48114
|
+
scopes:
|
|
48115
|
+
- repo
|
|
48116
|
+
- user:email
|
|
48117
|
+
auth_method: oauth
|
|
48118
|
+
api_key_last_4: null
|
|
48119
|
+
config: {}
|
|
48120
|
+
state: connected
|
|
48121
|
+
established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
48122
|
+
state_reason: null
|
|
48123
|
+
created_at: '2024-01-16T14:20:00.000Z'
|
|
48124
|
+
updated_at: '2024-01-16T14:20:00.000Z'
|
|
48125
|
+
DataIntegrationFinishConnectionResponse:
|
|
48126
|
+
type: object
|
|
48127
|
+
properties:
|
|
48128
|
+
connected_account:
|
|
48129
|
+
$ref: '#/components/schemas/ConnectedAccount'
|
|
48130
|
+
description: The connected account that was saved.
|
|
48131
|
+
required:
|
|
48132
|
+
- connected_account
|
|
47747
48133
|
DataIntegrationAuthorizeUrlResponse:
|
|
47748
48134
|
type: object
|
|
47749
48135
|
properties:
|
|
@@ -47752,6 +48138,15 @@ components:
|
|
|
47752
48138
|
description: The OAuth authorization URL to redirect the user to.
|
|
47753
48139
|
example: >-
|
|
47754
48140
|
https://api.workos.com/data-integrations/q2czJKmVAraSBg8xFpT7M9uR/authorize-redirect
|
|
48141
|
+
completion:
|
|
48142
|
+
type: string
|
|
48143
|
+
description: >-
|
|
48144
|
+
`finish_required` when the request included `code_challenge`: the
|
|
48145
|
+
connection will be held until your app finishes it. Omitted
|
|
48146
|
+
otherwise. If you sent `code_challenge` and this is missing, don't
|
|
48147
|
+
redirect the user.
|
|
48148
|
+
example: finish_required
|
|
48149
|
+
const: finish_required
|
|
47755
48150
|
required:
|
|
47756
48151
|
- url
|
|
47757
48152
|
AuthMethodMismatchError:
|
|
@@ -47928,6 +48323,18 @@ components:
|
|
|
47928
48323
|
the access token, they're listed here. Present for `oauth` and
|
|
47929
48324
|
`client_credentials` credentials; absent for `api_key`.
|
|
47930
48325
|
example: []
|
|
48326
|
+
metadata:
|
|
48327
|
+
type: object
|
|
48328
|
+
additionalProperties: {}
|
|
48329
|
+
description: >-
|
|
48330
|
+
Non-sensitive fields captured from the provider token response
|
|
48331
|
+
(e.g. Salesforce `instance_url`), as configured for the
|
|
48332
|
+
provider. Captured on OAuth code exchange and refresh, and on
|
|
48333
|
+
each `client_credentials` mint. A field a later OAuth refresh
|
|
48334
|
+
omits keeps its stored value. Present for `oauth` and
|
|
48335
|
+
`client_credentials` credentials; absent for `api_key`.
|
|
48336
|
+
example: &ref_39
|
|
48337
|
+
instance_url: https://acme.my.salesforce.com
|
|
47931
48338
|
config:
|
|
47932
48339
|
type: object
|
|
47933
48340
|
additionalProperties:
|
|
@@ -47951,6 +48358,7 @@ components:
|
|
|
47951
48358
|
- expires_at
|
|
47952
48359
|
- scopes
|
|
47953
48360
|
- missing_scopes
|
|
48361
|
+
- metadata
|
|
47954
48362
|
- config
|
|
47955
48363
|
- type: object
|
|
47956
48364
|
properties:
|
|
@@ -48047,9 +48455,11 @@ components:
|
|
|
48047
48455
|
description: >-
|
|
48048
48456
|
Non-sensitive fields captured from the provider token response
|
|
48049
48457
|
(e.g. Salesforce `instance_url`), as configured for the
|
|
48050
|
-
provider.
|
|
48051
|
-
|
|
48052
|
-
|
|
48458
|
+
provider. Captured on OAuth code exchange and refresh, and on
|
|
48459
|
+
each `client_credentials` mint. A field a later OAuth refresh
|
|
48460
|
+
omits keeps its stored value. Present for `oauth` and
|
|
48461
|
+
`client_credentials` credentials; absent for `api_key`.
|
|
48462
|
+
example: *ref_39
|
|
48053
48463
|
config:
|
|
48054
48464
|
type: object
|
|
48055
48465
|
additionalProperties:
|
|
@@ -48115,202 +48525,6 @@ components:
|
|
|
48115
48525
|
required:
|
|
48116
48526
|
- active
|
|
48117
48527
|
- error
|
|
48118
|
-
ConnectedAccount:
|
|
48119
|
-
type: object
|
|
48120
|
-
properties:
|
|
48121
|
-
object:
|
|
48122
|
-
type: string
|
|
48123
|
-
description: Distinguishes the connected account object.
|
|
48124
|
-
const: connected_account
|
|
48125
|
-
id:
|
|
48126
|
-
type: string
|
|
48127
|
-
description: The unique identifier of the connected account.
|
|
48128
|
-
example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
|
|
48129
|
-
connection_role:
|
|
48130
|
-
type: string
|
|
48131
|
-
enum:
|
|
48132
|
-
- compatibility
|
|
48133
|
-
- standard
|
|
48134
|
-
description: >-
|
|
48135
|
-
Whether this row is the compatibility connection visible to
|
|
48136
|
-
undeclared clients or a standard peer for plural-aware clients. The
|
|
48137
|
-
role does not indicate preference or creation order.
|
|
48138
|
-
example: compatibility
|
|
48139
|
-
account_identifier:
|
|
48140
|
-
type:
|
|
48141
|
-
- string
|
|
48142
|
-
- 'null'
|
|
48143
|
-
description: >-
|
|
48144
|
-
A best-effort identifier for the provider account this connection
|
|
48145
|
-
points at. It is correlation metadata, not the connection identifier
|
|
48146
|
-
or a selector.
|
|
48147
|
-
example: workspace_123
|
|
48148
|
-
account_display_name:
|
|
48149
|
-
type:
|
|
48150
|
-
- string
|
|
48151
|
-
- 'null'
|
|
48152
|
-
description: >-
|
|
48153
|
-
A mutable, non-unique display name for the provider account
|
|
48154
|
-
connection.
|
|
48155
|
-
example: Acme production
|
|
48156
|
-
user_id:
|
|
48157
|
-
type:
|
|
48158
|
-
- string
|
|
48159
|
-
- 'null'
|
|
48160
|
-
description: >-
|
|
48161
|
-
The [User](/reference/authkit/user) identifier associated with this
|
|
48162
|
-
connection.
|
|
48163
|
-
example: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
48164
|
-
organization_id:
|
|
48165
|
-
type:
|
|
48166
|
-
- string
|
|
48167
|
-
- 'null'
|
|
48168
|
-
description: >-
|
|
48169
|
-
The [Organization](/reference/organization) identifier associated
|
|
48170
|
-
with this connection, or `null` if not scoped to an organization.
|
|
48171
|
-
example: null
|
|
48172
|
-
scopes:
|
|
48173
|
-
type: array
|
|
48174
|
-
items:
|
|
48175
|
-
type: string
|
|
48176
|
-
description: The OAuth scopes granted for this connection.
|
|
48177
|
-
example:
|
|
48178
|
-
- repo
|
|
48179
|
-
- user:email
|
|
48180
|
-
auth_method:
|
|
48181
|
-
type: string
|
|
48182
|
-
enum:
|
|
48183
|
-
- oauth
|
|
48184
|
-
- api_key
|
|
48185
|
-
- client_credentials
|
|
48186
|
-
description: >-
|
|
48187
|
-
The authentication method used for this connection (`oauth`,
|
|
48188
|
-
`api_key`, or `client_credentials`). Defaults to `oauth` if absent.
|
|
48189
|
-
example: oauth
|
|
48190
|
-
api_key_last_4:
|
|
48191
|
-
type:
|
|
48192
|
-
- string
|
|
48193
|
-
- 'null'
|
|
48194
|
-
description: >-
|
|
48195
|
-
The last four characters of the API key, or `null` for OAuth
|
|
48196
|
-
connections.
|
|
48197
|
-
example: null
|
|
48198
|
-
client_id:
|
|
48199
|
-
type:
|
|
48200
|
-
- string
|
|
48201
|
-
- 'null'
|
|
48202
|
-
description: >-
|
|
48203
|
-
The client ID supplied for this connection. Only present when
|
|
48204
|
-
`auth_method` is `client_credentials`.
|
|
48205
|
-
example: 3MVG9dZJodJWxft2VoStSCVwPFsx0eDcpVc
|
|
48206
|
-
client_secret_last_4:
|
|
48207
|
-
type:
|
|
48208
|
-
- string
|
|
48209
|
-
- 'null'
|
|
48210
|
-
description: >-
|
|
48211
|
-
The last four characters of the client secret supplied for this
|
|
48212
|
-
connection, or `null` when it can't be read. Only present when
|
|
48213
|
-
`auth_method` is `client_credentials`.
|
|
48214
|
-
example: cdef
|
|
48215
|
-
config:
|
|
48216
|
-
type: object
|
|
48217
|
-
additionalProperties:
|
|
48218
|
-
type: string
|
|
48219
|
-
description: >-
|
|
48220
|
-
The connection-level configuration values stored for this connection
|
|
48221
|
-
— the fields the provider declares at `installation` scope,
|
|
48222
|
-
excluding secret and undeclared fields. Returned for every
|
|
48223
|
-
authentication method; empty when no stored values can be disclosed.
|
|
48224
|
-
example:
|
|
48225
|
-
instance_url: https://example.my.salesforce.com
|
|
48226
|
-
state:
|
|
48227
|
-
type: string
|
|
48228
|
-
enum:
|
|
48229
|
-
- connected
|
|
48230
|
-
- needs_reauthorization
|
|
48231
|
-
- disconnected
|
|
48232
|
-
description: >-
|
|
48233
|
-
The state of the connected account:
|
|
48234
|
-
|
|
48235
|
-
- `connected`: The connection is active and tokens are valid.
|
|
48236
|
-
|
|
48237
|
-
- `needs_reauthorization`: The user needs to reauthorize the
|
|
48238
|
-
connection, typically because required scopes have changed.
|
|
48239
|
-
`state_reason` explains why when WorkOS invalidated the connection
|
|
48240
|
-
itself.
|
|
48241
|
-
|
|
48242
|
-
- `disconnected`: The connection has been disconnected.
|
|
48243
|
-
example: connected
|
|
48244
|
-
established_by_user_id:
|
|
48245
|
-
type:
|
|
48246
|
-
- string
|
|
48247
|
-
- 'null'
|
|
48248
|
-
description: >-
|
|
48249
|
-
The [User](/reference/authkit/user) whose authorization established
|
|
48250
|
-
this connection. `null` when the connection is developer-managed or
|
|
48251
|
-
its establisher is unknown, and when the establishing member lost
|
|
48252
|
-
access to the organization — in which case `state_reason` is
|
|
48253
|
-
`establishing_member_membership_ended`.
|
|
48254
|
-
example: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
48255
|
-
state_reason:
|
|
48256
|
-
description: >-
|
|
48257
|
-
Why WorkOS put the connection in its current `state`, or `null` when
|
|
48258
|
-
there is no WorkOS-recorded reason:
|
|
48259
|
-
|
|
48260
|
-
- `establishing_member_membership_ended`: The member who established
|
|
48261
|
-
this organization-owned connection is no longer an active member of
|
|
48262
|
-
the organization, so its credentials were cleared. An organization
|
|
48263
|
-
admin must provide new credentials.
|
|
48264
|
-
|
|
48265
|
-
|
|
48266
|
-
Additional values may be added; treat an unrecognized value as an
|
|
48267
|
-
unknown reason.
|
|
48268
|
-
example: null
|
|
48269
|
-
oneOf:
|
|
48270
|
-
- type: string
|
|
48271
|
-
const: establishing_member_membership_ended
|
|
48272
|
-
- type: 'null'
|
|
48273
|
-
created_at:
|
|
48274
|
-
type: string
|
|
48275
|
-
description: The timestamp when the connection was created.
|
|
48276
|
-
example: '2024-01-16T14:20:00.000Z'
|
|
48277
|
-
updated_at:
|
|
48278
|
-
type: string
|
|
48279
|
-
description: The timestamp when the connection was last updated.
|
|
48280
|
-
example: '2024-01-16T14:20:00.000Z'
|
|
48281
|
-
warnings:
|
|
48282
|
-
type: array
|
|
48283
|
-
items:
|
|
48284
|
-
type: object
|
|
48285
|
-
properties:
|
|
48286
|
-
code:
|
|
48287
|
-
type: string
|
|
48288
|
-
const: duplicate_account_display_name
|
|
48289
|
-
message:
|
|
48290
|
-
type: string
|
|
48291
|
-
description: A human-readable explanation of the non-blocking warning.
|
|
48292
|
-
example: >-
|
|
48293
|
-
Another connection for this provider and owner has the same
|
|
48294
|
-
label.
|
|
48295
|
-
required:
|
|
48296
|
-
- code
|
|
48297
|
-
- message
|
|
48298
|
-
description: >-
|
|
48299
|
-
Non-blocking warnings about an explicitly supplied label. Only
|
|
48300
|
-
writes return it, and only when another connection already uses the
|
|
48301
|
-
label; reads omit it.
|
|
48302
|
-
required:
|
|
48303
|
-
- object
|
|
48304
|
-
- id
|
|
48305
|
-
- connection_role
|
|
48306
|
-
- account_identifier
|
|
48307
|
-
- account_display_name
|
|
48308
|
-
- user_id
|
|
48309
|
-
- organization_id
|
|
48310
|
-
- scopes
|
|
48311
|
-
- state
|
|
48312
|
-
- created_at
|
|
48313
|
-
- updated_at
|
|
48314
48528
|
DataIntegrationsListResponse:
|
|
48315
48529
|
type: object
|
|
48316
48530
|
properties:
|
|
@@ -48430,6 +48644,29 @@ components:
|
|
|
48430
48644
|
deprecated: true
|
|
48431
48645
|
description: Use updated_at instead.
|
|
48432
48646
|
connected_account:
|
|
48647
|
+
example: &ref_42
|
|
48648
|
+
object: connected_account
|
|
48649
|
+
id: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
|
|
48650
|
+
connection_role: compatibility
|
|
48651
|
+
account_identifier: workspace_123
|
|
48652
|
+
account_display_name: Acme production
|
|
48653
|
+
user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
48654
|
+
organization_id: null
|
|
48655
|
+
scopes:
|
|
48656
|
+
- repo
|
|
48657
|
+
- user:email
|
|
48658
|
+
auth_method: oauth
|
|
48659
|
+
api_key_last_4: null
|
|
48660
|
+
config: {}
|
|
48661
|
+
state: connected
|
|
48662
|
+
established_by_user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
48663
|
+
state_reason: null
|
|
48664
|
+
created_at: '2024-01-16T14:20:00.000Z'
|
|
48665
|
+
updated_at: '2024-01-16T14:20:00.000Z'
|
|
48666
|
+
userlandUserId: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
48667
|
+
organizationId: null
|
|
48668
|
+
createdAt: '2024-01-16T14:20:00.000Z'
|
|
48669
|
+
updatedAt: '2024-01-16T14:20:00.000Z'
|
|
48433
48670
|
description: >-
|
|
48434
48671
|
The user's compatibility [connected
|
|
48435
48672
|
account](/reference/pipes/connected-account) for this
|
|
@@ -48496,7 +48733,7 @@ components:
|
|
|
48496
48733
|
items:
|
|
48497
48734
|
type: string
|
|
48498
48735
|
description: The OAuth scopes granted for this connection.
|
|
48499
|
-
example: &
|
|
48736
|
+
example: &ref_40
|
|
48500
48737
|
- repo
|
|
48501
48738
|
- user:email
|
|
48502
48739
|
auth_method:
|
|
@@ -48546,7 +48783,7 @@ components:
|
|
|
48546
48783
|
`installation` scope, excluding secret and undeclared
|
|
48547
48784
|
fields. Returned for every authentication method;
|
|
48548
48785
|
empty when no stored values can be disclosed.
|
|
48549
|
-
example: &
|
|
48786
|
+
example: &ref_41
|
|
48550
48787
|
instance_url: https://example.my.salesforce.com
|
|
48551
48788
|
state:
|
|
48552
48789
|
type: string
|
|
@@ -48731,7 +48968,7 @@ components:
|
|
|
48731
48968
|
items:
|
|
48732
48969
|
type: string
|
|
48733
48970
|
description: The OAuth scopes granted for this connection.
|
|
48734
|
-
example: *
|
|
48971
|
+
example: *ref_40
|
|
48735
48972
|
auth_method:
|
|
48736
48973
|
type: string
|
|
48737
48974
|
enum:
|
|
@@ -48778,7 +49015,7 @@ components:
|
|
|
48778
49015
|
`installation` scope, excluding secret and undeclared
|
|
48779
49016
|
fields. Returned for every authentication method; empty
|
|
48780
49017
|
when no stored values can be disclosed.
|
|
48781
|
-
example: *
|
|
49018
|
+
example: *ref_41
|
|
48782
49019
|
state:
|
|
48783
49020
|
type: string
|
|
48784
49021
|
enum:
|
|
@@ -48896,6 +49133,7 @@ components:
|
|
|
48896
49133
|
- organizationId
|
|
48897
49134
|
- createdAt
|
|
48898
49135
|
- updatedAt
|
|
49136
|
+
example: *ref_42
|
|
48899
49137
|
description: >-
|
|
48900
49138
|
The user's connected accounts for this provider in the
|
|
48901
49139
|
requested ownership context. This contains only the
|