@leaflow/sdk 0.0.0-dev.11.g7f2d603 → 0.0.0-dev.111.g0e20563

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.
package/README.md CHANGED
@@ -1,24 +1,34 @@
1
1
  # leaflow-ts
2
2
 
3
- Leaflow 平台的 TypeScript SDK(`@leaflow/sdk`)。
4
- `gen/` 下全是产物,源在 `LeaflowNET/leaflowapis`。
3
+ Leaflow 平台的 TypeScript SDK(`@leaflow/sdk`),由
4
+ [leaflowapis](https://github.com/leaflowapis/leaflowapis) 生成。
5
5
 
6
- ## 为什么和 Go 分开在两个仓库
6
+ ```
7
+ npm i @leaflow/sdk openapi-fetch
8
+ ```
7
9
 
8
- **它们在同一个仓库里会抢同一个 tag 空间。** Go 的子目录模块要 `go/v1.2.3` 这种带前缀的 tag,
9
- npm 要 `v1.2.3`——上一版两者挤在一个仓库里,结果是 Go 那半从来没被正确发布过,而没有任何东西
10
- 会报错(`go get` 只是拿不到)。
10
+ 当前只含类型。请求由 `openapi-fetch` 发出,路径与参数由契约约束。
11
11
 
12
- ## 契约是一个 submodule
12
+ ```ts
13
+ import createClient from 'openapi-fetch';
14
+ import type { compute } from '@leaflow/sdk';
13
15
 
16
+ const api = createClient<compute.paths>({
17
+ baseUrl: 'https://compute.leaflow.cloud',
18
+ headers: { Authorization: `Bearer ${token}` },
19
+ });
20
+
21
+ const { data, error } = await api.GET('/api/v1/instances', {
22
+ params: { query: { limit: 20 } },
23
+ });
14
24
  ```
15
- leaflowapis/ 钉在某一个 commit 上——那个指针就是「这版 SDK 出自哪版契约」的答案
16
- ```
25
+
26
+ 每个操作另有 `<操作>Result` / `<操作>Body` / `<操作>Query` 三个类型别名。
27
+
28
+ ## 重新生成
17
29
 
18
30
  ```
19
- git submodule update --remote leaflowapis # 要跟进新契约时才做
20
31
  npm run generate
21
32
  ```
22
33
 
23
- 产物由人在本地跑完提交,CI 只验证不写回:一个会 commit 回来的流水线,在两次推送挨得近时只能靠
24
- 重试或者强推——前者会打架,后者会丢东西。
34
+ 契约版本记在 `CONTRACTS_REF`。
@@ -1,5 +1,9 @@
1
1
  export type { paths, components, operations, webhooks } from "./schema.js";
2
2
  import type { operations } from "./schema.js";
3
+ /** `GET /account/v1/settings` 成功时的响应体。 */
4
+ export type GetSettingsResult = operations["get-settings"]["responses"][200]["content"]["application/json"];
5
+ /** `GET /account/v1/locales` 成功时的响应体。 */
6
+ export type ListLocalesResult = operations["list-locales"]["responses"][200]["content"]["application/json"];
3
7
  /** `GET /account/v1/agreements` 成功时的响应体。 */
4
8
  export type ListAgreementsResult = operations["list-agreements"]["responses"][200]["content"]["application/json"];
5
9
  /** `GET /account/v1/me/consents` 成功时的响应体。 */
@@ -14,6 +18,10 @@ export type RegisterResult = operations["register"]["responses"][201]["content"]
14
18
  export type RegisterBody = NonNullable<operations["register"]["requestBody"]>["content"]["application/json"];
15
19
  /** `GET /account/v1/me` 成功时的响应体。 */
16
20
  export type GetAccountResult = operations["get-account"]["responses"][200]["content"]["application/json"];
21
+ /** `PATCH /account/v1/me` 成功时的响应体。 */
22
+ export type UpdateAccountResult = operations["update-account"]["responses"][200]["content"]["application/json"];
23
+ /** `PATCH /account/v1/me` 的请求体。 */
24
+ export type UpdateAccountBody = NonNullable<operations["update-account"]["requestBody"]>["content"]["application/json"];
17
25
  /** `GET /account/v1/me/identity-verification` 成功时的响应体。 */
18
26
  export type GetIdentityVerificationResult = operations["get-identity-verification"]["responses"][200]["content"]["application/json"];
19
27
  /** `POST /account/v1/me/identity-verification` 成功时的响应体。 */
@@ -24,6 +32,10 @@ export type SubmitIdentityVerificationBody = NonNullable<operations["submit-iden
24
32
  export type ListMyInvitationsResult = operations["list-my-invitations"]["responses"][200]["content"]["application/json"];
25
33
  /** `GET /account/v1/me/invitations` 的查询参数。 */
26
34
  export type ListMyInvitationsQuery = operations["list-my-invitations"]["parameters"]["query"];
35
+ /** `GET /account/v1/invitations/by-token` 成功时的响应体。 */
36
+ export type PreviewInvitationByTokenResult = operations["preview-invitation-by-token"]["responses"][200]["content"]["application/json"];
37
+ /** `GET /account/v1/invitations/by-token` 的查询参数。 */
38
+ export type PreviewInvitationByTokenQuery = operations["preview-invitation-by-token"]["parameters"]["query"];
27
39
  /** `POST /account/v1/me/invitations/accept` 成功时的响应体。 */
28
40
  export type AcceptInvitationByTokenResult = operations["accept-invitation-by-token"]["responses"][200]["content"]["application/json"];
29
41
  /** `POST /account/v1/me/invitations/accept` 的请求体。 */
@@ -3,6 +3,52 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  export interface paths {
6
+ "/account/v1/settings": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ /**
14
+ * 这个平台现在收不收人
15
+ * @description 注册页和「新建项目」按钮用它决定画什么。不需要令牌。
16
+ *
17
+ * `registration_mode` 不是 `OPEN` 时 `POST /account/v1/register` 会答 403:`CLOSED` 是整个关着,`INVITE_ONLY` 是只收手上有项目邀请的邮箱。`project_creation_mode` 同理,`VERIFIED_ONLY` 要先过实名。
18
+ *
19
+ * 两条配额是 0 表示不限。它们只用来提前提示,真正的判定在写入那一刻。
20
+ */
21
+ get: operations["get-settings"];
22
+ put?: never;
23
+ post?: never;
24
+ delete?: never;
25
+ options?: never;
26
+ head?: never;
27
+ patch?: never;
28
+ trace?: never;
29
+ };
30
+ "/account/v1/locales": {
31
+ parameters: {
32
+ query?: never;
33
+ header?: never;
34
+ path?: never;
35
+ cookie?: never;
36
+ };
37
+ /**
38
+ * 注册页要用的国家/地区和语言清单
39
+ * @description 免认证:注册页在还没有账号的时候就要画出这两个下拉框。
40
+ * 国家名和排序都跟着 `Accept-Language` 走——一个英文用户看到的是 China 而不是「中国」, 而顺序按那种语言自己的规则(中文按拼音,英文按字母),不是按码点。头缺失时用简体中文。
41
+ * 清单来自 CLDR,不是我们自己维护的一份:ISO 3166 每年都改,而抄下来的那份不会跟着改。 已经退役的代码(苏联、南斯拉夫)和不是地方的代码(欧盟、联合国)都不在里面。
42
+ */
43
+ get: operations["list-locales"];
44
+ put?: never;
45
+ post?: never;
46
+ delete?: never;
47
+ options?: never;
48
+ head?: never;
49
+ patch?: never;
50
+ trace?: never;
51
+ };
6
52
  "/account/v1/agreements": {
7
53
  parameters: {
8
54
  query?: never;
@@ -90,7 +136,11 @@ export interface paths {
90
136
  delete?: never;
91
137
  options?: never;
92
138
  head?: never;
93
- patch?: never;
139
+ /**
140
+ * 改当前账号的国家/地区和语言
141
+ * @description 姓名和邮箱不在这里改:它们来自身份提供方,改了会在下一次登录同步时被覆盖回去。
142
+ */
143
+ patch: operations["update-account"];
94
144
  trace?: never;
95
145
  };
96
146
  "/account/v1/me/identity-verification": {
@@ -137,6 +187,30 @@ export interface paths {
137
187
  patch?: never;
138
188
  trace?: never;
139
189
  };
190
+ "/account/v1/invitations/by-token": {
191
+ parameters: {
192
+ query?: never;
193
+ header?: never;
194
+ path?: never;
195
+ cookie?: never;
196
+ };
197
+ /**
198
+ * 看一眼这封邀请是谁发的、加入哪儿、什么角色
199
+ * @description 免认证,而且是有意的:点邮件里那条链接的人多半还没登录,甚至还没有账号。要他先注册再 告诉他这是谁发来的、加入哪个项目,等于让他在不知道要加入什么的情况下决定要不要注册。
200
+ * 它不多泄露任何东西。 这三样——项目名、邀请人、角色——邮件正文里已经写着了,而读得到 这个令牌的人就是收得到那封邮件的人。同一个令牌本来就能把持有者加进项目(见 `accept-invitation-by-token`),读一个项目名比那件事轻得多。
201
+ * 收件地址打了码(`t***@example.com`)。 不打码的话,这个接口就成了「拿一个令牌反查它 当初寄给了哪个地址」——而那是邮件正文里没有、持有者也未必知道的一件事。
202
+ * 令牌不存在、已经用过、被撤回、过期,四种情况同一个 404 和同一句话。分开报会把它变成 一个可以拿来试令牌的探针,而这个接口免认证,任何人都试得起。
203
+ * 它不在 `/me` 下面,隔壁那两条接受要约的在。 `/me` 的意思是「按这次请求的身份认出来 的、属于我的那些」,而这条路上没有身份——持有令牌的人未必是收件人本人。挂在 `/me` 下面会让读的人以为它认过身份,而那正是这条路唯一不做的事。
204
+ */
205
+ get: operations["preview-invitation-by-token"];
206
+ put?: never;
207
+ post?: never;
208
+ delete?: never;
209
+ options?: never;
210
+ head?: never;
211
+ patch?: never;
212
+ trace?: never;
213
+ };
140
214
  "/account/v1/me/invitations/accept": {
141
215
  parameters: {
142
216
  query?: never;
@@ -242,6 +316,28 @@ export interface components {
242
316
  /** Format: int64 */
243
317
  status: number;
244
318
  };
319
+ SettingsResource: {
320
+ /**
321
+ * Format: int64
322
+ * @description 一个项目最多几个成员,0 表示不限
323
+ */
324
+ max_members_per_project: number;
325
+ /**
326
+ * Format: int64
327
+ * @description 你最多能当几个项目的所有者,0 表示不限。已删除的项目不算在内
328
+ */
329
+ max_projects_per_user: number;
330
+ /**
331
+ * @description VERIFIED_ONLY 要求先过实名,审核中不算
332
+ * @enum {string}
333
+ */
334
+ project_creation_mode: "OPEN" | "VERIFIED_ONLY" | "CLOSED";
335
+ /**
336
+ * @description INVITE_ONLY 是只收手上有项目邀请的邮箱
337
+ * @enum {string}
338
+ */
339
+ registration_mode: "OPEN" | "INVITE_ONLY" | "CLOSED";
340
+ };
245
341
  AgreementResource: {
246
342
  /**
247
343
  * Format: date-time
@@ -293,6 +389,10 @@ export interface components {
293
389
  id: string;
294
390
  /** @description 来自登录信息,可能为空 */
295
391
  last_name: string;
392
+ /** @description ISO 3166-1 alpha-2。这两个字段是后加的,注册时才开始要求填——已经注册过的人这里 是空串,让他们在设置里补,补之前一切照常。 */
393
+ country?: string;
394
+ /** @description 为空表示没设过,那时按请求头(Accept-Language)走,两者都没有才用平台默认 */
395
+ locale?: string;
296
396
  pending_agreements: components["schemas"]["AgreementResource"][] | null;
297
397
  /** @enum {string} */
298
398
  status: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING";
@@ -300,6 +400,35 @@ export interface components {
300
400
  RegisterRequestBody: {
301
401
  /** @description 当前生效的必签文件全部要在里面,版本号要和 GET /api/v1/agreements 给的一致 */
302
402
  consents: components["schemas"]["ConsentBody"][] | null;
403
+ /** @description ISO 3166-1 alpha-2(CN、HK、US)。必须是现实世界里真实存在的国家或地区——EU、ZZ 这类在标准里有位置但不是国家的代码会被拒。存代码不存名字:名字是本地化的,存下来 的那份只会是某一种语言的。 */
404
+ country: string;
405
+ locale: components["schemas"]["Locale"];
406
+ };
407
+ LocaleOptionsResource: {
408
+ countries: components["schemas"]["CountryOption"][];
409
+ languages: components["schemas"]["LanguageOption"][];
410
+ };
411
+ CountryOption: {
412
+ /** @description ISO 3166-1 alpha-2,注册时原样回传 */
413
+ code: string;
414
+ /** @description 按 Accept-Language 渲染的名字 */
415
+ name: string;
416
+ };
417
+ LanguageOption: {
418
+ code: components["schemas"]["Locale"];
419
+ /** @description 这种语言的自称,用它自己写(「简体中文」「繁體中文(香港)」「English」)。不跟着 Accept-Language 变——一个只看得懂繁体的人,在一个全简体的列表里找不到自己那一项。 */
420
+ name: string;
421
+ };
422
+ /**
423
+ * @description 界面和邮件用哪种语言。它和 country 是两件事,不能互相推——一个在香港的人可能读简体, 一个在美国的人可能读繁体。
424
+ * @enum {string}
425
+ */
426
+ Locale: "zh-Hans" | "zh-Hant-HK" | "en";
427
+ /** @description 两个字段都是「不传就不动」。设置页上它们是两个独立的控件,用户可能只改其中一个;做成 整体替换的话,一次只想改语言的提交会把国家清掉,而那种丢失不报错。 */
428
+ UpdateAccountRequestBody: {
429
+ /** @description 同注册时那个 country */
430
+ country?: string;
431
+ locale?: components["schemas"]["Locale"];
303
432
  };
304
433
  IdentityVerificationResource: {
305
434
  reject_reason: string;
@@ -319,6 +448,21 @@ export interface components {
319
448
  /** @description 真实姓名。敏感个人信息,加密入库,任何接口都不会再把它读出来 */
320
449
  real_name: string;
321
450
  };
451
+ /**
452
+ * @description 一封邀请在被接受之前能给出的全部信息。
453
+ * 它比 InvitationResource 少两样:要约 id 和完整的收件地址。id 不给是因为持有令牌不等于 这封要约列在你名下——真正列在你名下的那些走 list-my-invitations,那条是认过身份的。
454
+ */
455
+ InvitationPreviewResource: {
456
+ /** @description 打过码的收件地址,只够收件人认出「这是发给我的」 */
457
+ email_masked: string;
458
+ /** Format: date-time */
459
+ expires_at: string;
460
+ /** @description 邀请人的显示名,姓名都空时是他的邮箱 */
461
+ invited_by_name: string;
462
+ project_name: string;
463
+ /** @description 接受之后会拿到的角色,显示名 */
464
+ role_names: string[] | null;
465
+ };
322
466
  InvitationResource: {
323
467
  /** Format: date-time */
324
468
  created_at: string;
@@ -327,11 +471,21 @@ export interface components {
327
471
  expires_at: string;
328
472
  /** Format: uuid */
329
473
  id: string;
474
+ /** @description 发出这份要约的账号 id */
330
475
  invited_by: string;
476
+ /** @description 发出这份要约的人的显示名,姓名都空时是他的邮箱。它是读取那一刻的事实,不是发信时的快照 */
477
+ invited_by_name: string;
331
478
  /** Format: uuid */
332
479
  project_id: string;
480
+ /**
481
+ * @description 目标项目的名字。
482
+ * 它在这里,而这一度是刻意不给的——理由是「没接受就不是成员,而名字只有成员能读」。 那条克制在这个场景下站不住:邀请邮件正文里就写着项目名,收件人早就知道了,而一个 只显示 uuid 的邀请列表让人没法判断该不该接受。
483
+ */
484
+ project_name: string;
333
485
  /** @description 兑现时会授予的角色编码 */
334
486
  roles: string[] | null;
487
+ /** @description 上面那些编码的显示名,按同样的顺序。读者看的是「管理员」,不是 ADMIN */
488
+ role_names: string[] | null;
335
489
  };
336
490
  LengthAwarePageInvitationResource: {
337
491
  /** @description 这一页的内容 */
@@ -387,10 +541,24 @@ export interface components {
387
541
  GrantResource: {
388
542
  admin: boolean;
389
543
  owner: boolean;
390
- /** @description 持有的全部自定义角色的权限并集,已去重排序 */
391
- permissions: string[] | null;
392
544
  /** @description 持有的角色编码,只用于展示 */
393
545
  roles: string[] | null;
546
+ /** @description 他全部策略编译出来的规则。**不要自己遍历它做判定**——拿它配上自己那份权限目录交给 pkg/rbac:那里面的顺序(所有者不可被 deny、deny 优先于管理员、带资源范围的规则不 参与项目级判定)每一条都对着一种会静默放行的写法。 */
547
+ rules: components["schemas"]["RuleResource"][] | null;
548
+ };
549
+ ResourceRefResource: {
550
+ /** @description 是字符串而不是 uuid:dns 的 zone 标识是一个域名,而且它根本不在 IAM 的库里。匹配 语义是 glob,所以 *.example.com 能表达一批子域名;uuid 和域名都不含 glob 元字符, 对它们来说这就是精确相等。 */
551
+ id: string;
552
+ /** @description 形如 compute:instance、dns:zone,和权限名同一个命名空间 */
553
+ type: string;
554
+ };
555
+ RuleResource: {
556
+ /** @enum {string} */
557
+ effect: "allow" | "deny";
558
+ /** @description 支持尾部通配(compute:instance.*),通配必须带服务前缀 */
559
+ permissions: string[] | null;
560
+ /** @description 为空表示这条规则在整个项目范围内成立;非空则表示它只在这些资源上成立,而那意味着 它回答不了项目级的问题。 */
561
+ resources: components["schemas"]["ResourceRefResource"][] | null;
394
562
  };
395
563
  ProjectAccessResource: {
396
564
  grant: components["schemas"]["GrantResource"];
@@ -448,6 +616,64 @@ export interface components {
448
616
  }
449
617
  export type $defs = Record<string, never>;
450
618
  export interface operations {
619
+ "get-settings": {
620
+ parameters: {
621
+ query?: never;
622
+ header?: never;
623
+ path?: never;
624
+ cookie?: never;
625
+ };
626
+ requestBody?: never;
627
+ responses: {
628
+ /** @description OK */
629
+ 200: {
630
+ headers: {
631
+ [name: string]: unknown;
632
+ };
633
+ content: {
634
+ "application/json": components["schemas"]["SettingsResource"];
635
+ };
636
+ };
637
+ /** @description Error */
638
+ default: {
639
+ headers: {
640
+ [name: string]: unknown;
641
+ };
642
+ content: {
643
+ "application/json": components["schemas"]["Error"];
644
+ };
645
+ };
646
+ };
647
+ };
648
+ "list-locales": {
649
+ parameters: {
650
+ query?: never;
651
+ header?: never;
652
+ path?: never;
653
+ cookie?: never;
654
+ };
655
+ requestBody?: never;
656
+ responses: {
657
+ /** @description OK */
658
+ 200: {
659
+ headers: {
660
+ [name: string]: unknown;
661
+ };
662
+ content: {
663
+ "application/json": components["schemas"]["LocaleOptionsResource"];
664
+ };
665
+ };
666
+ /** @description Error */
667
+ default: {
668
+ headers: {
669
+ [name: string]: unknown;
670
+ };
671
+ content: {
672
+ "application/json": components["schemas"]["Error"];
673
+ };
674
+ };
675
+ };
676
+ };
451
677
  "list-agreements": {
452
678
  parameters: {
453
679
  query?: never;
@@ -601,6 +827,39 @@ export interface operations {
601
827
  };
602
828
  };
603
829
  };
830
+ "update-account": {
831
+ parameters: {
832
+ query?: never;
833
+ header?: never;
834
+ path?: never;
835
+ cookie?: never;
836
+ };
837
+ requestBody: {
838
+ content: {
839
+ "application/json": components["schemas"]["UpdateAccountRequestBody"];
840
+ };
841
+ };
842
+ responses: {
843
+ /** @description OK */
844
+ 200: {
845
+ headers: {
846
+ [name: string]: unknown;
847
+ };
848
+ content: {
849
+ "application/json": components["schemas"]["AccountResource"];
850
+ };
851
+ };
852
+ /** @description Error */
853
+ default: {
854
+ headers: {
855
+ [name: string]: unknown;
856
+ };
857
+ content: {
858
+ "application/json": components["schemas"]["Error"];
859
+ };
860
+ };
861
+ };
862
+ };
604
863
  "get-identity-verification": {
605
864
  parameters: {
606
865
  query?: never;
@@ -697,6 +956,38 @@ export interface operations {
697
956
  };
698
957
  };
699
958
  };
959
+ "preview-invitation-by-token": {
960
+ parameters: {
961
+ query: {
962
+ /** @description 邀请链接里那串令牌 */
963
+ token: string;
964
+ };
965
+ header?: never;
966
+ path?: never;
967
+ cookie?: never;
968
+ };
969
+ requestBody?: never;
970
+ responses: {
971
+ /** @description OK */
972
+ 200: {
973
+ headers: {
974
+ [name: string]: unknown;
975
+ };
976
+ content: {
977
+ "application/json": components["schemas"]["InvitationPreviewResource"];
978
+ };
979
+ };
980
+ /** @description Error */
981
+ default: {
982
+ headers: {
983
+ [name: string]: unknown;
984
+ };
985
+ content: {
986
+ "application/json": components["schemas"]["Error"];
987
+ };
988
+ };
989
+ };
990
+ };
700
991
  "accept-invitation-by-token": {
701
992
  parameters: {
702
993
  query?: never;
@@ -2,6 +2,8 @@ export type { paths, components, operations, webhooks } from "./schema.js";
2
2
  import type { operations } from "./schema.js";
3
3
  /** `POST /api/v1/attachments` 成功时的响应体。 */
4
4
  export type UploadAttachmentResult = operations["upload-attachment"]["responses"][201]["content"]["application/json"];
5
+ /** `POST /api/v1/attachments` 的查询参数。 */
6
+ export type UploadAttachmentQuery = operations["upload-attachment"]["parameters"]["query"];
5
7
  /** `GET /api/v1/bindings` 成功时的响应体。 */
6
8
  export type ListBindingsResult = operations["list-bindings"]["responses"][200]["content"]["application/json"];
7
9
  /** `GET /api/v1/bindings` 的查询参数。 */
@@ -46,8 +48,34 @@ export type GetWeixinLoginResult = operations["get-weixin-login"]["responses"][2
46
48
  export type SubmitWeixinVerifyCodeResult = operations["submit-weixin-verify-code"]["responses"][200]["content"]["application/json"];
47
49
  /** `POST /api/v1/weixin-logins/{login}/verify-code` 的请求体。 */
48
50
  export type SubmitWeixinVerifyCodeBody = NonNullable<operations["submit-weixin-verify-code"]["requestBody"]>["content"]["application/json"];
49
- /** `GET /api/v1/models` 成功时的响应体。 */
50
- export type ListModelsResult = operations["list-models"]["responses"][200]["content"]["application/json"];
51
+ /** `POST /api/v1/dynamic-calls/{call}/result` 的请求体。 */
52
+ export type SubmitDynamicCallResultBody = NonNullable<operations["submit-dynamic-call-result"]["requestBody"]>["content"]["application/json"];
53
+ /** `GET /api/v1/folders` 成功时的响应体。 */
54
+ export type ListFoldersResult = operations["list-folders"]["responses"][200]["content"]["application/json"];
55
+ /** `POST /api/v1/folders` 成功时的响应体。 */
56
+ export type CreateFolderResult = operations["create-folder"]["responses"][201]["content"]["application/json"];
57
+ /** `POST /api/v1/folders` 的请求体。 */
58
+ export type CreateFolderBody = NonNullable<operations["create-folder"]["requestBody"]>["content"]["application/json"];
59
+ /** `GET /api/v1/folders/{folder}` 成功时的响应体。 */
60
+ export type GetFolderResult = operations["get-folder"]["responses"][200]["content"]["application/json"];
61
+ /** `PATCH /api/v1/folders/{folder}` 成功时的响应体。 */
62
+ export type UpdateFolderResult = operations["update-folder"]["responses"][200]["content"]["application/json"];
63
+ /** `PATCH /api/v1/folders/{folder}` 的请求体。 */
64
+ export type UpdateFolderBody = NonNullable<operations["update-folder"]["requestBody"]>["content"]["application/json"];
65
+ /** `GET /api/v1/memories` 成功时的响应体。 */
66
+ export type ListMemoriesResult = operations["list-memories"]["responses"][200]["content"]["application/json"];
67
+ /** `GET /api/v1/skills` 成功时的响应体。 */
68
+ export type ListSkillsResult = operations["list-skills"]["responses"][200]["content"]["application/json"];
69
+ /** `POST /api/v1/skills` 成功时的响应体。 */
70
+ export type PutSkillResult = operations["put-skill"]["responses"][200]["content"]["application/json"];
71
+ /** `POST /api/v1/skills` 的请求体。 */
72
+ export type PutSkillBody = NonNullable<operations["put-skill"]["requestBody"]>["content"]["application/json"];
73
+ /** `GET /api/v1/skills/{skill}` 成功时的响应体。 */
74
+ export type GetSkillResult = operations["get-skill"]["responses"][200]["content"]["application/json"];
75
+ /** `PATCH /api/v1/skills/{skill}` 成功时的响应体。 */
76
+ export type SetSkillEnabledResult = operations["set-skill-enabled"]["responses"][200]["content"]["application/json"];
77
+ /** `PATCH /api/v1/skills/{skill}` 的请求体。 */
78
+ export type SetSkillEnabledBody = NonNullable<operations["set-skill-enabled"]["requestBody"]>["content"]["application/json"];
51
79
  /** `GET /api/v1/threads` 成功时的响应体。 */
52
80
  export type ListThreadsResult = operations["list-threads"]["responses"][200]["content"]["application/json"];
53
81
  /** `GET /api/v1/threads` 的查询参数。 */