@workos/openapi-spec 0.42.0 → 0.44.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.
@@ -1,5 +1,293 @@
1
1
  openapi: 3.1.1
2
2
  paths:
3
+ /agents/claims/attempts:
4
+ patch:
5
+ description: >-
6
+ Link an external user to a claim attempt and retrieve the code needed
7
+ for the agent to complete the claim. The user is looked up by external
8
+ ID; if no user exists, one is created. When the user belongs to multiple
9
+ organizations, an explicit organization must be provided.
10
+ operationId: AgentAdminController_linkClaimAttemptToExternalUser
11
+ parameters: []
12
+ requestBody:
13
+ required: true
14
+ content:
15
+ application/json:
16
+ schema:
17
+ type: object
18
+ properties:
19
+ type:
20
+ type: string
21
+ description: >-
22
+ The operation to perform on the claim attempt. Currently
23
+ only `link_external_user` is supported.
24
+ example: link_external_user
25
+ const: link_external_user
26
+ claim_attempt_token:
27
+ type: string
28
+ minLength: 1
29
+ description: The token identifying the claim attempt.
30
+ example: cla_tkn_01EHWNCE74X7JSDV0X3SZ3KJNY
31
+ user:
32
+ type: object
33
+ properties:
34
+ email:
35
+ type: string
36
+ format: email
37
+ description: The email address of the user.
38
+ example: alice@example.com
39
+ external_id:
40
+ type: string
41
+ minLength: 1
42
+ description: The external ID of the user.
43
+ example: user_abc123
44
+ required:
45
+ - email
46
+ - external_id
47
+ description: >-
48
+ The user to attach to the claim attempt, identified by email
49
+ and external ID.
50
+ example:
51
+ email: alice@example.com
52
+ external_id: user_abc123
53
+ organization_id:
54
+ type: string
55
+ minLength: 1
56
+ description: >-
57
+ The organization to place the agent in. Required when the
58
+ user belongs to more than one organization.
59
+ example: org_01EHWNCE74X7JSDV0X3SZ3KJNY
60
+ required:
61
+ - type
62
+ - claim_attempt_token
63
+ - user
64
+ responses:
65
+ '200':
66
+ description: Claim attempt linked to external user.
67
+ content:
68
+ application/json:
69
+ schema:
70
+ $ref: '#/components/schemas/ClaimViewResponse'
71
+ '400':
72
+ description: >-
73
+ Invalid request, email mismatch, invalid claim, invalid
74
+ organization, or wrong account.
75
+ content:
76
+ application/json:
77
+ schema:
78
+ oneOf:
79
+ - type: object
80
+ properties:
81
+ code:
82
+ type: string
83
+ description: The error code identifying the type of error.
84
+ example: invalid_request
85
+ const: invalid_request
86
+ message:
87
+ type: string
88
+ description: A human-readable description of the error.
89
+ example: Request could not be processed.
90
+ required:
91
+ - code
92
+ - message
93
+ - type: object
94
+ properties:
95
+ code:
96
+ type: string
97
+ description: The error code identifying the type of error.
98
+ example: invalid_claim
99
+ const: invalid_claim
100
+ message:
101
+ type: string
102
+ description: A human-readable description of the error.
103
+ example: Request could not be processed.
104
+ required:
105
+ - code
106
+ - message
107
+ - type: object
108
+ properties:
109
+ code:
110
+ type: string
111
+ description: The error code identifying the type of error.
112
+ example: invalid_organization
113
+ const: invalid_organization
114
+ message:
115
+ type: string
116
+ description: A human-readable description of the error.
117
+ example: Request could not be processed.
118
+ required:
119
+ - code
120
+ - message
121
+ - type: object
122
+ properties:
123
+ code:
124
+ type: string
125
+ description: The error code identifying the type of error.
126
+ example: email_mismatch
127
+ const: email_mismatch
128
+ message:
129
+ type: string
130
+ description: A human-readable description of the error.
131
+ example: Request could not be processed.
132
+ required:
133
+ - code
134
+ - message
135
+ - type: object
136
+ properties:
137
+ code:
138
+ type: string
139
+ description: The error code identifying the type of error.
140
+ example: wrong_account
141
+ const: wrong_account
142
+ message:
143
+ type: string
144
+ description: A human-readable description of the error.
145
+ example: Request could not be processed.
146
+ required:
147
+ - code
148
+ - message
149
+ '403':
150
+ description: Claim denied or auth method disabled.
151
+ content:
152
+ application/json:
153
+ schema:
154
+ oneOf:
155
+ - type: object
156
+ properties:
157
+ code:
158
+ type: string
159
+ description: The error code identifying the type of error.
160
+ example: claim_denied
161
+ const: claim_denied
162
+ message:
163
+ type: string
164
+ description: A human-readable description of the error.
165
+ example: Request could not be processed.
166
+ required:
167
+ - code
168
+ - message
169
+ - type: object
170
+ properties:
171
+ code:
172
+ type: string
173
+ description: The error code identifying the type of error.
174
+ example: auth_method_disabled
175
+ const: auth_method_disabled
176
+ message:
177
+ type: string
178
+ description: A human-readable description of the error.
179
+ example: Request could not be processed.
180
+ required:
181
+ - code
182
+ - message
183
+ '409':
184
+ description: >-
185
+ Organization selection required, email already in use, or claim
186
+ already completed.
187
+ content:
188
+ application/json:
189
+ schema:
190
+ oneOf:
191
+ - type: object
192
+ properties:
193
+ code:
194
+ type: string
195
+ description: The error code identifying the type of error.
196
+ example: organization_selection_required
197
+ const: organization_selection_required
198
+ message:
199
+ type: string
200
+ description: A human-readable description of the error.
201
+ example: Request could not be processed.
202
+ organizations:
203
+ type: array
204
+ items:
205
+ type: object
206
+ properties:
207
+ id:
208
+ type: string
209
+ description: The organization ID.
210
+ example: org_01EHWNCE74X7JSDV0X3SZ3KJNY
211
+ name:
212
+ type: string
213
+ description: The organization name.
214
+ example: Acme Corp
215
+ required:
216
+ - id
217
+ - name
218
+ description: >-
219
+ Organizations the user belongs to. Pick one and retry
220
+ with organization_id.
221
+ required:
222
+ - code
223
+ - message
224
+ - organizations
225
+ - type: object
226
+ properties:
227
+ code:
228
+ type: string
229
+ description: The error code identifying the type of error.
230
+ example: email_already_in_use
231
+ const: email_already_in_use
232
+ message:
233
+ type: string
234
+ description: A human-readable description of the error.
235
+ example: Request could not be processed.
236
+ required:
237
+ - code
238
+ - message
239
+ - type: object
240
+ properties:
241
+ code:
242
+ type: string
243
+ description: The error code identifying the type of error.
244
+ example: already_claimed
245
+ const: already_claimed
246
+ message:
247
+ type: string
248
+ description: A human-readable description of the error.
249
+ example: Request could not be processed.
250
+ required:
251
+ - code
252
+ - message
253
+ '410':
254
+ description: Claim or user code has expired.
255
+ content:
256
+ application/json:
257
+ schema:
258
+ oneOf:
259
+ - type: object
260
+ properties:
261
+ code:
262
+ type: string
263
+ description: The error code identifying the type of error.
264
+ example: claim_expired
265
+ const: claim_expired
266
+ message:
267
+ type: string
268
+ description: A human-readable description of the error.
269
+ example: Request could not be processed.
270
+ required:
271
+ - code
272
+ - message
273
+ - type: object
274
+ properties:
275
+ code:
276
+ type: string
277
+ description: The error code identifying the type of error.
278
+ example: user_code_expired
279
+ const: user_code_expired
280
+ message:
281
+ type: string
282
+ description: A human-readable description of the error.
283
+ example: Request could not be processed.
284
+ required:
285
+ - code
286
+ - message
287
+ summary: Link a claim attempt to an external user
288
+ tags:
289
+ - agents
290
+ x-feature-flag: agent-auth-public-api
3
291
  /agents/credentials/validate:
4
292
  post:
5
293
  description: >-
@@ -22582,6 +22870,47 @@ components:
22582
22870
  - valid
22583
22871
  - registration_id
22584
22872
  - expires_at
22873
+ ClaimViewResponse:
22874
+ type: object
22875
+ properties:
22876
+ id:
22877
+ type: string
22878
+ description: The agent registration ID.
22879
+ example: agent_reg_01EHWNCE74X7JSDV0X3SZ3KJNY
22880
+ status:
22881
+ type: string
22882
+ enum:
22883
+ - unverified
22884
+ - verified
22885
+ - expired
22886
+ - revoked
22887
+ description: Current status of the agent registration.
22888
+ user_code:
22889
+ type: string
22890
+ description: The user code the agent needs to complete the claim.
22891
+ example: BCDF-GHJK
22892
+ organizations:
22893
+ type: array
22894
+ items:
22895
+ type: object
22896
+ properties:
22897
+ id:
22898
+ type: string
22899
+ description: The organization ID.
22900
+ example: org_01EHWNCE74X7JSDV0X3SZ3KJNY
22901
+ name:
22902
+ type: string
22903
+ description: The organization name.
22904
+ example: Acme Corp
22905
+ required:
22906
+ - id
22907
+ - name
22908
+ description: Organizations the user belongs to, offered as placement choices.
22909
+ required:
22910
+ - id
22911
+ - status
22912
+ - user_code
22913
+ - organizations
22585
22914
  ApiKey:
22586
22915
  type: object
22587
22916
  properties:
@@ -7,5 +7,6 @@ interface ServiceEndpoint {
7
7
  name?: string;
8
8
  }
9
9
  declare const serviceEndpoints: Record<string, ServiceEndpoint[]>;
10
+ declare const serviceAliases: Record<string, ServiceName>;
10
11
  //#endregion
11
- export { ServiceEndpoint, ServiceName, serviceEndpoints, services };
12
+ export { ServiceEndpoint, ServiceName, serviceAliases, serviceEndpoints, services };
package/dist/services.mjs CHANGED
@@ -30,15 +30,23 @@ const serviceEndpoints = {
30
30
  "path": "/portal/generate_link",
31
31
  "name": "generate_link"
32
32
  }],
33
- "Agents": [{
34
- "method": "POST",
35
- "path": "/agents/credentials/validate",
36
- "name": "create_validate"
37
- }, {
38
- "method": "GET",
39
- "path": "/agents/registrations/{id}",
40
- "name": "get_registration"
41
- }],
33
+ "Agents": [
34
+ {
35
+ "method": "PATCH",
36
+ "path": "/agents/claims/attempts",
37
+ "name": "update_attempts"
38
+ },
39
+ {
40
+ "method": "POST",
41
+ "path": "/agents/credentials/validate",
42
+ "name": "create_validate"
43
+ },
44
+ {
45
+ "method": "GET",
46
+ "path": "/agents/registrations/{id}",
47
+ "name": "get_registration"
48
+ }
49
+ ],
42
50
  "ApiKeys": [
43
51
  {
44
52
  "method": "DELETE",
@@ -1108,5 +1116,35 @@ const serviceEndpoints = {
1108
1116
  "name": "create_token"
1109
1117
  }]
1110
1118
  };
1119
+ const serviceAliases = {
1120
+ "ApplicationClientSecrets": "Connect",
1121
+ "Applications": "Connect",
1122
+ "Client": "ClientApi",
1123
+ "Connections": "SSO",
1124
+ "Directories": "DirectorySync",
1125
+ "DirectoryGroups": "DirectorySync",
1126
+ "DirectoryUsers": "DirectorySync",
1127
+ "FeatureFlagsTargets": "FeatureFlags",
1128
+ "MultiFactorAuthChallenges": "MultiFactorAuth",
1129
+ "OrganizationsApiKeys": "ApiKeys",
1130
+ "OrganizationsAuthorizedApplications": "Organizations",
1131
+ "OrganizationsFeatureFlags": "FeatureFlags",
1132
+ "Permissions": "Authorization",
1133
+ "UserManagementAuthentication": "UserManagement",
1134
+ "UserManagementCorsOrigins": "UserManagement",
1135
+ "UserManagementDataProviders": "Pipes",
1136
+ "UserManagementInvitations": "UserManagement",
1137
+ "UserManagementJWTTemplate": "UserManagement",
1138
+ "UserManagementMagicAuth": "UserManagement",
1139
+ "UserManagementMultiFactorAuthentication": "MultiFactorAuth",
1140
+ "UserManagementOrganizationMembership": "OrganizationMembership",
1141
+ "UserManagementOrganizationMembershipGroups": "OrganizationMembership",
1142
+ "UserManagementRedirectUris": "UserManagement",
1143
+ "UserManagementSessionTokens": "UserManagement",
1144
+ "UserManagementUsers": "UserManagement",
1145
+ "UserManagementUsersAuthorizedApplications": "UserManagement",
1146
+ "UserManagementUsersFeatureFlags": "FeatureFlags",
1147
+ "WorkosConnect": "Connect"
1148
+ };
1111
1149
  //#endregion
1112
- export { serviceEndpoints, services };
1150
+ export { serviceAliases, serviceEndpoints, services };
package/dist/types.d.ts CHANGED
@@ -4,6 +4,26 @@
4
4
  */
5
5
 
6
6
  export interface paths {
7
+ "/agents/claims/attempts": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ get?: never;
15
+ put?: never;
16
+ post?: never;
17
+ delete?: never;
18
+ options?: never;
19
+ head?: never;
20
+ /**
21
+ * Link a claim attempt to an external user
22
+ * @description Link an external user to a claim attempt and retrieve the code needed for the agent to complete the claim. The user is looked up by external ID; if no user exists, one is created. When the user belongs to multiple organizations, an explicit organization must be provided.
23
+ */
24
+ patch: operations["AgentAdminController_linkClaimAttemptToExternalUser"];
25
+ trace?: never;
26
+ };
7
27
  "/agents/credentials/validate": {
8
28
  parameters: {
9
29
  query?: never;
@@ -5411,6 +5431,36 @@ export interface components {
5411
5431
  */
5412
5432
  expires_at: string | null;
5413
5433
  };
5434
+ ClaimViewResponse: {
5435
+ /**
5436
+ * @description The agent registration ID.
5437
+ * @example agent_reg_01EHWNCE74X7JSDV0X3SZ3KJNY
5438
+ */
5439
+ id: string;
5440
+ /**
5441
+ * @description Current status of the agent registration.
5442
+ * @enum {string}
5443
+ */
5444
+ status: "unverified" | "verified" | "expired" | "revoked";
5445
+ /**
5446
+ * @description The user code the agent needs to complete the claim.
5447
+ * @example BCDF-GHJK
5448
+ */
5449
+ user_code: string;
5450
+ /** @description Organizations the user belongs to, offered as placement choices. */
5451
+ organizations: {
5452
+ /**
5453
+ * @description The organization ID.
5454
+ * @example org_01EHWNCE74X7JSDV0X3SZ3KJNY
5455
+ */
5456
+ id: string;
5457
+ /**
5458
+ * @description The organization name.
5459
+ * @example Acme Corp
5460
+ */
5461
+ name: string;
5462
+ }[];
5463
+ };
5414
5464
  ApiKey: {
5415
5465
  /**
5416
5466
  * @description Distinguishes the API Key object.
@@ -16910,6 +16960,260 @@ export interface components {
16910
16960
  }
16911
16961
  export type $defs = Record<string, never>;
16912
16962
  export interface operations {
16963
+ AgentAdminController_linkClaimAttemptToExternalUser: {
16964
+ parameters: {
16965
+ query?: never;
16966
+ header?: never;
16967
+ path?: never;
16968
+ cookie?: never;
16969
+ };
16970
+ requestBody: {
16971
+ content: {
16972
+ "application/json": {
16973
+ /**
16974
+ * @description The operation to perform on the claim attempt. Currently only `link_external_user` is supported.
16975
+ * @example link_external_user
16976
+ * @constant
16977
+ */
16978
+ type: "link_external_user";
16979
+ /**
16980
+ * @description The token identifying the claim attempt.
16981
+ * @example cla_tkn_01EHWNCE74X7JSDV0X3SZ3KJNY
16982
+ */
16983
+ claim_attempt_token: string;
16984
+ /**
16985
+ * @description The user to attach to the claim attempt, identified by email and external ID.
16986
+ * @example {
16987
+ * "email": "alice@example.com",
16988
+ * "external_id": "user_abc123"
16989
+ * }
16990
+ */
16991
+ user: {
16992
+ /**
16993
+ * Format: email
16994
+ * @description The email address of the user.
16995
+ * @example alice@example.com
16996
+ */
16997
+ email: string;
16998
+ /**
16999
+ * @description The external ID of the user.
17000
+ * @example user_abc123
17001
+ */
17002
+ external_id: string;
17003
+ };
17004
+ /**
17005
+ * @description The organization to place the agent in. Required when the user belongs to more than one organization.
17006
+ * @example org_01EHWNCE74X7JSDV0X3SZ3KJNY
17007
+ */
17008
+ organization_id?: string;
17009
+ };
17010
+ };
17011
+ };
17012
+ responses: {
17013
+ /** @description Claim attempt linked to external user. */
17014
+ 200: {
17015
+ headers: {
17016
+ [name: string]: unknown;
17017
+ };
17018
+ content: {
17019
+ "application/json": components["schemas"]["ClaimViewResponse"];
17020
+ };
17021
+ };
17022
+ /** @description Invalid request, email mismatch, invalid claim, invalid organization, or wrong account. */
17023
+ 400: {
17024
+ headers: {
17025
+ [name: string]: unknown;
17026
+ };
17027
+ content: {
17028
+ "application/json": {
17029
+ /**
17030
+ * @description The error code identifying the type of error.
17031
+ * @example invalid_request
17032
+ * @constant
17033
+ */
17034
+ code: "invalid_request";
17035
+ /**
17036
+ * @description A human-readable description of the error.
17037
+ * @example Request could not be processed.
17038
+ */
17039
+ message: string;
17040
+ } | {
17041
+ /**
17042
+ * @description The error code identifying the type of error.
17043
+ * @example invalid_claim
17044
+ * @constant
17045
+ */
17046
+ code: "invalid_claim";
17047
+ /**
17048
+ * @description A human-readable description of the error.
17049
+ * @example Request could not be processed.
17050
+ */
17051
+ message: string;
17052
+ } | {
17053
+ /**
17054
+ * @description The error code identifying the type of error.
17055
+ * @example invalid_organization
17056
+ * @constant
17057
+ */
17058
+ code: "invalid_organization";
17059
+ /**
17060
+ * @description A human-readable description of the error.
17061
+ * @example Request could not be processed.
17062
+ */
17063
+ message: string;
17064
+ } | {
17065
+ /**
17066
+ * @description The error code identifying the type of error.
17067
+ * @example email_mismatch
17068
+ * @constant
17069
+ */
17070
+ code: "email_mismatch";
17071
+ /**
17072
+ * @description A human-readable description of the error.
17073
+ * @example Request could not be processed.
17074
+ */
17075
+ message: string;
17076
+ } | {
17077
+ /**
17078
+ * @description The error code identifying the type of error.
17079
+ * @example wrong_account
17080
+ * @constant
17081
+ */
17082
+ code: "wrong_account";
17083
+ /**
17084
+ * @description A human-readable description of the error.
17085
+ * @example Request could not be processed.
17086
+ */
17087
+ message: string;
17088
+ };
17089
+ };
17090
+ };
17091
+ /** @description Claim denied or auth method disabled. */
17092
+ 403: {
17093
+ headers: {
17094
+ [name: string]: unknown;
17095
+ };
17096
+ content: {
17097
+ "application/json": {
17098
+ /**
17099
+ * @description The error code identifying the type of error.
17100
+ * @example claim_denied
17101
+ * @constant
17102
+ */
17103
+ code: "claim_denied";
17104
+ /**
17105
+ * @description A human-readable description of the error.
17106
+ * @example Request could not be processed.
17107
+ */
17108
+ message: string;
17109
+ } | {
17110
+ /**
17111
+ * @description The error code identifying the type of error.
17112
+ * @example auth_method_disabled
17113
+ * @constant
17114
+ */
17115
+ code: "auth_method_disabled";
17116
+ /**
17117
+ * @description A human-readable description of the error.
17118
+ * @example Request could not be processed.
17119
+ */
17120
+ message: string;
17121
+ };
17122
+ };
17123
+ };
17124
+ /** @description Organization selection required, email already in use, or claim already completed. */
17125
+ 409: {
17126
+ headers: {
17127
+ [name: string]: unknown;
17128
+ };
17129
+ content: {
17130
+ "application/json": {
17131
+ /**
17132
+ * @description The error code identifying the type of error.
17133
+ * @example organization_selection_required
17134
+ * @constant
17135
+ */
17136
+ code: "organization_selection_required";
17137
+ /**
17138
+ * @description A human-readable description of the error.
17139
+ * @example Request could not be processed.
17140
+ */
17141
+ message: string;
17142
+ /** @description Organizations the user belongs to. Pick one and retry with organization_id. */
17143
+ organizations: {
17144
+ /**
17145
+ * @description The organization ID.
17146
+ * @example org_01EHWNCE74X7JSDV0X3SZ3KJNY
17147
+ */
17148
+ id: string;
17149
+ /**
17150
+ * @description The organization name.
17151
+ * @example Acme Corp
17152
+ */
17153
+ name: string;
17154
+ }[];
17155
+ } | {
17156
+ /**
17157
+ * @description The error code identifying the type of error.
17158
+ * @example email_already_in_use
17159
+ * @constant
17160
+ */
17161
+ code: "email_already_in_use";
17162
+ /**
17163
+ * @description A human-readable description of the error.
17164
+ * @example Request could not be processed.
17165
+ */
17166
+ message: string;
17167
+ } | {
17168
+ /**
17169
+ * @description The error code identifying the type of error.
17170
+ * @example already_claimed
17171
+ * @constant
17172
+ */
17173
+ code: "already_claimed";
17174
+ /**
17175
+ * @description A human-readable description of the error.
17176
+ * @example Request could not be processed.
17177
+ */
17178
+ message: string;
17179
+ };
17180
+ };
17181
+ };
17182
+ /** @description Claim or user code has expired. */
17183
+ 410: {
17184
+ headers: {
17185
+ [name: string]: unknown;
17186
+ };
17187
+ content: {
17188
+ "application/json": {
17189
+ /**
17190
+ * @description The error code identifying the type of error.
17191
+ * @example claim_expired
17192
+ * @constant
17193
+ */
17194
+ code: "claim_expired";
17195
+ /**
17196
+ * @description A human-readable description of the error.
17197
+ * @example Request could not be processed.
17198
+ */
17199
+ message: string;
17200
+ } | {
17201
+ /**
17202
+ * @description The error code identifying the type of error.
17203
+ * @example user_code_expired
17204
+ * @constant
17205
+ */
17206
+ code: "user_code_expired";
17207
+ /**
17208
+ * @description A human-readable description of the error.
17209
+ * @example Request could not be processed.
17210
+ */
17211
+ message: string;
17212
+ };
17213
+ };
17214
+ };
17215
+ };
17216
+ };
16913
17217
  AgentAdminController_validateCredential: {
16914
17218
  parameters: {
16915
17219
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos/openapi-spec",
3
- "version": "0.42.0",
3
+ "version": "0.44.0",
4
4
  "type": "module",
5
5
  "description": "WorkOS OpenAPI specification, TypeScript types, and SDK resolution policy",
6
6
  "license": "MIT",