@workos/openapi-spec 0.53.0 → 0.54.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/open-api-spec.yaml +135 -2
- package/dist/services.mjs +5 -0
- package/dist/types.d.ts +154 -3
- package/package.json +1 -1
package/dist/open-api-spec.yaml
CHANGED
|
@@ -7273,7 +7273,9 @@ paths:
|
|
|
7273
7273
|
`custom` to use your own OAuth app credentials or `organization` to have
|
|
7274
7274
|
each organization supply its own. Set `auth_methods` to `["api_key"]` to
|
|
7275
7275
|
create an API key integration; you may optionally supply an `api_key`
|
|
7276
|
-
block to install a first tenant in the same call.
|
|
7276
|
+
block to install a first tenant in the same call. Set `auth_methods` to
|
|
7277
|
+
`["client_credentials"]` to create a client-credentials integration;
|
|
7278
|
+
client credentials are installed per-tenant afterwards. For a built-in
|
|
7277
7279
|
provider, pass its slug as `provider`. For a custom provider, pass a new
|
|
7278
7280
|
slug plus a `custom_provider` definition.
|
|
7279
7281
|
operationId: DataIntegrationsManagementController_createDataIntegration
|
|
@@ -7802,6 +7804,133 @@ paths:
|
|
|
7802
7804
|
summary: Get authorization URL
|
|
7803
7805
|
tags:
|
|
7804
7806
|
- pipes
|
|
7807
|
+
/data-integrations/{slug}/client-credentials:
|
|
7808
|
+
put:
|
|
7809
|
+
description: >-
|
|
7810
|
+
Creates or updates a client-credentials-based installation for the
|
|
7811
|
+
specified integration and user. If an installation already exists, the
|
|
7812
|
+
stored client credentials are rotated to the new values.
|
|
7813
|
+
operationId: DataIntegrationsController_upsertClientCredentials
|
|
7814
|
+
parameters:
|
|
7815
|
+
- name: slug
|
|
7816
|
+
required: true
|
|
7817
|
+
in: path
|
|
7818
|
+
description: The identifier of the integration.
|
|
7819
|
+
schema:
|
|
7820
|
+
example: salesforce
|
|
7821
|
+
type: string
|
|
7822
|
+
requestBody:
|
|
7823
|
+
required: true
|
|
7824
|
+
content:
|
|
7825
|
+
application/json:
|
|
7826
|
+
schema:
|
|
7827
|
+
type: object
|
|
7828
|
+
properties:
|
|
7829
|
+
user_id:
|
|
7830
|
+
type: string
|
|
7831
|
+
description: A [User](/reference/authkit/user) identifier.
|
|
7832
|
+
example: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
7833
|
+
organization_id:
|
|
7834
|
+
type: string
|
|
7835
|
+
description: >-
|
|
7836
|
+
An [Organization](/reference/organization) identifier.
|
|
7837
|
+
Optional parameter to scope the connection to a specific
|
|
7838
|
+
organization.
|
|
7839
|
+
example: org_01EHZNVPK3SFK441A1RGBFSHRT
|
|
7840
|
+
client_id:
|
|
7841
|
+
type: string
|
|
7842
|
+
minLength: 1
|
|
7843
|
+
description: The OAuth client ID to store for this integration.
|
|
7844
|
+
example: 3MVG9...
|
|
7845
|
+
client_secret:
|
|
7846
|
+
type: string
|
|
7847
|
+
minLength: 1
|
|
7848
|
+
description: The OAuth client secret to store for this integration.
|
|
7849
|
+
example: shhh-secret
|
|
7850
|
+
config:
|
|
7851
|
+
type: object
|
|
7852
|
+
additionalProperties:
|
|
7853
|
+
type: string
|
|
7854
|
+
description: >-
|
|
7855
|
+
Provider-specific configuration values collected for this
|
|
7856
|
+
installation, keyed by the provider's config field
|
|
7857
|
+
descriptors.
|
|
7858
|
+
example:
|
|
7859
|
+
mydomain: acme
|
|
7860
|
+
required:
|
|
7861
|
+
- user_id
|
|
7862
|
+
- client_id
|
|
7863
|
+
- client_secret
|
|
7864
|
+
responses:
|
|
7865
|
+
'200':
|
|
7866
|
+
description: The resulting connected account after the upsert.
|
|
7867
|
+
content:
|
|
7868
|
+
application/json:
|
|
7869
|
+
schema:
|
|
7870
|
+
$ref: '#/components/schemas/ConnectedAccount'
|
|
7871
|
+
example:
|
|
7872
|
+
object: connected_account
|
|
7873
|
+
id: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
|
|
7874
|
+
user_id: user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
7875
|
+
organization_id: org_01EHZNVPK3SFK441A1RGBFSHRT
|
|
7876
|
+
scopes: []
|
|
7877
|
+
auth_method: client_credentials
|
|
7878
|
+
state: connected
|
|
7879
|
+
created_at: '2024-01-16T14:20:00.000Z'
|
|
7880
|
+
updated_at: '2024-01-16T14:20:00.000Z'
|
|
7881
|
+
'400':
|
|
7882
|
+
description: Bad Request
|
|
7883
|
+
content:
|
|
7884
|
+
application/json:
|
|
7885
|
+
schema:
|
|
7886
|
+
type: object
|
|
7887
|
+
properties:
|
|
7888
|
+
message:
|
|
7889
|
+
type: string
|
|
7890
|
+
description: A human-readable description of the error.
|
|
7891
|
+
example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
|
|
7892
|
+
required:
|
|
7893
|
+
- message
|
|
7894
|
+
'401':
|
|
7895
|
+
description: Unauthorized
|
|
7896
|
+
'403':
|
|
7897
|
+
description: Forbidden
|
|
7898
|
+
content:
|
|
7899
|
+
application/json:
|
|
7900
|
+
schema:
|
|
7901
|
+
type: object
|
|
7902
|
+
properties:
|
|
7903
|
+
message:
|
|
7904
|
+
type: string
|
|
7905
|
+
description: A human-readable description of the error.
|
|
7906
|
+
example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
|
|
7907
|
+
required:
|
|
7908
|
+
- message
|
|
7909
|
+
'404':
|
|
7910
|
+
description: Data integration not found for the given provider slug.
|
|
7911
|
+
content:
|
|
7912
|
+
application/json:
|
|
7913
|
+
schema:
|
|
7914
|
+
type: object
|
|
7915
|
+
properties:
|
|
7916
|
+
message:
|
|
7917
|
+
type: string
|
|
7918
|
+
description: A human-readable description of the error.
|
|
7919
|
+
example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
|
|
7920
|
+
required:
|
|
7921
|
+
- message
|
|
7922
|
+
'422':
|
|
7923
|
+
description: >-
|
|
7924
|
+
The matched installation uses a different auth method than this
|
|
7925
|
+
endpoint expects.
|
|
7926
|
+
content:
|
|
7927
|
+
application/json:
|
|
7928
|
+
schema:
|
|
7929
|
+
$ref: '#/components/schemas/AuthMethodMismatchError'
|
|
7930
|
+
summary: Upsert client credentials for a connected account
|
|
7931
|
+
tags:
|
|
7932
|
+
- pipes
|
|
7933
|
+
x-feature-flag: pipes-client-credentials
|
|
7805
7934
|
/data-integrations/{slug}/credentials:
|
|
7806
7935
|
post:
|
|
7807
7936
|
description: >-
|
|
@@ -21157,12 +21286,16 @@ components:
|
|
|
21157
21286
|
How accounts authenticate with the provider. Defaults to
|
|
21158
21287
|
`["oauth"]`. Use `["api_key"]` to declare an API key integration;
|
|
21159
21288
|
`credentials` is then not required and keys are supplied per-tenant
|
|
21160
|
-
(optionally via `api_key` on this request).
|
|
21289
|
+
(optionally via `api_key` on this request). Use
|
|
21290
|
+
`["client_credentials"]` to declare a client-credentials
|
|
21291
|
+
integration; `credentials` is likewise not required and client
|
|
21292
|
+
credentials are supplied per-tenant.
|
|
21161
21293
|
items:
|
|
21162
21294
|
type: string
|
|
21163
21295
|
enum:
|
|
21164
21296
|
- oauth
|
|
21165
21297
|
- api_key
|
|
21298
|
+
- client_credentials
|
|
21166
21299
|
example:
|
|
21167
21300
|
- oauth
|
|
21168
21301
|
config:
|
package/dist/services.mjs
CHANGED
|
@@ -705,6 +705,11 @@ const serviceEndpoints = {
|
|
|
705
705
|
"path": "/data-integrations/{slug}/authorize",
|
|
706
706
|
"name": "authorize_data_integration"
|
|
707
707
|
},
|
|
708
|
+
{
|
|
709
|
+
"method": "PUT",
|
|
710
|
+
"path": "/data-integrations/{slug}/client-credentials",
|
|
711
|
+
"name": "update_data_integration_client_credentials"
|
|
712
|
+
},
|
|
708
713
|
{
|
|
709
714
|
"method": "POST",
|
|
710
715
|
"path": "/data-integrations/{slug}/credentials",
|
package/dist/types.d.ts
CHANGED
|
@@ -1088,7 +1088,7 @@ export interface paths {
|
|
|
1088
1088
|
put?: never;
|
|
1089
1089
|
/**
|
|
1090
1090
|
* Create a data integration
|
|
1091
|
-
* @description Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
|
|
1091
|
+
* @description Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
|
|
1092
1092
|
*/
|
|
1093
1093
|
post: operations["DataIntegrationsManagementController_createDataIntegration"];
|
|
1094
1094
|
delete?: never;
|
|
@@ -1165,6 +1165,26 @@ export interface paths {
|
|
|
1165
1165
|
patch?: never;
|
|
1166
1166
|
trace?: never;
|
|
1167
1167
|
};
|
|
1168
|
+
"/data-integrations/{slug}/client-credentials": {
|
|
1169
|
+
parameters: {
|
|
1170
|
+
query?: never;
|
|
1171
|
+
header?: never;
|
|
1172
|
+
path?: never;
|
|
1173
|
+
cookie?: never;
|
|
1174
|
+
};
|
|
1175
|
+
get?: never;
|
|
1176
|
+
/**
|
|
1177
|
+
* Upsert client credentials for a connected account
|
|
1178
|
+
* @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.
|
|
1179
|
+
*/
|
|
1180
|
+
put: operations["DataIntegrationsController_upsertClientCredentials"];
|
|
1181
|
+
post?: never;
|
|
1182
|
+
delete?: never;
|
|
1183
|
+
options?: never;
|
|
1184
|
+
head?: never;
|
|
1185
|
+
patch?: never;
|
|
1186
|
+
trace?: never;
|
|
1187
|
+
};
|
|
1168
1188
|
"/data-integrations/{slug}/credentials": {
|
|
1169
1189
|
parameters: {
|
|
1170
1190
|
query?: never;
|
|
@@ -4322,12 +4342,12 @@ export interface components {
|
|
|
4322
4342
|
*/
|
|
4323
4343
|
scopes?: string[] | null;
|
|
4324
4344
|
/**
|
|
4325
|
-
* @description How accounts authenticate with the provider. Defaults to `["oauth"]`. Use `["api_key"]` to declare an API key integration; `credentials` is then not required and keys are supplied per-tenant (optionally via `api_key` on this request).
|
|
4345
|
+
* @description How accounts authenticate with the provider. Defaults to `["oauth"]`. Use `["api_key"]` to declare an API key integration; `credentials` is then not required and keys are supplied per-tenant (optionally via `api_key` on this request). Use `["client_credentials"]` to declare a client-credentials integration; `credentials` is likewise not required and client credentials are supplied per-tenant.
|
|
4326
4346
|
* @example [
|
|
4327
4347
|
* "oauth"
|
|
4328
4348
|
* ]
|
|
4329
4349
|
*/
|
|
4330
|
-
auth_methods?: ("oauth" | "api_key")[];
|
|
4350
|
+
auth_methods?: ("oauth" | "api_key" | "client_credentials")[];
|
|
4331
4351
|
/**
|
|
4332
4352
|
* @description Provider-specific config values (e.g. a Snowflake `account_identifier`), keyed by the config field. Only fields the built-in provider declares are accepted.
|
|
4333
4353
|
* @example {
|
|
@@ -24000,6 +24020,137 @@ export interface operations {
|
|
|
24000
24020
|
};
|
|
24001
24021
|
};
|
|
24002
24022
|
};
|
|
24023
|
+
DataIntegrationsController_upsertClientCredentials: {
|
|
24024
|
+
parameters: {
|
|
24025
|
+
query?: never;
|
|
24026
|
+
header?: never;
|
|
24027
|
+
path: {
|
|
24028
|
+
/** @description The identifier of the integration. */
|
|
24029
|
+
slug: string;
|
|
24030
|
+
};
|
|
24031
|
+
cookie?: never;
|
|
24032
|
+
};
|
|
24033
|
+
requestBody: {
|
|
24034
|
+
content: {
|
|
24035
|
+
"application/json": {
|
|
24036
|
+
/**
|
|
24037
|
+
* @description A [User](/reference/authkit/user) identifier.
|
|
24038
|
+
* @example user_01EHZNVPK3SFK441A1RGBFSHRT
|
|
24039
|
+
*/
|
|
24040
|
+
user_id: string;
|
|
24041
|
+
/**
|
|
24042
|
+
* @description An [Organization](/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
|
|
24043
|
+
* @example org_01EHZNVPK3SFK441A1RGBFSHRT
|
|
24044
|
+
*/
|
|
24045
|
+
organization_id?: string;
|
|
24046
|
+
/**
|
|
24047
|
+
* @description The OAuth client ID to store for this integration.
|
|
24048
|
+
* @example 3MVG9...
|
|
24049
|
+
*/
|
|
24050
|
+
client_id: string;
|
|
24051
|
+
/**
|
|
24052
|
+
* @description The OAuth client secret to store for this integration.
|
|
24053
|
+
* @example shhh-secret
|
|
24054
|
+
*/
|
|
24055
|
+
client_secret: string;
|
|
24056
|
+
/**
|
|
24057
|
+
* @description Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
|
|
24058
|
+
* @example {
|
|
24059
|
+
* "mydomain": "acme"
|
|
24060
|
+
* }
|
|
24061
|
+
*/
|
|
24062
|
+
config?: {
|
|
24063
|
+
[key: string]: string;
|
|
24064
|
+
};
|
|
24065
|
+
};
|
|
24066
|
+
};
|
|
24067
|
+
};
|
|
24068
|
+
responses: {
|
|
24069
|
+
/** @description The resulting connected account after the upsert. */
|
|
24070
|
+
200: {
|
|
24071
|
+
headers: {
|
|
24072
|
+
[name: string]: unknown;
|
|
24073
|
+
};
|
|
24074
|
+
content: {
|
|
24075
|
+
/**
|
|
24076
|
+
* @example {
|
|
24077
|
+
* "object": "connected_account",
|
|
24078
|
+
* "id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
|
|
24079
|
+
* "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
|
|
24080
|
+
* "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
|
|
24081
|
+
* "scopes": [],
|
|
24082
|
+
* "auth_method": "client_credentials",
|
|
24083
|
+
* "state": "connected",
|
|
24084
|
+
* "created_at": "2024-01-16T14:20:00.000Z",
|
|
24085
|
+
* "updated_at": "2024-01-16T14:20:00.000Z"
|
|
24086
|
+
* }
|
|
24087
|
+
*/
|
|
24088
|
+
"application/json": components["schemas"]["ConnectedAccount"];
|
|
24089
|
+
};
|
|
24090
|
+
};
|
|
24091
|
+
/** @description Bad Request */
|
|
24092
|
+
400: {
|
|
24093
|
+
headers: {
|
|
24094
|
+
[name: string]: unknown;
|
|
24095
|
+
};
|
|
24096
|
+
content: {
|
|
24097
|
+
"application/json": {
|
|
24098
|
+
/**
|
|
24099
|
+
* @description A human-readable description of the error.
|
|
24100
|
+
* @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
|
|
24101
|
+
*/
|
|
24102
|
+
message: string;
|
|
24103
|
+
};
|
|
24104
|
+
};
|
|
24105
|
+
};
|
|
24106
|
+
/** @description Unauthorized */
|
|
24107
|
+
401: {
|
|
24108
|
+
headers: {
|
|
24109
|
+
[name: string]: unknown;
|
|
24110
|
+
};
|
|
24111
|
+
content?: never;
|
|
24112
|
+
};
|
|
24113
|
+
/** @description Forbidden */
|
|
24114
|
+
403: {
|
|
24115
|
+
headers: {
|
|
24116
|
+
[name: string]: unknown;
|
|
24117
|
+
};
|
|
24118
|
+
content: {
|
|
24119
|
+
"application/json": {
|
|
24120
|
+
/**
|
|
24121
|
+
* @description A human-readable description of the error.
|
|
24122
|
+
* @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
|
|
24123
|
+
*/
|
|
24124
|
+
message: string;
|
|
24125
|
+
};
|
|
24126
|
+
};
|
|
24127
|
+
};
|
|
24128
|
+
/** @description Data integration not found for the given provider slug. */
|
|
24129
|
+
404: {
|
|
24130
|
+
headers: {
|
|
24131
|
+
[name: string]: unknown;
|
|
24132
|
+
};
|
|
24133
|
+
content: {
|
|
24134
|
+
"application/json": {
|
|
24135
|
+
/**
|
|
24136
|
+
* @description A human-readable description of the error.
|
|
24137
|
+
* @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
|
|
24138
|
+
*/
|
|
24139
|
+
message: string;
|
|
24140
|
+
};
|
|
24141
|
+
};
|
|
24142
|
+
};
|
|
24143
|
+
/** @description The matched installation uses a different auth method than this endpoint expects. */
|
|
24144
|
+
422: {
|
|
24145
|
+
headers: {
|
|
24146
|
+
[name: string]: unknown;
|
|
24147
|
+
};
|
|
24148
|
+
content: {
|
|
24149
|
+
"application/json": components["schemas"]["AuthMethodMismatchError"];
|
|
24150
|
+
};
|
|
24151
|
+
};
|
|
24152
|
+
};
|
|
24153
|
+
};
|
|
24003
24154
|
DataIntegrationsController_vendCredentials: {
|
|
24004
24155
|
parameters: {
|
|
24005
24156
|
query?: never;
|