@keboola/api-client 12.0.0 → 13.0.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.
Files changed (132) hide show
  1. package/API-SURFACE.md +25 -1
  2. package/dist/ai/index.d.cts +2 -2
  3. package/dist/ai/index.d.ts +2 -2
  4. package/dist/ai/types.d.cts +2 -2
  5. package/dist/ai/types.d.ts +2 -2
  6. package/dist/auth/index.cjs +13 -0
  7. package/dist/auth/index.cjs.map +1 -0
  8. package/dist/auth/index.d.cts +142 -0
  9. package/dist/auth/index.d.ts +142 -0
  10. package/dist/auth/index.js +4 -0
  11. package/dist/auth/index.js.map +1 -0
  12. package/dist/auth/types.cjs +4 -0
  13. package/dist/auth/types.cjs.map +1 -0
  14. package/dist/auth/types.d.cts +2 -0
  15. package/dist/auth/types.d.ts +2 -0
  16. package/dist/auth/types.js +3 -0
  17. package/dist/auth/types.js.map +1 -0
  18. package/dist/chat/index.d.cts +7 -2
  19. package/dist/chat/index.d.ts +7 -2
  20. package/dist/chat/types.d.cts +2 -2
  21. package/dist/chat/types.d.ts +2 -2
  22. package/dist/chunk-I3VK6VQT.js +113 -0
  23. package/dist/chunk-I3VK6VQT.js.map +1 -0
  24. package/dist/chunk-IL5MYBXL.cjs +115 -0
  25. package/dist/chunk-IL5MYBXL.cjs.map +1 -0
  26. package/dist/{createOpenapiFetchClient-CKNLT4ND.d.cts → createOpenapiFetchClient-DIsEiRUz.d.cts} +1 -1
  27. package/dist/{createOpenapiFetchClient-B50N1zkV.d.ts → createOpenapiFetchClient-Oi-KX-f-.d.ts} +1 -1
  28. package/dist/dataScience/index.d.cts +3 -3
  29. package/dist/dataScience/index.d.ts +3 -3
  30. package/dist/dataScience/types.d.cts +2 -2
  31. package/dist/dataScience/types.d.ts +2 -2
  32. package/dist/domain/permissions/index.d.cts +3 -3
  33. package/dist/domain/permissions/index.d.ts +3 -3
  34. package/dist/editor/index.d.cts +2 -2
  35. package/dist/editor/index.d.ts +2 -2
  36. package/dist/editor/types.d.cts +2 -2
  37. package/dist/editor/types.d.ts +2 -2
  38. package/dist/encryption/index.d.cts +2 -2
  39. package/dist/encryption/index.d.ts +2 -2
  40. package/dist/encryption/types.d.cts +2 -2
  41. package/dist/encryption/types.d.ts +2 -2
  42. package/dist/index.cjs +20 -14
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.d.cts +200 -60
  45. package/dist/index.d.ts +200 -60
  46. package/dist/index.js +13 -7
  47. package/dist/index.js.map +1 -1
  48. package/dist/management/index.d.cts +2 -2
  49. package/dist/management/index.d.ts +2 -2
  50. package/dist/metastore/index.d.cts +3 -3
  51. package/dist/metastore/index.d.ts +3 -3
  52. package/dist/metastore/types.d.cts +2 -2
  53. package/dist/metastore/types.d.ts +2 -2
  54. package/dist/notifications/index.d.cts +2 -2
  55. package/dist/notifications/index.d.ts +2 -2
  56. package/dist/notifications/types.d.cts +2 -2
  57. package/dist/notifications/types.d.ts +2 -2
  58. package/dist/{project-BxSa1Ci9.d.ts → project-D9FCXphc.d.ts} +1 -1
  59. package/dist/{project-NJuUPx8-.d.cts → project-DWdvh1ev.d.cts} +1 -1
  60. package/dist/queryService/index.d.cts +2 -2
  61. package/dist/queryService/index.d.ts +2 -2
  62. package/dist/queryService/types.d.cts +2 -2
  63. package/dist/queryService/types.d.ts +2 -2
  64. package/dist/queue/index.d.cts +2 -2
  65. package/dist/queue/index.d.ts +2 -2
  66. package/dist/queue/types.d.cts +2 -2
  67. package/dist/queue/types.d.ts +2 -2
  68. package/dist/scheduler/index.d.cts +1 -1
  69. package/dist/scheduler/index.d.ts +1 -1
  70. package/dist/scheduler/types.d.cts +1 -1
  71. package/dist/scheduler/types.d.ts +1 -1
  72. package/dist/sdk/configurations/index.d.cts +5 -5
  73. package/dist/sdk/configurations/index.d.ts +5 -5
  74. package/dist/sdk/storage/index.d.cts +5 -5
  75. package/dist/sdk/storage/index.d.ts +5 -5
  76. package/dist/sdk/tag/index.d.cts +3 -3
  77. package/dist/sdk/tag/index.d.ts +3 -3
  78. package/dist/sdk/tag/types.d.cts +3 -3
  79. package/dist/sdk/tag/types.d.ts +3 -3
  80. package/dist/sdk/vault/index.d.cts +3 -3
  81. package/dist/sdk/vault/index.d.ts +3 -3
  82. package/dist/storage/index.d.cts +4 -4
  83. package/dist/storage/index.d.ts +4 -4
  84. package/dist/storage/types.d.cts +5 -5
  85. package/dist/storage/types.d.ts +5 -5
  86. package/dist/{storageClient-Bk4H2HIw.d.ts → storageClient-Bm2xAtWJ.d.ts} +26 -26
  87. package/dist/{storageClient-CB4U57Pr.d.cts → storageClient-CeLEkQNI.d.cts} +26 -26
  88. package/dist/{storageSdk-BDrsuMDA.d.ts → storageSdk-CBM85gUk.d.cts} +20 -20
  89. package/dist/{storageSdk-wn97Zloc.d.cts → storageSdk-Db1TowTM.d.ts} +20 -20
  90. package/dist/stream/index.d.cts +2 -2
  91. package/dist/stream/index.d.ts +2 -2
  92. package/dist/stream/types.d.cts +2 -2
  93. package/dist/stream/types.d.ts +2 -2
  94. package/dist/syncActions/index.d.cts +2 -2
  95. package/dist/syncActions/index.d.ts +2 -2
  96. package/dist/syncActions/types.d.cts +1 -1
  97. package/dist/syncActions/types.d.ts +1 -1
  98. package/dist/{types-yKV1EX6f.d.ts → types-5hVwJbZy.d.ts} +1 -1
  99. package/dist/{types-DTkxk0fW.d.cts → types-BMHNYi_B.d.cts} +1 -1
  100. package/dist/{types-CWebeQXy.d.cts → types-BavhR4tO.d.cts} +1 -1
  101. package/dist/{types-D9cNOf-3.d.cts → types-BiylbcWm.d.cts} +1 -1
  102. package/dist/types-BsA3W6Mo.d.cts +1786 -0
  103. package/dist/{types-DsqDUWJn.d.cts → types-BsIu3NSe.d.cts} +1 -1
  104. package/dist/types-CBYDpcI1.d.ts +1786 -0
  105. package/dist/{types-BVldT2vs.d.cts → types-CD0r-1MV.d.cts} +1 -1
  106. package/dist/{types-CvHPHNH0.d.cts → types-CaoEwPpD.d.cts} +1 -1
  107. package/dist/{types-BxjcUj-y.d.cts → types-Coaofyh9.d.cts} +1 -1
  108. package/dist/{types-GmAeMsok.d.ts → types-Ct6wJf9k.d.ts} +1 -1
  109. package/dist/{types-CS8MYc2k.d.ts → types-CyQJ4AXd.d.ts} +1 -1
  110. package/dist/{types-DFWnAftN.d.cts → types-DHA8WCNr.d.ts} +1 -1
  111. package/dist/{types-D64zThBJ.d.ts → types-DLUrR6Xu.d.ts} +1 -1
  112. package/dist/{types-CFd7q2ed.d.ts → types-DLWBh7iV.d.ts} +1 -1
  113. package/dist/{types-CMEwVQ78.d.cts → types-DclddzzB.d.cts} +1 -1
  114. package/dist/{types-Bc-H4gfv.d.cts → types-QLM97gSa.d.cts} +7 -1
  115. package/dist/{types-JvKRS8Qd.d.ts → types-R6KVJSvx.d.ts} +7 -1
  116. package/dist/{types-D3Kkh6yW.d.ts → types-_uKmxlZr.d.ts} +1 -1
  117. package/dist/{types-jKnx7Tm_.d.cts → types-auVqO7UT.d.cts} +1 -1
  118. package/dist/{types-jKnx7Tm_.d.ts → types-auVqO7UT.d.ts} +1 -1
  119. package/dist/{types-Dv3vN7M9.d.ts → types-kPz1WIPX.d.cts} +1 -1
  120. package/dist/{types-Mghz1gMD.d.ts → types-njJEULW3.d.ts} +1 -1
  121. package/dist/{types-DacFMc6L.d.ts → types-rgoWljL8.d.ts} +1 -1
  122. package/dist/{utils-Cl4emy8g.d.ts → utils-BcMjZotB.d.ts} +1 -1
  123. package/dist/{utils-JsCYFmHj.d.cts → utils-IEMDjlU4.d.cts} +1 -1
  124. package/dist/vault/index.d.cts +1 -1
  125. package/dist/vault/index.d.ts +1 -1
  126. package/dist/vault/types.d.cts +1 -1
  127. package/dist/vault/types.d.ts +1 -1
  128. package/dist/verify/index.d.cts +2 -2
  129. package/dist/verify/index.d.ts +2 -2
  130. package/package.json +30 -4
  131. package/surface/auth.md +27 -0
  132. package/surface/chat.md +1 -1
@@ -0,0 +1,1786 @@
1
+ import { b as OpenapiBodyType, c as OpenapiPathType, a as OpenapiReturnType } from './types-auVqO7UT.js';
2
+
3
+ /**
4
+ * This file was auto-generated by openapi-typescript.
5
+ * Do not make direct changes to the file.
6
+ */
7
+
8
+ type paths = {
9
+ '/v1/auth/login': {
10
+ parameters: {
11
+ query?: never;
12
+ header?: never;
13
+ path?: never;
14
+ cookie?: never;
15
+ };
16
+ get?: never;
17
+ put?: never;
18
+ /**
19
+ * Authenticate user
20
+ * @description Grant-type dispatcher for user authentication. Supports the password grant (email + password) and the google/microsoft OAuth grants (OIDC ID token issued by the provider).
21
+ */
22
+ post: operations['post_/v1/auth/login'];
23
+ delete?: never;
24
+ options?: never;
25
+ head?: never;
26
+ patch?: never;
27
+ trace?: never;
28
+ };
29
+ '/v1/auth/device/approve': {
30
+ parameters: {
31
+ query?: never;
32
+ header?: never;
33
+ path?: never;
34
+ cookie?: never;
35
+ };
36
+ get?: never;
37
+ put?: never;
38
+ /**
39
+ * Approve or deny a device authorization
40
+ * @description Approves or denies a pending CLI device authorization from a browser session or programmatic session bearer.
41
+ */
42
+ post: operations['post_auth_device_authorization_approve'];
43
+ delete?: never;
44
+ options?: never;
45
+ head?: never;
46
+ patch?: never;
47
+ trace?: never;
48
+ };
49
+ '/v1/auth/device': {
50
+ parameters: {
51
+ query?: never;
52
+ header?: never;
53
+ path?: never;
54
+ cookie?: never;
55
+ };
56
+ get?: never;
57
+ put?: never;
58
+ /**
59
+ * Create a device authorization
60
+ * @description Starts the CLI device authorization flow and returns polling and browser verification details.
61
+ */
62
+ post: operations['post_auth_device_authorization_create'];
63
+ delete?: never;
64
+ options?: never;
65
+ head?: never;
66
+ patch?: never;
67
+ trace?: never;
68
+ };
69
+ '/v1/auth/device/token': {
70
+ parameters: {
71
+ query?: never;
72
+ header?: never;
73
+ path?: never;
74
+ cookie?: never;
75
+ };
76
+ get?: never;
77
+ put?: never;
78
+ /**
79
+ * Poll a device authorization
80
+ * @description Polls the CLI device authorization and returns a programmatic session after browser approval.
81
+ */
82
+ post: operations['post_auth_device_authorization_token'];
83
+ delete?: never;
84
+ options?: never;
85
+ head?: never;
86
+ patch?: never;
87
+ trace?: never;
88
+ };
89
+ '/v1/auth/mfa': {
90
+ parameters: {
91
+ query?: never;
92
+ header?: never;
93
+ path?: never;
94
+ cookie?: never;
95
+ };
96
+ get?: never;
97
+ put?: never;
98
+ /**
99
+ * Verify MFA challenge
100
+ * @description Verifies an MFA challenge code and issues session tokens on success.
101
+ */
102
+ post: operations['post_/v1/auth/mfa'];
103
+ delete?: never;
104
+ options?: never;
105
+ head?: never;
106
+ patch?: never;
107
+ trace?: never;
108
+ };
109
+ '/v1/auth/pat': {
110
+ parameters: {
111
+ query?: never;
112
+ header?: never;
113
+ path?: never;
114
+ cookie?: never;
115
+ };
116
+ /**
117
+ * List Personal Access Tokens
118
+ * @description Returns the active (non-revoked, non-expired) PATs visible to the caller. With a session bearer the response covers every PAT the admin owns; with a PAT bearer the response is restricted to the calling PAT and its descendants.
119
+ */
120
+ get: operations['get_auth_pat_list'];
121
+ put?: never;
122
+ /**
123
+ * Create a Personal Access Token
124
+ * @description Issues a user-created PAT. Requires an active sudo window. The bearer token is returned once in the response and never again.
125
+ */
126
+ post: operations['post_auth_pat_create'];
127
+ delete?: never;
128
+ options?: never;
129
+ head?: never;
130
+ patch?: never;
131
+ trace?: never;
132
+ };
133
+ '/v1/auth/pat/exchange': {
134
+ parameters: {
135
+ query?: never;
136
+ header?: never;
137
+ path?: never;
138
+ cookie?: never;
139
+ };
140
+ get?: never;
141
+ put?: never;
142
+ /**
143
+ * Exchange a parent token for a narrower PAT
144
+ * @description RFC-8693-inspired bearer token exchange (Keboola-internal wire format, not RFC-compliant). The parent bearer (session or PAT) is supplied in the Authorization header. The body carries only the requested attenuation (narrower scope, shorter TTL). The server enforces intersection semantics — the child can never broaden the parent.
145
+ */
146
+ post: operations['post_auth_pat_exchange'];
147
+ delete?: never;
148
+ options?: never;
149
+ head?: never;
150
+ patch?: never;
151
+ trace?: never;
152
+ };
153
+ '/v1/auth/pat/{id}': {
154
+ parameters: {
155
+ query?: never;
156
+ header?: never;
157
+ path?: never;
158
+ cookie?: never;
159
+ };
160
+ get?: never;
161
+ put?: never;
162
+ post?: never;
163
+ /**
164
+ * Revoke a Personal Access Token
165
+ * @description Revokes a PAT and cascades the revocation to every PAT-derived descendant. With a session bearer the caller may revoke any PAT they own (or any PAT on the stack if a super admin); with a PAT bearer the caller may only revoke the calling PAT itself or a descendant in its subtree. Idempotent.
166
+ */
167
+ delete: operations['delete_auth_pat_revoke'];
168
+ options?: never;
169
+ head?: never;
170
+ patch?: never;
171
+ trace?: never;
172
+ };
173
+ '/v1/auth/pkce/token': {
174
+ parameters: {
175
+ query?: never;
176
+ header?: never;
177
+ path?: never;
178
+ cookie?: never;
179
+ };
180
+ get?: never;
181
+ put?: never;
182
+ /**
183
+ * Exchange a PKCE authorization code for a CLI session
184
+ * @description Exchanges a same-machine browser authorization code using a PKCE S256 verifier.
185
+ */
186
+ post: operations['post_auth_pkce_token'];
187
+ delete?: never;
188
+ options?: never;
189
+ head?: never;
190
+ patch?: never;
191
+ trace?: never;
192
+ };
193
+ '/v1/auth/mfa/recovery-codes': {
194
+ parameters: {
195
+ query?: never;
196
+ header?: never;
197
+ path?: never;
198
+ cookie?: never;
199
+ };
200
+ get?: never;
201
+ put?: never;
202
+ /**
203
+ * Regenerate MFA recovery codes
204
+ * @description Generates a new set of MFA recovery codes for the authenticated admin. All existing codes are invalidated. Codes are returned in plaintext exactly once.
205
+ */
206
+ post: operations['post_auth_mfa_recovery_codes_regenerate'];
207
+ delete?: never;
208
+ options?: never;
209
+ head?: never;
210
+ patch?: never;
211
+ trace?: never;
212
+ };
213
+ '/v1/auth/saml/assert': {
214
+ parameters: {
215
+ query?: never;
216
+ header?: never;
217
+ path?: never;
218
+ cookie?: never;
219
+ };
220
+ get?: never;
221
+ put?: never;
222
+ /**
223
+ * Authenticate with a SAML assertion
224
+ * @description Validates the SAML assertion correlated by the request handle and issues a session (or an MFA challenge for MFA-enabled admins).
225
+ */
226
+ post: operations['post_/v1/auth/saml/assert'];
227
+ delete?: never;
228
+ options?: never;
229
+ head?: never;
230
+ patch?: never;
231
+ trace?: never;
232
+ };
233
+ '/v1/auth/saml/initiate': {
234
+ parameters: {
235
+ query?: never;
236
+ header?: never;
237
+ path?: never;
238
+ cookie?: never;
239
+ };
240
+ get?: never;
241
+ put?: never;
242
+ /**
243
+ * Start a programmatic SAML login
244
+ * @description Builds an SP-initiated SAML AuthnRequest and returns the IdP SSO URL plus a one-time request handle to submit with the assertion at POST /v1/auth/saml/assert.
245
+ */
246
+ post: operations['post_/v1/auth/saml/initiate'];
247
+ delete?: never;
248
+ options?: never;
249
+ head?: never;
250
+ patch?: never;
251
+ trace?: never;
252
+ };
253
+ '/v1/auth/sessions': {
254
+ parameters: {
255
+ query?: never;
256
+ header?: never;
257
+ path?: never;
258
+ cookie?: never;
259
+ };
260
+ /**
261
+ * List active sessions
262
+ * @description Lists all active programmatic sessions for the authenticated admin.
263
+ */
264
+ get: operations['get_auth_sessions_list'];
265
+ put?: never;
266
+ post?: never;
267
+ /**
268
+ * Revoke all sessions
269
+ * @description Revokes all active programmatic sessions for the authenticated admin. Requires an active sudo window.
270
+ */
271
+ delete: operations['delete_auth_sessions_revoke_all'];
272
+ options?: never;
273
+ head?: never;
274
+ patch?: never;
275
+ trace?: never;
276
+ };
277
+ '/v1/auth/sessions/{sessionId}': {
278
+ parameters: {
279
+ query?: never;
280
+ header?: never;
281
+ path?: never;
282
+ cookie?: never;
283
+ };
284
+ get?: never;
285
+ put?: never;
286
+ post?: never;
287
+ /**
288
+ * Revoke a session
289
+ * @description Revokes a specific programmatic session by its ID. Sudo is required only when revoking another admin's session as a super admin.
290
+ */
291
+ delete: operations['delete_auth_sessions_revoke_one'];
292
+ options?: never;
293
+ head?: never;
294
+ patch?: never;
295
+ trace?: never;
296
+ };
297
+ '/v1/auth/sudo': {
298
+ parameters: {
299
+ query?: never;
300
+ header?: never;
301
+ path?: never;
302
+ cookie?: never;
303
+ };
304
+ get?: never;
305
+ put?: never;
306
+ /**
307
+ * Step-up authentication (sudo)
308
+ * @description Verifies a TOTP or recovery code and activates a sudo window on the current session. Required for sensitive operations annotated with #[RequiresSudo].
309
+ */
310
+ post: operations['post_/v1/auth/sudo'];
311
+ delete?: never;
312
+ options?: never;
313
+ head?: never;
314
+ patch?: never;
315
+ trace?: never;
316
+ };
317
+ '/v1/auth/sudo/challenge': {
318
+ parameters: {
319
+ query?: never;
320
+ header?: never;
321
+ path?: never;
322
+ cookie?: never;
323
+ };
324
+ get?: never;
325
+ put?: never;
326
+ /**
327
+ * Create a WebAuthn step-up (sudo) challenge
328
+ * @description Generates WebAuthn assertion options and a challenge token for the current session, to be completed via POST /v1/auth/sudo.
329
+ */
330
+ post: operations['post_/v1/auth/sudo/challenge'];
331
+ delete?: never;
332
+ options?: never;
333
+ head?: never;
334
+ patch?: never;
335
+ trace?: never;
336
+ };
337
+ '/v1/auth/token/introspect': {
338
+ parameters: {
339
+ query?: never;
340
+ header?: never;
341
+ path?: never;
342
+ cookie?: never;
343
+ };
344
+ /**
345
+ * Introspect access token
346
+ * @description Returns metadata about the currently authenticated session including admin details and sudo-verification status.
347
+ */
348
+ get: operations['get_/v1/auth/token/introspect'];
349
+ put?: never;
350
+ post?: never;
351
+ delete?: never;
352
+ options?: never;
353
+ head?: never;
354
+ patch?: never;
355
+ trace?: never;
356
+ };
357
+ '/v1/auth/token/refresh': {
358
+ parameters: {
359
+ query?: never;
360
+ header?: never;
361
+ path?: never;
362
+ cookie?: never;
363
+ };
364
+ get?: never;
365
+ put?: never;
366
+ /**
367
+ * Refresh access token
368
+ * @description Exchanges a refresh token for a new access and refresh token pair. Implements two-phase rotation with replay detection.
369
+ */
370
+ post: operations['post_/v1/auth/token/refresh'];
371
+ delete?: never;
372
+ options?: never;
373
+ head?: never;
374
+ patch?: never;
375
+ trace?: never;
376
+ };
377
+ '/v1/auth/token/revoke': {
378
+ parameters: {
379
+ query?: never;
380
+ header?: never;
381
+ path?: never;
382
+ cookie?: never;
383
+ };
384
+ get?: never;
385
+ put?: never;
386
+ /**
387
+ * Revoke token
388
+ * @description Token revocation endpoint with silent-success semantics (silent success on unknown/invalid tokens, hint-as-hint fallback across token types) using the project-wide JSON + camelCase convention. For any well-formed request the response is 200 regardless of whether the token was found or valid, to prevent information leakage about token state. Malformed JSON or a missing required `token` field still produces 400 from the request-mapping layer — this is a wire-format failure, not a token-state signal.
389
+ */
390
+ post: operations['post_/v1/auth/token/revoke'];
391
+ delete?: never;
392
+ options?: never;
393
+ head?: never;
394
+ patch?: never;
395
+ trace?: never;
396
+ };
397
+ };
398
+ type components = {
399
+ schemas: {
400
+ LoginRequest: {
401
+ /**
402
+ * @description Authentication grant type.
403
+ * @enum {string}
404
+ */
405
+ grantType: 'password' | 'google' | 'microsoft';
406
+ /**
407
+ * Format: email
408
+ * @description Email address. Required for password grant.
409
+ */
410
+ email?: string | null;
411
+ /** @description Password. Required for password grant. */
412
+ password?: string | null;
413
+ /** @description OIDC ID token issued by the identity provider. Required for google/microsoft grants. */
414
+ idToken?: string | null;
415
+ };
416
+ DeviceAuthorizationCreateRequest: {
417
+ /** @description Public CLI client identifier. */
418
+ clientId: string;
419
+ scope: {
420
+ /** @enum {string} */
421
+ credentialType?: 'session';
422
+ };
423
+ };
424
+ DeviceAuthorizationTokenRequest: {
425
+ /** @description Public CLI client identifier. */
426
+ clientId: string;
427
+ /** @description High-entropy device code returned by create. */
428
+ deviceCode: string;
429
+ };
430
+ MfaRequest: {
431
+ /** @description MFA challenge token from login response. */
432
+ mfaToken: string;
433
+ /**
434
+ * @description Type of MFA verification being submitted.
435
+ * @enum {string}
436
+ */
437
+ type: 'totp' | 'recovery_code' | 'webauthn';
438
+ /** @description Verification code: 6-digit TOTP for type=totp, recovery code string for type=recovery_code. Required when type is totp or recovery_code. */
439
+ code: string;
440
+ /** @description WebAuthn assertion response as JSON string. Required when type is webauthn. */
441
+ assertion: string;
442
+ };
443
+ ScopeRequestPayload: {
444
+ /**
445
+ * @description Explicit allow-list of project ids. Omit the field (do not send `null`) to inherit the parent scope verbatim (exchange) or default to all projects (user-create).
446
+ * @default null
447
+ */
448
+ projects: string[] | null;
449
+ /**
450
+ * @description Whether the resulting token is read-only. Omit the field (do not send `null`) to default to false (user-create) or inherit (exchange). On exchange `readOnly` may only narrow the parent, never relax it.
451
+ * @default null
452
+ */
453
+ readOnly: boolean | null;
454
+ };
455
+ PatCreateRequest: {
456
+ /** @description User-facing label. */
457
+ name: string;
458
+ /** @description Requested lifetime in seconds. Capped at the org policy maximum. Omit (do not send `null`) to default to the cap. */
459
+ expiresIn: number;
460
+ scope: components['schemas']['ScopeRequestPayload'];
461
+ };
462
+ PatExchangeRequest: {
463
+ /** @description Requested lifetime in seconds. Capped at the parent-type maximum. Omit (do not send `null`) to use the parent-type TTL cap as the lifetime. */
464
+ expiresIn: number;
465
+ scope: components['schemas']['ScopeRequestPayload'];
466
+ };
467
+ PkceAuthorizationTokenRequest: {
468
+ clientId: string;
469
+ code: string;
470
+ /** Format: uri */
471
+ redirectUri: string;
472
+ state: string;
473
+ codeVerifier: string;
474
+ };
475
+ SamlAssertRequest: {
476
+ /** @description Base64-encoded SAML response from the IdP. */
477
+ samlResponse: string;
478
+ /** @description One-time handle returned by /v1/auth/saml/initiate. */
479
+ requestHandle: string;
480
+ /** @description Advisory customer slug; the handle is the authoritative config selector. */
481
+ customerSlug?: string | null;
482
+ };
483
+ SamlInitiateRequest: {
484
+ /** @description Customer slug of the multi-tenant SAML configuration. Omit for the stack-wide ENV configuration. */
485
+ customerSlug?: string | null;
486
+ };
487
+ SudoRequest: {
488
+ /** @description TOTP verification code. */
489
+ totpCode?: string | null;
490
+ /** @description Recovery code. */
491
+ recoveryCode?: string | null;
492
+ /** @description WebAuthn assertion response as JSON string. Requires challengeToken. */
493
+ webauthnAssertion?: string | null;
494
+ /** @description Sudo challenge token (kbc_mfa_*) from POST /v1/auth/sudo/challenge. Required when webauthnAssertion is provided. */
495
+ challengeToken?: string | null;
496
+ };
497
+ TokenRefreshRequest: {
498
+ /** @description Refresh token to exchange for new token pair. */
499
+ refreshToken: string;
500
+ };
501
+ TokenRevokeRequest: {
502
+ /** @description Token to revoke (access or refresh token). */
503
+ token: string;
504
+ /**
505
+ * @description Hint about the type of token being revoked.
506
+ * @enum {string|null}
507
+ */
508
+ tokenTypeHint?: 'accessToken' | 'refreshToken' | null;
509
+ };
510
+ LoginRequest2: {
511
+ /**
512
+ * @description Authentication grant type.
513
+ * @enum {string}
514
+ */
515
+ grantType: 'password' | 'google' | 'microsoft';
516
+ /**
517
+ * Format: email
518
+ * @description Email address. Required for password grant.
519
+ * @default null
520
+ */
521
+ email: string | null;
522
+ /**
523
+ * @description Password. Required for password grant.
524
+ * @default null
525
+ */
526
+ password: string | null;
527
+ /**
528
+ * @description OIDC ID token issued by the identity provider. Required for google/microsoft grants.
529
+ * @default null
530
+ */
531
+ idToken: string | null;
532
+ };
533
+ UserLoggedInResponse: {
534
+ id: number;
535
+ email: string;
536
+ name: string;
537
+ };
538
+ LoginResponse: {
539
+ /** @description Opaque bearer access token for API authentication (format: kbc_at_{sessionId}_{secret}). */
540
+ accessToken: string;
541
+ /** @description Refresh token for obtaining new access tokens. */
542
+ refreshToken: string;
543
+ /** @description Token type. Always "Bearer". */
544
+ tokenType: string;
545
+ /** @description Access token lifetime in seconds. */
546
+ expiresIn: number;
547
+ /** @description Unique session identifier. */
548
+ sessionId: string;
549
+ user: components['schemas']['UserLoggedInResponse'];
550
+ };
551
+ MfaChallengeResponse: {
552
+ /** @description Always true when MFA challenge is issued. */
553
+ mfaRequired: boolean;
554
+ /** @description Primary MFA method type. */
555
+ mfaType: string;
556
+ /** @description MFA challenge token to submit with verification code. */
557
+ mfaToken: string;
558
+ /** @description MFA challenge lifetime in seconds. */
559
+ expiresIn: number;
560
+ /** @description List of allowed MFA verification methods. */
561
+ allowedMethods: string[];
562
+ /**
563
+ * @description WebAuthn credential request options. Present only when mfaType is webauthn.
564
+ * @default null
565
+ */
566
+ webauthn: Record<string, never> | null;
567
+ };
568
+ DeviceAuthorizationApprovalRequest: {
569
+ /** @description User code to approve or deny. Required in bearer mode; browser mode uses the code stored in the session. */
570
+ userCode: string;
571
+ /** @enum {string} */
572
+ decision: 'approve' | 'deny';
573
+ };
574
+ /** @enum {string} */
575
+ DeviceApprovalDecision: 'approve' | 'deny';
576
+ DeviceAuthorizationApprovalResult: {
577
+ /** @enum {string} */
578
+ status: 'approved' | 'denied';
579
+ idempotent: boolean;
580
+ decision: components['schemas']['DeviceApprovalDecision'];
581
+ };
582
+ DeviceAuthorizationCreateRequest2: {
583
+ /** @description Public CLI client identifier. */
584
+ clientId: string;
585
+ scope: {
586
+ /** @enum {string} */
587
+ credentialType?: 'session';
588
+ };
589
+ requestedCredentialType: string;
590
+ };
591
+ DeviceAuthorizationCreateResponse: {
592
+ deviceCode: string;
593
+ userCode: string;
594
+ verificationUri: string;
595
+ verificationUriComplete: string;
596
+ expiresIn: number;
597
+ interval: number;
598
+ };
599
+ CliAuthErrorResponse: {
600
+ error: string;
601
+ exceptionId: string;
602
+ code: string;
603
+ uuid: string;
604
+ params: {
605
+ /** @description Device-flow error token such as authorization_pending, slow_down, or expired_token. */
606
+ error: string;
607
+ interval?: number | null;
608
+ };
609
+ exceptionDetailUrl: string;
610
+ };
611
+ CliTokenResponse: {
612
+ /** @description Opaque bearer access token for API authentication. */
613
+ accessToken: string;
614
+ /** @description Refresh token for obtaining new access tokens. */
615
+ refreshToken: string;
616
+ /** @description Token type. Always "Bearer". */
617
+ tokenType: string;
618
+ /** @description Access token lifetime in seconds. */
619
+ expiresIn: number;
620
+ /** @description Unique session identifier. */
621
+ sessionId: string;
622
+ user: components['schemas']['UserLoggedInResponse'];
623
+ };
624
+ MfaRequest2: {
625
+ /** @description MFA challenge token from login response. */
626
+ mfaToken: string;
627
+ /**
628
+ * @description Type of MFA verification being submitted.
629
+ * @enum {string}
630
+ */
631
+ type: 'totp' | 'recovery_code' | 'webauthn';
632
+ /**
633
+ * @description Verification code: 6-digit TOTP for type=totp, recovery code string for type=recovery_code. Required when type is totp or recovery_code.
634
+ * @default null
635
+ */
636
+ code: string | null;
637
+ /**
638
+ * @description WebAuthn assertion response as JSON string. Required when type is webauthn.
639
+ * @default null
640
+ */
641
+ assertion: string | null;
642
+ };
643
+ ProjectAccessItem: {
644
+ /** @description Project id. */
645
+ id: number;
646
+ /** @description Project name, or null when the project no longer exists (frozen PAT scope only). */
647
+ name: string | null;
648
+ /** @description The admin's role in the project, or null when the admin is no longer a member (frozen PAT scope only). */
649
+ role: string | null;
650
+ };
651
+ PatItemResponse: {
652
+ /** Format: uuid */
653
+ id: string;
654
+ name: string;
655
+ /** @description Either {"all": true} or {"projects": ["..."]} */
656
+ scope: Record<string, never>;
657
+ /** @description Projects the token has rights to. Resolved live for an "all" scope; for a frozen subset scope the issued allow-list is echoed verbatim (a purged project yields name=null, a lost membership yields role=null). */
658
+ projects: components['schemas']['ProjectAccessItem'][];
659
+ readOnly: boolean;
660
+ parentTokenId?: string | null;
661
+ /** @enum {string|null} */
662
+ parentTokenType?: 'session' | 'pat' | null;
663
+ /** Format: date-time */
664
+ expiresAt: string;
665
+ /** Format: date-time */
666
+ lastUsedAt?: string | null;
667
+ /** Format: date-time */
668
+ createdAt: string;
669
+ };
670
+ PatListResponse: {
671
+ items: components['schemas']['PatItemResponse'][];
672
+ };
673
+ PatCreateRequest2: {
674
+ /** @description User-facing label. */
675
+ name: string;
676
+ /**
677
+ * @description Requested lifetime in seconds. Capped at the org policy maximum. Omit (do not send `null`) to default to the cap.
678
+ * @default null
679
+ */
680
+ expiresIn: number | null;
681
+ /**
682
+ * @description Scope of the issued PAT. Omit (do not send `null`) to default to `{"all": true}`, readOnly=false. Set `readOnly=true` to issue a read-only token (read-only on storage routes; writes are denied).
683
+ * @default null
684
+ */
685
+ scope: components['schemas']['ScopeRequestPayload'] | null;
686
+ };
687
+ PatCreateResponse: {
688
+ /** @description Once-shown bearer token (kbc_pat_*). */
689
+ accessToken: string;
690
+ /** @example Bearer */
691
+ tokenType: string;
692
+ /** @description Seconds until the token expires. */
693
+ expiresIn: number;
694
+ pat: components['schemas']['PatItemResponse'];
695
+ };
696
+ PatExchangeRequest2: {
697
+ /**
698
+ * @description Requested lifetime in seconds. Capped at the parent-type maximum. Omit (do not send `null`) to use the parent-type TTL cap as the lifetime.
699
+ * @default null
700
+ */
701
+ expiresIn: number | null;
702
+ /**
703
+ * @description Requested attenuation of the parent scope. Omit (do not send `null`) to inherit the parent scope verbatim. `readOnly=true` narrows the child to read-only; it cannot be relaxed back to false below a read-only parent.
704
+ * @default null
705
+ */
706
+ scope: components['schemas']['ScopeRequestPayload'] | null;
707
+ };
708
+ PatExchangeResponse: {
709
+ accessToken: string;
710
+ /** @example Bearer */
711
+ tokenType: string;
712
+ expiresIn: number;
713
+ scope: Record<string, never>;
714
+ readOnly: boolean;
715
+ parentTokenId: string;
716
+ /** @enum {string} */
717
+ parentTokenType: 'session' | 'pat';
718
+ /** Format: date-time */
719
+ expiresAt: string;
720
+ pat: components['schemas']['PatItemResponse'];
721
+ };
722
+ /** @description Plaintext recovery codes returned exactly once on regeneration. */
723
+ RecoveryCodesRegenerateResponse: {
724
+ /** @description The newly generated MFA recovery codes. Each code is single-use; existing codes are invalidated. */
725
+ codes: string[];
726
+ };
727
+ SamlAssertRequest2: {
728
+ /** @description Base64-encoded SAML response from the IdP. */
729
+ samlResponse: string;
730
+ /** @description One-time handle returned by /v1/auth/saml/initiate. */
731
+ requestHandle: string;
732
+ /**
733
+ * @description Advisory customer slug; the handle is the authoritative config selector.
734
+ * @default null
735
+ */
736
+ customerSlug: string | null;
737
+ };
738
+ SamlInitiateRequest2: {
739
+ /**
740
+ * @description Customer slug of the multi-tenant SAML configuration. Omit for the stack-wide ENV configuration.
741
+ * @default null
742
+ */
743
+ customerSlug: string | null;
744
+ };
745
+ SamlInitiateResponse: {
746
+ /** @description IdP single-sign-on URL to redirect the user to (AuthnRequest embedded). */
747
+ ssoUrl: string;
748
+ /** @description One-time handle to submit with the SAML response at /v1/auth/saml/assert. */
749
+ requestHandle: string;
750
+ /** @description Seconds until the request handle expires. */
751
+ expiresIn: number;
752
+ };
753
+ SessionItemResponse: {
754
+ /** @description Session identifier. */
755
+ id: string;
756
+ /** @description Grant type used to create the session. */
757
+ grantType: string;
758
+ /**
759
+ * Format: date-time
760
+ * @description Session creation timestamp.
761
+ */
762
+ createdAt: string;
763
+ /**
764
+ * Format: date-time
765
+ * @description Last time the session was used.
766
+ */
767
+ lastUsedAt?: string | null;
768
+ /** @description IP address of last usage. */
769
+ lastUsedIp?: string | null;
770
+ /** @description User agent of the client. */
771
+ userAgent?: string | null;
772
+ /**
773
+ * Format: date-time
774
+ * @description Access token expiration timestamp.
775
+ */
776
+ accessTokenExpiresAt: string;
777
+ /**
778
+ * Format: date-time
779
+ * @description Refresh token expiration timestamp.
780
+ */
781
+ refreshTokenExpiresAt: string;
782
+ /** @description Whether this is the currently authenticated session. */
783
+ isCurrent: boolean;
784
+ };
785
+ SudoRequest2: {
786
+ /**
787
+ * @description TOTP verification code.
788
+ * @default null
789
+ */
790
+ totpCode: string | null;
791
+ /**
792
+ * @description Recovery code.
793
+ * @default null
794
+ */
795
+ recoveryCode: string | null;
796
+ /**
797
+ * @description WebAuthn assertion response as JSON string. Requires challengeToken.
798
+ * @default null
799
+ */
800
+ webauthnAssertion: string | null;
801
+ /**
802
+ * @description Sudo challenge token (kbc_mfa_*) from POST /v1/auth/sudo/challenge. Required when webauthnAssertion is provided.
803
+ * @default null
804
+ */
805
+ challengeToken: string | null;
806
+ type: string;
807
+ };
808
+ SudoResponse: {
809
+ /** @description Whether step-up authentication was successful. */
810
+ sudoVerified: boolean;
811
+ /**
812
+ * Format: date-time
813
+ * @description When the sudo window expires (RFC 3339 / ISO 8601).
814
+ */
815
+ sudoExpiresAt: string;
816
+ /** @description Sudo window duration in seconds. */
817
+ sudoTimeoutSeconds: number;
818
+ };
819
+ SudoChallengeResponse: {
820
+ /** @description Challenge token (kbc_mfa_*) to submit alongside the WebAuthn assertion. */
821
+ challengeToken: string;
822
+ /** @description Serialized WebAuthn PublicKeyCredentialRequestOptions. */
823
+ options: Record<string, never>;
824
+ /** @description Challenge lifetime in seconds. */
825
+ expiresIn: number;
826
+ };
827
+ TokenIntrospectResponse: {
828
+ /** @description Session identifier. */
829
+ sessionId: string;
830
+ user: components['schemas']['UserLoggedInResponse'];
831
+ /** @description Grant type used to create the session. */
832
+ grantType: string;
833
+ /** @description Whether step-up (sudo) verification has been completed for this session. Derived from the session's sudoVerifiedAt timestamp. */
834
+ sudoVerified: boolean;
835
+ /**
836
+ * Format: date-time
837
+ * @description Session creation timestamp.
838
+ */
839
+ createdAt: string;
840
+ /**
841
+ * Format: date-time
842
+ * @description Access token expiration timestamp.
843
+ */
844
+ expiresAt: string;
845
+ /**
846
+ * Format: date-time
847
+ * @description Last time the session was used.
848
+ */
849
+ lastUsedAt?: string | null;
850
+ /** @description IP address of last usage. */
851
+ lastUsedIp?: string | null;
852
+ /** @description User agent of the client. */
853
+ userAgent?: string | null;
854
+ /** @description Projects the session has rights to (live access set). */
855
+ projects: components['schemas']['ProjectAccessItem'][];
856
+ };
857
+ TokenRevokeRequest2: {
858
+ /** @description Token to revoke (access or refresh token). */
859
+ token: string;
860
+ /**
861
+ * @description Hint about the type of token being revoked.
862
+ * @default null
863
+ * @enum {string|null}
864
+ */
865
+ tokenTypeHint: 'accessToken' | 'refreshToken' | null;
866
+ };
867
+ };
868
+ responses: never;
869
+ parameters: never;
870
+ requestBodies: never;
871
+ headers: never;
872
+ pathItems: never;
873
+ };
874
+ type operations = {
875
+ 'post_/v1/auth/login': {
876
+ parameters: {
877
+ query?: never;
878
+ header?: never;
879
+ path?: never;
880
+ cookie?: never;
881
+ };
882
+ requestBody: {
883
+ content: {
884
+ 'application/json': components['schemas']['LoginRequest2'];
885
+ };
886
+ };
887
+ responses: {
888
+ /** @description Authentication successful. Returns access and refresh tokens, or MFA challenge if MFA is enabled. */
889
+ 200: {
890
+ headers: {
891
+ [name: string]: unknown;
892
+ };
893
+ content: {
894
+ 'application/json':
895
+ | components['schemas']['LoginResponse']
896
+ | components['schemas']['MfaChallengeResponse'];
897
+ };
898
+ };
899
+ /** @description Invalid request parameters or unsupported grant type. */
900
+ 400: {
901
+ headers: {
902
+ [name: string]: unknown;
903
+ };
904
+ content?: never;
905
+ };
906
+ /** @description Invalid credentials or invalid/expired ID token. */
907
+ 401: {
908
+ headers: {
909
+ [name: string]: unknown;
910
+ };
911
+ content?: never;
912
+ };
913
+ /** @description Login rejected: no matching active account, identity provider tenant mismatch, SSO-enforced account, or super-admin MFA required. */
914
+ 403: {
915
+ headers: {
916
+ [name: string]: unknown;
917
+ };
918
+ content?: never;
919
+ };
920
+ };
921
+ };
922
+ post_auth_device_authorization_approve: {
923
+ parameters: {
924
+ query?: never;
925
+ header?: never;
926
+ path?: never;
927
+ cookie?: never;
928
+ };
929
+ requestBody: {
930
+ content: {
931
+ 'application/json': components['schemas']['DeviceAuthorizationApprovalRequest'];
932
+ };
933
+ };
934
+ responses: {
935
+ /** @description Device authorization resolved. */
936
+ 200: {
937
+ headers: {
938
+ [name: string]: unknown;
939
+ };
940
+ content: {
941
+ 'application/json': components['schemas']['DeviceAuthorizationApprovalResult'];
942
+ };
943
+ };
944
+ /** @description Request body, decision, browser session code, or device authorization state is invalid. */
945
+ 400: {
946
+ headers: {
947
+ [name: string]: unknown;
948
+ };
949
+ content?: never;
950
+ };
951
+ /** @description Browser session or session bearer is missing or invalid. */
952
+ 401: {
953
+ headers: {
954
+ [name: string]: unknown;
955
+ };
956
+ content?: never;
957
+ };
958
+ /** @description PAT bearer, CSRF token, or approval authentication context is invalid. */
959
+ 403: {
960
+ headers: {
961
+ [name: string]: unknown;
962
+ };
963
+ content?: never;
964
+ };
965
+ /** @description Device authorization feature disabled. */
966
+ 404: {
967
+ headers: {
968
+ [name: string]: unknown;
969
+ };
970
+ content?: never;
971
+ };
972
+ /** @description Device authorization was already resolved with a conflicting decision. */
973
+ 409: {
974
+ headers: {
975
+ [name: string]: unknown;
976
+ };
977
+ content?: never;
978
+ };
979
+ };
980
+ };
981
+ post_auth_device_authorization_create: {
982
+ parameters: {
983
+ query?: never;
984
+ header?: never;
985
+ path?: never;
986
+ cookie?: never;
987
+ };
988
+ requestBody: {
989
+ content: {
990
+ 'application/json': components['schemas']['DeviceAuthorizationCreateRequest2'];
991
+ };
992
+ };
993
+ responses: {
994
+ /** @description Device authorization created. */
995
+ 200: {
996
+ headers: {
997
+ [name: string]: unknown;
998
+ };
999
+ content: {
1000
+ 'application/json': components['schemas']['DeviceAuthorizationCreateResponse'];
1001
+ };
1002
+ };
1003
+ /** @description Device authorization request is invalid or client credentials are incorrect. */
1004
+ 400: {
1005
+ headers: {
1006
+ [name: string]: unknown;
1007
+ };
1008
+ content: {
1009
+ 'application/json': components['schemas']['CliAuthErrorResponse'];
1010
+ };
1011
+ };
1012
+ /** @description Device authorization feature disabled. */
1013
+ 404: {
1014
+ headers: {
1015
+ [name: string]: unknown;
1016
+ };
1017
+ content?: never;
1018
+ };
1019
+ /** @description Device authorization rate limit exceeded. */
1020
+ 429: {
1021
+ headers: {
1022
+ [name: string]: unknown;
1023
+ };
1024
+ content: {
1025
+ 'application/json': components['schemas']['CliAuthErrorResponse'];
1026
+ };
1027
+ };
1028
+ };
1029
+ };
1030
+ post_auth_device_authorization_token: {
1031
+ parameters: {
1032
+ query?: never;
1033
+ header?: never;
1034
+ path?: never;
1035
+ cookie?: never;
1036
+ };
1037
+ requestBody: {
1038
+ content: {
1039
+ 'application/json': components['schemas']['DeviceAuthorizationTokenRequest'];
1040
+ };
1041
+ };
1042
+ responses: {
1043
+ /** @description Device authorization consumed. */
1044
+ 200: {
1045
+ headers: {
1046
+ [name: string]: unknown;
1047
+ };
1048
+ content: {
1049
+ 'application/json': components['schemas']['CliTokenResponse'];
1050
+ };
1051
+ };
1052
+ /** @description Device authorization is pending, slowed down, denied, expired, invalid, or client-mismatched. */
1053
+ 400: {
1054
+ headers: {
1055
+ [name: string]: unknown;
1056
+ };
1057
+ content: {
1058
+ 'application/json': components['schemas']['CliAuthErrorResponse'];
1059
+ };
1060
+ };
1061
+ /** @description Device authorization feature disabled. */
1062
+ 404: {
1063
+ headers: {
1064
+ [name: string]: unknown;
1065
+ };
1066
+ content?: never;
1067
+ };
1068
+ };
1069
+ };
1070
+ 'post_/v1/auth/mfa': {
1071
+ parameters: {
1072
+ query?: never;
1073
+ header?: never;
1074
+ path?: never;
1075
+ cookie?: never;
1076
+ };
1077
+ requestBody: {
1078
+ content: {
1079
+ 'application/json': components['schemas']['MfaRequest2'];
1080
+ };
1081
+ };
1082
+ responses: {
1083
+ /** @description MFA verification successful. Returns access and refresh tokens. */
1084
+ 200: {
1085
+ headers: {
1086
+ [name: string]: unknown;
1087
+ };
1088
+ content: {
1089
+ 'application/json': components['schemas']['LoginResponse'];
1090
+ };
1091
+ };
1092
+ /** @description MFA verification failed: invalid or expired MFA token, invalid TOTP / recovery code, exhausted challenge, or the challenge was already consumed by a concurrent request. */
1093
+ 401: {
1094
+ headers: {
1095
+ [name: string]: unknown;
1096
+ };
1097
+ content?: never;
1098
+ };
1099
+ /** @description Rate limit exceeded for MFA verification attempts. */
1100
+ 429: {
1101
+ headers: {
1102
+ [name: string]: unknown;
1103
+ };
1104
+ content?: never;
1105
+ };
1106
+ };
1107
+ };
1108
+ get_auth_pat_list: {
1109
+ parameters: {
1110
+ query?: never;
1111
+ header?: never;
1112
+ path?: never;
1113
+ cookie?: never;
1114
+ };
1115
+ requestBody?: never;
1116
+ responses: {
1117
+ /** @description List of PATs visible to the caller. */
1118
+ 200: {
1119
+ headers: {
1120
+ [name: string]: unknown;
1121
+ };
1122
+ content: {
1123
+ 'application/json': components['schemas']['PatListResponse'];
1124
+ };
1125
+ };
1126
+ /** @description Invalid or missing bearer token. */
1127
+ 401: {
1128
+ headers: {
1129
+ [name: string]: unknown;
1130
+ };
1131
+ content?: never;
1132
+ };
1133
+ /** @description Programmatic auth feature disabled on this stack. */
1134
+ 404: {
1135
+ headers: {
1136
+ [name: string]: unknown;
1137
+ };
1138
+ content?: never;
1139
+ };
1140
+ };
1141
+ };
1142
+ post_auth_pat_create: {
1143
+ parameters: {
1144
+ query?: never;
1145
+ header?: never;
1146
+ path?: never;
1147
+ cookie?: never;
1148
+ };
1149
+ requestBody: {
1150
+ content: {
1151
+ 'application/json': components['schemas']['PatCreateRequest2'];
1152
+ };
1153
+ };
1154
+ responses: {
1155
+ /** @description PAT created. Bearer token is shown in `accessToken` and not retrievable later. */
1156
+ 201: {
1157
+ headers: {
1158
+ [name: string]: unknown;
1159
+ };
1160
+ content: {
1161
+ 'application/json': components['schemas']['PatCreateResponse'];
1162
+ };
1163
+ };
1164
+ /** @description Invalid or missing bearer token. */
1165
+ 401: {
1166
+ headers: {
1167
+ [name: string]: unknown;
1168
+ };
1169
+ content?: never;
1170
+ };
1171
+ /** @description Sudo window not active. */
1172
+ 403: {
1173
+ headers: {
1174
+ [name: string]: unknown;
1175
+ };
1176
+ content?: never;
1177
+ };
1178
+ /** @description Programmatic auth feature disabled on this stack. */
1179
+ 404: {
1180
+ headers: {
1181
+ [name: string]: unknown;
1182
+ };
1183
+ content?: never;
1184
+ };
1185
+ /** @description Invalid request payload. */
1186
+ 422: {
1187
+ headers: {
1188
+ [name: string]: unknown;
1189
+ };
1190
+ content?: never;
1191
+ };
1192
+ /** @description PAT issuance rate limit exceeded. */
1193
+ 429: {
1194
+ headers: {
1195
+ [name: string]: unknown;
1196
+ };
1197
+ content?: never;
1198
+ };
1199
+ };
1200
+ };
1201
+ post_auth_pat_exchange: {
1202
+ parameters: {
1203
+ query?: never;
1204
+ header?: never;
1205
+ path?: never;
1206
+ cookie?: never;
1207
+ };
1208
+ requestBody?: {
1209
+ content: {
1210
+ 'application/json': components['schemas']['PatExchangeRequest2'];
1211
+ };
1212
+ };
1213
+ responses: {
1214
+ /** @description Child PAT issued. */
1215
+ 201: {
1216
+ headers: {
1217
+ [name: string]: unknown;
1218
+ };
1219
+ content: {
1220
+ 'application/json': components['schemas']['PatExchangeResponse'];
1221
+ };
1222
+ };
1223
+ /** @description Requested scope exceeds the parent, expiration is invalid, or the parent chain is at the maximum allowed depth. */
1224
+ 400: {
1225
+ headers: {
1226
+ [name: string]: unknown;
1227
+ };
1228
+ content?: never;
1229
+ };
1230
+ /** @description Missing, malformed, or revoked parent token. */
1231
+ 401: {
1232
+ headers: {
1233
+ [name: string]: unknown;
1234
+ };
1235
+ content?: never;
1236
+ };
1237
+ /** @description Programmatic auth feature disabled on this stack. */
1238
+ 404: {
1239
+ headers: {
1240
+ [name: string]: unknown;
1241
+ };
1242
+ content?: never;
1243
+ };
1244
+ /** @description PAT issuance rate limit exceeded. */
1245
+ 429: {
1246
+ headers: {
1247
+ [name: string]: unknown;
1248
+ };
1249
+ content?: never;
1250
+ };
1251
+ };
1252
+ };
1253
+ delete_auth_pat_revoke: {
1254
+ parameters: {
1255
+ query?: never;
1256
+ header?: never;
1257
+ path: {
1258
+ /** @description PAT identifier (UUID). */
1259
+ id: string;
1260
+ };
1261
+ cookie?: never;
1262
+ };
1263
+ requestBody?: never;
1264
+ responses: {
1265
+ /** @description PAT revoked (or already revoked). */
1266
+ 204: {
1267
+ headers: {
1268
+ [name: string]: unknown;
1269
+ };
1270
+ content?: never;
1271
+ };
1272
+ /** @description Invalid or missing bearer token. */
1273
+ 401: {
1274
+ headers: {
1275
+ [name: string]: unknown;
1276
+ };
1277
+ content?: never;
1278
+ };
1279
+ /** @description Sudo step-up required for cross-admin revocation by a super admin. */
1280
+ 403: {
1281
+ headers: {
1282
+ [name: string]: unknown;
1283
+ };
1284
+ content?: never;
1285
+ };
1286
+ /** @description PAT not found, not authorised for the caller, or programmatic auth disabled. */
1287
+ 404: {
1288
+ headers: {
1289
+ [name: string]: unknown;
1290
+ };
1291
+ content?: never;
1292
+ };
1293
+ };
1294
+ };
1295
+ post_auth_pkce_token: {
1296
+ parameters: {
1297
+ query?: never;
1298
+ header?: never;
1299
+ path?: never;
1300
+ cookie?: never;
1301
+ };
1302
+ requestBody: {
1303
+ content: {
1304
+ 'application/json': components['schemas']['PkceAuthorizationTokenRequest'];
1305
+ };
1306
+ };
1307
+ responses: {
1308
+ /** @description CLI session issued. */
1309
+ 200: {
1310
+ headers: {
1311
+ [name: string]: unknown;
1312
+ };
1313
+ content: {
1314
+ 'application/json': components['schemas']['CliTokenResponse'];
1315
+ };
1316
+ };
1317
+ /** @description PKCE authorization is denied, expired, invalid, or client-mismatched. */
1318
+ 400: {
1319
+ headers: {
1320
+ [name: string]: unknown;
1321
+ };
1322
+ content: {
1323
+ 'application/json': components['schemas']['CliAuthErrorResponse'];
1324
+ };
1325
+ };
1326
+ /** @description PKCE authorization feature disabled. */
1327
+ 404: {
1328
+ headers: {
1329
+ [name: string]: unknown;
1330
+ };
1331
+ content?: never;
1332
+ };
1333
+ };
1334
+ };
1335
+ post_auth_mfa_recovery_codes_regenerate: {
1336
+ parameters: {
1337
+ query?: never;
1338
+ header?: never;
1339
+ path?: never;
1340
+ cookie?: never;
1341
+ };
1342
+ requestBody?: never;
1343
+ responses: {
1344
+ /** @description Recovery codes regenerated. Plaintext values are returned only in this response. */
1345
+ 200: {
1346
+ headers: {
1347
+ [name: string]: unknown;
1348
+ };
1349
+ content: {
1350
+ 'application/json': components['schemas']['RecoveryCodesRegenerateResponse'];
1351
+ };
1352
+ };
1353
+ /** @description Invalid or missing bearer token. */
1354
+ 401: {
1355
+ headers: {
1356
+ [name: string]: unknown;
1357
+ };
1358
+ content?: never;
1359
+ };
1360
+ /** @description Either the sudo window is not active (call POST /v1/auth/sudo first), or the admin has no MFA configured. */
1361
+ 403: {
1362
+ headers: {
1363
+ /** @description RFC 9470 step-up challenge (only returned when the sudo window is not active). */
1364
+ 'WWW-Authenticate'?: string;
1365
+ [name: string]: unknown;
1366
+ };
1367
+ content?: never;
1368
+ };
1369
+ /** @description Programmatic auth feature disabled on this stack. */
1370
+ 404: {
1371
+ headers: {
1372
+ [name: string]: unknown;
1373
+ };
1374
+ content?: never;
1375
+ };
1376
+ };
1377
+ };
1378
+ 'post_/v1/auth/saml/assert': {
1379
+ parameters: {
1380
+ query?: never;
1381
+ header?: never;
1382
+ path?: never;
1383
+ cookie?: never;
1384
+ };
1385
+ requestBody: {
1386
+ content: {
1387
+ 'application/json': components['schemas']['SamlAssertRequest2'];
1388
+ };
1389
+ };
1390
+ responses: {
1391
+ /** @description Authentication successful. Returns access and refresh tokens, or an MFA challenge. */
1392
+ 200: {
1393
+ headers: {
1394
+ [name: string]: unknown;
1395
+ };
1396
+ content: {
1397
+ 'application/json':
1398
+ | components['schemas']['LoginResponse']
1399
+ | components['schemas']['MfaChallengeResponse'];
1400
+ };
1401
+ };
1402
+ /** @description Invalid request parameters. */
1403
+ 400: {
1404
+ headers: {
1405
+ [name: string]: unknown;
1406
+ };
1407
+ content?: never;
1408
+ };
1409
+ /** @description Invalid or expired SAML assertion, or an invalid/used/expired request handle. */
1410
+ 401: {
1411
+ headers: {
1412
+ [name: string]: unknown;
1413
+ };
1414
+ content?: never;
1415
+ };
1416
+ /** @description Asserted email domain not permitted, or the assertion lacks the required login role. */
1417
+ 403: {
1418
+ headers: {
1419
+ [name: string]: unknown;
1420
+ };
1421
+ content?: never;
1422
+ };
1423
+ };
1424
+ };
1425
+ 'post_/v1/auth/saml/initiate': {
1426
+ parameters: {
1427
+ query?: never;
1428
+ header?: never;
1429
+ path?: never;
1430
+ cookie?: never;
1431
+ };
1432
+ requestBody?: {
1433
+ content: {
1434
+ 'application/json': components['schemas']['SamlInitiateRequest2'];
1435
+ };
1436
+ };
1437
+ responses: {
1438
+ /** @description SSO URL and one-time request handle. */
1439
+ 200: {
1440
+ headers: {
1441
+ [name: string]: unknown;
1442
+ };
1443
+ content: {
1444
+ 'application/json': components['schemas']['SamlInitiateResponse'];
1445
+ };
1446
+ };
1447
+ /** @description No SAML configuration for the given customer slug, or SAML is not enabled. */
1448
+ 404: {
1449
+ headers: {
1450
+ [name: string]: unknown;
1451
+ };
1452
+ content?: never;
1453
+ };
1454
+ /** @description Too many concurrent pending SAML requests (active-pending cap exceeded). */
1455
+ 429: {
1456
+ headers: {
1457
+ [name: string]: unknown;
1458
+ };
1459
+ content?: never;
1460
+ };
1461
+ };
1462
+ };
1463
+ get_auth_sessions_list: {
1464
+ parameters: {
1465
+ query?: never;
1466
+ header?: never;
1467
+ path?: never;
1468
+ cookie?: never;
1469
+ };
1470
+ requestBody?: never;
1471
+ responses: {
1472
+ /** @description List of active sessions. */
1473
+ 200: {
1474
+ headers: {
1475
+ [name: string]: unknown;
1476
+ };
1477
+ content: {
1478
+ 'application/json': {
1479
+ /** @description List of active sessions. */
1480
+ sessions?: components['schemas']['SessionItemResponse'][];
1481
+ };
1482
+ };
1483
+ };
1484
+ /** @description Invalid or missing bearer token. */
1485
+ 401: {
1486
+ headers: {
1487
+ [name: string]: unknown;
1488
+ };
1489
+ content?: never;
1490
+ };
1491
+ };
1492
+ };
1493
+ delete_auth_sessions_revoke_all: {
1494
+ parameters: {
1495
+ query?: never;
1496
+ header?: never;
1497
+ path?: never;
1498
+ cookie?: never;
1499
+ };
1500
+ requestBody?: never;
1501
+ responses: {
1502
+ /** @description All sessions revoked successfully. */
1503
+ 204: {
1504
+ headers: {
1505
+ [name: string]: unknown;
1506
+ };
1507
+ content?: never;
1508
+ };
1509
+ /** @description Invalid or missing bearer token. */
1510
+ 401: {
1511
+ headers: {
1512
+ [name: string]: unknown;
1513
+ };
1514
+ content?: never;
1515
+ };
1516
+ /** @description Sudo window not active. Call POST /v1/auth/sudo first. */
1517
+ 403: {
1518
+ headers: {
1519
+ /** @description RFC 9470 step-up challenge. */
1520
+ 'WWW-Authenticate'?: string;
1521
+ [name: string]: unknown;
1522
+ };
1523
+ content?: never;
1524
+ };
1525
+ };
1526
+ };
1527
+ delete_auth_sessions_revoke_one: {
1528
+ parameters: {
1529
+ query?: never;
1530
+ header?: never;
1531
+ path: {
1532
+ /** @description Identifier of the session to revoke. */
1533
+ sessionId: string;
1534
+ };
1535
+ cookie?: never;
1536
+ };
1537
+ requestBody?: never;
1538
+ responses: {
1539
+ /** @description Session revoked successfully. */
1540
+ 204: {
1541
+ headers: {
1542
+ [name: string]: unknown;
1543
+ };
1544
+ content?: never;
1545
+ };
1546
+ /** @description Invalid or missing bearer token. */
1547
+ 401: {
1548
+ headers: {
1549
+ [name: string]: unknown;
1550
+ };
1551
+ content?: never;
1552
+ };
1553
+ /** @description Sudo window not active. Returned when a super admin attempts to revoke another admin's session without an active sudo window. Call POST /v1/auth/sudo first. */
1554
+ 403: {
1555
+ headers: {
1556
+ /** @description RFC 9470 step-up challenge. */
1557
+ 'WWW-Authenticate'?: string;
1558
+ [name: string]: unknown;
1559
+ };
1560
+ content?: never;
1561
+ };
1562
+ /** @description Session not found. */
1563
+ 404: {
1564
+ headers: {
1565
+ [name: string]: unknown;
1566
+ };
1567
+ content?: never;
1568
+ };
1569
+ };
1570
+ };
1571
+ 'post_/v1/auth/sudo': {
1572
+ parameters: {
1573
+ query?: never;
1574
+ header?: never;
1575
+ path?: never;
1576
+ cookie?: never;
1577
+ };
1578
+ requestBody: {
1579
+ content: {
1580
+ 'application/json': components['schemas']['SudoRequest2'];
1581
+ };
1582
+ };
1583
+ responses: {
1584
+ /** @description Step-up authentication successful. */
1585
+ 200: {
1586
+ headers: {
1587
+ [name: string]: unknown;
1588
+ };
1589
+ content: {
1590
+ 'application/json': components['schemas']['SudoResponse'];
1591
+ };
1592
+ };
1593
+ /** @description Invalid or missing bearer token. */
1594
+ 401: {
1595
+ headers: {
1596
+ [name: string]: unknown;
1597
+ };
1598
+ content?: never;
1599
+ };
1600
+ /** @description MFA is not configured for this account. */
1601
+ 403: {
1602
+ headers: {
1603
+ [name: string]: unknown;
1604
+ };
1605
+ content?: never;
1606
+ };
1607
+ /** @description Rate limit exceeded for verification attempts. */
1608
+ 429: {
1609
+ headers: {
1610
+ [name: string]: unknown;
1611
+ };
1612
+ content?: never;
1613
+ };
1614
+ };
1615
+ };
1616
+ 'post_/v1/auth/sudo/challenge': {
1617
+ parameters: {
1618
+ query?: never;
1619
+ header?: never;
1620
+ path?: never;
1621
+ cookie?: never;
1622
+ };
1623
+ requestBody?: never;
1624
+ responses: {
1625
+ /** @description WebAuthn challenge created. */
1626
+ 200: {
1627
+ headers: {
1628
+ [name: string]: unknown;
1629
+ };
1630
+ content: {
1631
+ 'application/json': components['schemas']['SudoChallengeResponse'];
1632
+ };
1633
+ };
1634
+ /** @description Invalid or missing bearer token. */
1635
+ 401: {
1636
+ headers: {
1637
+ [name: string]: unknown;
1638
+ };
1639
+ content?: never;
1640
+ };
1641
+ };
1642
+ };
1643
+ 'get_/v1/auth/token/introspect': {
1644
+ parameters: {
1645
+ query?: never;
1646
+ header?: never;
1647
+ path?: never;
1648
+ cookie?: never;
1649
+ };
1650
+ requestBody?: never;
1651
+ responses: {
1652
+ /** @description Token introspection result. */
1653
+ 200: {
1654
+ headers: {
1655
+ [name: string]: unknown;
1656
+ };
1657
+ content: {
1658
+ 'application/json': components['schemas']['TokenIntrospectResponse'];
1659
+ };
1660
+ };
1661
+ /** @description Access token is missing, malformed, expired, or its session has been revoked. Clients must treat any non-200 response as "token not active". */
1662
+ 401: {
1663
+ headers: {
1664
+ [name: string]: unknown;
1665
+ };
1666
+ content?: never;
1667
+ };
1668
+ /** @description PAT bearer presented to a session-only endpoint. Use GET /v1/auth/pat to retrieve PAT metadata. */
1669
+ 403: {
1670
+ headers: {
1671
+ [name: string]: unknown;
1672
+ };
1673
+ content?: never;
1674
+ };
1675
+ /** @description Programmatic auth feature disabled on this stack. */
1676
+ 404: {
1677
+ headers: {
1678
+ [name: string]: unknown;
1679
+ };
1680
+ content?: never;
1681
+ };
1682
+ };
1683
+ };
1684
+ 'post_/v1/auth/token/refresh': {
1685
+ parameters: {
1686
+ query?: never;
1687
+ header?: never;
1688
+ path?: never;
1689
+ cookie?: never;
1690
+ };
1691
+ requestBody: {
1692
+ content: {
1693
+ 'application/json': components['schemas']['TokenRefreshRequest'];
1694
+ };
1695
+ };
1696
+ responses: {
1697
+ /** @description Token refresh successful. Returns new access and refresh tokens. */
1698
+ 200: {
1699
+ headers: {
1700
+ [name: string]: unknown;
1701
+ };
1702
+ content: {
1703
+ 'application/json': components['schemas']['LoginResponse'];
1704
+ };
1705
+ };
1706
+ /** @description Invalid, expired, or revoked refresh token. */
1707
+ 401: {
1708
+ headers: {
1709
+ [name: string]: unknown;
1710
+ };
1711
+ content?: never;
1712
+ };
1713
+ /** @description Refresh rotation temporarily failed because of database contention. Retry-After indicates when to retry. */
1714
+ 503: {
1715
+ headers: {
1716
+ [name: string]: unknown;
1717
+ };
1718
+ content?: never;
1719
+ };
1720
+ };
1721
+ };
1722
+ 'post_/v1/auth/token/revoke': {
1723
+ parameters: {
1724
+ query?: never;
1725
+ header?: never;
1726
+ path?: never;
1727
+ cookie?: never;
1728
+ };
1729
+ requestBody: {
1730
+ content: {
1731
+ 'application/json': components['schemas']['TokenRevokeRequest2'];
1732
+ };
1733
+ };
1734
+ responses: {
1735
+ /** @description Token revocation processed. Returned for every well-formed request, regardless of whether the token was found, valid, expired, or already revoked — prevents information leakage about token state. */
1736
+ 200: {
1737
+ headers: {
1738
+ [name: string]: unknown;
1739
+ };
1740
+ content?: never;
1741
+ };
1742
+ /** @description Wire-format failure — request body was not valid JSON, or the required `token` field was missing. This is not a token-state signal; the always-200 contract still applies to all token-state branches. */
1743
+ 400: {
1744
+ headers: {
1745
+ [name: string]: unknown;
1746
+ };
1747
+ content?: never;
1748
+ };
1749
+ };
1750
+ };
1751
+ };
1752
+
1753
+ type LoginBody = OpenapiBodyType<paths['/v1/auth/login']['post']>;
1754
+ type LoginResult = OpenapiReturnType<paths['/v1/auth/login']['post']>;
1755
+ type VerifyMfaBody = OpenapiBodyType<paths['/v1/auth/mfa']['post']>;
1756
+ type VerifyMfaResult = OpenapiReturnType<paths['/v1/auth/mfa']['post']>;
1757
+ type RegenerateRecoveryCodesResult = OpenapiReturnType<paths['/v1/auth/mfa/recovery-codes']['post']>;
1758
+ type SudoBody = OpenapiBodyType<paths['/v1/auth/sudo']['post']>;
1759
+ type SudoResult = OpenapiReturnType<paths['/v1/auth/sudo']['post']>;
1760
+ type SudoChallengeResult = OpenapiReturnType<paths['/v1/auth/sudo/challenge']['post']>;
1761
+ type AssertSamlBody = OpenapiBodyType<paths['/v1/auth/saml/assert']['post']>;
1762
+ type AssertSamlResult = OpenapiReturnType<paths['/v1/auth/saml/assert']['post']>;
1763
+ type InitiateSamlBody = OpenapiBodyType<paths['/v1/auth/saml/initiate']['post']>;
1764
+ type InitiateSamlResult = OpenapiReturnType<paths['/v1/auth/saml/initiate']['post']>;
1765
+ type CreateDeviceAuthorizationBody = OpenapiBodyType<paths['/v1/auth/device']['post']>;
1766
+ type CreateDeviceAuthorizationResult = OpenapiReturnType<paths['/v1/auth/device']['post']>;
1767
+ type ApproveDeviceAuthorizationBody = OpenapiBodyType<paths['/v1/auth/device/approve']['post']>;
1768
+ type ApproveDeviceAuthorizationResult = OpenapiReturnType<paths['/v1/auth/device/approve']['post']>;
1769
+ type GetDeviceAuthorizationTokenBody = OpenapiBodyType<paths['/v1/auth/device/token']['post']>;
1770
+ type GetDeviceAuthorizationTokenResult = OpenapiReturnType<paths['/v1/auth/device/token']['post']>;
1771
+ type GetPkceTokenBody = OpenapiBodyType<paths['/v1/auth/pkce/token']['post']>;
1772
+ type GetPkceTokenResult = OpenapiReturnType<paths['/v1/auth/pkce/token']['post']>;
1773
+ type ListPatsResult = OpenapiReturnType<paths['/v1/auth/pat']['get']>;
1774
+ type CreatePatBody = OpenapiBodyType<paths['/v1/auth/pat']['post']>;
1775
+ type CreatePatResult = OpenapiReturnType<paths['/v1/auth/pat']['post']>;
1776
+ type ExchangePatBody = OpenapiBodyType<paths['/v1/auth/pat/exchange']['post']>;
1777
+ type ExchangePatResult = OpenapiReturnType<paths['/v1/auth/pat/exchange']['post']>;
1778
+ type RevokePatPath = OpenapiPathType<paths['/v1/auth/pat/{id}']['delete']>;
1779
+ type ListSessionsResult = OpenapiReturnType<paths['/v1/auth/sessions']['get']>;
1780
+ type RevokeSessionPath = OpenapiPathType<paths['/v1/auth/sessions/{sessionId}']['delete']>;
1781
+ type IntrospectTokenResult = OpenapiReturnType<paths['/v1/auth/token/introspect']['get']>;
1782
+ type RefreshTokenBody = OpenapiBodyType<paths['/v1/auth/token/refresh']['post']>;
1783
+ type RefreshTokenResult = OpenapiReturnType<paths['/v1/auth/token/refresh']['post']>;
1784
+ type RevokeTokenBody = OpenapiBodyType<paths['/v1/auth/token/revoke']['post']>;
1785
+
1786
+ export type { AssertSamlBody as A, CreateDeviceAuthorizationBody as C, ExchangePatBody as E, GetDeviceAuthorizationTokenBody as G, InitiateSamlBody as I, LoginBody as L, RevokePatPath as R, SudoBody as S, VerifyMfaBody as V, ApproveDeviceAuthorizationBody as a, GetPkceTokenBody as b, components as c, CreatePatBody as d, RevokeSessionPath as e, RefreshTokenBody as f, RevokeTokenBody as g, ApproveDeviceAuthorizationResult as h, AssertSamlResult as i, CreateDeviceAuthorizationResult as j, CreatePatResult as k, ExchangePatResult as l, GetDeviceAuthorizationTokenResult as m, GetPkceTokenResult as n, InitiateSamlResult as o, IntrospectTokenResult as p, ListPatsResult as q, ListSessionsResult as r, LoginResult as s, RefreshTokenResult as t, RegenerateRecoveryCodesResult as u, SudoChallengeResult as v, SudoResult as w, VerifyMfaResult as x };