@leaflow/sdk 0.0.0-dev.25.g6c5751f → 0.0.0-dev.252.gbe25f3b

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 (79) hide show
  1. package/README.md +22 -1
  2. package/dist/account/v1/client.d.ts +4 -0
  3. package/dist/account/v1/client.js +7 -0
  4. package/dist/account/v1/index.d.ts +33 -22
  5. package/dist/account/v1/index.js +4 -4
  6. package/dist/account/v1/schema.d.ts +307 -89
  7. package/dist/assistant/v1/client.d.ts +4 -0
  8. package/dist/assistant/v1/client.js +7 -0
  9. package/dist/assistant/v1/index.d.ts +71 -40
  10. package/dist/assistant/v1/index.js +4 -4
  11. package/dist/assistant/v1/schema.d.ts +1204 -139
  12. package/dist/billing/account/v1/client.d.ts +4 -0
  13. package/dist/billing/account/v1/client.js +7 -0
  14. package/dist/billing/account/v1/index.d.ts +169 -0
  15. package/dist/billing/account/v1/index.js +5 -0
  16. package/dist/billing/account/v1/schema.d.ts +4385 -0
  17. package/dist/billing/account/v1/schema.js +5 -0
  18. package/dist/billing/catalog/v1/client.d.ts +4 -0
  19. package/dist/billing/catalog/v1/client.js +7 -0
  20. package/dist/billing/catalog/v1/index.d.ts +33 -0
  21. package/dist/billing/catalog/v1/index.js +5 -0
  22. package/dist/billing/catalog/v1/schema.d.ts +915 -0
  23. package/dist/billing/catalog/v1/schema.js +5 -0
  24. package/dist/billing/index.d.ts +3 -0
  25. package/dist/billing/index.js +6 -0
  26. package/dist/billing/project/v1/client.d.ts +4 -0
  27. package/dist/billing/project/v1/client.js +7 -0
  28. package/dist/billing/project/v1/index.d.ts +59 -0
  29. package/dist/billing/project/v1/index.js +5 -0
  30. package/dist/billing/project/v1/schema.d.ts +1892 -0
  31. package/dist/billing/project/v1/schema.js +5 -0
  32. package/dist/canopy/v1/client.d.ts +4 -0
  33. package/dist/canopy/v1/client.js +7 -0
  34. package/dist/canopy/v1/index.d.ts +24 -23
  35. package/dist/canopy/v1/index.js +4 -4
  36. package/dist/canopy/v1/schema.d.ts +113 -109
  37. package/dist/compute/v1/client.d.ts +4 -0
  38. package/dist/compute/v1/client.js +7 -0
  39. package/dist/compute/v1/index.d.ts +207 -134
  40. package/dist/compute/v1/index.js +4 -4
  41. package/dist/compute/v1/schema.d.ts +1944 -553
  42. package/dist/dns/v1/client.d.ts +4 -0
  43. package/dist/dns/v1/client.js +7 -0
  44. package/dist/dns/v1/index.d.ts +43 -0
  45. package/dist/dns/v1/index.js +5 -0
  46. package/dist/dns/v1/schema.d.ts +887 -0
  47. package/dist/dns/v1/schema.js +5 -0
  48. package/dist/iam/v1/client.d.ts +4 -0
  49. package/dist/iam/v1/client.js +7 -0
  50. package/dist/iam/v1/index.d.ts +55 -32
  51. package/dist/iam/v1/index.js +4 -4
  52. package/dist/iam/v1/schema.d.ts +521 -88
  53. package/dist/index.d.ts +11 -7
  54. package/dist/index.js +19 -5
  55. package/dist/monitoring/v1/client.d.ts +4 -0
  56. package/dist/monitoring/v1/client.js +7 -0
  57. package/dist/monitoring/v1/index.d.ts +130 -49
  58. package/dist/monitoring/v1/index.js +4 -4
  59. package/dist/monitoring/v1/schema.d.ts +2420 -527
  60. package/dist/notification/v1/client.d.ts +4 -0
  61. package/dist/notification/v1/client.js +7 -0
  62. package/dist/notification/v1/index.d.ts +81 -0
  63. package/dist/notification/v1/index.js +5 -0
  64. package/dist/notification/v1/schema.d.ts +2048 -0
  65. package/dist/notification/v1/schema.js +5 -0
  66. package/dist/routes.d.ts +3234 -0
  67. package/dist/routes.js +3639 -0
  68. package/dist/support/v1/client.d.ts +4 -0
  69. package/dist/support/v1/client.js +7 -0
  70. package/dist/support/v1/index.d.ts +51 -0
  71. package/dist/support/v1/index.js +5 -0
  72. package/dist/support/v1/schema.d.ts +1082 -0
  73. package/dist/support/v1/schema.js +5 -0
  74. package/dist/tunnel/v1/client.d.ts +4 -0
  75. package/dist/tunnel/v1/client.js +7 -0
  76. package/dist/tunnel/v1/index.d.ts +8 -7
  77. package/dist/tunnel/v1/index.js +4 -4
  78. package/dist/tunnel/v1/schema.d.ts +40 -34
  79. package/package.json +34 -10
@@ -11,12 +11,12 @@ export interface paths {
11
11
  cookie?: never;
12
12
  };
13
13
  /**
14
- * 这个平台现在收不收人
15
- * @description 注册页和「新建项目」按钮用它决定画什么。不需要令牌。
14
+ * Get registration and project creation settings
15
+ * @description No token required.
16
16
  *
17
- * `registration_mode` 不是 `OPEN` 时 `POST /account/v1/register` 会答 403:`CLOSED` 是整个关着,`INVITE_ONLY` 是只收手上有项目邀请的邮箱。`project_creation_mode` 同理,`VERIFIED_ONLY` 要先过实名。
17
+ * While `registration_mode` is not `OPEN`, `POST /account/v1/register` answers 403: `CLOSED` refuses everyone, and `INVITE_ONLY` accepts only an email address holding a project invitation. `project_creation_mode` behaves the same way, and `VERIFIED_ONLY` requires identity verification to have completed.
18
18
  *
19
- * 两条配额是 0 表示不限。它们只用来提前提示,真正的判定在写入那一刻。
19
+ * Both quotas are `0` when unlimited. The decision itself is made at the moment of writing.
20
20
  */
21
21
  get: operations["get-settings"];
22
22
  put?: never;
@@ -27,6 +27,30 @@ export interface paths {
27
27
  patch?: never;
28
28
  trace?: never;
29
29
  };
30
+ "/account/v1/locales": {
31
+ parameters: {
32
+ query?: never;
33
+ header?: never;
34
+ path?: never;
35
+ cookie?: never;
36
+ };
37
+ /**
38
+ * List countries and languages for registration
39
+ * @description No token required: the registration page renders both lists before an account exists.
40
+ *
41
+ * Country names and their order follow `Accept-Language`. A name is rendered in the requested language and the list is ordered by the rules of that language rather than by code point. Simplified Chinese applies when the header is absent.
42
+ *
43
+ * Retired codes such as the Soviet Union and Yugoslavia, and codes that denote no country such as the European Union, are not listed.
44
+ */
45
+ get: operations["list-locales"];
46
+ put?: never;
47
+ post?: never;
48
+ delete?: never;
49
+ options?: never;
50
+ head?: never;
51
+ patch?: never;
52
+ trace?: never;
53
+ };
30
54
  "/account/v1/agreements": {
31
55
  parameters: {
32
56
  query?: never;
@@ -35,10 +59,10 @@ export interface paths {
35
59
  cookie?: never;
36
60
  };
37
61
  /**
38
- * 列出注册必须同意的文件
39
- * @description 注册页显示它,用户同意之后把每一项的 `type` 和 `version` 原样回传给 `POST /api/v1/register`。
62
+ * List the agreements registration requires
63
+ * @description No token required. Send the `type` and `version` of each one back unchanged to `POST /account/v1/register`.
40
64
  *
41
- * 不需要令牌。还没有任何文件生效时返回空数组,那时注册不需要提交 `consents`。
65
+ * The array is empty while no agreement is in force, and registration then takes no `consents`.
42
66
  */
43
67
  get: operations["list-agreements"];
44
68
  put?: never;
@@ -57,16 +81,16 @@ export interface paths {
57
81
  cookie?: never;
58
82
  };
59
83
  /**
60
- * 列出我同意过的文件
61
- * @description 全部记录,最新的在前,包括已经不是当前版本的那些。
84
+ * List the agreements the caller has consented to
85
+ * @description Every record, most recent first, including versions that are no longer current.
62
86
  */
63
87
  get: operations["list-consents"];
64
88
  put?: never;
65
89
  /**
66
- * 同意条款
67
- * @description 条款改版之后用它重新同意,`GET /api/v1/me` 的 `pending_agreements` 非空时就该调。
90
+ * Consent to the current agreements
91
+ * @description Call this once a new version is published, which is whenever `pending_agreements` on `GET /account/v1/me` is not empty.
68
92
  *
69
- * 只收当前生效的版本,签旧版答 409。重复提交同一版不报错,第一次那条记录会留着。
93
+ * Only the version currently in force is accepted; consenting to an earlier one answers 409. Submitting the same version twice is not an error and leaves the first record in place.
70
94
  */
71
95
  post: operations["accept-agreements"];
72
96
  delete?: never;
@@ -85,10 +109,10 @@ export interface paths {
85
109
  get?: never;
86
110
  put?: never;
87
111
  /**
88
- * 注册账号
89
- * @description 在 auth.leaflow.net 登录之后调它,带上账号令牌。姓名和邮箱取自登录信息,不从请求体收。
112
+ * Register an account
113
+ * @description Call this after signing in at auth.leaflow.net, carrying the access token. The name and email address are taken from the sign-in claims and are not read from the request body.
90
114
  *
91
- * `consents` 要覆盖 `GET /api/v1/agreements` 返回的每一份,版本号也要一致;漏一份答 400,版本对不上答 409(多半是页面开着的时候条款改版了,重新拉一次清单即可)。已经注册过的答 409。
115
+ * `consents` must cover every agreement returned by `GET /account/v1/agreements`, at the same versions. A missing agreement answers 400 and a stale version answers 409, in which case fetch the list again. An account that already exists answers 409.
92
116
  */
93
117
  post: operations["register"];
94
118
  delete?: never;
@@ -105,8 +129,8 @@ export interface paths {
105
129
  cookie?: never;
106
130
  };
107
131
  /**
108
- * 查看当前账号
109
- * @description `pending_agreements` 是还没同意的文件,非空就要先引导用户同意,再调 `POST /api/v1/me/consents`。
132
+ * Get the current account
133
+ * @description `pending_agreements` holds the agreements not yet consented to. While it is not empty, obtain consent and call `POST /account/v1/me/consents`.
110
134
  */
111
135
  get: operations["get-account"];
112
136
  put?: never;
@@ -114,7 +138,11 @@ export interface paths {
114
138
  delete?: never;
115
139
  options?: never;
116
140
  head?: never;
117
- patch?: never;
141
+ /**
142
+ * Update the country and language of the current account
143
+ * @description The name and email address cannot be changed here. They come from the identity provider, and a change would be overwritten at the next sign-in.
144
+ */
145
+ patch: operations["update-account"];
118
146
  trace?: never;
119
147
  };
120
148
  "/account/v1/me/identity-verification": {
@@ -125,14 +153,14 @@ export interface paths {
125
153
  cookie?: never;
126
154
  };
127
155
  /**
128
- * 查看实名核验状态
129
- * @description 没交过材料时答 UNVERIFIED,不是 404。姓名和证件号不会出现在任何响应里。
156
+ * Get identity verification status
157
+ * @description The status is `UNVERIFIED` rather than 404 when nothing has been submitted. The legal name and the document number appear in no response.
130
158
  */
131
159
  get: operations["get-identity-verification"];
132
160
  put?: never;
133
161
  /**
134
- * 提交实名核验材料
135
- * @description 已经在等人审的和已经核过的都会被拒。被驳回之后可以改了再交。
162
+ * Submit identity verification
163
+ * @description A submission awaiting review, and an account already verified, are both refused. A rejected submission may be corrected and sent again.
136
164
  */
137
165
  post: operations["submit-identity-verification"];
138
166
  delete?: never;
@@ -149,8 +177,8 @@ export interface paths {
149
177
  cookie?: never;
150
178
  };
151
179
  /**
152
- * 列出寄给我的要约
153
- * @description 按当前账号的邮箱查,因为要约是寄给一个地址的——被邀请的人当时可能还没注册。
180
+ * List invitations addressed to the caller
181
+ * @description Matched against the email address of the current account.
154
182
  */
155
183
  get: operations["list-my-invitations"];
156
184
  put?: never;
@@ -161,6 +189,30 @@ export interface paths {
161
189
  patch?: never;
162
190
  trace?: never;
163
191
  };
192
+ "/account/v1/invitations/by-token": {
193
+ parameters: {
194
+ query?: never;
195
+ header?: never;
196
+ path?: never;
197
+ cookie?: never;
198
+ };
199
+ /**
200
+ * Preview an invitation by its token
201
+ * @description No token required: whoever follows the link in an invitation email has usually not signed in, and may hold no account at all.
202
+ *
203
+ * The recipient address is masked (`t***@example.com`).
204
+ *
205
+ * A token that does not exist, one already redeemed, one revoked and one expired all answer the same 404.
206
+ */
207
+ get: operations["preview-invitation-by-token"];
208
+ put?: never;
209
+ post?: never;
210
+ delete?: never;
211
+ options?: never;
212
+ head?: never;
213
+ patch?: never;
214
+ trace?: never;
215
+ };
164
216
  "/account/v1/me/invitations/accept": {
165
217
  parameters: {
166
218
  query?: never;
@@ -171,8 +223,8 @@ export interface paths {
171
223
  get?: never;
172
224
  put?: never;
173
225
  /**
174
- * 顺着邀请链接接受
175
- * @description token 对不上和这份要约已经不作数了是同一个回答:持有者对这两种情况能做的事完全一样,分开报会把这个接口变成一个可以拿来试 token 的探针。
226
+ * Accept an invitation by its token
227
+ * @description A token that does not match, and an invitation that no longer stands, answer the same way.
176
228
  */
177
229
  post: operations["accept-invitation-by-token"];
178
230
  delete?: never;
@@ -191,8 +243,8 @@ export interface paths {
191
243
  get?: never;
192
244
  put?: never;
193
245
  /**
194
- * 接受一份列在我名下的要约
195
- * @description 不需要 token:token 证明的是「你就是这份要约寄给的那个人」,而当前账号的邮箱对得上这份要约,证明的是同一件事。
246
+ * Accept an invitation listed against the caller
247
+ * @description No token is required; the invitation is addressed to the email address of the current account.
196
248
  */
197
249
  post: operations["accept-invitation"];
198
250
  delete?: never;
@@ -209,14 +261,14 @@ export interface paths {
209
261
  cookie?: never;
210
262
  };
211
263
  /**
212
- * 列出我参与的项目
213
- * @description 默认不含已删除的项目——那些是已经不存在了的东西,要看必须明确用 status=DELETED 点名。
264
+ * List the projects the caller belongs to
265
+ * @description Deleted projects are excluded unless `status=DELETED` asks for them by name.
214
266
  */
215
267
  get: operations["list-projects"];
216
268
  put?: never;
217
269
  /**
218
- * 建一个项目
219
- * @description 建的人就是所有者。项目会连带预置 OWNER、ADMIN 两个内置角色和一个空权限的 member 角色。
270
+ * Create a project
271
+ * @description The caller becomes its owner. The project is created with the built-in `OWNER` and `ADMIN` roles and a `member` role carrying no permissions.
220
272
  */
221
273
  post: operations["create-project"];
222
274
  delete?: never;
@@ -225,7 +277,7 @@ export interface paths {
225
277
  patch?: never;
226
278
  trace?: never;
227
279
  };
228
- "/account/v1/projects/{projectId}/token": {
280
+ "/account/v1/projects/{projectId}/scoped-tokens": {
229
281
  parameters: {
230
282
  query?: never;
231
283
  header?: never;
@@ -235,18 +287,18 @@ export interface paths {
235
287
  get?: never;
236
288
  put?: never;
237
289
  /**
238
- * 换一张项目令牌
239
- * @description 选定一个项目后,用账号令牌换取该项目的令牌。
290
+ * Exchange the access token for a scoped token
291
+ * @description Once a project has been chosen, exchange the access token for a scoped token for that project.
240
292
  *
241
- * **只接受 auth.leaflow.net 签发的账号令牌,不接受项目令牌。** 项目令牌过期后,先在 auth.leaflow.net 续期账号令牌,再重新调用这个接口。
293
+ * **Only an access token issued by auth.leaflow.net is accepted; a scoped token is not.** Once a scoped token has expired, obtain a fresh access token at auth.leaflow.net and call this endpoint again.
242
294
  *
243
- * 换取时会确认账号可用、项目存在,且**调用者是该项目的成员**。非成员无法换取。
295
+ * The exchange confirms that the account is usable, that the project exists, and that the caller is a member of it. A caller who is not a member obtains no token.
244
296
  *
245
- * 令牌只表明身份(用户与项目),**不包含权限**:权限在每次请求时实时判定,所以角色调整立即生效,不必等待令牌过期。
297
+ * A scoped token states identity only — the user and the project — and **carries no permissions**. Permissions are evaluated on every request, so a change of role takes effect immediately rather than at the next expiry.
246
298
  *
247
- * 项目处于停用、封禁或删除中时**仍可换取令牌**:这些状态限制的是写入,不影响查看项目当前状况。
299
+ * A project that is suspended, banned or being deleted still issues tokens; those states restrict writes, and the project remains readable.
248
300
  */
249
- post: operations["exchange-project-token"];
301
+ post: operations["create-scoped-token"];
250
302
  delete?: never;
251
303
  options?: never;
252
304
  head?: never;
@@ -260,6 +312,10 @@ export interface components {
260
312
  Error: {
261
313
  code?: string;
262
314
  message: string;
315
+ /**
316
+ * @description What a given `code` carries alongside the message. The keys depend on the code,
317
+ * and a client that does not recognise one ignores it.
318
+ */
263
319
  meta?: {
264
320
  [key: string]: unknown;
265
321
  };
@@ -269,21 +325,21 @@ export interface components {
269
325
  SettingsResource: {
270
326
  /**
271
327
  * Format: int64
272
- * @description 一个项目最多几个成员,0 表示不限
328
+ * @description Maximum number of members a project may hold; 0 means unlimited
273
329
  */
274
330
  max_members_per_project: number;
275
331
  /**
276
332
  * Format: int64
277
- * @description 你最多能当几个项目的所有者,0 表示不限。已删除的项目不算在内
333
+ * @description Maximum number of projects an account may own; 0 means unlimited. Deleted projects do not count
278
334
  */
279
335
  max_projects_per_user: number;
280
336
  /**
281
- * @description VERIFIED_ONLY 要求先过实名,审核中不算
337
+ * @description VERIFIED_ONLY requires identity verification to have completed; a submission under review does not qualify
282
338
  * @enum {string}
283
339
  */
284
340
  project_creation_mode: "OPEN" | "VERIFIED_ONLY" | "CLOSED";
285
341
  /**
286
- * @description INVITE_ONLY 是只收手上有项目邀请的邮箱
342
+ * @description INVITE_ONLY accepts only an email address holding a project invitation
287
343
  * @enum {string}
288
344
  */
289
345
  registration_mode: "OPEN" | "INVITE_ONLY" | "CLOSED";
@@ -291,14 +347,14 @@ export interface components {
291
347
  AgreementResource: {
292
348
  /**
293
349
  * Format: date-time
294
- * @description 从这一刻起注册必须同意这一版
350
+ * @description From this moment on, registration requires this version
295
351
  */
296
352
  effective_at: string;
297
353
  /** @enum {string} */
298
354
  type: "TERMS" | "PRIVACY" | "DPA";
299
- /** @description 正文发布在哪 */
355
+ /** @description Where the text is published */
300
356
  url: string;
301
- /** @description 同意时原样回传这个值 */
357
+ /** @description Send this value back unchanged when consenting */
302
358
  version: string;
303
359
  };
304
360
  AgreementListResponseBody: {
@@ -308,7 +364,7 @@ export interface components {
308
364
  /** Format: date-time */
309
365
  consented_at: string;
310
366
  /**
311
- * @description OFFLINE 是线下签的,由运营录入
367
+ * @description OFFLINE is a consent given off the platform and recorded by an operator
312
368
  * @enum {string}
313
369
  */
314
370
  method: "CLICKWRAP" | "OFFLINE";
@@ -333,24 +389,57 @@ export interface components {
333
389
  email: string;
334
390
  /** Format: date-time */
335
391
  email_verified_at: string | null;
336
- /** @description 来自登录信息,可能为空 */
392
+ /** @description Taken from the sign-in claims; may be empty */
337
393
  first_name: string;
338
- /** @description 身份提供方签发的 subject */
394
+ /** @description The subject issued by the identity provider */
339
395
  id: string;
340
- /** @description 来自登录信息,可能为空 */
396
+ /** @description Taken from the sign-in claims; may be empty */
341
397
  last_name: string;
398
+ /** @description ISO 3166-1 alpha-2. Empty on an account that registered before this was required; such an account continues to work and can set it from the settings page */
399
+ country?: string;
400
+ /** @description Empty while never set, in which case `Accept-Language` applies, and the platform default when that is absent as well */
401
+ locale?: string;
342
402
  pending_agreements: components["schemas"]["AgreementResource"][] | null;
343
403
  /** @enum {string} */
344
404
  status: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING";
345
405
  };
346
406
  RegisterRequestBody: {
347
- /** @description 当前生效的必签文件全部要在里面,版本号要和 GET /api/v1/agreements 给的一致 */
407
+ /** @description Must cover every agreement currently in force, at the versions returned by GET /account/v1/agreements */
348
408
  consents: components["schemas"]["ConsentBody"][] | null;
409
+ /** @description ISO 3166-1 alpha-2 (CN, HK, US). Must denote a country or territory that exists; codes such as EU and ZZ hold a place in the standard without denoting one and are refused */
410
+ country: string;
411
+ locale: components["schemas"]["Locale"];
412
+ };
413
+ LocaleOptionsResource: {
414
+ countries: components["schemas"]["CountryOption"][];
415
+ languages: components["schemas"]["LanguageOption"][];
416
+ };
417
+ CountryOption: {
418
+ /** @description ISO 3166-1 alpha-2, sent back unchanged at registration */
419
+ code: string;
420
+ /** @description The name rendered according to `Accept-Language` */
421
+ name: string;
422
+ };
423
+ LanguageOption: {
424
+ code: components["schemas"]["Locale"];
425
+ /** @description The endonym of the language, written in that language itself. It does not follow `Accept-Language` */
426
+ name: string;
427
+ };
428
+ /**
429
+ * @description The language used for the interface and for email. It is independent of `country`, and neither can be inferred from the other
430
+ * @enum {string}
431
+ */
432
+ Locale: "zh-Hans" | "zh-Hant-HK" | "en";
433
+ /** @description Both fields are optional, and an omitted field is left unchanged */
434
+ UpdateAccountRequestBody: {
435
+ /** @description As at registration */
436
+ country?: string;
437
+ locale?: components["schemas"]["Locale"];
349
438
  };
350
439
  IdentityVerificationResource: {
351
440
  reject_reason: string;
352
441
  /**
353
- * @description PERSONAL 和 ENTERPRISE 是两类主体而不是两个等级,别拿它们比大小
442
+ * @description PERSONAL and ENTERPRISE are two kinds of subject rather than two levels, and are not ordered
354
443
  * @enum {string}
355
444
  */
356
445
  status: "UNVERIFIED" | "PENDING" | "PERSONAL" | "ENTERPRISE" | "REJECTED";
@@ -360,11 +449,23 @@ export interface components {
360
449
  verified_at: string | null;
361
450
  };
362
451
  SubmitIdentityVerificationRequestBody: {
363
- /** @description 证件号码。同上,而且同一个号码不能挂在两个账号上 */
452
+ /** @description The document number. It is returned by no endpoint, and one number cannot be attached to two accounts */
364
453
  id_number: string;
365
- /** @description 真实姓名。敏感个人信息,加密入库,任何接口都不会再把它读出来 */
454
+ /** @description The legal name. It is returned by no endpoint */
366
455
  real_name: string;
367
456
  };
457
+ /** @description What an invitation states before it is accepted. It carries neither the invitation id nor the full recipient address; the invitations listed against the current account are returned by `list-my-invitations` */
458
+ InvitationPreviewResource: {
459
+ /** @description The masked recipient address, enough for the recipient to recognise it */
460
+ email_masked: string;
461
+ /** Format: date-time */
462
+ expires_at: string;
463
+ /** @description The display name of the sender, or their email address when no name is set */
464
+ invited_by_name: string;
465
+ project_name: string;
466
+ /** @description The display names of the roles granted on acceptance */
467
+ role_names: string[] | null;
468
+ };
368
469
  InvitationResource: {
369
470
  /** Format: date-time */
370
471
  created_at: string;
@@ -373,56 +474,65 @@ export interface components {
373
474
  expires_at: string;
374
475
  /** Format: uuid */
375
476
  id: string;
477
+ /** @description The id of the account that issued the invitation */
376
478
  invited_by: string;
479
+ /** @description The display name of that account, or its email address when no name is set. It reflects the value at the time of reading rather than at the time the invitation was sent */
480
+ invited_by_name: string;
377
481
  /** Format: uuid */
378
482
  project_id: string;
379
- /** @description 兑现时会授予的角色编码 */
483
+ /** @description The name of the target project */
484
+ project_name: string;
485
+ /** @description The role codes granted on acceptance */
380
486
  roles: string[] | null;
487
+ /** @description The display names of those codes, in the same order */
488
+ role_names: string[] | null;
381
489
  };
382
490
  LengthAwarePageInvitationResource: {
383
- /** @description 这一页的内容 */
491
+ /** @description The items in this page */
384
492
  items: components["schemas"]["InvitationResource"][];
385
493
  /**
386
494
  * Format: int64
387
- * @description 这一页最多几条,回显请求里的值
495
+ * @description Maximum number of items in this page, echoing the request
388
496
  */
389
497
  limit: number;
390
498
  /**
391
499
  * Format: int64
392
- * @description 跳过了多少条,回显请求里的值
500
+ * @description Number of items skipped, echoing the request
393
501
  */
394
502
  offset: number;
395
503
  /**
396
504
  * Format: int64
397
- * @description 命中的总条数,不只是这一页
505
+ * @description Total number of matches, not only this page
398
506
  */
399
507
  total: number;
400
508
  };
401
509
  AcceptInvitationByTokenRequestBody: {
510
+ /** @description The token carried by the invitation link */
402
511
  token: string;
403
512
  };
404
513
  ProjectResource: {
514
+ /**
515
+ * Format: date-time
516
+ * @description A read-only management lock. Running resources and billing remain unchanged. Only an operator can release it.
517
+ */
518
+ locked_at: string | null;
519
+ lock_reason: string;
405
520
  ban_reason: string;
406
521
  /** Format: date-time */
407
522
  created_at: string;
408
523
  created_by: string;
409
524
  /**
410
525
  * Format: date-time
411
- * @description 盖上墓碑的那一刻
526
+ * @description When the project was deleted
412
527
  */
413
528
  deleted_at: string | null;
414
529
  description: string;
415
530
  /** Format: uuid */
416
531
  id: string;
417
532
  name: string;
418
- /**
419
- * Format: date-time
420
- * @description 欠费的起始时间
421
- */
422
- overdue_at: string | null;
423
533
  /** @enum {string} */
424
534
  status: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING" | "DELETED";
425
- /** @description 给人看的,不参与任何查询 */
535
+ /** @description Written for a reader; it takes part in no query */
426
536
  status_reason: string;
427
537
  /** Format: date-time */
428
538
  updated_at: string;
@@ -433,31 +543,45 @@ export interface components {
433
543
  GrantResource: {
434
544
  admin: boolean;
435
545
  owner: boolean;
436
- /** @description 持有的全部自定义角色的权限并集,已去重排序 */
437
- permissions: string[] | null;
438
- /** @description 持有的角色编码,只用于展示 */
546
+ /** @description The role codes held, for display only */
439
547
  roles: string[] | null;
548
+ /** @description **Do not walk these rules to reach a decision.** They are compiled from every policy that applies to the caller, and serve to render what a user may do. Each request is decided by the service handling it */
549
+ rules: components["schemas"]["RuleResource"][] | null;
550
+ };
551
+ ResourceRefResource: {
552
+ /** @description A string rather than a UUID; a DNS zone, for one, is named by its domain. Matching is glob, so `*.example.com` covers a set of subdomains, while a value carrying no glob metacharacter matches exactly */
553
+ id: string;
554
+ /** @description Of the form compute:instance or dns:zone, in the same namespace as permission names */
555
+ type: string;
556
+ };
557
+ RuleResource: {
558
+ /** @enum {string} */
559
+ effect: "allow" | "deny";
560
+ /** @description A trailing wildcard is supported (compute:instance.*), and must carry the service prefix */
561
+ permissions: string[] | null;
562
+ /** @description Empty means the rule holds across the whole project. While it is not empty the rule holds only on those resources, and therefore answers no project-level question */
563
+ resources: components["schemas"]["ResourceRefResource"][] | null;
440
564
  };
441
565
  ProjectAccessResource: {
442
566
  grant: components["schemas"]["GrantResource"];
443
567
  project: components["schemas"]["ProjectResource"];
444
568
  };
445
569
  LengthAwarePageProjectAccessResource: {
446
- /** @description 这一页的内容 */
570
+ /** @description The items in this page */
447
571
  items: components["schemas"]["ProjectAccessResource"][];
448
572
  /**
449
573
  * Format: int64
450
- * @description 这一页最多几条,回显请求里的值
574
+ * @description Maximum number of items in this page, echoing the request
451
575
  */
452
576
  limit: number;
453
577
  /**
454
578
  * Format: int64
455
- * @description 跳过了多少条,回显请求里的值
579
+ * @description Number of items skipped, echoing the request
456
580
  */
457
581
  offset: number;
458
582
  /**
459
583
  * Format: int64
460
- * @description 命中的总条数,不只是这一页
584
+ * @description Total number of matches, not only this page
461
585
  */
462
586
  total: number;
463
587
  };
@@ -465,24 +589,24 @@ export interface components {
465
589
  description?: string;
466
590
  name: string;
467
591
  };
468
- ProjectTokenResponseBody: {
592
+ ScopedTokenResponseBody: {
469
593
  /**
470
594
  * Format: date-time
471
- * @description 过期时刻。到点之前拿用户身份再换一张,别等第一个 401
595
+ * @description When the token expires. Exchange for a new one before then rather than waiting for the first 401
472
596
  */
473
597
  expires_at: string;
474
598
  /**
475
599
  * Format: int64
476
- * @description 还能活多少秒
600
+ * @description Seconds remaining before expiry
477
601
  */
478
602
  expires_in: number;
479
- /** @description **这一份是此刻的快照,不在令牌里,也不要缓存它。** 它只用来决定界面上画什么;真正的判定每次都要重新问 */
603
+ /** @description **A snapshot taken at the moment of the exchange. It is not carried in the token, and must not be cached.** It serves to render what a user may do; each request is decided again */
480
604
  grant: components["schemas"]["GrantResource"];
481
- /** @description 顺带带上项目本身,省掉换完之后立刻再查一次 */
605
+ /** @description The project itself, so that no further lookup is needed after the exchange */
482
606
  project: components["schemas"]["ProjectResource"];
483
- /** @description 项目令牌,放进 Authorization: Bearer 里用 */
607
+ /** @description The scoped token, to be sent as `Authorization: Bearer` */
484
608
  token: string;
485
- /** @description 固定是 Bearer */
609
+ /** @description Always `Bearer` */
486
610
  token_type: string;
487
611
  };
488
612
  };
@@ -523,6 +647,35 @@ export interface operations {
523
647
  };
524
648
  };
525
649
  };
650
+ "list-locales": {
651
+ parameters: {
652
+ query?: never;
653
+ header?: never;
654
+ path?: never;
655
+ cookie?: never;
656
+ };
657
+ requestBody?: never;
658
+ responses: {
659
+ /** @description OK */
660
+ 200: {
661
+ headers: {
662
+ [name: string]: unknown;
663
+ };
664
+ content: {
665
+ "application/json": components["schemas"]["LocaleOptionsResource"];
666
+ };
667
+ };
668
+ /** @description Error */
669
+ default: {
670
+ headers: {
671
+ [name: string]: unknown;
672
+ };
673
+ content: {
674
+ "application/json": components["schemas"]["Error"];
675
+ };
676
+ };
677
+ };
678
+ };
526
679
  "list-agreements": {
527
680
  parameters: {
528
681
  query?: never;
@@ -676,6 +829,39 @@ export interface operations {
676
829
  };
677
830
  };
678
831
  };
832
+ "update-account": {
833
+ parameters: {
834
+ query?: never;
835
+ header?: never;
836
+ path?: never;
837
+ cookie?: never;
838
+ };
839
+ requestBody: {
840
+ content: {
841
+ "application/json": components["schemas"]["UpdateAccountRequestBody"];
842
+ };
843
+ };
844
+ responses: {
845
+ /** @description OK */
846
+ 200: {
847
+ headers: {
848
+ [name: string]: unknown;
849
+ };
850
+ content: {
851
+ "application/json": components["schemas"]["AccountResource"];
852
+ };
853
+ };
854
+ /** @description Error */
855
+ default: {
856
+ headers: {
857
+ [name: string]: unknown;
858
+ };
859
+ content: {
860
+ "application/json": components["schemas"]["Error"];
861
+ };
862
+ };
863
+ };
864
+ };
679
865
  "get-identity-verification": {
680
866
  parameters: {
681
867
  query?: never;
@@ -741,9 +927,9 @@ export interface operations {
741
927
  "list-my-invitations": {
742
928
  parameters: {
743
929
  query?: {
744
- /** @description 这一页最多返回多少条 */
930
+ /** @description Maximum number of items in this page */
745
931
  limit?: number;
746
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
932
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
747
933
  offset?: number;
748
934
  };
749
935
  header?: never;
@@ -772,6 +958,38 @@ export interface operations {
772
958
  };
773
959
  };
774
960
  };
961
+ "preview-invitation-by-token": {
962
+ parameters: {
963
+ query: {
964
+ /** @description The token carried by the invitation link */
965
+ token: string;
966
+ };
967
+ header?: never;
968
+ path?: never;
969
+ cookie?: never;
970
+ };
971
+ requestBody?: never;
972
+ responses: {
973
+ /** @description OK */
974
+ 200: {
975
+ headers: {
976
+ [name: string]: unknown;
977
+ };
978
+ content: {
979
+ "application/json": components["schemas"]["InvitationPreviewResource"];
980
+ };
981
+ };
982
+ /** @description Error */
983
+ default: {
984
+ headers: {
985
+ [name: string]: unknown;
986
+ };
987
+ content: {
988
+ "application/json": components["schemas"]["Error"];
989
+ };
990
+ };
991
+ };
992
+ };
775
993
  "accept-invitation-by-token": {
776
994
  parameters: {
777
995
  query?: never;
@@ -839,13 +1057,13 @@ export interface operations {
839
1057
  "list-projects": {
840
1058
  parameters: {
841
1059
  query?: {
842
- /** @description 这一页最多返回多少条 */
1060
+ /** @description Maximum number of items in this page */
843
1061
  limit?: number;
844
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1062
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
845
1063
  offset?: number;
846
- /** @description 按名称或描述模糊匹配 */
1064
+ /** @description Matches against name or description */
847
1065
  keyword?: string;
848
- /** @description 按对外状态过滤。不传时不返回已删除的项目 */
1066
+ /** @description Filters by external status. Deleted projects are excluded while this is absent */
849
1067
  status?: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING" | "DELETED";
850
1068
  };
851
1069
  header?: never;
@@ -907,7 +1125,7 @@ export interface operations {
907
1125
  };
908
1126
  };
909
1127
  };
910
- "exchange-project-token": {
1128
+ "create-scoped-token": {
911
1129
  parameters: {
912
1130
  query?: never;
913
1131
  header?: never;
@@ -924,7 +1142,7 @@ export interface operations {
924
1142
  [name: string]: unknown;
925
1143
  };
926
1144
  content: {
927
- "application/json": components["schemas"]["ProjectTokenResponseBody"];
1145
+ "application/json": components["schemas"]["ScopedTokenResponseBody"];
928
1146
  };
929
1147
  };
930
1148
  /** @description Error */