@forklaunch/implementation-iam-base 0.3.2 → 0.3.3
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/lib/domain/schemas/index.d.mts +847 -0
- package/lib/domain/schemas/index.d.ts +847 -0
- package/lib/{schemas → domain/schemas}/index.js +113 -79
- package/lib/{schemas → domain/schemas}/index.mjs +59 -55
- package/lib/eject/services/organization.service.ts +2 -2
- package/lib/eject/services/permission.service.ts +2 -2
- package/lib/eject/services/role.service.ts +2 -2
- package/lib/eject/services/user.service.ts +2 -2
- package/lib/services/index.d.mts +475 -147
- package/lib/services/index.d.ts +475 -147
- package/lib/services/index.js +225 -180
- package/lib/services/index.mjs +194 -182
- package/package.json +12 -6
- package/lib/schemas/index.d.mts +0 -474
- package/lib/schemas/index.d.ts +0 -474
- /package/lib/eject/{types → domain/types}/iamDto.types.ts +0 -0
- /package/lib/eject/{types → domain/types}/iamEntities.types.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -8,16 +8,20 @@ var __export = (target, all) => {
|
|
|
8
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
9
|
};
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from ===
|
|
11
|
+
if ((from && typeof from === 'object') || typeof from === 'function') {
|
|
12
12
|
for (let key of __getOwnPropNames(from))
|
|
13
13
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, {
|
|
14
|
+
__defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
15
18
|
}
|
|
16
19
|
return to;
|
|
17
20
|
};
|
|
18
|
-
var __toCommonJS = (mod) =>
|
|
21
|
+
var __toCommonJS = (mod) =>
|
|
22
|
+
__copyProps(__defProp({}, '__esModule', { value: true }), mod);
|
|
19
23
|
|
|
20
|
-
// schemas/index.ts
|
|
24
|
+
// domain/schemas/index.ts
|
|
21
25
|
var schemas_exports = {};
|
|
22
26
|
__export(schemas_exports, {
|
|
23
27
|
BaseOrganizationServiceSchemas: () => BaseOrganizationServiceSchemas3,
|
|
@@ -27,31 +31,37 @@ __export(schemas_exports, {
|
|
|
27
31
|
});
|
|
28
32
|
module.exports = __toCommonJS(schemas_exports);
|
|
29
33
|
|
|
30
|
-
// schemas/organization.schema.ts
|
|
31
|
-
var import_internal = require(
|
|
34
|
+
// domain/schemas/organization.schema.ts
|
|
35
|
+
var import_internal = require('@forklaunch/internal');
|
|
32
36
|
|
|
33
|
-
// schemas/typebox/organization.schema.ts
|
|
34
|
-
var import_typebox4 = require(
|
|
37
|
+
// domain/schemas/typebox/organization.schema.ts
|
|
38
|
+
var import_typebox4 = require('@forklaunch/validator/typebox');
|
|
35
39
|
|
|
36
|
-
// schemas/typebox/user.schema.ts
|
|
37
|
-
var import_typebox3 = require(
|
|
40
|
+
// domain/schemas/typebox/user.schema.ts
|
|
41
|
+
var import_typebox3 = require('@forklaunch/validator/typebox');
|
|
38
42
|
|
|
39
|
-
// schemas/typebox/role.schema.ts
|
|
40
|
-
var import_typebox2 = require(
|
|
43
|
+
// domain/schemas/typebox/role.schema.ts
|
|
44
|
+
var import_typebox2 = require('@forklaunch/validator/typebox');
|
|
41
45
|
|
|
42
|
-
// schemas/typebox/permission.schema.ts
|
|
43
|
-
var import_typebox = require(
|
|
46
|
+
// domain/schemas/typebox/permission.schema.ts
|
|
47
|
+
var import_typebox = require('@forklaunch/validator/typebox');
|
|
44
48
|
var CreatePermissionSchema = {
|
|
45
49
|
slug: import_typebox.string,
|
|
46
|
-
addToRolesIds: (0, import_typebox.optional)(
|
|
50
|
+
addToRolesIds: (0, import_typebox.optional)(
|
|
51
|
+
(0, import_typebox.array)(import_typebox.string)
|
|
52
|
+
),
|
|
47
53
|
providerFields: (0, import_typebox.optional)(import_typebox.unknown)
|
|
48
54
|
};
|
|
49
55
|
var UpdatePermissionSchema = ({ uuidId }) => ({
|
|
50
56
|
id: uuidId ? import_typebox.uuid : import_typebox.string,
|
|
51
57
|
slug: (0, import_typebox.optional)(import_typebox.string),
|
|
52
58
|
providerFields: (0, import_typebox.optional)(import_typebox.unknown),
|
|
53
|
-
addToRolesIds: (0, import_typebox.optional)(
|
|
54
|
-
|
|
59
|
+
addToRolesIds: (0, import_typebox.optional)(
|
|
60
|
+
(0, import_typebox.array)(import_typebox.string)
|
|
61
|
+
),
|
|
62
|
+
removeFromRolesIds: (0, import_typebox.optional)(
|
|
63
|
+
(0, import_typebox.array)(import_typebox.string)
|
|
64
|
+
)
|
|
55
65
|
});
|
|
56
66
|
var PermissionSchema = ({ uuidId }) => ({
|
|
57
67
|
id: uuidId ? import_typebox.uuid : import_typebox.string,
|
|
@@ -66,16 +76,20 @@ var BasePermissionServiceSchemas = (options) => ({
|
|
|
66
76
|
PermissionSchema: PermissionSchema(options)
|
|
67
77
|
});
|
|
68
78
|
|
|
69
|
-
// schemas/typebox/role.schema.ts
|
|
79
|
+
// domain/schemas/typebox/role.schema.ts
|
|
70
80
|
var CreateRoleSchema = {
|
|
71
81
|
name: import_typebox2.string,
|
|
72
|
-
permissionIds: (0, import_typebox2.optional)(
|
|
82
|
+
permissionIds: (0, import_typebox2.optional)(
|
|
83
|
+
(0, import_typebox2.array)(import_typebox2.string)
|
|
84
|
+
),
|
|
73
85
|
providerFields: (0, import_typebox2.optional)(import_typebox2.unknown)
|
|
74
86
|
};
|
|
75
87
|
var UpdateRoleSchema = ({ uuidId }) => ({
|
|
76
88
|
id: uuidId ? import_typebox2.uuid : import_typebox2.string,
|
|
77
89
|
name: (0, import_typebox2.optional)(import_typebox2.string),
|
|
78
|
-
permissionIds: (0, import_typebox2.optional)(
|
|
90
|
+
permissionIds: (0, import_typebox2.optional)(
|
|
91
|
+
(0, import_typebox2.array)(import_typebox2.string)
|
|
92
|
+
),
|
|
79
93
|
providerFields: (0, import_typebox2.optional)(import_typebox2.unknown)
|
|
80
94
|
});
|
|
81
95
|
var RoleSchema = ({ uuidId }) => ({
|
|
@@ -92,7 +106,7 @@ var BaseRoleServiceSchemas = (options) => ({
|
|
|
92
106
|
RoleSchema: RoleSchema(options)
|
|
93
107
|
});
|
|
94
108
|
|
|
95
|
-
// schemas/typebox/user.schema.ts
|
|
109
|
+
// domain/schemas/typebox/user.schema.ts
|
|
96
110
|
var CreateUserSchema = {
|
|
97
111
|
email: import_typebox3.email,
|
|
98
112
|
password: import_typebox3.string,
|
|
@@ -110,7 +124,9 @@ var UpdateUserSchema = ({ uuidId }) => ({
|
|
|
110
124
|
password: (0, import_typebox3.optional)(import_typebox3.string),
|
|
111
125
|
firstName: (0, import_typebox3.optional)(import_typebox3.string),
|
|
112
126
|
lastName: (0, import_typebox3.optional)(import_typebox3.string),
|
|
113
|
-
roleIds: (0, import_typebox3.optional)(
|
|
127
|
+
roleIds: (0, import_typebox3.optional)(
|
|
128
|
+
(0, import_typebox3.array)(import_typebox3.string)
|
|
129
|
+
),
|
|
114
130
|
phoneNumber: (0, import_typebox3.optional)(import_typebox3.string),
|
|
115
131
|
subscription: (0, import_typebox3.optional)(import_typebox3.string),
|
|
116
132
|
providerFields: (0, import_typebox3.optional)(import_typebox3.unknown)
|
|
@@ -133,7 +149,7 @@ var BaseUserServiceSchemas = (options) => ({
|
|
|
133
149
|
UserSchema: UserSchema(options)
|
|
134
150
|
});
|
|
135
151
|
|
|
136
|
-
// schemas/typebox/organization.schema.ts
|
|
152
|
+
// domain/schemas/typebox/organization.schema.ts
|
|
137
153
|
var CreateOrganizationSchema = {
|
|
138
154
|
name: import_typebox4.string,
|
|
139
155
|
domain: import_typebox4.string,
|
|
@@ -149,46 +165,54 @@ var UpdateOrganizationSchema = ({ uuidId }) => ({
|
|
|
149
165
|
logoUrl: (0, import_typebox4.optional)(import_typebox4.string),
|
|
150
166
|
providerFields: (0, import_typebox4.optional)(import_typebox4.unknown)
|
|
151
167
|
});
|
|
152
|
-
var OrganizationSchema =
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
168
|
+
var OrganizationSchema =
|
|
169
|
+
({ uuidId }) =>
|
|
170
|
+
(organizationStatus) => ({
|
|
171
|
+
id: uuidId ? import_typebox4.uuid : import_typebox4.string,
|
|
172
|
+
name: import_typebox4.string,
|
|
173
|
+
users: (0, import_typebox4.array)(UserSchema({ uuidId })),
|
|
174
|
+
domain: import_typebox4.string,
|
|
175
|
+
subscription: import_typebox4.string,
|
|
176
|
+
status: (0, import_typebox4.enum_)(organizationStatus),
|
|
177
|
+
logoUrl: (0, import_typebox4.optional)(import_typebox4.string),
|
|
178
|
+
providerFields: (0, import_typebox4.optional)(import_typebox4.unknown),
|
|
179
|
+
createdAt: (0, import_typebox4.optional)(import_typebox4.date),
|
|
180
|
+
updatedAt: (0, import_typebox4.optional)(import_typebox4.date)
|
|
181
|
+
});
|
|
164
182
|
var BaseOrganizationServiceSchemas = (options) => ({
|
|
165
183
|
CreateOrganizationSchema,
|
|
166
184
|
UpdateOrganizationSchema: UpdateOrganizationSchema(options),
|
|
167
185
|
OrganizationSchema: OrganizationSchema(options)
|
|
168
186
|
});
|
|
169
187
|
|
|
170
|
-
// schemas/zod/organization.schema.ts
|
|
171
|
-
var import_zod4 = require(
|
|
188
|
+
// domain/schemas/zod/organization.schema.ts
|
|
189
|
+
var import_zod4 = require('@forklaunch/validator/zod');
|
|
172
190
|
|
|
173
|
-
// schemas/zod/user.schema.ts
|
|
174
|
-
var import_zod3 = require(
|
|
191
|
+
// domain/schemas/zod/user.schema.ts
|
|
192
|
+
var import_zod3 = require('@forklaunch/validator/zod');
|
|
175
193
|
|
|
176
|
-
// schemas/zod/role.schema.ts
|
|
177
|
-
var import_zod2 = require(
|
|
194
|
+
// domain/schemas/zod/role.schema.ts
|
|
195
|
+
var import_zod2 = require('@forklaunch/validator/zod');
|
|
178
196
|
|
|
179
|
-
// schemas/zod/permission.schema.ts
|
|
180
|
-
var import_zod = require(
|
|
197
|
+
// domain/schemas/zod/permission.schema.ts
|
|
198
|
+
var import_zod = require('@forklaunch/validator/zod');
|
|
181
199
|
var CreatePermissionSchema2 = {
|
|
182
200
|
slug: import_zod.string,
|
|
183
|
-
addToRolesIds: (0, import_zod.optional)(
|
|
201
|
+
addToRolesIds: (0, import_zod.optional)(
|
|
202
|
+
(0, import_zod.array)(import_zod.string)
|
|
203
|
+
),
|
|
184
204
|
providerFields: (0, import_zod.optional)(import_zod.unknown)
|
|
185
205
|
};
|
|
186
206
|
var UpdatePermissionSchema2 = ({ uuidId }) => ({
|
|
187
207
|
id: uuidId ? import_zod.uuid : import_zod.string,
|
|
188
208
|
slug: (0, import_zod.optional)(import_zod.string),
|
|
189
209
|
providerFields: (0, import_zod.optional)(import_zod.unknown),
|
|
190
|
-
addToRolesIds: (0, import_zod.optional)(
|
|
191
|
-
|
|
210
|
+
addToRolesIds: (0, import_zod.optional)(
|
|
211
|
+
(0, import_zod.array)(import_zod.string)
|
|
212
|
+
),
|
|
213
|
+
removeFromRolesIds: (0, import_zod.optional)(
|
|
214
|
+
(0, import_zod.array)(import_zod.string)
|
|
215
|
+
)
|
|
192
216
|
});
|
|
193
217
|
var PermissionSchema2 = ({ uuidId }) => ({
|
|
194
218
|
id: uuidId ? import_zod.uuid : import_zod.string,
|
|
@@ -203,16 +227,20 @@ var BasePermissionServiceSchemas2 = (options) => ({
|
|
|
203
227
|
PermissionSchema: PermissionSchema2(options)
|
|
204
228
|
});
|
|
205
229
|
|
|
206
|
-
// schemas/zod/role.schema.ts
|
|
230
|
+
// domain/schemas/zod/role.schema.ts
|
|
207
231
|
var CreateRoleSchema2 = {
|
|
208
232
|
name: import_zod2.string,
|
|
209
|
-
permissionIds: (0, import_zod2.optional)(
|
|
233
|
+
permissionIds: (0, import_zod2.optional)(
|
|
234
|
+
(0, import_zod2.array)(import_zod2.string)
|
|
235
|
+
),
|
|
210
236
|
providerFields: (0, import_zod2.optional)(import_zod2.unknown)
|
|
211
237
|
};
|
|
212
238
|
var UpdateRoleSchema2 = ({ uuidId }) => ({
|
|
213
239
|
id: uuidId ? import_zod2.uuid : import_zod2.string,
|
|
214
240
|
name: (0, import_zod2.optional)(import_zod2.string),
|
|
215
|
-
permissionIds: (0, import_zod2.optional)(
|
|
241
|
+
permissionIds: (0, import_zod2.optional)(
|
|
242
|
+
(0, import_zod2.array)(import_zod2.string)
|
|
243
|
+
),
|
|
216
244
|
providerFields: (0, import_zod2.optional)(import_zod2.unknown)
|
|
217
245
|
});
|
|
218
246
|
var RoleSchema2 = ({ uuidId }) => ({
|
|
@@ -229,7 +257,7 @@ var BaseRoleServiceSchemas2 = (options) => ({
|
|
|
229
257
|
RoleSchema: RoleSchema2(options)
|
|
230
258
|
});
|
|
231
259
|
|
|
232
|
-
// schemas/zod/user.schema.ts
|
|
260
|
+
// domain/schemas/zod/user.schema.ts
|
|
233
261
|
var CreateUserSchema2 = {
|
|
234
262
|
email: import_zod3.email,
|
|
235
263
|
password: import_zod3.string,
|
|
@@ -247,7 +275,9 @@ var UpdateUserSchema2 = ({ uuidId }) => ({
|
|
|
247
275
|
password: (0, import_zod3.optional)(import_zod3.string),
|
|
248
276
|
firstName: (0, import_zod3.optional)(import_zod3.string),
|
|
249
277
|
lastName: (0, import_zod3.optional)(import_zod3.string),
|
|
250
|
-
roleIds: (0, import_zod3.optional)(
|
|
278
|
+
roleIds: (0, import_zod3.optional)(
|
|
279
|
+
(0, import_zod3.array)(import_zod3.string)
|
|
280
|
+
),
|
|
251
281
|
phoneNumber: (0, import_zod3.optional)(import_zod3.string),
|
|
252
282
|
subscription: (0, import_zod3.optional)(import_zod3.string),
|
|
253
283
|
providerFields: (0, import_zod3.optional)(import_zod3.unknown)
|
|
@@ -270,7 +300,7 @@ var BaseUserServiceSchemas2 = (options) => ({
|
|
|
270
300
|
UserSchema: UserSchema2(options)
|
|
271
301
|
});
|
|
272
302
|
|
|
273
|
-
// schemas/zod/organization.schema.ts
|
|
303
|
+
// domain/schemas/zod/organization.schema.ts
|
|
274
304
|
var CreateOrganizationSchema2 = {
|
|
275
305
|
name: import_zod4.string,
|
|
276
306
|
domain: import_zod4.string,
|
|
@@ -286,54 +316,58 @@ var UpdateOrganizationSchema2 = ({ uuidId }) => ({
|
|
|
286
316
|
logoUrl: (0, import_zod4.optional)(import_zod4.string),
|
|
287
317
|
providerFields: (0, import_zod4.optional)(import_zod4.unknown)
|
|
288
318
|
});
|
|
289
|
-
var OrganizationSchema2 =
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
319
|
+
var OrganizationSchema2 =
|
|
320
|
+
({ uuidId }) =>
|
|
321
|
+
(organizationStatus) => ({
|
|
322
|
+
id: uuidId ? import_zod4.uuid : import_zod4.string,
|
|
323
|
+
name: import_zod4.string,
|
|
324
|
+
users: (0, import_zod4.array)(UserSchema2({ uuidId })),
|
|
325
|
+
domain: import_zod4.string,
|
|
326
|
+
subscription: import_zod4.string,
|
|
327
|
+
status: (0, import_zod4.enum_)(organizationStatus),
|
|
328
|
+
logoUrl: (0, import_zod4.optional)(import_zod4.string),
|
|
329
|
+
providerFields: (0, import_zod4.optional)(import_zod4.unknown),
|
|
330
|
+
createdAt: (0, import_zod4.optional)(import_zod4.date),
|
|
331
|
+
updatedAt: (0, import_zod4.optional)(import_zod4.date)
|
|
332
|
+
});
|
|
301
333
|
var BaseOrganizationServiceSchemas2 = (options) => ({
|
|
302
334
|
CreateOrganizationSchema: CreateOrganizationSchema2,
|
|
303
335
|
UpdateOrganizationSchema: UpdateOrganizationSchema2(options),
|
|
304
336
|
OrganizationSchema: OrganizationSchema2(options)
|
|
305
337
|
});
|
|
306
338
|
|
|
307
|
-
// schemas/organization.schema.ts
|
|
308
|
-
var BaseOrganizationServiceSchemas3 = (0,
|
|
339
|
+
// domain/schemas/organization.schema.ts
|
|
340
|
+
var BaseOrganizationServiceSchemas3 = (0,
|
|
341
|
+
import_internal.serviceSchemaResolver)(
|
|
309
342
|
BaseOrganizationServiceSchemas,
|
|
310
343
|
BaseOrganizationServiceSchemas2
|
|
311
344
|
);
|
|
312
345
|
|
|
313
|
-
// schemas/permission.schema.ts
|
|
314
|
-
var import_internal2 = require(
|
|
346
|
+
// domain/schemas/permission.schema.ts
|
|
347
|
+
var import_internal2 = require('@forklaunch/internal');
|
|
315
348
|
var BasePermissionServiceSchemas3 = (0, import_internal2.serviceSchemaResolver)(
|
|
316
349
|
BasePermissionServiceSchemas,
|
|
317
350
|
BasePermissionServiceSchemas2
|
|
318
351
|
);
|
|
319
352
|
|
|
320
|
-
// schemas/role.schema.ts
|
|
321
|
-
var import_internal3 = require(
|
|
353
|
+
// domain/schemas/role.schema.ts
|
|
354
|
+
var import_internal3 = require('@forklaunch/internal');
|
|
322
355
|
var BaseRoleServiceSchemas3 = (0, import_internal3.serviceSchemaResolver)(
|
|
323
356
|
BaseRoleServiceSchemas,
|
|
324
357
|
BaseRoleServiceSchemas2
|
|
325
358
|
);
|
|
326
359
|
|
|
327
|
-
// schemas/user.schema.ts
|
|
328
|
-
var import_internal4 = require(
|
|
360
|
+
// domain/schemas/user.schema.ts
|
|
361
|
+
var import_internal4 = require('@forklaunch/internal');
|
|
329
362
|
var BaseUserServiceSchemas3 = (0, import_internal4.serviceSchemaResolver)(
|
|
330
363
|
BaseUserServiceSchemas,
|
|
331
364
|
BaseUserServiceSchemas2
|
|
332
365
|
);
|
|
333
366
|
// Annotate the CommonJS export names for ESM import in node:
|
|
334
|
-
0 &&
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
367
|
+
0 &&
|
|
368
|
+
(module.exports = {
|
|
369
|
+
BaseOrganizationServiceSchemas,
|
|
370
|
+
BasePermissionServiceSchemas,
|
|
371
|
+
BaseRoleServiceSchemas,
|
|
372
|
+
BaseUserServiceSchemas
|
|
373
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// schemas/organization.schema.ts
|
|
2
|
-
import { serviceSchemaResolver } from
|
|
1
|
+
// domain/schemas/organization.schema.ts
|
|
2
|
+
import { serviceSchemaResolver } from '@forklaunch/internal';
|
|
3
3
|
|
|
4
|
-
// schemas/typebox/organization.schema.ts
|
|
4
|
+
// domain/schemas/typebox/organization.schema.ts
|
|
5
5
|
import {
|
|
6
6
|
array as array4,
|
|
7
7
|
date as date4,
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
string as string4,
|
|
11
11
|
unknown as unknown4,
|
|
12
12
|
uuid as uuid4
|
|
13
|
-
} from
|
|
13
|
+
} from '@forklaunch/validator/typebox';
|
|
14
14
|
|
|
15
|
-
// schemas/typebox/user.schema.ts
|
|
15
|
+
// domain/schemas/typebox/user.schema.ts
|
|
16
16
|
import {
|
|
17
17
|
array as array3,
|
|
18
18
|
date as date3,
|
|
@@ -21,9 +21,9 @@ import {
|
|
|
21
21
|
string as string3,
|
|
22
22
|
unknown as unknown3,
|
|
23
23
|
uuid as uuid3
|
|
24
|
-
} from
|
|
24
|
+
} from '@forklaunch/validator/typebox';
|
|
25
25
|
|
|
26
|
-
// schemas/typebox/role.schema.ts
|
|
26
|
+
// domain/schemas/typebox/role.schema.ts
|
|
27
27
|
import {
|
|
28
28
|
array as array2,
|
|
29
29
|
date as date2,
|
|
@@ -31,9 +31,9 @@ import {
|
|
|
31
31
|
string as string2,
|
|
32
32
|
unknown as unknown2,
|
|
33
33
|
uuid as uuid2
|
|
34
|
-
} from
|
|
34
|
+
} from '@forklaunch/validator/typebox';
|
|
35
35
|
|
|
36
|
-
// schemas/typebox/permission.schema.ts
|
|
36
|
+
// domain/schemas/typebox/permission.schema.ts
|
|
37
37
|
import {
|
|
38
38
|
array,
|
|
39
39
|
date,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
string,
|
|
42
42
|
unknown,
|
|
43
43
|
uuid
|
|
44
|
-
} from
|
|
44
|
+
} from '@forklaunch/validator/typebox';
|
|
45
45
|
var CreatePermissionSchema = {
|
|
46
46
|
slug: string,
|
|
47
47
|
addToRolesIds: optional(array(string)),
|
|
@@ -67,7 +67,7 @@ var BasePermissionServiceSchemas = (options) => ({
|
|
|
67
67
|
PermissionSchema: PermissionSchema(options)
|
|
68
68
|
});
|
|
69
69
|
|
|
70
|
-
// schemas/typebox/role.schema.ts
|
|
70
|
+
// domain/schemas/typebox/role.schema.ts
|
|
71
71
|
var CreateRoleSchema = {
|
|
72
72
|
name: string2,
|
|
73
73
|
permissionIds: optional2(array2(string2)),
|
|
@@ -93,7 +93,7 @@ var BaseRoleServiceSchemas = (options) => ({
|
|
|
93
93
|
RoleSchema: RoleSchema(options)
|
|
94
94
|
});
|
|
95
95
|
|
|
96
|
-
// schemas/typebox/user.schema.ts
|
|
96
|
+
// domain/schemas/typebox/user.schema.ts
|
|
97
97
|
var CreateUserSchema = {
|
|
98
98
|
email,
|
|
99
99
|
password: string3,
|
|
@@ -134,7 +134,7 @@ var BaseUserServiceSchemas = (options) => ({
|
|
|
134
134
|
UserSchema: UserSchema(options)
|
|
135
135
|
});
|
|
136
136
|
|
|
137
|
-
// schemas/typebox/organization.schema.ts
|
|
137
|
+
// domain/schemas/typebox/organization.schema.ts
|
|
138
138
|
var CreateOrganizationSchema = {
|
|
139
139
|
name: string4,
|
|
140
140
|
domain: string4,
|
|
@@ -150,25 +150,27 @@ var UpdateOrganizationSchema = ({ uuidId }) => ({
|
|
|
150
150
|
logoUrl: optional4(string4),
|
|
151
151
|
providerFields: optional4(unknown4)
|
|
152
152
|
});
|
|
153
|
-
var OrganizationSchema =
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
153
|
+
var OrganizationSchema =
|
|
154
|
+
({ uuidId }) =>
|
|
155
|
+
(organizationStatus) => ({
|
|
156
|
+
id: uuidId ? uuid4 : string4,
|
|
157
|
+
name: string4,
|
|
158
|
+
users: array4(UserSchema({ uuidId })),
|
|
159
|
+
domain: string4,
|
|
160
|
+
subscription: string4,
|
|
161
|
+
status: enum_(organizationStatus),
|
|
162
|
+
logoUrl: optional4(string4),
|
|
163
|
+
providerFields: optional4(unknown4),
|
|
164
|
+
createdAt: optional4(date4),
|
|
165
|
+
updatedAt: optional4(date4)
|
|
166
|
+
});
|
|
165
167
|
var BaseOrganizationServiceSchemas = (options) => ({
|
|
166
168
|
CreateOrganizationSchema,
|
|
167
169
|
UpdateOrganizationSchema: UpdateOrganizationSchema(options),
|
|
168
170
|
OrganizationSchema: OrganizationSchema(options)
|
|
169
171
|
});
|
|
170
172
|
|
|
171
|
-
// schemas/zod/organization.schema.ts
|
|
173
|
+
// domain/schemas/zod/organization.schema.ts
|
|
172
174
|
import {
|
|
173
175
|
array as array8,
|
|
174
176
|
date as date8,
|
|
@@ -177,9 +179,9 @@ import {
|
|
|
177
179
|
string as string8,
|
|
178
180
|
unknown as unknown8,
|
|
179
181
|
uuid as uuid8
|
|
180
|
-
} from
|
|
182
|
+
} from '@forklaunch/validator/zod';
|
|
181
183
|
|
|
182
|
-
// schemas/zod/user.schema.ts
|
|
184
|
+
// domain/schemas/zod/user.schema.ts
|
|
183
185
|
import {
|
|
184
186
|
array as array7,
|
|
185
187
|
date as date7,
|
|
@@ -188,9 +190,9 @@ import {
|
|
|
188
190
|
string as string7,
|
|
189
191
|
unknown as unknown7,
|
|
190
192
|
uuid as uuid7
|
|
191
|
-
} from
|
|
193
|
+
} from '@forklaunch/validator/zod';
|
|
192
194
|
|
|
193
|
-
// schemas/zod/role.schema.ts
|
|
195
|
+
// domain/schemas/zod/role.schema.ts
|
|
194
196
|
import {
|
|
195
197
|
array as array6,
|
|
196
198
|
date as date6,
|
|
@@ -198,9 +200,9 @@ import {
|
|
|
198
200
|
string as string6,
|
|
199
201
|
unknown as unknown6,
|
|
200
202
|
uuid as uuid6
|
|
201
|
-
} from
|
|
203
|
+
} from '@forklaunch/validator/zod';
|
|
202
204
|
|
|
203
|
-
// schemas/zod/permission.schema.ts
|
|
205
|
+
// domain/schemas/zod/permission.schema.ts
|
|
204
206
|
import {
|
|
205
207
|
array as array5,
|
|
206
208
|
date as date5,
|
|
@@ -208,7 +210,7 @@ import {
|
|
|
208
210
|
string as string5,
|
|
209
211
|
unknown as unknown5,
|
|
210
212
|
uuid as uuid5
|
|
211
|
-
} from
|
|
213
|
+
} from '@forklaunch/validator/zod';
|
|
212
214
|
var CreatePermissionSchema2 = {
|
|
213
215
|
slug: string5,
|
|
214
216
|
addToRolesIds: optional5(array5(string5)),
|
|
@@ -234,7 +236,7 @@ var BasePermissionServiceSchemas2 = (options) => ({
|
|
|
234
236
|
PermissionSchema: PermissionSchema2(options)
|
|
235
237
|
});
|
|
236
238
|
|
|
237
|
-
// schemas/zod/role.schema.ts
|
|
239
|
+
// domain/schemas/zod/role.schema.ts
|
|
238
240
|
var CreateRoleSchema2 = {
|
|
239
241
|
name: string6,
|
|
240
242
|
permissionIds: optional6(array6(string6)),
|
|
@@ -260,7 +262,7 @@ var BaseRoleServiceSchemas2 = (options) => ({
|
|
|
260
262
|
RoleSchema: RoleSchema2(options)
|
|
261
263
|
});
|
|
262
264
|
|
|
263
|
-
// schemas/zod/user.schema.ts
|
|
265
|
+
// domain/schemas/zod/user.schema.ts
|
|
264
266
|
var CreateUserSchema2 = {
|
|
265
267
|
email: email2,
|
|
266
268
|
password: string7,
|
|
@@ -301,7 +303,7 @@ var BaseUserServiceSchemas2 = (options) => ({
|
|
|
301
303
|
UserSchema: UserSchema2(options)
|
|
302
304
|
});
|
|
303
305
|
|
|
304
|
-
// schemas/zod/organization.schema.ts
|
|
306
|
+
// domain/schemas/zod/organization.schema.ts
|
|
305
307
|
var CreateOrganizationSchema2 = {
|
|
306
308
|
name: string8,
|
|
307
309
|
domain: string8,
|
|
@@ -317,46 +319,48 @@ var UpdateOrganizationSchema2 = ({ uuidId }) => ({
|
|
|
317
319
|
logoUrl: optional8(string8),
|
|
318
320
|
providerFields: optional8(unknown8)
|
|
319
321
|
});
|
|
320
|
-
var OrganizationSchema2 =
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
322
|
+
var OrganizationSchema2 =
|
|
323
|
+
({ uuidId }) =>
|
|
324
|
+
(organizationStatus) => ({
|
|
325
|
+
id: uuidId ? uuid8 : string8,
|
|
326
|
+
name: string8,
|
|
327
|
+
users: array8(UserSchema2({ uuidId })),
|
|
328
|
+
domain: string8,
|
|
329
|
+
subscription: string8,
|
|
330
|
+
status: enum_2(organizationStatus),
|
|
331
|
+
logoUrl: optional8(string8),
|
|
332
|
+
providerFields: optional8(unknown8),
|
|
333
|
+
createdAt: optional8(date8),
|
|
334
|
+
updatedAt: optional8(date8)
|
|
335
|
+
});
|
|
332
336
|
var BaseOrganizationServiceSchemas2 = (options) => ({
|
|
333
337
|
CreateOrganizationSchema: CreateOrganizationSchema2,
|
|
334
338
|
UpdateOrganizationSchema: UpdateOrganizationSchema2(options),
|
|
335
339
|
OrganizationSchema: OrganizationSchema2(options)
|
|
336
340
|
});
|
|
337
341
|
|
|
338
|
-
// schemas/organization.schema.ts
|
|
342
|
+
// domain/schemas/organization.schema.ts
|
|
339
343
|
var BaseOrganizationServiceSchemas3 = serviceSchemaResolver(
|
|
340
344
|
BaseOrganizationServiceSchemas,
|
|
341
345
|
BaseOrganizationServiceSchemas2
|
|
342
346
|
);
|
|
343
347
|
|
|
344
|
-
// schemas/permission.schema.ts
|
|
345
|
-
import { serviceSchemaResolver as serviceSchemaResolver2 } from
|
|
348
|
+
// domain/schemas/permission.schema.ts
|
|
349
|
+
import { serviceSchemaResolver as serviceSchemaResolver2 } from '@forklaunch/internal';
|
|
346
350
|
var BasePermissionServiceSchemas3 = serviceSchemaResolver2(
|
|
347
351
|
BasePermissionServiceSchemas,
|
|
348
352
|
BasePermissionServiceSchemas2
|
|
349
353
|
);
|
|
350
354
|
|
|
351
|
-
// schemas/role.schema.ts
|
|
352
|
-
import { serviceSchemaResolver as serviceSchemaResolver3 } from
|
|
355
|
+
// domain/schemas/role.schema.ts
|
|
356
|
+
import { serviceSchemaResolver as serviceSchemaResolver3 } from '@forklaunch/internal';
|
|
353
357
|
var BaseRoleServiceSchemas3 = serviceSchemaResolver3(
|
|
354
358
|
BaseRoleServiceSchemas,
|
|
355
359
|
BaseRoleServiceSchemas2
|
|
356
360
|
);
|
|
357
361
|
|
|
358
|
-
// schemas/user.schema.ts
|
|
359
|
-
import { serviceSchemaResolver as serviceSchemaResolver4 } from
|
|
362
|
+
// domain/schemas/user.schema.ts
|
|
363
|
+
import { serviceSchemaResolver as serviceSchemaResolver4 } from '@forklaunch/internal';
|
|
360
364
|
var BaseUserServiceSchemas3 = serviceSchemaResolver4(
|
|
361
365
|
BaseUserServiceSchemas,
|
|
362
366
|
BaseUserServiceSchemas2
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
} from '@forklaunch/internal';
|
|
15
15
|
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
16
16
|
import { EntityManager } from '@mikro-orm/core';
|
|
17
|
-
import { OrganizationDtos } from '../types/iamDto.types';
|
|
18
|
-
import { OrganizationEntities } from '../types/iamEntities.types';
|
|
17
|
+
import { OrganizationDtos } from '../domain/types/iamDto.types';
|
|
18
|
+
import { OrganizationEntities } from '../domain/types/iamEntities.types';
|
|
19
19
|
|
|
20
20
|
export class BaseOrganizationService<
|
|
21
21
|
SchemaValidator extends AnySchemaValidator,
|
|
@@ -18,8 +18,8 @@ import {
|
|
|
18
18
|
} from '@forklaunch/internal';
|
|
19
19
|
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
20
20
|
import { EntityManager } from '@mikro-orm/core';
|
|
21
|
-
import { PermissionDtos } from '../types/iamDto.types';
|
|
22
|
-
import { PermissionEntities } from '../types/iamEntities.types';
|
|
21
|
+
import { PermissionDtos } from '../domain/types/iamDto.types';
|
|
22
|
+
import { PermissionEntities } from '../domain/types/iamEntities.types';
|
|
23
23
|
|
|
24
24
|
export class BasePermissionService<
|
|
25
25
|
SchemaValidator extends AnySchemaValidator,
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
transformIntoInternalMapper
|
|
17
17
|
} from '@forklaunch/internal';
|
|
18
18
|
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
19
|
-
import { RoleDtos } from '../types/iamDto.types';
|
|
20
|
-
import { RoleEntities } from '../types/iamEntities.types';
|
|
19
|
+
import { RoleDtos } from '../domain/types/iamDto.types';
|
|
20
|
+
import { RoleEntities } from '../domain/types/iamEntities.types';
|
|
21
21
|
|
|
22
22
|
export class BaseRoleService<
|
|
23
23
|
SchemaValidator extends AnySchemaValidator,
|
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
} from '@forklaunch/internal';
|
|
21
21
|
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
22
22
|
import { EntityManager } from '@mikro-orm/core';
|
|
23
|
-
import { UserDtos } from '../types/iamDto.types';
|
|
24
|
-
import { UserEntities } from '../types/iamEntities.types';
|
|
23
|
+
import { UserDtos } from '../domain/types/iamDto.types';
|
|
24
|
+
import { UserEntities } from '../domain/types/iamEntities.types';
|
|
25
25
|
|
|
26
26
|
export class BaseUserService<
|
|
27
27
|
SchemaValidator extends AnySchemaValidator,
|