@leaflow/sdk 0.0.0-dev.16.gac94fbe → 0.0.0-dev.162.g0bbcd1c

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 +368 -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 +193 -0
  15. package/dist/billing/v1/index.js +5 -0
  16. package/dist/billing/v1/schema.d.ts +4713 -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 +80 -185
  26. package/dist/compute/v1/index.js +4 -4
  27. package/dist/compute/v1/schema.d.ts +808 -2844
  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 +515 -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 +749 -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 +15 -36
  79. package/dist/tunnel/v1/index.js +4 -4
  80. package/dist/tunnel/v1/schema.d.ts +70 -510
  81. package/package.json +34 -10
@@ -11,8 +11,8 @@ export interface paths {
11
11
  cookie?: never;
12
12
  };
13
13
  /**
14
- * 列出 IAM 自己声明的权限
15
- * @description **只有 IAM 这一份。** 别的服务的操作不在这里——权限目录由各个服务自己声明,IAM 认识它们就等于要跟着每个下游一起发版。
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,13 +102,37 @@ 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;
109
109
  patch?: never;
110
110
  trace?: never;
111
111
  };
112
+ "/api/v1/members:batchGet": {
113
+ parameters: {
114
+ query?: never;
115
+ header?: never;
116
+ path?: never;
117
+ cookie?: never;
118
+ };
119
+ get?: never;
120
+ put?: never;
121
+ /**
122
+ * Resolve members by id, including those who have left
123
+ * @description Resolves a set of account ids to the people behind them, scoped to the current project and **including members who have since left it**.
124
+ *
125
+ * This is what turns the ids held elsewhere in the product — who created a machine, who performed a logged operation — into names. The current member list cannot answer for somebody who has left, and those rows are exactly the ones a reader most often needs explained.
126
+ *
127
+ * Only ids that have belonged to the current project resolve; anything else is omitted, as are ids that do not resolve at all. Match the response against the request by id; the order is not significant.
128
+ */
129
+ post: operations["batch-get-members"];
130
+ delete?: never;
131
+ options?: never;
132
+ head?: never;
133
+ patch?: never;
134
+ trace?: never;
135
+ };
112
136
  "/api/v1/members": {
113
137
  parameters: {
114
138
  query?: never;
@@ -116,7 +140,7 @@ export interface paths {
116
140
  path?: never;
117
141
  cookie?: never;
118
142
  };
119
- /** 列出项目成员 */
143
+ /** List the members of a project */
120
144
  get: operations["list-members"];
121
145
  put?: never;
122
146
  post?: never;
@@ -137,8 +161,8 @@ export interface paths {
137
161
  put?: never;
138
162
  post?: never;
139
163
  /**
140
- * 移除成员,或者自己退出
141
- * @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.
142
166
  */
143
167
  delete: operations["remove-member"];
144
168
  options?: never;
@@ -155,8 +179,8 @@ export interface paths {
155
179
  };
156
180
  get?: never;
157
181
  /**
158
- * 设置一个成员持有的角色
159
- * @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.
160
184
  */
161
185
  put: operations["set-member-roles"];
162
186
  post?: never;
@@ -166,6 +190,78 @@ export interface paths {
166
190
  patch?: never;
167
191
  trace?: never;
168
192
  };
193
+ "/api/v1/members/{userId}/permissions": {
194
+ parameters: {
195
+ query?: never;
196
+ header?: never;
197
+ path?: never;
198
+ cookie?: never;
199
+ };
200
+ get?: never;
201
+ /**
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
+ */
205
+ put: operations["set-member-permissions"];
206
+ post?: never;
207
+ delete?: never;
208
+ options?: never;
209
+ head?: never;
210
+ patch?: never;
211
+ trace?: never;
212
+ };
213
+ "/api/v1/policies": {
214
+ parameters: {
215
+ query?: never;
216
+ header?: never;
217
+ path?: never;
218
+ cookie?: never;
219
+ };
220
+ /**
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
+ */
224
+ get: operations["list-policies"];
225
+ put?: never;
226
+ /**
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
+ */
230
+ post: operations["attach-policy"];
231
+ delete?: never;
232
+ options?: never;
233
+ head?: never;
234
+ patch?: never;
235
+ trace?: never;
236
+ };
237
+ "/api/v1/policies/{policyId}": {
238
+ parameters: {
239
+ query?: never;
240
+ header?: never;
241
+ path?: never;
242
+ cookie?: never;
243
+ };
244
+ /**
245
+ * Get a policy
246
+ * @description Visible to any member, on the same rule as list-policies; no further permission is required.
247
+ */
248
+ get: operations["get-policy"];
249
+ /**
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
+ */
253
+ put: operations["update-policy"];
254
+ post?: never;
255
+ /**
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
+ */
259
+ delete: operations["detach-policy"];
260
+ options?: never;
261
+ head?: never;
262
+ patch?: never;
263
+ trace?: never;
264
+ };
169
265
  "/api/v1/transfer-ownership": {
170
266
  parameters: {
171
267
  query?: never;
@@ -176,8 +272,8 @@ export interface paths {
176
272
  get?: never;
177
273
  put?: never;
178
274
  /**
179
- * 转移项目所有权
180
- * @description OWNER 唯一的移动方式,只有所有者本人能发起——能像普通角色那样授予的话,任何管理员都可以顺手把自己变成所有者。
275
+ * Transfer ownership of a project
276
+ * @description The only way `OWNER` moves, and only the owner can initiate it.
181
277
  */
182
278
  post: operations["transfer-project-ownership"];
183
279
  delete?: never;
@@ -193,10 +289,10 @@ export interface paths {
193
289
  path?: never;
194
290
  cookie?: never;
195
291
  };
196
- /** 列出项目里的角色 */
292
+ /** List the roles in this project */
197
293
  get: operations["list-roles"];
198
294
  put?: never;
199
- /** 建一个角色 */
295
+ /** Create a role */
200
296
  post: operations["create-role"];
201
297
  delete?: never;
202
298
  options?: never;
@@ -211,17 +307,17 @@ export interface paths {
211
307
  path?: never;
212
308
  cookie?: never;
213
309
  };
214
- /** 查看一个角色 */
310
+ /** Get a role */
215
311
  get: operations["get-role"];
216
312
  /**
217
- * 改一个角色
218
- * @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.
219
315
  */
220
316
  put: operations["update-role"];
221
317
  post?: never;
222
318
  /**
223
- * 删一个角色
224
- * @description 还有人持有时会被拒。级联摘掉那些绑定等于把每个持有者悄悄降级——请求里没有一个字说了这件事,事后也查不到。
319
+ * Delete a role
320
+ * @description Refused while anyone still holds it. Cascading the removal would quietly demote every holder.
225
321
  */
226
322
  delete: operations["delete-role"];
227
323
  options?: never;
@@ -237,14 +333,14 @@ export interface paths {
237
333
  cookie?: never;
238
334
  };
239
335
  /**
240
- * 列出这个项目的公钥
241
- * @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.
242
338
  */
243
339
  get: operations["list-ssh-keys"];
244
340
  put?: never;
245
341
  /**
246
- * 添加一把公钥
247
- * @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.
248
344
  */
249
345
  post: operations["create-ssh-key"];
250
346
  delete?: never;
@@ -260,20 +356,20 @@ export interface paths {
260
356
  path?: never;
261
357
  cookie?: never;
262
358
  };
263
- /** 查看一把公钥 */
359
+ /** Get an SSH key */
264
360
  get: operations["get-ssh-key"];
265
361
  put?: never;
266
362
  post?: never;
267
363
  /**
268
- * 吊销一把公钥
269
- * @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.
270
366
  */
271
367
  delete: operations["revoke-ssh-key"];
272
368
  options?: never;
273
369
  head?: never;
274
370
  /**
275
- * 给公钥改名
276
- * @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.
277
373
  */
278
374
  patch: operations["rename-ssh-key"];
279
375
  trace?: never;
@@ -285,6 +381,10 @@ export interface components {
285
381
  Error: {
286
382
  code?: string;
287
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
+ */
288
388
  meta?: {
289
389
  [key: string]: unknown;
290
390
  };
@@ -292,21 +392,47 @@ export interface components {
292
392
  status: number;
293
393
  };
294
394
  PermissionResource: {
295
- description: string;
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 */
296
396
  name: string;
297
- /** @description 只有项目所有者能做,绑到自定义角色上也不会生效 */
397
+ /** @description Reserved for the project owner. Attaching it to a custom role has no effect */
298
398
  owner_only: boolean;
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 */
400
+ resource_type: string;
401
+ };
402
+ ResourceTypeResource: {
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 */
404
+ name: string;
405
+ };
406
+ CatalogResource: {
407
+ permissions: components["schemas"]["PermissionResource"][] | null;
408
+ /** @description The resource types this service declares. A scoped rule can only land on one of them */
409
+ resource_types: components["schemas"]["ResourceTypeResource"][] | null;
410
+ service: string;
411
+ };
412
+ CatalogListResponseBody: {
413
+ items: components["schemas"]["CatalogResource"][] | null;
414
+ };
415
+ ResourceRefResource: {
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 */
417
+ id: string;
418
+ /** @description Of the form compute:instance or dns:zone, in the same namespace as permission names */
419
+ type: string;
299
420
  };
300
- PermissionListResponseBody: {
301
- items: components["schemas"]["PermissionResource"][] | null;
421
+ RuleResource: {
422
+ /** @enum {string} */
423
+ effect: "allow" | "deny";
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 */
425
+ permissions: string[] | null;
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 */
427
+ resources: components["schemas"]["ResourceRefResource"][] | null;
302
428
  };
303
429
  GrantResource: {
304
430
  admin: boolean;
305
431
  owner: boolean;
306
- /** @description 持有的全部自定义角色的权限并集,已去重排序 */
307
- permissions: string[] | null;
308
- /** @description 持有的角色编码,只用于展示 */
432
+ /** @description The role codes held, for display only */
309
433
  roles: string[] | null;
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 */
435
+ rules: components["schemas"]["RuleResource"][] | null;
310
436
  };
311
437
  ProjectResource: {
312
438
  ban_reason: string;
@@ -315,21 +441,16 @@ export interface components {
315
441
  created_by: string;
316
442
  /**
317
443
  * Format: date-time
318
- * @description 盖上墓碑的那一刻
444
+ * @description When the project was deleted
319
445
  */
320
446
  deleted_at: string | null;
321
447
  description: string;
322
448
  /** Format: uuid */
323
449
  id: string;
324
450
  name: string;
325
- /**
326
- * Format: date-time
327
- * @description 欠费的起始时间
328
- */
329
- overdue_at: string | null;
330
451
  /** @enum {string} */
331
452
  status: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING" | "DELETED";
332
- /** @description 给人看的,不参与任何查询 */
453
+ /** @description Written for a reader; it takes part in no query */
333
454
  status_reason: string;
334
455
  /** Format: date-time */
335
456
  updated_at: string;
@@ -359,40 +480,61 @@ export interface components {
359
480
  invited_by: string;
360
481
  /** Format: uuid */
361
482
  project_id: string;
362
- /** @description 兑现时会授予的角色编码 */
483
+ /** @description The role codes granted on redemption */
363
484
  roles: string[] | null;
364
485
  };
365
486
  LengthAwarePageInvitationResource: {
366
- /** @description 这一页的内容 */
487
+ /** @description The items in this page */
367
488
  items: components["schemas"]["InvitationResource"][];
368
489
  /**
369
490
  * Format: int64
370
- * @description 这一页最多几条,回显请求里的值
491
+ * @description Maximum number of items in this page, echoing the request
371
492
  */
372
493
  limit: number;
373
494
  /**
374
495
  * Format: int64
375
- * @description 跳过了多少条,回显请求里的值
496
+ * @description Number of items skipped, echoing the request
376
497
  */
377
498
  offset: number;
378
499
  /**
379
500
  * Format: int64
380
- * @description 命中的总条数,不只是这一页
501
+ * @description Total number of matches, not only this page
381
502
  */
382
503
  total: number;
383
504
  };
384
505
  IssueInvitationRequestBody: {
385
506
  /** Format: email */
386
507
  email: string;
387
- /** @description 兑现时授予的角色编码。必须是这个项目已经定义的,OWNER 不行 */
508
+ /** @description The role codes granted on redemption. Each must already be defined in this project, and `OWNER` is not accepted */
388
509
  roles: string[] | null;
389
510
  };
390
511
  IssuedInvitationResponseBody: {
391
512
  invitation: components["schemas"]["InvitationResource"];
392
- /** @description 兑现用的明文,**只在这一次响应里出现**。库里只有它的哈希,丢了只能撤销重发 */
513
+ /** @description The token that redeems the invitation, **returned in this response only**. If it is lost, withdraw the invitation and send another */
393
514
  token: string;
394
515
  };
516
+ BatchGetMembersRequestBody: {
517
+ /** @description The account ids to resolve. Blank entries are ignored. */
518
+ ids: string[];
519
+ };
520
+ BatchGetMembersResponseBody: {
521
+ /** @description The people that resolved. Ids that never belonged to this project are absent, as are ids that do not resolve at all. */
522
+ items: components["schemas"]["ResolvedMemberResource"][];
523
+ };
524
+ /** @description A person referred to by an id held elsewhere in the project. Carries who they are, not what they may do — a member who has left holds nothing, and this shape has no grant to say so. */
525
+ ResolvedMemberResource: {
526
+ /** @description MD5 hash of the lowercased, trimmed email address, for use with Gravatar-compatible avatar services. Empty if the account has no email address. */
527
+ avatar_hash: string;
528
+ email: string;
529
+ first_name: string;
530
+ last_name: string;
531
+ /** @description True when this person is no longer a member of the project. */
532
+ left: boolean;
533
+ user_id: string;
534
+ };
395
535
  MemberResource: {
536
+ /** @description MD5 hash of the lowercased, trimmed email address, for use with Gravatar-compatible avatar services. Empty if the account has no email address. */
537
+ avatar_hash: string;
396
538
  /** Format: date-time */
397
539
  created_at: string;
398
540
  created_by: string;
@@ -403,39 +545,96 @@ export interface components {
403
545
  user_id: string;
404
546
  };
405
547
  LengthAwarePageMemberResource: {
406
- /** @description 这一页的内容 */
548
+ /** @description The items in this page */
407
549
  items: components["schemas"]["MemberResource"][];
408
550
  /**
409
551
  * Format: int64
410
- * @description 这一页最多几条,回显请求里的值
552
+ * @description Maximum number of items in this page, echoing the request
411
553
  */
412
554
  limit: number;
413
555
  /**
414
556
  * Format: int64
415
- * @description 跳过了多少条,回显请求里的值
557
+ * @description Number of items skipped, echoing the request
416
558
  */
417
559
  offset: number;
418
560
  /**
419
561
  * Format: int64
420
- * @description 命中的总条数,不只是这一页
562
+ * @description Total number of matches, not only this page
421
563
  */
422
564
  total: number;
423
565
  };
424
566
  SetMemberRolesRequestBody: {
425
- /** @description 这个人应当持有的**全部**角色编码。OWNER 不能出现在这里 */
567
+ /** @description **Every** role code this person is to hold. `OWNER` cannot appear here */
568
+ roles: string[] | null;
569
+ };
570
+ SetMemberPermissionsRequestBody: {
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 */
572
+ permissions: string[] | null;
573
+ };
574
+ PolicyResource: {
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 */
576
+ base: boolean;
577
+ /** Format: date-time */
578
+ created_at: string;
579
+ /** @description Why it was granted, written for a reader */
580
+ description: string;
581
+ /** @enum {string} */
582
+ effect: "allow" | "deny";
583
+ /** Format: uuid */
584
+ id: string;
585
+ /** @description Permission names attached directly to this person, without passing through a role */
586
+ permissions: string[] | null;
587
+ /** @description Empty means the whole project */
588
+ resources: components["schemas"]["ResourceRefResource"][] | null;
589
+ /** @description The role codes this policy carries */
426
590
  roles: string[] | null;
591
+ /** Format: date-time */
592
+ updated_at: string;
593
+ user_id: string;
594
+ };
595
+ PolicyListResponseBody: {
596
+ items: components["schemas"]["PolicyResource"][] | null;
597
+ };
598
+ AttachPolicyRequestBody: {
599
+ /** @description Why it was granted, written for a reader */
600
+ description?: string;
601
+ /** @enum {string} */
602
+ effect: "allow" | "deny";
603
+ /** @description Permission names attached directly, which avoids creating a role only one person holds */
604
+ permissions?: string[] | null;
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 */
606
+ resources?: components["schemas"]["ResourceRefResource"][] | null;
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 */
608
+ roles?: string[] | null;
609
+ /** @description Must already be a member of this project */
610
+ user_id: string;
611
+ };
612
+ UpdatePolicyRequestBody: {
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 */
614
+ description?: string;
615
+ /**
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
617
+ * @enum {string}
618
+ */
619
+ effect: "allow" | "deny";
620
+ /** @description Permission names attached directly, replaced in full. Anything not listed is withdrawn rather than kept */
621
+ permissions?: string[] | null;
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 */
623
+ resources?: components["schemas"]["ResourceRefResource"][] | null;
624
+ /** @description Each must be a role already defined in this project, replaced in full. As when attaching, `OWNER` and `ADMIN` are not accepted */
625
+ roles?: string[] | null;
427
626
  };
428
627
  TransferOwnershipRequestBody: {
429
- /** @description 接手的人必须已经是这个项目的成员 */
628
+ /** @description The recipient must already be a member of this project */
430
629
  to_user_id: string;
431
630
  };
432
631
  OwnershipTransferResponseBody: {
433
- /** @description 原所有者。他保留其余的角色——转让的是所有权,不是把人踢出去 */
632
+ /** @description The former owner, who keeps every other role held. Ownership is transferred rather than the person removed */
434
633
  from: components["schemas"]["MemberResource"];
435
634
  to: components["schemas"]["MemberResource"];
436
635
  };
437
636
  RoleResource: {
438
- /** @description 内置角色不可删、不可改权限:OWNER 和 ADMIN 的语义写在代码里 */
637
+ /** @description A built-in role can be neither deleted nor have its permissions changed */
439
638
  builtin: boolean;
440
639
  code: string;
441
640
  /** Format: date-time */
@@ -450,11 +649,11 @@ export interface components {
450
649
  items: components["schemas"]["RoleResource"][] | null;
451
650
  };
452
651
  CreateRoleRequestBody: {
453
- /** @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 */
454
653
  code: string;
455
654
  description?: string;
456
655
  name: string;
457
- /** @description 权限名。OwnerOnly 的那几条会被拒绝:绑上去也不会生效 */
656
+ /** @description A permission name. The ones reserved for the owner are refused, since attaching them would have no effect */
458
657
  permissions?: string[] | null;
459
658
  };
460
659
  UpdateRoleRequestBody: {
@@ -466,50 +665,50 @@ export interface components {
466
665
  /** Format: date-time */
467
666
  created_at: string;
468
667
  fingerprint: string;
469
- /** @description 平台生成并保管的那把。它的私钥不对外提供 */
668
+ /** @description The key the platform generates and holds. Its private key is not handed out */
470
669
  has_private_key: boolean;
471
670
  /** Format: uuid */
472
671
  id: string;
473
672
  key_type: string;
474
673
  name: string;
475
- /** @description 归属人;不给表示这把钥匙归项目本身 */
674
+ /** @description Who the key belongs to. Absent means it belongs to the project itself */
476
675
  owner_user_id?: string;
477
676
  public_key: string;
478
- /** @description 用途标签。平台自己生成的那把是 platform */
677
+ /** @description A purpose label. The key the platform generates carries `platform` */
479
678
  purposes: string[] | null;
480
679
  /** @enum {string} */
481
680
  status: "ACTIVE" | "REVOKED";
482
681
  };
483
682
  LengthAwarePageSSHKeyResource: {
484
- /** @description 这一页的内容 */
683
+ /** @description The items in this page */
485
684
  items: components["schemas"]["SSHKeyResource"][];
486
685
  /**
487
686
  * Format: int64
488
- * @description 这一页最多几条,回显请求里的值
687
+ * @description Maximum number of items in this page, echoing the request
489
688
  */
490
689
  limit: number;
491
690
  /**
492
691
  * Format: int64
493
- * @description 跳过了多少条,回显请求里的值
692
+ * @description Number of items skipped, echoing the request
494
693
  */
495
694
  offset: number;
496
695
  /**
497
696
  * Format: int64
498
- * @description 命中的总条数,不只是这一页
697
+ * @description Total number of matches, not only this page
499
698
  */
500
699
  total: number;
501
700
  };
502
701
  CreateSSHKeyRequestBody: {
503
702
  name: string;
504
703
  /**
505
- * @description 这把钥匙归谁
704
+ * @description Who this key belongs to
506
705
  * @default me
507
706
  * @enum {string}
508
707
  */
509
708
  owner?: "me" | "project";
510
- /** @description OpenSSH 格式的公钥。类型和指纹从它算出来,都不可改 */
709
+ /** @description The public key in OpenSSH format. The type and the fingerprint are derived from it and cannot be changed */
511
710
  public_key: string;
512
- /** @description 用途标签,比如 ci、bastion */
711
+ /** @description A purpose label, such as ci or bastion */
513
712
  purposes?: string[] | null;
514
713
  };
515
714
  RenameSSHKeyRequestBody: {
@@ -539,7 +738,7 @@ export interface operations {
539
738
  [name: string]: unknown;
540
739
  };
541
740
  content: {
542
- "application/json": components["schemas"]["PermissionListResponseBody"];
741
+ "application/json": components["schemas"]["CatalogListResponseBody"];
543
742
  };
544
743
  };
545
744
  /** @description Error */
@@ -676,9 +875,9 @@ export interface operations {
676
875
  "list-project-invitations": {
677
876
  parameters: {
678
877
  query?: {
679
- /** @description 这一页最多返回多少条 */
878
+ /** @description Maximum number of items in this page */
680
879
  limit?: number;
681
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
880
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
682
881
  offset?: number;
683
882
  };
684
883
  header?: never;
@@ -769,14 +968,47 @@ export interface operations {
769
968
  };
770
969
  };
771
970
  };
971
+ "batch-get-members": {
972
+ parameters: {
973
+ query?: never;
974
+ header?: never;
975
+ path?: never;
976
+ cookie?: never;
977
+ };
978
+ requestBody: {
979
+ content: {
980
+ "application/json": components["schemas"]["BatchGetMembersRequestBody"];
981
+ };
982
+ };
983
+ responses: {
984
+ /** @description OK */
985
+ 200: {
986
+ headers: {
987
+ [name: string]: unknown;
988
+ };
989
+ content: {
990
+ "application/json": components["schemas"]["BatchGetMembersResponseBody"];
991
+ };
992
+ };
993
+ /** @description Error */
994
+ default: {
995
+ headers: {
996
+ [name: string]: unknown;
997
+ };
998
+ content: {
999
+ "application/json": components["schemas"]["Error"];
1000
+ };
1001
+ };
1002
+ };
1003
+ };
772
1004
  "list-members": {
773
1005
  parameters: {
774
1006
  query?: {
775
- /** @description 这一页最多返回多少条 */
1007
+ /** @description Maximum number of items in this page */
776
1008
  limit?: number;
777
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1009
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
778
1010
  offset?: number;
779
- /** @description 按用户 ID、邮箱或姓名模糊匹配 */
1011
+ /** @description Matches against user id, email address or name */
780
1012
  keyword?: string;
781
1013
  };
782
1014
  header?: never;
@@ -869,6 +1101,201 @@ export interface operations {
869
1101
  };
870
1102
  };
871
1103
  };
1104
+ "set-member-permissions": {
1105
+ parameters: {
1106
+ query?: never;
1107
+ header?: never;
1108
+ path: {
1109
+ userId: string;
1110
+ };
1111
+ cookie?: never;
1112
+ };
1113
+ requestBody: {
1114
+ content: {
1115
+ "application/json": components["schemas"]["SetMemberPermissionsRequestBody"];
1116
+ };
1117
+ };
1118
+ responses: {
1119
+ /** @description OK */
1120
+ 200: {
1121
+ headers: {
1122
+ [name: string]: unknown;
1123
+ };
1124
+ content: {
1125
+ "application/json": components["schemas"]["PolicyResource"];
1126
+ };
1127
+ };
1128
+ /** @description Error */
1129
+ default: {
1130
+ headers: {
1131
+ [name: string]: unknown;
1132
+ };
1133
+ content: {
1134
+ "application/json": components["schemas"]["Error"];
1135
+ };
1136
+ };
1137
+ };
1138
+ };
1139
+ "list-policies": {
1140
+ parameters: {
1141
+ query?: {
1142
+ /** @description Restricts the result to one person. Omitting it covers the whole project */
1143
+ userId?: string;
1144
+ };
1145
+ header?: never;
1146
+ path?: never;
1147
+ cookie?: never;
1148
+ };
1149
+ requestBody?: never;
1150
+ responses: {
1151
+ /** @description OK */
1152
+ 200: {
1153
+ headers: {
1154
+ [name: string]: unknown;
1155
+ };
1156
+ content: {
1157
+ "application/json": components["schemas"]["PolicyListResponseBody"];
1158
+ };
1159
+ };
1160
+ /** @description Error */
1161
+ default: {
1162
+ headers: {
1163
+ [name: string]: unknown;
1164
+ };
1165
+ content: {
1166
+ "application/json": components["schemas"]["Error"];
1167
+ };
1168
+ };
1169
+ };
1170
+ };
1171
+ "attach-policy": {
1172
+ parameters: {
1173
+ query?: never;
1174
+ header?: never;
1175
+ path?: never;
1176
+ cookie?: never;
1177
+ };
1178
+ requestBody: {
1179
+ content: {
1180
+ "application/json": components["schemas"]["AttachPolicyRequestBody"];
1181
+ };
1182
+ };
1183
+ responses: {
1184
+ /** @description Created */
1185
+ 201: {
1186
+ headers: {
1187
+ [name: string]: unknown;
1188
+ };
1189
+ content: {
1190
+ "application/json": components["schemas"]["PolicyResource"];
1191
+ };
1192
+ };
1193
+ /** @description Error */
1194
+ default: {
1195
+ headers: {
1196
+ [name: string]: unknown;
1197
+ };
1198
+ content: {
1199
+ "application/json": components["schemas"]["Error"];
1200
+ };
1201
+ };
1202
+ };
1203
+ };
1204
+ "get-policy": {
1205
+ parameters: {
1206
+ query?: never;
1207
+ header?: never;
1208
+ path: {
1209
+ policyId: string;
1210
+ };
1211
+ cookie?: never;
1212
+ };
1213
+ requestBody?: never;
1214
+ responses: {
1215
+ /** @description OK */
1216
+ 200: {
1217
+ headers: {
1218
+ [name: string]: unknown;
1219
+ };
1220
+ content: {
1221
+ "application/json": components["schemas"]["PolicyResource"];
1222
+ };
1223
+ };
1224
+ /** @description Error */
1225
+ default: {
1226
+ headers: {
1227
+ [name: string]: unknown;
1228
+ };
1229
+ content: {
1230
+ "application/json": components["schemas"]["Error"];
1231
+ };
1232
+ };
1233
+ };
1234
+ };
1235
+ "update-policy": {
1236
+ parameters: {
1237
+ query?: never;
1238
+ header?: never;
1239
+ path: {
1240
+ policyId: string;
1241
+ };
1242
+ cookie?: never;
1243
+ };
1244
+ requestBody: {
1245
+ content: {
1246
+ "application/json": components["schemas"]["UpdatePolicyRequestBody"];
1247
+ };
1248
+ };
1249
+ responses: {
1250
+ /** @description OK */
1251
+ 200: {
1252
+ headers: {
1253
+ [name: string]: unknown;
1254
+ };
1255
+ content: {
1256
+ "application/json": components["schemas"]["PolicyResource"];
1257
+ };
1258
+ };
1259
+ /** @description Error */
1260
+ default: {
1261
+ headers: {
1262
+ [name: string]: unknown;
1263
+ };
1264
+ content: {
1265
+ "application/json": components["schemas"]["Error"];
1266
+ };
1267
+ };
1268
+ };
1269
+ };
1270
+ "detach-policy": {
1271
+ parameters: {
1272
+ query?: never;
1273
+ header?: never;
1274
+ path: {
1275
+ policyId: string;
1276
+ };
1277
+ cookie?: never;
1278
+ };
1279
+ requestBody?: never;
1280
+ responses: {
1281
+ /** @description No Content */
1282
+ 204: {
1283
+ headers: {
1284
+ [name: string]: unknown;
1285
+ };
1286
+ content?: never;
1287
+ };
1288
+ /** @description Error */
1289
+ default: {
1290
+ headers: {
1291
+ [name: string]: unknown;
1292
+ };
1293
+ content: {
1294
+ "application/json": components["schemas"]["Error"];
1295
+ };
1296
+ };
1297
+ };
1298
+ };
872
1299
  "transfer-project-ownership": {
873
1300
  parameters: {
874
1301
  query?: never;
@@ -1062,13 +1489,13 @@ export interface operations {
1062
1489
  "list-ssh-keys": {
1063
1490
  parameters: {
1064
1491
  query?: {
1065
- /** @description 这一页最多返回多少条 */
1492
+ /** @description Maximum number of items in this page */
1066
1493
  limit?: number;
1067
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1494
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
1068
1495
  offset?: number;
1069
- /** @description 不传时两种都返回 */
1496
+ /** @description Both kinds are returned while this is absent */
1070
1497
  status?: "ACTIVE" | "REVOKED";
1071
- /** @description 只列挂着这个用途的钥匙。平台自己生成的那把是 platform */
1498
+ /** @description Lists only the keys carrying this purpose. The key the platform generates carries `platform` */
1072
1499
  purpose?: string;
1073
1500
  };
1074
1501
  header?: never;