@blimu/backend 1.1.4 → 1.2.1
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/README.md +58 -58
- package/dist/client.cjs +121 -14
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.mts +4 -1
- package/dist/client.d.ts +4 -1
- package/dist/client.mjs +118 -11
- package/dist/client.mjs.map +1 -1
- package/dist/index.cjs +427 -142
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +604 -4
- package/dist/index.d.ts +604 -4
- package/dist/index.mjs +420 -135
- package/dist/index.mjs.map +1 -1
- package/dist/{schema-BbKn_i-U.d.mts → schema-CGYqiv8k.d.mts} +147 -39
- package/dist/{schema-BbKn_i-U.d.ts → schema-CGYqiv8k.d.ts} +147 -39
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.mts +2 -1
- package/dist/schema.d.ts +2 -1
- package/dist/services/bulk_resources.cjs +0 -1
- package/dist/services/bulk_resources.cjs.map +1 -1
- package/dist/services/bulk_resources.d.mts +3 -2
- package/dist/services/bulk_resources.d.ts +3 -2
- package/dist/services/bulk_resources.mjs +0 -1
- package/dist/services/bulk_resources.mjs.map +1 -1
- package/dist/services/bulk_roles.cjs +0 -1
- package/dist/services/bulk_roles.cjs.map +1 -1
- package/dist/services/bulk_roles.d.mts +2 -1
- package/dist/services/bulk_roles.d.ts +2 -1
- package/dist/services/bulk_roles.mjs +0 -1
- package/dist/services/bulk_roles.mjs.map +1 -1
- package/dist/services/entitlements.cjs +0 -1
- package/dist/services/entitlements.cjs.map +1 -1
- package/dist/services/entitlements.d.mts +3 -2
- package/dist/services/entitlements.d.ts +3 -2
- package/dist/services/entitlements.mjs +0 -1
- package/dist/services/entitlements.mjs.map +1 -1
- package/dist/services/oauth.cjs +142 -0
- package/dist/services/oauth.cjs.map +1 -0
- package/dist/services/oauth.d.mts +19 -0
- package/dist/services/oauth.d.ts +19 -0
- package/dist/services/oauth.mjs +117 -0
- package/dist/services/oauth.mjs.map +1 -0
- package/dist/services/plans.cjs +0 -1
- package/dist/services/plans.cjs.map +1 -1
- package/dist/services/plans.d.mts +5 -4
- package/dist/services/plans.d.ts +5 -4
- package/dist/services/plans.mjs +0 -1
- package/dist/services/plans.mjs.map +1 -1
- package/dist/services/resource_members.cjs +0 -1
- package/dist/services/resource_members.cjs.map +1 -1
- package/dist/services/resource_members.d.mts +3 -2
- package/dist/services/resource_members.d.ts +3 -2
- package/dist/services/resource_members.mjs +0 -1
- package/dist/services/resource_members.mjs.map +1 -1
- package/dist/services/resources.cjs +0 -1
- package/dist/services/resources.cjs.map +1 -1
- package/dist/services/resources.d.mts +7 -6
- package/dist/services/resources.d.ts +7 -6
- package/dist/services/resources.mjs +0 -1
- package/dist/services/resources.mjs.map +1 -1
- package/dist/services/roles.cjs +0 -1
- package/dist/services/roles.cjs.map +1 -1
- package/dist/services/roles.d.mts +3 -2
- package/dist/services/roles.d.ts +3 -2
- package/dist/services/roles.mjs +0 -1
- package/dist/services/roles.mjs.map +1 -1
- package/dist/services/usage.cjs +0 -1
- package/dist/services/usage.cjs.map +1 -1
- package/dist/services/usage.d.mts +2 -1
- package/dist/services/usage.d.ts +2 -1
- package/dist/services/usage.mjs +0 -1
- package/dist/services/usage.mjs.map +1 -1
- package/dist/services/users.cjs +0 -1
- package/dist/services/users.cjs.map +1 -1
- package/dist/services/users.d.mts +2 -1
- package/dist/services/users.d.ts +2 -1
- package/dist/services/users.mjs +0 -1
- package/dist/services/users.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -5
- 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/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,4 +1,18 @@
|
|
|
1
|
+
import { ResourceType, EntitlementType, PlanType, UsageLimitType } from '@blimu/types';
|
|
2
|
+
|
|
1
3
|
type Enum<T> = T[keyof T];
|
|
4
|
+
interface AuthorizeRequest {
|
|
5
|
+
action: 'allow' | 'deny';
|
|
6
|
+
auto_approved?: boolean;
|
|
7
|
+
client_id: string;
|
|
8
|
+
code_challenge?: string;
|
|
9
|
+
code_challenge_method?: string;
|
|
10
|
+
redirect_uri: string;
|
|
11
|
+
response_type: string;
|
|
12
|
+
scope?: string;
|
|
13
|
+
state?: string;
|
|
14
|
+
user_action?: boolean;
|
|
15
|
+
}
|
|
2
16
|
interface BalanceResponse {
|
|
3
17
|
balance: number;
|
|
4
18
|
}
|
|
@@ -8,9 +22,48 @@ interface CheckLimitResponse {
|
|
|
8
22
|
remaining?: number;
|
|
9
23
|
requested: number;
|
|
10
24
|
}
|
|
25
|
+
interface ConsentCheckResponse {
|
|
26
|
+
consent_required: boolean;
|
|
27
|
+
previously_granted: boolean;
|
|
28
|
+
}
|
|
29
|
+
interface DeviceAuthorizeRequest {
|
|
30
|
+
action: 'allow' | 'deny';
|
|
31
|
+
auto_approved?: boolean;
|
|
32
|
+
user_action?: boolean;
|
|
33
|
+
user_code: string;
|
|
34
|
+
}
|
|
35
|
+
interface DeviceAuthorizeResponse {
|
|
36
|
+
success: boolean;
|
|
37
|
+
}
|
|
38
|
+
interface DeviceCodeInfoResponse {
|
|
39
|
+
appName: string;
|
|
40
|
+
previouslyGranted: boolean;
|
|
41
|
+
requireConsent: boolean;
|
|
42
|
+
scopes: string[];
|
|
43
|
+
}
|
|
44
|
+
interface DeviceCodeRequest {
|
|
45
|
+
client_id: string;
|
|
46
|
+
code_challenge?: string;
|
|
47
|
+
code_challenge_method?: 'S256' | 'plain';
|
|
48
|
+
scope?: string;
|
|
49
|
+
}
|
|
50
|
+
interface DeviceCodeResponse {
|
|
51
|
+
device_code: string;
|
|
52
|
+
expires_in: number;
|
|
53
|
+
interval: number;
|
|
54
|
+
user_code: string;
|
|
55
|
+
verification_uri: string;
|
|
56
|
+
verification_uri_complete: string;
|
|
57
|
+
}
|
|
58
|
+
interface DeviceTokenRequest {
|
|
59
|
+
client_id: string;
|
|
60
|
+
code_verifier?: string;
|
|
61
|
+
device_code: string;
|
|
62
|
+
grant_type: 'urn:ietf:params:oauth:grant-type:device_code';
|
|
63
|
+
}
|
|
11
64
|
interface EntitlementCheckBody {
|
|
12
65
|
amount?: number;
|
|
13
|
-
entitlement:
|
|
66
|
+
entitlement: EntitlementType;
|
|
14
67
|
resourceId: string;
|
|
15
68
|
userId: string;
|
|
16
69
|
}
|
|
@@ -20,15 +73,15 @@ interface EntitlementCheckResult {
|
|
|
20
73
|
allowed: boolean;
|
|
21
74
|
current?: number;
|
|
22
75
|
limit?: number;
|
|
23
|
-
plan?:
|
|
76
|
+
plan?: PlanType;
|
|
24
77
|
reason?: string;
|
|
25
78
|
remaining?: number;
|
|
26
79
|
scope?: string;
|
|
27
80
|
} | null;
|
|
28
81
|
plans?: {
|
|
29
82
|
allowed: boolean;
|
|
30
|
-
allowedPlans?:
|
|
31
|
-
plan?:
|
|
83
|
+
allowedPlans?: PlanType[];
|
|
84
|
+
plan?: PlanType;
|
|
32
85
|
reason?: string;
|
|
33
86
|
} | null;
|
|
34
87
|
roles?: {
|
|
@@ -44,18 +97,33 @@ interface EntitlementsListResult {
|
|
|
44
97
|
allowed: boolean;
|
|
45
98
|
allowedByPlan: boolean;
|
|
46
99
|
allowedByRole: boolean;
|
|
47
|
-
allowedPlans?:
|
|
100
|
+
allowedPlans?: PlanType[];
|
|
48
101
|
allowedRoles: string[];
|
|
49
|
-
currentPlan?:
|
|
102
|
+
currentPlan?: PlanType;
|
|
50
103
|
currentRole?: string;
|
|
51
|
-
entitlement:
|
|
104
|
+
entitlement: EntitlementType;
|
|
52
105
|
}[];
|
|
53
106
|
resourceId: string;
|
|
54
|
-
resourceType:
|
|
107
|
+
resourceType: ResourceType;
|
|
55
108
|
}[];
|
|
56
109
|
}
|
|
110
|
+
interface IntrospectionRequest {
|
|
111
|
+
token: string;
|
|
112
|
+
token_type_hint?: 'access_token' | 'refresh_token';
|
|
113
|
+
}
|
|
114
|
+
interface IntrospectionResponse {
|
|
115
|
+
active: boolean;
|
|
116
|
+
client_id?: string;
|
|
117
|
+
environment_id?: string;
|
|
118
|
+
exp?: number;
|
|
119
|
+
iat?: number;
|
|
120
|
+
scope?: string;
|
|
121
|
+
sub?: string;
|
|
122
|
+
token_type?: string;
|
|
123
|
+
username?: string;
|
|
124
|
+
}
|
|
57
125
|
interface PlanAssignBody {
|
|
58
|
-
planKey:
|
|
126
|
+
planKey: PlanType;
|
|
59
127
|
}
|
|
60
128
|
interface PlanDeleteResponse {
|
|
61
129
|
success: boolean;
|
|
@@ -63,9 +131,9 @@ interface PlanDeleteResponse {
|
|
|
63
131
|
interface PlanResponse {
|
|
64
132
|
createdAt: string;
|
|
65
133
|
environmentId: string;
|
|
66
|
-
planKey:
|
|
134
|
+
planKey: PlanType;
|
|
67
135
|
resourceId: string;
|
|
68
|
-
resourceType:
|
|
136
|
+
resourceType: ResourceType;
|
|
69
137
|
updatedAt: string;
|
|
70
138
|
}
|
|
71
139
|
interface Resource {
|
|
@@ -74,9 +142,9 @@ interface Resource {
|
|
|
74
142
|
name: string | null;
|
|
75
143
|
parents?: {
|
|
76
144
|
id: string;
|
|
77
|
-
type:
|
|
145
|
+
type: ResourceType;
|
|
78
146
|
}[];
|
|
79
|
-
type:
|
|
147
|
+
type: ResourceType;
|
|
80
148
|
}
|
|
81
149
|
interface ResourceBulkCreateBody {
|
|
82
150
|
resources: {
|
|
@@ -84,7 +152,7 @@ interface ResourceBulkCreateBody {
|
|
|
84
152
|
name?: string;
|
|
85
153
|
parents?: {
|
|
86
154
|
id: string;
|
|
87
|
-
type:
|
|
155
|
+
type: ResourceType;
|
|
88
156
|
}[];
|
|
89
157
|
roles?: {
|
|
90
158
|
role: string;
|
|
@@ -96,7 +164,7 @@ interface ResourceBulkResult {
|
|
|
96
164
|
created: {
|
|
97
165
|
environmentId: string;
|
|
98
166
|
id: string;
|
|
99
|
-
type:
|
|
167
|
+
type: ResourceType;
|
|
100
168
|
}[];
|
|
101
169
|
errors: {
|
|
102
170
|
error: string;
|
|
@@ -106,7 +174,7 @@ interface ResourceBulkResult {
|
|
|
106
174
|
name?: string;
|
|
107
175
|
parents?: {
|
|
108
176
|
id: string;
|
|
109
|
-
type:
|
|
177
|
+
type: ResourceType;
|
|
110
178
|
}[];
|
|
111
179
|
roles?: {
|
|
112
180
|
role: string;
|
|
@@ -126,7 +194,7 @@ interface ResourceCreateBody {
|
|
|
126
194
|
name?: string;
|
|
127
195
|
parents?: {
|
|
128
196
|
id: string;
|
|
129
|
-
type:
|
|
197
|
+
type: ResourceType;
|
|
130
198
|
}[];
|
|
131
199
|
roles?: {
|
|
132
200
|
role: string;
|
|
@@ -165,21 +233,25 @@ interface ResourceUpdateBody {
|
|
|
165
233
|
name?: string;
|
|
166
234
|
parents?: {
|
|
167
235
|
id: string;
|
|
168
|
-
type:
|
|
236
|
+
type: ResourceType;
|
|
169
237
|
}[];
|
|
170
238
|
}
|
|
239
|
+
interface RevocationRequest {
|
|
240
|
+
token: string;
|
|
241
|
+
token_type_hint?: 'access_token' | 'refresh_token';
|
|
242
|
+
}
|
|
171
243
|
interface Role {
|
|
172
244
|
createdAt: string;
|
|
173
245
|
environmentId: string;
|
|
174
246
|
resourceId: string;
|
|
175
|
-
resourceType:
|
|
247
|
+
resourceType: ResourceType;
|
|
176
248
|
role: string;
|
|
177
249
|
userId: string;
|
|
178
250
|
}
|
|
179
251
|
interface RoleBulkCreateBody {
|
|
180
252
|
roles: {
|
|
181
253
|
resourceId: string;
|
|
182
|
-
resourceType:
|
|
254
|
+
resourceType: ResourceType;
|
|
183
255
|
role: string;
|
|
184
256
|
userId: string;
|
|
185
257
|
}[];
|
|
@@ -189,7 +261,7 @@ interface RoleBulkResult {
|
|
|
189
261
|
createdAt: string;
|
|
190
262
|
environmentId: string;
|
|
191
263
|
resourceId: string;
|
|
192
|
-
resourceType:
|
|
264
|
+
resourceType: ResourceType;
|
|
193
265
|
role: string;
|
|
194
266
|
userId: string;
|
|
195
267
|
}[];
|
|
@@ -198,7 +270,7 @@ interface RoleBulkResult {
|
|
|
198
270
|
index: number;
|
|
199
271
|
role: {
|
|
200
272
|
resourceId: string;
|
|
201
|
-
resourceType:
|
|
273
|
+
resourceType: ResourceType;
|
|
202
274
|
role: string;
|
|
203
275
|
userId: string;
|
|
204
276
|
};
|
|
@@ -212,7 +284,7 @@ interface RoleBulkResult {
|
|
|
212
284
|
}
|
|
213
285
|
interface RoleCreateBody {
|
|
214
286
|
resourceId: string;
|
|
215
|
-
resourceType:
|
|
287
|
+
resourceType: ResourceType;
|
|
216
288
|
role: string;
|
|
217
289
|
}
|
|
218
290
|
interface RoleList {
|
|
@@ -222,43 +294,60 @@ interface RoleList {
|
|
|
222
294
|
createdAt: string;
|
|
223
295
|
environmentId: string;
|
|
224
296
|
resourceId: string;
|
|
225
|
-
resourceType:
|
|
297
|
+
resourceType: ResourceType;
|
|
226
298
|
role: string;
|
|
227
299
|
userId: string;
|
|
228
300
|
}[];
|
|
229
301
|
total: number;
|
|
230
302
|
}
|
|
303
|
+
interface TokenRequest {
|
|
304
|
+
client_id: string;
|
|
305
|
+
client_secret?: string;
|
|
306
|
+
code?: string;
|
|
307
|
+
code_verifier?: string;
|
|
308
|
+
grant_type: 'authorization_code' | 'refresh_token';
|
|
309
|
+
redirect_uri?: string;
|
|
310
|
+
refresh_token?: string;
|
|
311
|
+
scope?: string;
|
|
312
|
+
}
|
|
313
|
+
interface TokenResponse {
|
|
314
|
+
access_token: string;
|
|
315
|
+
expires_in: number;
|
|
316
|
+
refresh_token: string;
|
|
317
|
+
scope?: string;
|
|
318
|
+
token_type: string;
|
|
319
|
+
}
|
|
231
320
|
interface TransactionHistoryResponse {
|
|
232
321
|
items: {
|
|
233
322
|
amount: number;
|
|
234
323
|
createdAt: string;
|
|
235
324
|
environmentId: string;
|
|
236
325
|
id: string;
|
|
237
|
-
limitType:
|
|
326
|
+
limitType: UsageLimitType;
|
|
238
327
|
resourceId: string;
|
|
239
|
-
resourceType:
|
|
328
|
+
resourceType: ResourceType;
|
|
240
329
|
tags: Record<string, unknown> | null;
|
|
241
330
|
}[];
|
|
242
331
|
}
|
|
243
332
|
interface UsageCheckBody {
|
|
244
333
|
amount: number;
|
|
245
|
-
limitType:
|
|
334
|
+
limitType: UsageLimitType;
|
|
246
335
|
period: 'monthly' | 'yearly' | 'lifetime';
|
|
247
336
|
resourceId: string;
|
|
248
|
-
resourceType:
|
|
337
|
+
resourceType: ResourceType;
|
|
249
338
|
}
|
|
250
339
|
interface UsageConsumeBody {
|
|
251
340
|
amount: number;
|
|
252
|
-
limitType:
|
|
341
|
+
limitType: UsageLimitType;
|
|
253
342
|
resourceId: string;
|
|
254
|
-
resourceType:
|
|
343
|
+
resourceType: ResourceType;
|
|
255
344
|
tags?: Record<string, unknown>;
|
|
256
345
|
}
|
|
257
346
|
interface UsageCreditBody {
|
|
258
347
|
amount: number;
|
|
259
|
-
limitType:
|
|
348
|
+
limitType: UsageLimitType;
|
|
260
349
|
resourceId: string;
|
|
261
|
-
resourceType:
|
|
350
|
+
resourceType: ResourceType;
|
|
262
351
|
tags?: Record<string, unknown>;
|
|
263
352
|
}
|
|
264
353
|
interface UsageWalletResponse {
|
|
@@ -266,9 +355,9 @@ interface UsageWalletResponse {
|
|
|
266
355
|
createdAt: string;
|
|
267
356
|
environmentId: string;
|
|
268
357
|
id: string;
|
|
269
|
-
limitType:
|
|
358
|
+
limitType: UsageLimitType;
|
|
270
359
|
resourceId: string;
|
|
271
|
-
resourceType:
|
|
360
|
+
resourceType: ResourceType;
|
|
272
361
|
tags: Record<string, unknown> | null;
|
|
273
362
|
}
|
|
274
363
|
interface User {
|
|
@@ -316,9 +405,9 @@ type UserResourceList = {
|
|
|
316
405
|
name: string;
|
|
317
406
|
parents: {
|
|
318
407
|
id: string;
|
|
319
|
-
type:
|
|
408
|
+
type: ResourceType;
|
|
320
409
|
}[];
|
|
321
|
-
type:
|
|
410
|
+
type: ResourceType;
|
|
322
411
|
};
|
|
323
412
|
role: string;
|
|
324
413
|
}[];
|
|
@@ -336,6 +425,11 @@ interface EntitlementsListForResourceQuery {
|
|
|
336
425
|
interface EntitlementsListForTenantQuery {
|
|
337
426
|
userId: string;
|
|
338
427
|
}
|
|
428
|
+
interface OauthCheckConsentRequiredQuery {
|
|
429
|
+
client_id: string;
|
|
430
|
+
redirect_uri?: string;
|
|
431
|
+
scope?: string;
|
|
432
|
+
}
|
|
339
433
|
interface ResourceMembersListQuery {
|
|
340
434
|
limit?: number;
|
|
341
435
|
page?: number;
|
|
@@ -350,7 +444,7 @@ interface RolesListQuery {
|
|
|
350
444
|
limit?: number;
|
|
351
445
|
page?: number;
|
|
352
446
|
resourceId?: string;
|
|
353
|
-
resourceType?:
|
|
447
|
+
resourceType?: ResourceType;
|
|
354
448
|
role?: string;
|
|
355
449
|
}
|
|
356
450
|
interface UsageGetBalanceQuery {
|
|
@@ -367,14 +461,25 @@ interface UsersListQuery {
|
|
|
367
461
|
search?: string;
|
|
368
462
|
}
|
|
369
463
|
|
|
464
|
+
type schema_AuthorizeRequest = AuthorizeRequest;
|
|
370
465
|
type schema_BalanceResponse = BalanceResponse;
|
|
371
466
|
type schema_CheckLimitResponse = CheckLimitResponse;
|
|
467
|
+
type schema_ConsentCheckResponse = ConsentCheckResponse;
|
|
468
|
+
type schema_DeviceAuthorizeRequest = DeviceAuthorizeRequest;
|
|
469
|
+
type schema_DeviceAuthorizeResponse = DeviceAuthorizeResponse;
|
|
470
|
+
type schema_DeviceCodeInfoResponse = DeviceCodeInfoResponse;
|
|
471
|
+
type schema_DeviceCodeRequest = DeviceCodeRequest;
|
|
472
|
+
type schema_DeviceCodeResponse = DeviceCodeResponse;
|
|
473
|
+
type schema_DeviceTokenRequest = DeviceTokenRequest;
|
|
372
474
|
type schema_EntitlementCheckBody = EntitlementCheckBody;
|
|
373
475
|
type schema_EntitlementCheckResult = EntitlementCheckResult;
|
|
374
476
|
type schema_EntitlementsListForResourceQuery = EntitlementsListForResourceQuery;
|
|
375
477
|
type schema_EntitlementsListForTenantQuery = EntitlementsListForTenantQuery;
|
|
376
478
|
type schema_EntitlementsListResult = EntitlementsListResult;
|
|
377
479
|
type schema_Enum<T> = Enum<T>;
|
|
480
|
+
type schema_IntrospectionRequest = IntrospectionRequest;
|
|
481
|
+
type schema_IntrospectionResponse = IntrospectionResponse;
|
|
482
|
+
type schema_OauthCheckConsentRequiredQuery = OauthCheckConsentRequiredQuery;
|
|
378
483
|
type schema_PlanAssignBody = PlanAssignBody;
|
|
379
484
|
type schema_PlanDeleteResponse = PlanDeleteResponse;
|
|
380
485
|
type schema_PlanResponse = PlanResponse;
|
|
@@ -387,12 +492,15 @@ type schema_ResourceMemberList = ResourceMemberList;
|
|
|
387
492
|
type schema_ResourceMembersListQuery = ResourceMembersListQuery;
|
|
388
493
|
type schema_ResourceUpdateBody = ResourceUpdateBody;
|
|
389
494
|
type schema_ResourcesListQuery = ResourcesListQuery;
|
|
495
|
+
type schema_RevocationRequest = RevocationRequest;
|
|
390
496
|
type schema_Role = Role;
|
|
391
497
|
type schema_RoleBulkCreateBody = RoleBulkCreateBody;
|
|
392
498
|
type schema_RoleBulkResult = RoleBulkResult;
|
|
393
499
|
type schema_RoleCreateBody = RoleCreateBody;
|
|
394
500
|
type schema_RoleList = RoleList;
|
|
395
501
|
type schema_RolesListQuery = RolesListQuery;
|
|
502
|
+
type schema_TokenRequest = TokenRequest;
|
|
503
|
+
type schema_TokenResponse = TokenResponse;
|
|
396
504
|
type schema_TransactionHistoryResponse = TransactionHistoryResponse;
|
|
397
505
|
type schema_UsageCheckBody = UsageCheckBody;
|
|
398
506
|
type schema_UsageConsumeBody = UsageConsumeBody;
|
|
@@ -407,7 +515,7 @@ type schema_UserResourceList = UserResourceList;
|
|
|
407
515
|
type schema_UserUpdateBody = UserUpdateBody;
|
|
408
516
|
type schema_UsersListQuery = UsersListQuery;
|
|
409
517
|
declare namespace schema {
|
|
410
|
-
export type { schema_BalanceResponse as BalanceResponse, schema_CheckLimitResponse as CheckLimitResponse, schema_EntitlementCheckBody as EntitlementCheckBody, schema_EntitlementCheckResult as EntitlementCheckResult, schema_EntitlementsListForResourceQuery as EntitlementsListForResourceQuery, schema_EntitlementsListForTenantQuery as EntitlementsListForTenantQuery, schema_EntitlementsListResult as EntitlementsListResult, schema_Enum as Enum, schema_PlanAssignBody as PlanAssignBody, schema_PlanDeleteResponse as PlanDeleteResponse, schema_PlanResponse as PlanResponse, schema_Resource as Resource, schema_ResourceBulkCreateBody as ResourceBulkCreateBody, schema_ResourceBulkResult as ResourceBulkResult, schema_ResourceCreateBody as ResourceCreateBody, schema_ResourceList as ResourceList, schema_ResourceMemberList as ResourceMemberList, schema_ResourceMembersListQuery as ResourceMembersListQuery, schema_ResourceUpdateBody as ResourceUpdateBody, schema_ResourcesListQuery as ResourcesListQuery, schema_Role as Role, schema_RoleBulkCreateBody as RoleBulkCreateBody, schema_RoleBulkResult as RoleBulkResult, schema_RoleCreateBody as RoleCreateBody, schema_RoleList as RoleList, schema_RolesListQuery as RolesListQuery, schema_TransactionHistoryResponse as TransactionHistoryResponse, schema_UsageCheckBody as UsageCheckBody, schema_UsageConsumeBody as UsageConsumeBody, schema_UsageCreditBody as UsageCreditBody, schema_UsageGetBalanceQuery as UsageGetBalanceQuery, schema_UsageGetTransactionHistoryQuery as UsageGetTransactionHistoryQuery, schema_UsageWalletResponse as UsageWalletResponse, schema_User as User, schema_UserCreateBody as UserCreateBody, schema_UserList as UserList, schema_UserResourceList as UserResourceList, schema_UserUpdateBody as UserUpdateBody, schema_UsersListQuery as UsersListQuery };
|
|
518
|
+
export type { schema_AuthorizeRequest as AuthorizeRequest, schema_BalanceResponse as BalanceResponse, schema_CheckLimitResponse as CheckLimitResponse, schema_ConsentCheckResponse as ConsentCheckResponse, schema_DeviceAuthorizeRequest as DeviceAuthorizeRequest, schema_DeviceAuthorizeResponse as DeviceAuthorizeResponse, schema_DeviceCodeInfoResponse as DeviceCodeInfoResponse, schema_DeviceCodeRequest as DeviceCodeRequest, schema_DeviceCodeResponse as DeviceCodeResponse, schema_DeviceTokenRequest as DeviceTokenRequest, schema_EntitlementCheckBody as EntitlementCheckBody, schema_EntitlementCheckResult as EntitlementCheckResult, schema_EntitlementsListForResourceQuery as EntitlementsListForResourceQuery, schema_EntitlementsListForTenantQuery as EntitlementsListForTenantQuery, schema_EntitlementsListResult as EntitlementsListResult, schema_Enum as Enum, schema_IntrospectionRequest as IntrospectionRequest, schema_IntrospectionResponse as IntrospectionResponse, schema_OauthCheckConsentRequiredQuery as OauthCheckConsentRequiredQuery, schema_PlanAssignBody as PlanAssignBody, schema_PlanDeleteResponse as PlanDeleteResponse, schema_PlanResponse as PlanResponse, schema_Resource as Resource, schema_ResourceBulkCreateBody as ResourceBulkCreateBody, schema_ResourceBulkResult as ResourceBulkResult, schema_ResourceCreateBody as ResourceCreateBody, schema_ResourceList as ResourceList, schema_ResourceMemberList as ResourceMemberList, schema_ResourceMembersListQuery as ResourceMembersListQuery, schema_ResourceUpdateBody as ResourceUpdateBody, schema_ResourcesListQuery as ResourcesListQuery, schema_RevocationRequest as RevocationRequest, schema_Role as Role, schema_RoleBulkCreateBody as RoleBulkCreateBody, schema_RoleBulkResult as RoleBulkResult, schema_RoleCreateBody as RoleCreateBody, schema_RoleList as RoleList, schema_RolesListQuery as RolesListQuery, schema_TokenRequest as TokenRequest, schema_TokenResponse as TokenResponse, schema_TransactionHistoryResponse as TransactionHistoryResponse, schema_UsageCheckBody as UsageCheckBody, schema_UsageConsumeBody as UsageConsumeBody, schema_UsageCreditBody as UsageCreditBody, schema_UsageGetBalanceQuery as UsageGetBalanceQuery, schema_UsageGetTransactionHistoryQuery as UsageGetTransactionHistoryQuery, schema_UsageWalletResponse as UsageWalletResponse, schema_User as User, schema_UserCreateBody as UserCreateBody, schema_UserList as UserList, schema_UserResourceList as UserResourceList, schema_UserUpdateBody as UserUpdateBody, schema_UsersListQuery as UsersListQuery };
|
|
411
519
|
}
|
|
412
520
|
|
|
413
|
-
export { type
|
|
521
|
+
export { type Enum as $, type AuthorizeRequest as A, type RoleList as B, type ConsentCheckResponse as C, type DeviceAuthorizeRequest as D, type EntitlementCheckBody as E, type RoleCreateBody as F, type Role as G, type BalanceResponse as H, type IntrospectionRequest as I, type UsageCheckBody as J, type CheckLimitResponse as K, type UsageConsumeBody as L, type UsageWalletResponse as M, type UsageCreditBody as N, type OauthCheckConsentRequiredQuery as O, type PlanDeleteResponse as P, type UsageGetTransactionHistoryQuery as Q, type ResourceBulkCreateBody as R, type TransactionHistoryResponse as S, type TokenResponse as T, type UsageGetBalanceQuery as U, type UsersListQuery as V, type UserList as W, type UserCreateBody as X, type User as Y, type UserUpdateBody as Z, type UserResourceList as _, type ResourceBulkResult as a, type RoleBulkCreateBody as b, type RoleBulkResult as c, type EntitlementCheckResult as d, type EntitlementsListForResourceQuery as e, type EntitlementsListResult as f, type EntitlementsListForTenantQuery as g, type DeviceAuthorizeResponse as h, type DeviceCodeRequest as i, type DeviceCodeResponse as j, type DeviceCodeInfoResponse as k, type DeviceTokenRequest as l, type IntrospectionResponse as m, type RevocationRequest as n, type TokenRequest as o, type PlanResponse as p, type PlanAssignBody as q, type ResourceMembersListQuery as r, schema as s, type ResourceMemberList as t, type ResourcesListQuery as u, type ResourceList as v, type ResourceCreateBody as w, type Resource as x, type ResourceUpdateBody as y, type RolesListQuery as z };
|
package/dist/schema.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schema.ts"],"sourcesContent":["// Generated types from OpenAPI components.schemas\n\nexport type Enum<T> = T[keyof T];\n\nexport interface BalanceResponse {\n balance: number;\n}\n\nexport interface CheckLimitResponse {\n allowed: boolean;\n current: number;\n remaining?: number;\n requested: number;\n}\n\nexport interface EntitlementCheckBody {\n amount?: number;\n entitlement: string;\n resourceId: string;\n userId: string;\n}\n\nexport interface EntitlementCheckResult {\n allowed: boolean;\n limit?: {\n allowed: boolean;\n current?: number;\n limit?: number;\n plan?: string | null;\n reason?: string;\n remaining?: number;\n scope?: string;\n } | null;\n plans?: {\n allowed: boolean;\n allowedPlans?: string[];\n plan?: string | null;\n reason?: string;\n } | null;\n roles?: {\n allowed: boolean;\n allowedRoles?: string[];\n reason?: string;\n userRoles?: string[];\n } | null;\n}\n\nexport interface EntitlementsListResult {\n results: {\n entitlements: {\n allowed: boolean;\n allowedByPlan: boolean;\n allowedByRole: boolean;\n allowedPlans?: string[];\n allowedRoles: string[];\n currentPlan?: string;\n currentRole?: string;\n entitlement: string;\n }[];\n resourceId: string;\n resourceType: string;\n }[];\n}\n\nexport interface PlanAssignBody {\n planKey: string;\n}\n\nexport interface PlanDeleteResponse {\n success: boolean;\n}\n\nexport interface PlanResponse {\n createdAt: string;\n environmentId: string;\n planKey: string;\n resourceId: string;\n resourceType: string;\n updatedAt: string;\n}\n\nexport interface Resource {\n createdAt: string;\n id: string;\n name: string | null;\n parents?: { id: string; type: string }[];\n type: string;\n}\n\nexport interface ResourceBulkCreateBody {\n resources: {\n id?: string;\n name?: string;\n parents?: { id: string; type: string }[];\n roles?: { role: string; userId: string }[];\n }[];\n}\n\nexport interface ResourceBulkResult {\n created: { environmentId: string; id: string; type: string }[];\n errors: {\n error: string;\n index: number;\n resource: {\n id?: string;\n name?: string;\n parents?: { id: string; type: string }[];\n roles?: { role: string; userId: string }[];\n };\n }[];\n success: boolean;\n summary: { failed: number; successful: number; total: number };\n}\n\nexport interface ResourceCreateBody {\n id?: string;\n name?: string;\n parents?: { id: string; type: string }[];\n roles?: { role: string; userId: string }[];\n}\n\nexport interface ResourceList {\n items: Resource[];\n limit: number;\n page: number;\n total: number;\n}\n\nexport interface ResourceMemberList {\n items: {\n inherited: boolean;\n role: string;\n user: {\n avatarUrl: string | null;\n createdAt: string;\n email: string;\n emailVerified: boolean;\n firstName: string | null;\n id: string;\n lastLoginAt: string | null;\n lastName: string | null;\n lookupKey: string | null;\n updatedAt: string;\n };\n userId: string;\n }[];\n limit: number;\n page: number;\n total: number;\n}\n\nexport interface ResourceUpdateBody {\n name?: string;\n /** Creates relationships with other resources. Parent resources must already exist. */\n parents?: { id: string; type: string }[];\n}\n\nexport interface Role {\n createdAt: string;\n environmentId: string;\n resourceId: string;\n resourceType: string;\n role: string;\n userId: string;\n}\n\nexport interface RoleBulkCreateBody {\n roles: { resourceId: string; resourceType: string; role: string; userId: string }[];\n}\n\nexport interface RoleBulkResult {\n created: {\n createdAt: string;\n environmentId: string;\n resourceId: string;\n resourceType: string;\n role: string;\n userId: string;\n }[];\n errors: {\n error: string;\n index: number;\n role: { resourceId: string; resourceType: string; role: string; userId: string };\n }[];\n success: boolean;\n summary: { failed: number; successful: number; total: number };\n}\n\nexport interface RoleCreateBody {\n resourceId: string;\n resourceType: string;\n role: string;\n}\n\nexport interface RoleList {\n limit: number;\n page: number;\n roles: {\n createdAt: string;\n environmentId: string;\n resourceId: string;\n resourceType: string;\n role: string;\n userId: string;\n }[];\n total: number;\n}\n\nexport interface TransactionHistoryResponse {\n items: {\n amount: number;\n createdAt: string;\n environmentId: string;\n id: string;\n limitType: string;\n resourceId: string;\n resourceType: string;\n tags: Record<string, unknown> | null;\n }[];\n}\n\nexport interface UsageCheckBody {\n amount: number;\n limitType: string;\n period: 'monthly' | 'yearly' | 'lifetime';\n resourceId: string;\n resourceType: string;\n}\n\nexport interface UsageConsumeBody {\n amount: number;\n limitType: string;\n resourceId: string;\n resourceType: string;\n tags?: Record<string, unknown>;\n}\n\nexport interface UsageCreditBody {\n amount: number;\n limitType: string;\n resourceId: string;\n resourceType: string;\n tags?: Record<string, unknown>;\n}\n\nexport interface UsageWalletResponse {\n amount: number;\n createdAt: string;\n environmentId: string;\n id: string;\n limitType: string;\n resourceId: string;\n resourceType: string;\n tags: Record<string, unknown> | null;\n}\n\nexport interface User {\n avatarUrl: string | null;\n createdAt: string;\n email: string;\n emailVerified: boolean;\n firstName: string | null;\n id: string;\n lastLoginAt: string | null;\n lastName: string | null;\n lookupKey: string | null;\n updatedAt: string;\n}\n\nexport interface UserCreateBody {\n avatarUrl?: string;\n email: string;\n firstName?: string | null;\n lastName?: string | null;\n lookupKey: string;\n newUser?: boolean | null;\n password?: string | null;\n}\n\nexport interface UserList {\n items: {\n avatarUrl: string | null;\n createdAt: string;\n email: string;\n emailVerified: boolean;\n firstName: string | null;\n id: string;\n lastLoginAt: string | null;\n lastName: string | null;\n lookupKey: string | null;\n updatedAt: string;\n }[];\n limit: number;\n page: number;\n total: number;\n}\n\nexport type UserResourceList = {\n inherited: boolean;\n resource: { id: string; name: string; parents: { id: string; type: string }[]; type: string };\n role: string;\n}[];\n\nexport interface UserUpdateBody {\n avatarUrl?: string | null;\n email?: string;\n firstName?: string | null;\n lastName?: string | null;\n lookupKey?: string;\n password?: string;\n}\n\n// Operation query parameter interfaces\n\n/**\n * Query params for Entitlements.ListForResource*\n * 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.*/\nexport interface EntitlementsListForResourceQuery {\n /** The unique identifier of the user */\n userId: string;\n}\n\n/**\n * Query params for Entitlements.ListForTenant*\n * 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`).*/\nexport interface EntitlementsListForTenantQuery {\n /** The unique identifier of the user */\n userId: string;\n}\n\n/**\n * Query params for Resource Members.List*\n * 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.*/\nexport interface ResourceMembersListQuery {\n /** Number of items per page (minimum: 1, maximum: 100) */\n limit?: number;\n /** Page number for pagination */\n page?: number;\n /** Search query to filter members by email or name */\n search?: string;\n}\n\n/**\n * Query params for Resources.List*\n * Retrieves a paginated list of resources of the specified type. Supports search and filtering. Resources are returned with their parent relationships and metadata.*/\nexport interface ResourcesListQuery {\n /** Number of items per page (minimum: 1, maximum: 100) */\n limit?: number;\n /** Page number for pagination */\n page?: number;\n /** Search query to filter resources by name */\n search?: string;\n}\n\n/**\n * Query params for Roles.List*\n * Retrieves a paginated list of roles assigned to a user. Supports filtering by resource type, resource ID, and role name. Returns both directly assigned roles and inherited roles.*/\nexport interface RolesListQuery {\n /** Number of items per page (minimum: 1, maximum: 100) */\n limit?: number;\n /** Page number for pagination */\n page?: number;\n /** Filter roles by specific resource ID */\n resourceId?: string;\n /** Filter roles by resource type */\n resourceType?: string;\n /** Filter by role name */\n role?: string;\n}\n\n/**\n * Query params for Usage.GetBalance*\n * Retrieves the current balance of a usage wallet for a specific resource and limit type within a given time period. The balance reflects all credits and consumption transactions.*/\nexport interface UsageGetBalanceQuery {\n /** Time period for the balance calculation */\n period: 'monthly' | 'yearly' | 'lifetime';\n}\n\n/**\n * Query params for Usage.GetTransactionHistory*\n * Retrieves the transaction history for a usage wallet, including all credits and consumption records. Supports filtering by time period and date range.*/\nexport interface UsageGetTransactionHistoryQuery {\n /** End date for filtering transactions (ISO 8601 format) */\n endDate?: string;\n /** Time period for filtering transactions */\n period?: 'monthly' | 'yearly' | 'lifetime';\n /** Start date for filtering transactions (ISO 8601 format) */\n startDate?: string;\n}\n\n/**\n * Query params for Users.List*\n * Retrieves a paginated list of users in your environment. Supports search functionality to filter users by email, name, or lookup key.*/\nexport interface UsersListQuery {\n /** Number of items per page (minimum: 1, maximum: 100) */\n limit?: number;\n /** Page number for pagination */\n page?: number;\n /** Search query to filter users by email, name, or lookup key */\n search?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/schema.ts"],"sourcesContent":["// Generated types from OpenAPI components.schemas\n\nimport type { ResourceType, EntitlementType, PlanType, UsageLimitType } from '@blimu/types';\n\nexport type Enum<T> = T[keyof T];\n\nexport interface AuthorizeRequest {\n /** Action to take: allow or deny */\n action: 'allow' | 'deny';\n /** True if consent was auto-approved (not required or previously granted) */\n auto_approved?: boolean;\n /** OAuth2 client ID */\n client_id: string;\n /** PKCE code challenge */\n code_challenge?: string;\n /** PKCE code challenge method */\n code_challenge_method?: string;\n /** Redirect URI */\n redirect_uri: string;\n /** Response type (typically \"code\") */\n response_type: string;\n /** Space-separated list of scopes */\n scope?: string;\n /** State parameter for CSRF protection */\n state?: string;\n /** True if user explicitly clicked Allow, false if auto-approved */\n user_action?: boolean;\n}\n\nexport interface BalanceResponse {\n balance: number;\n}\n\nexport interface CheckLimitResponse {\n allowed: boolean;\n current: number;\n remaining?: number;\n requested: number;\n}\n\nexport interface ConsentCheckResponse {\n /** Whether user consent is required */\n consent_required: boolean;\n /** Whether consent was previously granted for this app and scopes */\n previously_granted: boolean;\n}\n\nexport interface DeviceAuthorizeRequest {\n /** Action to take: allow or deny */\n action: 'allow' | 'deny';\n /** True if consent was auto-approved (not required or previously granted) */\n auto_approved?: boolean;\n /** True if user explicitly clicked Allow, false if auto-approved */\n user_action?: boolean;\n /** The user code displayed to the user */\n user_code: string;\n}\n\nexport interface DeviceAuthorizeResponse {\n /** Whether the authorization was successful */\n success: boolean;\n}\n\nexport interface DeviceCodeInfoResponse {\n /** The name of the OAuth2 application */\n appName: string;\n /** Whether the user has already granted consent for this app and scopes */\n previouslyGranted: boolean;\n /** Whether the app requires user consent */\n requireConsent: boolean;\n /** The scopes requested by the device code */\n scopes: string[];\n}\n\nexport interface DeviceCodeRequest {\n /** OAuth2 client ID */\n client_id: string;\n /** PKCE code challenge (base64url encoded SHA256 hash) */\n code_challenge?: string;\n /** PKCE code challenge method */\n code_challenge_method?: 'S256' | 'plain';\n /** Space-separated list of scopes */\n scope?: string;\n}\n\nexport interface DeviceCodeResponse {\n /** Device verification code (for polling) */\n device_code: string;\n /** Device code expiration time in seconds */\n expires_in: number;\n /** Minimum polling interval in seconds */\n interval: number;\n /** User verification code (short, human-readable) */\n user_code: string;\n /** Verification URI for user */\n verification_uri: string;\n /** Complete verification URI with user code */\n verification_uri_complete: string;\n}\n\nexport interface DeviceTokenRequest {\n /** OAuth2 client ID */\n client_id: string;\n /** PKCE code verifier (if challenge was provided) */\n code_verifier?: string;\n /** Device code from authorization response */\n device_code: string;\n /** Grant type (must be device_code) */\n grant_type: 'urn:ietf:params:oauth:grant-type:device_code';\n}\n\nexport interface EntitlementCheckBody {\n amount?: number;\n entitlement: EntitlementType;\n resourceId: string;\n userId: string;\n}\n\nexport interface EntitlementCheckResult {\n allowed: boolean;\n limit?: {\n allowed: boolean;\n current?: number;\n limit?: number;\n plan?: PlanType;\n reason?: string;\n remaining?: number;\n scope?: string;\n } | null;\n plans?: { allowed: boolean; allowedPlans?: PlanType[]; plan?: PlanType; reason?: string } | null;\n roles?: {\n allowed: boolean;\n allowedRoles?: string[];\n reason?: string;\n userRoles?: string[];\n } | null;\n}\n\nexport interface EntitlementsListResult {\n results: {\n entitlements: {\n allowed: boolean;\n allowedByPlan: boolean;\n allowedByRole: boolean;\n allowedPlans?: PlanType[];\n allowedRoles: string[];\n currentPlan?: PlanType;\n currentRole?: string;\n entitlement: EntitlementType;\n }[];\n resourceId: string;\n resourceType: ResourceType;\n }[];\n}\n\nexport interface IntrospectionRequest {\n /** The token to introspect */\n token: string;\n /** Hint about token type */\n token_type_hint?: 'access_token' | 'refresh_token';\n}\n\nexport interface IntrospectionResponse {\n /** Whether the token is active */\n active: boolean;\n /** Client ID */\n client_id?: string;\n /** Environment ID */\n environment_id?: string;\n /** Token expiration timestamp */\n exp?: number;\n /** Token issued at timestamp */\n iat?: number;\n /** Space-separated list of scopes */\n scope?: string;\n /** Subject (user ID) */\n sub?: string;\n /** Token type */\n token_type?: string;\n /** Username or user ID */\n username?: string;\n}\n\nexport interface PlanAssignBody {\n planKey: PlanType;\n}\n\nexport interface PlanDeleteResponse {\n success: boolean;\n}\n\nexport interface PlanResponse {\n createdAt: string;\n environmentId: string;\n planKey: PlanType;\n resourceId: string;\n resourceType: ResourceType;\n updatedAt: string;\n}\n\nexport interface Resource {\n createdAt: string;\n id: string;\n name: string | null;\n parents?: { id: string; type: ResourceType }[];\n type: ResourceType;\n}\n\nexport interface ResourceBulkCreateBody {\n resources: {\n id?: string;\n name?: string;\n parents?: { id: string; type: ResourceType }[];\n roles?: { role: string; userId: string }[];\n }[];\n}\n\nexport interface ResourceBulkResult {\n created: { environmentId: string; id: string; type: ResourceType }[];\n errors: {\n error: string;\n index: number;\n resource: {\n id?: string;\n name?: string;\n parents?: { id: string; type: ResourceType }[];\n roles?: { role: string; userId: string }[];\n };\n }[];\n success: boolean;\n summary: { failed: number; successful: number; total: number };\n}\n\nexport interface ResourceCreateBody {\n id?: string;\n name?: string;\n parents?: { id: string; type: ResourceType }[];\n roles?: { role: string; userId: string }[];\n}\n\nexport interface ResourceList {\n items: Resource[];\n limit: number;\n page: number;\n total: number;\n}\n\nexport interface ResourceMemberList {\n items: {\n inherited: boolean;\n role: string;\n user: {\n avatarUrl: string | null;\n createdAt: string;\n email: string;\n emailVerified: boolean;\n firstName: string | null;\n id: string;\n lastLoginAt: string | null;\n lastName: string | null;\n lookupKey: string | null;\n updatedAt: string;\n };\n userId: string;\n }[];\n limit: number;\n page: number;\n total: number;\n}\n\nexport interface ResourceUpdateBody {\n name?: string;\n /** Creates relationships with other resources. Parent resources must already exist. */\n parents?: { id: string; type: ResourceType }[];\n}\n\nexport interface RevocationRequest {\n /** The token to revoke */\n token: string;\n /** Hint about token type */\n token_type_hint?: 'access_token' | 'refresh_token';\n}\n\nexport interface Role {\n createdAt: string;\n environmentId: string;\n resourceId: string;\n resourceType: ResourceType;\n role: string;\n userId: string;\n}\n\nexport interface RoleBulkCreateBody {\n roles: { resourceId: string; resourceType: ResourceType; role: string; userId: string }[];\n}\n\nexport interface RoleBulkResult {\n created: {\n createdAt: string;\n environmentId: string;\n resourceId: string;\n resourceType: ResourceType;\n role: string;\n userId: string;\n }[];\n errors: {\n error: string;\n index: number;\n role: { resourceId: string; resourceType: ResourceType; role: string; userId: string };\n }[];\n success: boolean;\n summary: { failed: number; successful: number; total: number };\n}\n\nexport interface RoleCreateBody {\n resourceId: string;\n resourceType: ResourceType;\n role: string;\n}\n\nexport interface RoleList {\n limit: number;\n page: number;\n roles: {\n createdAt: string;\n environmentId: string;\n resourceId: string;\n resourceType: ResourceType;\n role: string;\n userId: string;\n }[];\n total: number;\n}\n\nexport interface TokenRequest {\n /** OAuth2 client ID */\n client_id: string;\n /** OAuth2 client secret (required for confidential clients) */\n client_secret?: string;\n /** Authorization code (required for authorization_code grant) */\n code?: string;\n /** PKCE code verifier (if challenge was provided) */\n code_verifier?: string;\n /** OAuth2 grant type */\n grant_type: 'authorization_code' | 'refresh_token';\n /** Redirect URI (required for authorization_code grant) */\n redirect_uri?: string;\n /** Refresh token (required for refresh_token grant) */\n refresh_token?: string;\n /** Space-separated list of scopes (optional for refresh) */\n scope?: string;\n}\n\nexport interface TokenResponse {\n /** Access token (JWT) */\n access_token: string;\n /** Access token expiration time in seconds */\n expires_in: number;\n /** Refresh token (for obtaining new access tokens) */\n refresh_token: string;\n /** Space-separated list of granted scopes */\n scope?: string;\n /** Token type */\n token_type: string;\n}\n\nexport interface TransactionHistoryResponse {\n items: {\n amount: number;\n createdAt: string;\n environmentId: string;\n id: string;\n limitType: UsageLimitType;\n resourceId: string;\n resourceType: ResourceType;\n tags: Record<string, unknown> | null;\n }[];\n}\n\nexport interface UsageCheckBody {\n amount: number;\n limitType: UsageLimitType;\n period: 'monthly' | 'yearly' | 'lifetime';\n resourceId: string;\n resourceType: ResourceType;\n}\n\nexport interface UsageConsumeBody {\n amount: number;\n limitType: UsageLimitType;\n resourceId: string;\n resourceType: ResourceType;\n tags?: Record<string, unknown>;\n}\n\nexport interface UsageCreditBody {\n amount: number;\n limitType: UsageLimitType;\n resourceId: string;\n resourceType: ResourceType;\n tags?: Record<string, unknown>;\n}\n\nexport interface UsageWalletResponse {\n amount: number;\n createdAt: string;\n environmentId: string;\n id: string;\n limitType: UsageLimitType;\n resourceId: string;\n resourceType: ResourceType;\n tags: Record<string, unknown> | null;\n}\n\nexport interface User {\n avatarUrl: string | null;\n createdAt: string;\n email: string;\n emailVerified: boolean;\n firstName: string | null;\n id: string;\n lastLoginAt: string | null;\n lastName: string | null;\n lookupKey: string | null;\n updatedAt: string;\n}\n\nexport interface UserCreateBody {\n avatarUrl?: string;\n email: string;\n firstName?: string | null;\n lastName?: string | null;\n lookupKey: string;\n newUser?: boolean | null;\n password?: string | null;\n}\n\nexport interface UserList {\n items: {\n avatarUrl: string | null;\n createdAt: string;\n email: string;\n emailVerified: boolean;\n firstName: string | null;\n id: string;\n lastLoginAt: string | null;\n lastName: string | null;\n lookupKey: string | null;\n updatedAt: string;\n }[];\n limit: number;\n page: number;\n total: number;\n}\n\nexport type UserResourceList = {\n inherited: boolean;\n resource: {\n id: string;\n name: string;\n parents: { id: string; type: ResourceType }[];\n type: ResourceType;\n };\n role: string;\n}[];\n\nexport interface UserUpdateBody {\n avatarUrl?: string | null;\n email?: string;\n firstName?: string | null;\n lastName?: string | null;\n lookupKey?: string;\n password?: string;\n}\n\n// Operation query parameter interfaces\n\n/**\n * Query params for Entitlements.ListForResource*\n * 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.*/\nexport interface EntitlementsListForResourceQuery {\n /** The unique identifier of the user */\n userId: string;\n}\n\n/**\n * Query params for Entitlements.ListForTenant*\n * 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`).*/\nexport interface EntitlementsListForTenantQuery {\n /** The unique identifier of the user */\n userId: string;\n}\n\n/**\n * Query params for Oauth.CheckConsentRequired*\n * Checks if user consent is required for the OAuth2 app and requested scopes.*/\nexport interface OauthCheckConsentRequiredQuery {\n /** OAuth2 client ID */\n client_id: string;\n /** Redirect URI */\n redirect_uri?: string;\n /** Space-separated list of scopes */\n scope?: string;\n}\n\n/**\n * Query params for Resource Members.List*\n * 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.*/\nexport interface ResourceMembersListQuery {\n /** Number of items per page (minimum: 1, maximum: 100) */\n limit?: number;\n /** Page number for pagination */\n page?: number;\n /** Search query to filter members by email or name */\n search?: string;\n}\n\n/**\n * Query params for Resources.List*\n * Retrieves a paginated list of resources of the specified type. Supports search and filtering. Resources are returned with their parent relationships and metadata.*/\nexport interface ResourcesListQuery {\n /** Number of items per page (minimum: 1, maximum: 100) */\n limit?: number;\n /** Page number for pagination */\n page?: number;\n /** Search query to filter resources by name */\n search?: string;\n}\n\n/**\n * Query params for Roles.List*\n * Retrieves a paginated list of roles assigned to a user. Supports filtering by resource type, resource ID, and role name. Returns both directly assigned roles and inherited roles.*/\nexport interface RolesListQuery {\n /** Number of items per page (minimum: 1, maximum: 100) */\n limit?: number;\n /** Page number for pagination */\n page?: number;\n /** Filter roles by specific resource ID */\n resourceId?: string;\n /** Filter roles by resource type */\n resourceType?: ResourceType;\n /** Filter by role name */\n role?: string;\n}\n\n/**\n * Query params for Usage.GetBalance*\n * Retrieves the current balance of a usage wallet for a specific resource and limit type within a given time period. The balance reflects all credits and consumption transactions.*/\nexport interface UsageGetBalanceQuery {\n /** Time period for the balance calculation */\n period: 'monthly' | 'yearly' | 'lifetime';\n}\n\n/**\n * Query params for Usage.GetTransactionHistory*\n * Retrieves the transaction history for a usage wallet, including all credits and consumption records. Supports filtering by time period and date range.*/\nexport interface UsageGetTransactionHistoryQuery {\n /** End date for filtering transactions (ISO 8601 format) */\n endDate?: string;\n /** Time period for filtering transactions */\n period?: 'monthly' | 'yearly' | 'lifetime';\n /** Start date for filtering transactions (ISO 8601 format) */\n startDate?: string;\n}\n\n/**\n * Query params for Users.List*\n * Retrieves a paginated list of users in your environment. Supports search functionality to filter users by email, name, or lookup key.*/\nexport interface UsersListQuery {\n /** Number of items per page (minimum: 1, maximum: 100) */\n limit?: number;\n /** Page number for pagination */\n page?: number;\n /** Search query to filter users by email, name, or lookup key */\n search?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/schema.d.mts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import '@blimu/types';
|
|
2
|
+
export { A as AuthorizeRequest, H as BalanceResponse, K as CheckLimitResponse, C as ConsentCheckResponse, D as DeviceAuthorizeRequest, h as DeviceAuthorizeResponse, k as DeviceCodeInfoResponse, i as DeviceCodeRequest, j as DeviceCodeResponse, l as DeviceTokenRequest, E as EntitlementCheckBody, d as EntitlementCheckResult, e as EntitlementsListForResourceQuery, g as EntitlementsListForTenantQuery, f as EntitlementsListResult, $ as Enum, I as IntrospectionRequest, m as IntrospectionResponse, O as OauthCheckConsentRequiredQuery, q as PlanAssignBody, P as PlanDeleteResponse, p as PlanResponse, x as Resource, R as ResourceBulkCreateBody, a as ResourceBulkResult, w as ResourceCreateBody, v as ResourceList, t as ResourceMemberList, r as ResourceMembersListQuery, y as ResourceUpdateBody, u as ResourcesListQuery, n as RevocationRequest, G as Role, b as RoleBulkCreateBody, c as RoleBulkResult, F as RoleCreateBody, B as RoleList, z as RolesListQuery, o as TokenRequest, T as TokenResponse, S as TransactionHistoryResponse, J as UsageCheckBody, L as UsageConsumeBody, N as UsageCreditBody, U as UsageGetBalanceQuery, Q as UsageGetTransactionHistoryQuery, M as UsageWalletResponse, Y as User, X as UserCreateBody, W as UserList, _ as UserResourceList, Z as UserUpdateBody, V as UsersListQuery } from './schema-CGYqiv8k.mjs';
|
package/dist/schema.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import '@blimu/types';
|
|
2
|
+
export { A as AuthorizeRequest, H as BalanceResponse, K as CheckLimitResponse, C as ConsentCheckResponse, D as DeviceAuthorizeRequest, h as DeviceAuthorizeResponse, k as DeviceCodeInfoResponse, i as DeviceCodeRequest, j as DeviceCodeResponse, l as DeviceTokenRequest, E as EntitlementCheckBody, d as EntitlementCheckResult, e as EntitlementsListForResourceQuery, g as EntitlementsListForTenantQuery, f as EntitlementsListResult, $ as Enum, I as IntrospectionRequest, m as IntrospectionResponse, O as OauthCheckConsentRequiredQuery, q as PlanAssignBody, P as PlanDeleteResponse, p as PlanResponse, x as Resource, R as ResourceBulkCreateBody, a as ResourceBulkResult, w as ResourceCreateBody, v as ResourceList, t as ResourceMemberList, r as ResourceMembersListQuery, y as ResourceUpdateBody, u as ResourcesListQuery, n as RevocationRequest, G as Role, b as RoleBulkCreateBody, c as RoleBulkResult, F as RoleCreateBody, B as RoleList, z as RolesListQuery, o as TokenRequest, T as TokenResponse, S as TransactionHistoryResponse, J as UsageCheckBody, L as UsageConsumeBody, N as UsageCreditBody, U as UsageGetBalanceQuery, Q as UsageGetTransactionHistoryQuery, M as UsageWalletResponse, Y as User, X as UserCreateBody, W as UserList, _ as UserResourceList, Z as UserUpdateBody, V as UsersListQuery } from './schema-CGYqiv8k.js';
|
|
@@ -23,7 +23,6 @@ __export(bulk_resources_exports, {
|
|
|
23
23
|
BulkResourcesService: () => BulkResourcesService
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(bulk_resources_exports);
|
|
26
|
-
var import_fetch = require("@blimu/fetch");
|
|
27
26
|
var BulkResourcesService = class {
|
|
28
27
|
constructor(core) {
|
|
29
28
|
this.core = core;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/bulk_resources.ts"],"sourcesContent":["import { FetchClient } from '@blimu/fetch';\nimport * as Schema from '../schema';\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:
|
|
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":[]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { R as ResourceBulkCreateBody, a as ResourceBulkResult } from '../schema-
|
|
2
|
+
import { R as ResourceBulkCreateBody, a as ResourceBulkResult } from '../schema-CGYqiv8k.mjs';
|
|
3
|
+
import { ResourceType } from '@blimu/types';
|
|
3
4
|
|
|
4
5
|
declare class BulkResourcesService {
|
|
5
6
|
private core;
|
|
6
7
|
constructor(core: FetchClient);
|
|
7
|
-
create(resourceType:
|
|
8
|
+
create(resourceType: ResourceType, body: ResourceBulkCreateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<ResourceBulkResult>;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export { BulkResourcesService };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { R as ResourceBulkCreateBody, a as ResourceBulkResult } from '../schema-
|
|
2
|
+
import { R as ResourceBulkCreateBody, a as ResourceBulkResult } from '../schema-CGYqiv8k.js';
|
|
3
|
+
import { ResourceType } from '@blimu/types';
|
|
3
4
|
|
|
4
5
|
declare class BulkResourcesService {
|
|
5
6
|
private core;
|
|
6
7
|
constructor(core: FetchClient);
|
|
7
|
-
create(resourceType:
|
|
8
|
+
create(resourceType: ResourceType, body: ResourceBulkCreateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<ResourceBulkResult>;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export { BulkResourcesService };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/bulk_resources.ts"],"sourcesContent":["import { FetchClient } from '@blimu/fetch';\nimport * as Schema from '../schema';\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:
|
|
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":[]}
|
|
@@ -1 +1 @@
|
|
|
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;AAAA;AAAA;AAAA;AAAA;
|
|
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":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { b as RoleBulkCreateBody, c as RoleBulkResult } from '../schema-
|
|
2
|
+
import { b as RoleBulkCreateBody, c as RoleBulkResult } from '../schema-CGYqiv8k.mjs';
|
|
3
|
+
import '@blimu/types';
|
|
3
4
|
|
|
4
5
|
declare class BulkRolesService {
|
|
5
6
|
private core;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FetchClient } from '@blimu/fetch';
|
|
2
|
-
import { b as RoleBulkCreateBody, c as RoleBulkResult } from '../schema-
|
|
2
|
+
import { b as RoleBulkCreateBody, c as RoleBulkResult } from '../schema-CGYqiv8k.js';
|
|
3
|
+
import '@blimu/types';
|
|
3
4
|
|
|
4
5
|
declare class BulkRolesService {
|
|
5
6
|
private core;
|
|
@@ -1 +1 @@
|
|
|
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":";
|
|
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":[]}
|
|
@@ -23,7 +23,6 @@ __export(entitlements_exports, {
|
|
|
23
23
|
EntitlementsService: () => EntitlementsService
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(entitlements_exports);
|
|
26
|
-
var import_fetch = require("@blimu/fetch");
|
|
27
26
|
var EntitlementsService = class {
|
|
28
27
|
constructor(core) {
|
|
29
28
|
this.core = core;
|