@leaflow/sdk 0.0.0-dev.11.g7f2d603

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.
@@ -0,0 +1,1888 @@
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
+ * 上传图片
17
+ * @description 请求体直接是文件字节,不使用 multipart 封装,一次上传一个文件。类型由内容判定,与 Content-Type 无关。返回的 id 在发送消息时放进 attachmentIds;从未被任何消息引用的附件会被定期清除。
18
+ */
19
+ post: operations["upload-attachment"];
20
+ delete?: never;
21
+ options?: never;
22
+ head?: never;
23
+ patch?: never;
24
+ trace?: never;
25
+ };
26
+ "/api/v1/attachments/{attachment}": {
27
+ parameters: {
28
+ query?: never;
29
+ header?: never;
30
+ path?: never;
31
+ cookie?: never;
32
+ };
33
+ /**
34
+ * 取回图片
35
+ * @description 按附件 id 取回原始字节,可直接作为 <img> 的地址使用。响应带长期缓存头,附件内容不会变化。附件不存在或不属于当前用户时返回 404。
36
+ */
37
+ get: operations["download-attachment"];
38
+ put?: never;
39
+ post?: never;
40
+ delete?: never;
41
+ options?: never;
42
+ head?: never;
43
+ patch?: never;
44
+ trace?: never;
45
+ };
46
+ "/api/v1/bindings": {
47
+ parameters: {
48
+ query?: never;
49
+ header?: never;
50
+ path?: never;
51
+ cookie?: never;
52
+ };
53
+ /**
54
+ * 列出绑定
55
+ * @description 接入面那张表按通道列出各自绑了谁时用 channelId 过滤。
56
+ */
57
+ get: operations["list-bindings"];
58
+ put?: never;
59
+ post?: never;
60
+ delete?: never;
61
+ options?: never;
62
+ head?: never;
63
+ patch?: never;
64
+ trace?: never;
65
+ };
66
+ "/api/v1/bindings/{binding}": {
67
+ parameters: {
68
+ query?: never;
69
+ header?: never;
70
+ path?: never;
71
+ cookie?: never;
72
+ };
73
+ /** 查看绑定 */
74
+ get: operations["get-binding"];
75
+ put?: never;
76
+ post?: never;
77
+ /** 解除绑定 */
78
+ delete: operations["delete-binding"];
79
+ options?: never;
80
+ head?: never;
81
+ patch?: never;
82
+ trace?: never;
83
+ };
84
+ "/api/v1/channels": {
85
+ parameters: {
86
+ query?: never;
87
+ header?: never;
88
+ path?: never;
89
+ cookie?: never;
90
+ };
91
+ /** 列出通道 */
92
+ get: operations["list-channels"];
93
+ put?: never;
94
+ /**
95
+ * 创建通道
96
+ * @description 回调密钥归谁定由平台决定,见 list-platforms 的 secretSource:generated 的平台不要传 webhookSecret,我们生成的那把仅在本次响应中返回一次、之后无法再次取回,错过了只能调轮换接口换一把新的;supplied 的平台必须把平台后台那把传进来,此时响应里的webhookSecret 为 null。
97
+ */
98
+ post: operations["create-channel"];
99
+ delete?: never;
100
+ options?: never;
101
+ head?: never;
102
+ patch?: never;
103
+ trace?: never;
104
+ };
105
+ "/api/v1/channels/{channel}": {
106
+ parameters: {
107
+ query?: never;
108
+ header?: never;
109
+ path?: never;
110
+ cookie?: never;
111
+ };
112
+ /** 查看通道 */
113
+ get: operations["get-channel"];
114
+ put?: never;
115
+ post?: never;
116
+ /**
117
+ * 删除通道
118
+ * @description 删除后该通道不再接收入站消息,其上的绑定一并失效。项目处于停服或清理状态时本接口仍然可用。
119
+ */
120
+ delete: operations["delete-channel"];
121
+ options?: never;
122
+ head?: never;
123
+ /**
124
+ * 修改通道
125
+ * @description 只修改传了的字段。senderPolicy 与 allowFrom 是一对,由 senderPolicy 决定是否替换;改动对常驻连接要等连接重建后才生效,回调型平台立即生效。
126
+ */
127
+ patch: operations["update-channel"];
128
+ trace?: never;
129
+ };
130
+ "/api/v1/channels/{channel}/binding-codes": {
131
+ parameters: {
132
+ query?: never;
133
+ header?: never;
134
+ path?: never;
135
+ cookie?: never;
136
+ };
137
+ get?: never;
138
+ put?: never;
139
+ /**
140
+ * 签发绑定码
141
+ * @description 生成一个一次性绑定码交给待绑定的人,他在该平台上用自己的账号把这个码发给助手即完成绑定。绑定只能由本人以这种方式建立,不能直接指定平台账号。绑定码有有效期,过期后需重新签发。
142
+ */
143
+ post: operations["create-binding-code"];
144
+ delete?: never;
145
+ options?: never;
146
+ head?: never;
147
+ patch?: never;
148
+ trace?: never;
149
+ };
150
+ "/api/v1/channels/{channel}/rejections": {
151
+ parameters: {
152
+ query?: never;
153
+ header?: never;
154
+ path?: never;
155
+ cookie?: never;
156
+ };
157
+ /**
158
+ * 查看最近被拒绝的入站消息
159
+ * @description 排查「发了消息但助手没有响应」时使用。按时间倒序返回最近被这条通道拒绝的入站消息及其拒绝原因,最常见的原因是发送方尚未绑定。
160
+ */
161
+ get: operations["list-channel-rejections"];
162
+ put?: never;
163
+ post?: never;
164
+ delete?: never;
165
+ options?: never;
166
+ head?: never;
167
+ patch?: never;
168
+ trace?: never;
169
+ };
170
+ "/api/v1/channels/{channel}/secret": {
171
+ parameters: {
172
+ query?: never;
173
+ header?: never;
174
+ path?: never;
175
+ cookie?: never;
176
+ };
177
+ get?: never;
178
+ put?: never;
179
+ /**
180
+ * 轮换回调密钥
181
+ * @description 换一把新的回调密钥,旧的立即失效,通道降回待平台确认状态。密钥归谁定由平台决定,见 list-platforms 的 secretSource:generated 的平台不要传请求体,新密钥仅在本次响应中返回、之后无法再次取回;supplied 的平台必须把平台后台那把新密钥传进来。
182
+ */
183
+ post: operations["rotate-channel-secret"];
184
+ delete?: never;
185
+ options?: never;
186
+ head?: never;
187
+ patch?: never;
188
+ trace?: never;
189
+ };
190
+ "/api/v1/channels/{channel}/sender-check": {
191
+ parameters: {
192
+ query?: never;
193
+ header?: never;
194
+ path?: never;
195
+ cookie?: never;
196
+ };
197
+ /**
198
+ * 推演一个发件人会不会被放行
199
+ * @description 改完发件人策略之后用来自查,不发送任何消息、也不改变任何状态:它走的是和真实入站完全相同的那份判定,并说明结论由哪一条规则得出。无法推演绑定码那一条——是否是绑定码取决于对方发来的内容。
200
+ */
201
+ get: operations["check-sender"];
202
+ put?: never;
203
+ post?: never;
204
+ delete?: never;
205
+ options?: never;
206
+ head?: never;
207
+ patch?: never;
208
+ trace?: never;
209
+ };
210
+ "/api/v1/channels/{channel}/weixin-logins": {
211
+ parameters: {
212
+ query?: never;
213
+ header?: never;
214
+ path?: never;
215
+ cookie?: never;
216
+ };
217
+ get?: never;
218
+ put?: never;
219
+ /**
220
+ * 发起微信扫码登录
221
+ * @description 微信个人号通道需要本人扫码登录后才能收发消息。本接口返回二维码,之后轮询 `GET /v1/weixin-logins/{login}` 获取进度;状态提示需要验证码时,调用 `POST /v1/weixin-logins/{login}/verify-code` 补交。
222
+ */
223
+ post: operations["begin-weixin-login"];
224
+ delete?: never;
225
+ options?: never;
226
+ head?: never;
227
+ patch?: never;
228
+ trace?: never;
229
+ };
230
+ "/api/v1/platforms": {
231
+ parameters: {
232
+ query?: never;
233
+ header?: never;
234
+ path?: never;
235
+ cookie?: never;
236
+ };
237
+ /**
238
+ * 列出可接入的平台
239
+ * @description 返回本平台当前支持接入的即时通讯平台,以及各自建通道时要走的流程和要填的凭据字段。新建通道表单完全由这份响应驱动:setupMethod 决定展示录入表单还是扫码流程,credentialFields 是要填的字段,secretSource 决定要不要有回调密钥那一栏。
240
+ */
241
+ get: operations["list-platforms"];
242
+ put?: never;
243
+ post?: never;
244
+ delete?: never;
245
+ options?: never;
246
+ head?: never;
247
+ patch?: never;
248
+ trace?: never;
249
+ };
250
+ "/api/v1/weixin-logins/{login}": {
251
+ parameters: {
252
+ query?: never;
253
+ header?: never;
254
+ path?: never;
255
+ cookie?: never;
256
+ };
257
+ /**
258
+ * 查询扫码登录状态
259
+ * @description 轮询本接口直到状态变为成功或失败。状态提示需要验证码时,调用补交验证码接口。
260
+ */
261
+ get: operations["get-weixin-login"];
262
+ put?: never;
263
+ post?: never;
264
+ delete?: never;
265
+ options?: never;
266
+ head?: never;
267
+ patch?: never;
268
+ trace?: never;
269
+ };
270
+ "/api/v1/weixin-logins/{login}/verify-code": {
271
+ parameters: {
272
+ query?: never;
273
+ header?: never;
274
+ path?: never;
275
+ cookie?: never;
276
+ };
277
+ get?: never;
278
+ put?: never;
279
+ /**
280
+ * 补交登录验证码
281
+ * @description 微信在扫码后要求短信或设备验证码时使用。验证码由登录发起人在自己手机上获取。
282
+ */
283
+ post: operations["submit-weixin-verify-code"];
284
+ delete?: never;
285
+ options?: never;
286
+ head?: never;
287
+ patch?: never;
288
+ trace?: never;
289
+ };
290
+ "/api/v1/models": {
291
+ parameters: {
292
+ query?: never;
293
+ header?: never;
294
+ path?: never;
295
+ cookie?: never;
296
+ };
297
+ /**
298
+ * 列出可用模型
299
+ * @description 返回本平台当前提供的模型及其上下文窗口、推理档位和支持的输入类型。用于填充对话设置里的模型选择。
300
+ */
301
+ get: operations["list-models"];
302
+ put?: never;
303
+ post?: never;
304
+ delete?: never;
305
+ options?: never;
306
+ head?: never;
307
+ patch?: never;
308
+ trace?: never;
309
+ };
310
+ "/api/v1/threads": {
311
+ parameters: {
312
+ query?: never;
313
+ header?: never;
314
+ path?: never;
315
+ cookie?: never;
316
+ };
317
+ /**
318
+ * 列出对话
319
+ * @description 按最近活动排序,只返回当前账号在当前项目里的对话。archived 是一个二选一的开关而不是「包含归档」:归档的对话不出现在默认列表里,要看它们就把这个参数打开。
320
+ */
321
+ get: operations["list-threads"];
322
+ put?: never;
323
+ /** 创建对话 */
324
+ post: operations["create-thread"];
325
+ delete?: never;
326
+ options?: never;
327
+ head?: never;
328
+ patch?: never;
329
+ trace?: never;
330
+ };
331
+ "/api/v1/threads/{thread}": {
332
+ parameters: {
333
+ query?: never;
334
+ header?: never;
335
+ path?: never;
336
+ cookie?: never;
337
+ };
338
+ /**
339
+ * 取回对话文档
340
+ * @description 对话的完整当前状态,用于首屏渲染。文档中的 stream 给出实时输出地址和入场票据,流推送的是对这份文档的增量编辑,可直接套用同一套渲染逻辑。
341
+ */
342
+ get: operations["get-thread"];
343
+ put?: never;
344
+ post?: never;
345
+ delete?: never;
346
+ options?: never;
347
+ head?: never;
348
+ /**
349
+ * 修改对话设置
350
+ * @description 可修改模型、推理档位、审批模式和归档状态。改动从下一次 turn 起生效,正在执行的 turn 沿用它启动时的设置。reasoningEffort 仅在同时提供 model 时生效。
351
+ */
352
+ patch: operations["update-thread"];
353
+ trace?: never;
354
+ };
355
+ "/api/v1/threads/{thread}/approvals/{batch}": {
356
+ parameters: {
357
+ query?: never;
358
+ header?: never;
359
+ path?: never;
360
+ cookie?: never;
361
+ };
362
+ get?: never;
363
+ put?: never;
364
+ /**
365
+ * 批准或拒绝一批工具调用
366
+ * @description 批次 id 来自对话文档的 wait 字段。本接口是幂等的:重复提交同一批次不会改变已经生效的决定,也不会报错。批次不属于该对话时返回 404。
367
+ */
368
+ post: operations["decide-approval"];
369
+ delete?: never;
370
+ options?: never;
371
+ head?: never;
372
+ patch?: never;
373
+ trace?: never;
374
+ };
375
+ "/api/v1/threads/{thread}/earlier": {
376
+ parameters: {
377
+ query?: never;
378
+ header?: never;
379
+ path?: never;
380
+ cookie?: never;
381
+ };
382
+ /**
383
+ * 取回更早的对话内容
384
+ * @description 首屏只给对话最新的那一段,再往上的内容用本接口按需取回,一次一段。before 用文档里的 earlier.before,响应里的 earlier 是再往上那一段的游标,为 null 表示已经到顶。返回的条目和文档里的 items 是同一种形状,顺序也一样(由旧到新),直接接在现有内容前面即可。
385
+ */
386
+ get: operations["list-earlier-items"];
387
+ put?: never;
388
+ post?: never;
389
+ delete?: never;
390
+ options?: never;
391
+ head?: never;
392
+ patch?: never;
393
+ trace?: never;
394
+ };
395
+ "/api/v1/threads/{thread}/interrupt": {
396
+ parameters: {
397
+ query?: never;
398
+ header?: never;
399
+ path?: never;
400
+ cookie?: never;
401
+ };
402
+ get?: never;
403
+ put?: never;
404
+ /**
405
+ * 中断正在执行的 turn
406
+ * @description 对没有正在执行的 turn 的对话调用同样返回 204,不视为错误——用户点击停止与 turn 自然结束之间存在竞争,两种结果一致。项目处于停服或清理状态时本接口仍然可用。
407
+ */
408
+ post: operations["interrupt-thread"];
409
+ delete?: never;
410
+ options?: never;
411
+ head?: never;
412
+ patch?: never;
413
+ trace?: never;
414
+ };
415
+ "/api/v1/threads/{thread}/messages": {
416
+ parameters: {
417
+ query?: never;
418
+ header?: never;
419
+ path?: never;
420
+ cookie?: never;
421
+ };
422
+ get?: never;
423
+ put?: never;
424
+ /**
425
+ * 发送消息并触发一次 turn
426
+ * @description 立即返回 turnId,不等待执行完成——一次 turn 可能持续数十分钟。执行进度通过对话文档中 stream 指向的实时流获取,不在本响应里。
427
+ */
428
+ post: operations["send-message"];
429
+ delete?: never;
430
+ options?: never;
431
+ head?: never;
432
+ patch?: never;
433
+ trace?: never;
434
+ };
435
+ "/api/v1/threads/{thread}/questions/{item}": {
436
+ parameters: {
437
+ query?: never;
438
+ header?: never;
439
+ path?: never;
440
+ cookie?: never;
441
+ };
442
+ get?: never;
443
+ put?: never;
444
+ /**
445
+ * 回答助手提出的问题
446
+ * @description 问题 id 来自对话文档的 wait 字段。已被回答过的问题同样返回 204——可能是另一个页面提交在先,也可能是自动应答窗口已到期,两种情况下 turn 都已带着答案继续执行。
447
+ */
448
+ post: operations["answer-question"];
449
+ delete?: never;
450
+ options?: never;
451
+ head?: never;
452
+ patch?: never;
453
+ trace?: never;
454
+ };
455
+ "/api/v1/threads/{thread}/read": {
456
+ parameters: {
457
+ query?: never;
458
+ header?: never;
459
+ path?: never;
460
+ cookie?: never;
461
+ };
462
+ get?: never;
463
+ put?: never;
464
+ /** 标记对话已读 */
465
+ post: operations["mark-thread-read"];
466
+ delete?: never;
467
+ options?: never;
468
+ head?: never;
469
+ patch?: never;
470
+ trace?: never;
471
+ };
472
+ "/api/v1/threads/{thread}/revert": {
473
+ parameters: {
474
+ query?: never;
475
+ header?: never;
476
+ path?: never;
477
+ cookie?: never;
478
+ };
479
+ get?: never;
480
+ put?: never;
481
+ /**
482
+ * 从指定位置起撤回
483
+ * @description 撤回 ordinal 及其之后的全部条目。被撤回的条目仍留在逐字稿中并标记 reverted,序号不会重排。返回实际撤回的条目数。
484
+ */
485
+ post: operations["revert-thread"];
486
+ delete?: never;
487
+ options?: never;
488
+ head?: never;
489
+ patch?: never;
490
+ trace?: never;
491
+ };
492
+ }
493
+ export type webhooks = Record<string, never>;
494
+ export interface components {
495
+ schemas: {
496
+ Error: {
497
+ code?: string;
498
+ message: string;
499
+ meta?: {
500
+ [key: string]: unknown;
501
+ };
502
+ /** Format: int64 */
503
+ status: number;
504
+ };
505
+ UploadedResource: {
506
+ /** Format: int64 */
507
+ height: number;
508
+ id: string;
509
+ /** Format: int64 */
510
+ width: number;
511
+ };
512
+ BindingResource: {
513
+ /** Format: uuid */
514
+ channelId: string;
515
+ /** @enum {string} */
516
+ connState: "logged_out" | "qr_pending" | "online" | "expired";
517
+ /** Format: date-time */
518
+ createdAt: string;
519
+ /** Format: uuid */
520
+ id: string;
521
+ peerName: string;
522
+ platform: string;
523
+ /** @enum {string} */
524
+ status: "pending" | "active" | "revoked";
525
+ /** Format: date-time */
526
+ verifiedAt: string | null;
527
+ };
528
+ LengthAwarePageBindingResource: {
529
+ /** @description 这一页的内容 */
530
+ items: components["schemas"]["BindingResource"][];
531
+ /**
532
+ * Format: int64
533
+ * @description 这一页最多几条,回显请求里的值
534
+ */
535
+ limit: number;
536
+ /**
537
+ * Format: int64
538
+ * @description 跳过了多少条,回显请求里的值
539
+ */
540
+ offset: number;
541
+ /**
542
+ * Format: int64
543
+ * @description 命中的总条数,不只是这一页
544
+ */
545
+ total: number;
546
+ };
547
+ ChannelResource: {
548
+ allowFrom: string[] | null;
549
+ /**
550
+ * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
551
+ * @enum {string}
552
+ */
553
+ connState: "logged_out" | "qr_pending" | "online" | "expired";
554
+ /** Format: date-time */
555
+ createdAt: string;
556
+ /** Format: uuid */
557
+ id: string;
558
+ name: string;
559
+ platform: string;
560
+ /**
561
+ * @description 常驻连接此刻的状态。回调型平台恒为 stopped
562
+ * @enum {string}
563
+ */
564
+ runtimeState: "stopped" | "running";
565
+ /** @enum {string} */
566
+ senderPolicy: "bound_only" | "open";
567
+ /** @enum {string} */
568
+ status: "active" | "suspended" | "disabled";
569
+ /** Format: date-time */
570
+ updatedAt: string;
571
+ /** @description 回调路径,网关配置和排查时用 */
572
+ webhookPath: string;
573
+ /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
574
+ webhookUrl: string | null;
575
+ };
576
+ LengthAwarePageChannelResource: {
577
+ /** @description 这一页的内容 */
578
+ items: components["schemas"]["ChannelResource"][];
579
+ /**
580
+ * Format: int64
581
+ * @description 这一页最多几条,回显请求里的值
582
+ */
583
+ limit: number;
584
+ /**
585
+ * Format: int64
586
+ * @description 跳过了多少条,回显请求里的值
587
+ */
588
+ offset: number;
589
+ /**
590
+ * Format: int64
591
+ * @description 命中的总条数,不只是这一页
592
+ */
593
+ total: number;
594
+ };
595
+ CreateChannelRequestBody: {
596
+ allowFrom?: string[] | null;
597
+ /** @description 平台侧凭据。只写不读,创建后无法取回 */
598
+ credentials?: {
599
+ [key: string]: string;
600
+ };
601
+ name: string;
602
+ platform: string;
603
+ /** @enum {string} */
604
+ senderPolicy?: "bound_only" | "open";
605
+ /** @description 平台生成密钥的平台(secretSource=supplied)必须传;我们生成的(generated)不能传,那把会在本次响应的 webhookSecret 里返回一次 */
606
+ webhookSecret?: string;
607
+ };
608
+ ChannelWithSecretResponseBody: {
609
+ allowFrom: string[] | null;
610
+ /**
611
+ * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
612
+ * @enum {string}
613
+ */
614
+ connState: "logged_out" | "qr_pending" | "online" | "expired";
615
+ /** Format: date-time */
616
+ createdAt: string;
617
+ /** Format: uuid */
618
+ id: string;
619
+ name: string;
620
+ platform: string;
621
+ /**
622
+ * @description 常驻连接此刻的状态。回调型平台恒为 stopped
623
+ * @enum {string}
624
+ */
625
+ runtimeState: "stopped" | "running";
626
+ /** @enum {string} */
627
+ senderPolicy: "bound_only" | "open";
628
+ /** @enum {string} */
629
+ status: "active" | "suspended" | "disabled";
630
+ /** Format: date-time */
631
+ updatedAt: string;
632
+ /** @description 回调路径,网关配置和排查时用 */
633
+ webhookPath: string;
634
+ /** @description 我们生成的那把回调密钥,拿去粘到平台后台。**之后无法再次取回**,只能轮换出新的一把。密钥由平台生成(secretSource=supplied)或该平台不走回调时为 null */
635
+ webhookSecret: string | null;
636
+ /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
637
+ webhookUrl: string | null;
638
+ };
639
+ UpdateChannelRequestBody: {
640
+ /** @description 放行名单。仅在同时传了 senderPolicy 时生效 */
641
+ allowFrom?: string[] | null;
642
+ /** @description 整份替换而不是逐键合并。不传表示不动 */
643
+ credentials?: {
644
+ [key: string]: string;
645
+ };
646
+ enabled?: boolean;
647
+ name?: string;
648
+ /**
649
+ * @description 传了才会连同 allowFrom 一起替换
650
+ * @enum {string}
651
+ */
652
+ senderPolicy?: "bound_only" | "open";
653
+ };
654
+ BindingCodeResponseBody: {
655
+ code: string;
656
+ /** Format: date-time */
657
+ expiresAt: string;
658
+ };
659
+ RejectionResource: {
660
+ /** Format: date-time */
661
+ at: string;
662
+ peerId: string;
663
+ peerName: string;
664
+ peerUsername: string;
665
+ platform: string;
666
+ /** Format: int64 */
667
+ textLength: number;
668
+ verdict: string;
669
+ };
670
+ RejectionListResponseBody: {
671
+ rejections: components["schemas"]["RejectionResource"][] | null;
672
+ };
673
+ RotateSecretRequestBody: {
674
+ /** @description 平台生成密钥的平台(secretSource=supplied)必须传新的那把;我们生成的(generated)不能传 */
675
+ webhookSecret?: string;
676
+ };
677
+ WebhookSecretResponseBody: {
678
+ webhookSecret: string;
679
+ };
680
+ SenderCheckResource: {
681
+ allowFrom: string[] | null;
682
+ allowed: boolean;
683
+ bindingId: string | null;
684
+ senderPolicy: string;
685
+ /** @enum {string} */
686
+ verdict: "ALLOWED_BY_BINDING" | "ALLOWED_BY_ALLOW_FROM" | "ALLOWED_BY_POLICY" | "REJECTED_NOT_ALLOWED";
687
+ };
688
+ LoginResource: {
689
+ /**
690
+ * Format: date-time
691
+ * @description 这条登录流的截止时间。到点之后不要再轮询,重新发起一次
692
+ */
693
+ expiresAt: string;
694
+ /** Format: uuid */
695
+ id: string;
696
+ /** @description 二维码的内容,由客户端编码成二维码图形渲染(不是图片地址,也不是 data URI)。码过期时这条流会自己换一张接着等,所以每次轮询拿到的可能是新的一串 */
697
+ qrcodeData: string;
698
+ /** @description 失败原因。仅在 status 为 error 或 expired 时有内容 */
699
+ reason: string;
700
+ /** @enum {string} */
701
+ status: "wait" | "scanned" | "confirmed" | "expired" | "error" | "need_verify_code";
702
+ };
703
+ CredentialFieldResource: {
704
+ help: string;
705
+ key: string;
706
+ label: string;
707
+ required: boolean;
708
+ secret: boolean;
709
+ };
710
+ PlatformResource: {
711
+ credentialFields: components["schemas"]["CredentialFieldResource"][] | null;
712
+ name: string;
713
+ resident: boolean;
714
+ /** @enum {string} */
715
+ secretSource: "generated" | "supplied" | "none";
716
+ /** @enum {string} */
717
+ setupChallenge: "none" | "webhook" | "scan";
718
+ /** @enum {string} */
719
+ setupMethod: "credentials" | "scan";
720
+ /** @description 回调路径模板,{channel} 处替换为通道 id */
721
+ webhookPath: string;
722
+ /** @description 完整回调地址模板。部署未声明公网入口时为 null */
723
+ webhookUrlTemplate: string | null;
724
+ };
725
+ PlatformListResponseBody: {
726
+ platforms: components["schemas"]["PlatformResource"][] | null;
727
+ };
728
+ VerifyCodeRequestBody: {
729
+ code: string;
730
+ };
731
+ ModelResource: {
732
+ /** Format: int64 */
733
+ contextWindow: number;
734
+ inputModalities: string[] | null;
735
+ key: string;
736
+ reasoningTiers: string[] | null;
737
+ };
738
+ ModelListResponseBody: {
739
+ models: components["schemas"]["ModelResource"][] | null;
740
+ };
741
+ ThreadSummaryResource: {
742
+ /** @enum {string} */
743
+ approvalMode: "guardian" | "manual" | "yolo";
744
+ archived: boolean;
745
+ /** Format: date-time */
746
+ createdAt: string;
747
+ id: string;
748
+ model: string;
749
+ title: string | null;
750
+ unread: boolean;
751
+ /** Format: date-time */
752
+ updatedAt: string;
753
+ };
754
+ ThreadListResponseBody: {
755
+ threads: components["schemas"]["ThreadSummaryResource"][] | null;
756
+ };
757
+ CreateThreadRequestBody: {
758
+ /**
759
+ * @description 不传则使用平台默认审批模式
760
+ * @enum {string}
761
+ */
762
+ approvalMode?: "guardian" | "manual" | "yolo";
763
+ };
764
+ ContextResource: {
765
+ /** Format: int64 */
766
+ compactAt: number | null;
767
+ model: string;
768
+ /** Format: int64 */
769
+ used: number | null;
770
+ /** Format: int64 */
771
+ warnAt: number;
772
+ /** Format: int64 */
773
+ window: number | null;
774
+ };
775
+ EarlierResource: {
776
+ /** Format: int64 */
777
+ before: number;
778
+ foldedAbove: boolean;
779
+ };
780
+ AttachmentResource: {
781
+ /** Format: int64 */
782
+ height: number;
783
+ id: string;
784
+ /** Format: int64 */
785
+ width: number;
786
+ };
787
+ ItemResource: {
788
+ /** @enum {string|null} */
789
+ approval?: "approved" | "declined" | "auto_approved" | "unreviewed" | null;
790
+ approvalReason?: string | null;
791
+ arguments?: string;
792
+ attachments?: components["schemas"]["AttachmentResource"][] | null;
793
+ /** Format: date-time */
794
+ createdAt: string;
795
+ detail?: string | null;
796
+ /** Format: int64 */
797
+ durationMs?: number | null;
798
+ id: string;
799
+ /** @description 产出这一条的模型。用户自己发的消息为 null */
800
+ model: string | null;
801
+ namespace?: string | null;
802
+ /** Format: int64 */
803
+ ordinal: number;
804
+ reverted: boolean;
805
+ /** @enum {string} */
806
+ status: "pending" | "in_progress" | "completed" | "failed" | "declined" | "interrupted";
807
+ target?: string | null;
808
+ text?: string;
809
+ tool?: string | null;
810
+ /**
811
+ * @description 决定这一条包含哪些字段
812
+ * @enum {string}
813
+ */
814
+ type: "user_message" | "agent_message" | "reasoning" | "dynamic_tool_call" | "context_compaction" | "token_budget_reminder" | "turn_failure";
815
+ };
816
+ StreamResource: {
817
+ path: string;
818
+ ticket: string;
819
+ };
820
+ TurnResource: {
821
+ /** @enum {string} */
822
+ approvalMode: "guardian" | "manual" | "yolo";
823
+ };
824
+ Choice: {
825
+ description: string;
826
+ label: string;
827
+ };
828
+ Question: {
829
+ choices: components["schemas"]["Choice"][] | null;
830
+ header: string;
831
+ id: string;
832
+ question: string;
833
+ };
834
+ WaitResource: {
835
+ /** Format: int64 */
836
+ autoResolutionMs?: number;
837
+ batchId?: string;
838
+ itemId?: string;
839
+ itemIds?: string[] | null;
840
+ /** @enum {string} */
841
+ kind: "tool_approval" | "user_input";
842
+ questions?: components["schemas"]["Question"][] | null;
843
+ turnId: string;
844
+ };
845
+ DocumentResource: {
846
+ context: components["schemas"]["ContextResource"];
847
+ cursor: string | null;
848
+ earlier: components["schemas"]["EarlierResource"] | null;
849
+ items: components["schemas"]["ItemResource"][] | null;
850
+ status: string;
851
+ stream: components["schemas"]["StreamResource"] | null;
852
+ turn: components["schemas"]["TurnResource"] | null;
853
+ turnId: string | null;
854
+ wait: components["schemas"]["WaitResource"] | null;
855
+ };
856
+ UpdateThreadRequestBody: {
857
+ /** @enum {string} */
858
+ approvalMode?: "guardian" | "manual" | "yolo";
859
+ archived?: boolean;
860
+ model?: string;
861
+ reasoningEffort?: string;
862
+ };
863
+ DecideRequestBody: {
864
+ approved: boolean;
865
+ reason?: string;
866
+ };
867
+ EarlierResponseBody: {
868
+ earlier: components["schemas"]["EarlierResource"];
869
+ items: components["schemas"]["ItemResource"][] | null;
870
+ };
871
+ SendMessageRequestBody: {
872
+ /** @description 此前上传、尚未绑定到任何消息的附件 id */
873
+ attachmentIds?: string[] | null;
874
+ text: string;
875
+ };
876
+ TurnIDResponseBody: {
877
+ turnId: string;
878
+ };
879
+ AnswerRequestBody: {
880
+ /** @description 问题 id 到所选答案的映射 */
881
+ answers: {
882
+ [key: string]: string;
883
+ };
884
+ };
885
+ RevertRequestBody: {
886
+ /**
887
+ * Format: int64
888
+ * @description 起始序号,该条及其之后的全部条目都会被撤回
889
+ */
890
+ ordinal: number;
891
+ };
892
+ RevertedCountResponseBody: {
893
+ /** Format: int64 */
894
+ reverted: number;
895
+ };
896
+ };
897
+ responses: never;
898
+ parameters: never;
899
+ requestBodies: never;
900
+ headers: never;
901
+ pathItems: never;
902
+ }
903
+ export type $defs = Record<string, never>;
904
+ export interface operations {
905
+ "upload-attachment": {
906
+ parameters: {
907
+ query?: never;
908
+ header?: never;
909
+ path?: never;
910
+ cookie?: never;
911
+ };
912
+ requestBody: {
913
+ content: {
914
+ "application/octet-stream": string;
915
+ };
916
+ };
917
+ responses: {
918
+ /** @description Created */
919
+ 201: {
920
+ headers: {
921
+ [name: string]: unknown;
922
+ };
923
+ content: {
924
+ "application/json": components["schemas"]["UploadedResource"];
925
+ };
926
+ };
927
+ /** @description Error */
928
+ default: {
929
+ headers: {
930
+ [name: string]: unknown;
931
+ };
932
+ content: {
933
+ "application/json": components["schemas"]["Error"];
934
+ };
935
+ };
936
+ };
937
+ };
938
+ "download-attachment": {
939
+ parameters: {
940
+ query?: never;
941
+ header?: never;
942
+ path: {
943
+ attachment: string;
944
+ };
945
+ cookie?: never;
946
+ };
947
+ requestBody?: never;
948
+ responses: {
949
+ /** @description OK */
950
+ 200: {
951
+ headers: {
952
+ /** @description 私有而且长缓存:这些字节按 id 寻址而 id 永不复用,所以它们永远不会变;而它们属于一个人,所以不能进任何共享缓存。 */
953
+ "Cache-Control"?: string;
954
+ [name: string]: unknown;
955
+ };
956
+ content: {
957
+ "image/*": string;
958
+ };
959
+ };
960
+ /** @description Error */
961
+ default: {
962
+ headers: {
963
+ [name: string]: unknown;
964
+ };
965
+ content: {
966
+ "application/json": components["schemas"]["Error"];
967
+ };
968
+ };
969
+ };
970
+ };
971
+ "list-bindings": {
972
+ parameters: {
973
+ query?: {
974
+ /** @description 这一页最多返回多少条 */
975
+ limit?: number;
976
+ /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
977
+ offset?: number;
978
+ platform?: string;
979
+ channelId?: string;
980
+ /** @description 仅返回处于活跃状态的绑定 */
981
+ active?: boolean;
982
+ };
983
+ header?: never;
984
+ path?: never;
985
+ cookie?: never;
986
+ };
987
+ requestBody?: never;
988
+ responses: {
989
+ /** @description OK */
990
+ 200: {
991
+ headers: {
992
+ [name: string]: unknown;
993
+ };
994
+ content: {
995
+ "application/json": components["schemas"]["LengthAwarePageBindingResource"];
996
+ };
997
+ };
998
+ /** @description Error */
999
+ default: {
1000
+ headers: {
1001
+ [name: string]: unknown;
1002
+ };
1003
+ content: {
1004
+ "application/json": components["schemas"]["Error"];
1005
+ };
1006
+ };
1007
+ };
1008
+ };
1009
+ "get-binding": {
1010
+ parameters: {
1011
+ query?: never;
1012
+ header?: never;
1013
+ path: {
1014
+ binding: string;
1015
+ };
1016
+ cookie?: never;
1017
+ };
1018
+ requestBody?: never;
1019
+ responses: {
1020
+ /** @description OK */
1021
+ 200: {
1022
+ headers: {
1023
+ [name: string]: unknown;
1024
+ };
1025
+ content: {
1026
+ "application/json": components["schemas"]["BindingResource"];
1027
+ };
1028
+ };
1029
+ /** @description Error */
1030
+ default: {
1031
+ headers: {
1032
+ [name: string]: unknown;
1033
+ };
1034
+ content: {
1035
+ "application/json": components["schemas"]["Error"];
1036
+ };
1037
+ };
1038
+ };
1039
+ };
1040
+ "delete-binding": {
1041
+ parameters: {
1042
+ query?: never;
1043
+ header?: never;
1044
+ path: {
1045
+ binding: string;
1046
+ };
1047
+ cookie?: never;
1048
+ };
1049
+ requestBody?: never;
1050
+ responses: {
1051
+ /** @description No Content */
1052
+ 204: {
1053
+ headers: {
1054
+ [name: string]: unknown;
1055
+ };
1056
+ content?: never;
1057
+ };
1058
+ /** @description Error */
1059
+ default: {
1060
+ headers: {
1061
+ [name: string]: unknown;
1062
+ };
1063
+ content: {
1064
+ "application/json": components["schemas"]["Error"];
1065
+ };
1066
+ };
1067
+ };
1068
+ };
1069
+ "list-channels": {
1070
+ parameters: {
1071
+ query?: {
1072
+ /** @description 这一页最多返回多少条 */
1073
+ limit?: number;
1074
+ /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1075
+ offset?: number;
1076
+ platform?: string;
1077
+ /** @description 仅返回处于启用状态的通道 */
1078
+ active?: boolean;
1079
+ };
1080
+ header?: never;
1081
+ path?: never;
1082
+ cookie?: never;
1083
+ };
1084
+ requestBody?: never;
1085
+ responses: {
1086
+ /** @description OK */
1087
+ 200: {
1088
+ headers: {
1089
+ [name: string]: unknown;
1090
+ };
1091
+ content: {
1092
+ "application/json": components["schemas"]["LengthAwarePageChannelResource"];
1093
+ };
1094
+ };
1095
+ /** @description Error */
1096
+ default: {
1097
+ headers: {
1098
+ [name: string]: unknown;
1099
+ };
1100
+ content: {
1101
+ "application/json": components["schemas"]["Error"];
1102
+ };
1103
+ };
1104
+ };
1105
+ };
1106
+ "create-channel": {
1107
+ parameters: {
1108
+ query?: never;
1109
+ header?: never;
1110
+ path?: never;
1111
+ cookie?: never;
1112
+ };
1113
+ requestBody: {
1114
+ content: {
1115
+ "application/json": components["schemas"]["CreateChannelRequestBody"];
1116
+ };
1117
+ };
1118
+ responses: {
1119
+ /** @description Created */
1120
+ 201: {
1121
+ headers: {
1122
+ [name: string]: unknown;
1123
+ };
1124
+ content: {
1125
+ "application/json": components["schemas"]["ChannelWithSecretResponseBody"];
1126
+ };
1127
+ };
1128
+ /** @description Error */
1129
+ default: {
1130
+ headers: {
1131
+ [name: string]: unknown;
1132
+ };
1133
+ content: {
1134
+ "application/json": components["schemas"]["Error"];
1135
+ };
1136
+ };
1137
+ };
1138
+ };
1139
+ "get-channel": {
1140
+ parameters: {
1141
+ query?: never;
1142
+ header?: never;
1143
+ path: {
1144
+ channel: string;
1145
+ };
1146
+ cookie?: never;
1147
+ };
1148
+ requestBody?: never;
1149
+ responses: {
1150
+ /** @description OK */
1151
+ 200: {
1152
+ headers: {
1153
+ [name: string]: unknown;
1154
+ };
1155
+ content: {
1156
+ "application/json": components["schemas"]["ChannelResource"];
1157
+ };
1158
+ };
1159
+ /** @description Error */
1160
+ default: {
1161
+ headers: {
1162
+ [name: string]: unknown;
1163
+ };
1164
+ content: {
1165
+ "application/json": components["schemas"]["Error"];
1166
+ };
1167
+ };
1168
+ };
1169
+ };
1170
+ "delete-channel": {
1171
+ parameters: {
1172
+ query?: never;
1173
+ header?: never;
1174
+ path: {
1175
+ channel: string;
1176
+ };
1177
+ cookie?: never;
1178
+ };
1179
+ requestBody?: never;
1180
+ responses: {
1181
+ /** @description No Content */
1182
+ 204: {
1183
+ headers: {
1184
+ [name: string]: unknown;
1185
+ };
1186
+ content?: never;
1187
+ };
1188
+ /** @description Error */
1189
+ default: {
1190
+ headers: {
1191
+ [name: string]: unknown;
1192
+ };
1193
+ content: {
1194
+ "application/json": components["schemas"]["Error"];
1195
+ };
1196
+ };
1197
+ };
1198
+ };
1199
+ "update-channel": {
1200
+ parameters: {
1201
+ query?: never;
1202
+ header?: never;
1203
+ path: {
1204
+ channel: string;
1205
+ };
1206
+ cookie?: never;
1207
+ };
1208
+ requestBody: {
1209
+ content: {
1210
+ "application/json": components["schemas"]["UpdateChannelRequestBody"];
1211
+ };
1212
+ };
1213
+ responses: {
1214
+ /** @description OK */
1215
+ 200: {
1216
+ headers: {
1217
+ [name: string]: unknown;
1218
+ };
1219
+ content: {
1220
+ "application/json": components["schemas"]["ChannelResource"];
1221
+ };
1222
+ };
1223
+ /** @description Error */
1224
+ default: {
1225
+ headers: {
1226
+ [name: string]: unknown;
1227
+ };
1228
+ content: {
1229
+ "application/json": components["schemas"]["Error"];
1230
+ };
1231
+ };
1232
+ };
1233
+ };
1234
+ "create-binding-code": {
1235
+ parameters: {
1236
+ query?: never;
1237
+ header?: never;
1238
+ path: {
1239
+ channel: string;
1240
+ };
1241
+ cookie?: never;
1242
+ };
1243
+ requestBody?: never;
1244
+ responses: {
1245
+ /** @description Created */
1246
+ 201: {
1247
+ headers: {
1248
+ [name: string]: unknown;
1249
+ };
1250
+ content: {
1251
+ "application/json": components["schemas"]["BindingCodeResponseBody"];
1252
+ };
1253
+ };
1254
+ /** @description Error */
1255
+ default: {
1256
+ headers: {
1257
+ [name: string]: unknown;
1258
+ };
1259
+ content: {
1260
+ "application/json": components["schemas"]["Error"];
1261
+ };
1262
+ };
1263
+ };
1264
+ };
1265
+ "list-channel-rejections": {
1266
+ parameters: {
1267
+ query?: {
1268
+ limit?: number;
1269
+ };
1270
+ header?: never;
1271
+ path: {
1272
+ channel: string;
1273
+ };
1274
+ cookie?: never;
1275
+ };
1276
+ requestBody?: never;
1277
+ responses: {
1278
+ /** @description OK */
1279
+ 200: {
1280
+ headers: {
1281
+ [name: string]: unknown;
1282
+ };
1283
+ content: {
1284
+ "application/json": components["schemas"]["RejectionListResponseBody"];
1285
+ };
1286
+ };
1287
+ /** @description Error */
1288
+ default: {
1289
+ headers: {
1290
+ [name: string]: unknown;
1291
+ };
1292
+ content: {
1293
+ "application/json": components["schemas"]["Error"];
1294
+ };
1295
+ };
1296
+ };
1297
+ };
1298
+ "rotate-channel-secret": {
1299
+ parameters: {
1300
+ query?: never;
1301
+ header?: never;
1302
+ path: {
1303
+ channel: string;
1304
+ };
1305
+ cookie?: never;
1306
+ };
1307
+ requestBody?: {
1308
+ content: {
1309
+ "application/json": components["schemas"]["RotateSecretRequestBody"];
1310
+ };
1311
+ };
1312
+ responses: {
1313
+ /** @description OK */
1314
+ 200: {
1315
+ headers: {
1316
+ [name: string]: unknown;
1317
+ };
1318
+ content: {
1319
+ "application/json": components["schemas"]["WebhookSecretResponseBody"];
1320
+ };
1321
+ };
1322
+ /** @description Error */
1323
+ default: {
1324
+ headers: {
1325
+ [name: string]: unknown;
1326
+ };
1327
+ content: {
1328
+ "application/json": components["schemas"]["Error"];
1329
+ };
1330
+ };
1331
+ };
1332
+ };
1333
+ "check-sender": {
1334
+ parameters: {
1335
+ query: {
1336
+ /** @description 平台上那个人的 id,和绑定、被拒记录里的是同一个值 */
1337
+ peerId: string;
1338
+ /** @description 仅 Telegram 这类有用户名的平台填得出来,不带 @。留空即当作没有用户名 */
1339
+ username?: string;
1340
+ };
1341
+ header?: never;
1342
+ path: {
1343
+ channel: string;
1344
+ };
1345
+ cookie?: never;
1346
+ };
1347
+ requestBody?: never;
1348
+ responses: {
1349
+ /** @description OK */
1350
+ 200: {
1351
+ headers: {
1352
+ [name: string]: unknown;
1353
+ };
1354
+ content: {
1355
+ "application/json": components["schemas"]["SenderCheckResource"];
1356
+ };
1357
+ };
1358
+ /** @description Error */
1359
+ default: {
1360
+ headers: {
1361
+ [name: string]: unknown;
1362
+ };
1363
+ content: {
1364
+ "application/json": components["schemas"]["Error"];
1365
+ };
1366
+ };
1367
+ };
1368
+ };
1369
+ "begin-weixin-login": {
1370
+ parameters: {
1371
+ query?: never;
1372
+ header?: never;
1373
+ path: {
1374
+ channel: string;
1375
+ };
1376
+ cookie?: never;
1377
+ };
1378
+ requestBody?: never;
1379
+ responses: {
1380
+ /** @description Created */
1381
+ 201: {
1382
+ headers: {
1383
+ [name: string]: unknown;
1384
+ };
1385
+ content: {
1386
+ "application/json": components["schemas"]["LoginResource"];
1387
+ };
1388
+ };
1389
+ /** @description Error */
1390
+ default: {
1391
+ headers: {
1392
+ [name: string]: unknown;
1393
+ };
1394
+ content: {
1395
+ "application/json": components["schemas"]["Error"];
1396
+ };
1397
+ };
1398
+ };
1399
+ };
1400
+ "list-platforms": {
1401
+ parameters: {
1402
+ query?: never;
1403
+ header?: never;
1404
+ path?: never;
1405
+ cookie?: never;
1406
+ };
1407
+ requestBody?: never;
1408
+ responses: {
1409
+ /** @description OK */
1410
+ 200: {
1411
+ headers: {
1412
+ [name: string]: unknown;
1413
+ };
1414
+ content: {
1415
+ "application/json": components["schemas"]["PlatformListResponseBody"];
1416
+ };
1417
+ };
1418
+ /** @description Error */
1419
+ default: {
1420
+ headers: {
1421
+ [name: string]: unknown;
1422
+ };
1423
+ content: {
1424
+ "application/json": components["schemas"]["Error"];
1425
+ };
1426
+ };
1427
+ };
1428
+ };
1429
+ "get-weixin-login": {
1430
+ parameters: {
1431
+ query?: never;
1432
+ header?: never;
1433
+ path: {
1434
+ login: string;
1435
+ };
1436
+ cookie?: never;
1437
+ };
1438
+ requestBody?: never;
1439
+ responses: {
1440
+ /** @description OK */
1441
+ 200: {
1442
+ headers: {
1443
+ [name: string]: unknown;
1444
+ };
1445
+ content: {
1446
+ "application/json": components["schemas"]["LoginResource"];
1447
+ };
1448
+ };
1449
+ /** @description Error */
1450
+ default: {
1451
+ headers: {
1452
+ [name: string]: unknown;
1453
+ };
1454
+ content: {
1455
+ "application/json": components["schemas"]["Error"];
1456
+ };
1457
+ };
1458
+ };
1459
+ };
1460
+ "submit-weixin-verify-code": {
1461
+ parameters: {
1462
+ query?: never;
1463
+ header?: never;
1464
+ path: {
1465
+ login: string;
1466
+ };
1467
+ cookie?: never;
1468
+ };
1469
+ requestBody: {
1470
+ content: {
1471
+ "application/json": components["schemas"]["VerifyCodeRequestBody"];
1472
+ };
1473
+ };
1474
+ responses: {
1475
+ /** @description OK */
1476
+ 200: {
1477
+ headers: {
1478
+ [name: string]: unknown;
1479
+ };
1480
+ content: {
1481
+ "application/json": components["schemas"]["LoginResource"];
1482
+ };
1483
+ };
1484
+ /** @description Error */
1485
+ default: {
1486
+ headers: {
1487
+ [name: string]: unknown;
1488
+ };
1489
+ content: {
1490
+ "application/json": components["schemas"]["Error"];
1491
+ };
1492
+ };
1493
+ };
1494
+ };
1495
+ "list-models": {
1496
+ parameters: {
1497
+ query?: never;
1498
+ header?: never;
1499
+ path?: never;
1500
+ cookie?: never;
1501
+ };
1502
+ requestBody?: never;
1503
+ responses: {
1504
+ /** @description OK */
1505
+ 200: {
1506
+ headers: {
1507
+ [name: string]: unknown;
1508
+ };
1509
+ content: {
1510
+ "application/json": components["schemas"]["ModelListResponseBody"];
1511
+ };
1512
+ };
1513
+ /** @description Error */
1514
+ default: {
1515
+ headers: {
1516
+ [name: string]: unknown;
1517
+ };
1518
+ content: {
1519
+ "application/json": components["schemas"]["Error"];
1520
+ };
1521
+ };
1522
+ };
1523
+ };
1524
+ "list-threads": {
1525
+ parameters: {
1526
+ query?: {
1527
+ /** @description 按标题搜索,大小写不敏感。留空则返回最近的对话 */
1528
+ q?: string;
1529
+ /** @description 为真时**只**返回已归档的对话,否则只返回未归档的 */
1530
+ archived?: boolean;
1531
+ limit?: number;
1532
+ };
1533
+ header?: never;
1534
+ path?: never;
1535
+ cookie?: never;
1536
+ };
1537
+ requestBody?: never;
1538
+ responses: {
1539
+ /** @description OK */
1540
+ 200: {
1541
+ headers: {
1542
+ [name: string]: unknown;
1543
+ };
1544
+ content: {
1545
+ "application/json": components["schemas"]["ThreadListResponseBody"];
1546
+ };
1547
+ };
1548
+ /** @description Error */
1549
+ default: {
1550
+ headers: {
1551
+ [name: string]: unknown;
1552
+ };
1553
+ content: {
1554
+ "application/json": components["schemas"]["Error"];
1555
+ };
1556
+ };
1557
+ };
1558
+ };
1559
+ "create-thread": {
1560
+ parameters: {
1561
+ query?: never;
1562
+ header?: never;
1563
+ path?: never;
1564
+ cookie?: never;
1565
+ };
1566
+ requestBody: {
1567
+ content: {
1568
+ "application/json": components["schemas"]["CreateThreadRequestBody"];
1569
+ };
1570
+ };
1571
+ responses: {
1572
+ /** @description Created */
1573
+ 201: {
1574
+ headers: {
1575
+ [name: string]: unknown;
1576
+ };
1577
+ content: {
1578
+ "application/json": components["schemas"]["ThreadSummaryResource"];
1579
+ };
1580
+ };
1581
+ /** @description Error */
1582
+ default: {
1583
+ headers: {
1584
+ [name: string]: unknown;
1585
+ };
1586
+ content: {
1587
+ "application/json": components["schemas"]["Error"];
1588
+ };
1589
+ };
1590
+ };
1591
+ };
1592
+ "get-thread": {
1593
+ parameters: {
1594
+ query?: never;
1595
+ header?: never;
1596
+ path: {
1597
+ thread: string;
1598
+ };
1599
+ cookie?: never;
1600
+ };
1601
+ requestBody?: never;
1602
+ responses: {
1603
+ /** @description OK */
1604
+ 200: {
1605
+ headers: {
1606
+ [name: string]: unknown;
1607
+ };
1608
+ content: {
1609
+ "application/json": components["schemas"]["DocumentResource"];
1610
+ };
1611
+ };
1612
+ /** @description Error */
1613
+ default: {
1614
+ headers: {
1615
+ [name: string]: unknown;
1616
+ };
1617
+ content: {
1618
+ "application/json": components["schemas"]["Error"];
1619
+ };
1620
+ };
1621
+ };
1622
+ };
1623
+ "update-thread": {
1624
+ parameters: {
1625
+ query?: never;
1626
+ header?: never;
1627
+ path: {
1628
+ thread: string;
1629
+ };
1630
+ cookie?: never;
1631
+ };
1632
+ requestBody: {
1633
+ content: {
1634
+ "application/json": components["schemas"]["UpdateThreadRequestBody"];
1635
+ };
1636
+ };
1637
+ responses: {
1638
+ /** @description OK */
1639
+ 200: {
1640
+ headers: {
1641
+ [name: string]: unknown;
1642
+ };
1643
+ content: {
1644
+ "application/json": components["schemas"]["ThreadSummaryResource"];
1645
+ };
1646
+ };
1647
+ /** @description Error */
1648
+ default: {
1649
+ headers: {
1650
+ [name: string]: unknown;
1651
+ };
1652
+ content: {
1653
+ "application/json": components["schemas"]["Error"];
1654
+ };
1655
+ };
1656
+ };
1657
+ };
1658
+ "decide-approval": {
1659
+ parameters: {
1660
+ query?: never;
1661
+ header?: never;
1662
+ path: {
1663
+ thread: string;
1664
+ batch: string;
1665
+ };
1666
+ cookie?: never;
1667
+ };
1668
+ requestBody: {
1669
+ content: {
1670
+ "application/json": components["schemas"]["DecideRequestBody"];
1671
+ };
1672
+ };
1673
+ responses: {
1674
+ /** @description No Content */
1675
+ 204: {
1676
+ headers: {
1677
+ [name: string]: unknown;
1678
+ };
1679
+ content?: never;
1680
+ };
1681
+ /** @description Error */
1682
+ default: {
1683
+ headers: {
1684
+ [name: string]: unknown;
1685
+ };
1686
+ content: {
1687
+ "application/json": components["schemas"]["Error"];
1688
+ };
1689
+ };
1690
+ };
1691
+ };
1692
+ "list-earlier-items": {
1693
+ parameters: {
1694
+ query: {
1695
+ /** @description 来自文档里的 earlier.before,取这个序号之前的条目 */
1696
+ before: number;
1697
+ };
1698
+ header?: never;
1699
+ path: {
1700
+ thread: string;
1701
+ };
1702
+ cookie?: never;
1703
+ };
1704
+ requestBody?: never;
1705
+ responses: {
1706
+ /** @description OK */
1707
+ 200: {
1708
+ headers: {
1709
+ [name: string]: unknown;
1710
+ };
1711
+ content: {
1712
+ "application/json": components["schemas"]["EarlierResponseBody"];
1713
+ };
1714
+ };
1715
+ /** @description Error */
1716
+ default: {
1717
+ headers: {
1718
+ [name: string]: unknown;
1719
+ };
1720
+ content: {
1721
+ "application/json": components["schemas"]["Error"];
1722
+ };
1723
+ };
1724
+ };
1725
+ };
1726
+ "interrupt-thread": {
1727
+ parameters: {
1728
+ query?: never;
1729
+ header?: never;
1730
+ path: {
1731
+ thread: string;
1732
+ };
1733
+ cookie?: never;
1734
+ };
1735
+ requestBody?: never;
1736
+ responses: {
1737
+ /** @description No Content */
1738
+ 204: {
1739
+ headers: {
1740
+ [name: string]: unknown;
1741
+ };
1742
+ content?: never;
1743
+ };
1744
+ /** @description Error */
1745
+ default: {
1746
+ headers: {
1747
+ [name: string]: unknown;
1748
+ };
1749
+ content: {
1750
+ "application/json": components["schemas"]["Error"];
1751
+ };
1752
+ };
1753
+ };
1754
+ };
1755
+ "send-message": {
1756
+ parameters: {
1757
+ query?: never;
1758
+ header?: never;
1759
+ path: {
1760
+ thread: string;
1761
+ };
1762
+ cookie?: never;
1763
+ };
1764
+ requestBody: {
1765
+ content: {
1766
+ "application/json": components["schemas"]["SendMessageRequestBody"];
1767
+ };
1768
+ };
1769
+ responses: {
1770
+ /** @description Accepted */
1771
+ 202: {
1772
+ headers: {
1773
+ [name: string]: unknown;
1774
+ };
1775
+ content: {
1776
+ "application/json": components["schemas"]["TurnIDResponseBody"];
1777
+ };
1778
+ };
1779
+ /** @description Error */
1780
+ default: {
1781
+ headers: {
1782
+ [name: string]: unknown;
1783
+ };
1784
+ content: {
1785
+ "application/json": components["schemas"]["Error"];
1786
+ };
1787
+ };
1788
+ };
1789
+ };
1790
+ "answer-question": {
1791
+ parameters: {
1792
+ query?: never;
1793
+ header?: never;
1794
+ path: {
1795
+ thread: string;
1796
+ item: string;
1797
+ };
1798
+ cookie?: never;
1799
+ };
1800
+ requestBody: {
1801
+ content: {
1802
+ "application/json": components["schemas"]["AnswerRequestBody"];
1803
+ };
1804
+ };
1805
+ responses: {
1806
+ /** @description No Content */
1807
+ 204: {
1808
+ headers: {
1809
+ [name: string]: unknown;
1810
+ };
1811
+ content?: never;
1812
+ };
1813
+ /** @description Error */
1814
+ default: {
1815
+ headers: {
1816
+ [name: string]: unknown;
1817
+ };
1818
+ content: {
1819
+ "application/json": components["schemas"]["Error"];
1820
+ };
1821
+ };
1822
+ };
1823
+ };
1824
+ "mark-thread-read": {
1825
+ parameters: {
1826
+ query?: never;
1827
+ header?: never;
1828
+ path: {
1829
+ thread: string;
1830
+ };
1831
+ cookie?: never;
1832
+ };
1833
+ requestBody?: never;
1834
+ responses: {
1835
+ /** @description No Content */
1836
+ 204: {
1837
+ headers: {
1838
+ [name: string]: unknown;
1839
+ };
1840
+ content?: never;
1841
+ };
1842
+ /** @description Error */
1843
+ default: {
1844
+ headers: {
1845
+ [name: string]: unknown;
1846
+ };
1847
+ content: {
1848
+ "application/json": components["schemas"]["Error"];
1849
+ };
1850
+ };
1851
+ };
1852
+ };
1853
+ "revert-thread": {
1854
+ parameters: {
1855
+ query?: never;
1856
+ header?: never;
1857
+ path: {
1858
+ thread: string;
1859
+ };
1860
+ cookie?: never;
1861
+ };
1862
+ requestBody: {
1863
+ content: {
1864
+ "application/json": components["schemas"]["RevertRequestBody"];
1865
+ };
1866
+ };
1867
+ responses: {
1868
+ /** @description OK */
1869
+ 200: {
1870
+ headers: {
1871
+ [name: string]: unknown;
1872
+ };
1873
+ content: {
1874
+ "application/json": components["schemas"]["RevertedCountResponseBody"];
1875
+ };
1876
+ };
1877
+ /** @description Error */
1878
+ default: {
1879
+ headers: {
1880
+ [name: string]: unknown;
1881
+ };
1882
+ content: {
1883
+ "application/json": components["schemas"]["Error"];
1884
+ };
1885
+ };
1886
+ };
1887
+ };
1888
+ }