@blimu/backend 1.1.3 → 1.2.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/client-B-ZYoU15.d.mts +95 -0
- package/dist/client-GKBT3WCg.d.ts +95 -0
- package/dist/client.d.mts +1 -30
- package/dist/client.d.ts +1 -30
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +469 -13
- package/dist/index.d.ts +469 -13
- package/package.json +2 -2
- package/dist/__tests__/token-verifier.test.cjs +0 -17662
- package/dist/__tests__/token-verifier.test.cjs.map +0 -1
- package/dist/__tests__/token-verifier.test.d.mts +0 -2
- package/dist/__tests__/token-verifier.test.d.ts +0 -2
- package/dist/__tests__/token-verifier.test.mjs +0 -17661
- package/dist/__tests__/token-verifier.test.mjs.map +0 -1
- package/dist/auth-strategies.cjs +0 -42
- package/dist/auth-strategies.cjs.map +0 -1
- package/dist/auth-strategies.d.mts +0 -16
- package/dist/auth-strategies.d.ts +0 -16
- package/dist/auth-strategies.mjs +0 -17
- package/dist/auth-strategies.mjs.map +0 -1
- package/dist/schema.zod-DtXVS-1g.d.mts +0 -434
- package/dist/schema.zod-DtXVS-1g.d.ts +0 -434
- package/dist/schema.zod.cjs +0 -489
- package/dist/schema.zod.cjs.map +0 -1
- package/dist/schema.zod.d.mts +0 -2
- package/dist/schema.zod.d.ts +0 -2
- package/dist/schema.zod.mjs +0 -427
- package/dist/schema.zod.mjs.map +0 -1
- package/dist/services/bulk_resources.cjs +0 -48
- package/dist/services/bulk_resources.cjs.map +0 -1
- package/dist/services/bulk_resources.d.mts +0 -10
- package/dist/services/bulk_resources.d.ts +0 -10
- package/dist/services/bulk_resources.mjs +0 -23
- package/dist/services/bulk_resources.mjs.map +0 -1
- package/dist/services/bulk_roles.cjs +0 -48
- package/dist/services/bulk_roles.cjs.map +0 -1
- package/dist/services/bulk_roles.d.mts +0 -10
- package/dist/services/bulk_roles.d.ts +0 -10
- package/dist/services/bulk_roles.mjs +0 -23
- package/dist/services/bulk_roles.mjs.map +0 -1
- package/dist/services/entitlements.cjs +0 -72
- package/dist/services/entitlements.cjs.map +0 -1
- package/dist/services/entitlements.d.mts +0 -12
- package/dist/services/entitlements.d.ts +0 -12
- package/dist/services/entitlements.mjs +0 -47
- package/dist/services/entitlements.mjs.map +0 -1
- package/dist/services/plans.cjs +0 -70
- package/dist/services/plans.cjs.map +0 -1
- package/dist/services/plans.d.mts +0 -12
- package/dist/services/plans.d.ts +0 -12
- package/dist/services/plans.mjs +0 -45
- package/dist/services/plans.mjs.map +0 -1
- package/dist/services/resource_members.cjs +0 -48
- package/dist/services/resource_members.cjs.map +0 -1
- package/dist/services/resource_members.d.mts +0 -10
- package/dist/services/resource_members.d.ts +0 -10
- package/dist/services/resource_members.mjs +0 -23
- package/dist/services/resource_members.mjs.map +0 -1
- package/dist/services/resources.cjs +0 -94
- package/dist/services/resources.cjs.map +0 -1
- package/dist/services/resources.d.mts +0 -14
- package/dist/services/resources.d.ts +0 -14
- package/dist/services/resources.mjs +0 -69
- package/dist/services/resources.mjs.map +0 -1
- package/dist/services/roles.cjs +0 -71
- package/dist/services/roles.cjs.map +0 -1
- package/dist/services/roles.d.mts +0 -12
- package/dist/services/roles.d.ts +0 -12
- package/dist/services/roles.mjs +0 -46
- package/dist/services/roles.mjs.map +0 -1
- package/dist/services/usage.cjs +0 -96
- package/dist/services/usage.cjs.map +0 -1
- package/dist/services/usage.d.mts +0 -14
- package/dist/services/usage.d.ts +0 -14
- package/dist/services/usage.mjs +0 -71
- package/dist/services/usage.mjs.map +0 -1
- package/dist/services/users.cjs +0 -105
- package/dist/services/users.cjs.map +0 -1
- package/dist/services/users.d.mts +0 -15
- package/dist/services/users.d.ts +0 -15
- package/dist/services/users.mjs +0 -80
- package/dist/services/users.mjs.map +0 -1
- package/dist/token-verifier.cjs +0 -218
- package/dist/token-verifier.cjs.map +0 -1
- package/dist/token-verifier.d.mts +0 -35
- package/dist/token-verifier.d.ts +0 -35
- package/dist/token-verifier.mjs +0 -180
- package/dist/token-verifier.mjs.map +0 -1
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// src/services/bulk_roles.ts
|
|
2
|
-
import "@blimu/fetch";
|
|
3
|
-
var BulkRolesService = class {
|
|
4
|
-
constructor(core) {
|
|
5
|
-
this.core = core;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* POST /v1/users/roles/bulk*
|
|
9
|
-
* @summary Bulk create roles*
|
|
10
|
-
* @description Assigns multiple roles to users on resources in a single request. This operation supports partial success - some role assignments may succeed while others fail. The response includes details about successful assignments and any errors encountered. All roles must be valid according to your resource definitions.*/
|
|
11
|
-
create(body, init) {
|
|
12
|
-
return this.core.request({
|
|
13
|
-
method: "POST",
|
|
14
|
-
path: `/v1/users/roles/bulk`,
|
|
15
|
-
body,
|
|
16
|
-
...init ?? {}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
BulkRolesService
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=bulk_roles.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/bulk_roles.ts"],"sourcesContent":["import { FetchClient } from '@blimu/fetch';\nimport * as Schema from '../schema';\n\nexport class BulkRolesService {\n constructor(private core: FetchClient) {}\n\n /**\n * POST /v1/users/roles/bulk*\n * @summary Bulk create roles*\n * @description Assigns multiple roles to users on resources in a single request. This operation supports partial success - some role assignments may succeed while others fail. The response includes details about successful assignments and any errors encountered. All roles must be valid according to your resource definitions.*/\n create(\n body: Schema.RoleBulkCreateBody,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.RoleBulkResult> {\n return this.core.request({\n method: 'POST',\n path: `/v1/users/roles/bulk`,\n body,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";AAAA,OAA4B;AAGrB,IAAM,mBAAN,MAAuB;AAAA,EAC5B,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,OACE,MACA,MACgC;AAChC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM;AAAA,MACN;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/services/entitlements.ts
|
|
21
|
-
var entitlements_exports = {};
|
|
22
|
-
__export(entitlements_exports, {
|
|
23
|
-
EntitlementsService: () => EntitlementsService
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(entitlements_exports);
|
|
26
|
-
var import_fetch = require("@blimu/fetch");
|
|
27
|
-
var EntitlementsService = class {
|
|
28
|
-
constructor(core) {
|
|
29
|
-
this.core = core;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* POST /v1/entitlements/check*
|
|
33
|
-
* @summary Check if a user has a specific entitlement on a resource*
|
|
34
|
-
* @description Checks whether a user has permission to perform a specific action (entitlement) on a resource. This endpoint evaluates role-based access, plan gating, and usage limits. The response includes detailed information about why access was granted or denied, including which roles were checked, plan requirements, and usage limit status.*/
|
|
35
|
-
checkEntitlement(body, init) {
|
|
36
|
-
return this.core.request({
|
|
37
|
-
method: "POST",
|
|
38
|
-
path: `/v1/entitlements/check`,
|
|
39
|
-
body,
|
|
40
|
-
...init ?? {}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* GET /v1/entitlements/list-for-resource/{resourceType}/{resourceId}*
|
|
45
|
-
* @summary List entitlements for a specific resource*
|
|
46
|
-
* @description Returns entitlements for a specific resource and user. Only evaluates roles and plans (excludes limits). Provides detailed information about why entitlements are allowed or denied, including current roles, allowed roles, current plan, and allowed plans. Results are cached per resource for performance.*/
|
|
47
|
-
listForResource(resourceType, resourceId, query, init) {
|
|
48
|
-
return this.core.request({
|
|
49
|
-
method: "GET",
|
|
50
|
-
path: `/v1/entitlements/list-for-resource/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,
|
|
51
|
-
query,
|
|
52
|
-
...init ?? {}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* GET /v1/entitlements/list-for-tenant/{tenantResourceId}*
|
|
57
|
-
* @summary List entitlements for a tenant and all its sub-resources*
|
|
58
|
-
* @description Returns entitlements for a tenant resource and all its descendant resources. This endpoint scopes queries to a single tenant, preventing cross-tenant data access. Only evaluates roles and plans (excludes limits). Results are cached per resource for performance. The tenant resource type is automatically determined from the environment definition (resource marked as `is_tenant: true`).*/
|
|
59
|
-
listForTenant(tenantResourceId, query, init) {
|
|
60
|
-
return this.core.request({
|
|
61
|
-
method: "GET",
|
|
62
|
-
path: `/v1/entitlements/list-for-tenant/${encodeURIComponent(tenantResourceId)}`,
|
|
63
|
-
query,
|
|
64
|
-
...init ?? {}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
-
0 && (module.exports = {
|
|
70
|
-
EntitlementsService
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=entitlements.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/entitlements.ts"],"sourcesContent":["import { FetchClient } from '@blimu/fetch';\nimport * as Schema from '../schema';\n\nexport class EntitlementsService {\n constructor(private core: FetchClient) {}\n\n /**\n * POST /v1/entitlements/check*\n * @summary Check if a user has a specific entitlement on a resource*\n * @description Checks whether a user has permission to perform a specific action (entitlement) on a resource. This endpoint evaluates role-based access, plan gating, and usage limits. The response includes detailed information about why access was granted or denied, including which roles were checked, plan requirements, and usage limit status.*/\n checkEntitlement(\n body: Schema.EntitlementCheckBody,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.EntitlementCheckResult> {\n return this.core.request({\n method: 'POST',\n path: `/v1/entitlements/check`,\n body,\n ...(init ?? {}),\n });\n }\n\n /**\n * GET /v1/entitlements/list-for-resource/{resourceType}/{resourceId}*\n * @summary List entitlements for a specific resource*\n * @description Returns entitlements for a specific resource and user. Only evaluates roles and plans (excludes limits). Provides detailed information about why entitlements are allowed or denied, including current roles, allowed roles, current plan, and allowed plans. Results are cached per resource for performance.*/\n listForResource(\n resourceType: string,\n resourceId: string,\n query?: Schema.EntitlementsListForResourceQuery,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.EntitlementsListResult> {\n return this.core.request({\n method: 'GET',\n path: `/v1/entitlements/list-for-resource/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,\n query,\n ...(init ?? {}),\n });\n }\n\n /**\n * GET /v1/entitlements/list-for-tenant/{tenantResourceId}*\n * @summary List entitlements for a tenant and all its sub-resources*\n * @description Returns entitlements for a tenant resource and all its descendant resources. This endpoint scopes queries to a single tenant, preventing cross-tenant data access. Only evaluates roles and plans (excludes limits). Results are cached per resource for performance. The tenant resource type is automatically determined from the environment definition (resource marked as `is_tenant: true`).*/\n listForTenant(\n tenantResourceId: string,\n query?: Schema.EntitlementsListForTenantQuery,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.EntitlementsListResult> {\n return this.core.request({\n method: 'GET',\n path: `/v1/entitlements/list-for-tenant/${encodeURIComponent(tenantResourceId)}`,\n query,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4B;AAGrB,IAAM,sBAAN,MAA0B;AAAA,EAC/B,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,iBACE,MACA,MACwC;AACxC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM;AAAA,MACN;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBACE,cACA,YACA,OACA,MACwC;AACxC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,sCAAsC,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MAC9G;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,cACE,kBACA,OACA,MACwC;AACxC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,oCAAoC,mBAAmB,gBAAgB,CAAC;AAAA,MAC9E;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { E as EntitlementCheckBody, d as EntitlementCheckResult, e as EntitlementsListForResourceQuery, f as EntitlementsListResult, g as EntitlementsListForTenantQuery } from '../schema-BbKn_i-U.mjs';
|
|
3
|
-
|
|
4
|
-
declare class EntitlementsService {
|
|
5
|
-
private core;
|
|
6
|
-
constructor(core: FetchClient);
|
|
7
|
-
checkEntitlement(body: EntitlementCheckBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementCheckResult>;
|
|
8
|
-
listForResource(resourceType: string, resourceId: string, query?: EntitlementsListForResourceQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementsListResult>;
|
|
9
|
-
listForTenant(tenantResourceId: string, query?: EntitlementsListForTenantQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementsListResult>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { EntitlementsService };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { E as EntitlementCheckBody, d as EntitlementCheckResult, e as EntitlementsListForResourceQuery, f as EntitlementsListResult, g as EntitlementsListForTenantQuery } from '../schema-BbKn_i-U.js';
|
|
3
|
-
|
|
4
|
-
declare class EntitlementsService {
|
|
5
|
-
private core;
|
|
6
|
-
constructor(core: FetchClient);
|
|
7
|
-
checkEntitlement(body: EntitlementCheckBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementCheckResult>;
|
|
8
|
-
listForResource(resourceType: string, resourceId: string, query?: EntitlementsListForResourceQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementsListResult>;
|
|
9
|
-
listForTenant(tenantResourceId: string, query?: EntitlementsListForTenantQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementsListResult>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { EntitlementsService };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// src/services/entitlements.ts
|
|
2
|
-
import "@blimu/fetch";
|
|
3
|
-
var EntitlementsService = class {
|
|
4
|
-
constructor(core) {
|
|
5
|
-
this.core = core;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* POST /v1/entitlements/check*
|
|
9
|
-
* @summary Check if a user has a specific entitlement on a resource*
|
|
10
|
-
* @description Checks whether a user has permission to perform a specific action (entitlement) on a resource. This endpoint evaluates role-based access, plan gating, and usage limits. The response includes detailed information about why access was granted or denied, including which roles were checked, plan requirements, and usage limit status.*/
|
|
11
|
-
checkEntitlement(body, init) {
|
|
12
|
-
return this.core.request({
|
|
13
|
-
method: "POST",
|
|
14
|
-
path: `/v1/entitlements/check`,
|
|
15
|
-
body,
|
|
16
|
-
...init ?? {}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* GET /v1/entitlements/list-for-resource/{resourceType}/{resourceId}*
|
|
21
|
-
* @summary List entitlements for a specific resource*
|
|
22
|
-
* @description Returns entitlements for a specific resource and user. Only evaluates roles and plans (excludes limits). Provides detailed information about why entitlements are allowed or denied, including current roles, allowed roles, current plan, and allowed plans. Results are cached per resource for performance.*/
|
|
23
|
-
listForResource(resourceType, resourceId, query, init) {
|
|
24
|
-
return this.core.request({
|
|
25
|
-
method: "GET",
|
|
26
|
-
path: `/v1/entitlements/list-for-resource/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,
|
|
27
|
-
query,
|
|
28
|
-
...init ?? {}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* GET /v1/entitlements/list-for-tenant/{tenantResourceId}*
|
|
33
|
-
* @summary List entitlements for a tenant and all its sub-resources*
|
|
34
|
-
* @description Returns entitlements for a tenant resource and all its descendant resources. This endpoint scopes queries to a single tenant, preventing cross-tenant data access. Only evaluates roles and plans (excludes limits). Results are cached per resource for performance. The tenant resource type is automatically determined from the environment definition (resource marked as `is_tenant: true`).*/
|
|
35
|
-
listForTenant(tenantResourceId, query, init) {
|
|
36
|
-
return this.core.request({
|
|
37
|
-
method: "GET",
|
|
38
|
-
path: `/v1/entitlements/list-for-tenant/${encodeURIComponent(tenantResourceId)}`,
|
|
39
|
-
query,
|
|
40
|
-
...init ?? {}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
export {
|
|
45
|
-
EntitlementsService
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=entitlements.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/entitlements.ts"],"sourcesContent":["import { FetchClient } from '@blimu/fetch';\nimport * as Schema from '../schema';\n\nexport class EntitlementsService {\n constructor(private core: FetchClient) {}\n\n /**\n * POST /v1/entitlements/check*\n * @summary Check if a user has a specific entitlement on a resource*\n * @description Checks whether a user has permission to perform a specific action (entitlement) on a resource. This endpoint evaluates role-based access, plan gating, and usage limits. The response includes detailed information about why access was granted or denied, including which roles were checked, plan requirements, and usage limit status.*/\n checkEntitlement(\n body: Schema.EntitlementCheckBody,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.EntitlementCheckResult> {\n return this.core.request({\n method: 'POST',\n path: `/v1/entitlements/check`,\n body,\n ...(init ?? {}),\n });\n }\n\n /**\n * GET /v1/entitlements/list-for-resource/{resourceType}/{resourceId}*\n * @summary List entitlements for a specific resource*\n * @description Returns entitlements for a specific resource and user. Only evaluates roles and plans (excludes limits). Provides detailed information about why entitlements are allowed or denied, including current roles, allowed roles, current plan, and allowed plans. Results are cached per resource for performance.*/\n listForResource(\n resourceType: string,\n resourceId: string,\n query?: Schema.EntitlementsListForResourceQuery,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.EntitlementsListResult> {\n return this.core.request({\n method: 'GET',\n path: `/v1/entitlements/list-for-resource/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,\n query,\n ...(init ?? {}),\n });\n }\n\n /**\n * GET /v1/entitlements/list-for-tenant/{tenantResourceId}*\n * @summary List entitlements for a tenant and all its sub-resources*\n * @description Returns entitlements for a tenant resource and all its descendant resources. This endpoint scopes queries to a single tenant, preventing cross-tenant data access. Only evaluates roles and plans (excludes limits). Results are cached per resource for performance. The tenant resource type is automatically determined from the environment definition (resource marked as `is_tenant: true`).*/\n listForTenant(\n tenantResourceId: string,\n query?: Schema.EntitlementsListForTenantQuery,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.EntitlementsListResult> {\n return this.core.request({\n method: 'GET',\n path: `/v1/entitlements/list-for-tenant/${encodeURIComponent(tenantResourceId)}`,\n query,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";AAAA,OAA4B;AAGrB,IAAM,sBAAN,MAA0B;AAAA,EAC/B,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,iBACE,MACA,MACwC;AACxC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM;AAAA,MACN;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBACE,cACA,YACA,OACA,MACwC;AACxC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,sCAAsC,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MAC9G;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,cACE,kBACA,OACA,MACwC;AACxC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,oCAAoC,mBAAmB,gBAAgB,CAAC;AAAA,MAC9E;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AACF;","names":[]}
|
package/dist/services/plans.cjs
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/services/plans.ts
|
|
21
|
-
var plans_exports = {};
|
|
22
|
-
__export(plans_exports, {
|
|
23
|
-
PlansService: () => PlansService
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(plans_exports);
|
|
26
|
-
var import_fetch = require("@blimu/fetch");
|
|
27
|
-
var PlansService = class {
|
|
28
|
-
constructor(core) {
|
|
29
|
-
this.core = core;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* DELETE /v1/resources/{resourceType}/{resourceId}/plan*
|
|
33
|
-
* @summary Remove plan assignment from a tenant resource*
|
|
34
|
-
* @description Removes the billing plan assignment from a tenant resource. After removal, the resource will have no plan and will be subject to default limits.*/
|
|
35
|
-
delete(resourceType, resourceId, init) {
|
|
36
|
-
return this.core.request({
|
|
37
|
-
method: "DELETE",
|
|
38
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,
|
|
39
|
-
...init ?? {}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* GET /v1/resources/{resourceType}/{resourceId}/plan*
|
|
44
|
-
* @summary Get the plan assigned to a tenant resource*
|
|
45
|
-
* @description Retrieves the billing plan currently assigned to a tenant resource, if any.*/
|
|
46
|
-
read(resourceType, resourceId, init) {
|
|
47
|
-
return this.core.request({
|
|
48
|
-
method: "GET",
|
|
49
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,
|
|
50
|
-
...init ?? {}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* POST /v1/resources/{resourceType}/{resourceId}/plan*
|
|
55
|
-
* @summary Assign a plan to a tenant resource*
|
|
56
|
-
* @description Assigns a billing plan to a tenant resource. Plans control feature access and usage limits based on your plan definitions. The resource must be marked as a tenant in your resource definitions.*/
|
|
57
|
-
assign(resourceType, resourceId, body, init) {
|
|
58
|
-
return this.core.request({
|
|
59
|
-
method: "POST",
|
|
60
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,
|
|
61
|
-
body,
|
|
62
|
-
...init ?? {}
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
-
0 && (module.exports = {
|
|
68
|
-
PlansService
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=plans.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/plans.ts"],"sourcesContent":["import { FetchClient } from '@blimu/fetch';\nimport * as Schema from '../schema';\n\nexport class PlansService {\n constructor(private core: FetchClient) {}\n\n /**\n * DELETE /v1/resources/{resourceType}/{resourceId}/plan*\n * @summary Remove plan assignment from a tenant resource*\n * @description Removes the billing plan assignment from a tenant resource. After removal, the resource will have no plan and will be subject to default limits.*/\n delete(\n resourceType: string,\n resourceId: string,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.PlanDeleteResponse> {\n return this.core.request({\n method: 'DELETE',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,\n ...(init ?? {}),\n });\n }\n\n /**\n * GET /v1/resources/{resourceType}/{resourceId}/plan*\n * @summary Get the plan assigned to a tenant resource*\n * @description Retrieves the billing plan currently assigned to a tenant resource, if any.*/\n read(\n resourceType: string,\n resourceId: string,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.PlanResponse> {\n return this.core.request({\n method: 'GET',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,\n ...(init ?? {}),\n });\n }\n\n /**\n * POST /v1/resources/{resourceType}/{resourceId}/plan*\n * @summary Assign a plan to a tenant resource*\n * @description Assigns a billing plan to a tenant resource. Plans control feature access and usage limits based on your plan definitions. The resource must be marked as a tenant in your resource definitions.*/\n assign(\n resourceType: string,\n resourceId: string,\n body: Schema.PlanAssignBody,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<unknown> {\n return this.core.request({\n method: 'POST',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,\n body,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4B;AAGrB,IAAM,eAAN,MAAmB;AAAA,EACxB,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,OACE,cACA,YACA,MACoC;AACpC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACzF,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,KACE,cACA,YACA,MAC8B;AAC9B,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACzF,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OACE,cACA,YACA,MACA,MACkB;AAClB,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACzF;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { P as PlanDeleteResponse, h as PlanResponse, i as PlanAssignBody } from '../schema-BbKn_i-U.mjs';
|
|
3
|
-
|
|
4
|
-
declare class PlansService {
|
|
5
|
-
private core;
|
|
6
|
-
constructor(core: FetchClient);
|
|
7
|
-
delete(resourceType: string, resourceId: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<PlanDeleteResponse>;
|
|
8
|
-
read(resourceType: string, resourceId: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<PlanResponse>;
|
|
9
|
-
assign(resourceType: string, resourceId: string, body: PlanAssignBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { PlansService };
|
package/dist/services/plans.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { P as PlanDeleteResponse, h as PlanResponse, i as PlanAssignBody } from '../schema-BbKn_i-U.js';
|
|
3
|
-
|
|
4
|
-
declare class PlansService {
|
|
5
|
-
private core;
|
|
6
|
-
constructor(core: FetchClient);
|
|
7
|
-
delete(resourceType: string, resourceId: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<PlanDeleteResponse>;
|
|
8
|
-
read(resourceType: string, resourceId: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<PlanResponse>;
|
|
9
|
-
assign(resourceType: string, resourceId: string, body: PlanAssignBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { PlansService };
|
package/dist/services/plans.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// src/services/plans.ts
|
|
2
|
-
import "@blimu/fetch";
|
|
3
|
-
var PlansService = class {
|
|
4
|
-
constructor(core) {
|
|
5
|
-
this.core = core;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* DELETE /v1/resources/{resourceType}/{resourceId}/plan*
|
|
9
|
-
* @summary Remove plan assignment from a tenant resource*
|
|
10
|
-
* @description Removes the billing plan assignment from a tenant resource. After removal, the resource will have no plan and will be subject to default limits.*/
|
|
11
|
-
delete(resourceType, resourceId, init) {
|
|
12
|
-
return this.core.request({
|
|
13
|
-
method: "DELETE",
|
|
14
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,
|
|
15
|
-
...init ?? {}
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* GET /v1/resources/{resourceType}/{resourceId}/plan*
|
|
20
|
-
* @summary Get the plan assigned to a tenant resource*
|
|
21
|
-
* @description Retrieves the billing plan currently assigned to a tenant resource, if any.*/
|
|
22
|
-
read(resourceType, resourceId, init) {
|
|
23
|
-
return this.core.request({
|
|
24
|
-
method: "GET",
|
|
25
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,
|
|
26
|
-
...init ?? {}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* POST /v1/resources/{resourceType}/{resourceId}/plan*
|
|
31
|
-
* @summary Assign a plan to a tenant resource*
|
|
32
|
-
* @description Assigns a billing plan to a tenant resource. Plans control feature access and usage limits based on your plan definitions. The resource must be marked as a tenant in your resource definitions.*/
|
|
33
|
-
assign(resourceType, resourceId, body, init) {
|
|
34
|
-
return this.core.request({
|
|
35
|
-
method: "POST",
|
|
36
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,
|
|
37
|
-
body,
|
|
38
|
-
...init ?? {}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
PlansService
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=plans.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/plans.ts"],"sourcesContent":["import { FetchClient } from '@blimu/fetch';\nimport * as Schema from '../schema';\n\nexport class PlansService {\n constructor(private core: FetchClient) {}\n\n /**\n * DELETE /v1/resources/{resourceType}/{resourceId}/plan*\n * @summary Remove plan assignment from a tenant resource*\n * @description Removes the billing plan assignment from a tenant resource. After removal, the resource will have no plan and will be subject to default limits.*/\n delete(\n resourceType: string,\n resourceId: string,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.PlanDeleteResponse> {\n return this.core.request({\n method: 'DELETE',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,\n ...(init ?? {}),\n });\n }\n\n /**\n * GET /v1/resources/{resourceType}/{resourceId}/plan*\n * @summary Get the plan assigned to a tenant resource*\n * @description Retrieves the billing plan currently assigned to a tenant resource, if any.*/\n read(\n resourceType: string,\n resourceId: string,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.PlanResponse> {\n return this.core.request({\n method: 'GET',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,\n ...(init ?? {}),\n });\n }\n\n /**\n * POST /v1/resources/{resourceType}/{resourceId}/plan*\n * @summary Assign a plan to a tenant resource*\n * @description Assigns a billing plan to a tenant resource. Plans control feature access and usage limits based on your plan definitions. The resource must be marked as a tenant in your resource definitions.*/\n assign(\n resourceType: string,\n resourceId: string,\n body: Schema.PlanAssignBody,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<unknown> {\n return this.core.request({\n method: 'POST',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/plan`,\n body,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";AAAA,OAA4B;AAGrB,IAAM,eAAN,MAAmB;AAAA,EACxB,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,OACE,cACA,YACA,MACoC;AACpC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACzF,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,KACE,cACA,YACA,MAC8B;AAC9B,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACzF,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OACE,cACA,YACA,MACA,MACkB;AAClB,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACzF;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/services/resource_members.ts
|
|
21
|
-
var resource_members_exports = {};
|
|
22
|
-
__export(resource_members_exports, {
|
|
23
|
-
ResourceMembersService: () => ResourceMembersService
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(resource_members_exports);
|
|
26
|
-
var import_fetch = require("@blimu/fetch");
|
|
27
|
-
var ResourceMembersService = class {
|
|
28
|
-
constructor(core) {
|
|
29
|
-
this.core = core;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* GET /v1/resources/{resourceType}/{resourceId}/members*
|
|
33
|
-
* @summary List members for a resource*
|
|
34
|
-
* @description Retrieves a paginated list of users who have roles (direct or inherited) on the specified resource. Supports search functionality to filter users by email or name.*/
|
|
35
|
-
list(resourceType, resourceId, query, init) {
|
|
36
|
-
return this.core.request({
|
|
37
|
-
method: "GET",
|
|
38
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/members`,
|
|
39
|
-
query,
|
|
40
|
-
...init ?? {}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
45
|
-
0 && (module.exports = {
|
|
46
|
-
ResourceMembersService
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=resource_members.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/resource_members.ts"],"sourcesContent":["import { FetchClient } from '@blimu/fetch';\nimport * as Schema from '../schema';\n\nexport class ResourceMembersService {\n constructor(private core: FetchClient) {}\n\n /**\n * GET /v1/resources/{resourceType}/{resourceId}/members*\n * @summary List members for a resource*\n * @description Retrieves a paginated list of users who have roles (direct or inherited) on the specified resource. Supports search functionality to filter users by email or name.*/\n list(\n resourceType: string,\n resourceId: string,\n query?: Schema.ResourceMembersListQuery,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.ResourceMemberList> {\n return this.core.request({\n method: 'GET',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/members`,\n query,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4B;AAGrB,IAAM,yBAAN,MAA6B;AAAA,EAClC,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,KACE,cACA,YACA,OACA,MACoC;AACpC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACzF;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { j as ResourceMembersListQuery, k as ResourceMemberList } from '../schema-BbKn_i-U.mjs';
|
|
3
|
-
|
|
4
|
-
declare class ResourceMembersService {
|
|
5
|
-
private core;
|
|
6
|
-
constructor(core: FetchClient);
|
|
7
|
-
list(resourceType: string, resourceId: string, query?: ResourceMembersListQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<ResourceMemberList>;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { ResourceMembersService };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { j as ResourceMembersListQuery, k as ResourceMemberList } from '../schema-BbKn_i-U.js';
|
|
3
|
-
|
|
4
|
-
declare class ResourceMembersService {
|
|
5
|
-
private core;
|
|
6
|
-
constructor(core: FetchClient);
|
|
7
|
-
list(resourceType: string, resourceId: string, query?: ResourceMembersListQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<ResourceMemberList>;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { ResourceMembersService };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// src/services/resource_members.ts
|
|
2
|
-
import "@blimu/fetch";
|
|
3
|
-
var ResourceMembersService = class {
|
|
4
|
-
constructor(core) {
|
|
5
|
-
this.core = core;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* GET /v1/resources/{resourceType}/{resourceId}/members*
|
|
9
|
-
* @summary List members for a resource*
|
|
10
|
-
* @description Retrieves a paginated list of users who have roles (direct or inherited) on the specified resource. Supports search functionality to filter users by email or name.*/
|
|
11
|
-
list(resourceType, resourceId, query, init) {
|
|
12
|
-
return this.core.request({
|
|
13
|
-
method: "GET",
|
|
14
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/members`,
|
|
15
|
-
query,
|
|
16
|
-
...init ?? {}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
ResourceMembersService
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=resource_members.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/resource_members.ts"],"sourcesContent":["import { FetchClient } from '@blimu/fetch';\nimport * as Schema from '../schema';\n\nexport class ResourceMembersService {\n constructor(private core: FetchClient) {}\n\n /**\n * GET /v1/resources/{resourceType}/{resourceId}/members*\n * @summary List members for a resource*\n * @description Retrieves a paginated list of users who have roles (direct or inherited) on the specified resource. Supports search functionality to filter users by email or name.*/\n list(\n resourceType: string,\n resourceId: string,\n query?: Schema.ResourceMembersListQuery,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.ResourceMemberList> {\n return this.core.request({\n method: 'GET',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}/members`,\n query,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";AAAA,OAA4B;AAGrB,IAAM,yBAAN,MAA6B;AAAA,EAClC,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,KACE,cACA,YACA,OACA,MACoC;AACpC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACzF;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/services/resources.ts
|
|
21
|
-
var resources_exports = {};
|
|
22
|
-
__export(resources_exports, {
|
|
23
|
-
ResourcesService: () => ResourcesService
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(resources_exports);
|
|
26
|
-
var import_fetch = require("@blimu/fetch");
|
|
27
|
-
var ResourcesService = class {
|
|
28
|
-
constructor(core) {
|
|
29
|
-
this.core = core;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* GET /v1/resources/{resourceType}*
|
|
33
|
-
* @summary List resources*
|
|
34
|
-
* @description Retrieves a paginated list of resources of the specified type. Supports search and filtering. Resources are returned with their parent relationships and metadata.*/
|
|
35
|
-
list(resourceType, query, init) {
|
|
36
|
-
return this.core.request({
|
|
37
|
-
method: "GET",
|
|
38
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}`,
|
|
39
|
-
query,
|
|
40
|
-
...init ?? {}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* POST /v1/resources/{resourceType}*
|
|
45
|
-
* @summary Create a resource*
|
|
46
|
-
* @description Creates a new resource of the specified type. Resources can have parent relationships to form hierarchies. You can optionally assign initial roles to users when creating the resource. Parent resources must already exist.*/
|
|
47
|
-
create(resourceType, body, init) {
|
|
48
|
-
return this.core.request({
|
|
49
|
-
method: "POST",
|
|
50
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}`,
|
|
51
|
-
body,
|
|
52
|
-
...init ?? {}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* DELETE /v1/resources/{resourceType}/{resourceId}*
|
|
57
|
-
* @summary Delete a resource*
|
|
58
|
-
* @description Deletes a resource by its type and ID. This operation is permanent and cannot be undone. Deleting a resource may affect child resources that depend on it.*/
|
|
59
|
-
delete(resourceType, resourceId, init) {
|
|
60
|
-
return this.core.request({
|
|
61
|
-
method: "DELETE",
|
|
62
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,
|
|
63
|
-
...init ?? {}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* GET /v1/resources/{resourceType}/{resourceId}*
|
|
68
|
-
* @summary Read a resource*
|
|
69
|
-
* @description Retrieves a single resource by its type and ID. Returns the resource with its parent relationships and metadata.*/
|
|
70
|
-
read(resourceType, resourceId, init) {
|
|
71
|
-
return this.core.request({
|
|
72
|
-
method: "GET",
|
|
73
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,
|
|
74
|
-
...init ?? {}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* PUT /v1/resources/{resourceType}/{resourceId}*
|
|
79
|
-
* @summary Update a resource*
|
|
80
|
-
* @description Updates an existing resource. You can update the resource name and modify parent relationships. Parent resources must already exist.*/
|
|
81
|
-
update(resourceType, resourceId, body, init) {
|
|
82
|
-
return this.core.request({
|
|
83
|
-
method: "PUT",
|
|
84
|
-
path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,
|
|
85
|
-
body,
|
|
86
|
-
...init ?? {}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
-
0 && (module.exports = {
|
|
92
|
-
ResourcesService
|
|
93
|
-
});
|
|
94
|
-
//# sourceMappingURL=resources.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/resources.ts"],"sourcesContent":["import { FetchClient } from '@blimu/fetch';\nimport * as Schema from '../schema';\n\nexport class ResourcesService {\n constructor(private core: FetchClient) {}\n\n /**\n * GET /v1/resources/{resourceType}*\n * @summary List resources*\n * @description Retrieves a paginated list of resources of the specified type. Supports search and filtering. Resources are returned with their parent relationships and metadata.*/\n list(\n resourceType: string,\n query?: Schema.ResourcesListQuery,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.ResourceList> {\n return this.core.request({\n method: 'GET',\n path: `/v1/resources/${encodeURIComponent(resourceType)}`,\n query,\n ...(init ?? {}),\n });\n }\n\n /**\n * POST /v1/resources/{resourceType}*\n * @summary Create a resource*\n * @description Creates a new resource of the specified type. Resources can have parent relationships to form hierarchies. You can optionally assign initial roles to users when creating the resource. Parent resources must already exist.*/\n create(\n resourceType: string,\n body: Schema.ResourceCreateBody,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.Resource> {\n return this.core.request({\n method: 'POST',\n path: `/v1/resources/${encodeURIComponent(resourceType)}`,\n body,\n ...(init ?? {}),\n });\n }\n\n /**\n * DELETE /v1/resources/{resourceType}/{resourceId}*\n * @summary Delete a resource*\n * @description Deletes a resource by its type and ID. This operation is permanent and cannot be undone. Deleting a resource may affect child resources that depend on it.*/\n delete(\n resourceType: string,\n resourceId: string,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<unknown> {\n return this.core.request({\n method: 'DELETE',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,\n ...(init ?? {}),\n });\n }\n\n /**\n * GET /v1/resources/{resourceType}/{resourceId}*\n * @summary Read a resource*\n * @description Retrieves a single resource by its type and ID. Returns the resource with its parent relationships and metadata.*/\n read(\n resourceType: string,\n resourceId: string,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.Resource> {\n return this.core.request({\n method: 'GET',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,\n ...(init ?? {}),\n });\n }\n\n /**\n * PUT /v1/resources/{resourceType}/{resourceId}*\n * @summary Update a resource*\n * @description Updates an existing resource. You can update the resource name and modify parent relationships. Parent resources must already exist.*/\n update(\n resourceType: string,\n resourceId: string,\n body: Schema.ResourceUpdateBody,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<unknown> {\n return this.core.request({\n method: 'PUT',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,\n body,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4B;AAGrB,IAAM,mBAAN,MAAuB;AAAA,EAC5B,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,KACE,cACA,OACA,MAC8B;AAC9B,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC;AAAA,MACvD;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OACE,cACA,MACA,MAC0B;AAC1B,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC;AAAA,MACvD;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OACE,cACA,YACA,MACkB;AAClB,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACzF,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,KACE,cACA,YACA,MAC0B;AAC1B,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACzF,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OACE,cACA,YACA,MACA,MACkB;AAClB,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,iBAAiB,mBAAmB,YAAY,CAAC,IAAI,mBAAmB,UAAU,CAAC;AAAA,MACzF;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { l as ResourcesListQuery, m as ResourceList, n as ResourceCreateBody, o as Resource, p as ResourceUpdateBody } from '../schema-BbKn_i-U.mjs';
|
|
3
|
-
|
|
4
|
-
declare class ResourcesService {
|
|
5
|
-
private core;
|
|
6
|
-
constructor(core: FetchClient);
|
|
7
|
-
list(resourceType: string, query?: ResourcesListQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<ResourceList>;
|
|
8
|
-
create(resourceType: string, body: ResourceCreateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Resource>;
|
|
9
|
-
delete(resourceType: string, resourceId: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown>;
|
|
10
|
-
read(resourceType: string, resourceId: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Resource>;
|
|
11
|
-
update(resourceType: string, resourceId: string, body: ResourceUpdateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { ResourcesService };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { l as ResourcesListQuery, m as ResourceList, n as ResourceCreateBody, o as Resource, p as ResourceUpdateBody } from '../schema-BbKn_i-U.js';
|
|
3
|
-
|
|
4
|
-
declare class ResourcesService {
|
|
5
|
-
private core;
|
|
6
|
-
constructor(core: FetchClient);
|
|
7
|
-
list(resourceType: string, query?: ResourcesListQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<ResourceList>;
|
|
8
|
-
create(resourceType: string, body: ResourceCreateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Resource>;
|
|
9
|
-
delete(resourceType: string, resourceId: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown>;
|
|
10
|
-
read(resourceType: string, resourceId: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Resource>;
|
|
11
|
-
update(resourceType: string, resourceId: string, body: ResourceUpdateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { ResourcesService };
|