@leaflow/sdk 0.118.0 → 0.119.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 +22 -1
- package/dist/iam/v1/generated/functions.js +16 -0
- package/dist/iam/v1/generated/models.d.ts +11 -0
- package/dist/iam/v1/generated/validators/quotaListResponseBody.zod.d.ts +25 -0
- package/dist/iam/v1/generated/validators/quotaListResponseBody.zod.js +19 -0
- package/dist/iam/v1/generated/validators/quotaResource.zod.d.ts +23 -0
- package/dist/iam/v1/generated/validators/quotaResource.zod.js +21 -0
- package/dist/routes.d.ts +8 -0
- package/dist/routes.js +9 -0
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
|
|
13
13
|
* OpenAPI spec version: 1.0.0
|
|
14
14
|
*/
|
|
15
|
-
import type { AttachPolicyRequestBody, BatchGetMembersRequestBody, BatchGetMembersResponseBody, CatalogListResponseBody, CreateRoleRequestBody, CreateSSHKeyRequestBody, Error, IssueInvitationRequestBody, IssuedInvitationResponseBody, LengthAwarePageInvitationResource, LengthAwarePageMemberResource, LengthAwarePageSSHKeyResource, ListMembersParams, ListPoliciesParams, ListProjectInvitationsParams, ListSshKeysParams, MemberResource, MembershipResource, OwnershipTransferResponseBody, PolicyListResponseBody, PolicyResource, ProjectAccessResource, RenameSSHKeyRequestBody, RoleListResponseBody, RoleResource, SSHKeyResource, SetMemberPermissionsRequestBody, SetMemberRolesRequestBody, TransferOwnershipRequestBody, UpdatePolicyRequestBody, UpdateProjectRequestBody, UpdateRoleRequestBody } from "./models.js";
|
|
15
|
+
import type { AttachPolicyRequestBody, BatchGetMembersRequestBody, BatchGetMembersResponseBody, CatalogListResponseBody, CreateRoleRequestBody, CreateSSHKeyRequestBody, Error, IssueInvitationRequestBody, IssuedInvitationResponseBody, LengthAwarePageInvitationResource, LengthAwarePageMemberResource, LengthAwarePageSSHKeyResource, ListMembersParams, ListPoliciesParams, ListProjectInvitationsParams, ListSshKeysParams, MemberResource, MembershipResource, OwnershipTransferResponseBody, PolicyListResponseBody, PolicyResource, ProjectAccessResource, QuotaListResponseBody, RenameSSHKeyRequestBody, RoleListResponseBody, RoleResource, SSHKeyResource, SetMemberPermissionsRequestBody, SetMemberRolesRequestBody, TransferOwnershipRequestBody, UpdatePolicyRequestBody, UpdateProjectRequestBody, UpdateRoleRequestBody } from "./models.js";
|
|
16
16
|
export type HTTPStatusCode1xx = 100 | 101 | 102 | 103;
|
|
17
17
|
export type HTTPStatusCode2xx = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207;
|
|
18
18
|
export type HTTPStatusCode3xx = 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308;
|
|
@@ -123,6 +123,27 @@ export declare const getGetProjectMembershipUrl: () => string;
|
|
|
123
123
|
* @summary Get the caller's standing in this project
|
|
124
124
|
*/
|
|
125
125
|
export declare const getProjectMembership: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getProjectMembershipResponse>;
|
|
126
|
+
export type listQuotasResponse200 = {
|
|
127
|
+
data: QuotaListResponseBody;
|
|
128
|
+
status: 200;
|
|
129
|
+
};
|
|
130
|
+
export type listQuotasResponseDefault = {
|
|
131
|
+
data: Error;
|
|
132
|
+
status: Exclude<HTTPStatusCodes, 200>;
|
|
133
|
+
};
|
|
134
|
+
export type listQuotasResponseSuccess = listQuotasResponse200 & {
|
|
135
|
+
headers: Headers;
|
|
136
|
+
};
|
|
137
|
+
export type listQuotasResponseError = listQuotasResponseDefault & {
|
|
138
|
+
headers: Headers;
|
|
139
|
+
};
|
|
140
|
+
export type listQuotasResponse = listQuotasResponseSuccess | listQuotasResponseError;
|
|
141
|
+
export declare const getListQuotasUrl: () => string;
|
|
142
|
+
/**
|
|
143
|
+
* How much of something this project may have in each service, such as instances or VPCs, with the limit in effect for it. A request that would exceed a limit is refused by the service concerned. Each service shows what the project currently has.
|
|
144
|
+
* @summary List this project's quotas
|
|
145
|
+
*/
|
|
146
|
+
export declare const listQuotas: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listQuotasResponse>;
|
|
126
147
|
export type listProjectInvitationsResponse200 = {
|
|
127
148
|
data: LengthAwarePageInvitationResource;
|
|
128
149
|
status: 200;
|
|
@@ -94,6 +94,22 @@ export const getProjectMembership = async (options, fetchFn) => {
|
|
|
94
94
|
const data = body ? JSON.parse(body) : {};
|
|
95
95
|
return { data, status: res.status, headers: res.headers };
|
|
96
96
|
};
|
|
97
|
+
export const getListQuotasUrl = () => {
|
|
98
|
+
return `https://iam.leaflow.cloud/api/v1/quotas`;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* How much of something this project may have in each service, such as instances or VPCs, with the limit in effect for it. A request that would exceed a limit is refused by the service concerned. Each service shows what the project currently has.
|
|
102
|
+
* @summary List this project's quotas
|
|
103
|
+
*/
|
|
104
|
+
export const listQuotas = async (options, fetchFn) => {
|
|
105
|
+
const res = await (fetchFn ?? fetch)(getListQuotasUrl(), {
|
|
106
|
+
...options,
|
|
107
|
+
method: "GET",
|
|
108
|
+
});
|
|
109
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
110
|
+
const data = body ? JSON.parse(body) : {};
|
|
111
|
+
return { data, status: res.status, headers: res.headers };
|
|
112
|
+
};
|
|
97
113
|
export const getListProjectInvitationsUrl = (params) => {
|
|
98
114
|
const normalizedParams = new URLSearchParams();
|
|
99
115
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -130,6 +130,17 @@ export interface UpdateProjectRequestBody {
|
|
|
130
130
|
/** @maxLength 128 */
|
|
131
131
|
name?: string;
|
|
132
132
|
}
|
|
133
|
+
export interface QuotaResource {
|
|
134
|
+
/** The service enforcing the quota. */
|
|
135
|
+
service: string;
|
|
136
|
+
name: string;
|
|
137
|
+
description: string;
|
|
138
|
+
/** The most this project may have. */
|
|
139
|
+
limit: number;
|
|
140
|
+
}
|
|
141
|
+
export interface QuotaListResponseBody {
|
|
142
|
+
items: QuotaResource[];
|
|
143
|
+
}
|
|
133
144
|
export interface MembershipResource {
|
|
134
145
|
traits: ProjectTraitResource[];
|
|
135
146
|
/** @nullable */
|
|
@@ -0,0 +1,25 @@
|
|
|
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 QuotaListResponseBody: zod.ZodObject<{
|
|
17
|
+
items: zod.ZodArray<zod.ZodObject<{
|
|
18
|
+
service: zod.ZodString;
|
|
19
|
+
name: zod.ZodString;
|
|
20
|
+
description: zod.ZodString;
|
|
21
|
+
limit: zod.ZodInt;
|
|
22
|
+
}, zod.z.core.$strict>>;
|
|
23
|
+
}, zod.z.core.$strict>;
|
|
24
|
+
export type QuotaListResponseBody = zod.input<typeof QuotaListResponseBody>;
|
|
25
|
+
export type QuotaListResponseBodyOutput = zod.output<typeof QuotaListResponseBody>;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
import { QuotaResource } from "./quotaResource.zod.js";
|
|
17
|
+
export const QuotaListResponseBody = zod.strictObject({
|
|
18
|
+
items: zod.array(QuotaResource),
|
|
19
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
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 QuotaResource: zod.ZodObject<{
|
|
17
|
+
service: zod.ZodString;
|
|
18
|
+
name: zod.ZodString;
|
|
19
|
+
description: zod.ZodString;
|
|
20
|
+
limit: zod.ZodInt;
|
|
21
|
+
}, zod.z.core.$strict>;
|
|
22
|
+
export type QuotaResource = zod.input<typeof QuotaResource>;
|
|
23
|
+
export type QuotaResourceOutput = zod.output<typeof QuotaResource>;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 QuotaResource = zod.strictObject({
|
|
17
|
+
service: zod.string().describe("The service enforcing the quota."),
|
|
18
|
+
name: zod.string(),
|
|
19
|
+
description: zod.string(),
|
|
20
|
+
limit: zod.int().describe("The most this project may have."),
|
|
21
|
+
});
|
package/dist/routes.d.ts
CHANGED
|
@@ -2222,6 +2222,14 @@ export declare const routes: readonly [{
|
|
|
2222
2222
|
readonly operationId: "get-project-membership";
|
|
2223
2223
|
readonly securityScheme: "ScopedToken";
|
|
2224
2224
|
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
2225
|
+
}, {
|
|
2226
|
+
readonly service: "iam";
|
|
2227
|
+
readonly contract: "iam";
|
|
2228
|
+
readonly method: "GET";
|
|
2229
|
+
readonly path: "/api/v1/quotas";
|
|
2230
|
+
readonly operationId: "list-quotas";
|
|
2231
|
+
readonly securityScheme: "ScopedToken";
|
|
2232
|
+
readonly upstreamUrl: "https://iam.leaflow.cloud";
|
|
2225
2233
|
}, {
|
|
2226
2234
|
readonly service: "iam";
|
|
2227
2235
|
readonly contract: "iam";
|
package/dist/routes.js
CHANGED
|
@@ -2502,6 +2502,15 @@ export const routes = [
|
|
|
2502
2502
|
securityScheme: "ScopedToken",
|
|
2503
2503
|
upstreamUrl: "https://iam.leaflow.cloud",
|
|
2504
2504
|
},
|
|
2505
|
+
{
|
|
2506
|
+
service: "iam",
|
|
2507
|
+
contract: "iam",
|
|
2508
|
+
method: "GET",
|
|
2509
|
+
path: "/api/v1/quotas",
|
|
2510
|
+
operationId: "list-quotas",
|
|
2511
|
+
securityScheme: "ScopedToken",
|
|
2512
|
+
upstreamUrl: "https://iam.leaflow.cloud",
|
|
2513
|
+
},
|
|
2505
2514
|
{
|
|
2506
2515
|
service: "iam",
|
|
2507
2516
|
contract: "iam",
|