@workos/openapi-spec 0.37.0 → 0.39.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.
@@ -1218,6 +1218,20 @@ paths:
1218
1218
  required:
1219
1219
  - code
1220
1220
  - message
1221
+ - type: object
1222
+ properties:
1223
+ code:
1224
+ type: string
1225
+ description: The error code identifying the type of error.
1226
+ example: user_consent_options_not_supported
1227
+ const: user_consent_options_not_supported
1228
+ message:
1229
+ type: string
1230
+ description: A human-readable description of the error.
1231
+ example: Request could not be processed.
1232
+ required:
1233
+ - code
1234
+ - message
1221
1235
  - type: object
1222
1236
  properties:
1223
1237
  code:
@@ -1398,7 +1412,6 @@ paths:
1398
1412
  summary: List role assignments for a group
1399
1413
  tags:
1400
1414
  - authorization
1401
- x-feature-flag: user-groups-role-assignment-enabled
1402
1415
  post:
1403
1416
  description: Assign a role to a group on a specific resource.
1404
1417
  operationId: AuthorizationGroupRoleAssignmentsController_create
@@ -1484,7 +1497,6 @@ paths:
1484
1497
  summary: Assign a role to a group
1485
1498
  tags:
1486
1499
  - authorization
1487
- x-feature-flag: user-groups-role-assignment-enabled
1488
1500
  put:
1489
1501
  description: >-
1490
1502
  Replace all role assignments for a group with the provided list.
@@ -1553,7 +1565,6 @@ paths:
1553
1565
  summary: Replace all role assignments for a group
1554
1566
  tags:
1555
1567
  - authorization
1556
- x-feature-flag: user-groups-role-assignment-enabled
1557
1568
  delete:
1558
1569
  description: >-
1559
1570
  Remove role assignments from a group that match the provided criteria.
@@ -1618,7 +1629,6 @@ paths:
1618
1629
  summary: Remove group role assignments by criteria
1619
1630
  tags:
1620
1631
  - authorization
1621
- x-feature-flag: user-groups-role-assignment-enabled
1622
1632
  /authorization/groups/{group_id}/role_assignments/{role_assignment_id}:
1623
1633
  get:
1624
1634
  description: Get a specific role assignment for a group by its ID.
@@ -1674,7 +1684,6 @@ paths:
1674
1684
  summary: Get a group role assignment
1675
1685
  tags:
1676
1686
  - authorization
1677
- x-feature-flag: user-groups-role-assignment-enabled
1678
1687
  delete:
1679
1688
  description: Remove a specific role assignment from a group by its ID.
1680
1689
  operationId: AuthorizationGroupRoleAssignmentsController_removeGroupRoleAssignment
@@ -1725,7 +1734,6 @@ paths:
1725
1734
  summary: Remove a group role assignment
1726
1735
  tags:
1727
1736
  - authorization
1728
- x-feature-flag: user-groups-role-assignment-enabled
1729
1737
  /authorization/organization_memberships/{organization_membership_id}/check:
1730
1738
  post:
1731
1739
  description: >-
@@ -6974,10 +6982,12 @@ paths:
6974
6982
  post:
6975
6983
  description: >-
6976
6984
  Creates a data integration for a provider. Set `credentials.type` to
6977
- `custom` to use your own OAuth app credentials, or `organization` to
6978
- have each organization supply its own. For a built-in provider, pass its
6979
- slug as `provider`. For a custom provider, pass a new slug plus a
6980
- `custom_provider` definition.
6985
+ `custom` to use your own OAuth app credentials or `organization` to have
6986
+ each organization supply its own. Set `auth_methods` to `["api_key"]` to
6987
+ create an API key integration; you may optionally supply an `api_key`
6988
+ block to install a first tenant in the same call. For a built-in
6989
+ provider, pass its slug as `provider`. For a custom provider, pass a new
6990
+ slug plus a `custom_provider` definition.
6981
6991
  operationId: DataIntegrationsManagementController_createDataIntegration
6982
6992
  parameters: []
6983
6993
  requestBody:
@@ -7008,6 +7018,19 @@ paths:
7008
7018
  - message
7009
7019
  '401':
7010
7020
  description: Unauthorized
7021
+ '403':
7022
+ description: Forbidden
7023
+ content:
7024
+ application/json:
7025
+ schema:
7026
+ type: object
7027
+ properties:
7028
+ message:
7029
+ type: string
7030
+ description: A human-readable description of the error.
7031
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
7032
+ required:
7033
+ - message
7011
7034
  '404':
7012
7035
  description: Not Found
7013
7036
  content:
@@ -7021,6 +7044,19 @@ paths:
7021
7044
  example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
7022
7045
  required:
7023
7046
  - message
7047
+ '409':
7048
+ description: A data integration with this slug already exists in the environment.
7049
+ content:
7050
+ application/json:
7051
+ schema:
7052
+ type: object
7053
+ properties:
7054
+ message:
7055
+ type: string
7056
+ description: A human-readable description of the error.
7057
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
7058
+ required:
7059
+ - message
7024
7060
  '422':
7025
7061
  description: Unprocessable Entity
7026
7062
  content:
@@ -7041,7 +7077,8 @@ paths:
7041
7077
  get:
7042
7078
  description: >-
7043
7079
  Lists the environment's data integrations configured with `custom` or
7044
- `organization` credentials, including custom providers.
7080
+ `organization` credentials, including custom providers and API key
7081
+ integrations.
7045
7082
  operationId: DataIntegrationsManagementController_listDataIntegrations
7046
7083
  parameters:
7047
7084
  - name: before
@@ -7183,6 +7220,19 @@ paths:
7183
7220
  - message
7184
7221
  '401':
7185
7222
  description: Unauthorized
7223
+ '403':
7224
+ description: Forbidden
7225
+ content:
7226
+ application/json:
7227
+ schema:
7228
+ type: object
7229
+ properties:
7230
+ message:
7231
+ type: string
7232
+ description: A human-readable description of the error.
7233
+ example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.'
7234
+ required:
7235
+ - message
7186
7236
  '404':
7187
7237
  description: Not Found
7188
7238
  content:
@@ -19724,12 +19774,10 @@ components:
19724
19774
  type: string
19725
19775
  description: The external ID of the resource.
19726
19776
  example: proj-456
19727
- x-feature-flag: user-groups-role-assignment-enabled
19728
19777
  resource_type_slug:
19729
19778
  type: string
19730
19779
  description: The resource type slug.
19731
19780
  example: project
19732
- x-feature-flag: user-groups-role-assignment-enabled
19733
19781
  required:
19734
19782
  - role_slug
19735
19783
  ReplaceGroupRoleAssignmentEntryDto:
@@ -20510,6 +20558,27 @@ components:
20510
20558
  example: secret_…
20511
20559
  required:
20512
20560
  - type
20561
+ ApiKeyInstallationDto:
20562
+ type: object
20563
+ properties:
20564
+ secret:
20565
+ type: string
20566
+ minLength: 5
20567
+ description: The API key secret to store for the tenant.
20568
+ example: sk-1234567890abcdef
20569
+ user_id:
20570
+ type: string
20571
+ description: The User identifier the API key is installed for.
20572
+ example: user_01EHZNVPK3SFK441A1RGBFSHRT
20573
+ organization_id:
20574
+ type: string
20575
+ description: >-
20576
+ An Organization identifier to scope the installation to a specific
20577
+ organization.
20578
+ example: org_01EHZNVPK3SFK441A1RGBFSHRT
20579
+ required:
20580
+ - secret
20581
+ - user_id
20513
20582
  CustomProviderDefinitionDto:
20514
20583
  type: object
20515
20584
  properties:
@@ -20618,11 +20687,32 @@ components:
20618
20687
  - 'null'
20619
20688
  items:
20620
20689
  type: string
20690
+ auth_methods:
20691
+ type: array
20692
+ description: >-
20693
+ How accounts authenticate with the provider. Defaults to
20694
+ `["oauth"]`. Use `["api_key"]` to declare an API key integration;
20695
+ `credentials` is then not required and keys are supplied per-tenant
20696
+ (optionally via `api_key` on this request).
20697
+ items:
20698
+ type: string
20699
+ enum:
20700
+ - oauth
20701
+ - api_key
20702
+ example:
20703
+ - oauth
20621
20704
  credentials:
20622
20705
  description: >-
20623
- The credentials to configure for the Data Integration. Required for
20624
- both built-in and custom providers.
20706
+ The OAuth credentials to configure for the Data Integration.
20707
+ Required for OAuth integrations; omit when `auth_methods` is
20708
+ `["api_key"]`.
20625
20709
  $ref: '#/components/schemas/DataIntegrationCredentialsDto'
20710
+ api_key:
20711
+ description: >-
20712
+ An optional API key to install for the first tenant on an `api_key`
20713
+ integration. Omit to declare a keyless integration; tenants can be
20714
+ added later via the per-installation API key path.
20715
+ $ref: '#/components/schemas/ApiKeyInstallationDto'
20626
20716
  custom_provider:
20627
20717
  description: >-
20628
20718
  The OAuth definition for a custom provider. Supply this to define a
@@ -20722,9 +20812,15 @@ components:
20722
20812
  type: string
20723
20813
  credentials:
20724
20814
  description: >-
20725
- New credentials for the Data Integration. When provided, rotates the
20726
- stored client secret.
20815
+ New OAuth credentials for the Data Integration. When provided,
20816
+ rotates the stored client secret. Mutually exclusive with `api_key`.
20727
20817
  $ref: '#/components/schemas/DataIntegrationCredentialsDto'
20818
+ api_key:
20819
+ description: >-
20820
+ An API key to install or rotate for a tenant on an `api_key`
20821
+ integration. Upserts the tenant installation identified by `user_id`
20822
+ (and optional `organization_id`).
20823
+ $ref: '#/components/schemas/ApiKeyInstallationDto'
20728
20824
  custom_provider:
20729
20825
  description: >-
20730
20826
  Updates to a custom provider's OAuth definition. Only valid for
@@ -35017,6 +35113,18 @@ components:
35017
35113
  configuring the custom application.
35018
35114
  example: >-
35019
35115
  https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback
35116
+ auth_methods:
35117
+ type: array
35118
+ items:
35119
+ type: string
35120
+ enum:
35121
+ - oauth
35122
+ - api_key
35123
+ description: >-
35124
+ How accounts authenticate with the provider for this Data
35125
+ Integration.
35126
+ example:
35127
+ - oauth
35020
35128
  credentials:
35021
35129
  type: object
35022
35130
  properties:
@@ -35052,6 +35160,45 @@ components:
35052
35160
  - client_id
35053
35161
  - redacted_client_secret
35054
35162
  description: The credentials configured for the Data Integration.
35163
+ installation:
35164
+ description: >-
35165
+ The tenant installation created when an API key was supplied at
35166
+ creation time; `null` otherwise. Not populated on list/get
35167
+ responses.
35168
+ example: null
35169
+ oneOf:
35170
+ - type: object
35171
+ properties:
35172
+ id:
35173
+ type: string
35174
+ description: Unique identifier of the installation.
35175
+ example: data_installation_01EHZNVPK3SFK441A1RGBFSHRT
35176
+ user_id:
35177
+ type: string
35178
+ description: The User the API key was installed for.
35179
+ example: user_01EHZNVPK3SFK441A1RGBFSHRT
35180
+ organization_id:
35181
+ type:
35182
+ - string
35183
+ - 'null'
35184
+ description: >-
35185
+ The Organization the installation is scoped to, or null when
35186
+ unscoped.
35187
+ example: null
35188
+ api_key_last_4:
35189
+ type:
35190
+ - string
35191
+ - 'null'
35192
+ description: >-
35193
+ The last four characters of the stored API key. The full key
35194
+ is never returned.
35195
+ example: cdef
35196
+ required:
35197
+ - id
35198
+ - user_id
35199
+ - organization_id
35200
+ - api_key_last_4
35201
+ - type: 'null'
35055
35202
  custom_provider:
35056
35203
  description: >-
35057
35204
  The OAuth definition when this is a custom provider; `null` for
@@ -35156,7 +35303,9 @@ components:
35156
35303
  - state
35157
35304
  - scopes
35158
35305
  - redirect_uri
35306
+ - auth_methods
35159
35307
  - credentials
35308
+ - installation
35160
35309
  - custom_provider
35161
35310
  - created_at
35162
35311
  - updated_at
package/dist/types.d.ts CHANGED
@@ -1062,13 +1062,13 @@ export interface paths {
1062
1062
  };
1063
1063
  /**
1064
1064
  * List data integrations
1065
- * @description Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers.
1065
+ * @description Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations.
1066
1066
  */
1067
1067
  get: operations["DataIntegrationsManagementController_listDataIntegrations"];
1068
1068
  put?: never;
1069
1069
  /**
1070
1070
  * Create a data integration
1071
- * @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. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
1071
+ * @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.
1072
1072
  */
1073
1073
  post: operations["DataIntegrationsManagementController_createDataIntegration"];
1074
1074
  delete?: never;
@@ -4175,6 +4175,23 @@ export interface components {
4175
4175
  */
4176
4176
  client_secret?: string;
4177
4177
  };
4178
+ ApiKeyInstallationDto: {
4179
+ /**
4180
+ * @description The API key secret to store for the tenant.
4181
+ * @example sk-1234567890abcdef
4182
+ */
4183
+ secret: string;
4184
+ /**
4185
+ * @description The User identifier the API key is installed for.
4186
+ * @example user_01EHZNVPK3SFK441A1RGBFSHRT
4187
+ */
4188
+ user_id: string;
4189
+ /**
4190
+ * @description An Organization identifier to scope the installation to a specific organization.
4191
+ * @example org_01EHZNVPK3SFK441A1RGBFSHRT
4192
+ */
4193
+ organization_id?: string;
4194
+ };
4178
4195
  CustomProviderDefinitionDto: {
4179
4196
  /**
4180
4197
  * @description A descriptive name for the custom provider.
@@ -4264,8 +4281,17 @@ export interface components {
4264
4281
  * ]
4265
4282
  */
4266
4283
  scopes?: string[] | null;
4267
- /** @description The credentials to configure for the Data Integration. Required for both built-in and custom providers. */
4284
+ /**
4285
+ * @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).
4286
+ * @example [
4287
+ * "oauth"
4288
+ * ]
4289
+ */
4290
+ auth_methods?: ("oauth" | "api_key")[];
4291
+ /** @description The OAuth credentials to configure for the Data Integration. Required for OAuth integrations; omit when `auth_methods` is `["api_key"]`. */
4268
4292
  credentials?: components["schemas"]["DataIntegrationCredentialsDto"];
4293
+ /** @description An optional API key to install for the first tenant on an `api_key` integration. Omit to declare a keyless integration; tenants can be added later via the per-installation API key path. */
4294
+ api_key?: components["schemas"]["ApiKeyInstallationDto"];
4269
4295
  /** @description The OAuth definition for a custom provider. Supply this to define a custom provider; omit it to create an integration for a built-in provider. */
4270
4296
  custom_provider?: components["schemas"]["CustomProviderDefinitionDto"];
4271
4297
  };
@@ -4353,8 +4379,10 @@ export interface components {
4353
4379
  * ]
4354
4380
  */
4355
4381
  scopes?: string[] | null;
4356
- /** @description New credentials for the Data Integration. When provided, rotates the stored client secret. */
4382
+ /** @description New OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`. */
4357
4383
  credentials?: components["schemas"]["DataIntegrationCredentialsDto"];
4384
+ /** @description An API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`). */
4385
+ api_key?: components["schemas"]["ApiKeyInstallationDto"];
4358
4386
  /** @description Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations. */
4359
4387
  custom_provider?: components["schemas"]["UpdateCustomProviderDefinitionDto"];
4360
4388
  };
@@ -15150,6 +15178,13 @@ export interface components {
15150
15178
  * @example https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback
15151
15179
  */
15152
15180
  redirect_uri: string;
15181
+ /**
15182
+ * @description How accounts authenticate with the provider for this Data Integration.
15183
+ * @example [
15184
+ * "oauth"
15185
+ * ]
15186
+ */
15187
+ auth_methods: ("oauth" | "api_key")[];
15153
15188
  /** @description The credentials configured for the Data Integration. */
15154
15189
  credentials: {
15155
15190
  /**
@@ -15169,6 +15204,32 @@ export interface components {
15169
15204
  */
15170
15205
  redacted_client_secret: string | null;
15171
15206
  };
15207
+ /**
15208
+ * @description The tenant installation created when an API key was supplied at creation time; `null` otherwise. Not populated on list/get responses.
15209
+ * @example null
15210
+ */
15211
+ installation: {
15212
+ /**
15213
+ * @description Unique identifier of the installation.
15214
+ * @example data_installation_01EHZNVPK3SFK441A1RGBFSHRT
15215
+ */
15216
+ id: string;
15217
+ /**
15218
+ * @description The User the API key was installed for.
15219
+ * @example user_01EHZNVPK3SFK441A1RGBFSHRT
15220
+ */
15221
+ user_id: string;
15222
+ /**
15223
+ * @description The Organization the installation is scoped to, or null when unscoped.
15224
+ * @example null
15225
+ */
15226
+ organization_id: string | null;
15227
+ /**
15228
+ * @description The last four characters of the stored API key. The full key is never returned.
15229
+ * @example cdef
15230
+ */
15231
+ api_key_last_4: string | null;
15232
+ } | null;
15172
15233
  /** @description The OAuth definition when this is a custom provider; `null` for built-in providers. */
15173
15234
  custom_provider: {
15174
15235
  /**
@@ -17896,6 +17957,18 @@ export interface operations {
17896
17957
  * @example Request could not be processed.
17897
17958
  */
17898
17959
  message: string;
17960
+ } | {
17961
+ /**
17962
+ * @description The error code identifying the type of error.
17963
+ * @example user_consent_options_not_supported
17964
+ * @constant
17965
+ */
17966
+ code: "user_consent_options_not_supported";
17967
+ /**
17968
+ * @description A human-readable description of the error.
17969
+ * @example Request could not be processed.
17970
+ */
17971
+ message: string;
17899
17972
  } | {
17900
17973
  /**
17901
17974
  * @description The error code identifying the type of error.
@@ -23024,6 +23097,21 @@ export interface operations {
23024
23097
  };
23025
23098
  content?: never;
23026
23099
  };
23100
+ /** @description Forbidden */
23101
+ 403: {
23102
+ headers: {
23103
+ [name: string]: unknown;
23104
+ };
23105
+ content: {
23106
+ "application/json": {
23107
+ /**
23108
+ * @description A human-readable description of the error.
23109
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
23110
+ */
23111
+ message: string;
23112
+ };
23113
+ };
23114
+ };
23027
23115
  /** @description Not Found */
23028
23116
  404: {
23029
23117
  headers: {
@@ -23039,6 +23127,21 @@ export interface operations {
23039
23127
  };
23040
23128
  };
23041
23129
  };
23130
+ /** @description A data integration with this slug already exists in the environment. */
23131
+ 409: {
23132
+ headers: {
23133
+ [name: string]: unknown;
23134
+ };
23135
+ content: {
23136
+ "application/json": {
23137
+ /**
23138
+ * @description A human-readable description of the error.
23139
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
23140
+ */
23141
+ message: string;
23142
+ };
23143
+ };
23144
+ };
23042
23145
  /** @description Unprocessable Entity */
23043
23146
  422: {
23044
23147
  headers: {
@@ -23148,6 +23251,21 @@ export interface operations {
23148
23251
  };
23149
23252
  content?: never;
23150
23253
  };
23254
+ /** @description Forbidden */
23255
+ 403: {
23256
+ headers: {
23257
+ [name: string]: unknown;
23258
+ };
23259
+ content: {
23260
+ "application/json": {
23261
+ /**
23262
+ * @description A human-readable description of the error.
23263
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
23264
+ */
23265
+ message: string;
23266
+ };
23267
+ };
23268
+ };
23151
23269
  /** @description Not Found */
23152
23270
  404: {
23153
23271
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos/openapi-spec",
3
- "version": "0.37.0",
3
+ "version": "0.39.0",
4
4
  "type": "module",
5
5
  "description": "WorkOS OpenAPI specification, TypeScript types, and SDK resolution policy",
6
6
  "license": "MIT",