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