@sess.si/sdk 0.0.0-stage → 0.1.0-rc.4

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 (95) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE +201 -0
  3. package/NOTICE +9 -0
  4. package/README.md +136 -2
  5. package/dist/client.d.ts +12 -0
  6. package/dist/client.d.ts.map +1 -0
  7. package/dist/client.js +34 -0
  8. package/dist/client.js.map +1 -0
  9. package/dist/errors.d.ts +40 -0
  10. package/dist/errors.d.ts.map +1 -0
  11. package/dist/errors.js +52 -0
  12. package/dist/errors.js.map +1 -0
  13. package/dist/generated/openapi.d.ts +2462 -0
  14. package/dist/generated/openapi.d.ts.map +1 -0
  15. package/dist/generated/openapi.js +2 -0
  16. package/dist/generated/openapi.js.map +1 -0
  17. package/dist/index.d.ts +5 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +4 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/internal/decode.d.ts +21 -0
  22. package/dist/internal/decode.d.ts.map +1 -0
  23. package/dist/internal/decode.js +333 -0
  24. package/dist/internal/decode.js.map +1 -0
  25. package/dist/internal/json.d.ts +4 -0
  26. package/dist/internal/json.d.ts.map +1 -0
  27. package/dist/internal/json.js +75 -0
  28. package/dist/internal/json.js.map +1 -0
  29. package/dist/internal/time.d.ts +11 -0
  30. package/dist/internal/time.d.ts.map +1 -0
  31. package/dist/internal/time.js +71 -0
  32. package/dist/internal/time.js.map +1 -0
  33. package/dist/polling.d.ts +3 -0
  34. package/dist/polling.d.ts.map +1 -0
  35. package/dist/polling.js +61 -0
  36. package/dist/polling.js.map +1 -0
  37. package/dist/receipts/index.d.ts +5 -0
  38. package/dist/receipts/index.d.ts.map +1 -0
  39. package/dist/receipts/index.js +2 -0
  40. package/dist/receipts/index.js.map +1 -0
  41. package/dist/receipts/json.d.ts +22 -0
  42. package/dist/receipts/json.d.ts.map +1 -0
  43. package/dist/receipts/json.js +152 -0
  44. package/dist/receipts/json.js.map +1 -0
  45. package/dist/receipts/key-cache.d.ts +28 -0
  46. package/dist/receipts/key-cache.d.ts.map +1 -0
  47. package/dist/receipts/key-cache.js +110 -0
  48. package/dist/receipts/key-cache.js.map +1 -0
  49. package/dist/receipts/resource.d.ts +39 -0
  50. package/dist/receipts/resource.d.ts.map +1 -0
  51. package/dist/receipts/resource.js +119 -0
  52. package/dist/receipts/resource.js.map +1 -0
  53. package/dist/receipts/verify.d.ts +90 -0
  54. package/dist/receipts/verify.d.ts.map +1 -0
  55. package/dist/receipts/verify.js +294 -0
  56. package/dist/receipts/verify.js.map +1 -0
  57. package/dist/sessions.d.ts +19 -0
  58. package/dist/sessions.d.ts.map +1 -0
  59. package/dist/sessions.js +145 -0
  60. package/dist/sessions.js.map +1 -0
  61. package/dist/transport.d.ts +29 -0
  62. package/dist/transport.d.ts.map +1 -0
  63. package/dist/transport.js +447 -0
  64. package/dist/transport.js.map +1 -0
  65. package/dist/types.d.ts +149 -0
  66. package/dist/types.d.ts.map +1 -0
  67. package/dist/types.js +9 -0
  68. package/dist/types.js.map +1 -0
  69. package/dist/webhook-resource.d.ts +13 -0
  70. package/dist/webhook-resource.d.ts.map +1 -0
  71. package/dist/webhook-resource.js +52 -0
  72. package/dist/webhook-resource.js.map +1 -0
  73. package/dist/webhooks/index.d.ts +22 -0
  74. package/dist/webhooks/index.d.ts.map +1 -0
  75. package/dist/webhooks/index.js +184 -0
  76. package/dist/webhooks/index.js.map +1 -0
  77. package/package.json +74 -4
  78. package/src/client.ts +41 -0
  79. package/src/errors.ts +96 -0
  80. package/src/generated/openapi.ts +2578 -0
  81. package/src/index.ts +4 -0
  82. package/src/internal/decode.ts +317 -0
  83. package/src/internal/json.ts +64 -0
  84. package/src/internal/time.ts +85 -0
  85. package/src/polling.ts +77 -0
  86. package/src/receipts/index.ts +16 -0
  87. package/src/receipts/json.ts +168 -0
  88. package/src/receipts/key-cache.ts +143 -0
  89. package/src/receipts/resource.ts +227 -0
  90. package/src/receipts/verify.ts +468 -0
  91. package/src/sessions.ts +227 -0
  92. package/src/transport.ts +524 -0
  93. package/src/types.ts +135 -0
  94. package/src/webhook-resource.ts +81 -0
  95. package/src/webhooks/index.ts +246 -0
@@ -0,0 +1,2462 @@
1
+ export interface paths {
2
+ '/v1/auth/email-link': {
3
+ parameters: {
4
+ query?: never;
5
+ header?: never;
6
+ path?: never;
7
+ cookie?: never;
8
+ };
9
+ get?: never;
10
+ put?: never;
11
+ /** @description Developer account sign-in. Emails a sign-in link to the address: it works once, expires 15 minutes after issue, and a newer link cancels it once the email provider has confirmed sending the newer one (an unconfirmed send cancels nothing). Signing in with one link cancels the address’s other links. The answer is the same whether or not an account exists. Opening the link shows a page whose Sign in button finishes the sign-in (GET never consumes it). Limits: 5 links per address and 20 per client per rolling hour. Developer sign-in never verifies a human responder. */
12
+ post: operations['requestSignInLink'];
13
+ delete?: never;
14
+ options?: never;
15
+ head?: never;
16
+ patch?: never;
17
+ trace?: never;
18
+ };
19
+ '/app/confirm/{token}': {
20
+ parameters: {
21
+ query?: never;
22
+ header?: never;
23
+ path?: never;
24
+ cookie?: never;
25
+ };
26
+ /** @description The page the emailed link opens (the token is a single-use secret; never log it). It only shows a Sign in button (with ?continue=key, a link requested to finish a key creation: "Continue creating your key"); it consumes nothing. */
27
+ get: operations['signInConfirmPage'];
28
+ put?: never;
29
+ /** @description Consumes the link once (same-origin requests only) and sets the account-page cookie: HttpOnly, Secure, SameSite=Strict, host-only, Path=/app, 12 hours. When the same browser holds a pending key creation of the same account (the key-intent cookie, set by a create post with an expired session of that account), the key is created now with that label and expiry, once, and the response is the one-time reveal; the intent cookie is cleared. A pending creation of another account creates nothing. */
30
+ post: operations['signInConfirm'];
31
+ delete?: never;
32
+ options?: never;
33
+ head?: never;
34
+ patch?: never;
35
+ trace?: never;
36
+ };
37
+ '/app/keys': {
38
+ parameters: {
39
+ query?: never;
40
+ header?: never;
41
+ path?: never;
42
+ cookie?: never;
43
+ };
44
+ /** @description The account page listing the workspace’s API keys (label, fingerprint, created, last used, expiry, state). Without a live account session: 303 to /app/sign-in. */
45
+ get: operations['apiKeysPage'];
46
+ put?: never;
47
+ /** @description Creates an owner API key (sess_sk_…) of the developer workspace and shows it once, in one post of the keys page’s create form. The form states each expiry choice’s exact date and carries a single-use nonce bound to the account session (15 minutes); creating consumes it, so a refresh or repeat never creates a second key or shows the secret again. The stored expiry has the date the form showed (rendered_at, bound to the nonce); when that date is no longer true the form is shown again (400). Form fields: csrf (the page’s token), nonce, rendered_at, label (optional, ≤ 64 characters, no control characters), expires_in_days (30, 90, 365 or never; required). Same-origin requests with the session’s CSRF token only. At most 10 active keys per account. With an expired account session (same-origin posts only), a valid label and expiry choice, bound to that account, is kept in a key-intent cookie (HMAC-protected, HttpOnly, Secure, SameSite=Strict, host-only, Path=/app, 15 minutes) and the answer is 303 to /app/sign-in ("Verify it’s you"); the key is created only after the email link is confirmed in the same browser. Revoke: POST /app/keys/{id}/revoke (same rules), immediate. Sign out: POST /app/sign-out. */
48
+ post: operations['createApiKey'];
49
+ delete?: never;
50
+ options?: never;
51
+ head?: never;
52
+ patch?: never;
53
+ trace?: never;
54
+ };
55
+ '/app/trials/claim': {
56
+ parameters: {
57
+ query?: never;
58
+ header?: never;
59
+ path?: never;
60
+ cookie?: never;
61
+ };
62
+ get?: never;
63
+ put?: never;
64
+ /** @description Claims a no-signup trial for the signed-in developer account. Form fields: csrf (the page’s token) and management_credential (the trial’s sess_mg_… credential, in the form body only, never in a URL). Same-origin requests with the session’s CSRF token only; the human link can never claim. A claim records the account as the trial’s owner, once: nothing moves, the trial keeps its deadlines, limits and deletion time, its receipts stay as issued and its management credential keeps working. The account’s API keys can then read (only read) the trial’s Sessions with the owner read routes, each Session until its result_available_until (as with the management credential). Claiming the same trial again from the same account answers as the first claim. */
65
+ post: operations['claimTrial'];
66
+ delete?: never;
67
+ options?: never;
68
+ head?: never;
69
+ patch?: never;
70
+ trace?: never;
71
+ };
72
+ '/v1/trial/sessions': {
73
+ parameters: {
74
+ query?: never;
75
+ header?: never;
76
+ path?: never;
77
+ cookie?: never;
78
+ };
79
+ get?: never;
80
+ put?: never;
81
+ /** @description The no-signup trial. Without Authorization: creates a trial workspace and its first interactive Session, and returns the management credential once, in the body. With `Authorization: Bearer <management credential>`: creates a further Session in that trial. Interactive Sessions only (mode interactive); no return channel, webhook or outbound endpoint exists for a trial. Trial limits (published, reversible): human link and action window 1 hour; result readable 24 hours after the action window; at most 3 active Sessions and 10 Sessions per trial within its 24-hour creation window; at most 3 new trials per client and 200 overall per rolling 24 hours. Any other credential, or a management credential that is unknown, expired, revoked or bound to one Session → 404 NOT_FOUND. An Idempotency-Key header is refused (400 INVALID_SCHEMA): the credential and the human link cannot be replayed. */
82
+ post: operations['createTrialSession'];
83
+ delete?: never;
84
+ options?: never;
85
+ head?: never;
86
+ patch?: never;
87
+ trace?: never;
88
+ };
89
+ '/v1/trial/sessions/{id}': {
90
+ parameters: {
91
+ query?: never;
92
+ header?: never;
93
+ path?: never;
94
+ cookie?: never;
95
+ };
96
+ /** @description A trial Session and its accepted responses, read with the trial’s management credential, until result_available_until. Reading never consumes or changes it. A Session of another trial or workspace, an unknown, expired or revoked credential, a human link or an owner key → 404 NOT_FOUND (generic). */
97
+ get: operations['getTrialSession'];
98
+ put?: never;
99
+ post?: never;
100
+ delete?: never;
101
+ options?: never;
102
+ head?: never;
103
+ patch?: never;
104
+ trace?: never;
105
+ };
106
+ '/v1/sessions': {
107
+ parameters: {
108
+ query?: never;
109
+ header?: never;
110
+ path?: never;
111
+ cookie?: never;
112
+ };
113
+ get?: never;
114
+ put?: never;
115
+ /** @description Creates a display Session (mode display, source.kind data) or an interactive one (mode interactive, source.kind sess_surface; components: SurfaceComponent). An unrecognized component type → 400 UNKNOWN_COMPONENT; a field-schema keyword outside the supported subset → 400 INVALID_SCHEMA. An Idempotency-Key header is refused (400 INVALID_SCHEMA): the human link cannot be replayed (it is stored only as a hash). Retention: the human link expires 720 hours after creation with the deployment owner key and 168 hours with a developer API key (free plan). The Session’s content, accepted results and receipts are purged 720 hours (owner key) or 168 hours (developer API key) after the earlier of its completion and its link’s expiry, and outstanding webhook deliveries are cancelled; afterwards every owner route answers 404 SESSION_NOT_FOUND. A webhook already delivered is not recalled. */
116
+ post: operations['createSession'];
117
+ delete?: never;
118
+ options?: never;
119
+ head?: never;
120
+ patch?: never;
121
+ trace?: never;
122
+ };
123
+ '/v1/sessions/{id}': {
124
+ parameters: {
125
+ query?: never;
126
+ header?: never;
127
+ path?: never;
128
+ cookie?: never;
129
+ };
130
+ /** @description The Session. Interactive Sessions return status, the current revision, its response_schema and every accepted response bound to its revision; repeated reads of an unchanged Session are byte-identical. A developer API key also reads the Sessions of trials its account claimed (read-only), each until that Session’s result_available_until. */
131
+ get: operations['getSession'];
132
+ put?: never;
133
+ post?: never;
134
+ delete?: never;
135
+ options?: never;
136
+ head?: never;
137
+ /** @description Publishes the next immutable Surface revision of an interactive Session, from responded or active (superseding the unanswered revision). The Session returns to active on the same Session ID and human link; a submission against an older revision is then refused with SESSION_REVISION_CONFLICT. */
138
+ patch: operations['publishRevision'];
139
+ trace?: never;
140
+ };
141
+ '/v1/sessions/{id}/complete': {
142
+ parameters: {
143
+ query?: never;
144
+ header?: never;
145
+ path?: never;
146
+ cookie?: never;
147
+ };
148
+ get?: never;
149
+ put?: never;
150
+ /** @description Completes an interactive Session explicitly. Terminal: a completed Session accepts no further submission or revision. No request body. */
151
+ post: operations['completeSession'];
152
+ delete?: never;
153
+ options?: never;
154
+ head?: never;
155
+ patch?: never;
156
+ trace?: never;
157
+ };
158
+ '/v1/sessions/{id}/events': {
159
+ parameters: {
160
+ query?: never;
161
+ header?: never;
162
+ path?: never;
163
+ cookie?: never;
164
+ };
165
+ /** @description Every Event of the Session in sequence order: response.accepted (actor link_holder, the revision it was accepted on, action_id and the typed data), revision.published and session.completed (actor owner). Append-only: Event IDs and sequences never change, and every accepted result stays listed after later revisions and completion. Not paginated in P1 (a Session has a few Events per round). Display Sessions have none. Cache-Control: no-store, no-transform. */
166
+ get: operations['listSessionEvents'];
167
+ put?: never;
168
+ post?: never;
169
+ delete?: never;
170
+ options?: never;
171
+ head?: never;
172
+ patch?: never;
173
+ trace?: never;
174
+ };
175
+ '/v1/sessions/{id}/surfaces/{revision}': {
176
+ parameters: {
177
+ query?: never;
178
+ header?: never;
179
+ path?: never;
180
+ cookie?: never;
181
+ };
182
+ /** @description One immutable Surface revision exactly as stored: the interaction (and, for an interactive Session, the response schema) that responses on that revision are bound to. Cache-Control: no-store, no-transform. */
183
+ get: operations['getSurfaceRevision'];
184
+ put?: never;
185
+ post?: never;
186
+ delete?: never;
187
+ options?: never;
188
+ head?: never;
189
+ patch?: never;
190
+ trace?: never;
191
+ };
192
+ '/s/{token}': {
193
+ parameters: {
194
+ query?: never;
195
+ header?: never;
196
+ path?: never;
197
+ cookie?: never;
198
+ };
199
+ get?: never;
200
+ put?: never;
201
+ /** @description The human form submission (the human link is the capability; never log it). Accepted only from the page itself: Sec-Fetch-Site same-origin, or without Fetch Metadata an Origin equal to the public origin. The server resolves action_id from the exact stored revision and validates data against its response_schema. Responses are HTML pages whose stable code is in a data-error-code attribute. */
202
+ post: operations['submitHumanAction'];
203
+ delete?: never;
204
+ options?: never;
205
+ head?: never;
206
+ patch?: never;
207
+ trace?: never;
208
+ };
209
+ '/v1/webhook': {
210
+ parameters: {
211
+ query?: never;
212
+ header?: never;
213
+ path?: never;
214
+ cookie?: never;
215
+ };
216
+ /** @description The endpoint, the signing secrets in force (key IDs only) and delivery counts with the age of the oldest pending delivery. */
217
+ get: operations['getWebhook'];
218
+ /** @description Registers the owner workspace’s webhook endpoint (one return channel). It replaces the current endpoint, whose pending deliveries are not redirected (they fail as endpoint_unavailable; redeliver explicitly), and receives nothing until verified. The first registration also creates the signing secret, returned once. 503 SERVICE_UNAVAILABLE while data-encryption keys are not configured. */
219
+ put: operations['registerWebhook'];
220
+ post?: never;
221
+ delete?: never;
222
+ options?: never;
223
+ head?: never;
224
+ patch?: never;
225
+ trace?: never;
226
+ };
227
+ '/v1/webhook/verify': {
228
+ parameters: {
229
+ query?: never;
230
+ header?: never;
231
+ path?: never;
232
+ cookie?: never;
233
+ };
234
+ get?: never;
235
+ put?: never;
236
+ /** @description POSTs a fresh random challenge to the exact registered URL through the delivery egress policy; the endpoint is verified when it echoes it, for 30 days (verification_expires_at). Verifying again renews it; an expired verification reads as pending (no new deliveries; queued ones fail endpoint_unavailable). Every connection resolves the host and refuses non-public addresses. */
237
+ post: operations['verifyWebhook'];
238
+ delete?: never;
239
+ options?: never;
240
+ head?: never;
241
+ patch?: never;
242
+ trace?: never;
243
+ };
244
+ '/v1/webhook/secrets/rotate': {
245
+ parameters: {
246
+ query?: never;
247
+ header?: never;
248
+ path?: never;
249
+ cookie?: never;
250
+ };
251
+ get?: never;
252
+ put?: never;
253
+ /** @description Creates a new signing secret (returned once). The previous one keeps signing for a 24-hour overlap, so deliveries carry both signatures until then. */
254
+ post: operations['rotateWebhookSecret'];
255
+ delete?: never;
256
+ options?: never;
257
+ head?: never;
258
+ patch?: never;
259
+ trace?: never;
260
+ };
261
+ '/v1/sessions/{id}/deliveries': {
262
+ parameters: {
263
+ query?: never;
264
+ header?: never;
265
+ path?: never;
266
+ cookie?: never;
267
+ };
268
+ /** @description Every webhook delivery job of the Session’s accepted responses with every attempt (outcome and HTTP status), including permanent failures and exhausted retries. */
269
+ get: operations['listDeliveries'];
270
+ put?: never;
271
+ post?: never;
272
+ delete?: never;
273
+ options?: never;
274
+ head?: never;
275
+ patch?: never;
276
+ trace?: never;
277
+ };
278
+ '/v1/sessions/{id}/events/{event_id}/redeliver': {
279
+ parameters: {
280
+ query?: never;
281
+ header?: never;
282
+ path?: never;
283
+ cookie?: never;
284
+ };
285
+ get?: never;
286
+ put?: never;
287
+ /** @description Queues the accepted Event for delivery again to the current verified endpoint, with a fresh retry budget. The message is the same bytes (same event_id and receipt). A delivery already pending for the Event to the current endpoint is returned instead; one pending for a replaced endpoint is ended (endpoint_unavailable) and a new one queued. */
288
+ post: operations['redeliverEvent'];
289
+ delete?: never;
290
+ options?: never;
291
+ head?: never;
292
+ patch?: never;
293
+ trace?: never;
294
+ };
295
+ '/.well-known/sess-receipt-keys.json': {
296
+ parameters: {
297
+ query?: never;
298
+ header?: never;
299
+ path?: never;
300
+ cookie?: never;
301
+ };
302
+ /** @description The public decision-receipt verification keys as a JWK Set (Ed25519, alg EdDSA): the active signing key and every retained key of the rotation overlap. Verify a receipt (compact JWS, typ sess-receipt+jwt) with the key its protected header kid names. Expected issuer: configured SESS_RECEIPT_ISSUER, otherwise the origin of SESS_PUBLIC_BASE_URL. Expected audience: the Session’s actual workspace, from independently trusted configuration or Sess-Workspace-Id on authenticated owner create/retrieve. Claimed trials retain their original workspace. No credential. 503 SERVICE_UNAVAILABLE while the receipt keys are not configured. Cache-Control: no-store, no-transform. */
303
+ get: operations['receiptKeys'];
304
+ put?: never;
305
+ post?: never;
306
+ delete?: never;
307
+ options?: never;
308
+ head?: never;
309
+ patch?: never;
310
+ trace?: never;
311
+ };
312
+ '/openapi.json': {
313
+ parameters: {
314
+ query?: never;
315
+ header?: never;
316
+ path?: never;
317
+ cookie?: never;
318
+ };
319
+ /** @description This document: the generated, CI-drift-checked contract of the artifact. */
320
+ get: operations['openApi'];
321
+ put?: never;
322
+ post?: never;
323
+ delete?: never;
324
+ options?: never;
325
+ head?: never;
326
+ patch?: never;
327
+ trace?: never;
328
+ };
329
+ '/health/live': {
330
+ parameters: {
331
+ query?: never;
332
+ header?: never;
333
+ path?: never;
334
+ cookie?: never;
335
+ };
336
+ /** @description Process liveness only: no dependency is called. Cache-Control: no-store. */
337
+ get: operations['healthLive'];
338
+ put?: never;
339
+ post?: never;
340
+ delete?: never;
341
+ options?: never;
342
+ head?: never;
343
+ patch?: never;
344
+ trace?: never;
345
+ };
346
+ '/health/ready': {
347
+ parameters: {
348
+ query?: never;
349
+ header?: never;
350
+ path?: never;
351
+ cookie?: never;
352
+ };
353
+ /** @description Readiness, checked within a bound and never cached: the owner key and the decision-receipt signing keys are configured and usable, the build identity is complete and valid (git_sha, build_id and build_time are all non-null in /version), the database answers, and every migration bundled with the artifact is applied. Concurrent requests share the check in progress; the next request after it settles runs a new one. Never migrates and never calls a telemetry backend. Query parameters are ignored. Cache-Control: no-store. */
354
+ get: operations['healthReady'];
355
+ put?: never;
356
+ post?: never;
357
+ delete?: never;
358
+ options?: never;
359
+ head?: never;
360
+ patch?: never;
361
+ trace?: never;
362
+ };
363
+ '/version': {
364
+ parameters: {
365
+ query?: never;
366
+ header?: never;
367
+ path?: never;
368
+ cookie?: never;
369
+ };
370
+ /** @description Non-secret build identity. Answers 200 even when readiness does not. git_sha, build_id and build_time are each null when not supplied or invalid (git_sha: SESS_GIT_SHA missing, empty or malformed; build_time also while it is more than 5 s in the future, checked per request); any null fails readiness (503). Cache-Control: no-store. */
371
+ get: operations['version'];
372
+ put?: never;
373
+ post?: never;
374
+ delete?: never;
375
+ options?: never;
376
+ head?: never;
377
+ patch?: never;
378
+ trace?: never;
379
+ };
380
+ }
381
+ export interface webhooks {
382
+ responseAccepted: {
383
+ parameters: {
384
+ query?: never;
385
+ header?: never;
386
+ path?: never;
387
+ cookie?: never;
388
+ };
389
+ get?: never;
390
+ put?: never;
391
+ /** @description Sent for every accepted response while the workspace has a verified endpoint. Signed per workspace (Standard Webhooks v1): webhook-id = event_id (stable across retries and redeliveries: deduplicate on it), webhook-timestamp (seconds), webhook-signature = space-separated v1,<base64 HMAC-SHA256(secret, id.timestamp.body)>, one per secret in force (two during a 24-hour rotation overlap), sess-webhook-key-ids = their key IDs. HTTPS on port 443, no redirects followed, 10-second timeout, response read up to 64 KiB. 2xx = accepted by the endpoint (not that the workflow resumed); 5xx, 429 (Retry-After honored up to 1 h), 408, 425, timeouts and disconnects are retried with jitter up to 12 attempts within 24 h (a job out of budget ends exhausted); 3xx and other 4xx (including 401/403) are permanent. Delivery is at least once. */
392
+ post: operations['webhookResponseAccepted'];
393
+ delete?: never;
394
+ options?: never;
395
+ head?: never;
396
+ patch?: never;
397
+ trace?: never;
398
+ };
399
+ endpointVerification: {
400
+ parameters: {
401
+ query?: never;
402
+ header?: never;
403
+ path?: never;
404
+ cookie?: never;
405
+ };
406
+ get?: never;
407
+ put?: never;
408
+ /** @description Sent by POST /v1/webhook/verify to the exact registered URL, signed like deliveries. Answer 2xx with a JSON body (at most 4 KiB) {"challenge": <the same value>}. */
409
+ post: operations['webhookEndpointVerification'];
410
+ delete?: never;
411
+ options?: never;
412
+ head?: never;
413
+ patch?: never;
414
+ trace?: never;
415
+ };
416
+ }
417
+ export interface components {
418
+ schemas: {
419
+ CreateSessionRequest: {
420
+ interaction: {
421
+ /** @constant */
422
+ mode: 'display';
423
+ title: string;
424
+ description?: string;
425
+ source: {
426
+ /** @constant */
427
+ kind: 'data';
428
+ data: {
429
+ [key: string]: (string | number | boolean | null) | {
430
+ [key: string]: string | number | boolean | null;
431
+ } | {
432
+ [key: string]: string | number | boolean | null;
433
+ }[];
434
+ };
435
+ };
436
+ } | {
437
+ /** @constant */
438
+ mode: 'interactive';
439
+ title: string;
440
+ description?: string;
441
+ source: {
442
+ /** @constant */
443
+ kind: 'sess_surface';
444
+ components: ({
445
+ type: string;
446
+ } & {
447
+ [key: string]: unknown;
448
+ })[];
449
+ };
450
+ actions: {
451
+ id: string;
452
+ label: string;
453
+ intent?: 'submit' | 'continue' | 'approve' | 'reject' | 'request_change';
454
+ }[];
455
+ /**
456
+ * @description One accepted response per revision (the only P1 policy; the default).
457
+ * @constant
458
+ */
459
+ response_policy?: 'first';
460
+ };
461
+ };
462
+ CreateSessionResponse: {
463
+ id: string;
464
+ revision: number;
465
+ human_url: string;
466
+ };
467
+ SessionResponse: {
468
+ id: string;
469
+ revision: number;
470
+ interaction: {
471
+ /** @constant */
472
+ mode: 'display';
473
+ title: string;
474
+ description?: string;
475
+ source: {
476
+ /** @constant */
477
+ kind: 'data';
478
+ data: {
479
+ [key: string]: (string | number | boolean | null) | {
480
+ [key: string]: string | number | boolean | null;
481
+ } | {
482
+ [key: string]: string | number | boolean | null;
483
+ }[];
484
+ };
485
+ };
486
+ };
487
+ };
488
+ InteractiveSessionResponse: {
489
+ id: string;
490
+ status: 'active' | 'responded' | 'completed';
491
+ /** @description The current Surface revision. */
492
+ revision: number;
493
+ interaction: {
494
+ /** @constant */
495
+ mode: 'interactive';
496
+ title: string;
497
+ description?: string;
498
+ source: {
499
+ /** @constant */
500
+ kind: 'sess_surface';
501
+ components: ({
502
+ /** @constant */
503
+ type: 'heading';
504
+ text: string;
505
+ } | {
506
+ /** @constant */
507
+ type: 'text';
508
+ text: string;
509
+ } | {
510
+ /** @constant */
511
+ type: 'record';
512
+ label?: string;
513
+ fields: {
514
+ [key: string]: string | number | boolean | null;
515
+ };
516
+ } | {
517
+ /** @constant */
518
+ type: 'field';
519
+ name: string;
520
+ label: string;
521
+ description?: string;
522
+ required?: boolean;
523
+ /** @description A string field rendered as a multi-line text area. */
524
+ multiline?: boolean;
525
+ /** @description Display labels for enum values (default: the value itself). */
526
+ option_labels?: {
527
+ [key: string]: string;
528
+ };
529
+ /** @description The field value schema, JSON Schema 2020-12 restricted to: type string (minLength, maxLength, enum), number or integer (minimum, maximum, exclusiveMinimum, exclusiveMaximum), boolean, or array of string enum IDs (items {type: string, enum}, minItems, maxItems, uniqueItems: true). title and description are allowed on the field value schema itself; array items permit only type and enum. Any other keyword fails with INVALID_SCHEMA. */
530
+ schema: {
531
+ [key: string]: unknown;
532
+ };
533
+ /** @description The proposed value shown to the person (a correction is a field with a proposed value). It must be valid against the field schema. */
534
+ value?: unknown;
535
+ })[];
536
+ };
537
+ actions: {
538
+ id: string;
539
+ label: string;
540
+ intent?: 'submit' | 'continue' | 'approve' | 'reject' | 'request_change';
541
+ }[];
542
+ /** @constant */
543
+ response_policy: 'first';
544
+ };
545
+ /** @description The JSON Schema 2020-12 the current revision’s responses are validated against. */
546
+ response_schema: {
547
+ [key: string]: unknown;
548
+ };
549
+ /** @description Every accepted response, in sequence order, each bound to its revision. */
550
+ responses: {
551
+ event_id: string;
552
+ /** @description Monotonic per-Session Event sequence. */
553
+ sequence: number;
554
+ /** @description The Surface revision it was accepted on. */
555
+ revision: number;
556
+ action_id: string;
557
+ /** @description The normalized typed result, valid against that revision’s response_schema. */
558
+ data: {
559
+ [key: string]: unknown;
560
+ };
561
+ actor: {
562
+ /** @constant */
563
+ assurance: 'link_holder';
564
+ };
565
+ /** @description ISO 8601 UTC time of acceptance. */
566
+ accepted_at: string;
567
+ /** @description The signed decision receipt: a compact JWS (EdDSA/Ed25519, typ sess-receipt+jwt, kid) over the RFC 8785 canonical claims, verifiable with GET /.well-known/sess-receipt-keys.json. Issued once in the acceptance transaction and never re-signed. Its exp is at least 720 hours after acceptance and, for an owner-key Session that is purged automatically, no earlier than the Session’s latest possible purge (its human link’s expiry plus its retention after it ends). null only for responses accepted before receipts existed. */
568
+ receipt: string | null;
569
+ }[];
570
+ };
571
+ InteractiveSurfaceResponse: {
572
+ id: string;
573
+ revision: number;
574
+ interaction: {
575
+ /** @constant */
576
+ mode: 'interactive';
577
+ title: string;
578
+ description?: string;
579
+ source: {
580
+ /** @constant */
581
+ kind: 'sess_surface';
582
+ components: ({
583
+ /** @constant */
584
+ type: 'heading';
585
+ text: string;
586
+ } | {
587
+ /** @constant */
588
+ type: 'text';
589
+ text: string;
590
+ } | {
591
+ /** @constant */
592
+ type: 'record';
593
+ label?: string;
594
+ fields: {
595
+ [key: string]: string | number | boolean | null;
596
+ };
597
+ } | {
598
+ /** @constant */
599
+ type: 'field';
600
+ name: string;
601
+ label: string;
602
+ description?: string;
603
+ required?: boolean;
604
+ /** @description A string field rendered as a multi-line text area. */
605
+ multiline?: boolean;
606
+ /** @description Display labels for enum values (default: the value itself). */
607
+ option_labels?: {
608
+ [key: string]: string;
609
+ };
610
+ /** @description The field value schema, JSON Schema 2020-12 restricted to: type string (minLength, maxLength, enum), number or integer (minimum, maximum, exclusiveMinimum, exclusiveMaximum), boolean, or array of string enum IDs (items {type: string, enum}, minItems, maxItems, uniqueItems: true). title and description are allowed on the field value schema itself; array items permit only type and enum. Any other keyword fails with INVALID_SCHEMA. */
611
+ schema: {
612
+ [key: string]: unknown;
613
+ };
614
+ /** @description The proposed value shown to the person (a correction is a field with a proposed value). It must be valid against the field schema. */
615
+ value?: unknown;
616
+ })[];
617
+ };
618
+ actions: {
619
+ id: string;
620
+ label: string;
621
+ intent?: 'submit' | 'continue' | 'approve' | 'reject' | 'request_change';
622
+ }[];
623
+ /** @constant */
624
+ response_policy: 'first';
625
+ };
626
+ response_schema: {
627
+ [key: string]: unknown;
628
+ };
629
+ };
630
+ SessionEventsResponse: {
631
+ id: string;
632
+ /** @description Every Event of the Session, in sequence order (append-only; never rewritten). */
633
+ events: {
634
+ event_id: string;
635
+ /** @description Monotonic per-Session sequence. */
636
+ sequence: number;
637
+ type: 'response.accepted' | 'revision.published' | 'session.completed';
638
+ /** @description response.accepted: the revision the response was accepted on; revision.published: the revision published; session.completed: the current revision at completion. */
639
+ revision: number;
640
+ actor: {
641
+ assurance: 'link_holder' | 'owner';
642
+ };
643
+ action_id?: string;
644
+ /** @description response.accepted only: the typed result, valid against that revision. */
645
+ data?: {
646
+ [key: string]: unknown;
647
+ };
648
+ /** @description ISO 8601 UTC time the Event was recorded. */
649
+ created_at: string;
650
+ /** @description The signed decision receipt: a compact JWS (EdDSA/Ed25519, typ sess-receipt+jwt, kid) over the RFC 8785 canonical claims, verifiable with GET /.well-known/sess-receipt-keys.json. Issued once in the acceptance transaction and never re-signed. Its exp is at least 720 hours after acceptance and, for an owner-key Session that is purged automatically, no earlier than the Session’s latest possible purge (its human link’s expiry plus its retention after it ends). null only for responses accepted before receipts existed. */
651
+ receipt?: string | null;
652
+ }[];
653
+ };
654
+ ReceiptKeysResponse: {
655
+ /** @description The active signing key and every retained verification key (rotation overlap). A receipt verifies with the key whose kid its protected header names; there is no fallback key. */
656
+ keys: {
657
+ /** @constant */
658
+ kty: 'OKP';
659
+ /** @constant */
660
+ crv: 'Ed25519';
661
+ x: string;
662
+ kid: string;
663
+ /** @constant */
664
+ alg: 'EdDSA';
665
+ /** @constant */
666
+ use: 'sig';
667
+ }[];
668
+ };
669
+ WebhookRegisterRequest: {
670
+ /** @description Absolute https:// URL on port 443, without user info or fragment. Registering replaces the current endpoint (which stops receiving new deliveries); the new one receives nothing until verified. */
671
+ url: string;
672
+ };
673
+ WebhookRegisterResponse: {
674
+ endpoint: {
675
+ id: string;
676
+ url: string;
677
+ status: 'pending' | 'verified';
678
+ created_at: string;
679
+ verified_at: string | null;
680
+ /** @description The verification lapses 30 days after it succeeds; after that the endpoint is pending again (no new deliveries; queued ones fail endpoint_unavailable) until re-verified. */
681
+ verification_expires_at: string | null;
682
+ };
683
+ /** @description The workspace’s first signing secret when this registration created it, else null. */
684
+ signing_secret: {
685
+ kid: string;
686
+ /** @description Shown once. Store it in the receiver; Sess keeps it only encrypted. */
687
+ secret: string;
688
+ } | null;
689
+ };
690
+ WebhookVerifyResponse: {
691
+ endpoint: {
692
+ id: string;
693
+ url: string;
694
+ status: 'pending' | 'verified';
695
+ created_at: string;
696
+ verified_at: string | null;
697
+ /** @description The verification lapses 30 days after it succeeds; after that the endpoint is pending again (no new deliveries; queued ones fail endpoint_unavailable) until re-verified. */
698
+ verification_expires_at: string | null;
699
+ };
700
+ };
701
+ WebhookResponse: {
702
+ endpoint: {
703
+ id: string;
704
+ url: string;
705
+ status: 'pending' | 'verified';
706
+ created_at: string;
707
+ verified_at: string | null;
708
+ /** @description The verification lapses 30 days after it succeeds; after that the endpoint is pending again (no new deliveries; queued ones fail endpoint_unavailable) until re-verified. */
709
+ verification_expires_at: string | null;
710
+ } | null;
711
+ /** @description Secrets in force, newest first (never the secret values). */
712
+ signing_secrets: {
713
+ kid: string;
714
+ active: boolean;
715
+ retire_at: string | null;
716
+ }[];
717
+ deliveries: {
718
+ pending: number;
719
+ failed: number;
720
+ delivered: number;
721
+ oldest_pending_age_seconds: number | null;
722
+ };
723
+ };
724
+ WebhookRotateResponse: {
725
+ signing_secret: {
726
+ kid: string;
727
+ /** @description Shown once. Store it in the receiver; Sess keeps it only encrypted. */
728
+ secret: string;
729
+ };
730
+ previous: {
731
+ kid: string;
732
+ retire_at: string;
733
+ } | null;
734
+ };
735
+ DeliveriesResponse: {
736
+ id: string;
737
+ deliveries: {
738
+ delivery_id: string;
739
+ event_id: string;
740
+ kind: 'accepted' | 'redelivery';
741
+ status: 'pending' | 'delivered' | 'failed';
742
+ endpoint_id: string;
743
+ next_attempt_at: string | null;
744
+ deadline_at: string;
745
+ created_at: string;
746
+ finished_at: string | null;
747
+ /** @description The job-level outcome: the last attempt’s, or `exhausted` when the attempt or time budget ran out, or `endpoint_unavailable` when its endpoint was replaced, disabled or its verification lapsed. */
748
+ last_outcome: ('started' | 'delivered' | 'server_error' | 'rate_limited' | 'timeout' | 'connection' | 'dns' | 'signing_unavailable' | 'request_timeout' | 'too_early' | 'rejected' | 'redirect' | 'egress_refused' | 'endpoint_unavailable' | 'exhausted') | null;
749
+ /** @description Every started attempt. `started` with no finish time: the attempt was interrupted (e.g. a crash); the outcome at the endpoint is unknown and the job is retried. */
750
+ attempts: {
751
+ attempt: number;
752
+ started_at: string;
753
+ finished_at: string | null;
754
+ outcome: 'started' | 'delivered' | 'server_error' | 'rate_limited' | 'timeout' | 'connection' | 'dns' | 'signing_unavailable' | 'request_timeout' | 'too_early' | 'rejected' | 'redirect' | 'egress_refused' | 'endpoint_unavailable' | 'exhausted';
755
+ http_status: number | null;
756
+ }[];
757
+ }[];
758
+ };
759
+ RedeliverResponse: {
760
+ delivery: {
761
+ delivery_id: string;
762
+ event_id: string;
763
+ kind: 'accepted' | 'redelivery';
764
+ status: 'pending' | 'delivered' | 'failed';
765
+ endpoint_id: string;
766
+ next_attempt_at: string | null;
767
+ deadline_at: string;
768
+ created_at: string;
769
+ finished_at: string | null;
770
+ /** @description The job-level outcome: the last attempt’s, or `exhausted` when the attempt or time budget ran out, or `endpoint_unavailable` when its endpoint was replaced, disabled or its verification lapsed. */
771
+ last_outcome: ('started' | 'delivered' | 'server_error' | 'rate_limited' | 'timeout' | 'connection' | 'dns' | 'signing_unavailable' | 'request_timeout' | 'too_early' | 'rejected' | 'redirect' | 'egress_refused' | 'endpoint_unavailable' | 'exhausted') | null;
772
+ /** @description Every started attempt. `started` with no finish time: the attempt was interrupted (e.g. a crash); the outcome at the endpoint is unknown and the job is retried. */
773
+ attempts: {
774
+ attempt: number;
775
+ started_at: string;
776
+ finished_at: string | null;
777
+ outcome: 'started' | 'delivered' | 'server_error' | 'rate_limited' | 'timeout' | 'connection' | 'dns' | 'signing_unavailable' | 'request_timeout' | 'too_early' | 'rejected' | 'redirect' | 'egress_refused' | 'endpoint_unavailable' | 'exhausted';
778
+ http_status: number | null;
779
+ }[];
780
+ };
781
+ };
782
+ WebhookDelivery: {
783
+ /** @constant */
784
+ type: 'response.accepted';
785
+ /** @description Stable across retries and redeliveries: deduplicate on it. */
786
+ event_id: string;
787
+ session_id: string;
788
+ sequence: number;
789
+ revision: number;
790
+ action_id: string;
791
+ data: {
792
+ [key: string]: unknown;
793
+ };
794
+ accepted_at: string;
795
+ /** @description The stored signed decision receipt (identical on every delivery). */
796
+ receipt: string | null;
797
+ };
798
+ WebhookVerification: {
799
+ /** @constant */
800
+ type: 'sess.webhook.verification';
801
+ challenge: string;
802
+ };
803
+ PatchSessionRequest: {
804
+ interaction: {
805
+ /** @constant */
806
+ mode: 'interactive';
807
+ title: string;
808
+ description?: string;
809
+ source: {
810
+ /** @constant */
811
+ kind: 'sess_surface';
812
+ components: ({
813
+ type: string;
814
+ } & {
815
+ [key: string]: unknown;
816
+ })[];
817
+ };
818
+ actions: {
819
+ id: string;
820
+ label: string;
821
+ intent?: 'submit' | 'continue' | 'approve' | 'reject' | 'request_change';
822
+ }[];
823
+ /**
824
+ * @description One accepted response per revision (the only P1 policy; the default).
825
+ * @constant
826
+ */
827
+ response_policy?: 'first';
828
+ };
829
+ };
830
+ SurfaceComponent: {
831
+ /** @constant */
832
+ type: 'heading';
833
+ text: string;
834
+ } | {
835
+ /** @constant */
836
+ type: 'text';
837
+ text: string;
838
+ } | {
839
+ /** @constant */
840
+ type: 'record';
841
+ label?: string;
842
+ fields: {
843
+ [key: string]: string | number | boolean | null;
844
+ };
845
+ } | {
846
+ /** @constant */
847
+ type: 'field';
848
+ name: string;
849
+ label: string;
850
+ description?: string;
851
+ required?: boolean;
852
+ /** @description A string field rendered as a multi-line text area. */
853
+ multiline?: boolean;
854
+ /** @description Display labels for enum values (default: the value itself). */
855
+ option_labels?: {
856
+ [key: string]: string;
857
+ };
858
+ /** @description The field value schema, JSON Schema 2020-12 restricted to: type string (minLength, maxLength, enum), number or integer (minimum, maximum, exclusiveMinimum, exclusiveMaximum), boolean, or array of string enum IDs (items {type: string, enum}, minItems, maxItems, uniqueItems: true). title and description are allowed on the field value schema itself; array items permit only type and enum. Any other keyword fails with INVALID_SCHEMA. */
859
+ schema: {
860
+ [key: string]: unknown;
861
+ };
862
+ /** @description The proposed value shown to the person (a correction is a field with a proposed value). It must be valid against the field schema. */
863
+ value?: unknown;
864
+ };
865
+ HumanSubmissionForm: {
866
+ client_event_id: string;
867
+ surface_revision: string;
868
+ action_id: string;
869
+ } & {
870
+ [key: string]: string;
871
+ };
872
+ Error: {
873
+ error: {
874
+ code: 'INVALID_SCHEMA' | 'PAYLOAD_TOO_LARGE' | 'UNAUTHORIZED' | 'SESSION_NOT_FOUND' | 'NOT_FOUND' | 'INTERNAL' | 'UNKNOWN_COMPONENT' | 'SESSION_REVISION_CONFLICT' | 'IDEMPOTENCY_CONFLICT' | 'PRECONDITION_REQUIRED' | 'SESSION_COMPLETED' | 'ACTION_NOT_ALLOWED' | 'ACTION_NOT_FOUND' | 'VALIDATION_FAILED' | 'RESPONSE_LIMIT_REACHED' | 'SERVICE_UNAVAILABLE' | 'RATE_LIMITED' | 'TRIAL_UNAVAILABLE' | 'SIGN_IN_UNAVAILABLE' | 'WEBHOOK_INVALID_URL' | 'WEBHOOK_VERIFICATION_FAILED' | 'WEBHOOK_NOT_CONFIGURED';
875
+ message: string;
876
+ request_id: string;
877
+ /** @description A stable machine-readable refinement of some codes (P1 A4 webhook errors). */
878
+ reason?: string;
879
+ };
880
+ };
881
+ HealthOk: {
882
+ /** @constant */
883
+ status: 'ok';
884
+ };
885
+ HealthUnavailable: {
886
+ /** @constant */
887
+ status: 'unavailable';
888
+ };
889
+ VersionResponse: {
890
+ /** @description The deployed commit, from SESS_GIT_SHA. null when SESS_GIT_SHA is missing, empty or not exactly 40 lower-case hex characters; readiness then answers 503. Never derived from a checkout or normalized. */
891
+ git_sha: string | null;
892
+ /** @description SESS_BUILD_ID, else the BUILD_ID file at the workspace root of the image. null when neither supplies a valid one; readiness then answers 503. */
893
+ build_id: string | null;
894
+ /** @description ISO 8601 UTC build time, from SESS_BUILD_TIME, else the BUILD_TIME file at the workspace root of the image. Valid when it has real calendar components and is not more than 5 s after the current time, checked on every request. null when neither supplies a valid one, and readiness then answers 503; never the start time. */
895
+ build_time: string | null;
896
+ /** @description The Node.js version (process.version). */
897
+ node_version: string;
898
+ };
899
+ TrialCreateSessionRequest: {
900
+ interaction: {
901
+ /** @constant */
902
+ mode: 'interactive';
903
+ title: string;
904
+ description?: string;
905
+ source: {
906
+ /** @constant */
907
+ kind: 'sess_surface';
908
+ components: ({
909
+ type: string;
910
+ } & {
911
+ [key: string]: unknown;
912
+ })[];
913
+ };
914
+ actions: {
915
+ id: string;
916
+ label: string;
917
+ intent?: 'submit' | 'continue' | 'approve' | 'reject' | 'request_change';
918
+ }[];
919
+ /**
920
+ * @description One accepted response per revision (the only P1 policy; the default).
921
+ * @constant
922
+ */
923
+ response_policy?: 'first';
924
+ };
925
+ };
926
+ TrialCreateSessionResponse: {
927
+ id: string;
928
+ revision: number;
929
+ /** @description The human link (a capability): share it only with the responder. */
930
+ human_url: string;
931
+ /** @description The trial workspace this Session belongs to. */
932
+ workspace_id: string;
933
+ /** @description Returned once, only when this request created the trial (no Authorization header). It reads this trial’s results and creates further Sessions in it; it is never retrievable again. Keep it secret; never put it in a URL. */
934
+ management_credential?: string;
935
+ /** @description After this instant the human link accepts no response. */
936
+ action_expires_at: string;
937
+ /** @description Until this instant the result can be read with the management credential. */
938
+ result_available_until: string;
939
+ /** @description After this instant the trial creates no further Session. */
940
+ trial_expires_at: string;
941
+ };
942
+ TrialSessionResponse: {
943
+ id: string;
944
+ status: 'active' | 'responded' | 'completed';
945
+ /** @description The current Surface revision. */
946
+ revision: number;
947
+ interaction: {
948
+ /** @constant */
949
+ mode: 'interactive';
950
+ title: string;
951
+ description?: string;
952
+ source: {
953
+ /** @constant */
954
+ kind: 'sess_surface';
955
+ components: ({
956
+ /** @constant */
957
+ type: 'heading';
958
+ text: string;
959
+ } | {
960
+ /** @constant */
961
+ type: 'text';
962
+ text: string;
963
+ } | {
964
+ /** @constant */
965
+ type: 'record';
966
+ label?: string;
967
+ fields: {
968
+ [key: string]: string | number | boolean | null;
969
+ };
970
+ } | {
971
+ /** @constant */
972
+ type: 'field';
973
+ name: string;
974
+ label: string;
975
+ description?: string;
976
+ required?: boolean;
977
+ /** @description A string field rendered as a multi-line text area. */
978
+ multiline?: boolean;
979
+ /** @description Display labels for enum values (default: the value itself). */
980
+ option_labels?: {
981
+ [key: string]: string;
982
+ };
983
+ /** @description The field value schema, JSON Schema 2020-12 restricted to: type string (minLength, maxLength, enum), number or integer (minimum, maximum, exclusiveMinimum, exclusiveMaximum), boolean, or array of string enum IDs (items {type: string, enum}, minItems, maxItems, uniqueItems: true). title and description are allowed on the field value schema itself; array items permit only type and enum. Any other keyword fails with INVALID_SCHEMA. */
984
+ schema: {
985
+ [key: string]: unknown;
986
+ };
987
+ /** @description The proposed value shown to the person (a correction is a field with a proposed value). It must be valid against the field schema. */
988
+ value?: unknown;
989
+ })[];
990
+ };
991
+ actions: {
992
+ id: string;
993
+ label: string;
994
+ intent?: 'submit' | 'continue' | 'approve' | 'reject' | 'request_change';
995
+ }[];
996
+ /** @constant */
997
+ response_policy: 'first';
998
+ };
999
+ /** @description The JSON Schema 2020-12 the current revision’s responses are validated against. */
1000
+ response_schema: {
1001
+ [key: string]: unknown;
1002
+ };
1003
+ /** @description Every accepted response, in sequence order, each bound to its revision. */
1004
+ responses: {
1005
+ event_id: string;
1006
+ /** @description Monotonic per-Session Event sequence. */
1007
+ sequence: number;
1008
+ /** @description The Surface revision it was accepted on. */
1009
+ revision: number;
1010
+ action_id: string;
1011
+ /** @description The normalized typed result, valid against that revision’s response_schema. */
1012
+ data: {
1013
+ [key: string]: unknown;
1014
+ };
1015
+ actor: {
1016
+ /** @constant */
1017
+ assurance: 'link_holder';
1018
+ };
1019
+ /** @description ISO 8601 UTC time of acceptance. */
1020
+ accepted_at: string;
1021
+ /** @description The signed decision receipt: a compact JWS (EdDSA/Ed25519, typ sess-receipt+jwt, kid) over the RFC 8785 canonical claims, verifiable with GET /.well-known/sess-receipt-keys.json. Issued once in the acceptance transaction and never re-signed. Its exp is at least 720 hours after acceptance and, for an owner-key Session that is purged automatically, no earlier than the Session’s latest possible purge (its human link’s expiry plus its retention after it ends). null only for responses accepted before receipts existed. */
1022
+ receipt: string | null;
1023
+ }[];
1024
+ trial: {
1025
+ workspace_id: string;
1026
+ /** @description After this instant the human link accepts no response. */
1027
+ action_expires_at: string;
1028
+ /** @description Until this instant this result remains readable. */
1029
+ result_available_until: string;
1030
+ };
1031
+ };
1032
+ EmailLinkRequest: {
1033
+ /** @description The address to send a sign-in link to. Trimmed and lower-cased. */
1034
+ email: string;
1035
+ };
1036
+ EmailLinkAccepted: {
1037
+ /**
1038
+ * @description The link was handed to the email provider. The same answer for every address: it never says whether an account exists.
1039
+ * @constant
1040
+ */
1041
+ status: 'accepted';
1042
+ };
1043
+ };
1044
+ responses: never;
1045
+ parameters: never;
1046
+ requestBodies: never;
1047
+ headers: never;
1048
+ pathItems: never;
1049
+ }
1050
+ export type $defs = Record<string, never>;
1051
+ export interface operations {
1052
+ requestSignInLink: {
1053
+ parameters: {
1054
+ query?: never;
1055
+ header?: never;
1056
+ path?: never;
1057
+ cookie?: never;
1058
+ };
1059
+ requestBody: {
1060
+ content: {
1061
+ 'application/json': components['schemas']['EmailLinkRequest'];
1062
+ };
1063
+ };
1064
+ responses: {
1065
+ /** @description Handed to the email provider. */
1066
+ 202: {
1067
+ headers: {
1068
+ [name: string]: unknown;
1069
+ };
1070
+ content: {
1071
+ 'application/json': components['schemas']['EmailLinkAccepted'];
1072
+ };
1073
+ };
1074
+ /** @description INVALID_SCHEMA: not a plausible email address */
1075
+ 400: {
1076
+ headers: {
1077
+ [name: string]: unknown;
1078
+ };
1079
+ content: {
1080
+ 'application/json': components['schemas']['Error'];
1081
+ };
1082
+ };
1083
+ /** @description RATE_LIMITED: too many links for this address or client */
1084
+ 429: {
1085
+ headers: {
1086
+ 'Retry-After'?: number;
1087
+ [name: string]: unknown;
1088
+ };
1089
+ content: {
1090
+ 'application/json': components['schemas']['Error'];
1091
+ };
1092
+ };
1093
+ /** @description SIGN_IN_UNAVAILABLE (email is not configured on this deployment) or SERVICE_UNAVAILABLE (the email provider did not confirm the send: the outcome is unknown, so an email may or may not arrive; earlier links stay valid, and the attempt counts toward the limits) */
1094
+ 503: {
1095
+ headers: {
1096
+ [name: string]: unknown;
1097
+ };
1098
+ content: {
1099
+ 'application/json': components['schemas']['Error'];
1100
+ };
1101
+ };
1102
+ };
1103
+ };
1104
+ signInConfirmPage: {
1105
+ parameters: {
1106
+ query?: never;
1107
+ header?: never;
1108
+ path: {
1109
+ token: string;
1110
+ };
1111
+ cookie?: never;
1112
+ };
1113
+ requestBody?: never;
1114
+ responses: {
1115
+ /** @description The confirm page. */
1116
+ 200: {
1117
+ headers: {
1118
+ [name: string]: unknown;
1119
+ };
1120
+ content: {
1121
+ 'text/html': unknown;
1122
+ };
1123
+ };
1124
+ };
1125
+ };
1126
+ signInConfirm: {
1127
+ parameters: {
1128
+ query?: never;
1129
+ header?: never;
1130
+ path: {
1131
+ token: string;
1132
+ };
1133
+ cookie?: never;
1134
+ };
1135
+ requestBody?: never;
1136
+ responses: {
1137
+ /** @description Signed in; the pending key was not created because the expiry date its form showed is no longer the date a key created now would get (a new UTC day began): the keys page with a fresh form. */
1138
+ 200: {
1139
+ headers: {
1140
+ [name: string]: unknown;
1141
+ };
1142
+ content: {
1143
+ 'text/html': unknown;
1144
+ };
1145
+ };
1146
+ /** @description Signed in and the pending key created: the keys page with it, shown once. */
1147
+ 201: {
1148
+ headers: {
1149
+ [name: string]: unknown;
1150
+ };
1151
+ content: {
1152
+ 'text/html': unknown;
1153
+ };
1154
+ };
1155
+ /** @description Signed in: to /app/keys (/app/keys?resume=elsewhere when the link was for a key creation started in another browser), with Set-Cookie. */
1156
+ 303: {
1157
+ headers: {
1158
+ [name: string]: unknown;
1159
+ };
1160
+ content?: never;
1161
+ };
1162
+ /** @description SIGN_IN_LINK_INVALID: expired, used or replaced by a newer link. */
1163
+ 400: {
1164
+ headers: {
1165
+ [name: string]: unknown;
1166
+ };
1167
+ content: {
1168
+ 'text/html': unknown;
1169
+ };
1170
+ };
1171
+ /** @description ACTION_NOT_ALLOWED: not a same-origin request. */
1172
+ 403: {
1173
+ headers: {
1174
+ [name: string]: unknown;
1175
+ };
1176
+ content: {
1177
+ 'text/html': unknown;
1178
+ };
1179
+ };
1180
+ /** @description Signed in; the pending key was not created: KEY_LIMIT_REACHED (the account has 10 active keys). */
1181
+ 409: {
1182
+ headers: {
1183
+ [name: string]: unknown;
1184
+ };
1185
+ content: {
1186
+ 'text/html': unknown;
1187
+ };
1188
+ };
1189
+ };
1190
+ };
1191
+ apiKeysPage: {
1192
+ parameters: {
1193
+ query?: never;
1194
+ header?: never;
1195
+ path?: never;
1196
+ cookie?: never;
1197
+ };
1198
+ requestBody?: never;
1199
+ responses: {
1200
+ /** @description The keys page. */
1201
+ 200: {
1202
+ headers: {
1203
+ [name: string]: unknown;
1204
+ };
1205
+ content: {
1206
+ 'text/html': unknown;
1207
+ };
1208
+ };
1209
+ /** @description To /app/sign-in. */
1210
+ 303: {
1211
+ headers: {
1212
+ [name: string]: unknown;
1213
+ };
1214
+ content?: never;
1215
+ };
1216
+ };
1217
+ };
1218
+ createApiKey: {
1219
+ parameters: {
1220
+ query?: never;
1221
+ header?: never;
1222
+ path?: never;
1223
+ cookie?: never;
1224
+ };
1225
+ requestBody?: never;
1226
+ responses: {
1227
+ /** @description The keys page with the new key, shown once. */
1228
+ 201: {
1229
+ headers: {
1230
+ [name: string]: unknown;
1231
+ };
1232
+ content: {
1233
+ 'text/html': unknown;
1234
+ };
1235
+ };
1236
+ /** @description No live account session: to /app/sign-in (with the key-intent cookie for a valid choice). */
1237
+ 303: {
1238
+ headers: {
1239
+ [name: string]: unknown;
1240
+ };
1241
+ content?: never;
1242
+ };
1243
+ /** @description INVALID_SCHEMA: an expiry that is not offered, an invalid label (the field shows the error), a form nonce that is missing, unknown, expired or issued to another account session, a changed rendered_at, or expiry dates that changed since the form was shown. */
1244
+ 400: {
1245
+ headers: {
1246
+ [name: string]: unknown;
1247
+ };
1248
+ content: {
1249
+ 'text/html': unknown;
1250
+ };
1251
+ };
1252
+ /** @description ACTION_NOT_ALLOWED: cross-origin or a wrong CSRF token. */
1253
+ 403: {
1254
+ headers: {
1255
+ [name: string]: unknown;
1256
+ };
1257
+ content: {
1258
+ 'text/html': unknown;
1259
+ };
1260
+ };
1261
+ /** @description KEY_LIMIT_REACHED, or KEY_ALREADY_CREATED (the same create form again: no second key, and the secret is not shown again). */
1262
+ 409: {
1263
+ headers: {
1264
+ [name: string]: unknown;
1265
+ };
1266
+ content: {
1267
+ 'text/html': unknown;
1268
+ };
1269
+ };
1270
+ };
1271
+ };
1272
+ claimTrial: {
1273
+ parameters: {
1274
+ query?: never;
1275
+ header?: never;
1276
+ path?: never;
1277
+ cookie?: never;
1278
+ };
1279
+ requestBody?: never;
1280
+ responses: {
1281
+ /** @description Claimed (or already claimed by this account): to /app/keys?claimed=1. No live account session: to /app/sign-in. */
1282
+ 303: {
1283
+ headers: {
1284
+ [name: string]: unknown;
1285
+ };
1286
+ content?: never;
1287
+ };
1288
+ /** @description INVALID_SCHEMA: not a management credential. */
1289
+ 400: {
1290
+ headers: {
1291
+ [name: string]: unknown;
1292
+ };
1293
+ content: {
1294
+ 'text/html': unknown;
1295
+ };
1296
+ };
1297
+ /** @description ACTION_NOT_ALLOWED: cross-origin or a wrong CSRF token. */
1298
+ 403: {
1299
+ headers: {
1300
+ [name: string]: unknown;
1301
+ };
1302
+ content: {
1303
+ 'text/html': unknown;
1304
+ };
1305
+ };
1306
+ /** @description TRIAL_NOT_FOUND: no live trial for that credential (unknown, revoked, deleted or past its deletion time). */
1307
+ 404: {
1308
+ headers: {
1309
+ [name: string]: unknown;
1310
+ };
1311
+ content: {
1312
+ 'text/html': unknown;
1313
+ };
1314
+ };
1315
+ /** @description TRIAL_ALREADY_CLAIMED: another account claimed this trial. */
1316
+ 409: {
1317
+ headers: {
1318
+ [name: string]: unknown;
1319
+ };
1320
+ content: {
1321
+ 'text/html': unknown;
1322
+ };
1323
+ };
1324
+ };
1325
+ };
1326
+ createTrialSession: {
1327
+ parameters: {
1328
+ query?: never;
1329
+ header?: never;
1330
+ path?: never;
1331
+ cookie?: never;
1332
+ };
1333
+ requestBody: {
1334
+ content: {
1335
+ 'application/json': components['schemas']['TrialCreateSessionRequest'];
1336
+ };
1337
+ };
1338
+ responses: {
1339
+ /** @description Session created at revision 1. */
1340
+ 201: {
1341
+ headers: {
1342
+ /** @description Strong: "1.0". */
1343
+ ETag?: string;
1344
+ /** @description /v1/trial/sessions/{id} */
1345
+ Location?: string;
1346
+ [name: string]: unknown;
1347
+ };
1348
+ content: {
1349
+ 'application/json': components['schemas']['TrialCreateSessionResponse'];
1350
+ };
1351
+ };
1352
+ /** @description INVALID_SCHEMA or UNKNOWN_COMPONENT */
1353
+ 400: {
1354
+ headers: {
1355
+ [name: string]: unknown;
1356
+ };
1357
+ content: {
1358
+ 'application/json': components['schemas']['Error'];
1359
+ };
1360
+ };
1361
+ /** @description NOT_FOUND: the credential does not authorize a trial, an unknown /v1/trial path or a malformed trial URL (never 401) */
1362
+ 404: {
1363
+ headers: {
1364
+ [name: string]: unknown;
1365
+ };
1366
+ content: {
1367
+ 'application/json': components['schemas']['Error'];
1368
+ };
1369
+ };
1370
+ /** @description PAYLOAD_TOO_LARGE */
1371
+ 413: {
1372
+ headers: {
1373
+ [name: string]: unknown;
1374
+ };
1375
+ content: {
1376
+ 'application/json': components['schemas']['Error'];
1377
+ };
1378
+ };
1379
+ /** @description RATE_LIMITED: a trial limit (active Sessions, Sessions per trial, new trials per client or overall); also after the trial creation window has ended. The message names the limit in plain words for people; the code and Retry-After are the stable contract, so clients never parse the message. */
1380
+ 429: {
1381
+ headers: {
1382
+ /** @description Seconds until the limit frees up, when a retry can succeed. */
1383
+ 'Retry-After'?: number;
1384
+ [name: string]: unknown;
1385
+ };
1386
+ content: {
1387
+ 'application/json': components['schemas']['Error'];
1388
+ };
1389
+ };
1390
+ /** @description INTERNAL */
1391
+ 500: {
1392
+ headers: {
1393
+ [name: string]: unknown;
1394
+ };
1395
+ content: {
1396
+ 'application/json': components['schemas']['Error'];
1397
+ };
1398
+ };
1399
+ /** @description TRIAL_UNAVAILABLE: the trial is not configured on this deployment */
1400
+ 503: {
1401
+ headers: {
1402
+ [name: string]: unknown;
1403
+ };
1404
+ content: {
1405
+ 'application/json': components['schemas']['Error'];
1406
+ };
1407
+ };
1408
+ };
1409
+ };
1410
+ getTrialSession: {
1411
+ parameters: {
1412
+ query?: never;
1413
+ header?: never;
1414
+ path: {
1415
+ id: string;
1416
+ };
1417
+ cookie?: never;
1418
+ };
1419
+ requestBody?: never;
1420
+ responses: {
1421
+ /** @description The Session with its trial timing. */
1422
+ 200: {
1423
+ headers: {
1424
+ ETag?: string;
1425
+ [name: string]: unknown;
1426
+ };
1427
+ content: {
1428
+ 'application/json': components['schemas']['TrialSessionResponse'];
1429
+ };
1430
+ };
1431
+ /** @description NOT_FOUND: any credential or isolation failure, an unknown /v1/trial path or a malformed trial URL (never 401 or 400) */
1432
+ 404: {
1433
+ headers: {
1434
+ [name: string]: unknown;
1435
+ };
1436
+ content: {
1437
+ 'application/json': components['schemas']['Error'];
1438
+ };
1439
+ };
1440
+ /** @description INTERNAL */
1441
+ 500: {
1442
+ headers: {
1443
+ [name: string]: unknown;
1444
+ };
1445
+ content: {
1446
+ 'application/json': components['schemas']['Error'];
1447
+ };
1448
+ };
1449
+ /** @description TRIAL_UNAVAILABLE: the trial is not configured on this deployment */
1450
+ 503: {
1451
+ headers: {
1452
+ [name: string]: unknown;
1453
+ };
1454
+ content: {
1455
+ 'application/json': components['schemas']['Error'];
1456
+ };
1457
+ };
1458
+ };
1459
+ };
1460
+ createSession: {
1461
+ parameters: {
1462
+ query?: never;
1463
+ header?: never;
1464
+ path?: never;
1465
+ cookie?: never;
1466
+ };
1467
+ requestBody: {
1468
+ content: {
1469
+ 'application/json': components['schemas']['CreateSessionRequest'];
1470
+ };
1471
+ };
1472
+ responses: {
1473
+ /** @description Session created at revision 1. */
1474
+ 201: {
1475
+ headers: {
1476
+ /** @description Display: the quoted revision ("1"). Interactive: the strong "<revision>.<sequence>" ("1.0"). */
1477
+ ETag?: string;
1478
+ /** @description /v1/sessions/{id} */
1479
+ Location?: string;
1480
+ /** @description The actual workspace in which this Session was created. Authenticated server-authoritative context for the receipt audience; not a request header or a human identity claim. Returned only on successful owner creation. */
1481
+ 'Sess-Workspace-Id'?: string;
1482
+ [name: string]: unknown;
1483
+ };
1484
+ content: {
1485
+ 'application/json': components['schemas']['CreateSessionResponse'];
1486
+ };
1487
+ };
1488
+ /** @description INVALID_SCHEMA or UNKNOWN_COMPONENT */
1489
+ 400: {
1490
+ headers: {
1491
+ [name: string]: unknown;
1492
+ };
1493
+ content: {
1494
+ 'application/json': components['schemas']['Error'];
1495
+ };
1496
+ };
1497
+ /** @description UNAUTHORIZED */
1498
+ 401: {
1499
+ headers: {
1500
+ [name: string]: unknown;
1501
+ };
1502
+ content: {
1503
+ 'application/json': components['schemas']['Error'];
1504
+ };
1505
+ };
1506
+ /** @description PAYLOAD_TOO_LARGE */
1507
+ 413: {
1508
+ headers: {
1509
+ [name: string]: unknown;
1510
+ };
1511
+ content: {
1512
+ 'application/json': components['schemas']['Error'];
1513
+ };
1514
+ };
1515
+ /** @description INTERNAL */
1516
+ 500: {
1517
+ headers: {
1518
+ [name: string]: unknown;
1519
+ };
1520
+ content: {
1521
+ 'application/json': components['schemas']['Error'];
1522
+ };
1523
+ };
1524
+ };
1525
+ };
1526
+ getSession: {
1527
+ parameters: {
1528
+ query?: never;
1529
+ header?: never;
1530
+ path: {
1531
+ id: string;
1532
+ };
1533
+ cookie?: never;
1534
+ };
1535
+ requestBody?: never;
1536
+ responses: {
1537
+ /** @description The current revision of the Session. */
1538
+ 200: {
1539
+ headers: {
1540
+ ETag?: string;
1541
+ /** @description The authorized Session resource’s actual workspace, including the original trial workspace when read through a claim. It can differ from the API credential’s workspace. Use as trusted receipt audience context, not as a human identity or permission to execute an operation. Absent on errors. */
1542
+ 'Sess-Workspace-Id'?: string;
1543
+ [name: string]: unknown;
1544
+ };
1545
+ content: {
1546
+ 'application/json': components['schemas']['SessionResponse'] | components['schemas']['InteractiveSessionResponse'];
1547
+ };
1548
+ };
1549
+ /** @description INVALID_SCHEMA */
1550
+ 400: {
1551
+ headers: {
1552
+ [name: string]: unknown;
1553
+ };
1554
+ content: {
1555
+ 'application/json': components['schemas']['Error'];
1556
+ };
1557
+ };
1558
+ /** @description UNAUTHORIZED */
1559
+ 401: {
1560
+ headers: {
1561
+ [name: string]: unknown;
1562
+ };
1563
+ content: {
1564
+ 'application/json': components['schemas']['Error'];
1565
+ };
1566
+ };
1567
+ /** @description SESSION_NOT_FOUND */
1568
+ 404: {
1569
+ headers: {
1570
+ [name: string]: unknown;
1571
+ };
1572
+ content: {
1573
+ 'application/json': components['schemas']['Error'];
1574
+ };
1575
+ };
1576
+ /** @description INTERNAL */
1577
+ 500: {
1578
+ headers: {
1579
+ [name: string]: unknown;
1580
+ };
1581
+ content: {
1582
+ 'application/json': components['schemas']['Error'];
1583
+ };
1584
+ };
1585
+ };
1586
+ };
1587
+ publishRevision: {
1588
+ parameters: {
1589
+ query?: never;
1590
+ header: {
1591
+ /** @description The strong ETag from the latest GET (e.g. "2.3"). Required: absent or `*` → 428 PRECONDITION_REQUIRED. A weak tag (W/"…") never matches (strong comparison); a stale tag → 412 SESSION_REVISION_CONFLICT. */
1592
+ 'If-Match': string;
1593
+ /** @description Scoped to the owner credential, the operation and the Session. The same canonical request (body and If-Match) returns the original result (status, ETag, body); a different request with the same key → 409 IDEMPOTENCY_CONFLICT. Only successful results are recorded. */
1594
+ 'Idempotency-Key'?: string;
1595
+ };
1596
+ path: {
1597
+ id: string;
1598
+ };
1599
+ cookie?: never;
1600
+ };
1601
+ requestBody: {
1602
+ content: {
1603
+ 'application/json': components['schemas']['PatchSessionRequest'];
1604
+ };
1605
+ };
1606
+ responses: {
1607
+ /** @description The Session at its new revision. */
1608
+ 200: {
1609
+ headers: {
1610
+ /** @description Strong: "<revision>.<sequence>". */
1611
+ ETag?: string;
1612
+ [name: string]: unknown;
1613
+ };
1614
+ content: {
1615
+ 'application/json': components['schemas']['InteractiveSessionResponse'];
1616
+ };
1617
+ };
1618
+ /** @description INVALID_SCHEMA or UNKNOWN_COMPONENT */
1619
+ 400: {
1620
+ headers: {
1621
+ [name: string]: unknown;
1622
+ };
1623
+ content: {
1624
+ 'application/json': components['schemas']['Error'];
1625
+ };
1626
+ };
1627
+ /** @description UNAUTHORIZED */
1628
+ 401: {
1629
+ headers: {
1630
+ [name: string]: unknown;
1631
+ };
1632
+ content: {
1633
+ 'application/json': components['schemas']['Error'];
1634
+ };
1635
+ };
1636
+ /** @description ACTION_NOT_ALLOWED: a Session of a claimed trial (read-only) */
1637
+ 403: {
1638
+ headers: {
1639
+ [name: string]: unknown;
1640
+ };
1641
+ content: {
1642
+ 'application/json': components['schemas']['Error'];
1643
+ };
1644
+ };
1645
+ /** @description SESSION_NOT_FOUND */
1646
+ 404: {
1647
+ headers: {
1648
+ [name: string]: unknown;
1649
+ };
1650
+ content: {
1651
+ 'application/json': components['schemas']['Error'];
1652
+ };
1653
+ };
1654
+ /** @description SESSION_COMPLETED, ACTION_NOT_ALLOWED (display Session) or IDEMPOTENCY_CONFLICT */
1655
+ 409: {
1656
+ headers: {
1657
+ [name: string]: unknown;
1658
+ };
1659
+ content: {
1660
+ 'application/json': components['schemas']['Error'];
1661
+ };
1662
+ };
1663
+ /** @description SESSION_REVISION_CONFLICT (If-Match does not match the current ETag) */
1664
+ 412: {
1665
+ headers: {
1666
+ [name: string]: unknown;
1667
+ };
1668
+ content: {
1669
+ 'application/json': components['schemas']['Error'];
1670
+ };
1671
+ };
1672
+ /** @description PAYLOAD_TOO_LARGE */
1673
+ 413: {
1674
+ headers: {
1675
+ [name: string]: unknown;
1676
+ };
1677
+ content: {
1678
+ 'application/json': components['schemas']['Error'];
1679
+ };
1680
+ };
1681
+ /** @description PRECONDITION_REQUIRED */
1682
+ 428: {
1683
+ headers: {
1684
+ [name: string]: unknown;
1685
+ };
1686
+ content: {
1687
+ 'application/json': components['schemas']['Error'];
1688
+ };
1689
+ };
1690
+ /** @description INTERNAL */
1691
+ 500: {
1692
+ headers: {
1693
+ [name: string]: unknown;
1694
+ };
1695
+ content: {
1696
+ 'application/json': components['schemas']['Error'];
1697
+ };
1698
+ };
1699
+ };
1700
+ };
1701
+ completeSession: {
1702
+ parameters: {
1703
+ query?: never;
1704
+ header: {
1705
+ /** @description The strong ETag from the latest GET (e.g. "2.3"). Required: absent or `*` → 428 PRECONDITION_REQUIRED. A weak tag (W/"…") never matches (strong comparison); a stale tag → 412 SESSION_REVISION_CONFLICT. */
1706
+ 'If-Match': string;
1707
+ /** @description Scoped to the owner credential, the operation and the Session. The same canonical request (body and If-Match) returns the original result (status, ETag, body); a different request with the same key → 409 IDEMPOTENCY_CONFLICT. Only successful results are recorded. */
1708
+ 'Idempotency-Key'?: string;
1709
+ };
1710
+ path: {
1711
+ id: string;
1712
+ };
1713
+ cookie?: never;
1714
+ };
1715
+ requestBody?: never;
1716
+ responses: {
1717
+ /** @description The completed Session. */
1718
+ 200: {
1719
+ headers: {
1720
+ /** @description Strong: "<revision>.<sequence>". */
1721
+ ETag?: string;
1722
+ [name: string]: unknown;
1723
+ };
1724
+ content: {
1725
+ 'application/json': components['schemas']['InteractiveSessionResponse'];
1726
+ };
1727
+ };
1728
+ /** @description INVALID_SCHEMA */
1729
+ 400: {
1730
+ headers: {
1731
+ [name: string]: unknown;
1732
+ };
1733
+ content: {
1734
+ 'application/json': components['schemas']['Error'];
1735
+ };
1736
+ };
1737
+ /** @description UNAUTHORIZED */
1738
+ 401: {
1739
+ headers: {
1740
+ [name: string]: unknown;
1741
+ };
1742
+ content: {
1743
+ 'application/json': components['schemas']['Error'];
1744
+ };
1745
+ };
1746
+ /** @description ACTION_NOT_ALLOWED: a Session of a claimed trial (read-only) */
1747
+ 403: {
1748
+ headers: {
1749
+ [name: string]: unknown;
1750
+ };
1751
+ content: {
1752
+ 'application/json': components['schemas']['Error'];
1753
+ };
1754
+ };
1755
+ /** @description SESSION_NOT_FOUND */
1756
+ 404: {
1757
+ headers: {
1758
+ [name: string]: unknown;
1759
+ };
1760
+ content: {
1761
+ 'application/json': components['schemas']['Error'];
1762
+ };
1763
+ };
1764
+ /** @description SESSION_COMPLETED, ACTION_NOT_ALLOWED (display Session) or IDEMPOTENCY_CONFLICT */
1765
+ 409: {
1766
+ headers: {
1767
+ [name: string]: unknown;
1768
+ };
1769
+ content: {
1770
+ 'application/json': components['schemas']['Error'];
1771
+ };
1772
+ };
1773
+ /** @description SESSION_REVISION_CONFLICT */
1774
+ 412: {
1775
+ headers: {
1776
+ [name: string]: unknown;
1777
+ };
1778
+ content: {
1779
+ 'application/json': components['schemas']['Error'];
1780
+ };
1781
+ };
1782
+ /** @description PRECONDITION_REQUIRED */
1783
+ 428: {
1784
+ headers: {
1785
+ [name: string]: unknown;
1786
+ };
1787
+ content: {
1788
+ 'application/json': components['schemas']['Error'];
1789
+ };
1790
+ };
1791
+ /** @description INTERNAL */
1792
+ 500: {
1793
+ headers: {
1794
+ [name: string]: unknown;
1795
+ };
1796
+ content: {
1797
+ 'application/json': components['schemas']['Error'];
1798
+ };
1799
+ };
1800
+ };
1801
+ };
1802
+ listSessionEvents: {
1803
+ parameters: {
1804
+ query?: never;
1805
+ header?: never;
1806
+ path: {
1807
+ id: string;
1808
+ };
1809
+ cookie?: never;
1810
+ };
1811
+ requestBody?: never;
1812
+ responses: {
1813
+ /** @description The Event log. */
1814
+ 200: {
1815
+ headers: {
1816
+ [name: string]: unknown;
1817
+ };
1818
+ content: {
1819
+ 'application/json': components['schemas']['SessionEventsResponse'];
1820
+ };
1821
+ };
1822
+ /** @description UNAUTHORIZED */
1823
+ 401: {
1824
+ headers: {
1825
+ [name: string]: unknown;
1826
+ };
1827
+ content: {
1828
+ 'application/json': components['schemas']['Error'];
1829
+ };
1830
+ };
1831
+ /** @description SESSION_NOT_FOUND */
1832
+ 404: {
1833
+ headers: {
1834
+ [name: string]: unknown;
1835
+ };
1836
+ content: {
1837
+ 'application/json': components['schemas']['Error'];
1838
+ };
1839
+ };
1840
+ /** @description INTERNAL */
1841
+ 500: {
1842
+ headers: {
1843
+ [name: string]: unknown;
1844
+ };
1845
+ content: {
1846
+ 'application/json': components['schemas']['Error'];
1847
+ };
1848
+ };
1849
+ };
1850
+ };
1851
+ getSurfaceRevision: {
1852
+ parameters: {
1853
+ query?: never;
1854
+ header?: never;
1855
+ path: {
1856
+ id: string;
1857
+ revision: string;
1858
+ };
1859
+ cookie?: never;
1860
+ };
1861
+ requestBody?: never;
1862
+ responses: {
1863
+ /** @description The revision. */
1864
+ 200: {
1865
+ headers: {
1866
+ [name: string]: unknown;
1867
+ };
1868
+ content: {
1869
+ 'application/json': components['schemas']['SessionResponse'] | components['schemas']['InteractiveSurfaceResponse'];
1870
+ };
1871
+ };
1872
+ /** @description INVALID_SCHEMA (revision is not a positive integer) */
1873
+ 400: {
1874
+ headers: {
1875
+ [name: string]: unknown;
1876
+ };
1877
+ content: {
1878
+ 'application/json': components['schemas']['Error'];
1879
+ };
1880
+ };
1881
+ /** @description UNAUTHORIZED */
1882
+ 401: {
1883
+ headers: {
1884
+ [name: string]: unknown;
1885
+ };
1886
+ content: {
1887
+ 'application/json': components['schemas']['Error'];
1888
+ };
1889
+ };
1890
+ /** @description SESSION_NOT_FOUND, or NOT_FOUND for a revision that does not exist */
1891
+ 404: {
1892
+ headers: {
1893
+ [name: string]: unknown;
1894
+ };
1895
+ content: {
1896
+ 'application/json': components['schemas']['Error'];
1897
+ };
1898
+ };
1899
+ /** @description INTERNAL */
1900
+ 500: {
1901
+ headers: {
1902
+ [name: string]: unknown;
1903
+ };
1904
+ content: {
1905
+ 'application/json': components['schemas']['Error'];
1906
+ };
1907
+ };
1908
+ };
1909
+ };
1910
+ submitHumanAction: {
1911
+ parameters: {
1912
+ query?: never;
1913
+ header?: never;
1914
+ path: {
1915
+ token: string;
1916
+ };
1917
+ cookie?: never;
1918
+ };
1919
+ requestBody: {
1920
+ content: {
1921
+ 'application/x-www-form-urlencoded': components['schemas']['HumanSubmissionForm'];
1922
+ };
1923
+ };
1924
+ responses: {
1925
+ /** @description Accepted (with a signed decision receipt stored with its Event, returned by the owner GET and the Event log), or a repeated client_event_id with the same request (original result and the same receipt, never re-signed). */
1926
+ 200: {
1927
+ headers: {
1928
+ [name: string]: unknown;
1929
+ };
1930
+ content: {
1931
+ 'text/html': unknown;
1932
+ };
1933
+ };
1934
+ /** @description INVALID_SCHEMA or ACTION_NOT_FOUND. */
1935
+ 400: {
1936
+ headers: {
1937
+ [name: string]: unknown;
1938
+ };
1939
+ content: {
1940
+ 'text/html': unknown;
1941
+ };
1942
+ };
1943
+ /** @description ACTION_NOT_ALLOWED: not a same-origin submission. */
1944
+ 403: {
1945
+ headers: {
1946
+ [name: string]: unknown;
1947
+ };
1948
+ content: {
1949
+ 'text/html': unknown;
1950
+ };
1951
+ };
1952
+ /** @description Unknown, expired or revoked link (generic). */
1953
+ 404: {
1954
+ headers: {
1955
+ [name: string]: unknown;
1956
+ };
1957
+ content: {
1958
+ 'text/html': unknown;
1959
+ };
1960
+ };
1961
+ /** @description ACTION_NOT_ALLOWED: a display Session. */
1962
+ 405: {
1963
+ headers: {
1964
+ [name: string]: unknown;
1965
+ };
1966
+ content: {
1967
+ 'text/html': unknown;
1968
+ };
1969
+ };
1970
+ /** @description SESSION_REVISION_CONFLICT (the current revision, prefilled with the safe draft), RESPONSE_LIMIT_REACHED, SESSION_COMPLETED or IDEMPOTENCY_CONFLICT. */
1971
+ 409: {
1972
+ headers: {
1973
+ [name: string]: unknown;
1974
+ };
1975
+ content: {
1976
+ 'text/html': unknown;
1977
+ };
1978
+ };
1979
+ /** @description PAYLOAD_TOO_LARGE. */
1980
+ 413: {
1981
+ headers: {
1982
+ [name: string]: unknown;
1983
+ };
1984
+ content: {
1985
+ 'text/html': unknown;
1986
+ };
1987
+ };
1988
+ /** @description INVALID_SCHEMA: not application/x-www-form-urlencoded. */
1989
+ 415: {
1990
+ headers: {
1991
+ [name: string]: unknown;
1992
+ };
1993
+ content: {
1994
+ 'text/html': unknown;
1995
+ };
1996
+ };
1997
+ /** @description VALIDATION_FAILED: the form with field errors. */
1998
+ 422: {
1999
+ headers: {
2000
+ [name: string]: unknown;
2001
+ };
2002
+ content: {
2003
+ 'text/html': unknown;
2004
+ };
2005
+ };
2006
+ /** @description SERVICE_UNAVAILABLE: the receipt keys are not configured; nothing is accepted. */
2007
+ 503: {
2008
+ headers: {
2009
+ [name: string]: unknown;
2010
+ };
2011
+ content: {
2012
+ 'text/html': unknown;
2013
+ };
2014
+ };
2015
+ };
2016
+ };
2017
+ getWebhook: {
2018
+ parameters: {
2019
+ query?: never;
2020
+ header?: never;
2021
+ path?: never;
2022
+ cookie?: never;
2023
+ };
2024
+ requestBody?: never;
2025
+ responses: {
2026
+ /** @description The webhook state. */
2027
+ 200: {
2028
+ headers: {
2029
+ [name: string]: unknown;
2030
+ };
2031
+ content: {
2032
+ 'application/json': components['schemas']['WebhookResponse'];
2033
+ };
2034
+ };
2035
+ /** @description UNAUTHORIZED */
2036
+ 401: {
2037
+ headers: {
2038
+ [name: string]: unknown;
2039
+ };
2040
+ content: {
2041
+ 'application/json': components['schemas']['Error'];
2042
+ };
2043
+ };
2044
+ };
2045
+ };
2046
+ registerWebhook: {
2047
+ parameters: {
2048
+ query?: never;
2049
+ header?: never;
2050
+ path?: never;
2051
+ cookie?: never;
2052
+ };
2053
+ requestBody: {
2054
+ content: {
2055
+ 'application/json': components['schemas']['WebhookRegisterRequest'];
2056
+ };
2057
+ };
2058
+ responses: {
2059
+ /** @description Registered (pending). */
2060
+ 201: {
2061
+ headers: {
2062
+ [name: string]: unknown;
2063
+ };
2064
+ content: {
2065
+ 'application/json': components['schemas']['WebhookRegisterResponse'];
2066
+ };
2067
+ };
2068
+ /** @description WEBHOOK_INVALID_URL (reason: not_https, port, credentials, fragment, non_public_address, malformed, too_long) or INVALID_SCHEMA */
2069
+ 400: {
2070
+ headers: {
2071
+ [name: string]: unknown;
2072
+ };
2073
+ content: {
2074
+ 'application/json': components['schemas']['Error'];
2075
+ };
2076
+ };
2077
+ /** @description UNAUTHORIZED */
2078
+ 401: {
2079
+ headers: {
2080
+ [name: string]: unknown;
2081
+ };
2082
+ content: {
2083
+ 'application/json': components['schemas']['Error'];
2084
+ };
2085
+ };
2086
+ /** @description SERVICE_UNAVAILABLE */
2087
+ 503: {
2088
+ headers: {
2089
+ [name: string]: unknown;
2090
+ };
2091
+ content: {
2092
+ 'application/json': components['schemas']['Error'];
2093
+ };
2094
+ };
2095
+ };
2096
+ };
2097
+ verifyWebhook: {
2098
+ parameters: {
2099
+ query?: never;
2100
+ header?: never;
2101
+ path?: never;
2102
+ cookie?: never;
2103
+ };
2104
+ requestBody?: never;
2105
+ responses: {
2106
+ /** @description Verified; the updated endpoint and its verification expiry. */
2107
+ 200: {
2108
+ headers: {
2109
+ [name: string]: unknown;
2110
+ };
2111
+ content: {
2112
+ 'application/json': components['schemas']['WebhookVerifyResponse'];
2113
+ };
2114
+ };
2115
+ /** @description UNAUTHORIZED */
2116
+ 401: {
2117
+ headers: {
2118
+ [name: string]: unknown;
2119
+ };
2120
+ content: {
2121
+ 'application/json': components['schemas']['Error'];
2122
+ };
2123
+ };
2124
+ /** @description WEBHOOK_NOT_CONFIGURED */
2125
+ 409: {
2126
+ headers: {
2127
+ [name: string]: unknown;
2128
+ };
2129
+ content: {
2130
+ 'application/json': components['schemas']['Error'];
2131
+ };
2132
+ };
2133
+ /** @description WEBHOOK_VERIFICATION_FAILED (reason: egress_refused, redirect, rejected, bad_answer, timeout, connection, dns) */
2134
+ 422: {
2135
+ headers: {
2136
+ [name: string]: unknown;
2137
+ };
2138
+ content: {
2139
+ 'application/json': components['schemas']['Error'];
2140
+ };
2141
+ };
2142
+ /** @description SERVICE_UNAVAILABLE */
2143
+ 503: {
2144
+ headers: {
2145
+ [name: string]: unknown;
2146
+ };
2147
+ content: {
2148
+ 'application/json': components['schemas']['Error'];
2149
+ };
2150
+ };
2151
+ };
2152
+ };
2153
+ rotateWebhookSecret: {
2154
+ parameters: {
2155
+ query?: never;
2156
+ header?: never;
2157
+ path?: never;
2158
+ cookie?: never;
2159
+ };
2160
+ requestBody?: never;
2161
+ responses: {
2162
+ /** @description Rotated. */
2163
+ 201: {
2164
+ headers: {
2165
+ [name: string]: unknown;
2166
+ };
2167
+ content: {
2168
+ 'application/json': components['schemas']['WebhookRotateResponse'];
2169
+ };
2170
+ };
2171
+ /** @description UNAUTHORIZED */
2172
+ 401: {
2173
+ headers: {
2174
+ [name: string]: unknown;
2175
+ };
2176
+ content: {
2177
+ 'application/json': components['schemas']['Error'];
2178
+ };
2179
+ };
2180
+ /** @description WEBHOOK_NOT_CONFIGURED */
2181
+ 409: {
2182
+ headers: {
2183
+ [name: string]: unknown;
2184
+ };
2185
+ content: {
2186
+ 'application/json': components['schemas']['Error'];
2187
+ };
2188
+ };
2189
+ /** @description SERVICE_UNAVAILABLE */
2190
+ 503: {
2191
+ headers: {
2192
+ [name: string]: unknown;
2193
+ };
2194
+ content: {
2195
+ 'application/json': components['schemas']['Error'];
2196
+ };
2197
+ };
2198
+ };
2199
+ };
2200
+ listDeliveries: {
2201
+ parameters: {
2202
+ query?: never;
2203
+ header?: never;
2204
+ path: {
2205
+ id: string;
2206
+ };
2207
+ cookie?: never;
2208
+ };
2209
+ requestBody?: never;
2210
+ responses: {
2211
+ /** @description The delivery log. */
2212
+ 200: {
2213
+ headers: {
2214
+ [name: string]: unknown;
2215
+ };
2216
+ content: {
2217
+ 'application/json': components['schemas']['DeliveriesResponse'];
2218
+ };
2219
+ };
2220
+ /** @description UNAUTHORIZED */
2221
+ 401: {
2222
+ headers: {
2223
+ [name: string]: unknown;
2224
+ };
2225
+ content: {
2226
+ 'application/json': components['schemas']['Error'];
2227
+ };
2228
+ };
2229
+ /** @description SESSION_NOT_FOUND */
2230
+ 404: {
2231
+ headers: {
2232
+ [name: string]: unknown;
2233
+ };
2234
+ content: {
2235
+ 'application/json': components['schemas']['Error'];
2236
+ };
2237
+ };
2238
+ };
2239
+ };
2240
+ redeliverEvent: {
2241
+ parameters: {
2242
+ query?: never;
2243
+ header?: never;
2244
+ path: {
2245
+ id: string;
2246
+ event_id: string;
2247
+ };
2248
+ cookie?: never;
2249
+ };
2250
+ requestBody?: never;
2251
+ responses: {
2252
+ /** @description Queued, or the existing pending delivery for the same Event/endpoint. */
2253
+ 202: {
2254
+ headers: {
2255
+ [name: string]: unknown;
2256
+ };
2257
+ content: {
2258
+ 'application/json': components['schemas']['RedeliverResponse'];
2259
+ };
2260
+ };
2261
+ /** @description UNAUTHORIZED */
2262
+ 401: {
2263
+ headers: {
2264
+ [name: string]: unknown;
2265
+ };
2266
+ content: {
2267
+ 'application/json': components['schemas']['Error'];
2268
+ };
2269
+ };
2270
+ /** @description ACTION_NOT_ALLOWED: a Session of a claimed trial (read-only) */
2271
+ 403: {
2272
+ headers: {
2273
+ [name: string]: unknown;
2274
+ };
2275
+ content: {
2276
+ 'application/json': components['schemas']['Error'];
2277
+ };
2278
+ };
2279
+ /** @description NOT_FOUND (no such accepted Event in this Session) */
2280
+ 404: {
2281
+ headers: {
2282
+ [name: string]: unknown;
2283
+ };
2284
+ content: {
2285
+ 'application/json': components['schemas']['Error'];
2286
+ };
2287
+ };
2288
+ /** @description WEBHOOK_NOT_CONFIGURED (no verified endpoint) */
2289
+ 409: {
2290
+ headers: {
2291
+ [name: string]: unknown;
2292
+ };
2293
+ content: {
2294
+ 'application/json': components['schemas']['Error'];
2295
+ };
2296
+ };
2297
+ };
2298
+ };
2299
+ receiptKeys: {
2300
+ parameters: {
2301
+ query?: never;
2302
+ header?: never;
2303
+ path?: never;
2304
+ cookie?: never;
2305
+ };
2306
+ requestBody?: never;
2307
+ responses: {
2308
+ /** @description The JWK Set. */
2309
+ 200: {
2310
+ headers: {
2311
+ [name: string]: unknown;
2312
+ };
2313
+ content: {
2314
+ 'application/json': components['schemas']['ReceiptKeysResponse'];
2315
+ };
2316
+ };
2317
+ /** @description SERVICE_UNAVAILABLE */
2318
+ 503: {
2319
+ headers: {
2320
+ [name: string]: unknown;
2321
+ };
2322
+ content: {
2323
+ 'application/json': components['schemas']['Error'];
2324
+ };
2325
+ };
2326
+ };
2327
+ };
2328
+ openApi: {
2329
+ parameters: {
2330
+ query?: never;
2331
+ header?: never;
2332
+ path?: never;
2333
+ cookie?: never;
2334
+ };
2335
+ requestBody?: never;
2336
+ responses: {
2337
+ /** @description The OpenAPI 3.1 document. */
2338
+ 200: {
2339
+ headers: {
2340
+ [name: string]: unknown;
2341
+ };
2342
+ content: {
2343
+ 'application/json': unknown;
2344
+ };
2345
+ };
2346
+ };
2347
+ };
2348
+ healthLive: {
2349
+ parameters: {
2350
+ query?: never;
2351
+ header?: never;
2352
+ path?: never;
2353
+ cookie?: never;
2354
+ };
2355
+ requestBody?: never;
2356
+ responses: {
2357
+ /** @description The process is running. */
2358
+ 200: {
2359
+ headers: {
2360
+ [name: string]: unknown;
2361
+ };
2362
+ content: {
2363
+ 'application/json': components['schemas']['HealthOk'];
2364
+ };
2365
+ };
2366
+ };
2367
+ };
2368
+ healthReady: {
2369
+ parameters: {
2370
+ query?: never;
2371
+ header?: never;
2372
+ path?: never;
2373
+ cookie?: never;
2374
+ };
2375
+ requestBody?: never;
2376
+ responses: {
2377
+ /** @description Ready to serve. */
2378
+ 200: {
2379
+ headers: {
2380
+ [name: string]: unknown;
2381
+ };
2382
+ content: {
2383
+ 'application/json': components['schemas']['HealthOk'];
2384
+ };
2385
+ };
2386
+ /** @description Not ready: configuration, database or schema. No detail is disclosed. */
2387
+ 503: {
2388
+ headers: {
2389
+ [name: string]: unknown;
2390
+ };
2391
+ content: {
2392
+ 'application/json': components['schemas']['HealthUnavailable'];
2393
+ };
2394
+ };
2395
+ };
2396
+ };
2397
+ version: {
2398
+ parameters: {
2399
+ query?: never;
2400
+ header?: never;
2401
+ path?: never;
2402
+ cookie?: never;
2403
+ };
2404
+ requestBody?: never;
2405
+ responses: {
2406
+ /** @description The build identity of the running artifact. */
2407
+ 200: {
2408
+ headers: {
2409
+ [name: string]: unknown;
2410
+ };
2411
+ content: {
2412
+ 'application/json': components['schemas']['VersionResponse'];
2413
+ };
2414
+ };
2415
+ };
2416
+ };
2417
+ webhookResponseAccepted: {
2418
+ parameters: {
2419
+ query?: never;
2420
+ header?: never;
2421
+ path?: never;
2422
+ cookie?: never;
2423
+ };
2424
+ requestBody: {
2425
+ content: {
2426
+ 'application/json': components['schemas']['WebhookDelivery'];
2427
+ };
2428
+ };
2429
+ responses: {
2430
+ /** @description Accepted by the endpoint. */
2431
+ 200: {
2432
+ headers: {
2433
+ [name: string]: unknown;
2434
+ };
2435
+ content?: never;
2436
+ };
2437
+ };
2438
+ };
2439
+ webhookEndpointVerification: {
2440
+ parameters: {
2441
+ query?: never;
2442
+ header?: never;
2443
+ path?: never;
2444
+ cookie?: never;
2445
+ };
2446
+ requestBody: {
2447
+ content: {
2448
+ 'application/json': components['schemas']['WebhookVerification'];
2449
+ };
2450
+ };
2451
+ responses: {
2452
+ /** @description The echoed challenge. */
2453
+ 200: {
2454
+ headers: {
2455
+ [name: string]: unknown;
2456
+ };
2457
+ content?: never;
2458
+ };
2459
+ };
2460
+ };
2461
+ }
2462
+ //# sourceMappingURL=openapi.d.ts.map