@forklaunch/implementation-iam-base 0.1.4 → 0.1.6
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/__test__/schemaEquality.test.js +6 -6
- package/lib/eject/schemas/index.ts +4 -0
- package/lib/eject/schemas/organization.schema.ts +14 -12
- package/lib/eject/schemas/permission.schema.ts +7 -1
- package/lib/eject/schemas/role.schema.ts +17 -16
- package/lib/eject/schemas/user.schema.ts +21 -20
- package/lib/eject/services/index.ts +4 -0
- package/lib/eject/services/organization.service.ts +6 -6
- package/lib/eject/services/permission.service.ts +9 -6
- package/lib/eject/services/role.service.ts +6 -6
- package/lib/eject/services/user.service.ts +11 -9
- package/lib/schemas/index.d.ts +5 -0
- package/lib/schemas/index.d.ts.map +1 -0
- package/lib/schemas/index.js +4 -0
- package/lib/schemas/organization.schema.d.ts +140 -6
- package/lib/schemas/organization.schema.d.ts.map +1 -1
- package/lib/schemas/organization.schema.js +2 -12
- package/lib/schemas/permission.schema.d.ts.map +1 -1
- package/lib/schemas/permission.schema.js +2 -12
- package/lib/schemas/role.schema.d.ts +28 -4
- package/lib/schemas/role.schema.d.ts.map +1 -1
- package/lib/schemas/role.schema.js +2 -12
- package/lib/schemas/typebox/organization.schema.d.ts +81 -5
- package/lib/schemas/typebox/organization.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/organization.schema.js +9 -3
- package/lib/schemas/typebox/permission.schema.d.ts +21 -0
- package/lib/schemas/typebox/permission.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/permission.schema.js +5 -0
- package/lib/schemas/typebox/role.schema.d.ts +35 -4
- package/lib/schemas/typebox/role.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/role.schema.js +8 -2
- package/lib/schemas/typebox/user.schema.d.ts +64 -4
- package/lib/schemas/typebox/user.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/user.schema.js +8 -2
- package/lib/schemas/user.schema.d.ts +68 -4
- package/lib/schemas/user.schema.d.ts.map +1 -1
- package/lib/schemas/user.schema.js +2 -12
- package/lib/schemas/zod/organization.schema.d.ts +253 -5
- package/lib/schemas/zod/organization.schema.d.ts.map +1 -1
- package/lib/schemas/zod/organization.schema.js +9 -3
- package/lib/schemas/zod/permission.schema.d.ts +21 -0
- package/lib/schemas/zod/permission.schema.d.ts.map +1 -1
- package/lib/schemas/zod/permission.schema.js +5 -0
- package/lib/schemas/zod/role.schema.d.ts +59 -4
- package/lib/schemas/zod/role.schema.d.ts.map +1 -1
- package/lib/schemas/zod/role.schema.js +8 -2
- package/lib/schemas/zod/user.schema.d.ts +140 -4
- package/lib/schemas/zod/user.schema.d.ts.map +1 -1
- package/lib/schemas/zod/user.schema.js +8 -2
- package/lib/services/index.d.ts +5 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +4 -0
- package/lib/services/organization.service.d.ts +2 -1
- package/lib/services/organization.service.d.ts.map +1 -1
- package/lib/services/permission.service.d.ts +2 -1
- package/lib/services/permission.service.d.ts.map +1 -1
- package/lib/services/role.service.d.ts +2 -1
- package/lib/services/role.service.d.ts.map +1 -1
- package/lib/services/user.service.d.ts +3 -3
- package/lib/services/user.service.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -8
- package/lib/eject/schemas/zod/organization.schema.ts +0 -49
- package/lib/eject/schemas/zod/permission.schema.ts +0 -30
- package/lib/eject/schemas/zod/role.schema.ts +0 -36
- package/lib/eject/schemas/zod/user.schema.ts +0 -52
- package/lib/eject/services/services/organization.service.ts +0 -146
- package/lib/eject/services/services/permission.service.ts +0 -349
- package/lib/eject/services/services/role.service.ts +0 -182
- package/lib/eject/services/services/user.service.ts +0 -225
- package/lib/index.d.ts +0 -9
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.schema.d.ts","sourceRoot":"","sources":["../../../schemas/typebox/user.schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user.schema.d.ts","sourceRoot":"","sources":["../../../schemas/typebox/user.schema.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB;;;;;;;;;;CAU5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO;;;;;;;;;;CAU9C,CAAC;AAEH,eAAO,MAAM,UAAU,GAAI,QAAQ,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAWxC,CAAC;AAEH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { array, date, email, optional, string, unknown, uuid } from '@forklaunch/validator/typebox';
|
|
2
|
+
import { RoleSchema } from './role.schema';
|
|
2
3
|
export const CreateUserSchema = {
|
|
3
4
|
email: email,
|
|
4
5
|
password: string,
|
|
@@ -21,15 +22,20 @@ export const UpdateUserSchema = (uuidId) => ({
|
|
|
21
22
|
subscription: optional(string),
|
|
22
23
|
extraFields: optional(unknown)
|
|
23
24
|
});
|
|
24
|
-
export const UserSchema = (uuidId) => (
|
|
25
|
+
export const UserSchema = (uuidId) => ({
|
|
25
26
|
id: uuidId ? uuid : string,
|
|
26
27
|
email: email,
|
|
27
28
|
firstName: string,
|
|
28
29
|
lastName: string,
|
|
29
|
-
roles: array(
|
|
30
|
+
roles: array(RoleSchema(uuidId)),
|
|
30
31
|
phoneNumber: optional(string),
|
|
31
32
|
subscription: optional(string),
|
|
32
33
|
extraFields: optional(unknown),
|
|
33
34
|
createdAt: optional(date),
|
|
34
35
|
updatedAt: optional(date)
|
|
35
36
|
});
|
|
37
|
+
export const BaseUserServiceSchemas = (uuidId) => ({
|
|
38
|
+
CreateUserSchema,
|
|
39
|
+
UpdateUserSchema: UpdateUserSchema(uuidId),
|
|
40
|
+
UserSchema: UserSchema(uuidId)
|
|
41
|
+
});
|