@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,1157 @@
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
+ "/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
+ };
52
+ "/account/v1/agreements": {
53
+ parameters: {
54
+ query?: never;
55
+ header?: never;
56
+ path?: never;
57
+ cookie?: never;
58
+ };
59
+ /**
60
+ * 列出注册必须同意的文件
61
+ * @description 注册页显示它,用户同意之后把每一项的 `type` 和 `version` 原样回传给 `POST /api/v1/register`。
62
+ *
63
+ * 不需要令牌。还没有任何文件生效时返回空数组,那时注册不需要提交 `consents`。
64
+ */
65
+ get: operations["list-agreements"];
66
+ put?: never;
67
+ post?: never;
68
+ delete?: never;
69
+ options?: never;
70
+ head?: never;
71
+ patch?: never;
72
+ trace?: never;
73
+ };
74
+ "/account/v1/me/consents": {
75
+ parameters: {
76
+ query?: never;
77
+ header?: never;
78
+ path?: never;
79
+ cookie?: never;
80
+ };
81
+ /**
82
+ * 列出我同意过的文件
83
+ * @description 全部记录,最新的在前,包括已经不是当前版本的那些。
84
+ */
85
+ get: operations["list-consents"];
86
+ put?: never;
87
+ /**
88
+ * 同意条款
89
+ * @description 条款改版之后用它重新同意,`GET /api/v1/me` 的 `pending_agreements` 非空时就该调。
90
+ *
91
+ * 只收当前生效的版本,签旧版答 409。重复提交同一版不报错,第一次那条记录会留着。
92
+ */
93
+ post: operations["accept-agreements"];
94
+ delete?: never;
95
+ options?: never;
96
+ head?: never;
97
+ patch?: never;
98
+ trace?: never;
99
+ };
100
+ "/account/v1/register": {
101
+ parameters: {
102
+ query?: never;
103
+ header?: never;
104
+ path?: never;
105
+ cookie?: never;
106
+ };
107
+ get?: never;
108
+ put?: never;
109
+ /**
110
+ * 注册账号
111
+ * @description 在 auth.leaflow.net 登录之后调它,带上账号令牌。姓名和邮箱取自登录信息,不从请求体收。
112
+ *
113
+ * `consents` 要覆盖 `GET /api/v1/agreements` 返回的每一份,版本号也要一致;漏一份答 400,版本对不上答 409(多半是页面开着的时候条款改版了,重新拉一次清单即可)。已经注册过的答 409。
114
+ */
115
+ post: operations["register"];
116
+ delete?: never;
117
+ options?: never;
118
+ head?: never;
119
+ patch?: never;
120
+ trace?: never;
121
+ };
122
+ "/account/v1/me": {
123
+ parameters: {
124
+ query?: never;
125
+ header?: never;
126
+ path?: never;
127
+ cookie?: never;
128
+ };
129
+ /**
130
+ * 查看当前账号
131
+ * @description `pending_agreements` 是还没同意的文件,非空就要先引导用户同意,再调 `POST /api/v1/me/consents`。
132
+ */
133
+ get: operations["get-account"];
134
+ put?: never;
135
+ post?: never;
136
+ delete?: never;
137
+ options?: never;
138
+ head?: never;
139
+ /**
140
+ * 改当前账号的国家/地区和语言
141
+ * @description 姓名和邮箱不在这里改:它们来自身份提供方,改了会在下一次登录同步时被覆盖回去。
142
+ */
143
+ patch: operations["update-account"];
144
+ trace?: never;
145
+ };
146
+ "/account/v1/me/identity-verification": {
147
+ parameters: {
148
+ query?: never;
149
+ header?: never;
150
+ path?: never;
151
+ cookie?: never;
152
+ };
153
+ /**
154
+ * 查看实名核验状态
155
+ * @description 没交过材料时答 UNVERIFIED,不是 404。姓名和证件号不会出现在任何响应里。
156
+ */
157
+ get: operations["get-identity-verification"];
158
+ put?: never;
159
+ /**
160
+ * 提交实名核验材料
161
+ * @description 已经在等人审的和已经核过的都会被拒。被驳回之后可以改了再交。
162
+ */
163
+ post: operations["submit-identity-verification"];
164
+ delete?: never;
165
+ options?: never;
166
+ head?: never;
167
+ patch?: never;
168
+ trace?: never;
169
+ };
170
+ "/account/v1/me/invitations": {
171
+ parameters: {
172
+ query?: never;
173
+ header?: never;
174
+ path?: never;
175
+ cookie?: never;
176
+ };
177
+ /**
178
+ * 列出寄给我的要约
179
+ * @description 按当前账号的邮箱查,因为要约是寄给一个地址的——被邀请的人当时可能还没注册。
180
+ */
181
+ get: operations["list-my-invitations"];
182
+ put?: never;
183
+ post?: never;
184
+ delete?: never;
185
+ options?: never;
186
+ head?: never;
187
+ patch?: never;
188
+ trace?: never;
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
+ };
214
+ "/account/v1/me/invitations/accept": {
215
+ parameters: {
216
+ query?: never;
217
+ header?: never;
218
+ path?: never;
219
+ cookie?: never;
220
+ };
221
+ get?: never;
222
+ put?: never;
223
+ /**
224
+ * 顺着邀请链接接受
225
+ * @description token 对不上和这份要约已经不作数了是同一个回答:持有者对这两种情况能做的事完全一样,分开报会把这个接口变成一个可以拿来试 token 的探针。
226
+ */
227
+ post: operations["accept-invitation-by-token"];
228
+ delete?: never;
229
+ options?: never;
230
+ head?: never;
231
+ patch?: never;
232
+ trace?: never;
233
+ };
234
+ "/account/v1/me/invitations/{invitationId}/accept": {
235
+ parameters: {
236
+ query?: never;
237
+ header?: never;
238
+ path?: never;
239
+ cookie?: never;
240
+ };
241
+ get?: never;
242
+ put?: never;
243
+ /**
244
+ * 接受一份列在我名下的要约
245
+ * @description 不需要 token:token 证明的是「你就是这份要约寄给的那个人」,而当前账号的邮箱对得上这份要约,证明的是同一件事。
246
+ */
247
+ post: operations["accept-invitation"];
248
+ delete?: never;
249
+ options?: never;
250
+ head?: never;
251
+ patch?: never;
252
+ trace?: never;
253
+ };
254
+ "/account/v1/projects": {
255
+ parameters: {
256
+ query?: never;
257
+ header?: never;
258
+ path?: never;
259
+ cookie?: never;
260
+ };
261
+ /**
262
+ * 列出我参与的项目
263
+ * @description 默认不含已删除的项目——那些是已经不存在了的东西,要看必须明确用 status=DELETED 点名。
264
+ */
265
+ get: operations["list-projects"];
266
+ put?: never;
267
+ /**
268
+ * 建一个项目
269
+ * @description 建的人就是所有者。项目会连带预置 OWNER、ADMIN 两个内置角色和一个空权限的 member 角色。
270
+ */
271
+ post: operations["create-project"];
272
+ delete?: never;
273
+ options?: never;
274
+ head?: never;
275
+ patch?: never;
276
+ trace?: never;
277
+ };
278
+ "/account/v1/projects/{projectId}/token": {
279
+ parameters: {
280
+ query?: never;
281
+ header?: never;
282
+ path?: never;
283
+ cookie?: never;
284
+ };
285
+ get?: never;
286
+ put?: never;
287
+ /**
288
+ * 换一张项目令牌
289
+ * @description 选定一个项目后,用账号令牌换取该项目的令牌。
290
+ *
291
+ * **只接受 auth.leaflow.net 签发的账号令牌,不接受项目令牌。** 项目令牌过期后,先在 auth.leaflow.net 续期账号令牌,再重新调用这个接口。
292
+ *
293
+ * 换取时会确认账号可用、项目存在,且**调用者是该项目的成员**。非成员无法换取。
294
+ *
295
+ * 令牌只表明身份(用户与项目),**不包含权限**:权限在每次请求时实时判定,所以角色调整立即生效,不必等待令牌过期。
296
+ *
297
+ * 项目处于停用、封禁或删除中时**仍可换取令牌**:这些状态限制的是写入,不影响查看项目当前状况。
298
+ */
299
+ post: operations["exchange-project-token"];
300
+ delete?: never;
301
+ options?: never;
302
+ head?: never;
303
+ patch?: never;
304
+ trace?: never;
305
+ };
306
+ }
307
+ export type webhooks = Record<string, never>;
308
+ export interface components {
309
+ schemas: {
310
+ Error: {
311
+ code?: string;
312
+ message: string;
313
+ meta?: {
314
+ [key: string]: unknown;
315
+ };
316
+ /** Format: int64 */
317
+ status: number;
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
+ };
341
+ AgreementResource: {
342
+ /**
343
+ * Format: date-time
344
+ * @description 从这一刻起注册必须同意这一版
345
+ */
346
+ effective_at: string;
347
+ /** @enum {string} */
348
+ type: "TERMS" | "PRIVACY" | "DPA";
349
+ /** @description 正文发布在哪 */
350
+ url: string;
351
+ /** @description 同意时原样回传这个值 */
352
+ version: string;
353
+ };
354
+ AgreementListResponseBody: {
355
+ items: components["schemas"]["AgreementResource"][] | null;
356
+ };
357
+ ConsentResource: {
358
+ /** Format: date-time */
359
+ consented_at: string;
360
+ /**
361
+ * @description OFFLINE 是线下签的,由运营录入
362
+ * @enum {string}
363
+ */
364
+ method: "CLICKWRAP" | "OFFLINE";
365
+ /** @enum {string} */
366
+ type: "TERMS" | "PRIVACY" | "DPA";
367
+ version: string;
368
+ };
369
+ ConsentListResponseBody: {
370
+ items: components["schemas"]["ConsentResource"][] | null;
371
+ };
372
+ ConsentBody: {
373
+ /** @enum {string} */
374
+ type: "TERMS" | "PRIVACY" | "DPA";
375
+ version: string;
376
+ };
377
+ AcceptConsentsRequestBody: {
378
+ consents: components["schemas"]["ConsentBody"][] | null;
379
+ };
380
+ AccountResource: {
381
+ /** Format: date-time */
382
+ created_at: string;
383
+ email: string;
384
+ /** Format: date-time */
385
+ email_verified_at: string | null;
386
+ /** @description 来自登录信息,可能为空 */
387
+ first_name: string;
388
+ /** @description 身份提供方签发的 subject */
389
+ id: string;
390
+ /** @description 来自登录信息,可能为空 */
391
+ last_name: string;
392
+ /** @description ISO 3166-1 alpha-2。这两个字段是后加的,注册时才开始要求填——已经注册过的人这里 是空串,让他们在设置里补,补之前一切照常。 */
393
+ country?: string;
394
+ /** @description 为空表示没设过,那时按请求头(Accept-Language)走,两者都没有才用平台默认 */
395
+ locale?: string;
396
+ pending_agreements: components["schemas"]["AgreementResource"][] | null;
397
+ /** @enum {string} */
398
+ status: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING";
399
+ };
400
+ RegisterRequestBody: {
401
+ /** @description 当前生效的必签文件全部要在里面,版本号要和 GET /api/v1/agreements 给的一致 */
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"];
432
+ };
433
+ IdentityVerificationResource: {
434
+ reject_reason: string;
435
+ /**
436
+ * @description PERSONAL 和 ENTERPRISE 是两类主体而不是两个等级,别拿它们比大小
437
+ * @enum {string}
438
+ */
439
+ status: "UNVERIFIED" | "PENDING" | "PERSONAL" | "ENTERPRISE" | "REJECTED";
440
+ /** Format: date-time */
441
+ submitted_at: string | null;
442
+ /** Format: date-time */
443
+ verified_at: string | null;
444
+ };
445
+ SubmitIdentityVerificationRequestBody: {
446
+ /** @description 证件号码。同上,而且同一个号码不能挂在两个账号上 */
447
+ id_number: string;
448
+ /** @description 真实姓名。敏感个人信息,加密入库,任何接口都不会再把它读出来 */
449
+ real_name: string;
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
+ };
466
+ InvitationResource: {
467
+ /** Format: date-time */
468
+ created_at: string;
469
+ email: string;
470
+ /** Format: date-time */
471
+ expires_at: string;
472
+ /** Format: uuid */
473
+ id: string;
474
+ /** @description 发出这份要约的账号 id */
475
+ invited_by: string;
476
+ /** @description 发出这份要约的人的显示名,姓名都空时是他的邮箱。它是读取那一刻的事实,不是发信时的快照 */
477
+ invited_by_name: string;
478
+ /** Format: uuid */
479
+ project_id: string;
480
+ /**
481
+ * @description 目标项目的名字。
482
+ * 它在这里,而这一度是刻意不给的——理由是「没接受就不是成员,而名字只有成员能读」。 那条克制在这个场景下站不住:邀请邮件正文里就写着项目名,收件人早就知道了,而一个 只显示 uuid 的邀请列表让人没法判断该不该接受。
483
+ */
484
+ project_name: string;
485
+ /** @description 兑现时会授予的角色编码 */
486
+ roles: string[] | null;
487
+ /** @description 上面那些编码的显示名,按同样的顺序。读者看的是「管理员」,不是 ADMIN */
488
+ role_names: string[] | null;
489
+ };
490
+ LengthAwarePageInvitationResource: {
491
+ /** @description 这一页的内容 */
492
+ items: components["schemas"]["InvitationResource"][];
493
+ /**
494
+ * Format: int64
495
+ * @description 这一页最多几条,回显请求里的值
496
+ */
497
+ limit: number;
498
+ /**
499
+ * Format: int64
500
+ * @description 跳过了多少条,回显请求里的值
501
+ */
502
+ offset: number;
503
+ /**
504
+ * Format: int64
505
+ * @description 命中的总条数,不只是这一页
506
+ */
507
+ total: number;
508
+ };
509
+ AcceptInvitationByTokenRequestBody: {
510
+ token: string;
511
+ };
512
+ ProjectResource: {
513
+ ban_reason: string;
514
+ /** Format: date-time */
515
+ created_at: string;
516
+ created_by: string;
517
+ /**
518
+ * Format: date-time
519
+ * @description 盖上墓碑的那一刻
520
+ */
521
+ deleted_at: string | null;
522
+ description: string;
523
+ /** Format: uuid */
524
+ id: string;
525
+ name: string;
526
+ /**
527
+ * Format: date-time
528
+ * @description 欠费的起始时间
529
+ */
530
+ overdue_at: string | null;
531
+ /** @enum {string} */
532
+ status: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING" | "DELETED";
533
+ /** @description 给人看的,不参与任何查询 */
534
+ status_reason: string;
535
+ /** Format: date-time */
536
+ updated_at: string;
537
+ };
538
+ AcceptedInvitationResponseBody: {
539
+ project: components["schemas"]["ProjectResource"];
540
+ };
541
+ GrantResource: {
542
+ admin: boolean;
543
+ owner: boolean;
544
+ /** @description 持有的角色编码,只用于展示 */
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;
562
+ };
563
+ ProjectAccessResource: {
564
+ grant: components["schemas"]["GrantResource"];
565
+ project: components["schemas"]["ProjectResource"];
566
+ };
567
+ LengthAwarePageProjectAccessResource: {
568
+ /** @description 这一页的内容 */
569
+ items: components["schemas"]["ProjectAccessResource"][];
570
+ /**
571
+ * Format: int64
572
+ * @description 这一页最多几条,回显请求里的值
573
+ */
574
+ limit: number;
575
+ /**
576
+ * Format: int64
577
+ * @description 跳过了多少条,回显请求里的值
578
+ */
579
+ offset: number;
580
+ /**
581
+ * Format: int64
582
+ * @description 命中的总条数,不只是这一页
583
+ */
584
+ total: number;
585
+ };
586
+ CreateProjectRequestBody: {
587
+ description?: string;
588
+ name: string;
589
+ };
590
+ ProjectTokenResponseBody: {
591
+ /**
592
+ * Format: date-time
593
+ * @description 过期时刻。到点之前拿用户身份再换一张,别等第一个 401
594
+ */
595
+ expires_at: string;
596
+ /**
597
+ * Format: int64
598
+ * @description 还能活多少秒
599
+ */
600
+ expires_in: number;
601
+ /** @description **这一份是此刻的快照,不在令牌里,也不要缓存它。** 它只用来决定界面上画什么;真正的判定每次都要重新问 */
602
+ grant: components["schemas"]["GrantResource"];
603
+ /** @description 顺带带上项目本身,省掉换完之后立刻再查一次 */
604
+ project: components["schemas"]["ProjectResource"];
605
+ /** @description 项目令牌,放进 Authorization: Bearer 里用 */
606
+ token: string;
607
+ /** @description 固定是 Bearer */
608
+ token_type: string;
609
+ };
610
+ };
611
+ responses: never;
612
+ parameters: never;
613
+ requestBodies: never;
614
+ headers: never;
615
+ pathItems: never;
616
+ }
617
+ export type $defs = Record<string, never>;
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
+ };
677
+ "list-agreements": {
678
+ parameters: {
679
+ query?: never;
680
+ header?: never;
681
+ path?: never;
682
+ cookie?: never;
683
+ };
684
+ requestBody?: never;
685
+ responses: {
686
+ /** @description OK */
687
+ 200: {
688
+ headers: {
689
+ [name: string]: unknown;
690
+ };
691
+ content: {
692
+ "application/json": components["schemas"]["AgreementListResponseBody"];
693
+ };
694
+ };
695
+ /** @description Error */
696
+ default: {
697
+ headers: {
698
+ [name: string]: unknown;
699
+ };
700
+ content: {
701
+ "application/json": components["schemas"]["Error"];
702
+ };
703
+ };
704
+ };
705
+ };
706
+ "list-consents": {
707
+ parameters: {
708
+ query?: never;
709
+ header?: never;
710
+ path?: never;
711
+ cookie?: never;
712
+ };
713
+ requestBody?: never;
714
+ responses: {
715
+ /** @description OK */
716
+ 200: {
717
+ headers: {
718
+ [name: string]: unknown;
719
+ };
720
+ content: {
721
+ "application/json": components["schemas"]["ConsentListResponseBody"];
722
+ };
723
+ };
724
+ /** @description Error */
725
+ default: {
726
+ headers: {
727
+ [name: string]: unknown;
728
+ };
729
+ content: {
730
+ "application/json": components["schemas"]["Error"];
731
+ };
732
+ };
733
+ };
734
+ };
735
+ "accept-agreements": {
736
+ parameters: {
737
+ query?: never;
738
+ header?: never;
739
+ path?: never;
740
+ cookie?: never;
741
+ };
742
+ requestBody: {
743
+ content: {
744
+ "application/json": components["schemas"]["AcceptConsentsRequestBody"];
745
+ };
746
+ };
747
+ responses: {
748
+ /** @description OK */
749
+ 200: {
750
+ headers: {
751
+ [name: string]: unknown;
752
+ };
753
+ content: {
754
+ "application/json": components["schemas"]["AccountResource"];
755
+ };
756
+ };
757
+ /** @description Error */
758
+ default: {
759
+ headers: {
760
+ [name: string]: unknown;
761
+ };
762
+ content: {
763
+ "application/json": components["schemas"]["Error"];
764
+ };
765
+ };
766
+ };
767
+ };
768
+ register: {
769
+ parameters: {
770
+ query?: never;
771
+ header?: never;
772
+ path?: never;
773
+ cookie?: never;
774
+ };
775
+ requestBody: {
776
+ content: {
777
+ "application/json": components["schemas"]["RegisterRequestBody"];
778
+ };
779
+ };
780
+ responses: {
781
+ /** @description Created */
782
+ 201: {
783
+ headers: {
784
+ [name: string]: unknown;
785
+ };
786
+ content: {
787
+ "application/json": components["schemas"]["AccountResource"];
788
+ };
789
+ };
790
+ /** @description Error */
791
+ default: {
792
+ headers: {
793
+ [name: string]: unknown;
794
+ };
795
+ content: {
796
+ "application/json": components["schemas"]["Error"];
797
+ };
798
+ };
799
+ };
800
+ };
801
+ "get-account": {
802
+ parameters: {
803
+ query?: never;
804
+ header?: never;
805
+ path?: never;
806
+ cookie?: never;
807
+ };
808
+ requestBody?: never;
809
+ responses: {
810
+ /** @description OK */
811
+ 200: {
812
+ headers: {
813
+ [name: string]: unknown;
814
+ };
815
+ content: {
816
+ "application/json": components["schemas"]["AccountResource"];
817
+ };
818
+ };
819
+ /** @description Error */
820
+ default: {
821
+ headers: {
822
+ [name: string]: unknown;
823
+ };
824
+ content: {
825
+ "application/json": components["schemas"]["Error"];
826
+ };
827
+ };
828
+ };
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
+ };
863
+ "get-identity-verification": {
864
+ parameters: {
865
+ query?: never;
866
+ header?: never;
867
+ path?: never;
868
+ cookie?: never;
869
+ };
870
+ requestBody?: never;
871
+ responses: {
872
+ /** @description OK */
873
+ 200: {
874
+ headers: {
875
+ [name: string]: unknown;
876
+ };
877
+ content: {
878
+ "application/json": components["schemas"]["IdentityVerificationResource"];
879
+ };
880
+ };
881
+ /** @description Error */
882
+ default: {
883
+ headers: {
884
+ [name: string]: unknown;
885
+ };
886
+ content: {
887
+ "application/json": components["schemas"]["Error"];
888
+ };
889
+ };
890
+ };
891
+ };
892
+ "submit-identity-verification": {
893
+ parameters: {
894
+ query?: never;
895
+ header?: never;
896
+ path?: never;
897
+ cookie?: never;
898
+ };
899
+ requestBody: {
900
+ content: {
901
+ "application/json": components["schemas"]["SubmitIdentityVerificationRequestBody"];
902
+ };
903
+ };
904
+ responses: {
905
+ /** @description Accepted */
906
+ 202: {
907
+ headers: {
908
+ [name: string]: unknown;
909
+ };
910
+ content: {
911
+ "application/json": components["schemas"]["IdentityVerificationResource"];
912
+ };
913
+ };
914
+ /** @description Error */
915
+ default: {
916
+ headers: {
917
+ [name: string]: unknown;
918
+ };
919
+ content: {
920
+ "application/json": components["schemas"]["Error"];
921
+ };
922
+ };
923
+ };
924
+ };
925
+ "list-my-invitations": {
926
+ parameters: {
927
+ query?: {
928
+ /** @description 这一页最多返回多少条 */
929
+ limit?: number;
930
+ /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
931
+ offset?: number;
932
+ };
933
+ header?: never;
934
+ path?: never;
935
+ cookie?: never;
936
+ };
937
+ requestBody?: never;
938
+ responses: {
939
+ /** @description OK */
940
+ 200: {
941
+ headers: {
942
+ [name: string]: unknown;
943
+ };
944
+ content: {
945
+ "application/json": components["schemas"]["LengthAwarePageInvitationResource"];
946
+ };
947
+ };
948
+ /** @description Error */
949
+ default: {
950
+ headers: {
951
+ [name: string]: unknown;
952
+ };
953
+ content: {
954
+ "application/json": components["schemas"]["Error"];
955
+ };
956
+ };
957
+ };
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
+ };
991
+ "accept-invitation-by-token": {
992
+ parameters: {
993
+ query?: never;
994
+ header?: never;
995
+ path?: never;
996
+ cookie?: never;
997
+ };
998
+ requestBody: {
999
+ content: {
1000
+ "application/json": components["schemas"]["AcceptInvitationByTokenRequestBody"];
1001
+ };
1002
+ };
1003
+ responses: {
1004
+ /** @description OK */
1005
+ 200: {
1006
+ headers: {
1007
+ [name: string]: unknown;
1008
+ };
1009
+ content: {
1010
+ "application/json": components["schemas"]["AcceptedInvitationResponseBody"];
1011
+ };
1012
+ };
1013
+ /** @description Error */
1014
+ default: {
1015
+ headers: {
1016
+ [name: string]: unknown;
1017
+ };
1018
+ content: {
1019
+ "application/json": components["schemas"]["Error"];
1020
+ };
1021
+ };
1022
+ };
1023
+ };
1024
+ "accept-invitation": {
1025
+ parameters: {
1026
+ query?: never;
1027
+ header?: never;
1028
+ path: {
1029
+ invitationId: string;
1030
+ };
1031
+ cookie?: never;
1032
+ };
1033
+ requestBody?: never;
1034
+ responses: {
1035
+ /** @description OK */
1036
+ 200: {
1037
+ headers: {
1038
+ [name: string]: unknown;
1039
+ };
1040
+ content: {
1041
+ "application/json": components["schemas"]["AcceptedInvitationResponseBody"];
1042
+ };
1043
+ };
1044
+ /** @description Error */
1045
+ default: {
1046
+ headers: {
1047
+ [name: string]: unknown;
1048
+ };
1049
+ content: {
1050
+ "application/json": components["schemas"]["Error"];
1051
+ };
1052
+ };
1053
+ };
1054
+ };
1055
+ "list-projects": {
1056
+ parameters: {
1057
+ query?: {
1058
+ /** @description 这一页最多返回多少条 */
1059
+ limit?: number;
1060
+ /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1061
+ offset?: number;
1062
+ /** @description 按名称或描述模糊匹配 */
1063
+ keyword?: string;
1064
+ /** @description 按对外状态过滤。不传时不返回已删除的项目 */
1065
+ status?: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING" | "DELETED";
1066
+ };
1067
+ header?: never;
1068
+ path?: never;
1069
+ cookie?: never;
1070
+ };
1071
+ requestBody?: never;
1072
+ responses: {
1073
+ /** @description OK */
1074
+ 200: {
1075
+ headers: {
1076
+ [name: string]: unknown;
1077
+ };
1078
+ content: {
1079
+ "application/json": components["schemas"]["LengthAwarePageProjectAccessResource"];
1080
+ };
1081
+ };
1082
+ /** @description Error */
1083
+ default: {
1084
+ headers: {
1085
+ [name: string]: unknown;
1086
+ };
1087
+ content: {
1088
+ "application/json": components["schemas"]["Error"];
1089
+ };
1090
+ };
1091
+ };
1092
+ };
1093
+ "create-project": {
1094
+ parameters: {
1095
+ query?: never;
1096
+ header?: never;
1097
+ path?: never;
1098
+ cookie?: never;
1099
+ };
1100
+ requestBody: {
1101
+ content: {
1102
+ "application/json": components["schemas"]["CreateProjectRequestBody"];
1103
+ };
1104
+ };
1105
+ responses: {
1106
+ /** @description Created */
1107
+ 201: {
1108
+ headers: {
1109
+ [name: string]: unknown;
1110
+ };
1111
+ content: {
1112
+ "application/json": components["schemas"]["ProjectAccessResource"];
1113
+ };
1114
+ };
1115
+ /** @description Error */
1116
+ default: {
1117
+ headers: {
1118
+ [name: string]: unknown;
1119
+ };
1120
+ content: {
1121
+ "application/json": components["schemas"]["Error"];
1122
+ };
1123
+ };
1124
+ };
1125
+ };
1126
+ "exchange-project-token": {
1127
+ parameters: {
1128
+ query?: never;
1129
+ header?: never;
1130
+ path: {
1131
+ projectId: string;
1132
+ };
1133
+ cookie?: never;
1134
+ };
1135
+ requestBody?: never;
1136
+ responses: {
1137
+ /** @description Created */
1138
+ 201: {
1139
+ headers: {
1140
+ [name: string]: unknown;
1141
+ };
1142
+ content: {
1143
+ "application/json": components["schemas"]["ProjectTokenResponseBody"];
1144
+ };
1145
+ };
1146
+ /** @description Error */
1147
+ default: {
1148
+ headers: {
1149
+ [name: string]: unknown;
1150
+ };
1151
+ content: {
1152
+ "application/json": components["schemas"]["Error"];
1153
+ };
1154
+ };
1155
+ };
1156
+ };
1157
+ }