@leaflow/sdk 0.197.0 → 0.198.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iam/v1/generated/functions.d.ts +46 -103
- package/dist/iam/v1/generated/functions.js +29 -114
- package/dist/iam/v1/generated/models.d.ts +53 -118
- package/dist/iam/v1/generated/models.js +2 -6
- package/dist/iam/v1/generated/schemas.zod.d.ts +31 -62
- package/dist/iam/v1/generated/schemas.zod.js +35 -53
- package/dist/iam/v1/generated/validators/{updatePolicyRequestBody.zod.d.ts → createMemberPermissionRequestBody.zod.d.ts} +9 -11
- package/dist/iam/v1/generated/validators/createMemberPermissionRequestBody.zod.js +36 -0
- package/dist/iam/v1/generated/validators/grantResource.zod.js +1 -1
- package/dist/iam/v1/generated/validators/lengthAwarePageMemberResource.zod.d.ts +12 -0
- package/dist/iam/v1/generated/validators/{listProjectInvitationsParams.zod.d.ts → listInvitationsParams.zod.d.ts} +8 -8
- package/dist/iam/v1/generated/validators/{listProjectInvitationsParams.zod.js → listInvitationsParams.zod.js} +11 -11
- package/dist/iam/v1/generated/validators/{policyListResponseBody.zod.d.ts → memberPermissionListResponseBody.zod.d.ts} +8 -14
- package/dist/iam/v1/generated/validators/{catalogListResponseBody.zod.js → memberPermissionListResponseBody.zod.js} +3 -3
- package/dist/iam/v1/generated/validators/{policyResource.zod.d.ts → memberPermissionResource.zod.d.ts} +11 -14
- package/dist/iam/v1/generated/validators/memberPermissionResource.zod.js +38 -0
- package/dist/iam/v1/generated/validators/memberResource.zod.d.ts +12 -0
- package/dist/iam/v1/generated/validators/memberResource.zod.js +5 -0
- package/dist/iam/v1/generated/validators/ownershipTransferResponseBody.zod.d.ts +24 -0
- package/dist/iam/v1/generated/validators/{catalogResource.zod.d.ts → permissionListResponseBody.zod.d.ts} +4 -8
- package/dist/iam/v1/generated/validators/{policyListResponseBody.zod.js → permissionListResponseBody.zod.js} +3 -3
- package/dist/routes.d.ts +7 -31
- package/dist/routes.js +7 -34
- package/package.json +1 -1
- package/dist/iam/v1/generated/validators/attachPolicyRequestBody.zod.d.ts +0 -33
- package/dist/iam/v1/generated/validators/attachPolicyRequestBody.zod.js +0 -43
- package/dist/iam/v1/generated/validators/catalogListResponseBody.zod.d.ts +0 -30
- package/dist/iam/v1/generated/validators/catalogResource.zod.js +0 -25
- package/dist/iam/v1/generated/validators/listPoliciesParams.zod.d.ts +0 -21
- package/dist/iam/v1/generated/validators/listPoliciesParams.zod.js +0 -23
- package/dist/iam/v1/generated/validators/policyResource.zod.js +0 -33
- package/dist/iam/v1/generated/validators/resourceTypeResource.zod.d.ts +0 -20
- package/dist/iam/v1/generated/validators/resourceTypeResource.zod.js +0 -20
- package/dist/iam/v1/generated/validators/setMemberPermissionsRequestBody.zod.d.ts +0 -20
- package/dist/iam/v1/generated/validators/setMemberPermissionsRequestBody.zod.js +0 -21
- package/dist/iam/v1/generated/validators/updatePolicyRequestBody.zod.js +0 -39
|
@@ -13,20 +13,20 @@
|
|
|
13
13
|
* OpenAPI spec version: 1.0.0
|
|
14
14
|
*/
|
|
15
15
|
import * as zod from "zod";
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
21
|
-
export const
|
|
16
|
+
export const listInvitationsParamsLimitDefault = 50;
|
|
17
|
+
export const listInvitationsParamsLimitMax = 200;
|
|
18
|
+
export const listInvitationsParamsOffsetDefault = 0;
|
|
19
|
+
export const listInvitationsParamsOffsetMin = 0;
|
|
20
|
+
export const listInvitationsParamsOffsetMax = 10000;
|
|
21
|
+
export const ListInvitationsParams = zod.strictObject({
|
|
22
22
|
limit: zod
|
|
23
23
|
.int()
|
|
24
24
|
.min(1)
|
|
25
|
-
.max(
|
|
26
|
-
.default(
|
|
25
|
+
.max(listInvitationsParamsLimitMax)
|
|
26
|
+
.default(listInvitationsParamsLimitDefault),
|
|
27
27
|
offset: zod
|
|
28
28
|
.int()
|
|
29
|
-
.min(
|
|
30
|
-
.max(
|
|
31
|
-
.default(
|
|
29
|
+
.min(listInvitationsParamsOffsetMin)
|
|
30
|
+
.max(listInvitationsParamsOffsetMax)
|
|
31
|
+
.default(listInvitationsParamsOffsetDefault),
|
|
32
32
|
});
|
|
@@ -13,25 +13,19 @@
|
|
|
13
13
|
* OpenAPI spec version: 1.0.0
|
|
14
14
|
*/
|
|
15
15
|
import * as zod from "zod";
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const MemberPermissionListResponseBody: zod.ZodObject<{
|
|
17
17
|
items: zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
description: zod.ZodString;
|
|
18
|
+
id: zod.ZodUUID;
|
|
19
|
+
permission: zod.ZodString;
|
|
21
20
|
effect: zod.ZodEnum<{
|
|
22
21
|
allow: "allow";
|
|
23
22
|
deny: "deny";
|
|
24
23
|
}>;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
id: zod.ZodString;
|
|
29
|
-
type: zod.ZodString;
|
|
30
|
-
}, zod.z.core.$strict>>>;
|
|
31
|
-
roles: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
|
|
24
|
+
resource_type: zod.ZodNullable<zod.ZodString>;
|
|
25
|
+
resource_id: zod.ZodNullable<zod.ZodString>;
|
|
26
|
+
created_at: zod.z.ZodISODateTime;
|
|
32
27
|
updated_at: zod.z.ZodISODateTime;
|
|
33
|
-
user_id: zod.ZodString;
|
|
34
28
|
}, zod.z.core.$strict>>>;
|
|
35
29
|
}, zod.z.core.$strict>;
|
|
36
|
-
export type
|
|
37
|
-
export type
|
|
30
|
+
export type MemberPermissionListResponseBody = zod.input<typeof MemberPermissionListResponseBody>;
|
|
31
|
+
export type MemberPermissionListResponseBodyOutput = zod.output<typeof MemberPermissionListResponseBody>;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* OpenAPI spec version: 1.0.0
|
|
14
14
|
*/
|
|
15
15
|
import * as zod from "zod";
|
|
16
|
-
import {
|
|
17
|
-
export const
|
|
18
|
-
items: zod.array(
|
|
16
|
+
import { MemberPermissionResource } from "./memberPermissionResource.zod.js";
|
|
17
|
+
export const MemberPermissionListResponseBody = zod.strictObject({
|
|
18
|
+
items: zod.array(MemberPermissionResource).nullable(),
|
|
19
19
|
});
|
|
@@ -13,23 +13,20 @@
|
|
|
13
13
|
* OpenAPI spec version: 1.0.0
|
|
14
14
|
*/
|
|
15
15
|
import * as zod from "zod";
|
|
16
|
-
export declare const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
export declare const memberPermissionResourcePermissionMax = 128;
|
|
17
|
+
export declare const memberPermissionResourceResourceTypeMax = 128;
|
|
18
|
+
export declare const memberPermissionResourceResourceIdMax = 255;
|
|
19
|
+
export declare const MemberPermissionResource: zod.ZodObject<{
|
|
20
|
+
id: zod.ZodUUID;
|
|
21
|
+
permission: zod.ZodString;
|
|
20
22
|
effect: zod.ZodEnum<{
|
|
21
23
|
allow: "allow";
|
|
22
24
|
deny: "deny";
|
|
23
25
|
}>;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
id: zod.ZodString;
|
|
28
|
-
type: zod.ZodString;
|
|
29
|
-
}, zod.z.core.$strict>>>;
|
|
30
|
-
roles: zod.ZodNullable<zod.ZodArray<zod.ZodString>>;
|
|
26
|
+
resource_type: zod.ZodNullable<zod.ZodString>;
|
|
27
|
+
resource_id: zod.ZodNullable<zod.ZodString>;
|
|
28
|
+
created_at: zod.z.ZodISODateTime;
|
|
31
29
|
updated_at: zod.z.ZodISODateTime;
|
|
32
|
-
user_id: zod.ZodString;
|
|
33
30
|
}, zod.z.core.$strict>;
|
|
34
|
-
export type
|
|
35
|
-
export type
|
|
31
|
+
export type MemberPermissionResource = zod.input<typeof MemberPermissionResource>;
|
|
32
|
+
export type MemberPermissionResourceOutput = zod.output<typeof MemberPermissionResource>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow IAM API
|
|
5
|
+
* What happens inside a project: members, roles, invitations and the SSH keys the project shares.
|
|
6
|
+
*
|
|
7
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
|
|
8
|
+
* `projectId`, and the current project is the one the token states. Tokens are obtained from the
|
|
9
|
+
* account API.
|
|
10
|
+
*
|
|
11
|
+
* `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
|
|
12
|
+
* project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
|
|
13
|
+
* OpenAPI spec version: 1.0.0
|
|
14
|
+
*/
|
|
15
|
+
import * as zod from "zod";
|
|
16
|
+
export const memberPermissionResourcePermissionMax = 128;
|
|
17
|
+
export const memberPermissionResourceResourceTypeMax = 128;
|
|
18
|
+
export const memberPermissionResourceResourceIdMax = 255;
|
|
19
|
+
export const MemberPermissionResource = zod.strictObject({
|
|
20
|
+
id: zod.uuid().describe("The id of this grant, used to revoke it"),
|
|
21
|
+
permission: zod
|
|
22
|
+
.string()
|
|
23
|
+
.max(memberPermissionResourcePermissionMax)
|
|
24
|
+
.describe("The code of the permission, such as compute:instance.delete"),
|
|
25
|
+
effect: zod.enum(["allow", "deny"]),
|
|
26
|
+
resource_type: zod
|
|
27
|
+
.string()
|
|
28
|
+
.max(memberPermissionResourceResourceTypeMax)
|
|
29
|
+
.nullable()
|
|
30
|
+
.describe("The kind of resource this grant holds on, such as fleet:machine. Null with `resource_id` means it holds project-wide"),
|
|
31
|
+
resource_id: zod
|
|
32
|
+
.string()
|
|
33
|
+
.max(memberPermissionResourceResourceIdMax)
|
|
34
|
+
.nullable()
|
|
35
|
+
.describe("The resource identifier, which may carry a glob. Null with `resource_type` means the grant holds project-wide"),
|
|
36
|
+
created_at: zod.iso.datetime({ offset: true }),
|
|
37
|
+
updated_at: zod.iso.datetime({ offset: true }),
|
|
38
|
+
});
|
|
@@ -36,6 +36,18 @@ export declare const MemberResource: zod.ZodObject<{
|
|
|
36
36
|
}, zod.z.core.$strict>>>;
|
|
37
37
|
}, zod.z.core.$strict>;
|
|
38
38
|
last_name: zod.ZodString;
|
|
39
|
+
permissions: zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
40
|
+
id: zod.ZodUUID;
|
|
41
|
+
permission: zod.ZodString;
|
|
42
|
+
effect: zod.ZodEnum<{
|
|
43
|
+
allow: "allow";
|
|
44
|
+
deny: "deny";
|
|
45
|
+
}>;
|
|
46
|
+
resource_type: zod.ZodNullable<zod.ZodString>;
|
|
47
|
+
resource_id: zod.ZodNullable<zod.ZodString>;
|
|
48
|
+
created_at: zod.z.ZodISODateTime;
|
|
49
|
+
updated_at: zod.z.ZodISODateTime;
|
|
50
|
+
}, zod.z.core.$strict>>>;
|
|
39
51
|
user_id: zod.ZodString;
|
|
40
52
|
}, zod.z.core.$strict>;
|
|
41
53
|
export type MemberResource = zod.input<typeof MemberResource>;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import * as zod from "zod";
|
|
16
16
|
import { GrantResource } from "./grantResource.zod.js";
|
|
17
|
+
import { MemberPermissionResource } from "./memberPermissionResource.zod.js";
|
|
17
18
|
export const MemberResource = zod.strictObject({
|
|
18
19
|
avatar_hash: zod
|
|
19
20
|
.string()
|
|
@@ -24,5 +25,9 @@ export const MemberResource = zod.strictObject({
|
|
|
24
25
|
first_name: zod.string(),
|
|
25
26
|
grant: GrantResource,
|
|
26
27
|
last_name: zod.string(),
|
|
28
|
+
permissions: zod
|
|
29
|
+
.array(MemberPermissionResource)
|
|
30
|
+
.nullable()
|
|
31
|
+
.describe("The permissions granted to this person directly, apart from their roles"),
|
|
27
32
|
user_id: zod.string(),
|
|
28
33
|
});
|
|
@@ -37,6 +37,18 @@ export declare const OwnershipTransferResponseBody: zod.ZodObject<{
|
|
|
37
37
|
}, zod.z.core.$strict>>>;
|
|
38
38
|
}, zod.z.core.$strict>;
|
|
39
39
|
last_name: zod.ZodString;
|
|
40
|
+
permissions: zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
41
|
+
id: zod.ZodUUID;
|
|
42
|
+
permission: zod.ZodString;
|
|
43
|
+
effect: zod.ZodEnum<{
|
|
44
|
+
allow: "allow";
|
|
45
|
+
deny: "deny";
|
|
46
|
+
}>;
|
|
47
|
+
resource_type: zod.ZodNullable<zod.ZodString>;
|
|
48
|
+
resource_id: zod.ZodNullable<zod.ZodString>;
|
|
49
|
+
created_at: zod.z.ZodISODateTime;
|
|
50
|
+
updated_at: zod.z.ZodISODateTime;
|
|
51
|
+
}, zod.z.core.$strict>>>;
|
|
40
52
|
user_id: zod.ZodString;
|
|
41
53
|
}, zod.z.core.$strict>;
|
|
42
54
|
to: zod.ZodObject<{
|
|
@@ -62,6 +74,18 @@ export declare const OwnershipTransferResponseBody: zod.ZodObject<{
|
|
|
62
74
|
}, zod.z.core.$strict>>>;
|
|
63
75
|
}, zod.z.core.$strict>;
|
|
64
76
|
last_name: zod.ZodString;
|
|
77
|
+
permissions: zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
78
|
+
id: zod.ZodUUID;
|
|
79
|
+
permission: zod.ZodString;
|
|
80
|
+
effect: zod.ZodEnum<{
|
|
81
|
+
allow: "allow";
|
|
82
|
+
deny: "deny";
|
|
83
|
+
}>;
|
|
84
|
+
resource_type: zod.ZodNullable<zod.ZodString>;
|
|
85
|
+
resource_id: zod.ZodNullable<zod.ZodString>;
|
|
86
|
+
created_at: zod.z.ZodISODateTime;
|
|
87
|
+
updated_at: zod.z.ZodISODateTime;
|
|
88
|
+
}, zod.z.core.$strict>>>;
|
|
65
89
|
user_id: zod.ZodString;
|
|
66
90
|
}, zod.z.core.$strict>;
|
|
67
91
|
}, zod.z.core.$strict>;
|
|
@@ -13,16 +13,12 @@
|
|
|
13
13
|
* OpenAPI spec version: 1.0.0
|
|
14
14
|
*/
|
|
15
15
|
import * as zod from "zod";
|
|
16
|
-
export declare const
|
|
17
|
-
|
|
16
|
+
export declare const PermissionListResponseBody: zod.ZodObject<{
|
|
17
|
+
items: zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
18
18
|
name: zod.ZodString;
|
|
19
19
|
owner_only: zod.ZodBoolean;
|
|
20
20
|
resource_type: zod.ZodString;
|
|
21
21
|
}, zod.z.core.$strict>>>;
|
|
22
|
-
resource_types: zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
23
|
-
name: zod.ZodString;
|
|
24
|
-
}, zod.z.core.$strict>>>;
|
|
25
|
-
service: zod.ZodString;
|
|
26
22
|
}, zod.z.core.$strict>;
|
|
27
|
-
export type
|
|
28
|
-
export type
|
|
23
|
+
export type PermissionListResponseBody = zod.input<typeof PermissionListResponseBody>;
|
|
24
|
+
export type PermissionListResponseBodyOutput = zod.output<typeof PermissionListResponseBody>;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* OpenAPI spec version: 1.0.0
|
|
14
14
|
*/
|
|
15
15
|
import * as zod from "zod";
|
|
16
|
-
import {
|
|
17
|
-
export const
|
|
18
|
-
items: zod.array(
|
|
16
|
+
import { PermissionResource } from "./permissionResource.zod.js";
|
|
17
|
+
export const PermissionListResponseBody = zod.strictObject({
|
|
18
|
+
items: zod.array(PermissionResource).nullable(),
|
|
19
19
|
});
|
package/dist/routes.d.ts
CHANGED
|
@@ -3410,7 +3410,7 @@ export declare const routes: readonly [{
|
|
|
3410
3410
|
readonly contract: "iam";
|
|
3411
3411
|
readonly method: "GET";
|
|
3412
3412
|
readonly path: "/api/v1/invitations";
|
|
3413
|
-
readonly operationId: "list-
|
|
3413
|
+
readonly operationId: "list-invitations";
|
|
3414
3414
|
readonly securityScheme: "ScopedToken";
|
|
3415
3415
|
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
3416
3416
|
}, {
|
|
@@ -3461,52 +3461,28 @@ export declare const routes: readonly [{
|
|
|
3461
3461
|
readonly operationId: "set-member-roles";
|
|
3462
3462
|
readonly securityScheme: "ScopedToken";
|
|
3463
3463
|
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
3464
|
-
}, {
|
|
3465
|
-
readonly service: "iam";
|
|
3466
|
-
readonly contract: "iam";
|
|
3467
|
-
readonly method: "PUT";
|
|
3468
|
-
readonly path: "/api/v1/members/{userId}/permissions";
|
|
3469
|
-
readonly operationId: "set-member-permissions";
|
|
3470
|
-
readonly securityScheme: "ScopedToken";
|
|
3471
|
-
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
3472
3464
|
}, {
|
|
3473
3465
|
readonly service: "iam";
|
|
3474
3466
|
readonly contract: "iam";
|
|
3475
3467
|
readonly method: "GET";
|
|
3476
|
-
readonly path: "/api/v1/
|
|
3477
|
-
readonly operationId: "list-
|
|
3468
|
+
readonly path: "/api/v1/members/{userId}/permissions";
|
|
3469
|
+
readonly operationId: "list-member-permissions";
|
|
3478
3470
|
readonly securityScheme: "ScopedToken";
|
|
3479
3471
|
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
3480
3472
|
}, {
|
|
3481
3473
|
readonly service: "iam";
|
|
3482
3474
|
readonly contract: "iam";
|
|
3483
3475
|
readonly method: "POST";
|
|
3484
|
-
readonly path: "/api/v1/
|
|
3485
|
-
readonly operationId: "
|
|
3486
|
-
readonly securityScheme: "ScopedToken";
|
|
3487
|
-
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
3488
|
-
}, {
|
|
3489
|
-
readonly service: "iam";
|
|
3490
|
-
readonly contract: "iam";
|
|
3491
|
-
readonly method: "GET";
|
|
3492
|
-
readonly path: "/api/v1/policies/{policyId}";
|
|
3493
|
-
readonly operationId: "get-policy";
|
|
3494
|
-
readonly securityScheme: "ScopedToken";
|
|
3495
|
-
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
3496
|
-
}, {
|
|
3497
|
-
readonly service: "iam";
|
|
3498
|
-
readonly contract: "iam";
|
|
3499
|
-
readonly method: "PUT";
|
|
3500
|
-
readonly path: "/api/v1/policies/{policyId}";
|
|
3501
|
-
readonly operationId: "update-policy";
|
|
3476
|
+
readonly path: "/api/v1/members/{userId}/permissions";
|
|
3477
|
+
readonly operationId: "create-member-permission";
|
|
3502
3478
|
readonly securityScheme: "ScopedToken";
|
|
3503
3479
|
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
3504
3480
|
}, {
|
|
3505
3481
|
readonly service: "iam";
|
|
3506
3482
|
readonly contract: "iam";
|
|
3507
3483
|
readonly method: "DELETE";
|
|
3508
|
-
readonly path: "/api/v1/
|
|
3509
|
-
readonly operationId: "
|
|
3484
|
+
readonly path: "/api/v1/members/{userId}/permissions/{permissionId}";
|
|
3485
|
+
readonly operationId: "delete-member-permission";
|
|
3510
3486
|
readonly securityScheme: "ScopedToken";
|
|
3511
3487
|
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
3512
3488
|
}, {
|
package/dist/routes.js
CHANGED
|
@@ -3836,7 +3836,7 @@ export const routes = [
|
|
|
3836
3836
|
contract: "iam",
|
|
3837
3837
|
method: "GET",
|
|
3838
3838
|
path: "/api/v1/invitations",
|
|
3839
|
-
operationId: "list-
|
|
3839
|
+
operationId: "list-invitations",
|
|
3840
3840
|
securityScheme: "ScopedToken",
|
|
3841
3841
|
upstreamUrl: "https://iam.leaflow.cloud",
|
|
3842
3842
|
},
|
|
@@ -3894,21 +3894,12 @@ export const routes = [
|
|
|
3894
3894
|
securityScheme: "ScopedToken",
|
|
3895
3895
|
upstreamUrl: "https://iam.leaflow.cloud",
|
|
3896
3896
|
},
|
|
3897
|
-
{
|
|
3898
|
-
service: "iam",
|
|
3899
|
-
contract: "iam",
|
|
3900
|
-
method: "PUT",
|
|
3901
|
-
path: "/api/v1/members/{userId}/permissions",
|
|
3902
|
-
operationId: "set-member-permissions",
|
|
3903
|
-
securityScheme: "ScopedToken",
|
|
3904
|
-
upstreamUrl: "https://iam.leaflow.cloud",
|
|
3905
|
-
},
|
|
3906
3897
|
{
|
|
3907
3898
|
service: "iam",
|
|
3908
3899
|
contract: "iam",
|
|
3909
3900
|
method: "GET",
|
|
3910
|
-
path: "/api/v1/
|
|
3911
|
-
operationId: "list-
|
|
3901
|
+
path: "/api/v1/members/{userId}/permissions",
|
|
3902
|
+
operationId: "list-member-permissions",
|
|
3912
3903
|
securityScheme: "ScopedToken",
|
|
3913
3904
|
upstreamUrl: "https://iam.leaflow.cloud",
|
|
3914
3905
|
},
|
|
@@ -3916,26 +3907,8 @@ export const routes = [
|
|
|
3916
3907
|
service: "iam",
|
|
3917
3908
|
contract: "iam",
|
|
3918
3909
|
method: "POST",
|
|
3919
|
-
path: "/api/v1/
|
|
3920
|
-
operationId: "
|
|
3921
|
-
securityScheme: "ScopedToken",
|
|
3922
|
-
upstreamUrl: "https://iam.leaflow.cloud",
|
|
3923
|
-
},
|
|
3924
|
-
{
|
|
3925
|
-
service: "iam",
|
|
3926
|
-
contract: "iam",
|
|
3927
|
-
method: "GET",
|
|
3928
|
-
path: "/api/v1/policies/{policyId}",
|
|
3929
|
-
operationId: "get-policy",
|
|
3930
|
-
securityScheme: "ScopedToken",
|
|
3931
|
-
upstreamUrl: "https://iam.leaflow.cloud",
|
|
3932
|
-
},
|
|
3933
|
-
{
|
|
3934
|
-
service: "iam",
|
|
3935
|
-
contract: "iam",
|
|
3936
|
-
method: "PUT",
|
|
3937
|
-
path: "/api/v1/policies/{policyId}",
|
|
3938
|
-
operationId: "update-policy",
|
|
3910
|
+
path: "/api/v1/members/{userId}/permissions",
|
|
3911
|
+
operationId: "create-member-permission",
|
|
3939
3912
|
securityScheme: "ScopedToken",
|
|
3940
3913
|
upstreamUrl: "https://iam.leaflow.cloud",
|
|
3941
3914
|
},
|
|
@@ -3943,8 +3916,8 @@ export const routes = [
|
|
|
3943
3916
|
service: "iam",
|
|
3944
3917
|
contract: "iam",
|
|
3945
3918
|
method: "DELETE",
|
|
3946
|
-
path: "/api/v1/
|
|
3947
|
-
operationId: "
|
|
3919
|
+
path: "/api/v1/members/{userId}/permissions/{permissionId}",
|
|
3920
|
+
operationId: "delete-member-permission",
|
|
3948
3921
|
securityScheme: "ScopedToken",
|
|
3949
3922
|
upstreamUrl: "https://iam.leaflow.cloud",
|
|
3950
3923
|
},
|
package/package.json
CHANGED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by orval 🍺
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
* Leaflow IAM API
|
|
5
|
-
* What happens inside a project: members, roles, invitations and the SSH keys the project shares.
|
|
6
|
-
*
|
|
7
|
-
* Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
|
|
8
|
-
* `projectId`, and the current project is the one the token states. Tokens are obtained from the
|
|
9
|
-
* account API.
|
|
10
|
-
*
|
|
11
|
-
* `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
|
|
12
|
-
* project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
|
|
13
|
-
* OpenAPI spec version: 1.0.0
|
|
14
|
-
*/
|
|
15
|
-
import * as zod from "zod";
|
|
16
|
-
export declare const attachPolicyRequestBodyDescriptionMax = 255;
|
|
17
|
-
export declare const attachPolicyRequestBodyUserIdMax = 255;
|
|
18
|
-
export declare const AttachPolicyRequestBody: zod.ZodObject<{
|
|
19
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
20
|
-
effect: zod.ZodEnum<{
|
|
21
|
-
allow: "allow";
|
|
22
|
-
deny: "deny";
|
|
23
|
-
}>;
|
|
24
|
-
permissions: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodString>>>;
|
|
25
|
-
resources: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
26
|
-
id: zod.ZodString;
|
|
27
|
-
type: zod.ZodString;
|
|
28
|
-
}, zod.z.core.$strict>>>>;
|
|
29
|
-
roles: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodString>>>;
|
|
30
|
-
user_id: zod.ZodString;
|
|
31
|
-
}, zod.z.core.$strict>;
|
|
32
|
-
export type AttachPolicyRequestBody = zod.input<typeof AttachPolicyRequestBody>;
|
|
33
|
-
export type AttachPolicyRequestBodyOutput = zod.output<typeof AttachPolicyRequestBody>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by orval 🍺
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
* Leaflow IAM API
|
|
5
|
-
* What happens inside a project: members, roles, invitations and the SSH keys the project shares.
|
|
6
|
-
*
|
|
7
|
-
* Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
|
|
8
|
-
* `projectId`, and the current project is the one the token states. Tokens are obtained from the
|
|
9
|
-
* account API.
|
|
10
|
-
*
|
|
11
|
-
* `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
|
|
12
|
-
* project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
|
|
13
|
-
* OpenAPI spec version: 1.0.0
|
|
14
|
-
*/
|
|
15
|
-
import * as zod from "zod";
|
|
16
|
-
import { ResourceRefResource } from "./resourceRefResource.zod.js";
|
|
17
|
-
export const attachPolicyRequestBodyDescriptionMax = 255;
|
|
18
|
-
export const attachPolicyRequestBodyUserIdMax = 255;
|
|
19
|
-
export const AttachPolicyRequestBody = zod.strictObject({
|
|
20
|
-
description: zod
|
|
21
|
-
.string()
|
|
22
|
-
.max(attachPolicyRequestBodyDescriptionMax)
|
|
23
|
-
.optional()
|
|
24
|
-
.describe("Why it was granted, written for a reader"),
|
|
25
|
-
effect: zod.enum(["allow", "deny"]),
|
|
26
|
-
permissions: zod
|
|
27
|
-
.array(zod.string())
|
|
28
|
-
.nullish()
|
|
29
|
-
.describe("Permission names attached directly, which avoids creating a role only one person holds"),
|
|
30
|
-
resources: zod
|
|
31
|
-
.array(ResourceRefResource)
|
|
32
|
-
.nullish()
|
|
33
|
-
.describe("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"),
|
|
34
|
-
roles: zod
|
|
35
|
-
.array(zod.string())
|
|
36
|
-
.nullish()
|
|
37
|
-
.describe("Each must be a role already defined in this project. `OWNER` and `ADMIN` are not accepted, being rules rather than sets of permissions"),
|
|
38
|
-
user_id: zod
|
|
39
|
-
.string()
|
|
40
|
-
.min(1)
|
|
41
|
-
.max(attachPolicyRequestBodyUserIdMax)
|
|
42
|
-
.describe("Must already be a member of this project"),
|
|
43
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by orval 🍺
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
* Leaflow IAM API
|
|
5
|
-
* What happens inside a project: members, roles, invitations and the SSH keys the project shares.
|
|
6
|
-
*
|
|
7
|
-
* Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
|
|
8
|
-
* `projectId`, and the current project is the one the token states. Tokens are obtained from the
|
|
9
|
-
* account API.
|
|
10
|
-
*
|
|
11
|
-
* `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
|
|
12
|
-
* project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
|
|
13
|
-
* OpenAPI spec version: 1.0.0
|
|
14
|
-
*/
|
|
15
|
-
import * as zod from "zod";
|
|
16
|
-
export declare const CatalogListResponseBody: zod.ZodObject<{
|
|
17
|
-
items: zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
18
|
-
permissions: zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
19
|
-
name: zod.ZodString;
|
|
20
|
-
owner_only: zod.ZodBoolean;
|
|
21
|
-
resource_type: zod.ZodString;
|
|
22
|
-
}, zod.z.core.$strict>>>;
|
|
23
|
-
resource_types: zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
24
|
-
name: zod.ZodString;
|
|
25
|
-
}, zod.z.core.$strict>>>;
|
|
26
|
-
service: zod.ZodString;
|
|
27
|
-
}, zod.z.core.$strict>>>;
|
|
28
|
-
}, zod.z.core.$strict>;
|
|
29
|
-
export type CatalogListResponseBody = zod.input<typeof CatalogListResponseBody>;
|
|
30
|
-
export type CatalogListResponseBodyOutput = zod.output<typeof CatalogListResponseBody>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by orval 🍺
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
* Leaflow IAM API
|
|
5
|
-
* What happens inside a project: members, roles, invitations and the SSH keys the project shares.
|
|
6
|
-
*
|
|
7
|
-
* Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
|
|
8
|
-
* `projectId`, and the current project is the one the token states. Tokens are obtained from the
|
|
9
|
-
* account API.
|
|
10
|
-
*
|
|
11
|
-
* `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
|
|
12
|
-
* project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
|
|
13
|
-
* OpenAPI spec version: 1.0.0
|
|
14
|
-
*/
|
|
15
|
-
import * as zod from "zod";
|
|
16
|
-
import { PermissionResource } from "./permissionResource.zod.js";
|
|
17
|
-
import { ResourceTypeResource } from "./resourceTypeResource.zod.js";
|
|
18
|
-
export const CatalogResource = zod.strictObject({
|
|
19
|
-
permissions: zod.array(PermissionResource).nullable(),
|
|
20
|
-
resource_types: zod
|
|
21
|
-
.array(ResourceTypeResource)
|
|
22
|
-
.nullable()
|
|
23
|
-
.describe("The resource types this service declares. A scoped rule can only land on one of them"),
|
|
24
|
-
service: zod.string(),
|
|
25
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by orval 🍺
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
* Leaflow IAM API
|
|
5
|
-
* What happens inside a project: members, roles, invitations and the SSH keys the project shares.
|
|
6
|
-
*
|
|
7
|
-
* Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
|
|
8
|
-
* `projectId`, and the current project is the one the token states. Tokens are obtained from the
|
|
9
|
-
* account API.
|
|
10
|
-
*
|
|
11
|
-
* `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
|
|
12
|
-
* project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
|
|
13
|
-
* OpenAPI spec version: 1.0.0
|
|
14
|
-
*/
|
|
15
|
-
import * as zod from "zod";
|
|
16
|
-
export declare const listPoliciesParamsUserIdMax = 255;
|
|
17
|
-
export declare const ListPoliciesParams: zod.ZodObject<{
|
|
18
|
-
userId: zod.ZodOptional<zod.ZodString>;
|
|
19
|
-
}, zod.z.core.$strict>;
|
|
20
|
-
export type ListPoliciesParams = zod.input<typeof ListPoliciesParams>;
|
|
21
|
-
export type ListPoliciesParamsOutput = zod.output<typeof ListPoliciesParams>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by orval 🍺
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
* Leaflow IAM API
|
|
5
|
-
* What happens inside a project: members, roles, invitations and the SSH keys the project shares.
|
|
6
|
-
*
|
|
7
|
-
* Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
|
|
8
|
-
* `projectId`, and the current project is the one the token states. Tokens are obtained from the
|
|
9
|
-
* account API.
|
|
10
|
-
*
|
|
11
|
-
* `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
|
|
12
|
-
* project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
|
|
13
|
-
* OpenAPI spec version: 1.0.0
|
|
14
|
-
*/
|
|
15
|
-
import * as zod from "zod";
|
|
16
|
-
export const listPoliciesParamsUserIdMax = 255;
|
|
17
|
-
export const ListPoliciesParams = zod.strictObject({
|
|
18
|
-
userId: zod
|
|
19
|
-
.string()
|
|
20
|
-
.max(listPoliciesParamsUserIdMax)
|
|
21
|
-
.optional()
|
|
22
|
-
.describe("Restricts the result to one person. Omitting it covers the whole project"),
|
|
23
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by orval 🍺
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
* Leaflow IAM API
|
|
5
|
-
* What happens inside a project: members, roles, invitations and the SSH keys the project shares.
|
|
6
|
-
*
|
|
7
|
-
* Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
|
|
8
|
-
* `projectId`, and the current project is the one the token states. Tokens are obtained from the
|
|
9
|
-
* account API.
|
|
10
|
-
*
|
|
11
|
-
* `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
|
|
12
|
-
* project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
|
|
13
|
-
* OpenAPI spec version: 1.0.0
|
|
14
|
-
*/
|
|
15
|
-
import * as zod from "zod";
|
|
16
|
-
import { ResourceRefResource } from "./resourceRefResource.zod.js";
|
|
17
|
-
export const PolicyResource = zod.strictObject({
|
|
18
|
-
base: zod
|
|
19
|
-
.boolean()
|
|
20
|
-
.describe("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"),
|
|
21
|
-
created_at: zod.iso.datetime({ offset: true }),
|
|
22
|
-
description: zod.string().describe("Why it was granted, written for a reader"),
|
|
23
|
-
effect: zod.enum(["allow", "deny"]),
|
|
24
|
-
id: zod.uuid(),
|
|
25
|
-
permissions: zod
|
|
26
|
-
.array(zod.string())
|
|
27
|
-
.nullable()
|
|
28
|
-
.describe("Permission names attached directly to this person, without passing through a role"),
|
|
29
|
-
resources: zod.array(ResourceRefResource).nullable().describe("Empty means the whole project"),
|
|
30
|
-
roles: zod.array(zod.string()).nullable().describe("The role codes this policy carries"),
|
|
31
|
-
updated_at: zod.iso.datetime({ offset: true }),
|
|
32
|
-
user_id: zod.string(),
|
|
33
|
-
});
|