@leaflow/sdk 0.0.0-dev.125.ged02bc4 → 0.0.0-dev.129.g409f04f

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-permissions。roles 里不能有 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 整体替换而不是逐字段改:resources、roles、permissions 各自整份覆盖,没发的那份就是空的——只有「这就是这条策略现在的全貌」这一种语义说得清一次写入到底收回了什么。改不动的是策略的**种类**:基础策略(不限资源的 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;
@@ -382,26 +382,32 @@ export interface components {
382
382
  code?: string;
383
383
  message: string;
384
384
  meta?: {
385
+ /**
386
+ * @description Present on every response whose `code` is `VALIDATION_FAILED`, and on no
387
+ * other response.
388
+ */
389
+ violations?: components["schemas"]["Violation"][];
390
+ } & {
385
391
  [key: string]: unknown;
386
392
  };
387
393
  /** Format: int64 */
388
394
  status: number;
389
395
  };
390
396
  PermissionResource: {
391
- /** @description 权限的代码,形如 compute:instance.delete。**这里没有展示名**:一条权限对人显示成什么字是本地化的,服务端存一份的话那一份只会是某一种语言,而读它的人可能读别的语言。译名归渲染它的那一层;它没跟上时界面显示的就是这个代码——一个自解释的降级,而且看得见 */
397
+ /** @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
398
  name: string;
393
- /** @description 只有项目所有者能做,绑到自定义角色上也不会生效 */
399
+ /** @description Reserved for the project owner. Attaching it to a custom role has no effect */
394
400
  owner_only: boolean;
395
- /** @description 这条权限的判定对象是哪类资源,空表示它是项目级的。**它不必等于操作对象本身**——compute 的 route 表上没有 project_id,隔离本来就经父网络传递,所以 compute:route.create 的判定对象是 compute:private_network。非空同时意味着这条权限可以被限定到具体实例;create 和 list 一律留空 */
401
+ /** @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
402
  resource_type: string;
397
403
  };
398
404
  ResourceTypeResource: {
399
- /** @description 资源类型的代码,形如 dns:zone。同样没有展示名:它该显示成「托管域名」还是「Zone」由渲染它的那一层按读者的语言决定 */
405
+ /** @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
406
  name: string;
401
407
  };
402
408
  CatalogResource: {
403
409
  permissions: components["schemas"]["PermissionResource"][] | null;
404
- /** @description 这个服务声明的资源类型。带资源范围的规则只落得到它们上面——一个没有被声明过的类型没人认得,限定在它上面的规则谁都判不出来 */
410
+ /** @description The resource types this service declares. A scoped rule can only land on one of them */
405
411
  resource_types: components["schemas"]["ResourceTypeResource"][] | null;
406
412
  service: string;
407
413
  };
@@ -409,25 +415,25 @@ export interface components {
409
415
  items: components["schemas"]["CatalogResource"][] | null;
410
416
  };
411
417
  ResourceRefResource: {
412
- /** @description 是字符串不是 uuid:dns 的 zone 标识是域名,而且不在 IAM 库里。匹配语义是 glob,所以 *.example.com 能表达一批子域名;uuid 和域名都不含 glob 元字符,对它们来说就是精确相等 */
418
+ /** @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
419
  id: string;
414
- /** @description 形如 compute:instance、dns:zone,和权限名同一个命名空间 */
420
+ /** @description Of the form compute:instance or dns:zone, in the same namespace as permission names */
415
421
  type: string;
416
422
  };
417
423
  RuleResource: {
418
424
  /** @enum {string} */
419
425
  effect: "allow" | "deny";
420
- /** @description 权限名,支持尾部通配(compute:instance.*)。通配必须带服务前缀——一条光秃秃的 * 会把日后新上线的服务的操作也一起授出去,而那件事发生的时候没有任何人在场 */
426
+ /** @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
427
  permissions: string[] | null;
422
- /** @description 为空表示整个项目范围;非空表示这条规则只在这些资源上成立,而那意味着它回答不了项目级的问题 */
428
+ /** @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
429
  resources: components["schemas"]["ResourceRefResource"][] | null;
424
430
  };
425
431
  GrantResource: {
426
432
  admin: boolean;
427
433
  owner: boolean;
428
- /** @description 持有的角色编码,只用于展示 */
434
+ /** @description The role codes held, for display only */
429
435
  roles: string[] | null;
430
- /** @description 他全部策略编译出来的规则。**不要自己遍历它做判定**——拿它配上自己那份权限目录交给 pkg/rbac:owner 不可被 deny、deny 优先于 admin、带资源范围的规则不参与项目级判定,那里面的顺序每一条都对着一种会静默放行的写法 */
436
+ /** @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
437
  rules: components["schemas"]["RuleResource"][] | null;
432
438
  };
433
439
  ProjectResource: {
@@ -437,7 +443,7 @@ export interface components {
437
443
  created_by: string;
438
444
  /**
439
445
  * Format: date-time
440
- * @description 盖上墓碑的那一刻
446
+ * @description When the project was deleted
441
447
  */
442
448
  deleted_at: string | null;
443
449
  description: string;
@@ -446,7 +452,7 @@ export interface components {
446
452
  name: string;
447
453
  /** @enum {string} */
448
454
  status: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING" | "DELETED";
449
- /** @description 给人看的,不参与任何查询 */
455
+ /** @description Written for a reader; it takes part in no query */
450
456
  status_reason: string;
451
457
  /** Format: date-time */
452
458
  updated_at: string;
@@ -476,37 +482,37 @@ export interface components {
476
482
  invited_by: string;
477
483
  /** Format: uuid */
478
484
  project_id: string;
479
- /** @description 兑现时会授予的角色编码 */
485
+ /** @description The role codes granted on redemption */
480
486
  roles: string[] | null;
481
487
  };
482
488
  LengthAwarePageInvitationResource: {
483
- /** @description 这一页的内容 */
489
+ /** @description The items in this page */
484
490
  items: components["schemas"]["InvitationResource"][];
485
491
  /**
486
492
  * Format: int64
487
- * @description 这一页最多几条,回显请求里的值
493
+ * @description Maximum number of items in this page, echoing the request
488
494
  */
489
495
  limit: number;
490
496
  /**
491
497
  * Format: int64
492
- * @description 跳过了多少条,回显请求里的值
498
+ * @description Number of items skipped, echoing the request
493
499
  */
494
500
  offset: number;
495
501
  /**
496
502
  * Format: int64
497
- * @description 命中的总条数,不只是这一页
503
+ * @description Total number of matches, not only this page
498
504
  */
499
505
  total: number;
500
506
  };
501
507
  IssueInvitationRequestBody: {
502
508
  /** Format: email */
503
509
  email: string;
504
- /** @description 兑现时授予的角色编码。必须是这个项目已经定义的,OWNER 不行 */
510
+ /** @description The role codes granted on redemption. Each must already be defined in this project, and `OWNER` is not accepted */
505
511
  roles: string[] | null;
506
512
  };
507
513
  IssuedInvitationResponseBody: {
508
514
  invitation: components["schemas"]["InvitationResource"];
509
- /** @description 兑现用的明文,**只在这一次响应里出现**。库里只有它的哈希,丢了只能撤销重发 */
515
+ /** @description The token that redeems the invitation, **returned in this response only**. If it is lost, withdraw the invitation and send another */
510
516
  token: string;
511
517
  };
512
518
  BatchGetMembersRequestBody: {
@@ -541,48 +547,48 @@ export interface components {
541
547
  user_id: string;
542
548
  };
543
549
  LengthAwarePageMemberResource: {
544
- /** @description 这一页的内容 */
550
+ /** @description The items in this page */
545
551
  items: components["schemas"]["MemberResource"][];
546
552
  /**
547
553
  * Format: int64
548
- * @description 这一页最多几条,回显请求里的值
554
+ * @description Maximum number of items in this page, echoing the request
549
555
  */
550
556
  limit: number;
551
557
  /**
552
558
  * Format: int64
553
- * @description 跳过了多少条,回显请求里的值
559
+ * @description Number of items skipped, echoing the request
554
560
  */
555
561
  offset: number;
556
562
  /**
557
563
  * Format: int64
558
- * @description 命中的总条数,不只是这一页
564
+ * @description Total number of matches, not only this page
559
565
  */
560
566
  total: number;
561
567
  };
562
568
  SetMemberRolesRequestBody: {
563
- /** @description 这个人应当持有的**全部**角色编码。OWNER 不能出现在这里 */
569
+ /** @description **Every** role code this person is to hold. `OWNER` cannot appear here */
564
570
  roles: string[] | null;
565
571
  };
566
572
  SetMemberPermissionsRequestBody: {
567
- /** @description 这个人应当直挂的**全部**权限名,整体替换。角色给的那些不在这里,也不会被这次写入碰到 */
573
+ /** @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
574
  permissions: string[] | null;
569
575
  };
570
576
  PolicyResource: {
571
- /** @description 基础策略是方向 allow、不限资源的那一条,每个成员恰好一条,装的是他的常规角色。改它走 PUT /members/{userId}/roles 和 PUT /members/{userId}/permissions */
577
+ /** @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
578
  base: boolean;
573
579
  /** Format: date-time */
574
580
  created_at: string;
575
- /** @description 给人看的理由。一条附加策略事后最难回答的是「当初为什么开这一条」 */
581
+ /** @description Why it was granted, written for a reader */
576
582
  description: string;
577
583
  /** @enum {string} */
578
584
  effect: "allow" | "deny";
579
585
  /** Format: uuid */
580
586
  id: string;
581
- /** @description 直挂在这个人身上的权限名,不经过角色 */
587
+ /** @description Permission names attached directly to this person, without passing through a role */
582
588
  permissions: string[] | null;
583
- /** @description 为空表示整个项目范围 */
589
+ /** @description Empty means the whole project */
584
590
  resources: components["schemas"]["ResourceRefResource"][] | null;
585
- /** @description 这条策略带上的角色编码 */
591
+ /** @description The role codes this policy carries */
586
592
  roles: string[] | null;
587
593
  /** Format: date-time */
588
594
  updated_at: string;
@@ -592,45 +598,45 @@ export interface components {
592
598
  items: components["schemas"]["PolicyResource"][] | null;
593
599
  };
594
600
  AttachPolicyRequestBody: {
595
- /** @description 给人看的理由。一条附加策略事后最难回答的是「当初为什么开这一条」 */
601
+ /** @description Why it was granted, written for a reader */
596
602
  description?: string;
597
603
  /** @enum {string} */
598
604
  effect: "allow" | "deny";
599
- /** @description 直挂的权限名,用它就不必为一个人临时造一个只有他持有的角色 */
605
+ /** @description Permission names attached directly, which avoids creating a role only one person holds */
600
606
  permissions?: string[] | null;
601
- /** @description 这条策略只在这些资源上成立。留空只有配合 deny 才讲得通——一条不限资源的 allow 是基础策略,那一条已经有了 */
607
+ /** @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
608
  resources?: components["schemas"]["ResourceRefResource"][] | null;
603
- /** @description 必须是这个项目已经定义的角色。OWNER 和 ADMIN 不行——它们是规则而不是权限集合,「限定在三台机器上的所有者」讲不通 */
609
+ /** @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
610
  roles?: string[] | null;
605
- /** @description 必须已经是这个项目的成员 */
611
+ /** @description Must already be a member of this project */
606
612
  user_id: string;
607
613
  };
608
614
  UpdatePolicyRequestBody: {
609
- /** @description 给人看的理由。它和这次改动一起替换,不然留下来的会是一句解释着上一个版本的话 */
615
+ /** @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
616
  description?: string;
611
617
  /**
612
- * @description 必须和这条策略当前的方向一致。方向改不动——那不是「改一条策略」,是一次意思完全相反的授权决定,改它的人多半以为自己在收紧,而读这行数据的下一个人看到的是一条方向和当初授予时不同、说明文字却还是旧的策略。仍然要求发这个字段而不是干脆不收,是因为整体替换的语义是「这就是这条策略现在的全貌」:少一个字段的话,调用方以为自己把 deny 改成了 allow,而服务端默默忽略了它。不一致时返回 PROJECT_POLICY_EFFECT_IMMUTABLE
618
+ * @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
619
  * @enum {string}
614
620
  */
615
621
  effect: "allow" | "deny";
616
- /** @description 直挂的权限名,整份替换。没列进来的就是被收回了——它不是往上加一条 */
622
+ /** @description Permission names attached directly, replaced in full. Anything not listed is withdrawn rather than kept */
617
623
  permissions?: string[] | null;
618
- /** @description 这条策略的资源范围,整份替换。范围内容能改,有没有范围改不了:基础策略加不上范围,带范围的也清不空——清空之后它就是基础策略的形状,而那个位置每个成员只有一条 */
624
+ /** @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
625
  resources?: components["schemas"]["ResourceRefResource"][] | null;
620
- /** @description 必须是这个项目已经定义的角色,整份替换。和挂上去那次一样不能有 OWNER 或 ADMIN */
626
+ /** @description Each must be a role already defined in this project, replaced in full. As when attaching, `OWNER` and `ADMIN` are not accepted */
621
627
  roles?: string[] | null;
622
628
  };
623
629
  TransferOwnershipRequestBody: {
624
- /** @description 接手的人必须已经是这个项目的成员 */
630
+ /** @description The recipient must already be a member of this project */
625
631
  to_user_id: string;
626
632
  };
627
633
  OwnershipTransferResponseBody: {
628
- /** @description 原所有者。他保留其余的角色——转让的是所有权,不是把人踢出去 */
634
+ /** @description The former owner, who keeps every other role held. Ownership is transferred rather than the person removed */
629
635
  from: components["schemas"]["MemberResource"];
630
636
  to: components["schemas"]["MemberResource"];
631
637
  };
632
638
  RoleResource: {
633
- /** @description 内置角色不可删、不可改权限:OWNER 和 ADMIN 的语义写在代码里 */
639
+ /** @description A built-in role can be neither deleted nor have its permissions changed */
634
640
  builtin: boolean;
635
641
  code: string;
636
642
  /** Format: date-time */
@@ -645,11 +651,11 @@ export interface components {
645
651
  items: components["schemas"]["RoleResource"][] | null;
646
652
  };
647
653
  CreateRoleRequestBody: {
648
- /** @description 小写字母开头,可含数字和下划线。建好之后不能改——成员绑定和邀请都指着它 */
654
+ /** @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
655
  code: string;
650
656
  description?: string;
651
657
  name: string;
652
- /** @description 权限名。OwnerOnly 的那几条会被拒绝:绑上去也不会生效 */
658
+ /** @description A permission name. The ones reserved for the owner are refused, since attaching them would have no effect */
653
659
  permissions?: string[] | null;
654
660
  };
655
661
  UpdateRoleRequestBody: {
@@ -661,55 +667,78 @@ export interface components {
661
667
  /** Format: date-time */
662
668
  created_at: string;
663
669
  fingerprint: string;
664
- /** @description 平台生成并保管的那把。它的私钥不对外提供 */
670
+ /** @description The key the platform generates and holds. Its private key is not handed out */
665
671
  has_private_key: boolean;
666
672
  /** Format: uuid */
667
673
  id: string;
668
674
  key_type: string;
669
675
  name: string;
670
- /** @description 归属人;不给表示这把钥匙归项目本身 */
676
+ /** @description Who the key belongs to. Absent means it belongs to the project itself */
671
677
  owner_user_id?: string;
672
678
  public_key: string;
673
- /** @description 用途标签。平台自己生成的那把是 platform */
679
+ /** @description A purpose label. The key the platform generates carries `platform` */
674
680
  purposes: string[] | null;
675
681
  /** @enum {string} */
676
682
  status: "ACTIVE" | "REVOKED";
677
683
  };
678
684
  LengthAwarePageSSHKeyResource: {
679
- /** @description 这一页的内容 */
685
+ /** @description The items in this page */
680
686
  items: components["schemas"]["SSHKeyResource"][];
681
687
  /**
682
688
  * Format: int64
683
- * @description 这一页最多几条,回显请求里的值
689
+ * @description Maximum number of items in this page, echoing the request
684
690
  */
685
691
  limit: number;
686
692
  /**
687
693
  * Format: int64
688
- * @description 跳过了多少条,回显请求里的值
694
+ * @description Number of items skipped, echoing the request
689
695
  */
690
696
  offset: number;
691
697
  /**
692
698
  * Format: int64
693
- * @description 命中的总条数,不只是这一页
699
+ * @description Total number of matches, not only this page
694
700
  */
695
701
  total: number;
696
702
  };
697
703
  CreateSSHKeyRequestBody: {
698
704
  name: string;
699
705
  /**
700
- * @description 这把钥匙归谁
706
+ * @description Who this key belongs to
701
707
  * @default me
702
708
  * @enum {string}
703
709
  */
704
710
  owner?: "me" | "project";
705
- /** @description OpenSSH 格式的公钥。类型和指纹从它算出来,都不可改 */
711
+ /** @description The public key in OpenSSH format. The type and the fingerprint are derived from it and cannot be changed */
706
712
  public_key: string;
707
- /** @description 用途标签,比如 ci、bastion */
713
+ /** @description A purpose label, such as ci or bastion */
708
714
  purposes?: string[] | null;
709
715
  };
710
716
  RenameSSHKeyRequestBody: {
711
717
  name: string;
712
718
  };
719
+ /**
720
+ * @description A single mismatch between the request and the contract.
721
+ *
722
+ * Use `field` to locate the input, `rule` to decide what to tell the user, and
723
+ * `reason` only for diagnostics.
724
+ */
725
+ Violation: {
726
+ /**
727
+ * @description Dot-separated path to the field, such as `name` or
728
+ * `schedule.0.start_time_seconds`.
729
+ */
730
+ field: string;
731
+ /**
732
+ * @description The JSON Schema keyword that failed, such as `minLength`, `minimum` or
733
+ * `pattern`.
734
+ */
735
+ rule: string;
736
+ /**
737
+ * @description The validator's own wording, in English. Intended for diagnostics; do not
738
+ * display it to end users.
739
+ */
740
+ reason?: string;
741
+ };
713
742
  };
714
743
  responses: never;
715
744
  parameters: never;
@@ -871,9 +900,9 @@ export interface operations {
871
900
  "list-project-invitations": {
872
901
  parameters: {
873
902
  query?: {
874
- /** @description 这一页最多返回多少条 */
903
+ /** @description Maximum number of items in this page */
875
904
  limit?: number;
876
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
905
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
877
906
  offset?: number;
878
907
  };
879
908
  header?: never;
@@ -1000,11 +1029,11 @@ export interface operations {
1000
1029
  "list-members": {
1001
1030
  parameters: {
1002
1031
  query?: {
1003
- /** @description 这一页最多返回多少条 */
1032
+ /** @description Maximum number of items in this page */
1004
1033
  limit?: number;
1005
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1034
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
1006
1035
  offset?: number;
1007
- /** @description 按用户 ID、邮箱或姓名模糊匹配 */
1036
+ /** @description Matches against user id, email address or name */
1008
1037
  keyword?: string;
1009
1038
  };
1010
1039
  header?: never;
@@ -1135,7 +1164,7 @@ export interface operations {
1135
1164
  "list-policies": {
1136
1165
  parameters: {
1137
1166
  query?: {
1138
- /** @description 只看这个人身上的。不传表示整个项目的 */
1167
+ /** @description Restricts the result to one person. Omitting it covers the whole project */
1139
1168
  userId?: string;
1140
1169
  };
1141
1170
  header?: never;
@@ -1485,13 +1514,13 @@ export interface operations {
1485
1514
  "list-ssh-keys": {
1486
1515
  parameters: {
1487
1516
  query?: {
1488
- /** @description 这一页最多返回多少条 */
1517
+ /** @description Maximum number of items in this page */
1489
1518
  limit?: number;
1490
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1519
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
1491
1520
  offset?: number;
1492
- /** @description 不传时两种都返回 */
1521
+ /** @description Both kinds are returned while this is absent */
1493
1522
  status?: "ACTIVE" | "REVOKED";
1494
- /** @description 只列挂着这个用途的钥匙。平台自己生成的那把是 platform */
1523
+ /** @description Lists only the keys carrying this purpose. The key the platform generates carries `platform` */
1495
1524
  purpose?: string;
1496
1525
  };
1497
1526
  header?: never;