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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +13 -1
  2. package/dist/account/v1/client.d.ts +4 -0
  3. package/dist/account/v1/client.js +7 -0
  4. package/dist/account/v1/index.d.ts +34 -21
  5. package/dist/account/v1/index.js +4 -4
  6. package/dist/account/v1/schema.d.ts +374 -81
  7. package/dist/assistant/v1/client.d.ts +4 -0
  8. package/dist/assistant/v1/client.js +7 -0
  9. package/dist/assistant/v1/index.d.ts +69 -40
  10. package/dist/assistant/v1/index.js +4 -4
  11. package/dist/assistant/v1/schema.d.ts +1089 -133
  12. package/dist/billing/v1/client.d.ts +6 -0
  13. package/dist/billing/v1/client.js +6 -0
  14. package/dist/billing/v1/index.d.ts +205 -0
  15. package/dist/billing/v1/index.js +5 -0
  16. package/dist/billing/v1/schema.d.ts +4976 -0
  17. package/dist/billing/v1/schema.js +5 -0
  18. package/dist/canopy/v1/client.d.ts +4 -0
  19. package/dist/canopy/v1/client.js +7 -0
  20. package/dist/canopy/v1/index.d.ts +24 -23
  21. package/dist/canopy/v1/index.js +4 -4
  22. package/dist/canopy/v1/schema.d.ts +113 -109
  23. package/dist/compute/v1/client.d.ts +4 -0
  24. package/dist/compute/v1/client.js +7 -0
  25. package/dist/compute/v1/index.d.ts +172 -125
  26. package/dist/compute/v1/index.js +4 -4
  27. package/dist/compute/v1/schema.d.ts +1567 -471
  28. package/dist/dns/v1/client.d.ts +4 -0
  29. package/dist/dns/v1/client.js +7 -0
  30. package/dist/dns/v1/index.d.ts +43 -0
  31. package/dist/dns/v1/index.js +5 -0
  32. package/dist/dns/v1/schema.d.ts +887 -0
  33. package/dist/dns/v1/schema.js +5 -0
  34. package/dist/fabric/v1/client.d.ts +4 -0
  35. package/dist/fabric/v1/client.js +7 -0
  36. package/dist/fabric/v1/index.d.ts +115 -0
  37. package/dist/fabric/v1/index.js +5 -0
  38. package/dist/fabric/v1/schema.d.ts +2311 -0
  39. package/dist/fabric/v1/schema.js +5 -0
  40. package/dist/fleet/v1/client.d.ts +4 -0
  41. package/dist/fleet/v1/client.js +7 -0
  42. package/dist/fleet/v1/index.d.ts +15 -0
  43. package/dist/fleet/v1/index.js +5 -0
  44. package/dist/fleet/v1/schema.d.ts +291 -0
  45. package/dist/fleet/v1/schema.js +5 -0
  46. package/dist/iam/v1/client.d.ts +4 -0
  47. package/dist/iam/v1/client.js +7 -0
  48. package/dist/iam/v1/index.d.ts +55 -32
  49. package/dist/iam/v1/index.js +4 -4
  50. package/dist/iam/v1/schema.d.ts +521 -88
  51. package/dist/index.d.ts +14 -7
  52. package/dist/index.js +22 -5
  53. package/dist/monitoring/v1/client.d.ts +4 -0
  54. package/dist/monitoring/v1/client.js +7 -0
  55. package/dist/monitoring/v1/index.d.ts +130 -49
  56. package/dist/monitoring/v1/index.js +4 -4
  57. package/dist/monitoring/v1/schema.d.ts +2420 -527
  58. package/dist/notification/v1/client.d.ts +4 -0
  59. package/dist/notification/v1/client.js +7 -0
  60. package/dist/notification/v1/index.d.ts +77 -0
  61. package/dist/notification/v1/index.js +5 -0
  62. package/dist/notification/v1/schema.d.ts +2048 -0
  63. package/dist/notification/v1/schema.js +5 -0
  64. package/dist/storage/v1/client.d.ts +4 -0
  65. package/dist/storage/v1/client.js +7 -0
  66. package/dist/storage/v1/index.d.ts +35 -0
  67. package/dist/storage/v1/index.js +5 -0
  68. package/dist/storage/v1/schema.d.ts +751 -0
  69. package/dist/storage/v1/schema.js +5 -0
  70. package/dist/support/v1/client.d.ts +4 -0
  71. package/dist/support/v1/client.js +7 -0
  72. package/dist/support/v1/index.d.ts +51 -0
  73. package/dist/support/v1/index.js +5 -0
  74. package/dist/support/v1/schema.d.ts +1082 -0
  75. package/dist/support/v1/schema.js +5 -0
  76. package/dist/tunnel/v1/client.d.ts +4 -0
  77. package/dist/tunnel/v1/client.js +7 -0
  78. package/dist/tunnel/v1/index.d.ts +8 -7
  79. package/dist/tunnel/v1/index.js +4 -4
  80. package/dist/tunnel/v1/schema.d.ts +40 -34
  81. package/package.json +34 -10
@@ -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,44 +392,71 @@ 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: {
438
+ /**
439
+ * Format: date-time
440
+ * @description A read-only management lock. Running resources and billing remain unchanged. Only an operator can release it.
441
+ */
442
+ locked_at: string | null;
443
+ lock_reason: string;
312
444
  ban_reason: string;
313
445
  /** Format: date-time */
314
446
  created_at: string;
315
447
  created_by: string;
316
448
  /**
317
449
  * Format: date-time
318
- * @description 盖上墓碑的那一刻
450
+ * @description When the project was deleted
319
451
  */
320
452
  deleted_at: string | null;
321
453
  description: string;
322
454
  /** Format: uuid */
323
455
  id: string;
324
456
  name: string;
325
- /**
326
- * Format: date-time
327
- * @description 欠费的起始时间
328
- */
329
- overdue_at: string | null;
330
457
  /** @enum {string} */
331
458
  status: "ACTIVE" | "SUSPENDED" | "BANNED" | "DELETING" | "DELETED";
332
- /** @description 给人看的,不参与任何查询 */
459
+ /** @description Written for a reader; it takes part in no query */
333
460
  status_reason: string;
334
461
  /** Format: date-time */
335
462
  updated_at: string;
@@ -359,40 +486,61 @@ export interface components {
359
486
  invited_by: string;
360
487
  /** Format: uuid */
361
488
  project_id: string;
362
- /** @description 兑现时会授予的角色编码 */
489
+ /** @description The role codes granted on redemption */
363
490
  roles: string[] | null;
364
491
  };
365
492
  LengthAwarePageInvitationResource: {
366
- /** @description 这一页的内容 */
493
+ /** @description The items in this page */
367
494
  items: components["schemas"]["InvitationResource"][];
368
495
  /**
369
496
  * Format: int64
370
- * @description 这一页最多几条,回显请求里的值
497
+ * @description Maximum number of items in this page, echoing the request
371
498
  */
372
499
  limit: number;
373
500
  /**
374
501
  * Format: int64
375
- * @description 跳过了多少条,回显请求里的值
502
+ * @description Number of items skipped, echoing the request
376
503
  */
377
504
  offset: number;
378
505
  /**
379
506
  * Format: int64
380
- * @description 命中的总条数,不只是这一页
507
+ * @description Total number of matches, not only this page
381
508
  */
382
509
  total: number;
383
510
  };
384
511
  IssueInvitationRequestBody: {
385
512
  /** Format: email */
386
513
  email: string;
387
- /** @description 兑现时授予的角色编码。必须是这个项目已经定义的,OWNER 不行 */
514
+ /** @description The role codes granted on redemption. Each must already be defined in this project, and `OWNER` is not accepted */
388
515
  roles: string[] | null;
389
516
  };
390
517
  IssuedInvitationResponseBody: {
391
518
  invitation: components["schemas"]["InvitationResource"];
392
- /** @description 兑现用的明文,**只在这一次响应里出现**。库里只有它的哈希,丢了只能撤销重发 */
519
+ /** @description The token that redeems the invitation, **returned in this response only**. If it is lost, withdraw the invitation and send another */
393
520
  token: string;
394
521
  };
522
+ BatchGetMembersRequestBody: {
523
+ /** @description The account ids to resolve. Blank entries are ignored. */
524
+ ids: string[];
525
+ };
526
+ BatchGetMembersResponseBody: {
527
+ /** @description The people that resolved. Ids that never belonged to this project are absent, as are ids that do not resolve at all. */
528
+ items: components["schemas"]["ResolvedMemberResource"][];
529
+ };
530
+ /** @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. */
531
+ ResolvedMemberResource: {
532
+ /** @description MD5 hash of the lowercased, trimmed email address, for use with Gravatar-compatible avatar services. Empty if the account has no email address. */
533
+ avatar_hash: string;
534
+ email: string;
535
+ first_name: string;
536
+ last_name: string;
537
+ /** @description True when this person is no longer a member of the project. */
538
+ left: boolean;
539
+ user_id: string;
540
+ };
395
541
  MemberResource: {
542
+ /** @description MD5 hash of the lowercased, trimmed email address, for use with Gravatar-compatible avatar services. Empty if the account has no email address. */
543
+ avatar_hash: string;
396
544
  /** Format: date-time */
397
545
  created_at: string;
398
546
  created_by: string;
@@ -403,39 +551,96 @@ export interface components {
403
551
  user_id: string;
404
552
  };
405
553
  LengthAwarePageMemberResource: {
406
- /** @description 这一页的内容 */
554
+ /** @description The items in this page */
407
555
  items: components["schemas"]["MemberResource"][];
408
556
  /**
409
557
  * Format: int64
410
- * @description 这一页最多几条,回显请求里的值
558
+ * @description Maximum number of items in this page, echoing the request
411
559
  */
412
560
  limit: number;
413
561
  /**
414
562
  * Format: int64
415
- * @description 跳过了多少条,回显请求里的值
563
+ * @description Number of items skipped, echoing the request
416
564
  */
417
565
  offset: number;
418
566
  /**
419
567
  * Format: int64
420
- * @description 命中的总条数,不只是这一页
568
+ * @description Total number of matches, not only this page
421
569
  */
422
570
  total: number;
423
571
  };
424
572
  SetMemberRolesRequestBody: {
425
- /** @description 这个人应当持有的**全部**角色编码。OWNER 不能出现在这里 */
573
+ /** @description **Every** role code this person is to hold. `OWNER` cannot appear here */
426
574
  roles: string[] | null;
427
575
  };
576
+ SetMemberPermissionsRequestBody: {
577
+ /** @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 */
578
+ permissions: string[] | null;
579
+ };
580
+ PolicyResource: {
581
+ /** @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 */
582
+ base: boolean;
583
+ /** Format: date-time */
584
+ created_at: string;
585
+ /** @description Why it was granted, written for a reader */
586
+ description: string;
587
+ /** @enum {string} */
588
+ effect: "allow" | "deny";
589
+ /** Format: uuid */
590
+ id: string;
591
+ /** @description Permission names attached directly to this person, without passing through a role */
592
+ permissions: string[] | null;
593
+ /** @description Empty means the whole project */
594
+ resources: components["schemas"]["ResourceRefResource"][] | null;
595
+ /** @description The role codes this policy carries */
596
+ roles: string[] | null;
597
+ /** Format: date-time */
598
+ updated_at: string;
599
+ user_id: string;
600
+ };
601
+ PolicyListResponseBody: {
602
+ items: components["schemas"]["PolicyResource"][] | null;
603
+ };
604
+ AttachPolicyRequestBody: {
605
+ /** @description Why it was granted, written for a reader */
606
+ description?: string;
607
+ /** @enum {string} */
608
+ effect: "allow" | "deny";
609
+ /** @description Permission names attached directly, which avoids creating a role only one person holds */
610
+ permissions?: string[] | null;
611
+ /** @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 */
612
+ resources?: components["schemas"]["ResourceRefResource"][] | null;
613
+ /** @description Each must be a role already defined in this project. `OWNER` and `ADMIN` are not accepted, being rules rather than sets of permissions */
614
+ roles?: string[] | null;
615
+ /** @description Must already be a member of this project */
616
+ user_id: string;
617
+ };
618
+ UpdatePolicyRequestBody: {
619
+ /** @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 */
620
+ description?: string;
621
+ /**
622
+ * @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
623
+ * @enum {string}
624
+ */
625
+ effect: "allow" | "deny";
626
+ /** @description Permission names attached directly, replaced in full. Anything not listed is withdrawn rather than kept */
627
+ permissions?: string[] | null;
628
+ /** @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 */
629
+ resources?: components["schemas"]["ResourceRefResource"][] | null;
630
+ /** @description Each must be a role already defined in this project, replaced in full. As when attaching, `OWNER` and `ADMIN` are not accepted */
631
+ roles?: string[] | null;
632
+ };
428
633
  TransferOwnershipRequestBody: {
429
- /** @description 接手的人必须已经是这个项目的成员 */
634
+ /** @description The recipient must already be a member of this project */
430
635
  to_user_id: string;
431
636
  };
432
637
  OwnershipTransferResponseBody: {
433
- /** @description 原所有者。他保留其余的角色——转让的是所有权,不是把人踢出去 */
638
+ /** @description The former owner, who keeps every other role held. Ownership is transferred rather than the person removed */
434
639
  from: components["schemas"]["MemberResource"];
435
640
  to: components["schemas"]["MemberResource"];
436
641
  };
437
642
  RoleResource: {
438
- /** @description 内置角色不可删、不可改权限:OWNER 和 ADMIN 的语义写在代码里 */
643
+ /** @description A built-in role can be neither deleted nor have its permissions changed */
439
644
  builtin: boolean;
440
645
  code: string;
441
646
  /** Format: date-time */
@@ -450,11 +655,11 @@ export interface components {
450
655
  items: components["schemas"]["RoleResource"][] | null;
451
656
  };
452
657
  CreateRoleRequestBody: {
453
- /** @description 小写字母开头,可含数字和下划线。建好之后不能改——成员绑定和邀请都指着它 */
658
+ /** @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
659
  code: string;
455
660
  description?: string;
456
661
  name: string;
457
- /** @description 权限名。OwnerOnly 的那几条会被拒绝:绑上去也不会生效 */
662
+ /** @description A permission name. The ones reserved for the owner are refused, since attaching them would have no effect */
458
663
  permissions?: string[] | null;
459
664
  };
460
665
  UpdateRoleRequestBody: {
@@ -466,50 +671,50 @@ export interface components {
466
671
  /** Format: date-time */
467
672
  created_at: string;
468
673
  fingerprint: string;
469
- /** @description 平台生成并保管的那把。它的私钥不对外提供 */
674
+ /** @description The key the platform generates and holds. Its private key is not handed out */
470
675
  has_private_key: boolean;
471
676
  /** Format: uuid */
472
677
  id: string;
473
678
  key_type: string;
474
679
  name: string;
475
- /** @description 归属人;不给表示这把钥匙归项目本身 */
680
+ /** @description Who the key belongs to. Absent means it belongs to the project itself */
476
681
  owner_user_id?: string;
477
682
  public_key: string;
478
- /** @description 用途标签。平台自己生成的那把是 platform */
683
+ /** @description A purpose label. The key the platform generates carries `platform` */
479
684
  purposes: string[] | null;
480
685
  /** @enum {string} */
481
686
  status: "ACTIVE" | "REVOKED";
482
687
  };
483
688
  LengthAwarePageSSHKeyResource: {
484
- /** @description 这一页的内容 */
689
+ /** @description The items in this page */
485
690
  items: components["schemas"]["SSHKeyResource"][];
486
691
  /**
487
692
  * Format: int64
488
- * @description 这一页最多几条,回显请求里的值
693
+ * @description Maximum number of items in this page, echoing the request
489
694
  */
490
695
  limit: number;
491
696
  /**
492
697
  * Format: int64
493
- * @description 跳过了多少条,回显请求里的值
698
+ * @description Number of items skipped, echoing the request
494
699
  */
495
700
  offset: number;
496
701
  /**
497
702
  * Format: int64
498
- * @description 命中的总条数,不只是这一页
703
+ * @description Total number of matches, not only this page
499
704
  */
500
705
  total: number;
501
706
  };
502
707
  CreateSSHKeyRequestBody: {
503
708
  name: string;
504
709
  /**
505
- * @description 这把钥匙归谁
710
+ * @description Who this key belongs to
506
711
  * @default me
507
712
  * @enum {string}
508
713
  */
509
714
  owner?: "me" | "project";
510
- /** @description OpenSSH 格式的公钥。类型和指纹从它算出来,都不可改 */
715
+ /** @description The public key in OpenSSH format. The type and the fingerprint are derived from it and cannot be changed */
511
716
  public_key: string;
512
- /** @description 用途标签,比如 ci、bastion */
717
+ /** @description A purpose label, such as ci or bastion */
513
718
  purposes?: string[] | null;
514
719
  };
515
720
  RenameSSHKeyRequestBody: {
@@ -539,7 +744,7 @@ export interface operations {
539
744
  [name: string]: unknown;
540
745
  };
541
746
  content: {
542
- "application/json": components["schemas"]["PermissionListResponseBody"];
747
+ "application/json": components["schemas"]["CatalogListResponseBody"];
543
748
  };
544
749
  };
545
750
  /** @description Error */
@@ -676,9 +881,9 @@ export interface operations {
676
881
  "list-project-invitations": {
677
882
  parameters: {
678
883
  query?: {
679
- /** @description 这一页最多返回多少条 */
884
+ /** @description Maximum number of items in this page */
680
885
  limit?: number;
681
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
886
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
682
887
  offset?: number;
683
888
  };
684
889
  header?: never;
@@ -769,14 +974,47 @@ export interface operations {
769
974
  };
770
975
  };
771
976
  };
977
+ "batch-get-members": {
978
+ parameters: {
979
+ query?: never;
980
+ header?: never;
981
+ path?: never;
982
+ cookie?: never;
983
+ };
984
+ requestBody: {
985
+ content: {
986
+ "application/json": components["schemas"]["BatchGetMembersRequestBody"];
987
+ };
988
+ };
989
+ responses: {
990
+ /** @description OK */
991
+ 200: {
992
+ headers: {
993
+ [name: string]: unknown;
994
+ };
995
+ content: {
996
+ "application/json": components["schemas"]["BatchGetMembersResponseBody"];
997
+ };
998
+ };
999
+ /** @description Error */
1000
+ default: {
1001
+ headers: {
1002
+ [name: string]: unknown;
1003
+ };
1004
+ content: {
1005
+ "application/json": components["schemas"]["Error"];
1006
+ };
1007
+ };
1008
+ };
1009
+ };
772
1010
  "list-members": {
773
1011
  parameters: {
774
1012
  query?: {
775
- /** @description 这一页最多返回多少条 */
1013
+ /** @description Maximum number of items in this page */
776
1014
  limit?: number;
777
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1015
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
778
1016
  offset?: number;
779
- /** @description 按用户 ID、邮箱或姓名模糊匹配 */
1017
+ /** @description Matches against user id, email address or name */
780
1018
  keyword?: string;
781
1019
  };
782
1020
  header?: never;
@@ -869,6 +1107,201 @@ export interface operations {
869
1107
  };
870
1108
  };
871
1109
  };
1110
+ "set-member-permissions": {
1111
+ parameters: {
1112
+ query?: never;
1113
+ header?: never;
1114
+ path: {
1115
+ userId: string;
1116
+ };
1117
+ cookie?: never;
1118
+ };
1119
+ requestBody: {
1120
+ content: {
1121
+ "application/json": components["schemas"]["SetMemberPermissionsRequestBody"];
1122
+ };
1123
+ };
1124
+ responses: {
1125
+ /** @description OK */
1126
+ 200: {
1127
+ headers: {
1128
+ [name: string]: unknown;
1129
+ };
1130
+ content: {
1131
+ "application/json": components["schemas"]["PolicyResource"];
1132
+ };
1133
+ };
1134
+ /** @description Error */
1135
+ default: {
1136
+ headers: {
1137
+ [name: string]: unknown;
1138
+ };
1139
+ content: {
1140
+ "application/json": components["schemas"]["Error"];
1141
+ };
1142
+ };
1143
+ };
1144
+ };
1145
+ "list-policies": {
1146
+ parameters: {
1147
+ query?: {
1148
+ /** @description Restricts the result to one person. Omitting it covers the whole project */
1149
+ userId?: string;
1150
+ };
1151
+ header?: never;
1152
+ path?: never;
1153
+ cookie?: never;
1154
+ };
1155
+ requestBody?: never;
1156
+ responses: {
1157
+ /** @description OK */
1158
+ 200: {
1159
+ headers: {
1160
+ [name: string]: unknown;
1161
+ };
1162
+ content: {
1163
+ "application/json": components["schemas"]["PolicyListResponseBody"];
1164
+ };
1165
+ };
1166
+ /** @description Error */
1167
+ default: {
1168
+ headers: {
1169
+ [name: string]: unknown;
1170
+ };
1171
+ content: {
1172
+ "application/json": components["schemas"]["Error"];
1173
+ };
1174
+ };
1175
+ };
1176
+ };
1177
+ "attach-policy": {
1178
+ parameters: {
1179
+ query?: never;
1180
+ header?: never;
1181
+ path?: never;
1182
+ cookie?: never;
1183
+ };
1184
+ requestBody: {
1185
+ content: {
1186
+ "application/json": components["schemas"]["AttachPolicyRequestBody"];
1187
+ };
1188
+ };
1189
+ responses: {
1190
+ /** @description Created */
1191
+ 201: {
1192
+ headers: {
1193
+ [name: string]: unknown;
1194
+ };
1195
+ content: {
1196
+ "application/json": components["schemas"]["PolicyResource"];
1197
+ };
1198
+ };
1199
+ /** @description Error */
1200
+ default: {
1201
+ headers: {
1202
+ [name: string]: unknown;
1203
+ };
1204
+ content: {
1205
+ "application/json": components["schemas"]["Error"];
1206
+ };
1207
+ };
1208
+ };
1209
+ };
1210
+ "get-policy": {
1211
+ parameters: {
1212
+ query?: never;
1213
+ header?: never;
1214
+ path: {
1215
+ policyId: string;
1216
+ };
1217
+ cookie?: never;
1218
+ };
1219
+ requestBody?: never;
1220
+ responses: {
1221
+ /** @description OK */
1222
+ 200: {
1223
+ headers: {
1224
+ [name: string]: unknown;
1225
+ };
1226
+ content: {
1227
+ "application/json": components["schemas"]["PolicyResource"];
1228
+ };
1229
+ };
1230
+ /** @description Error */
1231
+ default: {
1232
+ headers: {
1233
+ [name: string]: unknown;
1234
+ };
1235
+ content: {
1236
+ "application/json": components["schemas"]["Error"];
1237
+ };
1238
+ };
1239
+ };
1240
+ };
1241
+ "update-policy": {
1242
+ parameters: {
1243
+ query?: never;
1244
+ header?: never;
1245
+ path: {
1246
+ policyId: string;
1247
+ };
1248
+ cookie?: never;
1249
+ };
1250
+ requestBody: {
1251
+ content: {
1252
+ "application/json": components["schemas"]["UpdatePolicyRequestBody"];
1253
+ };
1254
+ };
1255
+ responses: {
1256
+ /** @description OK */
1257
+ 200: {
1258
+ headers: {
1259
+ [name: string]: unknown;
1260
+ };
1261
+ content: {
1262
+ "application/json": components["schemas"]["PolicyResource"];
1263
+ };
1264
+ };
1265
+ /** @description Error */
1266
+ default: {
1267
+ headers: {
1268
+ [name: string]: unknown;
1269
+ };
1270
+ content: {
1271
+ "application/json": components["schemas"]["Error"];
1272
+ };
1273
+ };
1274
+ };
1275
+ };
1276
+ "detach-policy": {
1277
+ parameters: {
1278
+ query?: never;
1279
+ header?: never;
1280
+ path: {
1281
+ policyId: string;
1282
+ };
1283
+ cookie?: never;
1284
+ };
1285
+ requestBody?: never;
1286
+ responses: {
1287
+ /** @description No Content */
1288
+ 204: {
1289
+ headers: {
1290
+ [name: string]: unknown;
1291
+ };
1292
+ content?: never;
1293
+ };
1294
+ /** @description Error */
1295
+ default: {
1296
+ headers: {
1297
+ [name: string]: unknown;
1298
+ };
1299
+ content: {
1300
+ "application/json": components["schemas"]["Error"];
1301
+ };
1302
+ };
1303
+ };
1304
+ };
872
1305
  "transfer-project-ownership": {
873
1306
  parameters: {
874
1307
  query?: never;
@@ -1062,13 +1495,13 @@ export interface operations {
1062
1495
  "list-ssh-keys": {
1063
1496
  parameters: {
1064
1497
  query?: {
1065
- /** @description 这一页最多返回多少条 */
1498
+ /** @description Maximum number of items in this page */
1066
1499
  limit?: number;
1067
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1500
+ /** @description Number of items to skip. Use the cursor-paged endpoint to page deeper */
1068
1501
  offset?: number;
1069
- /** @description 不传时两种都返回 */
1502
+ /** @description Both kinds are returned while this is absent */
1070
1503
  status?: "ACTIVE" | "REVOKED";
1071
- /** @description 只列挂着这个用途的钥匙。平台自己生成的那把是 platform */
1504
+ /** @description Lists only the keys carrying this purpose. The key the platform generates carries `platform` */
1072
1505
  purpose?: string;
1073
1506
  };
1074
1507
  header?: never;