@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":"role.schema.d.ts","sourceRoot":"","sources":["../../../schemas/typebox/role.schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"role.schema.d.ts","sourceRoot":"","sources":["../../../schemas/typebox/role.schema.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO;;;;;CAK9C,CAAC;AAEH,eAAO,MAAM,UAAU,GAAI,QAAQ,OAAO;;;;;;;;;;;;;CAOxC,CAAC;AAEH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { array, date, optional, string, unknown, uuid } from '@forklaunch/validator/typebox';
|
|
2
|
+
import { PermissionSchema } from './permission.schema';
|
|
2
3
|
export const CreateRoleSchema = {
|
|
3
4
|
name: string,
|
|
4
5
|
permissionIds: optional(array(string)),
|
|
@@ -10,11 +11,16 @@ export const UpdateRoleSchema = (uuidId) => ({
|
|
|
10
11
|
permissionIds: optional(array(string)),
|
|
11
12
|
extraFields: optional(unknown)
|
|
12
13
|
});
|
|
13
|
-
export const RoleSchema = (uuidId) => (
|
|
14
|
+
export const RoleSchema = (uuidId) => ({
|
|
14
15
|
id: uuidId ? uuid : string,
|
|
15
16
|
name: string,
|
|
16
|
-
permissions: array(PermissionSchema),
|
|
17
|
+
permissions: array(PermissionSchema(uuidId)),
|
|
17
18
|
extraFields: optional(unknown),
|
|
18
19
|
createdAt: optional(date),
|
|
19
20
|
updatedAt: optional(date)
|
|
20
21
|
});
|
|
22
|
+
export const BaseRoleServiceSchemas = (uuidId) => ({
|
|
23
|
+
CreateRoleSchema,
|
|
24
|
+
UpdateRoleSchema: UpdateRoleSchema(uuidId),
|
|
25
|
+
RoleSchema: RoleSchema(uuidId)
|
|
26
|
+
});
|