@leaflow/sdk 0.54.3 → 0.55.0

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.
@@ -11,8 +11,8 @@ export interface paths {
11
11
  cookie?: never;
12
12
  };
13
13
  /**
14
- * 列出全平台可授予的权限
15
- * @description 各服务在启动时把自己那份目录注册进 IAM(和 AddFinalizer 同一段代码),所以这里是一份汇总,不只是 IAM 自己那几条。**IAM 不用它做判定**——判定在各服务自己那边,拿 Grant 配它自己那份目录算;这份汇总只是让界面画得出勾选框,它落后一个版本只会让界面上少几条可选项,不会让判定出错。一个还没启动过的服务,它的权限不在这里。
14
+ * List every permission the platform can grant
15
+ * @description Each service registers its own catalogue with IAM at start-up, so this is the platform-wide list rather than the permissions of IAM alone. **IAM does not decide anything with it** — each service decides using the caller's grant together with its own catalogue, and this list only serves to render the choices. A service that has never started does not appear here.
16
16
  */
17
17
  get: operations["list-permissions"];
18
18
  put?: never;
@@ -31,20 +31,20 @@ export interface paths {
31
31
  cookie?: never;
32
32
  };
33
33
  /**
34
- * 查看一个项目
35
- * @description 在项目里就看得到,不需要额外的读权限。
34
+ * Get a project
35
+ * @description Visible to any member; no further permission is required.
36
36
  */
37
37
  get: operations["get-project"];
38
38
  put?: never;
39
39
  post?: never;
40
40
  /**
41
- * 删除项目
42
- * @description 只有所有者能做,而且没有回头路:项目进入 DELETING,各服务开始清掉它下面的资源。项目行本身永远留着——查一个删掉的项目查得到,答案是它没了,而不是一个 404
41
+ * Delete a project
42
+ * @description Only the owner can do this, and it cannot be undone. The project enters DELETING and each service begins removing the resources under it. The project itself remains readable afterwards, answering that it is gone rather than 404.
43
43
  */
44
44
  delete: operations["delete-project"];
45
45
  options?: never;
46
46
  head?: never;
47
- /** 改项目的名称与描述 */
47
+ /** Update the name and description of a project */
48
48
  patch: operations["update-project"];
49
49
  trace?: never;
50
50
  };
@@ -56,8 +56,8 @@ export interface paths {
56
56
  cookie?: never;
57
57
  };
58
58
  /**
59
- * 查看我在这个项目里的身份
60
- * @description 只给事实,不给结论:这里没有 allowed,因为 IAM 不知道你要做的是哪个操作——哪个操作需要哪条权限那份目录属于各个服务,判断在它们那边。
59
+ * Get the caller's standing in this project
60
+ * @description Facts rather than a conclusion. There is no `allowed` field here, because each service holds the catalogue mapping its operations to permissions and decides on its own.
61
61
  */
62
62
  get: operations["get-project-membership"];
63
63
  put?: never;
@@ -76,14 +76,14 @@ export interface paths {
76
76
  cookie?: never;
77
77
  };
78
78
  /**
79
- * 列出这个项目还在等的要约
80
- * @description 在项目里就看得到,和成员列表同一条规则:谁被请了也是「这个项目有谁」的一部分。
79
+ * List the invitations this project is still waiting on
80
+ * @description Visible to any member, on the same rule as the member list. Who has been invited is part of who is in the project.
81
81
  */
82
82
  get: operations["list-project-invitations"];
83
83
  put?: never;
84
84
  /**
85
- * 发出一份邀请
86
- * @description 要约站 14 天。有上限是因为里面那些角色是按发出那一刻的项目校验的,一份活得比它所依据的安排还久的要约会授出现在没人打算授的权限。
85
+ * Send an invitation
86
+ * @description An invitation stands for 14 days. The roles it carries are validated against the project as it stood when the invitation was sent, so it expires rather than outliving the arrangement it rests on.
87
87
  */
88
88
  post: operations["issue-invitation"];
89
89
  delete?: never;
@@ -102,7 +102,7 @@ export interface paths {
102
102
  get?: never;
103
103
  put?: never;
104
104
  post?: never;
105
- /** 撤回一份还没被兑现的要约 */
105
+ /** Withdraw an invitation that has not been redeemed */
106
106
  delete: operations["revoke-invitation"];
107
107
  options?: never;
108
108
  head?: never;
@@ -140,7 +140,7 @@ export interface paths {
140
140
  path?: never;
141
141
  cookie?: never;
142
142
  };
143
- /** 列出项目成员 */
143
+ /** List the members of a project */
144
144
  get: operations["list-members"];
145
145
  put?: never;
146
146
  post?: never;
@@ -161,8 +161,8 @@ export interface paths {
161
161
  put?: never;
162
162
  post?: never;
163
163
  /**
164
- * 移除成员,或者自己退出
165
- * @description 移除别人要 iam:members.manage;退出只要求自己在这个项目里——任何人都可能被拉进一个项目,那么任何人就得能出去。所有者两条路都不行,先转移所有权。
164
+ * Remove a member, or leave the project
165
+ * @description Removing someone else requires `iam:members.manage`; leaving requires only membership of the project. The owner can do neither, and has to transfer ownership first.
166
166
  */
167
167
  delete: operations["remove-member"];
168
168
  options?: never;
@@ -179,8 +179,8 @@ export interface paths {
179
179
  };
180
180
  get?: never;
181
181
  /**
182
- * 设置一个成员持有的角色
183
- * @description 整体替换而不是增删:调用方拿到的就是一份完整清单,让它自己算差集只会让「我以为我取消了那个角色」这种事变得可能。所有者身上的 OWNER 不受影响。
182
+ * Set the roles a member holds
183
+ * @description The list is replaced in full rather than added to or removed from. The `OWNER` role of the owner is unaffected.
184
184
  */
185
185
  put: operations["set-member-roles"];
186
186
  post?: never;
@@ -199,8 +199,8 @@ export interface paths {
199
199
  };
200
200
  get?: never;
201
201
  /**
202
- * 设置一个成员直挂的权限
203
- * @description 整体替换基础策略上直挂的那些权限。直挂让「给某个人临时开一条」不必先造一个只有他一个人持有的角色,但它不会随角色调整而更新,所以它适合一次性的、说得出理由的授予——角色仍然是主要的组织方式。要 iam:members.manage
202
+ * Set the permissions attached directly to a member
203
+ * @description Replaces, in full, the permissions attached directly to the base policy. A direct permission grants one person something without creating a role only they hold, and it does not follow later changes to any role. Requires `iam:members.manage`.
204
204
  */
205
205
  put: operations["set-member-permissions"];
206
206
  post?: never;
@@ -218,14 +218,14 @@ export interface paths {
218
218
  cookie?: never;
219
219
  };
220
220
  /**
221
- * 列出这个项目里的策略
222
- * @description 在项目里就看得到,和成员列表同一条规则:谁被授了什么也是「这个项目有谁」的一部分。
221
+ * List the policies in this project
222
+ * @description Visible to any member, on the same rule as the member list. What has been granted to whom is part of who is in the project.
223
223
  */
224
224
  get: operations["list-policies"];
225
225
  put?: never;
226
226
  /**
227
- * 附加一条策略
228
- * @description 它建的是**附加**策略——要么带资源范围,要么方向是 deny。一条不限资源的 allow 是基础策略,每个成员只有一条,改它走 set-member-roles set-member-permissionsroles 里不能有 OWNER ADMIN:它们是规则而不是权限集合,「限定在三台机器上的所有者」讲不通。要 iam:members.manage
227
+ * Attach a policy
228
+ * @description This creates an **additional** policy, which either carries a resource scope or has `deny` as its effect. An `allow` covering every resource is a base policy, of which each member holds exactly one, and it is changed with set-member-roles and set-member-permissions. `roles` cannot contain `OWNER` or `ADMIN`. Requires `iam:members.manage`.
229
229
  */
230
230
  post: operations["attach-policy"];
231
231
  delete?: never;
@@ -242,19 +242,19 @@ export interface paths {
242
242
  cookie?: never;
243
243
  };
244
244
  /**
245
- * 查看一条策略
246
- * @description list-policies 同一条规则,在项目里就看得到:谁被授了什么也是「这个项目有谁」的一部分,读它不需要额外的权限。
245
+ * Get a policy
246
+ * @description Visible to any member, on the same rule as list-policies; no further permission is required.
247
247
  */
248
248
  get: operations["get-policy"];
249
249
  /**
250
- * 改一条策略
251
- * @description 整体替换而不是逐字段改:resourcesrolespermissions 各自整份覆盖,没发的那份就是空的——只有「这就是这条策略现在的全貌」这一种语义说得清一次写入到底收回了什么。改不动的是策略的**种类**:基础策略(不限资源的 allow)加不上资源范围,这个成员的角色就存在它上面,给它加个范围等于让他在别的资源上什么都不是;一条带范围的策略反过来也不能把范围清空变成基础策略,那个位置每个成员只有一条。要换种类就删了重建。要 iam:members.manage
250
+ * Update a policy
251
+ * @description Replaced in full rather than field by field — `resources`, `roles` and `permissions` are each overwritten, and an omitted one becomes empty. The **kind** of a policy cannot change — a base policy (an `allow` covering every resource) cannot take a resource scope, and a scoped policy cannot have its scope cleared. Delete and recreate to change the kind. Requires `iam:members.manage`.
252
252
  */
253
253
  put: operations["update-policy"];
254
254
  post?: never;
255
255
  /**
256
- * 摘掉一条策略
257
- * @description 基础策略摘不掉——它是这个成员角色的落点,删了它这个人就不再持有任何角色,而「让他离开这个项目」是 remove-member 的事。要 iam:members.manage
256
+ * Detach a policy
257
+ * @description A base policy cannot be detached; it is where a member's roles sit. Use remove-member to take someone out of the project. Requires `iam:members.manage`.
258
258
  */
259
259
  delete: operations["detach-policy"];
260
260
  options?: never;
@@ -272,8 +272,8 @@ export interface paths {
272
272
  get?: never;
273
273
  put?: never;
274
274
  /**
275
- * 转移项目所有权
276
- * @description OWNER 唯一的移动方式,只有所有者本人能发起——能像普通角色那样授予的话,任何管理员都可以顺手把自己变成所有者。
275
+ * Transfer ownership of a project
276
+ * @description The only way `OWNER` moves, and only the owner can initiate it.
277
277
  */
278
278
  post: operations["transfer-project-ownership"];
279
279
  delete?: never;
@@ -289,10 +289,10 @@ export interface paths {
289
289
  path?: never;
290
290
  cookie?: never;
291
291
  };
292
- /** 列出项目里的角色 */
292
+ /** List the roles in this project */
293
293
  get: operations["list-roles"];
294
294
  put?: never;
295
- /** 建一个角色 */
295
+ /** Create a role */
296
296
  post: operations["create-role"];
297
297
  delete?: never;
298
298
  options?: never;
@@ -307,17 +307,17 @@ export interface paths {
307
307
  path?: never;
308
308
  cookie?: never;
309
309
  };
310
- /** 查看一个角色 */
310
+ /** Get a role */
311
311
  get: operations["get-role"];
312
312
  /**
313
- * 改一个角色
314
- * @description 名称、描述和权限整体替换。改完会在同一个事务里重新编译持有它的每一个成员——角色的权限变了,就是那些人的权限变了,而下一次请求是拿编译结果判定的。
313
+ * Update a role
314
+ * @description The name, the description and the permissions are replaced in full. Every member holding the role is recompiled in the same transaction, so the change takes effect on the next request.
315
315
  */
316
316
  put: operations["update-role"];
317
317
  post?: never;
318
318
  /**
319
- * 删一个角色
320
- * @description 还有人持有时会被拒。级联摘掉那些绑定等于把每个持有者悄悄降级——请求里没有一个字说了这件事,事后也查不到。
319
+ * Delete a role
320
+ * @description Refused while anyone still holds it. Cascading the removal would quietly demote every holder.
321
321
  */
322
322
  delete: operations["delete-role"];
323
323
  options?: never;
@@ -333,14 +333,14 @@ export interface paths {
333
333
  cookie?: never;
334
334
  };
335
335
  /**
336
- * 列出这个项目的公钥
337
- * @description 归成员的和归项目的都在里面,靠每一条上的 owner_user_id 区分。
336
+ * List the SSH keys of this project
337
+ * @description Both the keys belonging to members and the keys belonging to the project are listed; the `owner_user_id` on each one tells them apart.
338
338
  */
339
339
  get: operations["list-ssh-keys"];
340
340
  put?: never;
341
341
  /**
342
- * 添加一把公钥
343
- * @description owner=me 是自己的,是成员就能加;owner=project 是项目公用的,要 iam:ssh_keys.manage —— 它会进这个项目之后开出来的每一台机器。
342
+ * Add an SSH key
343
+ * @description `owner=me` adds a key of the caller's own, which any member may do. `owner=project` adds a key shared by the project, requires `iam:ssh_keys.manage`, and lands on every machine created in the project afterwards.
344
344
  */
345
345
  post: operations["create-ssh-key"];
346
346
  delete?: never;
@@ -356,20 +356,20 @@ export interface paths {
356
356
  path?: never;
357
357
  cookie?: never;
358
358
  };
359
- /** 查看一把公钥 */
359
+ /** Get an SSH key */
360
360
  get: operations["get-ssh-key"];
361
361
  put?: never;
362
362
  post?: never;
363
363
  /**
364
- * 吊销一把公钥
365
- * @description 行留着,状态变成 REVOKED。事故之后要问的是当时信任的是哪把钥匙。
364
+ * Revoke an SSH key
365
+ * @description The row remains and its status becomes `REVOKED`, so it stays answerable afterwards which key was trusted at the time.
366
366
  */
367
367
  delete: operations["revoke-ssh-key"];
368
368
  options?: never;
369
369
  head?: never;
370
370
  /**
371
- * 给公钥改名
372
- * @description 只有名字能改:公钥、类型、指纹是同一样东西的三种说法,改其中一个会让这一行描述一把并不存在的钥匙。
371
+ * Rename an SSH key
372
+ * @description Only the name can change. The key, its type and its fingerprint are three statements about one thing, and changing one of them would leave the row describing a key that does not exist.
373
373
  */
374
374
  patch: operations["rename-ssh-key"];
375
375
  trace?: never;
@@ -381,6 +381,10 @@ export interface components {
381
381
  Error: {
382
382
  code?: string;
383
383
  message: string;
384
+ /**
385
+ * @description What a given `code` carries alongside the message. The keys depend on the code,
386
+ * and a client that does not recognise one ignores it.
387
+ */
384
388
  meta?: {
385
389
  [key: string]: unknown;
386
390
  };
@@ -388,20 +392,20 @@ export interface components {
388
392
  status: number;
389
393
  };
390
394
  PermissionResource: {
391
- /** @description 权限的代码,形如 compute:instance.delete。**这里没有展示名**:一条权限对人显示成什么字是本地化的,服务端存一份的话那一份只会是某一种语言,而读它的人可能读别的语言。译名归渲染它的那一层;它没跟上时界面显示的就是这个代码——一个自解释的降级,而且看得见 */
395
+ /** @description The code of the permission, such as compute:instance.delete. **There is no display name here** — what a permission reads as is localised, and translation belongs to the layer rendering it. Until a translation catches up, the code itself is what is shown */
392
396
  name: string;
393
- /** @description 只有项目所有者能做,绑到自定义角色上也不会生效 */
397
+ /** @description Reserved for the project owner. Attaching it to a custom role has no effect */
394
398
  owner_only: boolean;
395
- /** @description 这条权限的判定对象是哪类资源,空表示它是项目级的。**它不必等于操作对象本身**——compute route 表上没有 project_id,隔离本来就经父网络传递,所以 compute:route.create 的判定对象是 compute:private_network。非空同时意味着这条权限可以被限定到具体实例;create list 一律留空 */
399
+ /** @description The kind of resource this permission is decided against; empty means it is decided at project level. **It need not be the object being operated on** — a compute route carries no project_id and is isolated through its parent network, so compute:route.create is decided against compute:private_network. A non-empty value also means the permission can be scoped to particular instances; create and list are always empty */
396
400
  resource_type: string;
397
401
  };
398
402
  ResourceTypeResource: {
399
- /** @description 资源类型的代码,形如 dns:zone。同样没有展示名:它该显示成「托管域名」还是「Zone」由渲染它的那一层按读者的语言决定 */
403
+ /** @description The code of the resource type, such as dns:zone. There is no display name here either; what it reads as is decided by the layer rendering it */
400
404
  name: string;
401
405
  };
402
406
  CatalogResource: {
403
407
  permissions: components["schemas"]["PermissionResource"][] | null;
404
- /** @description 这个服务声明的资源类型。带资源范围的规则只落得到它们上面——一个没有被声明过的类型没人认得,限定在它上面的规则谁都判不出来 */
408
+ /** @description The resource types this service declares. A scoped rule can only land on one of them */
405
409
  resource_types: components["schemas"]["ResourceTypeResource"][] | null;
406
410
  service: string;
407
411
  };
@@ -409,25 +413,25 @@ export interface components {
409
413
  items: components["schemas"]["CatalogResource"][] | null;
410
414
  };
411
415
  ResourceRefResource: {
412
- /** @description 是字符串不是 uuid:dns zone 标识是域名,而且不在 IAM 库里。匹配语义是 glob,所以 *.example.com 能表达一批子域名;uuid 和域名都不含 glob 元字符,对它们来说就是精确相等 */
416
+ /** @description A string rather than a UUID; a DNS zone is named by its domain, which IAM does not hold. Matching is glob, so `*.example.com` covers a set of subdomains, while a value carrying no glob metacharacter matches exactly */
413
417
  id: string;
414
- /** @description 形如 compute:instancedns:zone,和权限名同一个命名空间 */
418
+ /** @description Of the form compute:instance or dns:zone, in the same namespace as permission names */
415
419
  type: string;
416
420
  };
417
421
  RuleResource: {
418
422
  /** @enum {string} */
419
423
  effect: "allow" | "deny";
420
- /** @description 权限名,支持尾部通配(compute:instance.*)。通配必须带服务前缀——一条光秃秃的 * 会把日后新上线的服务的操作也一起授出去,而那件事发生的时候没有任何人在场 */
424
+ /** @description A permission name, with a trailing wildcard supported (compute:instance.*). A wildcard must carry the service prefix; a bare wildcard would also grant the operations of services that go live later */
421
425
  permissions: string[] | null;
422
- /** @description 为空表示整个项目范围;非空表示这条规则只在这些资源上成立,而那意味着它回答不了项目级的问题 */
426
+ /** @description Empty means the rule holds across the whole project. A non-empty value means it holds only on those resources, and therefore answers no project-level question */
423
427
  resources: components["schemas"]["ResourceRefResource"][] | null;
424
428
  };
425
429
  GrantResource: {
426
430
  admin: boolean;
427
431
  owner: boolean;
428
- /** @description 持有的角色编码,只用于展示 */
432
+ /** @description The role codes held, for display only */
429
433
  roles: string[] | null;
430
- /** @description 他全部策略编译出来的规则。**不要自己遍历它做判定**——拿它配上自己那份权限目录交给 pkg/rbac:owner 不可被 deny、deny 优先于 admin、带资源范围的规则不参与项目级判定,那里面的顺序每一条都对着一种会静默放行的写法 */
434
+ /** @description **The rules compiled from every policy that applies. Do not walk them to reach a decision.** They are here to render what a user may do; each request is decided by the service handling it */
431
435
  rules: components["schemas"]["RuleResource"][] | null;
432
436
  };
433
437
  ProjectResource: {
@@ -437,7 +441,7 @@ export interface components {
437
441
  created_by: string;
438
442
  /**
439
443
  * Format: date-time
440
- * @description 盖上墓碑的那一刻
444
+ * @description When the project was deleted
441
445
  */
442
446
  deleted_at: string | null;
443
447
  description: string;
@@ -446,7 +450,7 @@ export interface components {
446
450
  name: string;
447
451
  /** @enum {string} */
448
452
  status: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING" | "DELETED";
449
- /** @description 给人看的,不参与任何查询 */
453
+ /** @description Written for a reader; it takes part in no query */
450
454
  status_reason: string;
451
455
  /** Format: date-time */
452
456
  updated_at: string;
@@ -476,37 +480,37 @@ export interface components {
476
480
  invited_by: string;
477
481
  /** Format: uuid */
478
482
  project_id: string;
479
- /** @description 兑现时会授予的角色编码 */
483
+ /** @description The role codes granted on redemption */
480
484
  roles: string[] | null;
481
485
  };
482
486
  LengthAwarePageInvitationResource: {
483
- /** @description 这一页的内容 */
487
+ /** @description The items in this page */
484
488
  items: components["schemas"]["InvitationResource"][];
485
489
  /**
486
490
  * Format: int64
487
- * @description 这一页最多几条,回显请求里的值
491
+ * @description Maximum number of items in this page, echoing the request
488
492
  */
489
493
  limit: number;
490
494
  /**
491
495
  * Format: int64
492
- * @description 跳过了多少条,回显请求里的值
496
+ * @description Number of items skipped, echoing the request
493
497
  */
494
498
  offset: number;
495
499
  /**
496
500
  * Format: int64
497
- * @description 命中的总条数,不只是这一页
501
+ * @description Total number of matches, not only this page
498
502
  */
499
503
  total: number;
500
504
  };
501
505
  IssueInvitationRequestBody: {
502
506
  /** Format: email */
503
507
  email: string;
504
- /** @description 兑现时授予的角色编码。必须是这个项目已经定义的,OWNER 不行 */
508
+ /** @description The role codes granted on redemption. Each must already be defined in this project, and `OWNER` is not accepted */
505
509
  roles: string[] | null;
506
510
  };
507
511
  IssuedInvitationResponseBody: {
508
512
  invitation: components["schemas"]["InvitationResource"];
509
- /** @description 兑现用的明文,**只在这一次响应里出现**。库里只有它的哈希,丢了只能撤销重发 */
513
+ /** @description The token that redeems the invitation, **returned in this response only**. If it is lost, withdraw the invitation and send another */
510
514
  token: string;
511
515
  };
512
516
  BatchGetMembersRequestBody: {
@@ -541,48 +545,48 @@ export interface components {
541
545
  user_id: string;
542
546
  };
543
547
  LengthAwarePageMemberResource: {
544
- /** @description 这一页的内容 */
548
+ /** @description The items in this page */
545
549
  items: components["schemas"]["MemberResource"][];
546
550
  /**
547
551
  * Format: int64
548
- * @description 这一页最多几条,回显请求里的值
552
+ * @description Maximum number of items in this page, echoing the request
549
553
  */
550
554
  limit: number;
551
555
  /**
552
556
  * Format: int64
553
- * @description 跳过了多少条,回显请求里的值
557
+ * @description Number of items skipped, echoing the request
554
558
  */
555
559
  offset: number;
556
560
  /**
557
561
  * Format: int64
558
- * @description 命中的总条数,不只是这一页
562
+ * @description Total number of matches, not only this page
559
563
  */
560
564
  total: number;
561
565
  };
562
566
  SetMemberRolesRequestBody: {
563
- /** @description 这个人应当持有的**全部**角色编码。OWNER 不能出现在这里 */
567
+ /** @description **Every** role code this person is to hold. `OWNER` cannot appear here */
564
568
  roles: string[] | null;
565
569
  };
566
570
  SetMemberPermissionsRequestBody: {
567
- /** @description 这个人应当直挂的**全部**权限名,整体替换。角色给的那些不在这里,也不会被这次写入碰到 */
571
+ /** @description **Every** permission name to be attached directly to this person, replaced in full. The permissions a role grants are neither listed here nor touched by this write */
568
572
  permissions: string[] | null;
569
573
  };
570
574
  PolicyResource: {
571
- /** @description 基础策略是方向 allow、不限资源的那一条,每个成员恰好一条,装的是他的常规角色。改它走 PUT /members/{userId}/roles PUT /members/{userId}/permissions */
575
+ /** @description The base policy is the one whose effect is `allow` and which covers every resource. Each member holds exactly one, and it carries their ordinary roles. Change it with PUT /members/{userId}/roles and PUT /members/{userId}/permissions */
572
576
  base: boolean;
573
577
  /** Format: date-time */
574
578
  created_at: string;
575
- /** @description 给人看的理由。一条附加策略事后最难回答的是「当初为什么开这一条」 */
579
+ /** @description Why it was granted, written for a reader */
576
580
  description: string;
577
581
  /** @enum {string} */
578
582
  effect: "allow" | "deny";
579
583
  /** Format: uuid */
580
584
  id: string;
581
- /** @description 直挂在这个人身上的权限名,不经过角色 */
585
+ /** @description Permission names attached directly to this person, without passing through a role */
582
586
  permissions: string[] | null;
583
- /** @description 为空表示整个项目范围 */
587
+ /** @description Empty means the whole project */
584
588
  resources: components["schemas"]["ResourceRefResource"][] | null;
585
- /** @description 这条策略带上的角色编码 */
589
+ /** @description The role codes this policy carries */
586
590
  roles: string[] | null;
587
591
  /** Format: date-time */
588
592
  updated_at: string;
@@ -592,45 +596,45 @@ export interface components {
592
596
  items: components["schemas"]["PolicyResource"][] | null;
593
597
  };
594
598
  AttachPolicyRequestBody: {
595
- /** @description 给人看的理由。一条附加策略事后最难回答的是「当初为什么开这一条」 */
599
+ /** @description Why it was granted, written for a reader */
596
600
  description?: string;
597
601
  /** @enum {string} */
598
602
  effect: "allow" | "deny";
599
- /** @description 直挂的权限名,用它就不必为一个人临时造一个只有他持有的角色 */
603
+ /** @description Permission names attached directly, which avoids creating a role only one person holds */
600
604
  permissions?: string[] | null;
601
- /** @description 这条策略只在这些资源上成立。留空只有配合 deny 才讲得通——一条不限资源的 allow 是基础策略,那一条已经有了 */
605
+ /** @description The policy holds only on these resources. Leaving it empty makes sense only together with `deny`, since an `allow` covering every resource is the base policy, which already exists */
602
606
  resources?: components["schemas"]["ResourceRefResource"][] | null;
603
- /** @description 必须是这个项目已经定义的角色。OWNER ADMIN 不行——它们是规则而不是权限集合,「限定在三台机器上的所有者」讲不通 */
607
+ /** @description Each must be a role already defined in this project. `OWNER` and `ADMIN` are not accepted, being rules rather than sets of permissions */
604
608
  roles?: string[] | null;
605
- /** @description 必须已经是这个项目的成员 */
609
+ /** @description Must already be a member of this project */
606
610
  user_id: string;
607
611
  };
608
612
  UpdatePolicyRequestBody: {
609
- /** @description 给人看的理由。它和这次改动一起替换,不然留下来的会是一句解释着上一个版本的话 */
613
+ /** @description Why it was granted, written for a reader. It is replaced together with the change, so that what remains does not explain an earlier version */
610
614
  description?: string;
611
615
  /**
612
- * @description 必须和这条策略当前的方向一致。方向改不动——那不是「改一条策略」,是一次意思完全相反的授权决定,改它的人多半以为自己在收紧,而读这行数据的下一个人看到的是一条方向和当初授予时不同、说明文字却还是旧的策略。仍然要求发这个字段而不是干脆不收,是因为整体替换的语义是「这就是这条策略现在的全貌」:少一个字段的话,调用方以为自己把 deny 改成了 allow,而服务端默默忽略了它。不一致时返回 PROJECT_POLICY_EFFECT_IMMUTABLE
616
+ * @description Must match the current effect of the policy. The effect itself cannot be changed; delete the policy and create another instead. It is still required in the request because the write replaces the policy in full, and omitting it would let a caller believe an effect had been changed while the field was ignored. A mismatch answers PROJECT_POLICY_EFFECT_IMMUTABLE
613
617
  * @enum {string}
614
618
  */
615
619
  effect: "allow" | "deny";
616
- /** @description 直挂的权限名,整份替换。没列进来的就是被收回了——它不是往上加一条 */
620
+ /** @description Permission names attached directly, replaced in full. Anything not listed is withdrawn rather than kept */
617
621
  permissions?: string[] | null;
618
- /** @description 这条策略的资源范围,整份替换。范围内容能改,有没有范围改不了:基础策略加不上范围,带范围的也清不空——清空之后它就是基础策略的形状,而那个位置每个成员只有一条 */
622
+ /** @description The resource scope of this policy, replaced in full. What the scope contains can change; whether the policy has one cannot. A base policy cannot take a scope, and a scoped policy cannot have its scope cleared */
619
623
  resources?: components["schemas"]["ResourceRefResource"][] | null;
620
- /** @description 必须是这个项目已经定义的角色,整份替换。和挂上去那次一样不能有 OWNER ADMIN */
624
+ /** @description Each must be a role already defined in this project, replaced in full. As when attaching, `OWNER` and `ADMIN` are not accepted */
621
625
  roles?: string[] | null;
622
626
  };
623
627
  TransferOwnershipRequestBody: {
624
- /** @description 接手的人必须已经是这个项目的成员 */
628
+ /** @description The recipient must already be a member of this project */
625
629
  to_user_id: string;
626
630
  };
627
631
  OwnershipTransferResponseBody: {
628
- /** @description 原所有者。他保留其余的角色——转让的是所有权,不是把人踢出去 */
632
+ /** @description The former owner, who keeps every other role held. Ownership is transferred rather than the person removed */
629
633
  from: components["schemas"]["MemberResource"];
630
634
  to: components["schemas"]["MemberResource"];
631
635
  };
632
636
  RoleResource: {
633
- /** @description 内置角色不可删、不可改权限:OWNER ADMIN 的语义写在代码里 */
637
+ /** @description A built-in role can be neither deleted nor have its permissions changed */
634
638
  builtin: boolean;
635
639
  code: string;
636
640
  /** Format: date-time */
@@ -645,11 +649,11 @@ export interface components {
645
649
  items: components["schemas"]["RoleResource"][] | null;
646
650
  };
647
651
  CreateRoleRequestBody: {
648
- /** @description 小写字母开头,可含数字和下划线。建好之后不能改——成员绑定和邀请都指着它 */
652
+ /** @description Begins with a lower-case letter and may contain digits and underscores. It cannot be changed once created, as member bindings and invitations refer to it */
649
653
  code: string;
650
654
  description?: string;
651
655
  name: string;
652
- /** @description 权限名。OwnerOnly 的那几条会被拒绝:绑上去也不会生效 */
656
+ /** @description A permission name. The ones reserved for the owner are refused, since attaching them would have no effect */
653
657
  permissions?: string[] | null;
654
658
  };
655
659
  UpdateRoleRequestBody: {
@@ -661,50 +665,50 @@ export interface components {
661
665
  /** Format: date-time */
662
666
  created_at: string;
663
667
  fingerprint: string;
664
- /** @description 平台生成并保管的那把。它的私钥不对外提供 */
668
+ /** @description The key the platform generates and holds. Its private key is not handed out */
665
669
  has_private_key: boolean;
666
670
  /** Format: uuid */
667
671
  id: string;
668
672
  key_type: string;
669
673
  name: string;
670
- /** @description 归属人;不给表示这把钥匙归项目本身 */
674
+ /** @description Who the key belongs to. Absent means it belongs to the project itself */
671
675
  owner_user_id?: string;
672
676
  public_key: string;
673
- /** @description 用途标签。平台自己生成的那把是 platform */
677
+ /** @description A purpose label. The key the platform generates carries `platform` */
674
678
  purposes: string[] | null;
675
679
  /** @enum {string} */
676
680
  status: "ACTIVE" | "REVOKED";
677
681
  };
678
682
  LengthAwarePageSSHKeyResource: {
679
- /** @description 这一页的内容 */
683
+ /** @description The items in this page */
680
684
  items: components["schemas"]["SSHKeyResource"][];
681
685
  /**
682
686
  * Format: int64
683
- * @description 这一页最多几条,回显请求里的值
687
+ * @description Maximum number of items in this page, echoing the request
684
688
  */
685
689
  limit: number;
686
690
  /**
687
691
  * Format: int64
688
- * @description 跳过了多少条,回显请求里的值
692
+ * @description Number of items skipped, echoing the request
689
693
  */
690
694
  offset: number;
691
695
  /**
692
696
  * Format: int64
693
- * @description 命中的总条数,不只是这一页
697
+ * @description Total number of matches, not only this page
694
698
  */
695
699
  total: number;
696
700
  };
697
701
  CreateSSHKeyRequestBody: {
698
702
  name: string;
699
703
  /**
700
- * @description 这把钥匙归谁
704
+ * @description Who this key belongs to
701
705
  * @default me
702
706
  * @enum {string}
703
707
  */
704
708
  owner?: "me" | "project";
705
- /** @description OpenSSH 格式的公钥。类型和指纹从它算出来,都不可改 */
709
+ /** @description The public key in OpenSSH format. The type and the fingerprint are derived from it and cannot be changed */
706
710
  public_key: string;
707
- /** @description 用途标签,比如 cibastion */
711
+ /** @description A purpose label, such as ci or bastion */
708
712
  purposes?: string[] | null;
709
713
  };
710
714
  RenameSSHKeyRequestBody: {
@@ -871,9 +875,9 @@ export interface operations {
871
875
  "list-project-invitations": {
872
876
  parameters: {
873
877
  query?: {
874
- /** @description 这一页最多返回多少条 */
878
+ /** @description Maximum number of items in this page */
875
879
  limit?: number;
876
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
880
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
877
881
  offset?: number;
878
882
  };
879
883
  header?: never;
@@ -1000,11 +1004,11 @@ export interface operations {
1000
1004
  "list-members": {
1001
1005
  parameters: {
1002
1006
  query?: {
1003
- /** @description 这一页最多返回多少条 */
1007
+ /** @description Maximum number of items in this page */
1004
1008
  limit?: number;
1005
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1009
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
1006
1010
  offset?: number;
1007
- /** @description 按用户 ID、邮箱或姓名模糊匹配 */
1011
+ /** @description Matches against user id, email address or name */
1008
1012
  keyword?: string;
1009
1013
  };
1010
1014
  header?: never;
@@ -1135,7 +1139,7 @@ export interface operations {
1135
1139
  "list-policies": {
1136
1140
  parameters: {
1137
1141
  query?: {
1138
- /** @description 只看这个人身上的。不传表示整个项目的 */
1142
+ /** @description Restricts the result to one person. Omitting it covers the whole project */
1139
1143
  userId?: string;
1140
1144
  };
1141
1145
  header?: never;
@@ -1485,13 +1489,13 @@ export interface operations {
1485
1489
  "list-ssh-keys": {
1486
1490
  parameters: {
1487
1491
  query?: {
1488
- /** @description 这一页最多返回多少条 */
1492
+ /** @description Maximum number of items in this page */
1489
1493
  limit?: number;
1490
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1494
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
1491
1495
  offset?: number;
1492
- /** @description 不传时两种都返回 */
1496
+ /** @description Both kinds are returned while this is absent */
1493
1497
  status?: "ACTIVE" | "REVOKED";
1494
- /** @description 只列挂着这个用途的钥匙。平台自己生成的那把是 platform */
1498
+ /** @description Lists only the keys carrying this purpose. The key the platform generates carries `platform` */
1495
1499
  purpose?: string;
1496
1500
  };
1497
1501
  header?: never;