@blimu/backend 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +238 -0
- package/dist/client.d.ts +64 -0
- package/dist/client.js +133 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- package/dist/schema.d.ts +381 -0
- package/dist/schema.js +3 -0
- package/dist/schema.js.map +1 -0
- package/dist/services/authentication.d.ts +8 -0
- package/dist/services/authentication.js +28 -0
- package/dist/services/authentication.js.map +1 -0
- package/dist/services/bulk_roles.d.ts +7 -0
- package/dist/services/bulk_roles.js +19 -0
- package/dist/services/bulk_roles.js.map +1 -0
- package/dist/services/definitions.d.ts +11 -0
- package/dist/services/definitions.js +51 -0
- package/dist/services/definitions.js.map +1 -0
- package/dist/services/entitlements.d.ts +7 -0
- package/dist/services/entitlements.js +19 -0
- package/dist/services/entitlements.js.map +1 -0
- package/dist/services/jwk.d.ts +6 -0
- package/dist/services/jwk.js +17 -0
- package/dist/services/jwk.js.map +1 -0
- package/dist/services/public_authentication.d.ts +9 -0
- package/dist/services/public_authentication.js +35 -0
- package/dist/services/public_authentication.js.map +1 -0
- package/dist/services/public_environment.d.ts +8 -0
- package/dist/services/public_environment.js +24 -0
- package/dist/services/public_environment.js.map +1 -0
- package/dist/services/resources.d.ts +11 -0
- package/dist/services/resources.js +50 -0
- package/dist/services/resources.js.map +1 -0
- package/dist/services/roles.d.ts +9 -0
- package/dist/services/roles.js +34 -0
- package/dist/services/roles.js.map +1 -0
- package/dist/services/users.d.ts +12 -0
- package/dist/services/users.js +57 -0
- package/dist/services/users.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utils.d.ts +16 -0
- package/dist/utils.js +26 -0
- package/dist/utils.js.map +1 -0
- package/package.json +46 -0
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
export type Enum<T> = T[keyof T];
|
|
2
|
+
export interface AuthLoginBody {
|
|
3
|
+
email: string;
|
|
4
|
+
password: string;
|
|
5
|
+
rememberMe?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface AuthRegisterBody {
|
|
8
|
+
email: string;
|
|
9
|
+
firstName?: string;
|
|
10
|
+
lastName?: string;
|
|
11
|
+
password: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AuthResponse {
|
|
14
|
+
expiresAt: string;
|
|
15
|
+
sessionToken: string;
|
|
16
|
+
user: {
|
|
17
|
+
email: string;
|
|
18
|
+
emailVerified: boolean;
|
|
19
|
+
firstName: string | null;
|
|
20
|
+
id: string;
|
|
21
|
+
lastName: string | null;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface Branding {
|
|
25
|
+
backgroundGradient: string | null;
|
|
26
|
+
backgroundImageUrl: string | null;
|
|
27
|
+
brandName: string;
|
|
28
|
+
customCss: string;
|
|
29
|
+
customDomains: Array<string>;
|
|
30
|
+
customJs: string;
|
|
31
|
+
environmentId: string;
|
|
32
|
+
faviconUrl: string;
|
|
33
|
+
fontFamily: string;
|
|
34
|
+
footerText: string | null;
|
|
35
|
+
layoutType: string;
|
|
36
|
+
loginSubtitle: string | null;
|
|
37
|
+
loginTitle: string;
|
|
38
|
+
logoUrl: string | null;
|
|
39
|
+
primaryColor: string;
|
|
40
|
+
primaryDomain: string | null;
|
|
41
|
+
registerSubtitle: string | null;
|
|
42
|
+
registerTitle: string;
|
|
43
|
+
secondaryColor: string;
|
|
44
|
+
showForgotPassword: boolean;
|
|
45
|
+
showRememberMe: boolean;
|
|
46
|
+
showSignup: boolean;
|
|
47
|
+
socialProviders: Record<string, unknown>;
|
|
48
|
+
}
|
|
49
|
+
export interface ConsentForm {
|
|
50
|
+
action: 'allow' | 'deny';
|
|
51
|
+
client_id: string;
|
|
52
|
+
code_challenge?: string;
|
|
53
|
+
code_challenge_method?: string;
|
|
54
|
+
redirect_uri: string;
|
|
55
|
+
response_type: string;
|
|
56
|
+
scope?: string;
|
|
57
|
+
state?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface Definition {
|
|
60
|
+
entitlements: Record<string, unknown>;
|
|
61
|
+
features?: Record<string, unknown>;
|
|
62
|
+
namespace?: string;
|
|
63
|
+
plans?: Record<string, unknown>;
|
|
64
|
+
resources: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
export interface DefinitionCustomTypesResponse {
|
|
67
|
+
components: {
|
|
68
|
+
schemas: Record<string, unknown>;
|
|
69
|
+
};
|
|
70
|
+
info: {
|
|
71
|
+
description?: string;
|
|
72
|
+
title: string;
|
|
73
|
+
version: string;
|
|
74
|
+
};
|
|
75
|
+
openapi: string;
|
|
76
|
+
}
|
|
77
|
+
export interface DefinitionGenerateSDKBody {
|
|
78
|
+
entitlements?: Record<string, unknown>;
|
|
79
|
+
features?: Record<string, unknown>;
|
|
80
|
+
namespace?: string;
|
|
81
|
+
plans?: Record<string, unknown>;
|
|
82
|
+
resources: Record<string, unknown>;
|
|
83
|
+
sdk_options: {
|
|
84
|
+
client_name: string;
|
|
85
|
+
module_type?: 'runtime' | 'runtime-client';
|
|
86
|
+
package_name: string;
|
|
87
|
+
type: string;
|
|
88
|
+
};
|
|
89
|
+
version?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface DefinitionGenerateSDKResponse {
|
|
92
|
+
errors?: Array<{
|
|
93
|
+
field: string;
|
|
94
|
+
message: string;
|
|
95
|
+
resource: string;
|
|
96
|
+
}>;
|
|
97
|
+
spec: Record<string, unknown>;
|
|
98
|
+
success: boolean;
|
|
99
|
+
}
|
|
100
|
+
export interface DefinitionValidateBody {
|
|
101
|
+
entitlements?: Record<string, unknown>;
|
|
102
|
+
features?: Record<string, unknown>;
|
|
103
|
+
namespace?: string;
|
|
104
|
+
plans?: Record<string, unknown>;
|
|
105
|
+
resources: Record<string, unknown>;
|
|
106
|
+
version?: string;
|
|
107
|
+
}
|
|
108
|
+
export interface DefinitionValidateResponse {
|
|
109
|
+
errors: Array<{
|
|
110
|
+
field: string;
|
|
111
|
+
message: string;
|
|
112
|
+
resource: string;
|
|
113
|
+
}>;
|
|
114
|
+
spec?: Record<string, unknown>;
|
|
115
|
+
valid: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface EntitlementCheckBody {
|
|
118
|
+
entitlement: EntitlementType;
|
|
119
|
+
resourceId: string;
|
|
120
|
+
userId: string;
|
|
121
|
+
}
|
|
122
|
+
export interface EntitlementCheckResult {
|
|
123
|
+
allowed: boolean;
|
|
124
|
+
reason?: string;
|
|
125
|
+
requiredRoles?: Array<string>;
|
|
126
|
+
userRoles?: Array<string>;
|
|
127
|
+
}
|
|
128
|
+
export type EntitlementType = string;
|
|
129
|
+
export interface EnvironmentByDomain {
|
|
130
|
+
environmentId: string;
|
|
131
|
+
}
|
|
132
|
+
export interface OAuthApplication {
|
|
133
|
+
applicationType: string;
|
|
134
|
+
clientId: string;
|
|
135
|
+
id: string;
|
|
136
|
+
isPublic: boolean;
|
|
137
|
+
name: string;
|
|
138
|
+
redirectUris: Array<string>;
|
|
139
|
+
scopes: Array<string>;
|
|
140
|
+
skipConsent: boolean;
|
|
141
|
+
trustedScopes: Array<string>;
|
|
142
|
+
}
|
|
143
|
+
export interface OAuthTokenBody {
|
|
144
|
+
client_id: string;
|
|
145
|
+
client_secret?: string;
|
|
146
|
+
code?: string;
|
|
147
|
+
code_verifier?: string;
|
|
148
|
+
grant_type: 'authorization_code' | 'refresh_token';
|
|
149
|
+
redirect_uri?: string;
|
|
150
|
+
refresh_token?: string;
|
|
151
|
+
}
|
|
152
|
+
export interface Resource {
|
|
153
|
+
createdAt: string;
|
|
154
|
+
extraFields?: Record<string, unknown>;
|
|
155
|
+
id: string;
|
|
156
|
+
name: string | null;
|
|
157
|
+
parents?: Array<{
|
|
158
|
+
id: string;
|
|
159
|
+
type: ResourceType;
|
|
160
|
+
}>;
|
|
161
|
+
type: ResourceType;
|
|
162
|
+
}
|
|
163
|
+
export interface ResourceBulkCreateBody {
|
|
164
|
+
resources: Array<{
|
|
165
|
+
id?: string;
|
|
166
|
+
name?: string;
|
|
167
|
+
parents?: Array<{
|
|
168
|
+
id: string;
|
|
169
|
+
type: ResourceType;
|
|
170
|
+
}>;
|
|
171
|
+
}>;
|
|
172
|
+
}
|
|
173
|
+
export interface ResourceBulkResult {
|
|
174
|
+
created: Array<{
|
|
175
|
+
environmentId: string;
|
|
176
|
+
id: string;
|
|
177
|
+
type: ResourceType;
|
|
178
|
+
}>;
|
|
179
|
+
errors: Array<{
|
|
180
|
+
error: string;
|
|
181
|
+
index: number;
|
|
182
|
+
resource: {
|
|
183
|
+
id?: string;
|
|
184
|
+
name?: string;
|
|
185
|
+
parents?: Array<{
|
|
186
|
+
id: string;
|
|
187
|
+
type: ResourceType;
|
|
188
|
+
}>;
|
|
189
|
+
};
|
|
190
|
+
}>;
|
|
191
|
+
success: boolean;
|
|
192
|
+
summary: {
|
|
193
|
+
failed: number;
|
|
194
|
+
successful: number;
|
|
195
|
+
total: number;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
export interface ResourceCreateBody {
|
|
199
|
+
extraFields?: Record<string, unknown>;
|
|
200
|
+
id?: string;
|
|
201
|
+
name?: string;
|
|
202
|
+
parents?: Array<{
|
|
203
|
+
id: string;
|
|
204
|
+
type: ResourceType;
|
|
205
|
+
}>;
|
|
206
|
+
}
|
|
207
|
+
export interface ResourceList {
|
|
208
|
+
items: Array<{
|
|
209
|
+
createdAt: string;
|
|
210
|
+
extraFields?: Record<string, unknown>;
|
|
211
|
+
id: string;
|
|
212
|
+
name: string | null;
|
|
213
|
+
parents?: Array<{
|
|
214
|
+
id: string;
|
|
215
|
+
type: ResourceType;
|
|
216
|
+
}>;
|
|
217
|
+
type: ResourceType;
|
|
218
|
+
}>;
|
|
219
|
+
limit: number;
|
|
220
|
+
page: number;
|
|
221
|
+
total: number;
|
|
222
|
+
}
|
|
223
|
+
export type ResourceType = string;
|
|
224
|
+
export interface ResourceUpdateBody {
|
|
225
|
+
extraFields?: Record<string, unknown>;
|
|
226
|
+
parents?: Array<{
|
|
227
|
+
id: string;
|
|
228
|
+
type: ResourceType;
|
|
229
|
+
}>;
|
|
230
|
+
}
|
|
231
|
+
export interface Role {
|
|
232
|
+
createdAt: string;
|
|
233
|
+
environmentId: string;
|
|
234
|
+
resourceId: string;
|
|
235
|
+
resourceType: ResourceType;
|
|
236
|
+
role: string;
|
|
237
|
+
userId: string;
|
|
238
|
+
}
|
|
239
|
+
export interface RoleBulkCreateBody {
|
|
240
|
+
roles: Array<{
|
|
241
|
+
resourceId: string;
|
|
242
|
+
resourceType: ResourceType;
|
|
243
|
+
role: string;
|
|
244
|
+
userId: string;
|
|
245
|
+
}>;
|
|
246
|
+
}
|
|
247
|
+
export interface RoleBulkResult {
|
|
248
|
+
created: Array<{
|
|
249
|
+
createdAt: string;
|
|
250
|
+
environmentId: string;
|
|
251
|
+
resourceId: string;
|
|
252
|
+
resourceType: ResourceType;
|
|
253
|
+
role: string;
|
|
254
|
+
userId: string;
|
|
255
|
+
}>;
|
|
256
|
+
errors: Array<{
|
|
257
|
+
error: string;
|
|
258
|
+
index: number;
|
|
259
|
+
role: {
|
|
260
|
+
resourceId: string;
|
|
261
|
+
resourceType: ResourceType;
|
|
262
|
+
role: string;
|
|
263
|
+
userId: string;
|
|
264
|
+
};
|
|
265
|
+
}>;
|
|
266
|
+
success: boolean;
|
|
267
|
+
summary: {
|
|
268
|
+
failed: number;
|
|
269
|
+
successful: number;
|
|
270
|
+
total: number;
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
export interface RoleCreateBody {
|
|
274
|
+
resourceId: string;
|
|
275
|
+
resourceType: ResourceType;
|
|
276
|
+
role: string;
|
|
277
|
+
}
|
|
278
|
+
export interface RoleList {
|
|
279
|
+
limit: number;
|
|
280
|
+
page: number;
|
|
281
|
+
roles: Array<{
|
|
282
|
+
createdAt: string;
|
|
283
|
+
environmentId: string;
|
|
284
|
+
resourceId: string;
|
|
285
|
+
resourceType: ResourceType;
|
|
286
|
+
role: string;
|
|
287
|
+
userId: string;
|
|
288
|
+
}>;
|
|
289
|
+
total: number;
|
|
290
|
+
}
|
|
291
|
+
export interface SessionUser {
|
|
292
|
+
email: string;
|
|
293
|
+
emailVerified: boolean;
|
|
294
|
+
firstName: string | null;
|
|
295
|
+
id: string;
|
|
296
|
+
lastName: string | null;
|
|
297
|
+
}
|
|
298
|
+
export interface TokenResponse {
|
|
299
|
+
access_token: string;
|
|
300
|
+
expires_in: number;
|
|
301
|
+
refresh_token: string;
|
|
302
|
+
scope?: string;
|
|
303
|
+
token_type: string;
|
|
304
|
+
}
|
|
305
|
+
export interface User {
|
|
306
|
+
avatarUrl: string | null;
|
|
307
|
+
createdAt: string;
|
|
308
|
+
email: string;
|
|
309
|
+
emailVerified: boolean;
|
|
310
|
+
environmentId: string;
|
|
311
|
+
firstName: string | null;
|
|
312
|
+
id: string;
|
|
313
|
+
lastLoginAt: string | null;
|
|
314
|
+
lastName: string | null;
|
|
315
|
+
lookupKey: string;
|
|
316
|
+
updatedAt: string;
|
|
317
|
+
}
|
|
318
|
+
export interface UserCreateBody {
|
|
319
|
+
avatarUrl?: string;
|
|
320
|
+
email: string;
|
|
321
|
+
firstName?: string;
|
|
322
|
+
key: string;
|
|
323
|
+
lastName?: string;
|
|
324
|
+
password: string;
|
|
325
|
+
}
|
|
326
|
+
export interface UserList {
|
|
327
|
+
items: Array<{
|
|
328
|
+
avatarUrl: string | null;
|
|
329
|
+
createdAt: string;
|
|
330
|
+
email: string;
|
|
331
|
+
emailVerified: boolean;
|
|
332
|
+
environmentId: string;
|
|
333
|
+
firstName: string | null;
|
|
334
|
+
id: string;
|
|
335
|
+
lastLoginAt: string | null;
|
|
336
|
+
lastName: string | null;
|
|
337
|
+
lookupKey: string;
|
|
338
|
+
updatedAt: string;
|
|
339
|
+
}>;
|
|
340
|
+
limit: number;
|
|
341
|
+
page: number;
|
|
342
|
+
total: number;
|
|
343
|
+
}
|
|
344
|
+
export type UserResourceList = Array<{
|
|
345
|
+
inherited: boolean;
|
|
346
|
+
resource: {
|
|
347
|
+
id: string;
|
|
348
|
+
name: string;
|
|
349
|
+
parents: Array<{
|
|
350
|
+
id: string;
|
|
351
|
+
type: ResourceType;
|
|
352
|
+
}>;
|
|
353
|
+
type: ResourceType;
|
|
354
|
+
};
|
|
355
|
+
role: string;
|
|
356
|
+
}>;
|
|
357
|
+
export interface UserUpdateBody {
|
|
358
|
+
avatarUrl?: string | null;
|
|
359
|
+
email?: string;
|
|
360
|
+
firstName?: string | null;
|
|
361
|
+
key?: string;
|
|
362
|
+
lastName?: string | null;
|
|
363
|
+
password?: string;
|
|
364
|
+
}
|
|
365
|
+
export interface ResourcesListQuery {
|
|
366
|
+
limit?: number;
|
|
367
|
+
page?: number;
|
|
368
|
+
search?: string;
|
|
369
|
+
}
|
|
370
|
+
export interface RolesListQuery {
|
|
371
|
+
limit?: number;
|
|
372
|
+
page?: number;
|
|
373
|
+
resourceId?: string;
|
|
374
|
+
resourceType?: ResourceType;
|
|
375
|
+
role?: string;
|
|
376
|
+
}
|
|
377
|
+
export interface UsersListQuery {
|
|
378
|
+
limit?: number;
|
|
379
|
+
page?: number;
|
|
380
|
+
search?: string;
|
|
381
|
+
}
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CoreClient } from '../client';
|
|
2
|
+
import * as Schema from '../schema';
|
|
3
|
+
export declare class AuthenticationService {
|
|
4
|
+
private core;
|
|
5
|
+
constructor(core: CoreClient);
|
|
6
|
+
login(body: Schema.AuthLoginBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.AuthResponse>;
|
|
7
|
+
register(body: Schema.AuthRegisterBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.AuthResponse>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthenticationService = void 0;
|
|
4
|
+
class AuthenticationService {
|
|
5
|
+
constructor(core) {
|
|
6
|
+
this.core = core;
|
|
7
|
+
}
|
|
8
|
+
login(body, init) {
|
|
9
|
+
return this.core.request({
|
|
10
|
+
method: 'POST',
|
|
11
|
+
path: `/v1/server/auth/login`,
|
|
12
|
+
headers: { ...(init?.headers || {}), 'content-type': 'application/json' },
|
|
13
|
+
body: JSON.stringify(body),
|
|
14
|
+
...(init || {}),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
register(body, init) {
|
|
18
|
+
return this.core.request({
|
|
19
|
+
method: 'POST',
|
|
20
|
+
path: `/v1/server/auth/register`,
|
|
21
|
+
headers: { ...(init?.headers || {}), 'content-type': 'application/json' },
|
|
22
|
+
body: JSON.stringify(body),
|
|
23
|
+
...(init || {}),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.AuthenticationService = AuthenticationService;
|
|
28
|
+
//# sourceMappingURL=authentication.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../src/services/authentication.ts"],"names":[],"mappings":";;;AAGA,MAAa,qBAAqB;IAChC,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAMxC,KAAK,CACH,IAA0B,EAC1B,IAA2C;QAE3C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,uBAAuB;YAC7B,OAAO,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE;YACzE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAC1B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;IAMD,QAAQ,CACN,IAA6B,EAC7B,IAA2C;QAE3C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE;YACzE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAC1B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AApCD,sDAoCC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CoreClient } from '../client';
|
|
2
|
+
import * as Schema from '../schema';
|
|
3
|
+
export declare class BulkRolesService {
|
|
4
|
+
private core;
|
|
5
|
+
constructor(core: CoreClient);
|
|
6
|
+
create(body: Schema.RoleBulkCreateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.RoleBulkResult>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BulkRolesService = void 0;
|
|
4
|
+
class BulkRolesService {
|
|
5
|
+
constructor(core) {
|
|
6
|
+
this.core = core;
|
|
7
|
+
}
|
|
8
|
+
create(body, init) {
|
|
9
|
+
return this.core.request({
|
|
10
|
+
method: 'POST',
|
|
11
|
+
path: `/v1/users/roles/bulk`,
|
|
12
|
+
headers: { ...(init?.headers || {}), 'content-type': 'application/json' },
|
|
13
|
+
body: JSON.stringify(body),
|
|
14
|
+
...(init || {}),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.BulkRolesService = BulkRolesService;
|
|
19
|
+
//# sourceMappingURL=bulk_roles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk_roles.js","sourceRoot":"","sources":["../../src/services/bulk_roles.ts"],"names":[],"mappings":";;;AAGA,MAAa,gBAAgB;IAC3B,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAMxC,MAAM,CACJ,IAA+B,EAC/B,IAA2C;QAE3C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE;YACzE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAC1B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AAnBD,4CAmBC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CoreClient } from '../client';
|
|
2
|
+
import * as Schema from '../schema';
|
|
3
|
+
export declare class DefinitionsService {
|
|
4
|
+
private core;
|
|
5
|
+
constructor(core: CoreClient);
|
|
6
|
+
get(init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.Definition>;
|
|
7
|
+
update(body: Schema.Definition, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.Definition>;
|
|
8
|
+
getCustomTypes(init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.DefinitionCustomTypesResponse>;
|
|
9
|
+
getOpenApi(body: Schema.DefinitionGenerateSDKBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.DefinitionGenerateSDKResponse>;
|
|
10
|
+
validate(body: Schema.DefinitionValidateBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.DefinitionValidateResponse>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DefinitionsService = void 0;
|
|
4
|
+
class DefinitionsService {
|
|
5
|
+
constructor(core) {
|
|
6
|
+
this.core = core;
|
|
7
|
+
}
|
|
8
|
+
get(init) {
|
|
9
|
+
return this.core.request({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
path: `/v1/definitions`,
|
|
12
|
+
...(init || {}),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
update(body, init) {
|
|
16
|
+
return this.core.request({
|
|
17
|
+
method: 'PUT',
|
|
18
|
+
path: `/v1/definitions`,
|
|
19
|
+
headers: { ...(init?.headers || {}), 'content-type': 'application/json' },
|
|
20
|
+
body: JSON.stringify(body),
|
|
21
|
+
...(init || {}),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
getCustomTypes(init) {
|
|
25
|
+
return this.core.request({
|
|
26
|
+
method: 'GET',
|
|
27
|
+
path: `/v1/definitions/custom-types`,
|
|
28
|
+
...(init || {}),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
getOpenApi(body, init) {
|
|
32
|
+
return this.core.request({
|
|
33
|
+
method: 'POST',
|
|
34
|
+
path: `/v1/definitions/openapi`,
|
|
35
|
+
headers: { ...(init?.headers || {}), 'content-type': 'application/json' },
|
|
36
|
+
body: JSON.stringify(body),
|
|
37
|
+
...(init || {}),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
validate(body, init) {
|
|
41
|
+
return this.core.request({
|
|
42
|
+
method: 'POST',
|
|
43
|
+
path: `/v1/definitions/validate`,
|
|
44
|
+
headers: { ...(init?.headers || {}), 'content-type': 'application/json' },
|
|
45
|
+
body: JSON.stringify(body),
|
|
46
|
+
...(init || {}),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.DefinitionsService = DefinitionsService;
|
|
51
|
+
//# sourceMappingURL=definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/services/definitions.ts"],"names":[],"mappings":";;;AAGA,MAAa,kBAAkB;IAC7B,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAMxC,GAAG,CAAC,IAA2C;QAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB;YACvB,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;IAMD,MAAM,CACJ,IAAuB,EACvB,IAA2C;QAE3C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE;YACzE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAC1B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;IAQD,cAAc,CACZ,IAA2C;QAE3C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,8BAA8B;YACpC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;IAQD,UAAU,CACR,IAAsC,EACtC,IAA2C;QAE3C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,yBAAyB;YAC/B,OAAO,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE;YACzE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAC1B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;IAQD,QAAQ,CACN,IAAmC,EACnC,IAA2C;QAE3C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE;YACzE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAC1B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AArFD,gDAqFC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CoreClient } from '../client';
|
|
2
|
+
import * as Schema from '../schema';
|
|
3
|
+
export declare class EntitlementsService {
|
|
4
|
+
private core;
|
|
5
|
+
constructor(core: CoreClient);
|
|
6
|
+
checkEntitlement(body: Schema.EntitlementCheckBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.EntitlementCheckResult>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntitlementsService = void 0;
|
|
4
|
+
class EntitlementsService {
|
|
5
|
+
constructor(core) {
|
|
6
|
+
this.core = core;
|
|
7
|
+
}
|
|
8
|
+
checkEntitlement(body, init) {
|
|
9
|
+
return this.core.request({
|
|
10
|
+
method: 'POST',
|
|
11
|
+
path: `/v1/entitlements/check`,
|
|
12
|
+
headers: { ...(init?.headers || {}), 'content-type': 'application/json' },
|
|
13
|
+
body: JSON.stringify(body),
|
|
14
|
+
...(init || {}),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.EntitlementsService = EntitlementsService;
|
|
19
|
+
//# sourceMappingURL=entitlements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../src/services/entitlements.ts"],"names":[],"mappings":";;;AAGA,MAAa,mBAAmB;IAC9B,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAMxC,gBAAgB,CACd,IAAiC,EACjC,IAA2C;QAE3C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,wBAAwB;YAC9B,OAAO,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE;YACzE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAC1B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AAnBD,kDAmBC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JwkService = void 0;
|
|
4
|
+
class JwkService {
|
|
5
|
+
constructor(core) {
|
|
6
|
+
this.core = core;
|
|
7
|
+
}
|
|
8
|
+
getJwks(init) {
|
|
9
|
+
return this.core.request({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
path: `/v1/.well-known/jwks.json`,
|
|
12
|
+
...(init || {}),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.JwkService = JwkService;
|
|
17
|
+
//# sourceMappingURL=jwk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwk.js","sourceRoot":"","sources":["../../src/services/jwk.ts"],"names":[],"mappings":";;;AAGA,MAAa,UAAU;IACrB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAQxC,OAAO,CAAC,IAA2C;QACjD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,2BAA2B;YACjC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AAhBD,gCAgBC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CoreClient } from '../client';
|
|
2
|
+
import * as Schema from '../schema';
|
|
3
|
+
export declare class PublicAuthenticationService {
|
|
4
|
+
private core;
|
|
5
|
+
constructor(core: CoreClient);
|
|
6
|
+
login(body: Schema.AuthLoginBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.AuthResponse>;
|
|
7
|
+
logout(init?: Omit<RequestInit, 'method' | 'body'>): Promise<unknown>;
|
|
8
|
+
register(body: Schema.AuthRegisterBody, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.AuthResponse>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PublicAuthenticationService = void 0;
|
|
4
|
+
class PublicAuthenticationService {
|
|
5
|
+
constructor(core) {
|
|
6
|
+
this.core = core;
|
|
7
|
+
}
|
|
8
|
+
login(body, init) {
|
|
9
|
+
return this.core.request({
|
|
10
|
+
method: 'POST',
|
|
11
|
+
path: `/v1/public/auth/login`,
|
|
12
|
+
headers: { ...(init?.headers || {}), 'content-type': 'application/json' },
|
|
13
|
+
body: JSON.stringify(body),
|
|
14
|
+
...(init || {}),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
logout(init) {
|
|
18
|
+
return this.core.request({
|
|
19
|
+
method: 'POST',
|
|
20
|
+
path: `/v1/public/auth/logout`,
|
|
21
|
+
...(init || {}),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
register(body, init) {
|
|
25
|
+
return this.core.request({
|
|
26
|
+
method: 'POST',
|
|
27
|
+
path: `/v1/public/auth/register`,
|
|
28
|
+
headers: { ...(init?.headers || {}), 'content-type': 'application/json' },
|
|
29
|
+
body: JSON.stringify(body),
|
|
30
|
+
...(init || {}),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.PublicAuthenticationService = PublicAuthenticationService;
|
|
35
|
+
//# sourceMappingURL=public_authentication.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public_authentication.js","sourceRoot":"","sources":["../../src/services/public_authentication.ts"],"names":[],"mappings":";;;AAGA,MAAa,2BAA2B;IACtC,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAMxC,KAAK,CACH,IAA0B,EAC1B,IAA2C;QAE3C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,uBAAuB;YAC7B,OAAO,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE;YACzE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAC1B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;IAMD,MAAM,CAAC,IAA2C;QAChD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,wBAAwB;YAC9B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;IAMD,QAAQ,CACN,IAA6B,EAC7B,IAA2C;QAE3C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE;YACzE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAC1B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AAhDD,kEAgDC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CoreClient } from '../client';
|
|
2
|
+
import * as Schema from '../schema';
|
|
3
|
+
export declare class PublicEnvironmentService {
|
|
4
|
+
private core;
|
|
5
|
+
constructor(core: CoreClient);
|
|
6
|
+
getByDomain(domain: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.EnvironmentByDomain>;
|
|
7
|
+
getBranding(environmentId: string, init?: Omit<RequestInit, 'method' | 'body'>): Promise<Schema.Branding>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PublicEnvironmentService = void 0;
|
|
4
|
+
class PublicEnvironmentService {
|
|
5
|
+
constructor(core) {
|
|
6
|
+
this.core = core;
|
|
7
|
+
}
|
|
8
|
+
getByDomain(domain, init) {
|
|
9
|
+
return this.core.request({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
path: `/v1/public/environments/by-domain/${encodeURIComponent(domain)}`,
|
|
12
|
+
...(init || {}),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
getBranding(environmentId, init) {
|
|
16
|
+
return this.core.request({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: `/v1/public/environments/${encodeURIComponent(environmentId)}/branding`,
|
|
19
|
+
...(init || {}),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.PublicEnvironmentService = PublicEnvironmentService;
|
|
24
|
+
//# sourceMappingURL=public_environment.js.map
|