@leaflow/sdk 0.0.0-dev.17.geb299fb → 0.0.0-dev.172.g8c535ea

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 (81) hide show
  1. package/README.md +13 -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 +34 -21
  5. package/dist/account/v1/index.js +4 -4
  6. package/dist/account/v1/schema.d.ts +374 -81
  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 +69 -40
  10. package/dist/assistant/v1/index.js +4 -4
  11. package/dist/assistant/v1/schema.d.ts +1089 -133
  12. package/dist/billing/v1/client.d.ts +6 -0
  13. package/dist/billing/v1/client.js +6 -0
  14. package/dist/billing/v1/index.d.ts +205 -0
  15. package/dist/billing/v1/index.js +5 -0
  16. package/dist/billing/v1/schema.d.ts +4976 -0
  17. package/dist/billing/v1/schema.js +5 -0
  18. package/dist/canopy/v1/client.d.ts +4 -0
  19. package/dist/canopy/v1/client.js +7 -0
  20. package/dist/canopy/v1/index.d.ts +24 -23
  21. package/dist/canopy/v1/index.js +4 -4
  22. package/dist/canopy/v1/schema.d.ts +113 -109
  23. package/dist/compute/v1/client.d.ts +4 -0
  24. package/dist/compute/v1/client.js +7 -0
  25. package/dist/compute/v1/index.d.ts +172 -125
  26. package/dist/compute/v1/index.js +4 -4
  27. package/dist/compute/v1/schema.d.ts +1567 -471
  28. package/dist/dns/v1/client.d.ts +4 -0
  29. package/dist/dns/v1/client.js +7 -0
  30. package/dist/dns/v1/index.d.ts +43 -0
  31. package/dist/dns/v1/index.js +5 -0
  32. package/dist/dns/v1/schema.d.ts +887 -0
  33. package/dist/dns/v1/schema.js +5 -0
  34. package/dist/fabric/v1/client.d.ts +4 -0
  35. package/dist/fabric/v1/client.js +7 -0
  36. package/dist/fabric/v1/index.d.ts +115 -0
  37. package/dist/fabric/v1/index.js +5 -0
  38. package/dist/fabric/v1/schema.d.ts +2311 -0
  39. package/dist/fabric/v1/schema.js +5 -0
  40. package/dist/fleet/v1/client.d.ts +4 -0
  41. package/dist/fleet/v1/client.js +7 -0
  42. package/dist/fleet/v1/index.d.ts +15 -0
  43. package/dist/fleet/v1/index.js +5 -0
  44. package/dist/fleet/v1/schema.d.ts +291 -0
  45. package/dist/fleet/v1/schema.js +5 -0
  46. package/dist/iam/v1/client.d.ts +4 -0
  47. package/dist/iam/v1/client.js +7 -0
  48. package/dist/iam/v1/index.d.ts +55 -32
  49. package/dist/iam/v1/index.js +4 -4
  50. package/dist/iam/v1/schema.d.ts +521 -88
  51. package/dist/index.d.ts +14 -7
  52. package/dist/index.js +22 -5
  53. package/dist/monitoring/v1/client.d.ts +4 -0
  54. package/dist/monitoring/v1/client.js +7 -0
  55. package/dist/monitoring/v1/index.d.ts +130 -49
  56. package/dist/monitoring/v1/index.js +4 -4
  57. package/dist/monitoring/v1/schema.d.ts +2420 -527
  58. package/dist/notification/v1/client.d.ts +4 -0
  59. package/dist/notification/v1/client.js +7 -0
  60. package/dist/notification/v1/index.d.ts +77 -0
  61. package/dist/notification/v1/index.js +5 -0
  62. package/dist/notification/v1/schema.d.ts +2048 -0
  63. package/dist/notification/v1/schema.js +5 -0
  64. package/dist/storage/v1/client.d.ts +4 -0
  65. package/dist/storage/v1/client.js +7 -0
  66. package/dist/storage/v1/index.d.ts +35 -0
  67. package/dist/storage/v1/index.js +5 -0
  68. package/dist/storage/v1/schema.d.ts +751 -0
  69. package/dist/storage/v1/schema.js +5 -0
  70. package/dist/support/v1/client.d.ts +4 -0
  71. package/dist/support/v1/client.js +7 -0
  72. package/dist/support/v1/index.d.ts +51 -0
  73. package/dist/support/v1/index.js +5 -0
  74. package/dist/support/v1/schema.d.ts +1082 -0
  75. package/dist/support/v1/schema.js +5 -0
  76. package/dist/tunnel/v1/client.d.ts +4 -0
  77. package/dist/tunnel/v1/client.js +7 -0
  78. package/dist/tunnel/v1/index.d.ts +8 -7
  79. package/dist/tunnel/v1/index.js +4 -4
  80. package/dist/tunnel/v1/schema.d.ts +40 -34
  81. package/package.json +34 -10
@@ -3,6 +3,54 @@
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
+ * Get registration and project creation settings
15
+ * @description No token required.
16
+ *
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
+ *
19
+ * Both quotas are `0` when unlimited. The decision itself is made at the moment of writing.
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
+ * 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
+ };
6
54
  "/account/v1/agreements": {
7
55
  parameters: {
8
56
  query?: never;
@@ -11,10 +59,10 @@ export interface paths {
11
59
  cookie?: never;
12
60
  };
13
61
  /**
14
- * 列出注册必须同意的文件
15
- * @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`.
16
64
  *
17
- * 不需要令牌。还没有任何文件生效时返回空数组,那时注册不需要提交 `consents`。
65
+ * The array is empty while no agreement is in force, and registration then takes no `consents`.
18
66
  */
19
67
  get: operations["list-agreements"];
20
68
  put?: never;
@@ -33,16 +81,16 @@ export interface paths {
33
81
  cookie?: never;
34
82
  };
35
83
  /**
36
- * 列出我同意过的文件
37
- * @description 全部记录,最新的在前,包括已经不是当前版本的那些。
84
+ * List the agreements the caller has consented to
85
+ * @description Every record, most recent first, including versions that are no longer current.
38
86
  */
39
87
  get: operations["list-consents"];
40
88
  put?: never;
41
89
  /**
42
- * 同意条款
43
- * @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.
44
92
  *
45
- * 只收当前生效的版本,签旧版答 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.
46
94
  */
47
95
  post: operations["accept-agreements"];
48
96
  delete?: never;
@@ -61,10 +109,10 @@ export interface paths {
61
109
  get?: never;
62
110
  put?: never;
63
111
  /**
64
- * 注册账号
65
- * @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.
66
114
  *
67
- * `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.
68
116
  */
69
117
  post: operations["register"];
70
118
  delete?: never;
@@ -81,8 +129,8 @@ export interface paths {
81
129
  cookie?: never;
82
130
  };
83
131
  /**
84
- * 查看当前账号
85
- * @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`.
86
134
  */
87
135
  get: operations["get-account"];
88
136
  put?: never;
@@ -90,7 +138,11 @@ export interface paths {
90
138
  delete?: never;
91
139
  options?: never;
92
140
  head?: never;
93
- 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"];
94
146
  trace?: never;
95
147
  };
96
148
  "/account/v1/me/identity-verification": {
@@ -101,14 +153,14 @@ export interface paths {
101
153
  cookie?: never;
102
154
  };
103
155
  /**
104
- * 查看实名核验状态
105
- * @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.
106
158
  */
107
159
  get: operations["get-identity-verification"];
108
160
  put?: never;
109
161
  /**
110
- * 提交实名核验材料
111
- * @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.
112
164
  */
113
165
  post: operations["submit-identity-verification"];
114
166
  delete?: never;
@@ -125,8 +177,8 @@ export interface paths {
125
177
  cookie?: never;
126
178
  };
127
179
  /**
128
- * 列出寄给我的要约
129
- * @description 按当前账号的邮箱查,因为要约是寄给一个地址的——被邀请的人当时可能还没注册。
180
+ * List invitations addressed to the caller
181
+ * @description Matched against the email address of the current account.
130
182
  */
131
183
  get: operations["list-my-invitations"];
132
184
  put?: never;
@@ -137,6 +189,30 @@ export interface paths {
137
189
  patch?: never;
138
190
  trace?: never;
139
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
+ };
140
216
  "/account/v1/me/invitations/accept": {
141
217
  parameters: {
142
218
  query?: never;
@@ -147,8 +223,8 @@ export interface paths {
147
223
  get?: never;
148
224
  put?: never;
149
225
  /**
150
- * 顺着邀请链接接受
151
- * @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.
152
228
  */
153
229
  post: operations["accept-invitation-by-token"];
154
230
  delete?: never;
@@ -167,8 +243,8 @@ export interface paths {
167
243
  get?: never;
168
244
  put?: never;
169
245
  /**
170
- * 接受一份列在我名下的要约
171
- * @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.
172
248
  */
173
249
  post: operations["accept-invitation"];
174
250
  delete?: never;
@@ -185,14 +261,14 @@ export interface paths {
185
261
  cookie?: never;
186
262
  };
187
263
  /**
188
- * 列出我参与的项目
189
- * @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.
190
266
  */
191
267
  get: operations["list-projects"];
192
268
  put?: never;
193
269
  /**
194
- * 建一个项目
195
- * @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.
196
272
  */
197
273
  post: operations["create-project"];
198
274
  delete?: never;
@@ -201,7 +277,7 @@ export interface paths {
201
277
  patch?: never;
202
278
  trace?: never;
203
279
  };
204
- "/account/v1/projects/{projectId}/token": {
280
+ "/account/v1/projects/{projectId}/scoped-tokens": {
205
281
  parameters: {
206
282
  query?: never;
207
283
  header?: never;
@@ -211,18 +287,18 @@ export interface paths {
211
287
  get?: never;
212
288
  put?: never;
213
289
  /**
214
- * 换一张项目令牌
215
- * @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.
216
292
  *
217
- * **只接受 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.
218
294
  *
219
- * 换取时会确认账号可用、项目存在,且**调用者是该项目的成员**。非成员无法换取。
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.
220
296
  *
221
- * 令牌只表明身份(用户与项目),**不包含权限**:权限在每次请求时实时判定,所以角色调整立即生效,不必等待令牌过期。
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.
222
298
  *
223
- * 项目处于停用、封禁或删除中时**仍可换取令牌**:这些状态限制的是写入,不影响查看项目当前状况。
299
+ * A project that is suspended, banned or being deleted still issues tokens; those states restrict writes, and the project remains readable.
224
300
  */
225
- post: operations["exchange-project-token"];
301
+ post: operations["create-scoped-token"];
226
302
  delete?: never;
227
303
  options?: never;
228
304
  head?: never;
@@ -236,23 +312,49 @@ export interface components {
236
312
  Error: {
237
313
  code?: string;
238
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
+ */
239
319
  meta?: {
240
320
  [key: string]: unknown;
241
321
  };
242
322
  /** Format: int64 */
243
323
  status: number;
244
324
  };
325
+ SettingsResource: {
326
+ /**
327
+ * Format: int64
328
+ * @description Maximum number of members a project may hold; 0 means unlimited
329
+ */
330
+ max_members_per_project: number;
331
+ /**
332
+ * Format: int64
333
+ * @description Maximum number of projects an account may own; 0 means unlimited. Deleted projects do not count
334
+ */
335
+ max_projects_per_user: number;
336
+ /**
337
+ * @description VERIFIED_ONLY requires identity verification to have completed; a submission under review does not qualify
338
+ * @enum {string}
339
+ */
340
+ project_creation_mode: "OPEN" | "VERIFIED_ONLY" | "CLOSED";
341
+ /**
342
+ * @description INVITE_ONLY accepts only an email address holding a project invitation
343
+ * @enum {string}
344
+ */
345
+ registration_mode: "OPEN" | "INVITE_ONLY" | "CLOSED";
346
+ };
245
347
  AgreementResource: {
246
348
  /**
247
349
  * Format: date-time
248
- * @description 从这一刻起注册必须同意这一版
350
+ * @description From this moment on, registration requires this version
249
351
  */
250
352
  effective_at: string;
251
353
  /** @enum {string} */
252
354
  type: "TERMS" | "PRIVACY" | "DPA";
253
- /** @description 正文发布在哪 */
355
+ /** @description Where the text is published */
254
356
  url: string;
255
- /** @description 同意时原样回传这个值 */
357
+ /** @description Send this value back unchanged when consenting */
256
358
  version: string;
257
359
  };
258
360
  AgreementListResponseBody: {
@@ -262,7 +364,7 @@ export interface components {
262
364
  /** Format: date-time */
263
365
  consented_at: string;
264
366
  /**
265
- * @description OFFLINE 是线下签的,由运营录入
367
+ * @description OFFLINE is a consent given off the platform and recorded by an operator
266
368
  * @enum {string}
267
369
  */
268
370
  method: "CLICKWRAP" | "OFFLINE";
@@ -287,24 +389,57 @@ export interface components {
287
389
  email: string;
288
390
  /** Format: date-time */
289
391
  email_verified_at: string | null;
290
- /** @description 来自登录信息,可能为空 */
392
+ /** @description Taken from the sign-in claims; may be empty */
291
393
  first_name: string;
292
- /** @description 身份提供方签发的 subject */
394
+ /** @description The subject issued by the identity provider */
293
395
  id: string;
294
- /** @description 来自登录信息,可能为空 */
396
+ /** @description Taken from the sign-in claims; may be empty */
295
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;
296
402
  pending_agreements: components["schemas"]["AgreementResource"][] | null;
297
403
  /** @enum {string} */
298
404
  status: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING";
299
405
  };
300
406
  RegisterRequestBody: {
301
- /** @description 当前生效的必签文件全部要在里面,版本号要和 GET /api/v1/agreements 给的一致 */
407
+ /** @description Must cover every agreement currently in force, at the versions returned by GET /account/v1/agreements */
302
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"];
303
438
  };
304
439
  IdentityVerificationResource: {
305
440
  reject_reason: string;
306
441
  /**
307
- * @description PERSONAL 和 ENTERPRISE 是两类主体而不是两个等级,别拿它们比大小
442
+ * @description PERSONAL and ENTERPRISE are two kinds of subject rather than two levels, and are not ordered
308
443
  * @enum {string}
309
444
  */
310
445
  status: "UNVERIFIED" | "PENDING" | "PERSONAL" | "ENTERPRISE" | "REJECTED";
@@ -314,11 +449,23 @@ export interface components {
314
449
  verified_at: string | null;
315
450
  };
316
451
  SubmitIdentityVerificationRequestBody: {
317
- /** @description 证件号码。同上,而且同一个号码不能挂在两个账号上 */
452
+ /** @description The document number. It is returned by no endpoint, and one number cannot be attached to two accounts */
318
453
  id_number: string;
319
- /** @description 真实姓名。敏感个人信息,加密入库,任何接口都不会再把它读出来 */
454
+ /** @description The legal name. It is returned by no endpoint */
320
455
  real_name: string;
321
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
+ };
322
469
  InvitationResource: {
323
470
  /** Format: date-time */
324
471
  created_at: string;
@@ -327,56 +474,65 @@ export interface components {
327
474
  expires_at: string;
328
475
  /** Format: uuid */
329
476
  id: string;
477
+ /** @description The id of the account that issued the invitation */
330
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;
331
481
  /** Format: uuid */
332
482
  project_id: string;
333
- /** @description 兑现时会授予的角色编码 */
483
+ /** @description The name of the target project */
484
+ project_name: string;
485
+ /** @description The role codes granted on acceptance */
334
486
  roles: string[] | null;
487
+ /** @description The display names of those codes, in the same order */
488
+ role_names: string[] | null;
335
489
  };
336
490
  LengthAwarePageInvitationResource: {
337
- /** @description 这一页的内容 */
491
+ /** @description The items in this page */
338
492
  items: components["schemas"]["InvitationResource"][];
339
493
  /**
340
494
  * Format: int64
341
- * @description 这一页最多几条,回显请求里的值
495
+ * @description Maximum number of items in this page, echoing the request
342
496
  */
343
497
  limit: number;
344
498
  /**
345
499
  * Format: int64
346
- * @description 跳过了多少条,回显请求里的值
500
+ * @description Number of items skipped, echoing the request
347
501
  */
348
502
  offset: number;
349
503
  /**
350
504
  * Format: int64
351
- * @description 命中的总条数,不只是这一页
505
+ * @description Total number of matches, not only this page
352
506
  */
353
507
  total: number;
354
508
  };
355
509
  AcceptInvitationByTokenRequestBody: {
510
+ /** @description The token carried by the invitation link */
356
511
  token: string;
357
512
  };
358
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;
359
520
  ban_reason: string;
360
521
  /** Format: date-time */
361
522
  created_at: string;
362
523
  created_by: string;
363
524
  /**
364
525
  * Format: date-time
365
- * @description 盖上墓碑的那一刻
526
+ * @description When the project was deleted
366
527
  */
367
528
  deleted_at: string | null;
368
529
  description: string;
369
530
  /** Format: uuid */
370
531
  id: string;
371
532
  name: string;
372
- /**
373
- * Format: date-time
374
- * @description 欠费的起始时间
375
- */
376
- overdue_at: string | null;
377
533
  /** @enum {string} */
378
534
  status: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING" | "DELETED";
379
- /** @description 给人看的,不参与任何查询 */
535
+ /** @description Written for a reader; it takes part in no query */
380
536
  status_reason: string;
381
537
  /** Format: date-time */
382
538
  updated_at: string;
@@ -387,31 +543,45 @@ export interface components {
387
543
  GrantResource: {
388
544
  admin: boolean;
389
545
  owner: boolean;
390
- /** @description 持有的全部自定义角色的权限并集,已去重排序 */
391
- permissions: string[] | null;
392
- /** @description 持有的角色编码,只用于展示 */
546
+ /** @description The role codes held, for display only */
393
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;
394
564
  };
395
565
  ProjectAccessResource: {
396
566
  grant: components["schemas"]["GrantResource"];
397
567
  project: components["schemas"]["ProjectResource"];
398
568
  };
399
569
  LengthAwarePageProjectAccessResource: {
400
- /** @description 这一页的内容 */
570
+ /** @description The items in this page */
401
571
  items: components["schemas"]["ProjectAccessResource"][];
402
572
  /**
403
573
  * Format: int64
404
- * @description 这一页最多几条,回显请求里的值
574
+ * @description Maximum number of items in this page, echoing the request
405
575
  */
406
576
  limit: number;
407
577
  /**
408
578
  * Format: int64
409
- * @description 跳过了多少条,回显请求里的值
579
+ * @description Number of items skipped, echoing the request
410
580
  */
411
581
  offset: number;
412
582
  /**
413
583
  * Format: int64
414
- * @description 命中的总条数,不只是这一页
584
+ * @description Total number of matches, not only this page
415
585
  */
416
586
  total: number;
417
587
  };
@@ -419,24 +589,24 @@ export interface components {
419
589
  description?: string;
420
590
  name: string;
421
591
  };
422
- ProjectTokenResponseBody: {
592
+ ScopedTokenResponseBody: {
423
593
  /**
424
594
  * Format: date-time
425
- * @description 过期时刻。到点之前拿用户身份再换一张,别等第一个 401
595
+ * @description When the token expires. Exchange for a new one before then rather than waiting for the first 401
426
596
  */
427
597
  expires_at: string;
428
598
  /**
429
599
  * Format: int64
430
- * @description 还能活多少秒
600
+ * @description Seconds remaining before expiry
431
601
  */
432
602
  expires_in: number;
433
- /** @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 */
434
604
  grant: components["schemas"]["GrantResource"];
435
- /** @description 顺带带上项目本身,省掉换完之后立刻再查一次 */
605
+ /** @description The project itself, so that no further lookup is needed after the exchange */
436
606
  project: components["schemas"]["ProjectResource"];
437
- /** @description 项目令牌,放进 Authorization: Bearer 里用 */
607
+ /** @description The scoped token, to be sent as `Authorization: Bearer` */
438
608
  token: string;
439
- /** @description 固定是 Bearer */
609
+ /** @description Always `Bearer` */
440
610
  token_type: string;
441
611
  };
442
612
  };
@@ -448,6 +618,64 @@ export interface components {
448
618
  }
449
619
  export type $defs = Record<string, never>;
450
620
  export interface operations {
621
+ "get-settings": {
622
+ parameters: {
623
+ query?: never;
624
+ header?: never;
625
+ path?: never;
626
+ cookie?: never;
627
+ };
628
+ requestBody?: never;
629
+ responses: {
630
+ /** @description OK */
631
+ 200: {
632
+ headers: {
633
+ [name: string]: unknown;
634
+ };
635
+ content: {
636
+ "application/json": components["schemas"]["SettingsResource"];
637
+ };
638
+ };
639
+ /** @description Error */
640
+ default: {
641
+ headers: {
642
+ [name: string]: unknown;
643
+ };
644
+ content: {
645
+ "application/json": components["schemas"]["Error"];
646
+ };
647
+ };
648
+ };
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
+ };
451
679
  "list-agreements": {
452
680
  parameters: {
453
681
  query?: never;
@@ -601,6 +829,39 @@ export interface operations {
601
829
  };
602
830
  };
603
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
+ };
604
865
  "get-identity-verification": {
605
866
  parameters: {
606
867
  query?: never;
@@ -666,9 +927,9 @@ export interface operations {
666
927
  "list-my-invitations": {
667
928
  parameters: {
668
929
  query?: {
669
- /** @description 这一页最多返回多少条 */
930
+ /** @description Maximum number of items in this page */
670
931
  limit?: number;
671
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
932
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
672
933
  offset?: number;
673
934
  };
674
935
  header?: never;
@@ -697,6 +958,38 @@ export interface operations {
697
958
  };
698
959
  };
699
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
+ };
700
993
  "accept-invitation-by-token": {
701
994
  parameters: {
702
995
  query?: never;
@@ -764,13 +1057,13 @@ export interface operations {
764
1057
  "list-projects": {
765
1058
  parameters: {
766
1059
  query?: {
767
- /** @description 这一页最多返回多少条 */
1060
+ /** @description Maximum number of items in this page */
768
1061
  limit?: number;
769
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1062
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
770
1063
  offset?: number;
771
- /** @description 按名称或描述模糊匹配 */
1064
+ /** @description Matches against name or description */
772
1065
  keyword?: string;
773
- /** @description 按对外状态过滤。不传时不返回已删除的项目 */
1066
+ /** @description Filters by external status. Deleted projects are excluded while this is absent */
774
1067
  status?: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING" | "DELETED";
775
1068
  };
776
1069
  header?: never;
@@ -832,7 +1125,7 @@ export interface operations {
832
1125
  };
833
1126
  };
834
1127
  };
835
- "exchange-project-token": {
1128
+ "create-scoped-token": {
836
1129
  parameters: {
837
1130
  query?: never;
838
1131
  header?: never;
@@ -849,7 +1142,7 @@ export interface operations {
849
1142
  [name: string]: unknown;
850
1143
  };
851
1144
  content: {
852
- "application/json": components["schemas"]["ProjectTokenResponseBody"];
1145
+ "application/json": components["schemas"]["ScopedTokenResponseBody"];
853
1146
  };
854
1147
  };
855
1148
  /** @description Error */