@leaflow/sdk 0.0.0-dev.355.g42152f5 → 0.0.0-dev.357.gf8331d0
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/account/v1/generated/functions.d.ts +85 -1
- package/dist/account/v1/generated/functions.js +65 -0
- package/dist/account/v1/generated/models.d.ts +31 -1
- package/dist/account/v1/generated/models.js +5 -0
- package/dist/account/v1/generated/schemas.zod.d.ts +45 -0
- package/dist/account/v1/generated/schemas.zod.js +45 -1
- package/dist/account/v1/generated/validators/acceptConsentsRequestBody.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/acceptConsentsRequestBody.zod.js +4 -0
- package/dist/account/v1/generated/validators/acceptInvitationByTokenRequestBody.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/acceptInvitationByTokenRequestBody.zod.js +4 -0
- package/dist/account/v1/generated/validators/acceptedInvitationResponseBody.zod.d.ts +5 -0
- package/dist/account/v1/generated/validators/acceptedInvitationResponseBody.zod.js +4 -0
- package/dist/account/v1/generated/validators/accountResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/accountResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/agreementListResponseBody.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/agreementListResponseBody.zod.js +4 -0
- package/dist/account/v1/generated/validators/agreementResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/agreementResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/consentBody.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/consentBody.zod.js +4 -0
- package/dist/account/v1/generated/validators/consentListResponseBody.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/consentListResponseBody.zod.js +4 -0
- package/dist/account/v1/generated/validators/consentResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/consentResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/countryOption.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/countryOption.zod.js +4 -0
- package/dist/account/v1/generated/validators/createProjectRequestBody.zod.d.ts +6 -0
- package/dist/account/v1/generated/validators/createProjectRequestBody.zod.js +10 -0
- package/dist/account/v1/generated/validators/cursorPagination.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/cursorPagination.zod.js +4 -0
- package/dist/account/v1/generated/validators/error.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/error.zod.js +4 -0
- package/dist/account/v1/generated/validators/grantResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/grantResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/identityVerificationResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/identityVerificationResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/invitationPreviewResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/invitationPreviewResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/invitationResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/invitationResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/languageOption.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/languageOption.zod.js +4 -0
- package/dist/account/v1/generated/validators/lengthAwarePageInvitationResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/lengthAwarePageInvitationResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/lengthAwarePageProjectAccessResource.zod.d.ts +5 -0
- package/dist/account/v1/generated/validators/lengthAwarePageProjectAccessResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/listMyInvitationsParams.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/listMyInvitationsParams.zod.js +4 -0
- package/dist/account/v1/generated/validators/listProjectsParams.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/listProjectsParams.zod.js +5 -1
- package/dist/account/v1/generated/validators/locale.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/locale.zod.js +4 -0
- package/dist/account/v1/generated/validators/localeOptionsResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/localeOptionsResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/offsetPagination.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/offsetPagination.zod.js +4 -0
- package/dist/account/v1/generated/validators/previewInvitationByTokenParams.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/previewInvitationByTokenParams.zod.js +4 -0
- package/dist/account/v1/generated/validators/projectAccessResource.zod.d.ts +5 -0
- package/dist/account/v1/generated/validators/projectAccessResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/projectResource.zod.d.ts +6 -0
- package/dist/account/v1/generated/validators/projectResource.zod.js +10 -0
- package/dist/account/v1/generated/validators/projectSlugAvailabilityResource.zod.d.ts +34 -0
- package/dist/account/v1/generated/validators/projectSlugAvailabilityResource.zod.js +30 -0
- package/dist/account/v1/generated/validators/projectTraitResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/projectTraitResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/registerRequestBody.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/registerRequestBody.zod.js +4 -0
- package/dist/account/v1/generated/validators/resourceRefResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/resourceRefResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/ruleResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/ruleResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/scopedTokenResponseBody.zod.d.ts +5 -0
- package/dist/account/v1/generated/validators/scopedTokenResponseBody.zod.js +4 -0
- package/dist/account/v1/generated/validators/settingsResource.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/settingsResource.zod.js +4 -0
- package/dist/account/v1/generated/validators/submitIdentityVerificationRequestBody.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/submitIdentityVerificationRequestBody.zod.js +4 -0
- package/dist/account/v1/generated/validators/updateAccountRequestBody.zod.d.ts +4 -0
- package/dist/account/v1/generated/validators/updateAccountRequestBody.zod.js +4 -0
- package/dist/compute/v1/generated/validators/allocateFloatingIPResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/backupListResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/backupResource.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/createDiskResponseBody.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/createImageResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/diskAttachment.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/diskAttachmentList.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/diskListResponseBody.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/diskResource.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/floatingIPListResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/floatingIPResource.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/imageListResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/imageResource.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/portAddress.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/portAttachment.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/portAttachmentList.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/portListResponseBody.zod.d.ts +3 -3
- package/dist/compute/v1/generated/validators/portResource.zod.d.ts +3 -3
- package/dist/compute/v1/generated/validators/resizeDiskResponseBody.zod.d.ts +2 -2
- package/dist/compute/v1/generated/validators/setFloatingIPBandwidthResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/snapshotListResponseBody.zod.d.ts +1 -1
- package/dist/compute/v1/generated/validators/snapshotResource.zod.d.ts +1 -1
- package/dist/iam/v1/generated/functions.d.ts +31 -1
- package/dist/iam/v1/generated/functions.js +42 -0
- package/dist/iam/v1/generated/models.d.ts +14 -0
- package/dist/iam/v1/generated/schemas.zod.d.ts +16 -0
- package/dist/iam/v1/generated/schemas.zod.js +15 -0
- package/dist/iam/v1/generated/validators/projectAccessResource.zod.d.ts +1 -0
- package/dist/iam/v1/generated/validators/projectResource.zod.d.ts +2 -0
- package/dist/iam/v1/generated/validators/projectResource.zod.js +6 -0
- package/dist/iam/v1/generated/validators/setProjectSlugRequestBody.zod.d.ts +22 -0
- package/dist/iam/v1/generated/validators/setProjectSlugRequestBody.zod.js +24 -0
- package/dist/routes.d.ts +32 -0
- package/dist/routes.js +36 -0
- package/dist/type/resource/v1/generated/validators/attachment.zod.d.ts +1 -1
- package/dist/type/resource/v1/generated/validators/attachmentList.zod.d.ts +1 -1
- package/dist/type/resource/v1/generated/validators/resourceUsage.zod.d.ts +1 -1
- package/dist/type/resource/v1/generated/validators/resourceUsageList.zod.d.ts +1 -1
- package/package.json +1 -1
|
@@ -34,6 +34,7 @@ export const getUpdateProjectUrl = () => {
|
|
|
34
34
|
return `https://iam.leaflow.cloud/api/v1/project`;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
+
* The slug is not affected; it is set through `PUT /api/v1/project/slug`.
|
|
37
38
|
* @summary Update the name and description of a project
|
|
38
39
|
*/
|
|
39
40
|
export const updateProject = async (updateProjectRequestBody, options, fetchFn) => {
|
|
@@ -78,6 +79,47 @@ export const deleteProject = async (options, fetchFn) => {
|
|
|
78
79
|
const data = body ? JSON.parse(body) : {};
|
|
79
80
|
return { data, status: res.status, headers: res.headers };
|
|
80
81
|
};
|
|
82
|
+
export const getSetProjectSlugUrl = () => {
|
|
83
|
+
return `https://iam.leaflow.cloud/api/v1/project/slug`;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Replaces the default slug, which is the project's `id`, with a custom one. Only the owner can do this, and only once: a custom slug cannot be changed or removed afterwards. The address under the `id` keeps working.
|
|
87
|
+
*
|
|
88
|
+
* Setting the slug the project already holds succeeds without change. Fails with:
|
|
89
|
+
*
|
|
90
|
+
* - 400 `PROJECT_SLUG_INVALID` when the slug does not follow the format described on `slug`;
|
|
91
|
+
* - 422 `PROJECT_SLUG_RESERVED` when the name is reserved;
|
|
92
|
+
* - 409 `PROJECT_SLUG_TAKEN` when another project, including a deleted one, holds it;
|
|
93
|
+
* - 412 `PROJECT_SLUG_ALREADY_SET` when the project already holds a different custom slug;
|
|
94
|
+
* - 403 `PROJECT_PERMISSION_DENIED` when the caller is not the owner.
|
|
95
|
+
* @summary Set the custom slug of a project
|
|
96
|
+
*/
|
|
97
|
+
export const setProjectSlug = async (setProjectSlugRequestBody, options, fetchFn) => {
|
|
98
|
+
const getHeaders = (h) => {
|
|
99
|
+
if (!h)
|
|
100
|
+
return {};
|
|
101
|
+
if (h instanceof Headers)
|
|
102
|
+
return Object.fromEntries(h.entries());
|
|
103
|
+
if (Symbol.iterator in h) {
|
|
104
|
+
return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
105
|
+
}
|
|
106
|
+
const headers = {};
|
|
107
|
+
for (const [name, value] of Object.entries(h)) {
|
|
108
|
+
if (value !== undefined)
|
|
109
|
+
headers[name] = value;
|
|
110
|
+
}
|
|
111
|
+
return headers;
|
|
112
|
+
};
|
|
113
|
+
const res = await (fetchFn ?? fetch)(getSetProjectSlugUrl(), {
|
|
114
|
+
...options,
|
|
115
|
+
method: "PUT",
|
|
116
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
117
|
+
body: JSON.stringify(setProjectSlugRequestBody),
|
|
118
|
+
});
|
|
119
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
120
|
+
const data = body ? JSON.parse(body) : {};
|
|
121
|
+
return { data, status: res.status, headers: res.headers };
|
|
122
|
+
};
|
|
81
123
|
export const getGetProjectMembershipUrl = () => {
|
|
82
124
|
return `https://iam.leaflow.cloud/api/v1/membership`;
|
|
83
125
|
};
|
|
@@ -117,6 +117,12 @@ export interface ProjectResource {
|
|
|
117
117
|
deleted_at: string | null;
|
|
118
118
|
description: string;
|
|
119
119
|
id: string;
|
|
120
|
+
/**
|
|
121
|
+
* The label naming the project in its address. It equals `id` until a custom slug is chosen. A custom slug does not change once set, and stays with the project after deletion
|
|
122
|
+
* @minLength 1
|
|
123
|
+
* @maxLength 36
|
|
124
|
+
*/
|
|
125
|
+
slug: string;
|
|
120
126
|
name: string;
|
|
121
127
|
updated_at: string;
|
|
122
128
|
}
|
|
@@ -130,6 +136,14 @@ export interface UpdateProjectRequestBody {
|
|
|
130
136
|
/** @maxLength 128 */
|
|
131
137
|
name?: string;
|
|
132
138
|
}
|
|
139
|
+
export interface SetProjectSlugRequestBody {
|
|
140
|
+
/**
|
|
141
|
+
* 6 to 32 characters made of lower-case letters, digits and single hyphens, beginning with a letter and ending with a letter or digit
|
|
142
|
+
* @minLength 6
|
|
143
|
+
* @maxLength 32
|
|
144
|
+
*/
|
|
145
|
+
slug: string;
|
|
146
|
+
}
|
|
133
147
|
export interface QuotaResource {
|
|
134
148
|
/** The service enforcing the quota. */
|
|
135
149
|
service: string;
|
|
@@ -14,12 +14,28 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import * as zod from "zod";
|
|
16
16
|
/**
|
|
17
|
+
* The slug is not affected; it is set through `PUT /api/v1/project/slug`.
|
|
17
18
|
* @summary Update the name and description of a project
|
|
18
19
|
*/
|
|
19
20
|
export declare const UpdateProjectBody: zod.ZodObject<{
|
|
20
21
|
description: zod.ZodOptional<zod.ZodString>;
|
|
21
22
|
name: zod.ZodOptional<zod.ZodString>;
|
|
22
23
|
}, zod.z.core.$strict>;
|
|
24
|
+
/**
|
|
25
|
+
* Replaces the default slug, which is the project's `id`, with a custom one. Only the owner can do this, and only once: a custom slug cannot be changed or removed afterwards. The address under the `id` keeps working.
|
|
26
|
+
*
|
|
27
|
+
* Setting the slug the project already holds succeeds without change. Fails with:
|
|
28
|
+
*
|
|
29
|
+
* - 400 `PROJECT_SLUG_INVALID` when the slug does not follow the format described on `slug`;
|
|
30
|
+
* - 422 `PROJECT_SLUG_RESERVED` when the name is reserved;
|
|
31
|
+
* - 409 `PROJECT_SLUG_TAKEN` when another project, including a deleted one, holds it;
|
|
32
|
+
* - 412 `PROJECT_SLUG_ALREADY_SET` when the project already holds a different custom slug;
|
|
33
|
+
* - 403 `PROJECT_PERMISSION_DENIED` when the caller is not the owner.
|
|
34
|
+
* @summary Set the custom slug of a project
|
|
35
|
+
*/
|
|
36
|
+
export declare const SetProjectSlugBody: zod.ZodObject<{
|
|
37
|
+
slug: zod.ZodString;
|
|
38
|
+
}, zod.z.core.$strict>;
|
|
23
39
|
/**
|
|
24
40
|
* Visible to any member, on the same rule as the member list. Who has been invited is part of who is in the project.
|
|
25
41
|
* @summary List the invitations this project is still waiting on
|
|
@@ -21,14 +21,29 @@ import { IssueInvitationRequestBody } from "./validators/issueInvitationRequestB
|
|
|
21
21
|
import { RenameSSHKeyRequestBody } from "./validators/renameSSHKeyRequestBody.zod.js";
|
|
22
22
|
import { SetMemberPermissionsRequestBody } from "./validators/setMemberPermissionsRequestBody.zod.js";
|
|
23
23
|
import { SetMemberRolesRequestBody } from "./validators/setMemberRolesRequestBody.zod.js";
|
|
24
|
+
import { SetProjectSlugRequestBody } from "./validators/setProjectSlugRequestBody.zod.js";
|
|
24
25
|
import { TransferOwnershipRequestBody } from "./validators/transferOwnershipRequestBody.zod.js";
|
|
25
26
|
import { UpdatePolicyRequestBody } from "./validators/updatePolicyRequestBody.zod.js";
|
|
26
27
|
import { UpdateProjectRequestBody } from "./validators/updateProjectRequestBody.zod.js";
|
|
27
28
|
import { UpdateRoleRequestBody } from "./validators/updateRoleRequestBody.zod.js";
|
|
28
29
|
/**
|
|
30
|
+
* The slug is not affected; it is set through `PUT /api/v1/project/slug`.
|
|
29
31
|
* @summary Update the name and description of a project
|
|
30
32
|
*/
|
|
31
33
|
export const UpdateProjectBody = UpdateProjectRequestBody;
|
|
34
|
+
/**
|
|
35
|
+
* Replaces the default slug, which is the project's `id`, with a custom one. Only the owner can do this, and only once: a custom slug cannot be changed or removed afterwards. The address under the `id` keeps working.
|
|
36
|
+
*
|
|
37
|
+
* Setting the slug the project already holds succeeds without change. Fails with:
|
|
38
|
+
*
|
|
39
|
+
* - 400 `PROJECT_SLUG_INVALID` when the slug does not follow the format described on `slug`;
|
|
40
|
+
* - 422 `PROJECT_SLUG_RESERVED` when the name is reserved;
|
|
41
|
+
* - 409 `PROJECT_SLUG_TAKEN` when another project, including a deleted one, holds it;
|
|
42
|
+
* - 412 `PROJECT_SLUG_ALREADY_SET` when the project already holds a different custom slug;
|
|
43
|
+
* - 403 `PROJECT_PERMISSION_DENIED` when the caller is not the owner.
|
|
44
|
+
* @summary Set the custom slug of a project
|
|
45
|
+
*/
|
|
46
|
+
export const SetProjectSlugBody = SetProjectSlugRequestBody;
|
|
32
47
|
/**
|
|
33
48
|
* Visible to any member, on the same rule as the member list. Who has been invited is part of who is in the project.
|
|
34
49
|
* @summary List the invitations this project is still waiting on
|
|
@@ -46,6 +46,7 @@ export declare const ProjectAccessResource: zod.ZodObject<{
|
|
|
46
46
|
deleted_at: zod.ZodNullable<zod.z.ZodISODateTime>;
|
|
47
47
|
description: zod.ZodString;
|
|
48
48
|
id: zod.ZodUUID;
|
|
49
|
+
slug: zod.ZodString;
|
|
49
50
|
name: zod.ZodString;
|
|
50
51
|
updated_at: zod.z.ZodISODateTime;
|
|
51
52
|
}, zod.z.core.$strict>;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* OpenAPI spec version: 1.0.0
|
|
14
14
|
*/
|
|
15
15
|
import * as zod from "zod";
|
|
16
|
+
export declare const projectResourceSlugMax = 36;
|
|
16
17
|
export declare const ProjectResource: zod.ZodObject<{
|
|
17
18
|
traits: zod.ZodArray<zod.ZodObject<{
|
|
18
19
|
key: zod.ZodString;
|
|
@@ -29,6 +30,7 @@ export declare const ProjectResource: zod.ZodObject<{
|
|
|
29
30
|
deleted_at: zod.ZodNullable<zod.z.ZodISODateTime>;
|
|
30
31
|
description: zod.ZodString;
|
|
31
32
|
id: zod.ZodUUID;
|
|
33
|
+
slug: zod.ZodString;
|
|
32
34
|
name: zod.ZodString;
|
|
33
35
|
updated_at: zod.z.ZodISODateTime;
|
|
34
36
|
}, zod.z.core.$strict>;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import * as zod from "zod";
|
|
16
16
|
import { ProjectTraitResource } from "./projectTraitResource.zod.js";
|
|
17
|
+
export const projectResourceSlugMax = 36;
|
|
17
18
|
export const ProjectResource = zod.strictObject({
|
|
18
19
|
traits: zod.array(ProjectTraitResource),
|
|
19
20
|
deletion_requested_at: zod.iso.datetime({ offset: true }).nullable(),
|
|
@@ -25,6 +26,11 @@ export const ProjectResource = zod.strictObject({
|
|
|
25
26
|
.describe("When the project was deleted"),
|
|
26
27
|
description: zod.string(),
|
|
27
28
|
id: zod.uuid(),
|
|
29
|
+
slug: zod
|
|
30
|
+
.string()
|
|
31
|
+
.min(1)
|
|
32
|
+
.max(projectResourceSlugMax)
|
|
33
|
+
.describe("The label naming the project in its address. It equals `id` until a custom slug is chosen. A custom slug does not change once set, and stays with the project after deletion"),
|
|
28
34
|
name: zod.string(),
|
|
29
35
|
updated_at: zod.iso.datetime({ offset: true }),
|
|
30
36
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow IAM API
|
|
5
|
+
* What happens inside a project: members, roles, invitations and SSH keys.
|
|
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 setProjectSlugRequestBodySlugMin = 6;
|
|
17
|
+
export declare const setProjectSlugRequestBodySlugMax = 32;
|
|
18
|
+
export declare const SetProjectSlugRequestBody: zod.ZodObject<{
|
|
19
|
+
slug: zod.ZodString;
|
|
20
|
+
}, zod.z.core.$strict>;
|
|
21
|
+
export type SetProjectSlugRequestBody = zod.input<typeof SetProjectSlugRequestBody>;
|
|
22
|
+
export type SetProjectSlugRequestBodyOutput = zod.output<typeof SetProjectSlugRequestBody>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow IAM API
|
|
5
|
+
* What happens inside a project: members, roles, invitations and SSH keys.
|
|
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 setProjectSlugRequestBodySlugMin = 6;
|
|
17
|
+
export const setProjectSlugRequestBodySlugMax = 32;
|
|
18
|
+
export const SetProjectSlugRequestBody = zod.strictObject({
|
|
19
|
+
slug: zod
|
|
20
|
+
.string()
|
|
21
|
+
.min(setProjectSlugRequestBodySlugMin)
|
|
22
|
+
.max(setProjectSlugRequestBodySlugMax)
|
|
23
|
+
.describe("6 to 32 characters made of lower-case letters, digits and single hyphens, beginning with a letter and ending with a letter or digit"),
|
|
24
|
+
});
|
package/dist/routes.d.ts
CHANGED
|
@@ -126,6 +126,30 @@ export declare const routes: readonly [{
|
|
|
126
126
|
readonly operationId: "create-project";
|
|
127
127
|
readonly securityScheme: "AccessToken";
|
|
128
128
|
readonly upstreamUrl: "https://account.leaflow.cloud";
|
|
129
|
+
}, {
|
|
130
|
+
readonly service: "account";
|
|
131
|
+
readonly contract: "account";
|
|
132
|
+
readonly method: "GET";
|
|
133
|
+
readonly path: "/account/v1/projects/by-slug/{slug}";
|
|
134
|
+
readonly operationId: "get-project-by-slug";
|
|
135
|
+
readonly securityScheme: "AccessToken";
|
|
136
|
+
readonly upstreamUrl: "https://account.leaflow.cloud";
|
|
137
|
+
}, {
|
|
138
|
+
readonly service: "account";
|
|
139
|
+
readonly contract: "account";
|
|
140
|
+
readonly method: "GET";
|
|
141
|
+
readonly path: "/account/v1/projects/{projectId}";
|
|
142
|
+
readonly operationId: "get-project";
|
|
143
|
+
readonly securityScheme: "AccessToken";
|
|
144
|
+
readonly upstreamUrl: "https://account.leaflow.cloud";
|
|
145
|
+
}, {
|
|
146
|
+
readonly service: "account";
|
|
147
|
+
readonly contract: "account";
|
|
148
|
+
readonly method: "GET";
|
|
149
|
+
readonly path: "/account/v1/project-slugs/{slug}/availability";
|
|
150
|
+
readonly operationId: "get-project-slug-availability";
|
|
151
|
+
readonly securityScheme: "AccessToken";
|
|
152
|
+
readonly upstreamUrl: "https://account.leaflow.cloud";
|
|
129
153
|
}, {
|
|
130
154
|
readonly service: "account";
|
|
131
155
|
readonly contract: "account";
|
|
@@ -2318,6 +2342,14 @@ export declare const routes: readonly [{
|
|
|
2318
2342
|
readonly operationId: "delete-project";
|
|
2319
2343
|
readonly securityScheme: "ScopedToken";
|
|
2320
2344
|
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
2345
|
+
}, {
|
|
2346
|
+
readonly service: "iam";
|
|
2347
|
+
readonly contract: "iam";
|
|
2348
|
+
readonly method: "PUT";
|
|
2349
|
+
readonly path: "/api/v1/project/slug";
|
|
2350
|
+
readonly operationId: "set-project-slug";
|
|
2351
|
+
readonly securityScheme: "ScopedToken";
|
|
2352
|
+
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
2321
2353
|
}, {
|
|
2322
2354
|
readonly service: "iam";
|
|
2323
2355
|
readonly contract: "iam";
|
package/dist/routes.js
CHANGED
|
@@ -144,6 +144,33 @@ export const routes = [
|
|
|
144
144
|
securityScheme: "AccessToken",
|
|
145
145
|
upstreamUrl: "https://account.leaflow.cloud",
|
|
146
146
|
},
|
|
147
|
+
{
|
|
148
|
+
service: "account",
|
|
149
|
+
contract: "account",
|
|
150
|
+
method: "GET",
|
|
151
|
+
path: "/account/v1/projects/by-slug/{slug}",
|
|
152
|
+
operationId: "get-project-by-slug",
|
|
153
|
+
securityScheme: "AccessToken",
|
|
154
|
+
upstreamUrl: "https://account.leaflow.cloud",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
service: "account",
|
|
158
|
+
contract: "account",
|
|
159
|
+
method: "GET",
|
|
160
|
+
path: "/account/v1/projects/{projectId}",
|
|
161
|
+
operationId: "get-project",
|
|
162
|
+
securityScheme: "AccessToken",
|
|
163
|
+
upstreamUrl: "https://account.leaflow.cloud",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
service: "account",
|
|
167
|
+
contract: "account",
|
|
168
|
+
method: "GET",
|
|
169
|
+
path: "/account/v1/project-slugs/{slug}/availability",
|
|
170
|
+
operationId: "get-project-slug-availability",
|
|
171
|
+
securityScheme: "AccessToken",
|
|
172
|
+
upstreamUrl: "https://account.leaflow.cloud",
|
|
173
|
+
},
|
|
147
174
|
{
|
|
148
175
|
service: "account",
|
|
149
176
|
contract: "account",
|
|
@@ -2610,6 +2637,15 @@ export const routes = [
|
|
|
2610
2637
|
securityScheme: "ScopedToken",
|
|
2611
2638
|
upstreamUrl: "https://iam.leaflow.cloud",
|
|
2612
2639
|
},
|
|
2640
|
+
{
|
|
2641
|
+
service: "iam",
|
|
2642
|
+
contract: "iam",
|
|
2643
|
+
method: "PUT",
|
|
2644
|
+
path: "/api/v1/project/slug",
|
|
2645
|
+
operationId: "set-project-slug",
|
|
2646
|
+
securityScheme: "ScopedToken",
|
|
2647
|
+
upstreamUrl: "https://iam.leaflow.cloud",
|
|
2648
|
+
},
|
|
2613
2649
|
{
|
|
2614
2650
|
service: "iam",
|
|
2615
2651
|
contract: "iam",
|
|
@@ -20,8 +20,8 @@ export declare const Attachment: zod.ZodObject<{
|
|
|
20
20
|
id: zod.ZodUUID;
|
|
21
21
|
}, zod.z.core.$strict>;
|
|
22
22
|
state: zod.ZodEnum<{
|
|
23
|
-
unknown: "unknown";
|
|
24
23
|
reserved: "reserved";
|
|
24
|
+
unknown: "unknown";
|
|
25
25
|
attached: "attached";
|
|
26
26
|
attaching: "attaching";
|
|
27
27
|
detaching: "detaching";
|
|
@@ -21,8 +21,8 @@ export declare const AttachmentList: zod.ZodObject<{
|
|
|
21
21
|
id: zod.ZodUUID;
|
|
22
22
|
}, zod.z.core.$strict>;
|
|
23
23
|
state: zod.ZodEnum<{
|
|
24
|
-
unknown: "unknown";
|
|
25
24
|
reserved: "reserved";
|
|
25
|
+
unknown: "unknown";
|
|
26
26
|
attached: "attached";
|
|
27
27
|
attaching: "attaching";
|
|
28
28
|
detaching: "detaching";
|
|
@@ -23,9 +23,9 @@ export declare const ResourceUsage: zod.ZodObject<{
|
|
|
23
23
|
}, zod.z.core.$strict>;
|
|
24
24
|
purpose: zod.ZodString;
|
|
25
25
|
state: zod.ZodEnum<{
|
|
26
|
+
reserved: "reserved";
|
|
26
27
|
active: "active";
|
|
27
28
|
releasing: "releasing";
|
|
28
|
-
reserved: "reserved";
|
|
29
29
|
released: "released";
|
|
30
30
|
}>;
|
|
31
31
|
generation: zod.ZodInt;
|
|
@@ -22,9 +22,9 @@ export declare const ResourceUsageList: zod.ZodObject<{
|
|
|
22
22
|
}, zod.z.core.$strict>;
|
|
23
23
|
purpose: zod.ZodString;
|
|
24
24
|
state: zod.ZodEnum<{
|
|
25
|
+
reserved: "reserved";
|
|
25
26
|
active: "active";
|
|
26
27
|
releasing: "releasing";
|
|
27
|
-
reserved: "reserved";
|
|
28
28
|
released: "released";
|
|
29
29
|
}>;
|
|
30
30
|
generation: zod.ZodInt;
|