@leaflow/sdk 0.0.0-dev.101.g01ce843

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 (48) hide show
  1. package/README.md +34 -0
  2. package/dist/account/v1/index.d.ts +54 -0
  3. package/dist/account/v1/index.js +5 -0
  4. package/dist/account/v1/schema.d.ts +1157 -0
  5. package/dist/account/v1/schema.js +5 -0
  6. package/dist/assistant/v1/index.d.ts +108 -0
  7. package/dist/assistant/v1/index.js +5 -0
  8. package/dist/assistant/v1/schema.d.ts +2840 -0
  9. package/dist/assistant/v1/schema.js +5 -0
  10. package/dist/billing/v1/index.d.ts +74 -0
  11. package/dist/billing/v1/index.js +5 -0
  12. package/dist/billing/v1/schema.d.ts +2445 -0
  13. package/dist/billing/v1/schema.js +5 -0
  14. package/dist/canopy/v1/index.d.ts +48 -0
  15. package/dist/canopy/v1/index.js +5 -0
  16. package/dist/canopy/v1/schema.d.ts +1100 -0
  17. package/dist/canopy/v1/schema.js +5 -0
  18. package/dist/compute/v1/index.d.ts +246 -0
  19. package/dist/compute/v1/index.js +5 -0
  20. package/dist/compute/v1/schema.d.ts +4924 -0
  21. package/dist/compute/v1/schema.js +5 -0
  22. package/dist/dns/v1/index.d.ts +42 -0
  23. package/dist/dns/v1/index.js +5 -0
  24. package/dist/dns/v1/schema.d.ts +883 -0
  25. package/dist/dns/v1/schema.js +5 -0
  26. package/dist/iam/v1/index.d.ts +84 -0
  27. package/dist/iam/v1/index.js +5 -0
  28. package/dist/iam/v1/schema.d.ts +1658 -0
  29. package/dist/iam/v1/schema.js +5 -0
  30. package/dist/index.d.ts +11 -0
  31. package/dist/index.js +6 -0
  32. package/dist/monitoring/v1/index.d.ts +176 -0
  33. package/dist/monitoring/v1/index.js +5 -0
  34. package/dist/monitoring/v1/schema.d.ts +4181 -0
  35. package/dist/monitoring/v1/schema.js +5 -0
  36. package/dist/notification/v1/index.d.ts +76 -0
  37. package/dist/notification/v1/index.js +5 -0
  38. package/dist/notification/v1/schema.d.ts +2038 -0
  39. package/dist/notification/v1/schema.js +5 -0
  40. package/dist/support/v1/index.d.ts +50 -0
  41. package/dist/support/v1/index.js +5 -0
  42. package/dist/support/v1/schema.d.ts +1078 -0
  43. package/dist/support/v1/schema.js +5 -0
  44. package/dist/tunnel/v1/index.d.ts +16 -0
  45. package/dist/tunnel/v1/index.js +5 -0
  46. package/dist/tunnel/v1/schema.d.ts +401 -0
  47. package/dist/tunnel/v1/schema.js +5 -0
  48. package/package.json +74 -0
@@ -0,0 +1,2840 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ "/api/v1/attachments": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ get?: never;
14
+ put?: never;
15
+ /**
16
+ * Upload a file
17
+ * @description The body is the file bytes themselves, not multipart, one file per request. The kind is determined from the content, not from Content-Type or from the name. Put the returned id in attachmentIds when sending a message.
18
+ *
19
+ * An upload that no message ever references is a draft, and drafts are collected — `draftExpiresAt` in the response says when this one goes. Sending a message with the id makes it permanent.
20
+ *
21
+ * The returned `kind` says how the assistant will see it. An `image` is read directly, and only by models that accept image input. A small `text` file is placed inline in the message. A large `text` file, and anything `binary`, arrives as a reference the assistant reads on demand — for a binary that usually means downloading it onto one of the project's cloud instances.
22
+ */
23
+ post: operations["upload-attachment"];
24
+ delete?: never;
25
+ options?: never;
26
+ head?: never;
27
+ patch?: never;
28
+ trace?: never;
29
+ };
30
+ "/api/v1/attachments/{attachment}": {
31
+ parameters: {
32
+ query?: never;
33
+ header?: never;
34
+ path?: never;
35
+ cookie?: never;
36
+ };
37
+ /**
38
+ * Download a file
39
+ * @description Returns the original bytes for an attachment id. The response carries long-lived cache headers because the content never changes. Returns 404 when the attachment does not exist or does not belong to the current user.
40
+ *
41
+ * Only an attachment whose `kind` is `image` comes back with its own image type and is usable as the address of an `<img>`. Everything else is served as `application/octet-stream` with `Content-Disposition: attachment`, deliberately: an uploaded file is arbitrary bytes under a name its uploader chose, and serving it back inline would run it on this origin.
42
+ */
43
+ get: operations["download-attachment"];
44
+ put?: never;
45
+ post?: never;
46
+ delete?: never;
47
+ options?: never;
48
+ head?: never;
49
+ patch?: never;
50
+ trace?: never;
51
+ };
52
+ "/api/v1/bindings": {
53
+ parameters: {
54
+ query?: never;
55
+ header?: never;
56
+ path?: never;
57
+ cookie?: never;
58
+ };
59
+ /**
60
+ * List bindings
61
+ * @description Filter by channelId to show, per channel, who is bound to it.
62
+ */
63
+ get: operations["list-bindings"];
64
+ put?: never;
65
+ post?: never;
66
+ delete?: never;
67
+ options?: never;
68
+ head?: never;
69
+ patch?: never;
70
+ trace?: never;
71
+ };
72
+ "/api/v1/bindings/{binding}": {
73
+ parameters: {
74
+ query?: never;
75
+ header?: never;
76
+ path?: never;
77
+ cookie?: never;
78
+ };
79
+ /** Get a binding */
80
+ get: operations["get-binding"];
81
+ put?: never;
82
+ post?: never;
83
+ /** Remove a binding */
84
+ delete: operations["delete-binding"];
85
+ options?: never;
86
+ head?: never;
87
+ patch?: never;
88
+ trace?: never;
89
+ };
90
+ "/api/v1/channels": {
91
+ parameters: {
92
+ query?: never;
93
+ header?: never;
94
+ path?: never;
95
+ cookie?: never;
96
+ };
97
+ /** List channels */
98
+ get: operations["list-channels"];
99
+ put?: never;
100
+ /**
101
+ * Create a channel
102
+ * @description Which side owns the webhook secret is decided by the platform; see secretSource on list-platforms. For a `generated` platform, do not send webhookSecret — the one we generate is returned exactly once in this response and cannot be retrieved again; miss it and the only way forward is rotating to a new one. For a `supplied` platform you must pass the secret from that platform's own console, and webhookSecret in the response is null.
103
+ */
104
+ post: operations["create-channel"];
105
+ delete?: never;
106
+ options?: never;
107
+ head?: never;
108
+ patch?: never;
109
+ trace?: never;
110
+ };
111
+ "/api/v1/channels/{channel}": {
112
+ parameters: {
113
+ query?: never;
114
+ header?: never;
115
+ path?: never;
116
+ cookie?: never;
117
+ };
118
+ /** Get a channel */
119
+ get: operations["get-channel"];
120
+ put?: never;
121
+ post?: never;
122
+ /**
123
+ * Delete a channel
124
+ * @description The channel stops accepting inbound messages and every binding on it stops working. This operation remains available while the project is suspended or being cleaned up.
125
+ */
126
+ delete: operations["delete-channel"];
127
+ options?: never;
128
+ head?: never;
129
+ /**
130
+ * Update a channel
131
+ * @description Only the fields present are changed. senderPolicy and allowFrom go together, and senderPolicy decides whether they are replaced. For platforms held open by a long-lived connection the change applies once that connection is rebuilt; for webhook platforms it applies at once.
132
+ */
133
+ patch: operations["update-channel"];
134
+ trace?: never;
135
+ };
136
+ "/api/v1/channels/{channel}/binding-codes": {
137
+ parameters: {
138
+ query?: never;
139
+ header?: never;
140
+ path?: never;
141
+ cookie?: never;
142
+ };
143
+ get?: never;
144
+ put?: never;
145
+ /**
146
+ * Issue a binding code
147
+ * @description Produces a single-use code to hand to the person being bound. They send that code to the assistant from their own account on that platform, which completes the binding. A binding can only be established this way, by the person themselves — a platform account cannot be named directly. Codes expire and have to be reissued.
148
+ */
149
+ post: operations["create-binding-code"];
150
+ delete?: never;
151
+ options?: never;
152
+ head?: never;
153
+ patch?: never;
154
+ trace?: never;
155
+ };
156
+ "/api/v1/channels/{channel}/rejections": {
157
+ parameters: {
158
+ query?: never;
159
+ header?: never;
160
+ path?: never;
161
+ cookie?: never;
162
+ };
163
+ /**
164
+ * List recently rejected inbound messages
165
+ * @description For diagnosing "I sent a message and the assistant never answered". Returns the inbound messages this channel rejected most recently, newest first, each with its reason. The most common reason is that the sender is not bound yet.
166
+ */
167
+ get: operations["list-channel-rejections"];
168
+ put?: never;
169
+ post?: never;
170
+ delete?: never;
171
+ options?: never;
172
+ head?: never;
173
+ patch?: never;
174
+ trace?: never;
175
+ };
176
+ "/api/v1/channels/{channel}/secret": {
177
+ parameters: {
178
+ query?: never;
179
+ header?: never;
180
+ path?: never;
181
+ cookie?: never;
182
+ };
183
+ get?: never;
184
+ put?: never;
185
+ /**
186
+ * Rotate the webhook secret
187
+ * @description Replaces the webhook secret. The old one stops working immediately and the channel drops back to awaiting confirmation from the platform. Which side owns the secret is decided by the platform; see secretSource on list-platforms. For a `generated` platform, send no body — the new secret is returned in this response only and cannot be retrieved again. For a `supplied` platform you must pass the new secret from that platform's own console.
188
+ */
189
+ post: operations["rotate-channel-secret"];
190
+ delete?: never;
191
+ options?: never;
192
+ head?: never;
193
+ patch?: never;
194
+ trace?: never;
195
+ };
196
+ "/api/v1/channels/{channel}/sender-check": {
197
+ parameters: {
198
+ query?: never;
199
+ header?: never;
200
+ path?: never;
201
+ cookie?: never;
202
+ };
203
+ /**
204
+ * Test whether a sender would be let through
205
+ * @description For checking a sender policy after changing it. Sends nothing and changes nothing: it runs exactly the same decision a real inbound message goes through, and says which rule produced the answer. The binding-code rule cannot be tested this way — whether something is a binding code depends on what the sender actually wrote.
206
+ */
207
+ get: operations["check-sender"];
208
+ put?: never;
209
+ post?: never;
210
+ delete?: never;
211
+ options?: never;
212
+ head?: never;
213
+ patch?: never;
214
+ trace?: never;
215
+ };
216
+ "/api/v1/channels/{channel}/weixin-logins": {
217
+ parameters: {
218
+ query?: never;
219
+ header?: never;
220
+ path?: never;
221
+ cookie?: never;
222
+ };
223
+ get?: never;
224
+ put?: never;
225
+ /**
226
+ * Begin a WeChat QR login
227
+ * @description A personal WeChat channel can only send and receive once its owner has signed in by scanning a QR code. This returns that code; poll `GET /v1/weixin-logins/{login}` for progress, and when the status asks for a verification code, submit it with `POST /v1/weixin-logins/{login}/verify-code`.
228
+ */
229
+ post: operations["begin-weixin-login"];
230
+ delete?: never;
231
+ options?: never;
232
+ head?: never;
233
+ patch?: never;
234
+ trace?: never;
235
+ };
236
+ "/api/v1/platforms": {
237
+ parameters: {
238
+ query?: never;
239
+ header?: never;
240
+ path?: never;
241
+ cookie?: never;
242
+ };
243
+ /**
244
+ * List platforms that can be connected
245
+ * @description The instant messaging platforms that can currently be connected, along with the flow and the credential fields each one needs. The create-channel form is driven entirely by this response: setupMethod decides between a credential form and a QR flow, credentialFields is what to ask for, and secretSource decides whether there is a webhook secret field at all.
246
+ */
247
+ get: operations["list-platforms"];
248
+ put?: never;
249
+ post?: never;
250
+ delete?: never;
251
+ options?: never;
252
+ head?: never;
253
+ patch?: never;
254
+ trace?: never;
255
+ };
256
+ "/api/v1/weixin-logins/{login}": {
257
+ parameters: {
258
+ query?: never;
259
+ header?: never;
260
+ path?: never;
261
+ cookie?: never;
262
+ };
263
+ /**
264
+ * Get the state of a QR login
265
+ * @description Poll this until the status is success or failure. When the status asks for a verification code, submit it with the verification-code operation.
266
+ */
267
+ get: operations["get-weixin-login"];
268
+ put?: never;
269
+ post?: never;
270
+ delete?: never;
271
+ options?: never;
272
+ head?: never;
273
+ patch?: never;
274
+ trace?: never;
275
+ };
276
+ "/api/v1/weixin-logins/{login}/verify-code": {
277
+ parameters: {
278
+ query?: never;
279
+ header?: never;
280
+ path?: never;
281
+ cookie?: never;
282
+ };
283
+ get?: never;
284
+ put?: never;
285
+ /**
286
+ * Submit a login verification code
287
+ * @description For when WeChat asks for an SMS or device code after the scan. The person who started the login gets that code on their own phone.
288
+ */
289
+ post: operations["submit-weixin-verify-code"];
290
+ delete?: never;
291
+ options?: never;
292
+ head?: never;
293
+ patch?: never;
294
+ trace?: never;
295
+ };
296
+ "/api/v1/dynamic-calls/{call}/result": {
297
+ parameters: {
298
+ query?: never;
299
+ header?: never;
300
+ path?: never;
301
+ cookie?: never;
302
+ };
303
+ get?: never;
304
+ put?: never;
305
+ /**
306
+ * Report what an action produced
307
+ * @description The assistant asks the client to run an action by adding a tool call to the conversation
308
+ * with the namespace `dynamic`; the client acts when that entry turns in_progress and reports
309
+ * back here.
310
+ *
311
+ * The first result is the one that counts. A later one is refused rather than replacing it.
312
+ */
313
+ post: operations["submit-dynamic-call-result"];
314
+ delete?: never;
315
+ options?: never;
316
+ head?: never;
317
+ patch?: never;
318
+ trace?: never;
319
+ };
320
+ "/api/v1/folders": {
321
+ parameters: {
322
+ query?: never;
323
+ header?: never;
324
+ path?: never;
325
+ cookie?: never;
326
+ };
327
+ /**
328
+ * List folders
329
+ * @description The current account's folders in this project, oldest first. That order is fixed and does not react to what happens inside a folder: a folder is a place on the screen, and a place that moves whenever something is put into it is not one anybody can aim at. Not paginated — there is a cap on how many there can be, and all of them come back at once.
330
+ */
331
+ get: operations["list-folders"];
332
+ put?: never;
333
+ /**
334
+ * Create a folder
335
+ * @description A folder groups conversations in the sidebar and does nothing else. The assistant is never told which folder a conversation is in, and a conversation behaves exactly the same inside one as outside: no shared instructions, no shared files, no shared memory.
336
+ *
337
+ * Names are unique within an account's folders in this project, because the only way to aim at a folder is to read its name.
338
+ */
339
+ post: operations["create-folder"];
340
+ delete?: never;
341
+ options?: never;
342
+ head?: never;
343
+ patch?: never;
344
+ trace?: never;
345
+ };
346
+ "/api/v1/folders/{folder}": {
347
+ parameters: {
348
+ query?: never;
349
+ header?: never;
350
+ path?: never;
351
+ cookie?: never;
352
+ };
353
+ /**
354
+ * Fetch one folder
355
+ * @description The list returns every folder at once, so this is for the case the list does not cover: a page opened straight at a folder, holding nothing but the id from the address bar. Its conversations are a separate request — `GET /api/v1/threads?folder=<id>`.
356
+ */
357
+ get: operations["get-folder"];
358
+ put?: never;
359
+ post?: never;
360
+ /**
361
+ * Delete a folder
362
+ * @description The conversations inside are **not** deleted. They leave the folder and go back to the ungrouped list, where they can be filed again. Emptying a shelf is not the same as throwing out what was on it, and deleting a conversation is a different request.
363
+ *
364
+ * Idempotent: deleting a folder that is already gone succeeds and changes nothing.
365
+ */
366
+ delete: operations["delete-folder"];
367
+ options?: never;
368
+ head?: never;
369
+ /**
370
+ * Rename a folder
371
+ * @description The conversations in it are untouched, and none of them move in the list — a folder's name is not part of what any conversation is about.
372
+ */
373
+ patch: operations["update-folder"];
374
+ trace?: never;
375
+ };
376
+ "/api/v1/memories": {
377
+ parameters: {
378
+ query?: never;
379
+ header?: never;
380
+ path?: never;
381
+ cookie?: never;
382
+ };
383
+ /**
384
+ * List what the assistant remembers
385
+ * @description Facts the assistant has written down for the current account in this project. They appear at the start of every later conversation. Members of the same project each have their own, and this returns only the current account's. Not paginated: there is a cap on how many there can be, and all of them come back at once.
386
+ */
387
+ get: operations["list-memories"];
388
+ put?: never;
389
+ post?: never;
390
+ delete?: never;
391
+ options?: never;
392
+ head?: never;
393
+ patch?: never;
394
+ trace?: never;
395
+ };
396
+ "/api/v1/memories/{memory}": {
397
+ parameters: {
398
+ query?: never;
399
+ header?: never;
400
+ path?: never;
401
+ cookie?: never;
402
+ };
403
+ get?: never;
404
+ put?: never;
405
+ post?: never;
406
+ /**
407
+ * Delete one memory
408
+ * @description The assistant stops remembering this. It takes effect at once, so the next conversation will not carry it. The assistant may well learn the same thing again.
409
+ */
410
+ delete: operations["delete-memory"];
411
+ options?: never;
412
+ head?: never;
413
+ patch?: never;
414
+ trace?: never;
415
+ };
416
+ "/api/v1/skills": {
417
+ parameters: {
418
+ query?: never;
419
+ header?: never;
420
+ path?: never;
421
+ cookie?: never;
422
+ };
423
+ /**
424
+ * List the skills this project can use
425
+ * @description Everything the assistant can reach in this project, including the ones that are turned off —
426
+ * an entry that disappeared once it was switched off could not be switched back on.
427
+ *
428
+ * `origin` says whether a skill can be edited here. Skills belonging to the project are
429
+ * visible to everyone in it, whoever wrote them.
430
+ */
431
+ get: operations["list-skills"];
432
+ put?: never;
433
+ /**
434
+ * Write a skill for this project
435
+ * @description Creates it, or replaces the project's skill of that name. The whole package goes in each
436
+ * time: files left out of a write are removed, so the stored skill is what was sent and not
437
+ * what accumulated.
438
+ *
439
+ * A project skill takes precedence over a built-in one of the same name for this project only.
440
+ * The built-in is untouched and reappears if the project's is deleted.
441
+ */
442
+ post: operations["put-skill"];
443
+ delete?: never;
444
+ options?: never;
445
+ head?: never;
446
+ patch?: never;
447
+ trace?: never;
448
+ };
449
+ "/api/v1/skills/{skill}": {
450
+ parameters: {
451
+ query?: never;
452
+ header?: never;
453
+ path?: never;
454
+ cookie?: never;
455
+ };
456
+ /**
457
+ * Read one skill, with its files
458
+ * @description Works for built-in skills too; they simply cannot be written.
459
+ */
460
+ get: operations["get-skill"];
461
+ put?: never;
462
+ post?: never;
463
+ /**
464
+ * Delete this project's skill
465
+ * @description A built-in skill of the same name, if there was one, becomes visible again.
466
+ */
467
+ delete: operations["delete-skill"];
468
+ options?: never;
469
+ head?: never;
470
+ /**
471
+ * Turn a skill on or off
472
+ * @description Separate from writing it, because this is the frequent one: a skill that is off costs
473
+ * nothing and stays where it is.
474
+ *
475
+ * Only skills belonging to the project can be switched. To keep a built-in one out of the
476
+ * way, write a project skill of the same name and turn that off.
477
+ */
478
+ patch: operations["set-skill-enabled"];
479
+ trace?: never;
480
+ };
481
+ "/api/v1/threads": {
482
+ parameters: {
483
+ query?: never;
484
+ header?: never;
485
+ path?: never;
486
+ cookie?: never;
487
+ };
488
+ /**
489
+ * List conversations
490
+ * @description Ordered by most recent activity, limited to the current account's conversations in the current project. `archived` selects between two sets rather than widening one: archived conversations are absent from the default list, and turning the flag on shows those instead.
491
+ */
492
+ get: operations["list-threads"];
493
+ put?: never;
494
+ /** Create a conversation */
495
+ post: operations["create-thread"];
496
+ delete?: never;
497
+ options?: never;
498
+ head?: never;
499
+ patch?: never;
500
+ trace?: never;
501
+ };
502
+ "/api/v1/threads/{thread}": {
503
+ parameters: {
504
+ query?: never;
505
+ header?: never;
506
+ path?: never;
507
+ cookie?: never;
508
+ };
509
+ /**
510
+ * Fetch the conversation document
511
+ * @description The complete current state of a conversation, for the first render. Its `stream` gives the address and admission ticket for live output, and what that stream pushes are incremental edits to this same document, so the same rendering logic applies.
512
+ */
513
+ get: operations["get-thread"];
514
+ put?: never;
515
+ post?: never;
516
+ /**
517
+ * Delete a conversation
518
+ * @description Removes the conversation from every list and makes it unreachable by id. The assistant can no longer find it either — neither by searching past conversations nor by reading one back.
519
+ *
520
+ * Deleting is not the same as archiving, and the two are not degrees of the same thing. An archived conversation is still there and still readable, it just takes no new input; a deleted one is gone from view. Archiving can be undone; this cannot.
521
+ *
522
+ * What survives is the record itself, because a conversation with this assistant is an account of what was done to real infrastructure — which machine was changed, which disk was removed. That record is kept even though nobody can reach it here.
523
+ *
524
+ * Fails while a turn is running: stop it first. Deleting an already deleted conversation succeeds and changes nothing.
525
+ */
526
+ delete: operations["delete-thread"];
527
+ options?: never;
528
+ head?: never;
529
+ /**
530
+ * Update conversation settings
531
+ * @description Changes the title, the approval mode, and whether the conversation is archived. A change to the approval mode takes effect from the next turn; a turn already running keeps the settings it started with.
532
+ *
533
+ * Archiving makes a conversation read-only: it stays in the list under "archived", stays readable, and the assistant can still find it when it searches past conversations — it just takes no new input. Unarchive it to continue. Archiving fails while a turn is running; stop it first.
534
+ */
535
+ patch: operations["update-thread"];
536
+ trace?: never;
537
+ };
538
+ "/api/v1/threads/{thread}/approvals/{batch}": {
539
+ parameters: {
540
+ query?: never;
541
+ header?: never;
542
+ path?: never;
543
+ cookie?: never;
544
+ };
545
+ get?: never;
546
+ put?: never;
547
+ /**
548
+ * Approve or decline a batch of tool calls
549
+ * @description The batch id comes from the conversation document's `wait`. This is idempotent: submitting the same batch again neither changes a decision already in effect nor reports an error. Returns 404 when the batch does not belong to that conversation.
550
+ */
551
+ post: operations["decide-approval"];
552
+ delete?: never;
553
+ options?: never;
554
+ head?: never;
555
+ patch?: never;
556
+ trace?: never;
557
+ };
558
+ "/api/v1/threads/{thread}/earlier": {
559
+ parameters: {
560
+ query?: never;
561
+ header?: never;
562
+ path?: never;
563
+ cookie?: never;
564
+ };
565
+ /**
566
+ * Fetch earlier parts of a conversation
567
+ * @description The first render only carries the latest stretch of a conversation; anything above it is fetched here, one stretch at a time. Pass the document's earlier.before as `before`; the `earlier` in the response is the cursor for the stretch above that, and null means the top has been reached. The entries have the same shape and the same order (oldest first) as `items` in the document, so they can be prepended as they are.
568
+ */
569
+ get: operations["list-earlier-items"];
570
+ put?: never;
571
+ post?: never;
572
+ delete?: never;
573
+ options?: never;
574
+ head?: never;
575
+ patch?: never;
576
+ trace?: never;
577
+ };
578
+ "/api/v1/threads/{thread}/interrupt": {
579
+ parameters: {
580
+ query?: never;
581
+ header?: never;
582
+ path?: never;
583
+ cookie?: never;
584
+ };
585
+ get?: never;
586
+ put?: never;
587
+ /**
588
+ * Interrupt a running turn
589
+ * @description Calling this on a conversation with no running turn also returns 204 rather than an error — the user pressing stop races with the turn finishing on its own, and both outcomes are the same. This operation remains available while the project is suspended or being cleaned up.
590
+ */
591
+ post: operations["interrupt-thread"];
592
+ delete?: never;
593
+ options?: never;
594
+ head?: never;
595
+ patch?: never;
596
+ trace?: never;
597
+ };
598
+ "/api/v1/threads/{thread}/messages": {
599
+ parameters: {
600
+ query?: never;
601
+ header?: never;
602
+ path?: never;
603
+ cookie?: never;
604
+ };
605
+ get?: never;
606
+ put?: never;
607
+ /**
608
+ * Send a message and start a turn
609
+ * @description Returns a turnId immediately without waiting for execution — a turn can run for tens of minutes. Progress arrives on the live stream the conversation document's `stream` points at, not in this response. Sending while the assistant is still working is allowed: the message is put in line and `queued` comes back true, to be read at the next step of the turn already running — so the editor should stay open rather than blocking on a busy conversation.
610
+ */
611
+ post: operations["send-message"];
612
+ delete?: never;
613
+ options?: never;
614
+ head?: never;
615
+ patch?: never;
616
+ trace?: never;
617
+ };
618
+ "/api/v1/threads/{thread}/questions/{item}": {
619
+ parameters: {
620
+ query?: never;
621
+ header?: never;
622
+ path?: never;
623
+ cookie?: never;
624
+ };
625
+ get?: never;
626
+ put?: never;
627
+ /**
628
+ * Answer the assistant's questions
629
+ * @description The question id comes from the conversation document's `wait`. An already-answered question also returns 204 — another tab may have submitted first, or the auto-answer window may have expired, and in both cases the turn has already continued with an answer.
630
+ */
631
+ post: operations["answer-question"];
632
+ delete?: never;
633
+ options?: never;
634
+ head?: never;
635
+ patch?: never;
636
+ trace?: never;
637
+ };
638
+ "/api/v1/threads/{thread}/read": {
639
+ parameters: {
640
+ query?: never;
641
+ header?: never;
642
+ path?: never;
643
+ cookie?: never;
644
+ };
645
+ get?: never;
646
+ put?: never;
647
+ /** Mark a conversation as read */
648
+ post: operations["mark-thread-read"];
649
+ delete?: never;
650
+ options?: never;
651
+ head?: never;
652
+ patch?: never;
653
+ trace?: never;
654
+ };
655
+ "/api/v1/threads/{thread}/revert": {
656
+ parameters: {
657
+ query?: never;
658
+ header?: never;
659
+ path?: never;
660
+ cookie?: never;
661
+ };
662
+ get?: never;
663
+ put?: never;
664
+ /**
665
+ * Revert from a given point
666
+ * @description Reverts the entry at `ordinal` and everything after it. Reverted entries stay in the transcript marked `reverted`, and ordinals are not renumbered. Returns how many were actually reverted.
667
+ */
668
+ post: operations["revert-thread"];
669
+ delete?: never;
670
+ options?: never;
671
+ head?: never;
672
+ patch?: never;
673
+ trace?: never;
674
+ };
675
+ }
676
+ export type webhooks = Record<string, never>;
677
+ export interface components {
678
+ schemas: {
679
+ Error: {
680
+ code?: string;
681
+ message: string;
682
+ meta?: {
683
+ [key: string]: unknown;
684
+ };
685
+ /** Format: int64 */
686
+ status: number;
687
+ };
688
+ UploadedResource: {
689
+ /**
690
+ * Format: int64
691
+ * @description Size of what was stored. For an image that has been resized, this is the resized size, not what was uploaded.
692
+ */
693
+ byteSize: number;
694
+ /**
695
+ * Format: date-time
696
+ * @description When this upload gets cleared if no message ever references it. Sending a message with this id makes it permanent and this stops applying — a file that belongs to a conversation is kept as long as the conversation is.
697
+ *
698
+ * It is here so the editor can say so before it happens. An attachment chip that quietly stops working a week later reads as a bug, and the person who hits it has no way to tell that what they are seeing is a draft being collected.
699
+ */
700
+ draftExpiresAt: string;
701
+ filename: string;
702
+ /**
703
+ * Format: int64
704
+ * @description Null unless kind is image.
705
+ */
706
+ height: number | null;
707
+ id: string;
708
+ /**
709
+ * @description How the assistant will see this file.
710
+ *
711
+ * - `image` — read directly, and only by models that accept image input
712
+ * - `text` — placed inline in the message when small enough, otherwise read on demand
713
+ * - `binary` — never read directly; the assistant downloads it onto a cloud instance to work with it
714
+ * @enum {string}
715
+ */
716
+ kind: "image" | "text" | "binary";
717
+ /**
718
+ * Format: int64
719
+ * @description Null unless kind is image.
720
+ */
721
+ width: number | null;
722
+ };
723
+ BindingResource: {
724
+ /** Format: uuid */
725
+ channelId: string;
726
+ /** @enum {string} */
727
+ connState: "logged_out" | "qr_pending" | "online" | "expired";
728
+ /** Format: date-time */
729
+ createdAt: string;
730
+ /** Format: uuid */
731
+ id: string;
732
+ peerName: string;
733
+ platform: string;
734
+ /** @enum {string} */
735
+ status: "pending" | "active" | "revoked";
736
+ /** Format: date-time */
737
+ verifiedAt: string | null;
738
+ };
739
+ LengthAwarePageBindingResource: {
740
+ /** @description The entries on this page */
741
+ items: components["schemas"]["BindingResource"][];
742
+ /**
743
+ * Format: int64
744
+ * @description The page size, echoing what was requested
745
+ */
746
+ limit: number;
747
+ /**
748
+ * Format: int64
749
+ * @description How many were skipped, echoing what was requested
750
+ */
751
+ offset: number;
752
+ /**
753
+ * Format: int64
754
+ * @description How many match in total, not just on this page
755
+ */
756
+ total: number;
757
+ };
758
+ ChannelResource: {
759
+ allowFrom: string[] | null;
760
+ /**
761
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
762
+ * @enum {string}
763
+ */
764
+ connState: "logged_out" | "qr_pending" | "online" | "expired";
765
+ /** Format: date-time */
766
+ createdAt: string;
767
+ /** Format: uuid */
768
+ id: string;
769
+ name: string;
770
+ platform: string;
771
+ /**
772
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
773
+ * @enum {string}
774
+ */
775
+ runtimeState: "stopped" | "running";
776
+ /** @enum {string} */
777
+ senderPolicy: "bound_only" | "open";
778
+ /** @enum {string} */
779
+ status: "active" | "suspended" | "disabled";
780
+ /** Format: date-time */
781
+ updatedAt: string;
782
+ /** @description The webhook path, for gateway configuration and for diagnosis */
783
+ webhookPath: string;
784
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
785
+ webhookUrl: string | null;
786
+ };
787
+ LengthAwarePageChannelResource: {
788
+ /** @description The entries on this page */
789
+ items: components["schemas"]["ChannelResource"][];
790
+ /**
791
+ * Format: int64
792
+ * @description The page size, echoing what was requested
793
+ */
794
+ limit: number;
795
+ /**
796
+ * Format: int64
797
+ * @description How many were skipped, echoing what was requested
798
+ */
799
+ offset: number;
800
+ /**
801
+ * Format: int64
802
+ * @description How many match in total, not just on this page
803
+ */
804
+ total: number;
805
+ };
806
+ CreateChannelRequestBody: {
807
+ allowFrom?: string[] | null;
808
+ /** @description Credentials for that platform. Write-only: they cannot be read back after creation */
809
+ credentials?: {
810
+ [key: string]: string;
811
+ };
812
+ name: string;
813
+ platform: string;
814
+ /** @enum {string} */
815
+ senderPolicy?: "bound_only" | "open";
816
+ /** @description Required for platforms that generate the secret themselves (secretSource=supplied). Must be absent for `generated` ones, where the secret we make is returned once in webhookSecret on this response */
817
+ webhookSecret?: string;
818
+ };
819
+ ChannelWithSecretResponseBody: {
820
+ allowFrom: string[] | null;
821
+ /**
822
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
823
+ * @enum {string}
824
+ */
825
+ connState: "logged_out" | "qr_pending" | "online" | "expired";
826
+ /** Format: date-time */
827
+ createdAt: string;
828
+ /** Format: uuid */
829
+ id: string;
830
+ name: string;
831
+ platform: string;
832
+ /**
833
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
834
+ * @enum {string}
835
+ */
836
+ runtimeState: "stopped" | "running";
837
+ /** @enum {string} */
838
+ senderPolicy: "bound_only" | "open";
839
+ /** @enum {string} */
840
+ status: "active" | "suspended" | "disabled";
841
+ /** Format: date-time */
842
+ updatedAt: string;
843
+ /** @description The webhook path, for gateway configuration and for diagnosis */
844
+ webhookPath: string;
845
+ /** @description The webhook secret we generated, to paste into that platform's console. **It cannot be retrieved again** — the only way forward is rotating to a new one. Null when the platform generates the secret (secretSource=supplied) or does not use webhooks at all */
846
+ webhookSecret: string | null;
847
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
848
+ webhookUrl: string | null;
849
+ };
850
+ UpdateChannelRequestBody: {
851
+ /** @description The allow list. Only applied when senderPolicy is sent as well */
852
+ allowFrom?: string[] | null;
853
+ /** @description Replaced wholesale rather than merged key by key. Absent means unchanged */
854
+ credentials?: {
855
+ [key: string]: string;
856
+ };
857
+ enabled?: boolean;
858
+ name?: string;
859
+ /**
860
+ * @description Only when this is sent is allowFrom replaced along with it
861
+ * @enum {string}
862
+ */
863
+ senderPolicy?: "bound_only" | "open";
864
+ };
865
+ BindingCodeResponseBody: {
866
+ code: string;
867
+ /** Format: date-time */
868
+ expiresAt: string;
869
+ };
870
+ PartResource: {
871
+ /** @description For `file` parts. Points at one of this entry's `attachments`. */
872
+ attachmentId?: string | null;
873
+ /**
874
+ * @description Addresses this part in the live stream — text arrives as `append` frames pointing at
875
+ * `/items/{item}/parts/{id}/text`.
876
+ *
877
+ * Not an array index. It looks like one today because parts are only ever appended, and a
878
+ * client that treats it as one keeps working right up until that stops being true.
879
+ */
880
+ id: string;
881
+ /** @description For `text` parts. Grows as the answer is written. */
882
+ text?: string | null;
883
+ /** @enum {string} */
884
+ type: "text" | "file";
885
+ };
886
+ RejectionResource: {
887
+ /** Format: date-time */
888
+ at: string;
889
+ peerId: string;
890
+ peerName: string;
891
+ peerUsername: string;
892
+ platform: string;
893
+ /** Format: int64 */
894
+ textLength: number;
895
+ verdict: string;
896
+ };
897
+ RejectionListResponseBody: {
898
+ rejections: components["schemas"]["RejectionResource"][] | null;
899
+ };
900
+ RotateSecretRequestBody: {
901
+ /** @description Required for platforms that generate the secret themselves (secretSource=supplied). Must be absent for `generated` ones */
902
+ webhookSecret?: string;
903
+ };
904
+ WebhookSecretResponseBody: {
905
+ webhookSecret: string;
906
+ };
907
+ SenderCheckResource: {
908
+ allowFrom: string[] | null;
909
+ allowed: boolean;
910
+ bindingId: string | null;
911
+ senderPolicy: string;
912
+ /** @enum {string} */
913
+ verdict: "ALLOWED_BY_BINDING" | "ALLOWED_BY_ALLOW_FROM" | "ALLOWED_BY_POLICY" | "REJECTED_NOT_ALLOWED";
914
+ };
915
+ LoginResource: {
916
+ /**
917
+ * Format: date-time
918
+ * @description When this login flow expires. Past that, stop polling and start a new one
919
+ */
920
+ expiresAt: string;
921
+ /** Format: uuid */
922
+ id: string;
923
+ /** @description The text to encode and render as a QR code by the client — not an image address and not a data URI. When a code expires this flow issues another and keeps waiting, so each poll may return a new string */
924
+ qrcodeData: string;
925
+ /** @description Why it failed. Present only when status is error or expired */
926
+ reason: string;
927
+ /** @enum {string} */
928
+ status: "wait" | "scanned" | "confirmed" | "expired" | "error" | "need_verify_code";
929
+ };
930
+ CredentialFieldResource: {
931
+ help: string;
932
+ key: string;
933
+ label: string;
934
+ required: boolean;
935
+ secret: boolean;
936
+ };
937
+ PlatformResource: {
938
+ credentialFields: components["schemas"]["CredentialFieldResource"][] | null;
939
+ name: string;
940
+ resident: boolean;
941
+ /** @enum {string} */
942
+ secretSource: "generated" | "supplied" | "none";
943
+ /** @enum {string} */
944
+ setupChallenge: "none" | "webhook" | "scan";
945
+ /** @enum {string} */
946
+ setupMethod: "credentials" | "scan";
947
+ /** @description The webhook path template; {channel} is replaced with the channel id */
948
+ webhookPath: string;
949
+ /** @description The full webhook address template. Null when the deployment declares no public entry point */
950
+ webhookUrlTemplate: string | null;
951
+ };
952
+ PlatformListResponseBody: {
953
+ platforms: components["schemas"]["PlatformResource"][] | null;
954
+ };
955
+ VerifyCodeRequestBody: {
956
+ code: string;
957
+ };
958
+ SkillResource: {
959
+ /**
960
+ * @description True when the assistant wrote this skill during a conversation rather than a person
961
+ * writing it here.
962
+ *
963
+ * Which conversation is deliberately not returned: skills are shared across the project
964
+ * while conversations belong to one person, so naming one would tell everybody in the
965
+ * project that a particular colleague had it.
966
+ */
967
+ authoredByAssistant: boolean;
968
+ /** @description Why the assistant would open this skill. It sits in every request, so it is the one field worth writing carefully. */
969
+ description: string;
970
+ enabled: boolean;
971
+ /** @description Path to contents, `SKILL.md` among them. Only returned by `get-skill`; the list leaves it out. */
972
+ files?: {
973
+ [key: string]: string;
974
+ } | null;
975
+ name: string;
976
+ /**
977
+ * @description `builtin` — provided by the platform and read-only here.
978
+ * `project` — written for this project and editable by anyone in it.
979
+ * @enum {string}
980
+ */
981
+ origin: "builtin" | "project";
982
+ shortDescription: string | null;
983
+ /**
984
+ * Format: date-time
985
+ * @description Null for built-in skills, which have no edit history here.
986
+ */
987
+ updatedAt: string | null;
988
+ };
989
+ SkillListResponseBody: {
990
+ skills: components["schemas"]["SkillResource"][];
991
+ };
992
+ SkillRequestBody: {
993
+ /** @description Why the assistant would open this skill. It sits in every request; write it as the answer to "when do I need this", not "what does it contain". */
994
+ description: string;
995
+ /** @default true */
996
+ enabled?: boolean;
997
+ /**
998
+ * @description Path to contents. `SKILL.md` is required; anything else it references goes alongside it.
999
+ *
1000
+ * Paths are relative to the skill and cannot leave it. At most 32 files, 256 KiB each and
1001
+ * 1 MiB in total.
1002
+ */
1003
+ files: {
1004
+ [key: string]: string;
1005
+ };
1006
+ /** @description Also how the assistant refers to it, so renaming is deleting and writing again. */
1007
+ name: string;
1008
+ shortDescription?: string;
1009
+ };
1010
+ SkillEnabledRequestBody: {
1011
+ enabled: boolean;
1012
+ };
1013
+ ThreadSummaryResource: {
1014
+ /** @enum {string} */
1015
+ approvalMode: "guardian" | "manual" | "yolo";
1016
+ archived: boolean;
1017
+ /** Format: date-time */
1018
+ createdAt: string;
1019
+ /** @description The folder this conversation is filed under, or null when it is in none */
1020
+ folderId: string | null;
1021
+ id: string;
1022
+ model: string;
1023
+ title: string | null;
1024
+ unread: boolean;
1025
+ /** Format: date-time */
1026
+ updatedAt: string;
1027
+ };
1028
+ ThreadListResponseBody: {
1029
+ /** @description Pass this back as `cursor` for the next page. Null means this was the last one — it is only set when there is genuinely more, so an empty final page never happens. */
1030
+ nextCursor: string | null;
1031
+ threads: components["schemas"]["ThreadSummaryResource"][] | null;
1032
+ };
1033
+ CreateThreadRequestBody: {
1034
+ /**
1035
+ * @description Absent uses the platform's default approval mode
1036
+ * @enum {string}
1037
+ */
1038
+ approvalMode?: "guardian" | "manual" | "yolo";
1039
+ };
1040
+ ContextResource: {
1041
+ /** Format: int64 */
1042
+ compactAt: number | null;
1043
+ /**
1044
+ * @description What kinds of input the model behind this conversation accepts, as modality names: text, image.
1045
+ *
1046
+ * This governs images and nothing else. Text and binary attachments reach every model: a small text file is placed inline, a large one is read on demand, and a binary is downloaded onto a cloud instance — none of which asks the model to see a picture. So this decides whether pasting a screenshot does anything, not whether the attach control exists. Hiding file upload on a text-only model takes away something that would have worked.
1047
+ *
1048
+ * An empty list is not a claim that the model reads nothing: it means this deployment has not stated the modalities, or the conversation names a model that has since been retired. Treat empty as unknown and keep the control, because hiding one for a reason nobody can see is worse than a refusal that says why.
1049
+ */
1050
+ inputModalities: string[];
1051
+ model: string;
1052
+ /** Format: int64 */
1053
+ used: number | null;
1054
+ /** Format: int64 */
1055
+ warnAt: number;
1056
+ /** Format: int64 */
1057
+ window: number | null;
1058
+ };
1059
+ EarlierResource: {
1060
+ /** Format: int64 */
1061
+ before: number;
1062
+ foldedAbove: boolean;
1063
+ };
1064
+ AttachmentResource: {
1065
+ /** Format: int64 */
1066
+ byteSize: number;
1067
+ filename: string;
1068
+ /**
1069
+ * Format: int64
1070
+ * @description Null unless kind is image. Width and height are here so a client can hold the space before the image itself has loaded.
1071
+ */
1072
+ height: number | null;
1073
+ id: string;
1074
+ /**
1075
+ * @description What this attachment is. A client renders an image in place and everything else as a file to download.
1076
+ * @enum {string}
1077
+ */
1078
+ kind: "image" | "text" | "binary";
1079
+ /**
1080
+ * Format: int64
1081
+ * @description Null unless kind is image.
1082
+ */
1083
+ width: number | null;
1084
+ };
1085
+ ItemResource: {
1086
+ /** @enum {string|null} */
1087
+ approval?: "approved" | "declined" | "auto_approved" | "unreviewed" | null;
1088
+ approvalReason?: string | null;
1089
+ arguments?: string;
1090
+ attachments?: components["schemas"]["AttachmentResource"][] | null;
1091
+ /**
1092
+ * @description The context blocks the client attached to this message.
1093
+ *
1094
+ * **Not part of what the operator wrote** — `text` is. Render the message from `text` and
1095
+ * leave these out of the bubble; they are here so a client that did not send them, or one
1096
+ * that reloaded, can still read what the assistant was given.
1097
+ *
1098
+ * The actions declared alongside them are not returned: they are re-declared as they
1099
+ * change and would make every fetch of the conversation carry them again.
1100
+ */
1101
+ clientContext?: components["schemas"]["ClientContextPart"][] | null;
1102
+ /** Format: date-time */
1103
+ createdAt: string;
1104
+ detail?: string | null;
1105
+ presentation?: components["schemas"]["PresentationResource"] | null;
1106
+ /** Format: int64 */
1107
+ durationMs?: number | null;
1108
+ id: string;
1109
+ /** @description The model that produced this entry. Null for messages the user sent */
1110
+ model: string | null;
1111
+ namespace?: string | null;
1112
+ /** Format: int64 */
1113
+ ordinal: number;
1114
+ reverted: boolean;
1115
+ /** @enum {string} */
1116
+ status: "pending" | "in_progress" | "completed" | "failed" | "declined" | "interrupted";
1117
+ target?: string | null;
1118
+ /**
1119
+ * @description The content of this entry, in the order it was written. A message that is only text is a
1120
+ * single part, which is most of them.
1121
+ *
1122
+ * An attachment belongs where it was written, so render these in order rather than putting
1123
+ * them all at the end.
1124
+ */
1125
+ parts?: components["schemas"]["PartResource"][] | null;
1126
+ tool?: string | null;
1127
+ /**
1128
+ * @description Determines which fields this entry carries
1129
+ * @enum {string}
1130
+ */
1131
+ type: "user_message" | "agent_message" | "reasoning" | "dynamic_tool_call" | "context_compaction" | "token_budget_reminder" | "turn_failure";
1132
+ };
1133
+ /**
1134
+ * @description Structured detail produced by a tool call, in addition to the single-line `detail`. Null
1135
+ * when the call produced none.
1136
+ *
1137
+ * `kind` determines which of the remaining fields is populated.
1138
+ */
1139
+ PresentationResource: {
1140
+ fileDiff?: components["schemas"]["FileDiffResource"] | null;
1141
+ /**
1142
+ * @description Determines which of the remaining fields is populated
1143
+ * @enum {string}
1144
+ */
1145
+ kind: "file_diff";
1146
+ };
1147
+ /**
1148
+ * @description The change a tool call applied to a single file.
1149
+ *
1150
+ * Populated once the call has completed successfully. It is absent while the call is pending
1151
+ * or awaiting approval, as the file's prior contents are read during execution. To preview an
1152
+ * edit awaiting approval, derive it from the call's `old_string` and `new_string` arguments.
1153
+ */
1154
+ FileDiffResource: {
1155
+ /**
1156
+ * Format: int64
1157
+ * @description Lines added. Complete even when `unified` is null
1158
+ */
1159
+ added: number;
1160
+ /** @description Absolute path of the file on the instance */
1161
+ path: string;
1162
+ /**
1163
+ * Format: int64
1164
+ * @description Lines removed. Complete even when `unified` is null
1165
+ */
1166
+ removed: number;
1167
+ /**
1168
+ * @description What the call did to the file
1169
+ * @enum {string}
1170
+ */
1171
+ status: "added" | "modified" | "deleted";
1172
+ /**
1173
+ * @description The change as a unified diff with three lines of context. A file created by the call is
1174
+ * diffed against `/dev/null`.
1175
+ *
1176
+ * Null when the change exceeds the service's size limit. The diff is omitted in full
1177
+ * rather than truncated; `added` and `removed` remain complete.
1178
+ */
1179
+ unified?: string | null;
1180
+ };
1181
+ StreamResource: {
1182
+ path: string;
1183
+ ticket: string;
1184
+ };
1185
+ TurnResource: {
1186
+ /** @enum {string} */
1187
+ approvalMode: "guardian" | "manual" | "yolo";
1188
+ };
1189
+ Choice: {
1190
+ description: string;
1191
+ label: string;
1192
+ };
1193
+ Question: {
1194
+ choices: components["schemas"]["Choice"][] | null;
1195
+ header: string;
1196
+ id: string;
1197
+ question: string;
1198
+ };
1199
+ WaitResource: {
1200
+ /** Format: int64 */
1201
+ autoResolutionMs?: number;
1202
+ batchId?: string;
1203
+ itemId?: string;
1204
+ itemIds?: string[] | null;
1205
+ /** @enum {string} */
1206
+ kind: "tool_approval" | "user_input";
1207
+ questions?: components["schemas"]["Question"][] | null;
1208
+ turnId: string;
1209
+ };
1210
+ DocumentResource: {
1211
+ context: components["schemas"]["ContextResource"];
1212
+ cursor: string | null;
1213
+ earlier: components["schemas"]["EarlierResource"] | null;
1214
+ items: components["schemas"]["ItemResource"][] | null;
1215
+ status: string;
1216
+ stream: components["schemas"]["StreamResource"] | null;
1217
+ turn: components["schemas"]["TurnResource"] | null;
1218
+ /** @description The assistant's checklist for the work in this conversation, in the order it intends to do it. Empty when it has not written one — short tasks do not get a list. It is rewritten in full each time, so what is here is the current state. */
1219
+ todos?: components["schemas"]["TodoResource"][];
1220
+ turnId: string | null;
1221
+ wait: components["schemas"]["WaitResource"] | null;
1222
+ };
1223
+ UpdateThreadRequestBody: {
1224
+ /** @enum {string} */
1225
+ approvalMode?: "guardian" | "manual" | "yolo";
1226
+ archived?: boolean;
1227
+ /**
1228
+ * @description File this conversation into a folder, or `null` to take it out of the one it is in. Omit the field to leave it where it is.
1229
+ *
1230
+ * Filing does not move the conversation in the list. The order answers "which conversation has something new in it", and putting one away is not that.
1231
+ */
1232
+ folderId?: string | null;
1233
+ /**
1234
+ * @description Rename this conversation.
1235
+ *
1236
+ * A conversation names itself: the first message gives it a working title, and the assistant replaces that with a better one once it has answered. Setting this stops both — a name somebody chose is never overwritten by one that was generated.
1237
+ *
1238
+ * Renaming does not move the conversation in the list. The order answers "which conversation has something new in it", and editing a title is not that.
1239
+ */
1240
+ title?: string;
1241
+ };
1242
+ DecideRequestBody: {
1243
+ approved: boolean;
1244
+ reason?: string;
1245
+ };
1246
+ EarlierResponseBody: {
1247
+ earlier: components["schemas"]["EarlierResource"];
1248
+ items: components["schemas"]["ItemResource"][] | null;
1249
+ };
1250
+ SendMessageRequestBody: {
1251
+ client?: components["schemas"]["ClientContextRequest"];
1252
+ /**
1253
+ * @description The message, in the order it was written. A message with nothing but text is a single
1254
+ * text part; that is the ordinary case and nothing else is required.
1255
+ */
1256
+ parts: components["schemas"]["MessagePart"][];
1257
+ };
1258
+ MemoryListResponseBody: {
1259
+ items: components["schemas"]["MemoryResource"][];
1260
+ };
1261
+ MemoryResource: {
1262
+ /** @description The fact itself */
1263
+ body: string;
1264
+ /** Format: date-time */
1265
+ createdAt: string;
1266
+ id: string;
1267
+ /** @description The name the assistant gave this fact; it overwrites or deletes its own entries by that name */
1268
+ name: string;
1269
+ /** @description Which conversation the assistant learned it in. That conversation may since have been deleted */
1270
+ sourceThreadId?: string;
1271
+ /** Format: date-time */
1272
+ updatedAt: string;
1273
+ };
1274
+ /**
1275
+ * @description One piece of a message. `type` says which of the fields below carries it:
1276
+ *
1277
+ * - `text` — the words, in `text`
1278
+ * - `file` — an attachment uploaded earlier, by id in `attachmentId`
1279
+ * - `data-<something>` — context from the client, in `data`. The name after `data-` is yours;
1280
+ * it is shown to the assistant so it can tell one kind of block from another.
1281
+ *
1282
+ * Order matters: an attachment belongs where it was written, not at the end.
1283
+ */
1284
+ MessagePart: {
1285
+ /** @description For `file` parts. The attachment must have been uploaded and not yet bound to another message. */
1286
+ attachmentId?: string | null;
1287
+ /** @description For `data-*` parts. Any object; its keys reach the assistant as they are. */
1288
+ data?: {
1289
+ [key: string]: unknown;
1290
+ } | null;
1291
+ /** @description For `text` parts. */
1292
+ text?: string | null;
1293
+ type: string;
1294
+ };
1295
+ /**
1296
+ * @description Which client this is and what it can do, so the assistant can ask it to do those things
1297
+ * while it answers. What the operator is looking at travels as `data-*` parts on the message.
1298
+ *
1299
+ * Send `actions` only when they differ from the last message on this conversation. Sending the
1300
+ * block without `actions` keeps whatever was declared before.
1301
+ */
1302
+ ClientContextRequest: {
1303
+ /**
1304
+ * @description The actions on offer right now.
1305
+ *
1306
+ * Omit it when nothing changed since the last message. Send `[]` to say there is nothing
1307
+ * on offer — those are different: a client that moves off the page it was attached to has
1308
+ * to be able to say so, or the assistant keeps calling actions that no longer make sense.
1309
+ */
1310
+ actions?: components["schemas"]["ClientActionRequest"][] | null;
1311
+ /** @description Identifies this client while it stays open. Any stable string; one per tab or process. */
1312
+ clientId: string;
1313
+ /** @description How the client calls itself, for example "Leaflow console (web)". */
1314
+ label?: string;
1315
+ };
1316
+ /** @description A `data-*` part as it was sent. */
1317
+ ClientContextPart: {
1318
+ data: {
1319
+ [key: string]: unknown;
1320
+ };
1321
+ type: string;
1322
+ };
1323
+ /** @description The shape of a tool in the OpenAI Chat Completions API, plus `readOnly` and `timeoutMs`. */
1324
+ ClientActionRequest: {
1325
+ function: components["schemas"]["ClientFunctionRequest"];
1326
+ /** @description True when the action changes nothing outside the client. Anything else goes through this conversation's approval before it runs. */
1327
+ readOnly: boolean;
1328
+ /**
1329
+ * Format: int64
1330
+ * @description How long the assistant should wait for this action. Omit for the default; longer values are capped.
1331
+ */
1332
+ timeoutMs?: number;
1333
+ /**
1334
+ * @description Only functions are supported.
1335
+ * @default function
1336
+ * @enum {string}
1337
+ */
1338
+ type?: "function";
1339
+ };
1340
+ /** @description The function object from the OpenAI tools format. */
1341
+ ClientFunctionRequest: {
1342
+ /** @description What the action does, written for the model. An action without one can only be guessed at from its name. The 1024 ceiling is OpenAI's own limit on `tools[].function.description`, not a number chosen here: over it the upstream call fails with `string_above_max_length`, and refusing at submission is the clearer of the two places to refuse. It was 500, which ran out at about six enumerated entries — an action that must list what it accepts had nowhere to put the list. */
1343
+ description: string;
1344
+ /** @description The MCP and Anthropic spelling of `parameters`. Give one or the other, not both. */
1345
+ inputSchema?: {
1346
+ [key: string]: unknown;
1347
+ } | null;
1348
+ name: string;
1349
+ /** @description JSON Schema for the arguments. Omit for an action that takes none. */
1350
+ parameters?: {
1351
+ [key: string]: unknown;
1352
+ } | null;
1353
+ };
1354
+ DynamicCallResultRequestBody: {
1355
+ /** @description The same value sent with the message. A result from a different client is refused. */
1356
+ clientId: string;
1357
+ /** @description Why it failed, when `ok` is false. It reaches the assistant, so write it for a reader who cannot see the screen. */
1358
+ error?: string;
1359
+ /** @description Pass back when there is more to read. The assistant will call again with it. */
1360
+ nextCursor?: string;
1361
+ ok: boolean;
1362
+ /** @description What the action produced. At most 64 KiB; use `nextCursor` for anything larger. */
1363
+ output?: string;
1364
+ };
1365
+ TodoResource: {
1366
+ /** @description The same step phrased as happening now — "Installing nginx". Show this one while the item is in progress. */
1367
+ activeForm: string;
1368
+ /** @description The step as an instruction — "Install nginx". */
1369
+ content: string;
1370
+ /**
1371
+ * @description Where this step stands. At most one item is in_progress at any time.
1372
+ * @enum {string}
1373
+ */
1374
+ status: "pending" | "in_progress" | "completed";
1375
+ };
1376
+ TurnIDResponseBody: {
1377
+ /** @description True when the assistant was already busy and this message was put in line instead of starting a turn. It is read at the next step of the turn already running, so there is nothing further to do — and turnId is empty in this case. */
1378
+ queued: boolean;
1379
+ /**
1380
+ * Format: int64
1381
+ * @description How many messages were already waiting ahead of this one. Only meaningful when queued is true.
1382
+ */
1383
+ queuedAhead?: number;
1384
+ /** @description The turn this message started. Empty when the message was queued instead. */
1385
+ turnId: string;
1386
+ };
1387
+ AnswerRequestBody: {
1388
+ /** @description A map from question id to the answer chosen */
1389
+ answers: {
1390
+ [key: string]: string;
1391
+ };
1392
+ };
1393
+ RevertRequestBody: {
1394
+ /**
1395
+ * Format: int64
1396
+ * @description The starting ordinal; that entry and everything after it is reverted
1397
+ */
1398
+ ordinal: number;
1399
+ };
1400
+ RevertedCountResponseBody: {
1401
+ /** Format: int64 */
1402
+ reverted: number;
1403
+ };
1404
+ FolderResource: {
1405
+ /** Format: date-time */
1406
+ createdAt: string;
1407
+ id: string;
1408
+ name: string;
1409
+ /**
1410
+ * Format: int64
1411
+ * @description How many conversations are filed here and would show up in the default list. Archived and deleted ones are not counted, so this is exactly what `GET /api/v1/threads?folder=<id>` returns.
1412
+ */
1413
+ threadCount: number;
1414
+ /** Format: date-time */
1415
+ updatedAt: string;
1416
+ };
1417
+ FolderListResponseBody: {
1418
+ folders: components["schemas"]["FolderResource"][] | null;
1419
+ };
1420
+ CreateFolderRequestBody: {
1421
+ name: string;
1422
+ };
1423
+ UpdateFolderRequestBody: {
1424
+ name: string;
1425
+ };
1426
+ };
1427
+ responses: never;
1428
+ parameters: never;
1429
+ requestBodies: never;
1430
+ headers: never;
1431
+ pathItems: never;
1432
+ }
1433
+ export type $defs = Record<string, never>;
1434
+ export interface operations {
1435
+ "upload-attachment": {
1436
+ parameters: {
1437
+ query?: {
1438
+ /** @description The name to show and to give the assistant. Images do not need one; anything else does, because the name is most of what says what the file is. Falls back to a generated name. */
1439
+ filename?: string;
1440
+ };
1441
+ header?: never;
1442
+ path?: never;
1443
+ cookie?: never;
1444
+ };
1445
+ requestBody: {
1446
+ content: {
1447
+ "*/*": string;
1448
+ };
1449
+ };
1450
+ responses: {
1451
+ /** @description Created */
1452
+ 201: {
1453
+ headers: {
1454
+ [name: string]: unknown;
1455
+ };
1456
+ content: {
1457
+ "application/json": components["schemas"]["UploadedResource"];
1458
+ };
1459
+ };
1460
+ /** @description Error */
1461
+ default: {
1462
+ headers: {
1463
+ [name: string]: unknown;
1464
+ };
1465
+ content: {
1466
+ "application/json": components["schemas"]["Error"];
1467
+ };
1468
+ };
1469
+ };
1470
+ };
1471
+ "download-attachment": {
1472
+ parameters: {
1473
+ query?: never;
1474
+ header?: never;
1475
+ path: {
1476
+ attachment: string;
1477
+ };
1478
+ cookie?: never;
1479
+ };
1480
+ requestBody?: never;
1481
+ responses: {
1482
+ /** @description OK */
1483
+ 200: {
1484
+ headers: {
1485
+ /** @description Private and long-lived: these bytes are addressed by an id that is never reused, so they never change; and they belong to one person, so they must not enter any shared cache. */
1486
+ "Cache-Control"?: string;
1487
+ /** @description Present on everything that is not an image, carrying the original filename. Absent on images, which are meant to be rendered in place. */
1488
+ "Content-Disposition"?: string;
1489
+ [name: string]: unknown;
1490
+ };
1491
+ content: {
1492
+ "*/*": string;
1493
+ };
1494
+ };
1495
+ /** @description Error */
1496
+ default: {
1497
+ headers: {
1498
+ [name: string]: unknown;
1499
+ };
1500
+ content: {
1501
+ "application/json": components["schemas"]["Error"];
1502
+ };
1503
+ };
1504
+ };
1505
+ };
1506
+ "list-bindings": {
1507
+ parameters: {
1508
+ query?: {
1509
+ /** @description How many entries this page returns at most */
1510
+ limit?: number;
1511
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
1512
+ offset?: number;
1513
+ platform?: string;
1514
+ channelId?: string;
1515
+ /** @description Return only bindings that are active */
1516
+ active?: boolean;
1517
+ };
1518
+ header?: never;
1519
+ path?: never;
1520
+ cookie?: never;
1521
+ };
1522
+ requestBody?: never;
1523
+ responses: {
1524
+ /** @description OK */
1525
+ 200: {
1526
+ headers: {
1527
+ [name: string]: unknown;
1528
+ };
1529
+ content: {
1530
+ "application/json": components["schemas"]["LengthAwarePageBindingResource"];
1531
+ };
1532
+ };
1533
+ /** @description Error */
1534
+ default: {
1535
+ headers: {
1536
+ [name: string]: unknown;
1537
+ };
1538
+ content: {
1539
+ "application/json": components["schemas"]["Error"];
1540
+ };
1541
+ };
1542
+ };
1543
+ };
1544
+ "get-binding": {
1545
+ parameters: {
1546
+ query?: never;
1547
+ header?: never;
1548
+ path: {
1549
+ binding: string;
1550
+ };
1551
+ cookie?: never;
1552
+ };
1553
+ requestBody?: never;
1554
+ responses: {
1555
+ /** @description OK */
1556
+ 200: {
1557
+ headers: {
1558
+ [name: string]: unknown;
1559
+ };
1560
+ content: {
1561
+ "application/json": components["schemas"]["BindingResource"];
1562
+ };
1563
+ };
1564
+ /** @description Error */
1565
+ default: {
1566
+ headers: {
1567
+ [name: string]: unknown;
1568
+ };
1569
+ content: {
1570
+ "application/json": components["schemas"]["Error"];
1571
+ };
1572
+ };
1573
+ };
1574
+ };
1575
+ "delete-binding": {
1576
+ parameters: {
1577
+ query?: never;
1578
+ header?: never;
1579
+ path: {
1580
+ binding: string;
1581
+ };
1582
+ cookie?: never;
1583
+ };
1584
+ requestBody?: never;
1585
+ responses: {
1586
+ /** @description No Content */
1587
+ 204: {
1588
+ headers: {
1589
+ [name: string]: unknown;
1590
+ };
1591
+ content?: never;
1592
+ };
1593
+ /** @description Error */
1594
+ default: {
1595
+ headers: {
1596
+ [name: string]: unknown;
1597
+ };
1598
+ content: {
1599
+ "application/json": components["schemas"]["Error"];
1600
+ };
1601
+ };
1602
+ };
1603
+ };
1604
+ "list-channels": {
1605
+ parameters: {
1606
+ query?: {
1607
+ /** @description How many entries this page returns at most */
1608
+ limit?: number;
1609
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
1610
+ offset?: number;
1611
+ platform?: string;
1612
+ /** @description Return only channels that are enabled */
1613
+ active?: boolean;
1614
+ };
1615
+ header?: never;
1616
+ path?: never;
1617
+ cookie?: never;
1618
+ };
1619
+ requestBody?: never;
1620
+ responses: {
1621
+ /** @description OK */
1622
+ 200: {
1623
+ headers: {
1624
+ [name: string]: unknown;
1625
+ };
1626
+ content: {
1627
+ "application/json": components["schemas"]["LengthAwarePageChannelResource"];
1628
+ };
1629
+ };
1630
+ /** @description Error */
1631
+ default: {
1632
+ headers: {
1633
+ [name: string]: unknown;
1634
+ };
1635
+ content: {
1636
+ "application/json": components["schemas"]["Error"];
1637
+ };
1638
+ };
1639
+ };
1640
+ };
1641
+ "create-channel": {
1642
+ parameters: {
1643
+ query?: never;
1644
+ header?: never;
1645
+ path?: never;
1646
+ cookie?: never;
1647
+ };
1648
+ requestBody: {
1649
+ content: {
1650
+ "application/json": components["schemas"]["CreateChannelRequestBody"];
1651
+ };
1652
+ };
1653
+ responses: {
1654
+ /** @description Created */
1655
+ 201: {
1656
+ headers: {
1657
+ [name: string]: unknown;
1658
+ };
1659
+ content: {
1660
+ "application/json": components["schemas"]["ChannelWithSecretResponseBody"];
1661
+ };
1662
+ };
1663
+ /** @description Error */
1664
+ default: {
1665
+ headers: {
1666
+ [name: string]: unknown;
1667
+ };
1668
+ content: {
1669
+ "application/json": components["schemas"]["Error"];
1670
+ };
1671
+ };
1672
+ };
1673
+ };
1674
+ "get-channel": {
1675
+ parameters: {
1676
+ query?: never;
1677
+ header?: never;
1678
+ path: {
1679
+ channel: string;
1680
+ };
1681
+ cookie?: never;
1682
+ };
1683
+ requestBody?: never;
1684
+ responses: {
1685
+ /** @description OK */
1686
+ 200: {
1687
+ headers: {
1688
+ [name: string]: unknown;
1689
+ };
1690
+ content: {
1691
+ "application/json": components["schemas"]["ChannelResource"];
1692
+ };
1693
+ };
1694
+ /** @description Error */
1695
+ default: {
1696
+ headers: {
1697
+ [name: string]: unknown;
1698
+ };
1699
+ content: {
1700
+ "application/json": components["schemas"]["Error"];
1701
+ };
1702
+ };
1703
+ };
1704
+ };
1705
+ "delete-channel": {
1706
+ parameters: {
1707
+ query?: never;
1708
+ header?: never;
1709
+ path: {
1710
+ channel: string;
1711
+ };
1712
+ cookie?: never;
1713
+ };
1714
+ requestBody?: never;
1715
+ responses: {
1716
+ /** @description No Content */
1717
+ 204: {
1718
+ headers: {
1719
+ [name: string]: unknown;
1720
+ };
1721
+ content?: never;
1722
+ };
1723
+ /** @description Error */
1724
+ default: {
1725
+ headers: {
1726
+ [name: string]: unknown;
1727
+ };
1728
+ content: {
1729
+ "application/json": components["schemas"]["Error"];
1730
+ };
1731
+ };
1732
+ };
1733
+ };
1734
+ "update-channel": {
1735
+ parameters: {
1736
+ query?: never;
1737
+ header?: never;
1738
+ path: {
1739
+ channel: string;
1740
+ };
1741
+ cookie?: never;
1742
+ };
1743
+ requestBody: {
1744
+ content: {
1745
+ "application/json": components["schemas"]["UpdateChannelRequestBody"];
1746
+ };
1747
+ };
1748
+ responses: {
1749
+ /** @description OK */
1750
+ 200: {
1751
+ headers: {
1752
+ [name: string]: unknown;
1753
+ };
1754
+ content: {
1755
+ "application/json": components["schemas"]["ChannelResource"];
1756
+ };
1757
+ };
1758
+ /** @description Error */
1759
+ default: {
1760
+ headers: {
1761
+ [name: string]: unknown;
1762
+ };
1763
+ content: {
1764
+ "application/json": components["schemas"]["Error"];
1765
+ };
1766
+ };
1767
+ };
1768
+ };
1769
+ "create-binding-code": {
1770
+ parameters: {
1771
+ query?: never;
1772
+ header?: never;
1773
+ path: {
1774
+ channel: string;
1775
+ };
1776
+ cookie?: never;
1777
+ };
1778
+ requestBody?: never;
1779
+ responses: {
1780
+ /** @description Created */
1781
+ 201: {
1782
+ headers: {
1783
+ [name: string]: unknown;
1784
+ };
1785
+ content: {
1786
+ "application/json": components["schemas"]["BindingCodeResponseBody"];
1787
+ };
1788
+ };
1789
+ /** @description Error */
1790
+ default: {
1791
+ headers: {
1792
+ [name: string]: unknown;
1793
+ };
1794
+ content: {
1795
+ "application/json": components["schemas"]["Error"];
1796
+ };
1797
+ };
1798
+ };
1799
+ };
1800
+ "list-channel-rejections": {
1801
+ parameters: {
1802
+ query?: {
1803
+ limit?: number;
1804
+ };
1805
+ header?: never;
1806
+ path: {
1807
+ channel: string;
1808
+ };
1809
+ cookie?: never;
1810
+ };
1811
+ requestBody?: never;
1812
+ responses: {
1813
+ /** @description OK */
1814
+ 200: {
1815
+ headers: {
1816
+ [name: string]: unknown;
1817
+ };
1818
+ content: {
1819
+ "application/json": components["schemas"]["RejectionListResponseBody"];
1820
+ };
1821
+ };
1822
+ /** @description Error */
1823
+ default: {
1824
+ headers: {
1825
+ [name: string]: unknown;
1826
+ };
1827
+ content: {
1828
+ "application/json": components["schemas"]["Error"];
1829
+ };
1830
+ };
1831
+ };
1832
+ };
1833
+ "rotate-channel-secret": {
1834
+ parameters: {
1835
+ query?: never;
1836
+ header?: never;
1837
+ path: {
1838
+ channel: string;
1839
+ };
1840
+ cookie?: never;
1841
+ };
1842
+ requestBody?: {
1843
+ content: {
1844
+ "application/json": components["schemas"]["RotateSecretRequestBody"];
1845
+ };
1846
+ };
1847
+ responses: {
1848
+ /** @description OK */
1849
+ 200: {
1850
+ headers: {
1851
+ [name: string]: unknown;
1852
+ };
1853
+ content: {
1854
+ "application/json": components["schemas"]["WebhookSecretResponseBody"];
1855
+ };
1856
+ };
1857
+ /** @description Error */
1858
+ default: {
1859
+ headers: {
1860
+ [name: string]: unknown;
1861
+ };
1862
+ content: {
1863
+ "application/json": components["schemas"]["Error"];
1864
+ };
1865
+ };
1866
+ };
1867
+ };
1868
+ "check-sender": {
1869
+ parameters: {
1870
+ query: {
1871
+ /** @description That person's id on the platform, the same value that appears in bindings and rejections */
1872
+ peerId: string;
1873
+ /** @description Only platforms with usernames, such as Telegram, can supply this. Without the @. Leave it empty to mean there is no username */
1874
+ username?: string;
1875
+ };
1876
+ header?: never;
1877
+ path: {
1878
+ channel: string;
1879
+ };
1880
+ cookie?: never;
1881
+ };
1882
+ requestBody?: never;
1883
+ responses: {
1884
+ /** @description OK */
1885
+ 200: {
1886
+ headers: {
1887
+ [name: string]: unknown;
1888
+ };
1889
+ content: {
1890
+ "application/json": components["schemas"]["SenderCheckResource"];
1891
+ };
1892
+ };
1893
+ /** @description Error */
1894
+ default: {
1895
+ headers: {
1896
+ [name: string]: unknown;
1897
+ };
1898
+ content: {
1899
+ "application/json": components["schemas"]["Error"];
1900
+ };
1901
+ };
1902
+ };
1903
+ };
1904
+ "begin-weixin-login": {
1905
+ parameters: {
1906
+ query?: never;
1907
+ header?: never;
1908
+ path: {
1909
+ channel: string;
1910
+ };
1911
+ cookie?: never;
1912
+ };
1913
+ requestBody?: never;
1914
+ responses: {
1915
+ /** @description Created */
1916
+ 201: {
1917
+ headers: {
1918
+ [name: string]: unknown;
1919
+ };
1920
+ content: {
1921
+ "application/json": components["schemas"]["LoginResource"];
1922
+ };
1923
+ };
1924
+ /** @description Error */
1925
+ default: {
1926
+ headers: {
1927
+ [name: string]: unknown;
1928
+ };
1929
+ content: {
1930
+ "application/json": components["schemas"]["Error"];
1931
+ };
1932
+ };
1933
+ };
1934
+ };
1935
+ "list-platforms": {
1936
+ parameters: {
1937
+ query?: never;
1938
+ header?: never;
1939
+ path?: never;
1940
+ cookie?: never;
1941
+ };
1942
+ requestBody?: never;
1943
+ responses: {
1944
+ /** @description OK */
1945
+ 200: {
1946
+ headers: {
1947
+ [name: string]: unknown;
1948
+ };
1949
+ content: {
1950
+ "application/json": components["schemas"]["PlatformListResponseBody"];
1951
+ };
1952
+ };
1953
+ /** @description Error */
1954
+ default: {
1955
+ headers: {
1956
+ [name: string]: unknown;
1957
+ };
1958
+ content: {
1959
+ "application/json": components["schemas"]["Error"];
1960
+ };
1961
+ };
1962
+ };
1963
+ };
1964
+ "get-weixin-login": {
1965
+ parameters: {
1966
+ query?: never;
1967
+ header?: never;
1968
+ path: {
1969
+ login: string;
1970
+ };
1971
+ cookie?: never;
1972
+ };
1973
+ requestBody?: never;
1974
+ responses: {
1975
+ /** @description OK */
1976
+ 200: {
1977
+ headers: {
1978
+ [name: string]: unknown;
1979
+ };
1980
+ content: {
1981
+ "application/json": components["schemas"]["LoginResource"];
1982
+ };
1983
+ };
1984
+ /** @description Error */
1985
+ default: {
1986
+ headers: {
1987
+ [name: string]: unknown;
1988
+ };
1989
+ content: {
1990
+ "application/json": components["schemas"]["Error"];
1991
+ };
1992
+ };
1993
+ };
1994
+ };
1995
+ "submit-weixin-verify-code": {
1996
+ parameters: {
1997
+ query?: never;
1998
+ header?: never;
1999
+ path: {
2000
+ login: string;
2001
+ };
2002
+ cookie?: never;
2003
+ };
2004
+ requestBody: {
2005
+ content: {
2006
+ "application/json": components["schemas"]["VerifyCodeRequestBody"];
2007
+ };
2008
+ };
2009
+ responses: {
2010
+ /** @description OK */
2011
+ 200: {
2012
+ headers: {
2013
+ [name: string]: unknown;
2014
+ };
2015
+ content: {
2016
+ "application/json": components["schemas"]["LoginResource"];
2017
+ };
2018
+ };
2019
+ /** @description Error */
2020
+ default: {
2021
+ headers: {
2022
+ [name: string]: unknown;
2023
+ };
2024
+ content: {
2025
+ "application/json": components["schemas"]["Error"];
2026
+ };
2027
+ };
2028
+ };
2029
+ };
2030
+ "submit-dynamic-call-result": {
2031
+ parameters: {
2032
+ query?: never;
2033
+ header?: never;
2034
+ path: {
2035
+ /** @description The id of the tool call entry in the conversation. */
2036
+ call: string;
2037
+ };
2038
+ cookie?: never;
2039
+ };
2040
+ requestBody: {
2041
+ content: {
2042
+ "application/json": components["schemas"]["DynamicCallResultRequestBody"];
2043
+ };
2044
+ };
2045
+ responses: {
2046
+ /** @description No Content */
2047
+ 204: {
2048
+ headers: {
2049
+ [name: string]: unknown;
2050
+ };
2051
+ content?: never;
2052
+ };
2053
+ /** @description Error */
2054
+ default: {
2055
+ headers: {
2056
+ [name: string]: unknown;
2057
+ };
2058
+ content: {
2059
+ "application/json": components["schemas"]["Error"];
2060
+ };
2061
+ };
2062
+ };
2063
+ };
2064
+ "list-folders": {
2065
+ parameters: {
2066
+ query?: never;
2067
+ header?: never;
2068
+ path?: never;
2069
+ cookie?: never;
2070
+ };
2071
+ requestBody?: never;
2072
+ responses: {
2073
+ /** @description OK */
2074
+ 200: {
2075
+ headers: {
2076
+ [name: string]: unknown;
2077
+ };
2078
+ content: {
2079
+ "application/json": components["schemas"]["FolderListResponseBody"];
2080
+ };
2081
+ };
2082
+ /** @description Error */
2083
+ default: {
2084
+ headers: {
2085
+ [name: string]: unknown;
2086
+ };
2087
+ content: {
2088
+ "application/json": components["schemas"]["Error"];
2089
+ };
2090
+ };
2091
+ };
2092
+ };
2093
+ "create-folder": {
2094
+ parameters: {
2095
+ query?: never;
2096
+ header?: never;
2097
+ path?: never;
2098
+ cookie?: never;
2099
+ };
2100
+ requestBody: {
2101
+ content: {
2102
+ "application/json": components["schemas"]["CreateFolderRequestBody"];
2103
+ };
2104
+ };
2105
+ responses: {
2106
+ /** @description Created */
2107
+ 201: {
2108
+ headers: {
2109
+ [name: string]: unknown;
2110
+ };
2111
+ content: {
2112
+ "application/json": components["schemas"]["FolderResource"];
2113
+ };
2114
+ };
2115
+ /** @description Error */
2116
+ default: {
2117
+ headers: {
2118
+ [name: string]: unknown;
2119
+ };
2120
+ content: {
2121
+ "application/json": components["schemas"]["Error"];
2122
+ };
2123
+ };
2124
+ };
2125
+ };
2126
+ "get-folder": {
2127
+ parameters: {
2128
+ query?: never;
2129
+ header?: never;
2130
+ path: {
2131
+ folder: string;
2132
+ };
2133
+ cookie?: never;
2134
+ };
2135
+ requestBody?: never;
2136
+ responses: {
2137
+ /** @description OK */
2138
+ 200: {
2139
+ headers: {
2140
+ [name: string]: unknown;
2141
+ };
2142
+ content: {
2143
+ "application/json": components["schemas"]["FolderResource"];
2144
+ };
2145
+ };
2146
+ /** @description Error */
2147
+ default: {
2148
+ headers: {
2149
+ [name: string]: unknown;
2150
+ };
2151
+ content: {
2152
+ "application/json": components["schemas"]["Error"];
2153
+ };
2154
+ };
2155
+ };
2156
+ };
2157
+ "delete-folder": {
2158
+ parameters: {
2159
+ query?: never;
2160
+ header?: never;
2161
+ path: {
2162
+ folder: string;
2163
+ };
2164
+ cookie?: never;
2165
+ };
2166
+ requestBody?: never;
2167
+ responses: {
2168
+ /** @description No Content */
2169
+ 204: {
2170
+ headers: {
2171
+ [name: string]: unknown;
2172
+ };
2173
+ content?: never;
2174
+ };
2175
+ /** @description Error */
2176
+ default: {
2177
+ headers: {
2178
+ [name: string]: unknown;
2179
+ };
2180
+ content: {
2181
+ "application/json": components["schemas"]["Error"];
2182
+ };
2183
+ };
2184
+ };
2185
+ };
2186
+ "update-folder": {
2187
+ parameters: {
2188
+ query?: never;
2189
+ header?: never;
2190
+ path: {
2191
+ folder: string;
2192
+ };
2193
+ cookie?: never;
2194
+ };
2195
+ requestBody: {
2196
+ content: {
2197
+ "application/json": components["schemas"]["UpdateFolderRequestBody"];
2198
+ };
2199
+ };
2200
+ responses: {
2201
+ /** @description OK */
2202
+ 200: {
2203
+ headers: {
2204
+ [name: string]: unknown;
2205
+ };
2206
+ content: {
2207
+ "application/json": components["schemas"]["FolderResource"];
2208
+ };
2209
+ };
2210
+ /** @description Error */
2211
+ default: {
2212
+ headers: {
2213
+ [name: string]: unknown;
2214
+ };
2215
+ content: {
2216
+ "application/json": components["schemas"]["Error"];
2217
+ };
2218
+ };
2219
+ };
2220
+ };
2221
+ "list-memories": {
2222
+ parameters: {
2223
+ query?: never;
2224
+ header?: never;
2225
+ path?: never;
2226
+ cookie?: never;
2227
+ };
2228
+ requestBody?: never;
2229
+ responses: {
2230
+ /** @description OK */
2231
+ 200: {
2232
+ headers: {
2233
+ [name: string]: unknown;
2234
+ };
2235
+ content: {
2236
+ "application/json": components["schemas"]["MemoryListResponseBody"];
2237
+ };
2238
+ };
2239
+ /** @description Error */
2240
+ default: {
2241
+ headers: {
2242
+ [name: string]: unknown;
2243
+ };
2244
+ content: {
2245
+ "application/json": components["schemas"]["Error"];
2246
+ };
2247
+ };
2248
+ };
2249
+ };
2250
+ "delete-memory": {
2251
+ parameters: {
2252
+ query?: never;
2253
+ header?: never;
2254
+ path: {
2255
+ memory: string;
2256
+ };
2257
+ cookie?: never;
2258
+ };
2259
+ requestBody?: never;
2260
+ responses: {
2261
+ /** @description No Content */
2262
+ 204: {
2263
+ headers: {
2264
+ [name: string]: unknown;
2265
+ };
2266
+ content?: never;
2267
+ };
2268
+ /** @description Error */
2269
+ default: {
2270
+ headers: {
2271
+ [name: string]: unknown;
2272
+ };
2273
+ content: {
2274
+ "application/json": components["schemas"]["Error"];
2275
+ };
2276
+ };
2277
+ };
2278
+ };
2279
+ "list-skills": {
2280
+ parameters: {
2281
+ query?: never;
2282
+ header?: never;
2283
+ path?: never;
2284
+ cookie?: never;
2285
+ };
2286
+ requestBody?: never;
2287
+ responses: {
2288
+ /** @description OK */
2289
+ 200: {
2290
+ headers: {
2291
+ [name: string]: unknown;
2292
+ };
2293
+ content: {
2294
+ "application/json": components["schemas"]["SkillListResponseBody"];
2295
+ };
2296
+ };
2297
+ /** @description Error */
2298
+ default: {
2299
+ headers: {
2300
+ [name: string]: unknown;
2301
+ };
2302
+ content: {
2303
+ "application/json": components["schemas"]["Error"];
2304
+ };
2305
+ };
2306
+ };
2307
+ };
2308
+ "put-skill": {
2309
+ parameters: {
2310
+ query?: never;
2311
+ header?: never;
2312
+ path?: never;
2313
+ cookie?: never;
2314
+ };
2315
+ requestBody: {
2316
+ content: {
2317
+ "application/json": components["schemas"]["SkillRequestBody"];
2318
+ };
2319
+ };
2320
+ responses: {
2321
+ /** @description OK */
2322
+ 200: {
2323
+ headers: {
2324
+ [name: string]: unknown;
2325
+ };
2326
+ content: {
2327
+ "application/json": components["schemas"]["SkillResource"];
2328
+ };
2329
+ };
2330
+ /** @description Error */
2331
+ default: {
2332
+ headers: {
2333
+ [name: string]: unknown;
2334
+ };
2335
+ content: {
2336
+ "application/json": components["schemas"]["Error"];
2337
+ };
2338
+ };
2339
+ };
2340
+ };
2341
+ "get-skill": {
2342
+ parameters: {
2343
+ query?: never;
2344
+ header?: never;
2345
+ path: {
2346
+ /** @description The skill's name, as `list-skills` returned it. */
2347
+ skill: string;
2348
+ };
2349
+ cookie?: never;
2350
+ };
2351
+ requestBody?: never;
2352
+ responses: {
2353
+ /** @description OK */
2354
+ 200: {
2355
+ headers: {
2356
+ [name: string]: unknown;
2357
+ };
2358
+ content: {
2359
+ "application/json": components["schemas"]["SkillResource"];
2360
+ };
2361
+ };
2362
+ /** @description Error */
2363
+ default: {
2364
+ headers: {
2365
+ [name: string]: unknown;
2366
+ };
2367
+ content: {
2368
+ "application/json": components["schemas"]["Error"];
2369
+ };
2370
+ };
2371
+ };
2372
+ };
2373
+ "delete-skill": {
2374
+ parameters: {
2375
+ query?: never;
2376
+ header?: never;
2377
+ path: {
2378
+ skill: string;
2379
+ };
2380
+ cookie?: never;
2381
+ };
2382
+ requestBody?: never;
2383
+ responses: {
2384
+ /** @description No Content */
2385
+ 204: {
2386
+ headers: {
2387
+ [name: string]: unknown;
2388
+ };
2389
+ content?: never;
2390
+ };
2391
+ /** @description Error */
2392
+ default: {
2393
+ headers: {
2394
+ [name: string]: unknown;
2395
+ };
2396
+ content: {
2397
+ "application/json": components["schemas"]["Error"];
2398
+ };
2399
+ };
2400
+ };
2401
+ };
2402
+ "set-skill-enabled": {
2403
+ parameters: {
2404
+ query?: never;
2405
+ header?: never;
2406
+ path: {
2407
+ skill: string;
2408
+ };
2409
+ cookie?: never;
2410
+ };
2411
+ requestBody: {
2412
+ content: {
2413
+ "application/json": components["schemas"]["SkillEnabledRequestBody"];
2414
+ };
2415
+ };
2416
+ responses: {
2417
+ /** @description OK */
2418
+ 200: {
2419
+ headers: {
2420
+ [name: string]: unknown;
2421
+ };
2422
+ content: {
2423
+ "application/json": components["schemas"]["SkillResource"];
2424
+ };
2425
+ };
2426
+ /** @description Error */
2427
+ default: {
2428
+ headers: {
2429
+ [name: string]: unknown;
2430
+ };
2431
+ content: {
2432
+ "application/json": components["schemas"]["Error"];
2433
+ };
2434
+ };
2435
+ };
2436
+ };
2437
+ "list-threads": {
2438
+ parameters: {
2439
+ query?: {
2440
+ /** @description Search titles, case-insensitively. Leave it empty for the most recent conversations */
2441
+ q?: string;
2442
+ /** @description When true, returns **only** archived conversations; otherwise only unarchived ones */
2443
+ archived?: boolean;
2444
+ /** @description Narrow the list to one folder. Omitting it returns conversations from every folder and from none; a folder id returns that folder's; the empty value (`?folder=`) returns the ones that are in no folder at all. Empty is not the same as omitted, and a sidebar needs both: "chats" is exactly the ungrouped set, and asking for everything would let filed conversations crowd it out of the limit. */
2445
+ folder?: string;
2446
+ /**
2447
+ * @description Where the previous page ended, from its `nextCursor`. Omit it for the first page.
2448
+ *
2449
+ * It is a position, not an offset, and that matters here: this list is ordered by recent activity, and the activity happens while it is being read. An offset would hand back a conversation twice when one moves up in between, and skip one when it moves down — silently, because a conversation that was skipped simply is not there.
2450
+ *
2451
+ * Pass the same `q`, `archived` and `folder` along with it. A cursor carries a position, not the question that produced it, so changing the filters mid-scroll walks a range nobody asked for.
2452
+ */
2453
+ cursor?: string;
2454
+ limit?: number;
2455
+ };
2456
+ header?: never;
2457
+ path?: never;
2458
+ cookie?: never;
2459
+ };
2460
+ requestBody?: never;
2461
+ responses: {
2462
+ /** @description OK */
2463
+ 200: {
2464
+ headers: {
2465
+ [name: string]: unknown;
2466
+ };
2467
+ content: {
2468
+ "application/json": components["schemas"]["ThreadListResponseBody"];
2469
+ };
2470
+ };
2471
+ /** @description Error */
2472
+ default: {
2473
+ headers: {
2474
+ [name: string]: unknown;
2475
+ };
2476
+ content: {
2477
+ "application/json": components["schemas"]["Error"];
2478
+ };
2479
+ };
2480
+ };
2481
+ };
2482
+ "create-thread": {
2483
+ parameters: {
2484
+ query?: never;
2485
+ header?: never;
2486
+ path?: never;
2487
+ cookie?: never;
2488
+ };
2489
+ requestBody: {
2490
+ content: {
2491
+ "application/json": components["schemas"]["CreateThreadRequestBody"];
2492
+ };
2493
+ };
2494
+ responses: {
2495
+ /** @description Created */
2496
+ 201: {
2497
+ headers: {
2498
+ [name: string]: unknown;
2499
+ };
2500
+ content: {
2501
+ "application/json": components["schemas"]["ThreadSummaryResource"];
2502
+ };
2503
+ };
2504
+ /** @description Error */
2505
+ default: {
2506
+ headers: {
2507
+ [name: string]: unknown;
2508
+ };
2509
+ content: {
2510
+ "application/json": components["schemas"]["Error"];
2511
+ };
2512
+ };
2513
+ };
2514
+ };
2515
+ "get-thread": {
2516
+ parameters: {
2517
+ query?: never;
2518
+ header?: never;
2519
+ path: {
2520
+ thread: string;
2521
+ };
2522
+ cookie?: never;
2523
+ };
2524
+ requestBody?: never;
2525
+ responses: {
2526
+ /** @description OK */
2527
+ 200: {
2528
+ headers: {
2529
+ [name: string]: unknown;
2530
+ };
2531
+ content: {
2532
+ "application/json": components["schemas"]["DocumentResource"];
2533
+ };
2534
+ };
2535
+ /** @description Error */
2536
+ default: {
2537
+ headers: {
2538
+ [name: string]: unknown;
2539
+ };
2540
+ content: {
2541
+ "application/json": components["schemas"]["Error"];
2542
+ };
2543
+ };
2544
+ };
2545
+ };
2546
+ "delete-thread": {
2547
+ parameters: {
2548
+ query?: never;
2549
+ header?: never;
2550
+ path: {
2551
+ thread: string;
2552
+ };
2553
+ cookie?: never;
2554
+ };
2555
+ requestBody?: never;
2556
+ responses: {
2557
+ /** @description No Content */
2558
+ 204: {
2559
+ headers: {
2560
+ [name: string]: unknown;
2561
+ };
2562
+ content?: never;
2563
+ };
2564
+ /** @description Error */
2565
+ default: {
2566
+ headers: {
2567
+ [name: string]: unknown;
2568
+ };
2569
+ content: {
2570
+ "application/json": components["schemas"]["Error"];
2571
+ };
2572
+ };
2573
+ };
2574
+ };
2575
+ "update-thread": {
2576
+ parameters: {
2577
+ query?: never;
2578
+ header?: never;
2579
+ path: {
2580
+ thread: string;
2581
+ };
2582
+ cookie?: never;
2583
+ };
2584
+ requestBody: {
2585
+ content: {
2586
+ "application/json": components["schemas"]["UpdateThreadRequestBody"];
2587
+ };
2588
+ };
2589
+ responses: {
2590
+ /** @description OK */
2591
+ 200: {
2592
+ headers: {
2593
+ [name: string]: unknown;
2594
+ };
2595
+ content: {
2596
+ "application/json": components["schemas"]["ThreadSummaryResource"];
2597
+ };
2598
+ };
2599
+ /** @description Error */
2600
+ default: {
2601
+ headers: {
2602
+ [name: string]: unknown;
2603
+ };
2604
+ content: {
2605
+ "application/json": components["schemas"]["Error"];
2606
+ };
2607
+ };
2608
+ };
2609
+ };
2610
+ "decide-approval": {
2611
+ parameters: {
2612
+ query?: never;
2613
+ header?: never;
2614
+ path: {
2615
+ thread: string;
2616
+ batch: string;
2617
+ };
2618
+ cookie?: never;
2619
+ };
2620
+ requestBody: {
2621
+ content: {
2622
+ "application/json": components["schemas"]["DecideRequestBody"];
2623
+ };
2624
+ };
2625
+ responses: {
2626
+ /** @description No Content */
2627
+ 204: {
2628
+ headers: {
2629
+ [name: string]: unknown;
2630
+ };
2631
+ content?: never;
2632
+ };
2633
+ /** @description Error */
2634
+ default: {
2635
+ headers: {
2636
+ [name: string]: unknown;
2637
+ };
2638
+ content: {
2639
+ "application/json": components["schemas"]["Error"];
2640
+ };
2641
+ };
2642
+ };
2643
+ };
2644
+ "list-earlier-items": {
2645
+ parameters: {
2646
+ query: {
2647
+ /** @description From the document's earlier.before; returns entries before this ordinal */
2648
+ before: number;
2649
+ };
2650
+ header?: never;
2651
+ path: {
2652
+ thread: string;
2653
+ };
2654
+ cookie?: never;
2655
+ };
2656
+ requestBody?: never;
2657
+ responses: {
2658
+ /** @description OK */
2659
+ 200: {
2660
+ headers: {
2661
+ [name: string]: unknown;
2662
+ };
2663
+ content: {
2664
+ "application/json": components["schemas"]["EarlierResponseBody"];
2665
+ };
2666
+ };
2667
+ /** @description Error */
2668
+ default: {
2669
+ headers: {
2670
+ [name: string]: unknown;
2671
+ };
2672
+ content: {
2673
+ "application/json": components["schemas"]["Error"];
2674
+ };
2675
+ };
2676
+ };
2677
+ };
2678
+ "interrupt-thread": {
2679
+ parameters: {
2680
+ query?: never;
2681
+ header?: never;
2682
+ path: {
2683
+ thread: string;
2684
+ };
2685
+ cookie?: never;
2686
+ };
2687
+ requestBody?: never;
2688
+ responses: {
2689
+ /** @description No Content */
2690
+ 204: {
2691
+ headers: {
2692
+ [name: string]: unknown;
2693
+ };
2694
+ content?: never;
2695
+ };
2696
+ /** @description Error */
2697
+ default: {
2698
+ headers: {
2699
+ [name: string]: unknown;
2700
+ };
2701
+ content: {
2702
+ "application/json": components["schemas"]["Error"];
2703
+ };
2704
+ };
2705
+ };
2706
+ };
2707
+ "send-message": {
2708
+ parameters: {
2709
+ query?: never;
2710
+ header?: never;
2711
+ path: {
2712
+ thread: string;
2713
+ };
2714
+ cookie?: never;
2715
+ };
2716
+ requestBody: {
2717
+ content: {
2718
+ "application/json": components["schemas"]["SendMessageRequestBody"];
2719
+ };
2720
+ };
2721
+ responses: {
2722
+ /** @description Accepted */
2723
+ 202: {
2724
+ headers: {
2725
+ [name: string]: unknown;
2726
+ };
2727
+ content: {
2728
+ "application/json": components["schemas"]["TurnIDResponseBody"];
2729
+ };
2730
+ };
2731
+ /** @description Error */
2732
+ default: {
2733
+ headers: {
2734
+ [name: string]: unknown;
2735
+ };
2736
+ content: {
2737
+ "application/json": components["schemas"]["Error"];
2738
+ };
2739
+ };
2740
+ };
2741
+ };
2742
+ "answer-question": {
2743
+ parameters: {
2744
+ query?: never;
2745
+ header?: never;
2746
+ path: {
2747
+ thread: string;
2748
+ item: string;
2749
+ };
2750
+ cookie?: never;
2751
+ };
2752
+ requestBody: {
2753
+ content: {
2754
+ "application/json": components["schemas"]["AnswerRequestBody"];
2755
+ };
2756
+ };
2757
+ responses: {
2758
+ /** @description No Content */
2759
+ 204: {
2760
+ headers: {
2761
+ [name: string]: unknown;
2762
+ };
2763
+ content?: never;
2764
+ };
2765
+ /** @description Error */
2766
+ default: {
2767
+ headers: {
2768
+ [name: string]: unknown;
2769
+ };
2770
+ content: {
2771
+ "application/json": components["schemas"]["Error"];
2772
+ };
2773
+ };
2774
+ };
2775
+ };
2776
+ "mark-thread-read": {
2777
+ parameters: {
2778
+ query?: never;
2779
+ header?: never;
2780
+ path: {
2781
+ thread: string;
2782
+ };
2783
+ cookie?: never;
2784
+ };
2785
+ requestBody?: never;
2786
+ responses: {
2787
+ /** @description No Content */
2788
+ 204: {
2789
+ headers: {
2790
+ [name: string]: unknown;
2791
+ };
2792
+ content?: never;
2793
+ };
2794
+ /** @description Error */
2795
+ default: {
2796
+ headers: {
2797
+ [name: string]: unknown;
2798
+ };
2799
+ content: {
2800
+ "application/json": components["schemas"]["Error"];
2801
+ };
2802
+ };
2803
+ };
2804
+ };
2805
+ "revert-thread": {
2806
+ parameters: {
2807
+ query?: never;
2808
+ header?: never;
2809
+ path: {
2810
+ thread: string;
2811
+ };
2812
+ cookie?: never;
2813
+ };
2814
+ requestBody: {
2815
+ content: {
2816
+ "application/json": components["schemas"]["RevertRequestBody"];
2817
+ };
2818
+ };
2819
+ responses: {
2820
+ /** @description OK */
2821
+ 200: {
2822
+ headers: {
2823
+ [name: string]: unknown;
2824
+ };
2825
+ content: {
2826
+ "application/json": components["schemas"]["RevertedCountResponseBody"];
2827
+ };
2828
+ };
2829
+ /** @description Error */
2830
+ default: {
2831
+ headers: {
2832
+ [name: string]: unknown;
2833
+ };
2834
+ content: {
2835
+ "application/json": components["schemas"]["Error"];
2836
+ };
2837
+ };
2838
+ };
2839
+ };
2840
+ }