@leaflow/sdk 0.0.0-dev.9.gd1c7e65 → 0.0.0-dev.91.g8a09696
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.
- package/README.md +22 -12
- package/dist/account/v1/index.d.ts +12 -0
- package/dist/account/v1/schema.d.ts +213 -3
- package/dist/assistant/v1/index.d.ts +30 -2
- package/dist/assistant/v1/schema.d.ts +766 -127
- package/dist/billing/v1/index.d.ts +60 -0
- package/dist/billing/v1/index.js +5 -0
- package/dist/billing/v1/schema.d.ts +2042 -0
- package/dist/billing/v1/schema.js +5 -0
- package/dist/canopy/v1/index.d.ts +12 -0
- package/dist/compute/v1/index.d.ts +50 -4
- package/dist/compute/v1/schema.d.ts +686 -268
- package/dist/dns/v1/index.d.ts +42 -0
- package/dist/dns/v1/index.js +5 -0
- package/dist/dns/v1/schema.d.ts +883 -0
- package/dist/dns/v1/schema.js +5 -0
- package/dist/iam/v1/index.d.ts +28 -0
- package/dist/iam/v1/schema.d.ts +437 -9
- package/dist/index.d.ts +4 -0
- package/dist/monitoring/v1/index.d.ts +96 -0
- package/dist/monitoring/v1/schema.d.ts +2385 -496
- package/dist/notification/v1/index.d.ts +76 -0
- package/dist/notification/v1/index.js +5 -0
- package/dist/notification/v1/schema.d.ts +2038 -0
- package/dist/notification/v1/schema.js +5 -0
- package/dist/support/v1/index.d.ts +50 -0
- package/dist/support/v1/index.js +5 -0
- package/dist/support/v1/schema.d.ts +1078 -0
- package/dist/support/v1/schema.js +5 -0
- package/dist/tunnel/v1/index.d.ts +14 -32
- package/dist/tunnel/v1/schema.d.ts +52 -496
- package/package.json +2 -2
package/dist/iam/v1/index.d.ts
CHANGED
|
@@ -14,16 +14,42 @@ export type UpdateProjectBody = NonNullable<operations["update-project"]["reques
|
|
|
14
14
|
export type GetProjectMembershipResult = operations["get-project-membership"]["responses"][200]["content"]["application/json"];
|
|
15
15
|
/** `GET /api/v1/invitations` 成功时的响应体。 */
|
|
16
16
|
export type ListProjectInvitationsResult = operations["list-project-invitations"]["responses"][200]["content"]["application/json"];
|
|
17
|
+
/** `GET /api/v1/invitations` 的查询参数。 */
|
|
18
|
+
export type ListProjectInvitationsQuery = operations["list-project-invitations"]["parameters"]["query"];
|
|
17
19
|
/** `POST /api/v1/invitations` 成功时的响应体。 */
|
|
18
20
|
export type IssueInvitationResult = operations["issue-invitation"]["responses"][201]["content"]["application/json"];
|
|
19
21
|
/** `POST /api/v1/invitations` 的请求体。 */
|
|
20
22
|
export type IssueInvitationBody = NonNullable<operations["issue-invitation"]["requestBody"]>["content"]["application/json"];
|
|
23
|
+
/** `POST /api/v1/members:batchGet` 成功时的响应体。 */
|
|
24
|
+
export type BatchGetMembersResult = operations["batch-get-members"]["responses"][200]["content"]["application/json"];
|
|
25
|
+
/** `POST /api/v1/members:batchGet` 的请求体。 */
|
|
26
|
+
export type BatchGetMembersBody = NonNullable<operations["batch-get-members"]["requestBody"]>["content"]["application/json"];
|
|
21
27
|
/** `GET /api/v1/members` 成功时的响应体。 */
|
|
22
28
|
export type ListMembersResult = operations["list-members"]["responses"][200]["content"]["application/json"];
|
|
29
|
+
/** `GET /api/v1/members` 的查询参数。 */
|
|
30
|
+
export type ListMembersQuery = operations["list-members"]["parameters"]["query"];
|
|
23
31
|
/** `PUT /api/v1/members/{userId}/roles` 成功时的响应体。 */
|
|
24
32
|
export type SetMemberRolesResult = operations["set-member-roles"]["responses"][200]["content"]["application/json"];
|
|
25
33
|
/** `PUT /api/v1/members/{userId}/roles` 的请求体。 */
|
|
26
34
|
export type SetMemberRolesBody = NonNullable<operations["set-member-roles"]["requestBody"]>["content"]["application/json"];
|
|
35
|
+
/** `PUT /api/v1/members/{userId}/permissions` 成功时的响应体。 */
|
|
36
|
+
export type SetMemberPermissionsResult = operations["set-member-permissions"]["responses"][200]["content"]["application/json"];
|
|
37
|
+
/** `PUT /api/v1/members/{userId}/permissions` 的请求体。 */
|
|
38
|
+
export type SetMemberPermissionsBody = NonNullable<operations["set-member-permissions"]["requestBody"]>["content"]["application/json"];
|
|
39
|
+
/** `GET /api/v1/policies` 成功时的响应体。 */
|
|
40
|
+
export type ListPoliciesResult = operations["list-policies"]["responses"][200]["content"]["application/json"];
|
|
41
|
+
/** `GET /api/v1/policies` 的查询参数。 */
|
|
42
|
+
export type ListPoliciesQuery = operations["list-policies"]["parameters"]["query"];
|
|
43
|
+
/** `POST /api/v1/policies` 成功时的响应体。 */
|
|
44
|
+
export type AttachPolicyResult = operations["attach-policy"]["responses"][201]["content"]["application/json"];
|
|
45
|
+
/** `POST /api/v1/policies` 的请求体。 */
|
|
46
|
+
export type AttachPolicyBody = NonNullable<operations["attach-policy"]["requestBody"]>["content"]["application/json"];
|
|
47
|
+
/** `GET /api/v1/policies/{policyId}` 成功时的响应体。 */
|
|
48
|
+
export type GetPolicyResult = operations["get-policy"]["responses"][200]["content"]["application/json"];
|
|
49
|
+
/** `PUT /api/v1/policies/{policyId}` 成功时的响应体。 */
|
|
50
|
+
export type UpdatePolicyResult = operations["update-policy"]["responses"][200]["content"]["application/json"];
|
|
51
|
+
/** `PUT /api/v1/policies/{policyId}` 的请求体。 */
|
|
52
|
+
export type UpdatePolicyBody = NonNullable<operations["update-policy"]["requestBody"]>["content"]["application/json"];
|
|
27
53
|
/** `POST /api/v1/transfer-ownership` 成功时的响应体。 */
|
|
28
54
|
export type TransferProjectOwnershipResult = operations["transfer-project-ownership"]["responses"][200]["content"]["application/json"];
|
|
29
55
|
/** `POST /api/v1/transfer-ownership` 的请求体。 */
|
|
@@ -42,6 +68,8 @@ export type UpdateRoleResult = operations["update-role"]["responses"][200]["cont
|
|
|
42
68
|
export type UpdateRoleBody = NonNullable<operations["update-role"]["requestBody"]>["content"]["application/json"];
|
|
43
69
|
/** `GET /api/v1/ssh-keys` 成功时的响应体。 */
|
|
44
70
|
export type ListSshKeysResult = operations["list-ssh-keys"]["responses"][200]["content"]["application/json"];
|
|
71
|
+
/** `GET /api/v1/ssh-keys` 的查询参数。 */
|
|
72
|
+
export type ListSshKeysQuery = operations["list-ssh-keys"]["parameters"]["query"];
|
|
45
73
|
/** `POST /api/v1/ssh-keys` 成功时的响应体。 */
|
|
46
74
|
export type CreateSshKeyResult = operations["create-ssh-key"]["responses"][201]["content"]["application/json"];
|
|
47
75
|
/** `POST /api/v1/ssh-keys` 的请求体。 */
|
package/dist/iam/v1/schema.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ export interface paths {
|
|
|
11
11
|
cookie?: never;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @description
|
|
14
|
+
* 列出全平台可授予的权限
|
|
15
|
+
* @description 各服务在启动时把自己那份目录注册进 IAM(和 AddFinalizer 同一段代码),所以这里是一份汇总,不只是 IAM 自己那几条。**IAM 不用它做判定**——判定在各服务自己那边,拿 Grant 配它自己那份目录算;这份汇总只是让界面画得出勾选框,它落后一个版本只会让界面上少几条可选项,不会让判定出错。一个还没启动过的服务,它的权限不在这里。
|
|
16
16
|
*/
|
|
17
17
|
get: operations["list-permissions"];
|
|
18
18
|
put?: never;
|
|
@@ -109,6 +109,30 @@ export interface paths {
|
|
|
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;
|
|
@@ -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
|
+
* 设置一个成员直挂的权限
|
|
203
|
+
* @description 整体替换基础策略上直挂的那些权限。直挂让「给某个人临时开一条」不必先造一个只有他一个人持有的角色,但它不会随角色调整而更新,所以它适合一次性的、说得出理由的授予——角色仍然是主要的组织方式。要 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
|
+
* 列出这个项目里的策略
|
|
222
|
+
* @description 在项目里就看得到,和成员列表同一条规则:谁被授了什么也是「这个项目有谁」的一部分。
|
|
223
|
+
*/
|
|
224
|
+
get: operations["list-policies"];
|
|
225
|
+
put?: never;
|
|
226
|
+
/**
|
|
227
|
+
* 附加一条策略
|
|
228
|
+
* @description 它建的是**附加**策略——要么带资源范围,要么方向是 deny。一条不限资源的 allow 是基础策略,每个成员只有一条,改它走 set-member-roles 和 set-member-permissions。roles 里不能有 OWNER 或 ADMIN:它们是规则而不是权限集合,「限定在三台机器上的所有者」讲不通。要 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
|
+
* 查看一条策略
|
|
246
|
+
* @description 和 list-policies 同一条规则,在项目里就看得到:谁被授了什么也是「这个项目有谁」的一部分,读它不需要额外的权限。
|
|
247
|
+
*/
|
|
248
|
+
get: operations["get-policy"];
|
|
249
|
+
/**
|
|
250
|
+
* 改一条策略
|
|
251
|
+
* @description 整体替换而不是逐字段改:resources、roles、permissions 各自整份覆盖,没发的那份就是空的——只有「这就是这条策略现在的全貌」这一种语义说得清一次写入到底收回了什么。改不动的是策略的**种类**:基础策略(不限资源的 allow)加不上资源范围,这个成员的角色就存在它上面,给它加个范围等于让他在别的资源上什么都不是;一条带范围的策略反过来也不能把范围清空变成基础策略,那个位置每个成员只有一条。要换种类就删了重建。要 iam:members.manage。
|
|
252
|
+
*/
|
|
253
|
+
put: operations["update-policy"];
|
|
254
|
+
post?: never;
|
|
255
|
+
/**
|
|
256
|
+
* 摘掉一条策略
|
|
257
|
+
* @description 基础策略摘不掉——它是这个成员角色的落点,删了它这个人就不再持有任何角色,而「让他离开这个项目」是 remove-member 的事。要 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;
|
|
@@ -292,21 +388,47 @@ export interface components {
|
|
|
292
388
|
status: number;
|
|
293
389
|
};
|
|
294
390
|
PermissionResource: {
|
|
295
|
-
description:
|
|
391
|
+
/** @description 权限的代码,形如 compute:instance.delete。**这里没有展示名**:一条权限对人显示成什么字是本地化的,服务端存一份的话那一份只会是某一种语言,而读它的人可能读别的语言。译名归渲染它的那一层;它没跟上时界面显示的就是这个代码——一个自解释的降级,而且看得见 */
|
|
296
392
|
name: string;
|
|
297
393
|
/** @description 只有项目所有者能做,绑到自定义角色上也不会生效 */
|
|
298
394
|
owner_only: boolean;
|
|
395
|
+
/** @description 这条权限的判定对象是哪类资源,空表示它是项目级的。**它不必等于操作对象本身**——compute 的 route 表上没有 project_id,隔离本来就经父网络传递,所以 compute:route.create 的判定对象是 compute:private_network。非空同时意味着这条权限可以被限定到具体实例;create 和 list 一律留空 */
|
|
396
|
+
resource_type: string;
|
|
397
|
+
};
|
|
398
|
+
ResourceTypeResource: {
|
|
399
|
+
/** @description 资源类型的代码,形如 dns:zone。同样没有展示名:它该显示成「托管域名」还是「Zone」由渲染它的那一层按读者的语言决定 */
|
|
400
|
+
name: string;
|
|
299
401
|
};
|
|
300
|
-
|
|
301
|
-
|
|
402
|
+
CatalogResource: {
|
|
403
|
+
permissions: components["schemas"]["PermissionResource"][] | null;
|
|
404
|
+
/** @description 这个服务声明的资源类型。带资源范围的规则只落得到它们上面——一个没有被声明过的类型没人认得,限定在它上面的规则谁都判不出来 */
|
|
405
|
+
resource_types: components["schemas"]["ResourceTypeResource"][] | null;
|
|
406
|
+
service: string;
|
|
407
|
+
};
|
|
408
|
+
CatalogListResponseBody: {
|
|
409
|
+
items: components["schemas"]["CatalogResource"][] | null;
|
|
410
|
+
};
|
|
411
|
+
ResourceRefResource: {
|
|
412
|
+
/** @description 是字符串不是 uuid:dns 的 zone 标识是域名,而且不在 IAM 库里。匹配语义是 glob,所以 *.example.com 能表达一批子域名;uuid 和域名都不含 glob 元字符,对它们来说就是精确相等 */
|
|
413
|
+
id: string;
|
|
414
|
+
/** @description 形如 compute:instance、dns:zone,和权限名同一个命名空间 */
|
|
415
|
+
type: string;
|
|
416
|
+
};
|
|
417
|
+
RuleResource: {
|
|
418
|
+
/** @enum {string} */
|
|
419
|
+
effect: "allow" | "deny";
|
|
420
|
+
/** @description 权限名,支持尾部通配(compute:instance.*)。通配必须带服务前缀——一条光秃秃的 * 会把日后新上线的服务的操作也一起授出去,而那件事发生的时候没有任何人在场 */
|
|
421
|
+
permissions: string[] | null;
|
|
422
|
+
/** @description 为空表示整个项目范围;非空表示这条规则只在这些资源上成立,而那意味着它回答不了项目级的问题 */
|
|
423
|
+
resources: components["schemas"]["ResourceRefResource"][] | null;
|
|
302
424
|
};
|
|
303
425
|
GrantResource: {
|
|
304
426
|
admin: boolean;
|
|
305
427
|
owner: boolean;
|
|
306
|
-
/** @description 持有的全部自定义角色的权限并集,已去重排序 */
|
|
307
|
-
permissions: string[] | null;
|
|
308
428
|
/** @description 持有的角色编码,只用于展示 */
|
|
309
429
|
roles: string[] | null;
|
|
430
|
+
/** @description 他全部策略编译出来的规则。**不要自己遍历它做判定**——拿它配上自己那份权限目录交给 pkg/rbac:owner 不可被 deny、deny 优先于 admin、带资源范围的规则不参与项目级判定,那里面的顺序每一条都对着一种会静默放行的写法 */
|
|
431
|
+
rules: components["schemas"]["RuleResource"][] | null;
|
|
310
432
|
};
|
|
311
433
|
ProjectResource: {
|
|
312
434
|
ban_reason: string;
|
|
@@ -392,7 +514,28 @@ export interface components {
|
|
|
392
514
|
/** @description 兑现用的明文,**只在这一次响应里出现**。库里只有它的哈希,丢了只能撤销重发 */
|
|
393
515
|
token: string;
|
|
394
516
|
};
|
|
517
|
+
BatchGetMembersRequestBody: {
|
|
518
|
+
/** @description The account ids to resolve. Blank entries are ignored. */
|
|
519
|
+
ids: string[];
|
|
520
|
+
};
|
|
521
|
+
BatchGetMembersResponseBody: {
|
|
522
|
+
/** @description The people that resolved. Ids that never belonged to this project are absent, as are ids that do not resolve at all. */
|
|
523
|
+
items: components["schemas"]["ResolvedMemberResource"][];
|
|
524
|
+
};
|
|
525
|
+
/** @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. */
|
|
526
|
+
ResolvedMemberResource: {
|
|
527
|
+
/** @description MD5 hash of the lowercased, trimmed email address, for use with Gravatar-compatible avatar services. Empty if the account has no email address. */
|
|
528
|
+
avatar_hash: string;
|
|
529
|
+
email: string;
|
|
530
|
+
first_name: string;
|
|
531
|
+
last_name: string;
|
|
532
|
+
/** @description True when this person is no longer a member of the project. */
|
|
533
|
+
left: boolean;
|
|
534
|
+
user_id: string;
|
|
535
|
+
};
|
|
395
536
|
MemberResource: {
|
|
537
|
+
/** @description MD5 hash of the lowercased, trimmed email address, for use with Gravatar-compatible avatar services. Empty if the account has no email address. */
|
|
538
|
+
avatar_hash: string;
|
|
396
539
|
/** Format: date-time */
|
|
397
540
|
created_at: string;
|
|
398
541
|
created_by: string;
|
|
@@ -425,6 +568,63 @@ export interface components {
|
|
|
425
568
|
/** @description 这个人应当持有的**全部**角色编码。OWNER 不能出现在这里 */
|
|
426
569
|
roles: string[] | null;
|
|
427
570
|
};
|
|
571
|
+
SetMemberPermissionsRequestBody: {
|
|
572
|
+
/** @description 这个人应当直挂的**全部**权限名,整体替换。角色给的那些不在这里,也不会被这次写入碰到 */
|
|
573
|
+
permissions: string[] | null;
|
|
574
|
+
};
|
|
575
|
+
PolicyResource: {
|
|
576
|
+
/** @description 基础策略是方向 allow、不限资源的那一条,每个成员恰好一条,装的是他的常规角色。改它走 PUT /members/{userId}/roles 和 PUT /members/{userId}/permissions */
|
|
577
|
+
base: boolean;
|
|
578
|
+
/** Format: date-time */
|
|
579
|
+
created_at: string;
|
|
580
|
+
/** @description 给人看的理由。一条附加策略事后最难回答的是「当初为什么开这一条」 */
|
|
581
|
+
description: string;
|
|
582
|
+
/** @enum {string} */
|
|
583
|
+
effect: "allow" | "deny";
|
|
584
|
+
/** Format: uuid */
|
|
585
|
+
id: string;
|
|
586
|
+
/** @description 直挂在这个人身上的权限名,不经过角色 */
|
|
587
|
+
permissions: string[] | null;
|
|
588
|
+
/** @description 为空表示整个项目范围 */
|
|
589
|
+
resources: components["schemas"]["ResourceRefResource"][] | null;
|
|
590
|
+
/** @description 这条策略带上的角色编码 */
|
|
591
|
+
roles: string[] | null;
|
|
592
|
+
/** Format: date-time */
|
|
593
|
+
updated_at: string;
|
|
594
|
+
user_id: string;
|
|
595
|
+
};
|
|
596
|
+
PolicyListResponseBody: {
|
|
597
|
+
items: components["schemas"]["PolicyResource"][] | null;
|
|
598
|
+
};
|
|
599
|
+
AttachPolicyRequestBody: {
|
|
600
|
+
/** @description 给人看的理由。一条附加策略事后最难回答的是「当初为什么开这一条」 */
|
|
601
|
+
description?: string;
|
|
602
|
+
/** @enum {string} */
|
|
603
|
+
effect: "allow" | "deny";
|
|
604
|
+
/** @description 直挂的权限名,用它就不必为一个人临时造一个只有他持有的角色 */
|
|
605
|
+
permissions?: string[] | null;
|
|
606
|
+
/** @description 这条策略只在这些资源上成立。留空只有配合 deny 才讲得通——一条不限资源的 allow 是基础策略,那一条已经有了 */
|
|
607
|
+
resources?: components["schemas"]["ResourceRefResource"][] | null;
|
|
608
|
+
/** @description 必须是这个项目已经定义的角色。OWNER 和 ADMIN 不行——它们是规则而不是权限集合,「限定在三台机器上的所有者」讲不通 */
|
|
609
|
+
roles?: string[] | null;
|
|
610
|
+
/** @description 必须已经是这个项目的成员 */
|
|
611
|
+
user_id: string;
|
|
612
|
+
};
|
|
613
|
+
UpdatePolicyRequestBody: {
|
|
614
|
+
/** @description 给人看的理由。它和这次改动一起替换,不然留下来的会是一句解释着上一个版本的话 */
|
|
615
|
+
description?: string;
|
|
616
|
+
/**
|
|
617
|
+
* @description 必须和这条策略当前的方向一致。方向改不动——那不是「改一条策略」,是一次意思完全相反的授权决定,改它的人多半以为自己在收紧,而读这行数据的下一个人看到的是一条方向和当初授予时不同、说明文字却还是旧的策略。仍然要求发这个字段而不是干脆不收,是因为整体替换的语义是「这就是这条策略现在的全貌」:少一个字段的话,调用方以为自己把 deny 改成了 allow,而服务端默默忽略了它。不一致时返回 PROJECT_POLICY_EFFECT_IMMUTABLE
|
|
618
|
+
* @enum {string}
|
|
619
|
+
*/
|
|
620
|
+
effect: "allow" | "deny";
|
|
621
|
+
/** @description 直挂的权限名,整份替换。没列进来的就是被收回了——它不是往上加一条 */
|
|
622
|
+
permissions?: string[] | null;
|
|
623
|
+
/** @description 这条策略的资源范围,整份替换。范围内容能改,有没有范围改不了:基础策略加不上范围,带范围的也清不空——清空之后它就是基础策略的形状,而那个位置每个成员只有一条 */
|
|
624
|
+
resources?: components["schemas"]["ResourceRefResource"][] | null;
|
|
625
|
+
/** @description 必须是这个项目已经定义的角色,整份替换。和挂上去那次一样不能有 OWNER 或 ADMIN */
|
|
626
|
+
roles?: string[] | null;
|
|
627
|
+
};
|
|
428
628
|
TransferOwnershipRequestBody: {
|
|
429
629
|
/** @description 接手的人必须已经是这个项目的成员 */
|
|
430
630
|
to_user_id: string;
|
|
@@ -506,7 +706,7 @@ export interface components {
|
|
|
506
706
|
* @default me
|
|
507
707
|
* @enum {string}
|
|
508
708
|
*/
|
|
509
|
-
owner
|
|
709
|
+
owner?: "me" | "project";
|
|
510
710
|
/** @description OpenSSH 格式的公钥。类型和指纹从它算出来,都不可改 */
|
|
511
711
|
public_key: string;
|
|
512
712
|
/** @description 用途标签,比如 ci、bastion */
|
|
@@ -539,7 +739,7 @@ export interface operations {
|
|
|
539
739
|
[name: string]: unknown;
|
|
540
740
|
};
|
|
541
741
|
content: {
|
|
542
|
-
"application/json": components["schemas"]["
|
|
742
|
+
"application/json": components["schemas"]["CatalogListResponseBody"];
|
|
543
743
|
};
|
|
544
744
|
};
|
|
545
745
|
/** @description Error */
|
|
@@ -769,6 +969,39 @@ export interface operations {
|
|
|
769
969
|
};
|
|
770
970
|
};
|
|
771
971
|
};
|
|
972
|
+
"batch-get-members": {
|
|
973
|
+
parameters: {
|
|
974
|
+
query?: never;
|
|
975
|
+
header?: never;
|
|
976
|
+
path?: never;
|
|
977
|
+
cookie?: never;
|
|
978
|
+
};
|
|
979
|
+
requestBody: {
|
|
980
|
+
content: {
|
|
981
|
+
"application/json": components["schemas"]["BatchGetMembersRequestBody"];
|
|
982
|
+
};
|
|
983
|
+
};
|
|
984
|
+
responses: {
|
|
985
|
+
/** @description OK */
|
|
986
|
+
200: {
|
|
987
|
+
headers: {
|
|
988
|
+
[name: string]: unknown;
|
|
989
|
+
};
|
|
990
|
+
content: {
|
|
991
|
+
"application/json": components["schemas"]["BatchGetMembersResponseBody"];
|
|
992
|
+
};
|
|
993
|
+
};
|
|
994
|
+
/** @description Error */
|
|
995
|
+
default: {
|
|
996
|
+
headers: {
|
|
997
|
+
[name: string]: unknown;
|
|
998
|
+
};
|
|
999
|
+
content: {
|
|
1000
|
+
"application/json": components["schemas"]["Error"];
|
|
1001
|
+
};
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
1004
|
+
};
|
|
772
1005
|
"list-members": {
|
|
773
1006
|
parameters: {
|
|
774
1007
|
query?: {
|
|
@@ -869,6 +1102,201 @@ export interface operations {
|
|
|
869
1102
|
};
|
|
870
1103
|
};
|
|
871
1104
|
};
|
|
1105
|
+
"set-member-permissions": {
|
|
1106
|
+
parameters: {
|
|
1107
|
+
query?: never;
|
|
1108
|
+
header?: never;
|
|
1109
|
+
path: {
|
|
1110
|
+
userId: string;
|
|
1111
|
+
};
|
|
1112
|
+
cookie?: never;
|
|
1113
|
+
};
|
|
1114
|
+
requestBody: {
|
|
1115
|
+
content: {
|
|
1116
|
+
"application/json": components["schemas"]["SetMemberPermissionsRequestBody"];
|
|
1117
|
+
};
|
|
1118
|
+
};
|
|
1119
|
+
responses: {
|
|
1120
|
+
/** @description OK */
|
|
1121
|
+
200: {
|
|
1122
|
+
headers: {
|
|
1123
|
+
[name: string]: unknown;
|
|
1124
|
+
};
|
|
1125
|
+
content: {
|
|
1126
|
+
"application/json": components["schemas"]["PolicyResource"];
|
|
1127
|
+
};
|
|
1128
|
+
};
|
|
1129
|
+
/** @description Error */
|
|
1130
|
+
default: {
|
|
1131
|
+
headers: {
|
|
1132
|
+
[name: string]: unknown;
|
|
1133
|
+
};
|
|
1134
|
+
content: {
|
|
1135
|
+
"application/json": components["schemas"]["Error"];
|
|
1136
|
+
};
|
|
1137
|
+
};
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
"list-policies": {
|
|
1141
|
+
parameters: {
|
|
1142
|
+
query?: {
|
|
1143
|
+
/** @description 只看这个人身上的。不传表示整个项目的 */
|
|
1144
|
+
userId?: string;
|
|
1145
|
+
};
|
|
1146
|
+
header?: never;
|
|
1147
|
+
path?: never;
|
|
1148
|
+
cookie?: never;
|
|
1149
|
+
};
|
|
1150
|
+
requestBody?: never;
|
|
1151
|
+
responses: {
|
|
1152
|
+
/** @description OK */
|
|
1153
|
+
200: {
|
|
1154
|
+
headers: {
|
|
1155
|
+
[name: string]: unknown;
|
|
1156
|
+
};
|
|
1157
|
+
content: {
|
|
1158
|
+
"application/json": components["schemas"]["PolicyListResponseBody"];
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
/** @description Error */
|
|
1162
|
+
default: {
|
|
1163
|
+
headers: {
|
|
1164
|
+
[name: string]: unknown;
|
|
1165
|
+
};
|
|
1166
|
+
content: {
|
|
1167
|
+
"application/json": components["schemas"]["Error"];
|
|
1168
|
+
};
|
|
1169
|
+
};
|
|
1170
|
+
};
|
|
1171
|
+
};
|
|
1172
|
+
"attach-policy": {
|
|
1173
|
+
parameters: {
|
|
1174
|
+
query?: never;
|
|
1175
|
+
header?: never;
|
|
1176
|
+
path?: never;
|
|
1177
|
+
cookie?: never;
|
|
1178
|
+
};
|
|
1179
|
+
requestBody: {
|
|
1180
|
+
content: {
|
|
1181
|
+
"application/json": components["schemas"]["AttachPolicyRequestBody"];
|
|
1182
|
+
};
|
|
1183
|
+
};
|
|
1184
|
+
responses: {
|
|
1185
|
+
/** @description Created */
|
|
1186
|
+
201: {
|
|
1187
|
+
headers: {
|
|
1188
|
+
[name: string]: unknown;
|
|
1189
|
+
};
|
|
1190
|
+
content: {
|
|
1191
|
+
"application/json": components["schemas"]["PolicyResource"];
|
|
1192
|
+
};
|
|
1193
|
+
};
|
|
1194
|
+
/** @description Error */
|
|
1195
|
+
default: {
|
|
1196
|
+
headers: {
|
|
1197
|
+
[name: string]: unknown;
|
|
1198
|
+
};
|
|
1199
|
+
content: {
|
|
1200
|
+
"application/json": components["schemas"]["Error"];
|
|
1201
|
+
};
|
|
1202
|
+
};
|
|
1203
|
+
};
|
|
1204
|
+
};
|
|
1205
|
+
"get-policy": {
|
|
1206
|
+
parameters: {
|
|
1207
|
+
query?: never;
|
|
1208
|
+
header?: never;
|
|
1209
|
+
path: {
|
|
1210
|
+
policyId: string;
|
|
1211
|
+
};
|
|
1212
|
+
cookie?: never;
|
|
1213
|
+
};
|
|
1214
|
+
requestBody?: never;
|
|
1215
|
+
responses: {
|
|
1216
|
+
/** @description OK */
|
|
1217
|
+
200: {
|
|
1218
|
+
headers: {
|
|
1219
|
+
[name: string]: unknown;
|
|
1220
|
+
};
|
|
1221
|
+
content: {
|
|
1222
|
+
"application/json": components["schemas"]["PolicyResource"];
|
|
1223
|
+
};
|
|
1224
|
+
};
|
|
1225
|
+
/** @description Error */
|
|
1226
|
+
default: {
|
|
1227
|
+
headers: {
|
|
1228
|
+
[name: string]: unknown;
|
|
1229
|
+
};
|
|
1230
|
+
content: {
|
|
1231
|
+
"application/json": components["schemas"]["Error"];
|
|
1232
|
+
};
|
|
1233
|
+
};
|
|
1234
|
+
};
|
|
1235
|
+
};
|
|
1236
|
+
"update-policy": {
|
|
1237
|
+
parameters: {
|
|
1238
|
+
query?: never;
|
|
1239
|
+
header?: never;
|
|
1240
|
+
path: {
|
|
1241
|
+
policyId: string;
|
|
1242
|
+
};
|
|
1243
|
+
cookie?: never;
|
|
1244
|
+
};
|
|
1245
|
+
requestBody: {
|
|
1246
|
+
content: {
|
|
1247
|
+
"application/json": components["schemas"]["UpdatePolicyRequestBody"];
|
|
1248
|
+
};
|
|
1249
|
+
};
|
|
1250
|
+
responses: {
|
|
1251
|
+
/** @description OK */
|
|
1252
|
+
200: {
|
|
1253
|
+
headers: {
|
|
1254
|
+
[name: string]: unknown;
|
|
1255
|
+
};
|
|
1256
|
+
content: {
|
|
1257
|
+
"application/json": components["schemas"]["PolicyResource"];
|
|
1258
|
+
};
|
|
1259
|
+
};
|
|
1260
|
+
/** @description Error */
|
|
1261
|
+
default: {
|
|
1262
|
+
headers: {
|
|
1263
|
+
[name: string]: unknown;
|
|
1264
|
+
};
|
|
1265
|
+
content: {
|
|
1266
|
+
"application/json": components["schemas"]["Error"];
|
|
1267
|
+
};
|
|
1268
|
+
};
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
"detach-policy": {
|
|
1272
|
+
parameters: {
|
|
1273
|
+
query?: never;
|
|
1274
|
+
header?: never;
|
|
1275
|
+
path: {
|
|
1276
|
+
policyId: string;
|
|
1277
|
+
};
|
|
1278
|
+
cookie?: never;
|
|
1279
|
+
};
|
|
1280
|
+
requestBody?: never;
|
|
1281
|
+
responses: {
|
|
1282
|
+
/** @description No Content */
|
|
1283
|
+
204: {
|
|
1284
|
+
headers: {
|
|
1285
|
+
[name: string]: unknown;
|
|
1286
|
+
};
|
|
1287
|
+
content?: never;
|
|
1288
|
+
};
|
|
1289
|
+
/** @description Error */
|
|
1290
|
+
default: {
|
|
1291
|
+
headers: {
|
|
1292
|
+
[name: string]: unknown;
|
|
1293
|
+
};
|
|
1294
|
+
content: {
|
|
1295
|
+
"application/json": components["schemas"]["Error"];
|
|
1296
|
+
};
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
872
1300
|
"transfer-project-ownership": {
|
|
873
1301
|
parameters: {
|
|
874
1302
|
query?: never;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export type * as account from "./account/v1/index.js";
|
|
2
2
|
export type * as assistant from "./assistant/v1/index.js";
|
|
3
|
+
export type * as billing from "./billing/v1/index.js";
|
|
3
4
|
export type * as canopy from "./canopy/v1/index.js";
|
|
4
5
|
export type * as compute from "./compute/v1/index.js";
|
|
6
|
+
export type * as dns from "./dns/v1/index.js";
|
|
5
7
|
export type * as iam from "./iam/v1/index.js";
|
|
6
8
|
export type * as monitoring from "./monitoring/v1/index.js";
|
|
9
|
+
export type * as notification from "./notification/v1/index.js";
|
|
10
|
+
export type * as support from "./support/v1/index.js";
|
|
7
11
|
export type * as tunnel from "./tunnel/v1/index.js";
|