@blimu/backend 1.2.0 → 1.2.2

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.
Files changed (88) hide show
  1. package/README.md +67 -58
  2. package/dist/client.cjs +164 -14
  3. package/dist/client.cjs.map +1 -1
  4. package/dist/client.d.mts +36 -2
  5. package/dist/client.d.ts +36 -2
  6. package/dist/client.mjs +161 -11
  7. package/dist/client.mjs.map +1 -1
  8. package/dist/index.cjs +530 -236
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.mts +265 -108
  11. package/dist/index.d.ts +265 -108
  12. package/dist/index.mjs +518 -226
  13. package/dist/index.mjs.map +1 -1
  14. package/dist/{schema-BbKn_i-U.d.mts → schema-CdEZKE7E.d.mts} +162 -39
  15. package/dist/{schema-BbKn_i-U.d.ts → schema-CdEZKE7E.d.ts} +162 -39
  16. package/dist/schema.cjs.map +1 -1
  17. package/dist/schema.d.mts +2 -1
  18. package/dist/schema.d.ts +2 -1
  19. package/dist/services/auth_jwks.cjs +69 -0
  20. package/dist/services/auth_jwks.cjs.map +1 -0
  21. package/dist/services/auth_jwks.d.mts +13 -0
  22. package/dist/services/auth_jwks.d.ts +13 -0
  23. package/dist/services/auth_jwks.mjs +44 -0
  24. package/dist/services/auth_jwks.mjs.map +1 -0
  25. package/dist/services/bulk_resources.cjs +47 -0
  26. package/dist/services/bulk_resources.cjs.map +1 -0
  27. package/dist/services/bulk_resources.d.mts +11 -0
  28. package/dist/services/bulk_resources.d.ts +11 -0
  29. package/dist/services/bulk_resources.mjs +22 -0
  30. package/dist/services/bulk_resources.mjs.map +1 -0
  31. package/dist/services/bulk_roles.cjs +47 -0
  32. package/dist/services/bulk_roles.cjs.map +1 -0
  33. package/dist/services/bulk_roles.d.mts +11 -0
  34. package/dist/services/bulk_roles.d.ts +11 -0
  35. package/dist/services/bulk_roles.mjs +22 -0
  36. package/dist/services/bulk_roles.mjs.map +1 -0
  37. package/dist/services/entitlements.cjs +71 -0
  38. package/dist/services/entitlements.cjs.map +1 -0
  39. package/dist/services/entitlements.d.mts +13 -0
  40. package/dist/services/entitlements.d.ts +13 -0
  41. package/dist/services/entitlements.mjs +46 -0
  42. package/dist/services/entitlements.mjs.map +1 -0
  43. package/dist/services/oauth.cjs +142 -0
  44. package/dist/services/oauth.cjs.map +1 -0
  45. package/dist/services/oauth.d.mts +19 -0
  46. package/dist/services/oauth.d.ts +19 -0
  47. package/dist/services/oauth.mjs +117 -0
  48. package/dist/services/oauth.mjs.map +1 -0
  49. package/dist/services/plans.cjs +69 -0
  50. package/dist/services/plans.cjs.map +1 -0
  51. package/dist/services/plans.d.mts +13 -0
  52. package/dist/services/plans.d.ts +13 -0
  53. package/dist/services/plans.mjs +44 -0
  54. package/dist/services/plans.mjs.map +1 -0
  55. package/dist/services/resource_members.cjs +47 -0
  56. package/dist/services/resource_members.cjs.map +1 -0
  57. package/dist/services/resource_members.d.mts +11 -0
  58. package/dist/services/resource_members.d.ts +11 -0
  59. package/dist/services/resource_members.mjs +22 -0
  60. package/dist/services/resource_members.mjs.map +1 -0
  61. package/dist/services/resources.cjs +93 -0
  62. package/dist/services/resources.cjs.map +1 -0
  63. package/dist/services/resources.d.mts +15 -0
  64. package/dist/services/resources.d.ts +15 -0
  65. package/dist/services/resources.mjs +68 -0
  66. package/dist/services/resources.mjs.map +1 -0
  67. package/dist/services/roles.cjs +70 -0
  68. package/dist/services/roles.cjs.map +1 -0
  69. package/dist/services/roles.d.mts +13 -0
  70. package/dist/services/roles.d.ts +13 -0
  71. package/dist/services/roles.mjs +45 -0
  72. package/dist/services/roles.mjs.map +1 -0
  73. package/dist/services/usage.cjs +95 -0
  74. package/dist/services/usage.cjs.map +1 -0
  75. package/dist/services/usage.d.mts +15 -0
  76. package/dist/services/usage.d.ts +15 -0
  77. package/dist/services/usage.mjs +70 -0
  78. package/dist/services/usage.mjs.map +1 -0
  79. package/dist/services/users.cjs +104 -0
  80. package/dist/services/users.cjs.map +1 -0
  81. package/dist/services/users.d.mts +16 -0
  82. package/dist/services/users.d.ts +16 -0
  83. package/dist/services/users.mjs +79 -0
  84. package/dist/services/users.mjs.map +1 -0
  85. package/dist/tsconfig.tsbuildinfo +1 -1
  86. package/package.json +5 -4
  87. package/dist/client-B-ZYoU15.d.mts +0 -95
  88. package/dist/client-GKBT3WCg.d.ts +0 -95
@@ -0,0 +1,44 @@
1
+ // src/services/auth_jwks.ts
2
+ var AuthJwksService = class {
3
+ constructor(core) {
4
+ this.core = core;
5
+ }
6
+ /**
7
+ * GET /v1/auth/.well-known/jwks.json*
8
+ * @summary Get JSON Web Key Set for environment (Public)*
9
+ * @description Returns the public keys used to verify JWT tokens issued by this environment. Authenticate using either x-api-key header (secretKey) or x-blimu-publishable-key header (publishableKey).*/
10
+ getJwks(init) {
11
+ return this.core.request({
12
+ method: "GET",
13
+ path: `/v1/auth/.well-known/jwks.json`,
14
+ ...init ?? {}
15
+ });
16
+ }
17
+ /**
18
+ * GET /v1/auth/.well-known/public-key.pem*
19
+ * @summary Get environment public key (PEM)*
20
+ * @description Returns the public key in PEM format for verifying JWT tokens. Authenticate with x-api-key or x-blimu-publishable-key.*/
21
+ getPublicKeyPem(init) {
22
+ return this.core.request({
23
+ method: "GET",
24
+ path: `/v1/auth/.well-known/public-key.pem`,
25
+ ...init ?? {}
26
+ });
27
+ }
28
+ /**
29
+ * GET /v1/auth/oauth/.well-known/jwks.json*
30
+ * @summary Get JSON Web Key Set for OAuth app (Public)*
31
+ * @description Returns the public key for a specific OAuth app to verify JWT tokens. This is a public endpoint following OAuth2/OIDC standards. Provide client_id to get keys for a specific OAuth app, or use authenticated endpoint for environment keys.*/
32
+ getOAuthAppJwks(query, init) {
33
+ return this.core.request({
34
+ method: "GET",
35
+ path: `/v1/auth/oauth/.well-known/jwks.json`,
36
+ query,
37
+ ...init ?? {}
38
+ });
39
+ }
40
+ };
41
+ export {
42
+ AuthJwksService
43
+ };
44
+ //# sourceMappingURL=auth_jwks.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/services/auth_jwks.ts"],"sourcesContent":["import type { FetchClient } from '@blimu/fetch';\nimport type * as Schema from '../schema';\n\nexport class AuthJwksService {\n constructor(private core: FetchClient) {}\n\n /**\n * GET /v1/auth/.well-known/jwks.json*\n * @summary Get JSON Web Key Set for environment (Public)*\n * @description Returns the public keys used to verify JWT tokens issued by this environment. Authenticate using either x-api-key header (secretKey) or x-blimu-publishable-key header (publishableKey).*/\n getJwks(init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.JWK> {\n return this.core.request({\n method: 'GET',\n path: `/v1/auth/.well-known/jwks.json`,\n ...(init ?? {}),\n });\n }\n\n /**\n * GET /v1/auth/.well-known/public-key.pem*\n * @summary Get environment public key (PEM)*\n * @description Returns the public key in PEM format for verifying JWT tokens. Authenticate with x-api-key or x-blimu-publishable-key.*/\n getPublicKeyPem(init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown> {\n return this.core.request({\n method: 'GET',\n path: `/v1/auth/.well-known/public-key.pem`,\n ...(init ?? {}),\n });\n }\n\n /**\n * GET /v1/auth/oauth/.well-known/jwks.json*\n * @summary Get JSON Web Key Set for OAuth app (Public)*\n * @description Returns the public key for a specific OAuth app to verify JWT tokens. This is a public endpoint following OAuth2/OIDC standards. Provide client_id to get keys for a specific OAuth app, or use authenticated endpoint for environment keys.*/\n getOAuthAppJwks(\n query?: Schema.AuthJwksGetOAuthAppJwksQuery,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.JWK> {\n return this.core.request({\n method: 'GET',\n path: `/v1/auth/oauth/.well-known/jwks.json`,\n query,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";AAGO,IAAM,kBAAN,MAAsB;AAAA,EAC3B,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,QAAQ,MAAkE;AACxE,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBAAgB,MAA+D;AAC7E,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBACE,OACA,MACqB;AACrB,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM;AAAA,MACN;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -0,0 +1,47 @@
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/bulk_resources.ts
21
+ var bulk_resources_exports = {};
22
+ __export(bulk_resources_exports, {
23
+ BulkResourcesService: () => BulkResourcesService
24
+ });
25
+ module.exports = __toCommonJS(bulk_resources_exports);
26
+ var BulkResourcesService = class {
27
+ constructor(core) {
28
+ this.core = core;
29
+ }
30
+ /**
31
+ * POST /v1/resources/{resourceType}/bulk*
32
+ * @summary Bulk create resources*
33
+ * @description Creates multiple resources of the specified type in a single request. This operation supports partial success - some resources may be created while others fail. The response includes details about successful creations and any errors encountered. Resources can have parent relationships and initial role assignments.*/
34
+ create(resourceType, body, init) {
35
+ return this.core.request({
36
+ method: "POST",
37
+ path: `/v1/resources/${encodeURIComponent(resourceType)}/bulk`,
38
+ body,
39
+ ...init ?? {}
40
+ });
41
+ }
42
+ };
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ BulkResourcesService
46
+ });
47
+ //# sourceMappingURL=bulk_resources.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/services/bulk_resources.ts"],"sourcesContent":["import type { FetchClient } from '@blimu/fetch';\nimport type * as Schema from '../schema';\nimport type { ResourceType } from '@blimu/types';\n\nexport class BulkResourcesService {\n constructor(private core: FetchClient) {}\n\n /**\n * POST /v1/resources/{resourceType}/bulk*\n * @summary Bulk create resources*\n * @description Creates multiple resources of the specified type in a single request. This operation supports partial success - some resources may be created while others fail. The response includes details about successful creations and any errors encountered. Resources can have parent relationships and initial role assignments.*/\n create(\n resourceType: ResourceType,\n body: Schema.ResourceBulkCreateBody,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.ResourceBulkResult> {\n return this.core.request({\n method: 'POST',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/bulk`,\n body,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,uBAAN,MAA2B;AAAA,EAChC,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,OACE,cACA,MACA,MACoC;AACpC,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;AACF;","names":[]}
@@ -0,0 +1,11 @@
1
+ import { FetchClient } from '@blimu/fetch';
2
+ import { R as ResourceBulkCreateBody, a as ResourceBulkResult } from '../schema-CdEZKE7E.mjs';
3
+ import { ResourceType } from '@blimu/types';
4
+
5
+ declare class BulkResourcesService {
6
+ private core;
7
+ constructor(core: FetchClient);
8
+ create(resourceType: ResourceType, body: ResourceBulkCreateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<ResourceBulkResult>;
9
+ }
10
+
11
+ export { BulkResourcesService };
@@ -0,0 +1,11 @@
1
+ import { FetchClient } from '@blimu/fetch';
2
+ import { R as ResourceBulkCreateBody, a as ResourceBulkResult } from '../schema-CdEZKE7E.js';
3
+ import { ResourceType } from '@blimu/types';
4
+
5
+ declare class BulkResourcesService {
6
+ private core;
7
+ constructor(core: FetchClient);
8
+ create(resourceType: ResourceType, body: ResourceBulkCreateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<ResourceBulkResult>;
9
+ }
10
+
11
+ export { BulkResourcesService };
@@ -0,0 +1,22 @@
1
+ // src/services/bulk_resources.ts
2
+ var BulkResourcesService = class {
3
+ constructor(core) {
4
+ this.core = core;
5
+ }
6
+ /**
7
+ * POST /v1/resources/{resourceType}/bulk*
8
+ * @summary Bulk create resources*
9
+ * @description Creates multiple resources of the specified type in a single request. This operation supports partial success - some resources may be created while others fail. The response includes details about successful creations and any errors encountered. Resources can have parent relationships and initial role assignments.*/
10
+ create(resourceType, body, init) {
11
+ return this.core.request({
12
+ method: "POST",
13
+ path: `/v1/resources/${encodeURIComponent(resourceType)}/bulk`,
14
+ body,
15
+ ...init ?? {}
16
+ });
17
+ }
18
+ };
19
+ export {
20
+ BulkResourcesService
21
+ };
22
+ //# sourceMappingURL=bulk_resources.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/services/bulk_resources.ts"],"sourcesContent":["import type { FetchClient } from '@blimu/fetch';\nimport type * as Schema from '../schema';\nimport type { ResourceType } from '@blimu/types';\n\nexport class BulkResourcesService {\n constructor(private core: FetchClient) {}\n\n /**\n * POST /v1/resources/{resourceType}/bulk*\n * @summary Bulk create resources*\n * @description Creates multiple resources of the specified type in a single request. This operation supports partial success - some resources may be created while others fail. The response includes details about successful creations and any errors encountered. Resources can have parent relationships and initial role assignments.*/\n create(\n resourceType: ResourceType,\n body: Schema.ResourceBulkCreateBody,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.ResourceBulkResult> {\n return this.core.request({\n method: 'POST',\n path: `/v1/resources/${encodeURIComponent(resourceType)}/bulk`,\n body,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";AAIO,IAAM,uBAAN,MAA2B;AAAA,EAChC,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,OACE,cACA,MACA,MACoC;AACpC,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;AACF;","names":[]}
@@ -0,0 +1,47 @@
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/bulk_roles.ts
21
+ var bulk_roles_exports = {};
22
+ __export(bulk_roles_exports, {
23
+ BulkRolesService: () => BulkRolesService
24
+ });
25
+ module.exports = __toCommonJS(bulk_roles_exports);
26
+ var BulkRolesService = class {
27
+ constructor(core) {
28
+ this.core = core;
29
+ }
30
+ /**
31
+ * POST /v1/users/roles/bulk*
32
+ * @summary Bulk create roles*
33
+ * @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.*/
34
+ create(body, init) {
35
+ return this.core.request({
36
+ method: "POST",
37
+ path: `/v1/users/roles/bulk`,
38
+ body,
39
+ ...init ?? {}
40
+ });
41
+ }
42
+ };
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ BulkRolesService
46
+ });
47
+ //# sourceMappingURL=bulk_roles.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/services/bulk_roles.ts"],"sourcesContent":["import type { FetchClient } from '@blimu/fetch';\nimport type * 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;AAAA;AAAA;AAAA;AAAA;AAGO,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":[]}
@@ -0,0 +1,11 @@
1
+ import { FetchClient } from '@blimu/fetch';
2
+ import { b as RoleBulkCreateBody, c as RoleBulkResult } from '../schema-CdEZKE7E.mjs';
3
+ import '@blimu/types';
4
+
5
+ declare class BulkRolesService {
6
+ private core;
7
+ constructor(core: FetchClient);
8
+ create(body: RoleBulkCreateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<RoleBulkResult>;
9
+ }
10
+
11
+ export { BulkRolesService };
@@ -0,0 +1,11 @@
1
+ import { FetchClient } from '@blimu/fetch';
2
+ import { b as RoleBulkCreateBody, c as RoleBulkResult } from '../schema-CdEZKE7E.js';
3
+ import '@blimu/types';
4
+
5
+ declare class BulkRolesService {
6
+ private core;
7
+ constructor(core: FetchClient);
8
+ create(body: RoleBulkCreateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<RoleBulkResult>;
9
+ }
10
+
11
+ export { BulkRolesService };
@@ -0,0 +1,22 @@
1
+ // src/services/bulk_roles.ts
2
+ var BulkRolesService = class {
3
+ constructor(core) {
4
+ this.core = core;
5
+ }
6
+ /**
7
+ * POST /v1/users/roles/bulk*
8
+ * @summary Bulk create roles*
9
+ * @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.*/
10
+ create(body, init) {
11
+ return this.core.request({
12
+ method: "POST",
13
+ path: `/v1/users/roles/bulk`,
14
+ body,
15
+ ...init ?? {}
16
+ });
17
+ }
18
+ };
19
+ export {
20
+ BulkRolesService
21
+ };
22
+ //# sourceMappingURL=bulk_roles.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/services/bulk_roles.ts"],"sourcesContent":["import type { FetchClient } from '@blimu/fetch';\nimport type * 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":";AAGO,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":[]}
@@ -0,0 +1,71 @@
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 EntitlementsService = class {
27
+ constructor(core) {
28
+ this.core = core;
29
+ }
30
+ /**
31
+ * POST /v1/entitlements/check*
32
+ * @summary Check if a user has a specific entitlement on a resource*
33
+ * @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.*/
34
+ checkEntitlement(body, init) {
35
+ return this.core.request({
36
+ method: "POST",
37
+ path: `/v1/entitlements/check`,
38
+ body,
39
+ ...init ?? {}
40
+ });
41
+ }
42
+ /**
43
+ * GET /v1/entitlements/list-for-resource/{resourceType}/{resourceId}*
44
+ * @summary List entitlements for a specific resource*
45
+ * @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.*/
46
+ listForResource(resourceType, resourceId, query, init) {
47
+ return this.core.request({
48
+ method: "GET",
49
+ path: `/v1/entitlements/list-for-resource/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,
50
+ query,
51
+ ...init ?? {}
52
+ });
53
+ }
54
+ /**
55
+ * GET /v1/entitlements/list-for-tenant/{tenantResourceId}*
56
+ * @summary List entitlements for a tenant and all its sub-resources*
57
+ * @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`).*/
58
+ listForTenant(tenantResourceId, query, init) {
59
+ return this.core.request({
60
+ method: "GET",
61
+ path: `/v1/entitlements/list-for-tenant/${encodeURIComponent(tenantResourceId)}`,
62
+ query,
63
+ ...init ?? {}
64
+ });
65
+ }
66
+ };
67
+ // Annotate the CommonJS export names for ESM import in node:
68
+ 0 && (module.exports = {
69
+ EntitlementsService
70
+ });
71
+ //# sourceMappingURL=entitlements.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/services/entitlements.ts"],"sourcesContent":["import type { FetchClient } from '@blimu/fetch';\nimport type * as Schema from '../schema';\nimport type { ResourceType } from '@blimu/types';\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: ResourceType,\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;AAIO,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":[]}
@@ -0,0 +1,13 @@
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-CdEZKE7E.mjs';
3
+ import { ResourceType } from '@blimu/types';
4
+
5
+ declare class EntitlementsService {
6
+ private core;
7
+ constructor(core: FetchClient);
8
+ checkEntitlement(body: EntitlementCheckBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementCheckResult>;
9
+ listForResource(resourceType: ResourceType, resourceId: string, query?: EntitlementsListForResourceQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementsListResult>;
10
+ listForTenant(tenantResourceId: string, query?: EntitlementsListForTenantQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementsListResult>;
11
+ }
12
+
13
+ export { EntitlementsService };
@@ -0,0 +1,13 @@
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-CdEZKE7E.js';
3
+ import { ResourceType } from '@blimu/types';
4
+
5
+ declare class EntitlementsService {
6
+ private core;
7
+ constructor(core: FetchClient);
8
+ checkEntitlement(body: EntitlementCheckBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementCheckResult>;
9
+ listForResource(resourceType: ResourceType, resourceId: string, query?: EntitlementsListForResourceQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementsListResult>;
10
+ listForTenant(tenantResourceId: string, query?: EntitlementsListForTenantQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<EntitlementsListResult>;
11
+ }
12
+
13
+ export { EntitlementsService };
@@ -0,0 +1,46 @@
1
+ // src/services/entitlements.ts
2
+ var EntitlementsService = class {
3
+ constructor(core) {
4
+ this.core = core;
5
+ }
6
+ /**
7
+ * POST /v1/entitlements/check*
8
+ * @summary Check if a user has a specific entitlement on a resource*
9
+ * @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.*/
10
+ checkEntitlement(body, init) {
11
+ return this.core.request({
12
+ method: "POST",
13
+ path: `/v1/entitlements/check`,
14
+ body,
15
+ ...init ?? {}
16
+ });
17
+ }
18
+ /**
19
+ * GET /v1/entitlements/list-for-resource/{resourceType}/{resourceId}*
20
+ * @summary List entitlements for a specific resource*
21
+ * @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.*/
22
+ listForResource(resourceType, resourceId, query, init) {
23
+ return this.core.request({
24
+ method: "GET",
25
+ path: `/v1/entitlements/list-for-resource/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`,
26
+ query,
27
+ ...init ?? {}
28
+ });
29
+ }
30
+ /**
31
+ * GET /v1/entitlements/list-for-tenant/{tenantResourceId}*
32
+ * @summary List entitlements for a tenant and all its sub-resources*
33
+ * @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`).*/
34
+ listForTenant(tenantResourceId, query, init) {
35
+ return this.core.request({
36
+ method: "GET",
37
+ path: `/v1/entitlements/list-for-tenant/${encodeURIComponent(tenantResourceId)}`,
38
+ query,
39
+ ...init ?? {}
40
+ });
41
+ }
42
+ };
43
+ export {
44
+ EntitlementsService
45
+ };
46
+ //# sourceMappingURL=entitlements.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/services/entitlements.ts"],"sourcesContent":["import type { FetchClient } from '@blimu/fetch';\nimport type * as Schema from '../schema';\nimport type { ResourceType } from '@blimu/types';\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: ResourceType,\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":";AAIO,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":[]}
@@ -0,0 +1,142 @@
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/oauth.ts
21
+ var oauth_exports = {};
22
+ __export(oauth_exports, {
23
+ OauthService: () => OauthService
24
+ });
25
+ module.exports = __toCommonJS(oauth_exports);
26
+ var OauthService = class {
27
+ constructor(core) {
28
+ this.core = core;
29
+ }
30
+ /**
31
+ * GET /v1/oauth/authorize*
32
+ * @summary Check consent requirement*
33
+ * @description Checks if user consent is required for the OAuth2 app and requested scopes.*/
34
+ checkConsentRequired(query, init) {
35
+ return this.core.request({
36
+ method: "GET",
37
+ path: `/v1/oauth/authorize`,
38
+ query,
39
+ ...init ?? {}
40
+ });
41
+ }
42
+ /**
43
+ * POST /v1/oauth/authorize*
44
+ * @summary Authorize OAuth2 application*
45
+ * @description Handles user consent approval/denial. Validates auto_approved flag against consent requirements.*/
46
+ authorize(body, init) {
47
+ return this.core.request({
48
+ method: "POST",
49
+ path: `/v1/oauth/authorize`,
50
+ body,
51
+ ...init ?? {}
52
+ });
53
+ }
54
+ /**
55
+ * POST /v1/oauth/device/authorize*
56
+ * @summary Authorize or deny device code*
57
+ * @description Allows an authenticated user to authorize or deny a device code request. Requires valid user session.*/
58
+ authorizeDeviceCode(body, init) {
59
+ return this.core.request({
60
+ method: "POST",
61
+ path: `/v1/oauth/device/authorize`,
62
+ body,
63
+ ...init ?? {}
64
+ });
65
+ }
66
+ /**
67
+ * POST /v1/oauth/device/code*
68
+ * @summary Request device authorization codes*
69
+ * @description Initiates device authorization flow. Returns device_code (for polling) and user_code (for user entry).*/
70
+ requestDeviceCode(body, init) {
71
+ return this.core.request({
72
+ method: "POST",
73
+ path: `/v1/oauth/device/code`,
74
+ body,
75
+ ...init ?? {}
76
+ });
77
+ }
78
+ /**
79
+ * GET /v1/oauth/device/code/{user_code}*
80
+ * @summary Get device code information*
81
+ * @description Returns device code information including app name, scopes, and consent requirement status.*/
82
+ getDeviceCodeInfo(user_code, init) {
83
+ return this.core.request({
84
+ method: "GET",
85
+ path: `/v1/oauth/device/code/${encodeURIComponent(user_code)}`,
86
+ ...init ?? {}
87
+ });
88
+ }
89
+ /**
90
+ * POST /v1/oauth/device/token*
91
+ * @summary Poll for device authorization tokens*
92
+ * @description Client polls this endpoint to exchange device_code for tokens once user has authorized.*/
93
+ exchangeDeviceCode(body, init) {
94
+ return this.core.request({
95
+ method: "POST",
96
+ path: `/v1/oauth/device/token`,
97
+ body,
98
+ ...init ?? {}
99
+ });
100
+ }
101
+ /**
102
+ * POST /v1/oauth/introspect*
103
+ * @summary Introspect token*
104
+ * @description Validates a token and returns metadata. Requires client authentication.*/
105
+ introspect(body, init) {
106
+ return this.core.request({
107
+ method: "POST",
108
+ path: `/v1/oauth/introspect`,
109
+ body,
110
+ ...init ?? {}
111
+ });
112
+ }
113
+ /**
114
+ * POST /v1/oauth/revoke*
115
+ * @summary Revoke token*
116
+ * @description Revokes an access or refresh token. Requires client authentication.*/
117
+ revoke(body, init) {
118
+ return this.core.request({
119
+ method: "POST",
120
+ path: `/v1/oauth/revoke`,
121
+ body,
122
+ ...init ?? {}
123
+ });
124
+ }
125
+ /**
126
+ * POST /v1/oauth/token*
127
+ * @summary Token endpoint*
128
+ * @description Issues access and refresh tokens. Supports authorization_code and refresh_token (always available per OAuth2 spec).*/
129
+ token(body, init) {
130
+ return this.core.request({
131
+ method: "POST",
132
+ path: `/v1/oauth/token`,
133
+ body,
134
+ ...init ?? {}
135
+ });
136
+ }
137
+ };
138
+ // Annotate the CommonJS export names for ESM import in node:
139
+ 0 && (module.exports = {
140
+ OauthService
141
+ });
142
+ //# sourceMappingURL=oauth.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/services/oauth.ts"],"sourcesContent":["import type { FetchClient } from '@blimu/fetch';\nimport type * as Schema from '../schema';\n\nexport class OauthService {\n constructor(private core: FetchClient) {}\n\n /**\n * GET /v1/oauth/authorize*\n * @summary Check consent requirement*\n * @description Checks if user consent is required for the OAuth2 app and requested scopes.*/\n checkConsentRequired(\n query?: Schema.OauthCheckConsentRequiredQuery,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.ConsentCheckResponse> {\n return this.core.request({\n method: 'GET',\n path: `/v1/oauth/authorize`,\n query,\n ...(init ?? {}),\n });\n }\n\n /**\n * POST /v1/oauth/authorize*\n * @summary Authorize OAuth2 application*\n * @description Handles user consent approval/denial. Validates auto_approved flag against consent requirements.*/\n authorize(\n body: Schema.AuthorizeRequest,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<unknown> {\n return this.core.request({\n method: 'POST',\n path: `/v1/oauth/authorize`,\n body,\n ...(init ?? {}),\n });\n }\n\n /**\n * POST /v1/oauth/device/authorize*\n * @summary Authorize or deny device code*\n * @description Allows an authenticated user to authorize or deny a device code request. Requires valid user session.*/\n authorizeDeviceCode(\n body: Schema.DeviceAuthorizeRequest,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.DeviceAuthorizeResponse> {\n return this.core.request({\n method: 'POST',\n path: `/v1/oauth/device/authorize`,\n body,\n ...(init ?? {}),\n });\n }\n\n /**\n * POST /v1/oauth/device/code*\n * @summary Request device authorization codes*\n * @description Initiates device authorization flow. Returns device_code (for polling) and user_code (for user entry).*/\n requestDeviceCode(\n body: Schema.DeviceCodeRequest,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.DeviceCodeResponse> {\n return this.core.request({\n method: 'POST',\n path: `/v1/oauth/device/code`,\n body,\n ...(init ?? {}),\n });\n }\n\n /**\n * GET /v1/oauth/device/code/{user_code}*\n * @summary Get device code information*\n * @description Returns device code information including app name, scopes, and consent requirement status.*/\n getDeviceCodeInfo(\n user_code: string,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.DeviceCodeInfoResponse> {\n return this.core.request({\n method: 'GET',\n path: `/v1/oauth/device/code/${encodeURIComponent(user_code)}`,\n ...(init ?? {}),\n });\n }\n\n /**\n * POST /v1/oauth/device/token*\n * @summary Poll for device authorization tokens*\n * @description Client polls this endpoint to exchange device_code for tokens once user has authorized.*/\n exchangeDeviceCode(\n body: Schema.DeviceTokenRequest,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.TokenResponse> {\n return this.core.request({\n method: 'POST',\n path: `/v1/oauth/device/token`,\n body,\n ...(init ?? {}),\n });\n }\n\n /**\n * POST /v1/oauth/introspect*\n * @summary Introspect token*\n * @description Validates a token and returns metadata. Requires client authentication.*/\n introspect(\n body: Schema.IntrospectionRequest,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.IntrospectionResponse> {\n return this.core.request({\n method: 'POST',\n path: `/v1/oauth/introspect`,\n body,\n ...(init ?? {}),\n });\n }\n\n /**\n * POST /v1/oauth/revoke*\n * @summary Revoke token*\n * @description Revokes an access or refresh token. Requires client authentication.*/\n revoke(\n body: Schema.RevocationRequest,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<unknown> {\n return this.core.request({\n method: 'POST',\n path: `/v1/oauth/revoke`,\n body,\n ...(init ?? {}),\n });\n }\n\n /**\n * POST /v1/oauth/token*\n * @summary Token endpoint*\n * @description Issues access and refresh tokens. Supports authorization_code and refresh_token (always available per OAuth2 spec).*/\n token(\n body: Schema.TokenRequest,\n init?: Omit<RequestInit, 'method' | 'body'>\n ): Promise<Schema.TokenResponse> {\n return this.core.request({\n method: 'POST',\n path: `/v1/oauth/token`,\n body,\n ...(init ?? {}),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,IAAM,eAAN,MAAmB;AAAA,EACxB,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxC,qBACE,OACA,MACsC;AACtC,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,UACE,MACA,MACkB;AAClB,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,oBACE,MACA,MACyC;AACzC,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,kBACE,MACA,MACoC;AACpC,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,kBACE,WACA,MACwC;AACxC,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM,yBAAyB,mBAAmB,SAAS,CAAC;AAAA,MAC5D,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,mBACE,MACA,MAC+B;AAC/B,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,WACE,MACA,MACuC;AACvC,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,OACE,MACA,MACkB;AAClB,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,MACE,MACA,MAC+B;AAC/B,WAAO,KAAK,KAAK,QAAQ;AAAA,MACvB,QAAQ;AAAA,MACR,MAAM;AAAA,MACN;AAAA,MACA,GAAI,QAAQ,CAAC;AAAA,IACf,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -0,0 +1,19 @@
1
+ import { FetchClient } from '@blimu/fetch';
2
+ import { O as OauthCheckConsentRequiredQuery, C as ConsentCheckResponse, h as AuthorizeRequest, D as DeviceAuthorizeRequest, i as DeviceAuthorizeResponse, j as DeviceCodeRequest, k as DeviceCodeResponse, l as DeviceCodeInfoResponse, m as DeviceTokenRequest, T as TokenResponse, I as IntrospectionRequest, n as IntrospectionResponse, o as RevocationRequest, p as TokenRequest } from '../schema-CdEZKE7E.mjs';
3
+ import '@blimu/types';
4
+
5
+ declare class OauthService {
6
+ private core;
7
+ constructor(core: FetchClient);
8
+ checkConsentRequired(query?: OauthCheckConsentRequiredQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<ConsentCheckResponse>;
9
+ authorize(body: AuthorizeRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown>;
10
+ authorizeDeviceCode(body: DeviceAuthorizeRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<DeviceAuthorizeResponse>;
11
+ requestDeviceCode(body: DeviceCodeRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<DeviceCodeResponse>;
12
+ getDeviceCodeInfo(user_code: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<DeviceCodeInfoResponse>;
13
+ exchangeDeviceCode(body: DeviceTokenRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<TokenResponse>;
14
+ introspect(body: IntrospectionRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<IntrospectionResponse>;
15
+ revoke(body: RevocationRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown>;
16
+ token(body: TokenRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<TokenResponse>;
17
+ }
18
+
19
+ export { OauthService };
@@ -0,0 +1,19 @@
1
+ import { FetchClient } from '@blimu/fetch';
2
+ import { O as OauthCheckConsentRequiredQuery, C as ConsentCheckResponse, h as AuthorizeRequest, D as DeviceAuthorizeRequest, i as DeviceAuthorizeResponse, j as DeviceCodeRequest, k as DeviceCodeResponse, l as DeviceCodeInfoResponse, m as DeviceTokenRequest, T as TokenResponse, I as IntrospectionRequest, n as IntrospectionResponse, o as RevocationRequest, p as TokenRequest } from '../schema-CdEZKE7E.js';
3
+ import '@blimu/types';
4
+
5
+ declare class OauthService {
6
+ private core;
7
+ constructor(core: FetchClient);
8
+ checkConsentRequired(query?: OauthCheckConsentRequiredQuery, init?: Omit<RequestInit, 'method' | 'body'>): Promise<ConsentCheckResponse>;
9
+ authorize(body: AuthorizeRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown>;
10
+ authorizeDeviceCode(body: DeviceAuthorizeRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<DeviceAuthorizeResponse>;
11
+ requestDeviceCode(body: DeviceCodeRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<DeviceCodeResponse>;
12
+ getDeviceCodeInfo(user_code: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<DeviceCodeInfoResponse>;
13
+ exchangeDeviceCode(body: DeviceTokenRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<TokenResponse>;
14
+ introspect(body: IntrospectionRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<IntrospectionResponse>;
15
+ revoke(body: RevocationRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown>;
16
+ token(body: TokenRequest, init?: Omit<RequestInit, 'method' | 'body'>): Promise<TokenResponse>;
17
+ }
18
+
19
+ export { OauthService };