@drax/identity-back 0.1.2 → 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.
Files changed (119) hide show
  1. package/dist/middleware/apiKeyMiddleware.js +1 -1
  2. package/dist/repository/mongo/UserApiKeyMongoRepository.js +1 -1
  3. package/dist/routes/UserApiKeyRoutes.js +3 -3
  4. package/dist/services/RoleService.js +34 -8
  5. package/package.json +3 -4
  6. package/src/middleware/apiKeyMiddleware.ts +1 -1
  7. package/src/repository/mongo/UserApiKeyMongoRepository.ts +1 -1
  8. package/src/routes/UserApiKeyRoutes.ts +3 -3
  9. package/src/services/RoleService.ts +41 -16
  10. package/tsconfig.tsbuildinfo +1 -1
  11. package/types/config/IdentityConfig.d.ts +0 -12
  12. package/types/config/IdentityConfig.d.ts.map +0 -1
  13. package/types/errors/BadCredentialsError.d.ts +0 -6
  14. package/types/errors/BadCredentialsError.d.ts.map +0 -1
  15. package/types/errors/UnauthorizedError.d.ts +0 -6
  16. package/types/errors/UnauthorizedError.d.ts.map +0 -1
  17. package/types/factory/RoleServiceFactory.d.ts +0 -4
  18. package/types/factory/RoleServiceFactory.d.ts.map +0 -1
  19. package/types/factory/TenantServiceFactory.d.ts +0 -4
  20. package/types/factory/TenantServiceFactory.d.ts.map +0 -1
  21. package/types/factory/UserApiKeyServiceFactory.d.ts +0 -4
  22. package/types/factory/UserApiKeyServiceFactory.d.ts.map +0 -1
  23. package/types/factory/UserServiceFactory.d.ts +0 -4
  24. package/types/factory/UserServiceFactory.d.ts.map +0 -1
  25. package/types/graphql/index.d.ts +0 -6
  26. package/types/graphql/index.d.ts.map +0 -1
  27. package/types/graphql/resolvers/role.resolvers.d.ts +0 -52
  28. package/types/graphql/resolvers/role.resolvers.d.ts.map +0 -1
  29. package/types/graphql/resolvers/tenant.resolvers.d.ts +0 -49
  30. package/types/graphql/resolvers/tenant.resolvers.d.ts.map +0 -1
  31. package/types/graphql/resolvers/user-api-key.resolvers.d.ts +0 -37
  32. package/types/graphql/resolvers/user-api-key.resolvers.d.ts.map +0 -1
  33. package/types/graphql/resolvers/user.resolvers.d.ts +0 -67
  34. package/types/graphql/resolvers/user.resolvers.d.ts.map +0 -1
  35. package/types/index.d.ts +0 -35
  36. package/types/index.d.ts.map +0 -1
  37. package/types/interfaces/IRoleRepository.d.ts +0 -9
  38. package/types/interfaces/IRoleRepository.d.ts.map +0 -1
  39. package/types/interfaces/ITenantRepository.d.ts +0 -9
  40. package/types/interfaces/ITenantRepository.d.ts.map +0 -1
  41. package/types/interfaces/IUserApiKeyRepository.d.ts +0 -7
  42. package/types/interfaces/IUserApiKeyRepository.d.ts.map +0 -1
  43. package/types/interfaces/IUserRepository.d.ts +0 -10
  44. package/types/interfaces/IUserRepository.d.ts.map +0 -1
  45. package/types/middleware/apiKeyMiddleware.d.ts +0 -4
  46. package/types/middleware/apiKeyMiddleware.d.ts.map +0 -1
  47. package/types/middleware/jwtMiddleware.d.ts +0 -4
  48. package/types/middleware/jwtMiddleware.d.ts.map +0 -1
  49. package/types/middleware/rbacMiddleware.d.ts +0 -4
  50. package/types/middleware/rbacMiddleware.d.ts.map +0 -1
  51. package/types/models/RoleModel.d.ts +0 -16
  52. package/types/models/RoleModel.d.ts.map +0 -1
  53. package/types/models/TenantModel.d.ts +0 -16
  54. package/types/models/TenantModel.d.ts.map +0 -1
  55. package/types/models/UserApiKeyModel.d.ts +0 -16
  56. package/types/models/UserApiKeyModel.d.ts.map +0 -1
  57. package/types/models/UserGroupModel.d.ts +0 -16
  58. package/types/models/UserGroupModel.d.ts.map +0 -1
  59. package/types/models/UserModel.d.ts +0 -16
  60. package/types/models/UserModel.d.ts.map +0 -1
  61. package/types/permissions/IdentityPermissions.d.ts +0 -27
  62. package/types/permissions/IdentityPermissions.d.ts.map +0 -1
  63. package/types/rbac/Rbac.d.ts +0 -15
  64. package/types/rbac/Rbac.d.ts.map +0 -1
  65. package/types/repository/mongo/RoleMongoRepository.d.ts +0 -14
  66. package/types/repository/mongo/RoleMongoRepository.d.ts.map +0 -1
  67. package/types/repository/mongo/TenantMongoRepository.d.ts +0 -14
  68. package/types/repository/mongo/TenantMongoRepository.d.ts.map +0 -1
  69. package/types/repository/mongo/UserApiKeyMongoRepository.d.ts +0 -14
  70. package/types/repository/mongo/UserApiKeyMongoRepository.d.ts.map +0 -1
  71. package/types/repository/mongo/UserMongoRepository.d.ts +0 -17
  72. package/types/repository/mongo/UserMongoRepository.d.ts.map +0 -1
  73. package/types/repository/sqlite/RoleSqliteRepository.d.ts +0 -22
  74. package/types/repository/sqlite/RoleSqliteRepository.d.ts.map +0 -1
  75. package/types/repository/sqlite/TenantSqliteRepository.d.ts +0 -19
  76. package/types/repository/sqlite/TenantSqliteRepository.d.ts.map +0 -1
  77. package/types/repository/sqlite/UserApiKeySqliteRepository.d.ts +0 -19
  78. package/types/repository/sqlite/UserApiKeySqliteRepository.d.ts.map +0 -1
  79. package/types/repository/sqlite/UserSqliteRepository.d.ts +0 -25
  80. package/types/repository/sqlite/UserSqliteRepository.d.ts.map +0 -1
  81. package/types/routes/RoleRoutes.d.ts +0 -4
  82. package/types/routes/RoleRoutes.d.ts.map +0 -1
  83. package/types/routes/TenantRoutes.d.ts +0 -4
  84. package/types/routes/TenantRoutes.d.ts.map +0 -1
  85. package/types/routes/UserApiKeyRoutes.d.ts +0 -4
  86. package/types/routes/UserApiKeyRoutes.d.ts.map +0 -1
  87. package/types/routes/UserAvatarRoutes.d.ts +0 -4
  88. package/types/routes/UserRoutes.d.ts +0 -4
  89. package/types/routes/UserRoutes.d.ts.map +0 -1
  90. package/types/services/PermissionService.d.ts +0 -9
  91. package/types/services/PermissionService.d.ts.map +0 -1
  92. package/types/services/RoleService.d.ts +0 -16
  93. package/types/services/RoleService.d.ts.map +0 -1
  94. package/types/services/TenantService.d.ts +0 -16
  95. package/types/services/TenantService.d.ts.map +0 -1
  96. package/types/services/UserApiKeyService.d.ts +0 -15
  97. package/types/services/UserApiKeyService.d.ts.map +0 -1
  98. package/types/services/UserService.d.ts +0 -21
  99. package/types/services/UserService.d.ts.map +0 -1
  100. package/types/setup/CreateOrUpdateRole.d.ts +0 -5
  101. package/types/setup/CreateOrUpdateRole.d.ts.map +0 -1
  102. package/types/setup/CreateUserIfNotExist.d.ts +0 -5
  103. package/types/setup/CreateUserIfNotExist.d.ts.map +0 -1
  104. package/types/setup/LoadIdentityConfigFromEnv.d.ts +0 -4
  105. package/types/setup/LoadIdentityConfigFromEnv.d.ts.map +0 -1
  106. package/types/setup/LoadPermissions.d.ts +0 -4
  107. package/types/setup/LoadPermissions.d.ts.map +0 -1
  108. package/types/setup/RecoveryUserPassword.d.ts +0 -4
  109. package/types/setup/RecoveryUserPassword.d.ts.map +0 -1
  110. package/types/utils/AuthUtils.d.ts +0 -18
  111. package/types/utils/AuthUtils.d.ts.map +0 -1
  112. package/types/zod/RoleZod.d.ts +0 -10
  113. package/types/zod/RoleZod.d.ts.map +0 -1
  114. package/types/zod/TenantZod.d.ts +0 -10
  115. package/types/zod/TenantZod.d.ts.map +0 -1
  116. package/types/zod/UserApiKeyZod.d.ts +0 -16
  117. package/types/zod/UserApiKeyZod.d.ts.map +0 -1
  118. package/types/zod/UserZod.d.ts +0 -53
  119. package/types/zod/UserZod.d.ts.map +0 -1
@@ -1,12 +0,0 @@
1
- declare enum IdentityConfig {
2
- JwtSecret = "DRAX_JWT_SECRET",
3
- JwtExpiration = "DRAX_JWT_EXPIRATION",
4
- JwtIssuer = "DRAX_JWT_ISSUER",
5
- ApiKeySecret = "DRAX_APIKEY_SECRET",
6
- ApiKeyCacheTTL = "DRAX_APIKEY_CACHE_TTL",
7
- RbacCacheTTL = "DRAX_RBAC_CACHE_TTL",
8
- AvatarDir = "DRAX_AVATAR_DIR"
9
- }
10
- export default IdentityConfig;
11
- export { IdentityConfig };
12
- //# sourceMappingURL=IdentityConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IdentityConfig.d.ts","sourceRoot":"","sources":["../../src/config/IdentityConfig.ts"],"names":[],"mappings":"AAAA,aAAK,cAAc;IAIf,SAAS,oBAAoB;IAC7B,aAAa,wBAAwB;IACrC,SAAS,oBAAoB;IAE7B,YAAY,uBAAuB;IACnC,cAAc,0BAA0B;IAExC,YAAY,wBAAwB;IAEpC,SAAS,oBAAoB;CAGhC;AAED,eAAe,cAAc,CAAC;AAC9B,OAAO,EAAC,cAAc,EAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- declare class BadCredentialsError extends Error {
2
- constructor();
3
- get statusCode(): number;
4
- }
5
- export default BadCredentialsError;
6
- //# sourceMappingURL=BadCredentialsError.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BadCredentialsError.d.ts","sourceRoot":"","sources":["../../src/errors/BadCredentialsError.ts"],"names":[],"mappings":"AAAA,cAAM,mBAAoB,SAAQ,KAAK;;IAMnC,IAAI,UAAU,WAEb;CAEJ;AAED,eAAe,mBAAmB,CAAA"}
@@ -1,6 +0,0 @@
1
- declare class UnauthorizedError extends Error {
2
- constructor();
3
- get statusCode(): number;
4
- }
5
- export default UnauthorizedError;
6
- //# sourceMappingURL=UnauthorizedError.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnauthorizedError.d.ts","sourceRoot":"","sources":["../../src/errors/UnauthorizedError.ts"],"names":[],"mappings":"AAAA,cAAM,iBAAkB,SAAQ,KAAK;;IAMjC,IAAI,UAAU,WAEb;CAEJ;AAED,eAAe,iBAAiB,CAAA"}
@@ -1,4 +0,0 @@
1
- import RoleService from "../services/RoleService.js";
2
- declare const RoleServiceFactory: (verbose?: boolean) => RoleService;
3
- export default RoleServiceFactory;
4
- //# sourceMappingURL=RoleServiceFactory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RoleServiceFactory.d.ts","sourceRoot":"","sources":["../../src/factory/RoleServiceFactory.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAOrD,QAAA,MAAM,kBAAkB,aAAa,OAAO,KAAW,WAqBtD,CAAA;AAED,eAAe,kBAAkB,CAAA"}
@@ -1,4 +0,0 @@
1
- import TenantService from "../services/TenantService.js";
2
- declare const TenantServiceFactory: (verbose?: boolean) => TenantService;
3
- export default TenantServiceFactory;
4
- //# sourceMappingURL=TenantServiceFactory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TenantServiceFactory.d.ts","sourceRoot":"","sources":["../../src/factory/TenantServiceFactory.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,8BAA8B,CAAC;AAOzD,QAAA,MAAM,oBAAoB,aAAa,OAAO,KAAW,aAqBxD,CAAA;AAED,eAAe,oBAAoB,CAAA"}
@@ -1,4 +0,0 @@
1
- import UserApiKeyService from "../services/UserApiKeyService.js";
2
- declare const UserApiKeyServiceFactory: (verbose?: boolean) => UserApiKeyService;
3
- export default UserApiKeyServiceFactory;
4
- //# sourceMappingURL=UserApiKeyServiceFactory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserApiKeyServiceFactory.d.ts","sourceRoot":"","sources":["../../src/factory/UserApiKeyServiceFactory.ts"],"names":[],"mappings":"AACA,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AAOjE,QAAA,MAAM,wBAAwB,aAAa,OAAO,KAAW,iBAmB5D,CAAA;AAED,eAAe,wBAAwB,CAAA"}
@@ -1,4 +0,0 @@
1
- import UserService from "../services/UserService.js";
2
- declare const UserServiceFactory: (verbose?: boolean) => UserService;
3
- export default UserServiceFactory;
4
- //# sourceMappingURL=UserServiceFactory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserServiceFactory.d.ts","sourceRoot":"","sources":["../../src/factory/UserServiceFactory.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAOrD,QAAA,MAAM,kBAAkB,aAAY,OAAO,KAAY,WAmBtD,CAAA;AAEA,eAAe,kBAAkB,CAAA"}
@@ -1,6 +0,0 @@
1
- declare const _default: () => Promise<{
2
- typeDefs: Promise<import("@graphql-tools/utils").TypeSource>;
3
- resolvers: Promise<import("@graphql-tools/utils").IResolvers>;
4
- }>;
5
- export default _default;
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graphql/index.ts"],"names":[],"mappings":";;;;AAEA,wBAKC"}
@@ -1,52 +0,0 @@
1
- declare const _default: {
2
- Query: {
3
- findRoleById: (_: any, { id }: {
4
- id: any;
5
- }, { rbac }: {
6
- rbac: any;
7
- }) => Promise<import("packages/identity/identity-share/types/index.js").IRole>;
8
- findRoleByName: (_: any, { name }: {
9
- name: any;
10
- }, { rbac }: {
11
- rbac: any;
12
- }) => Promise<import("packages/identity/identity-share/types/index.js").IRole>;
13
- fetchRole: (_: any, {}: {}, { rbac }: {
14
- rbac: any;
15
- }) => Promise<import("packages/identity/identity-share/types/index.js").IRole[]>;
16
- fetchPermissions: (_: any, {}: {}, { rbac }: {
17
- rbac: any;
18
- }) => Promise<string[]>;
19
- paginateRole: (_: any, { options }: {
20
- options?: {
21
- page: number;
22
- limit: number;
23
- orderBy: string;
24
- orderDesc: boolean;
25
- search: string;
26
- filters: any[];
27
- };
28
- }, { rbac }: {
29
- rbac: any;
30
- }) => Promise<import("packages/common/common-share/types/index.js").IDraxPaginateResult<import("packages/identity/identity-share/types/index.js").IRole>>;
31
- };
32
- Mutation: {
33
- createRole: (_: any, { input }: {
34
- input: any;
35
- }, { rbac }: {
36
- rbac: any;
37
- }) => Promise<import("packages/identity/identity-share/types/index.js").IRole>;
38
- updateRole: (_: any, { id, input }: {
39
- id: any;
40
- input: any;
41
- }, { rbac }: {
42
- rbac: any;
43
- }) => Promise<import("packages/identity/identity-share/types/index.js").IRole>;
44
- deleteRole: (_: any, { id }: {
45
- id: any;
46
- }, { rbac }: {
47
- rbac: any;
48
- }) => Promise<boolean>;
49
- };
50
- };
51
- export default _default;
52
- //# sourceMappingURL=role.resolvers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"role.resolvers.d.ts","sourceRoot":"","sources":["../../../src/graphql/resolvers/role.resolvers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAoIC"}
@@ -1,49 +0,0 @@
1
- declare const _default: {
2
- Query: {
3
- findTenantById: (_: any, { id }: {
4
- id: any;
5
- }, { rbac }: {
6
- rbac: any;
7
- }) => Promise<import("packages/identity/identity-share/types/index.js").ITenant>;
8
- findTenantByName: (_: any, { name }: {
9
- name: any;
10
- }, { rbac }: {
11
- rbac: any;
12
- }) => Promise<import("packages/identity/identity-share/types/index.js").ITenant>;
13
- fetchTenant: (_: any, {}: {}, { rbac }: {
14
- rbac: any;
15
- }) => Promise<import("packages/identity/identity-share/types/index.js").ITenant[]>;
16
- paginateTenant: (_: any, { options }: {
17
- options?: {
18
- page: number;
19
- limit: number;
20
- orderBy: string;
21
- orderDesc: boolean;
22
- search: string;
23
- filters: any[];
24
- };
25
- }, { rbac }: {
26
- rbac: any;
27
- }) => Promise<import("packages/common/common-share/types/index.js").IDraxPaginateResult<import("packages/identity/identity-share/types/index.js").ITenant>>;
28
- };
29
- Mutation: {
30
- createTenant: (_: any, { input }: {
31
- input: any;
32
- }, { rbac }: {
33
- rbac: any;
34
- }) => Promise<import("packages/identity/identity-share/types/index.js").ITenant>;
35
- updateTenant: (_: any, { id, input }: {
36
- id: any;
37
- input: any;
38
- }, { rbac }: {
39
- rbac: any;
40
- }) => Promise<import("packages/identity/identity-share/types/index.js").ITenant>;
41
- deleteTenant: (_: any, { id }: {
42
- id: any;
43
- }, { rbac }: {
44
- rbac: any;
45
- }) => Promise<boolean>;
46
- };
47
- };
48
- export default _default;
49
- //# sourceMappingURL=tenant.resolvers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tenant.resolvers.d.ts","sourceRoot":"","sources":["../../../src/graphql/resolvers/tenant.resolvers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBA8GC"}
@@ -1,37 +0,0 @@
1
- declare const _default: {
2
- Query: {
3
- paginateUserApiKey: (_: any, { options }: {
4
- options?: {
5
- page: number;
6
- limit: number;
7
- orderBy: string;
8
- orderDesc: boolean;
9
- search: string;
10
- filters: any[];
11
- };
12
- }, { rbac, authUser }: {
13
- rbac: any;
14
- authUser: any;
15
- }) => Promise<import("packages/common/common-share/types/index.js").IDraxPaginateResult<import("packages/identity/identity-share/types/index.js").IUserApiKey>>;
16
- };
17
- Mutation: {
18
- createUserApiKey: (_: any, { input }: {
19
- input: any;
20
- }, { rbac }: {
21
- rbac: any;
22
- }) => Promise<import("packages/identity/identity-share/types/index.js").IUserApiKey>;
23
- updateUserApiKey: (_: any, { id, input }: {
24
- id: any;
25
- input: any;
26
- }, { rbac }: {
27
- rbac: any;
28
- }) => Promise<import("packages/identity/identity-share/types/index.js").IUserApiKey>;
29
- deleteUserApiKey: (_: any, { id }: {
30
- id: any;
31
- }, { rbac }: {
32
- rbac: any;
33
- }) => Promise<boolean>;
34
- };
35
- };
36
- export default _default;
37
- //# sourceMappingURL=user-api-key.resolvers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-api-key.resolvers.d.ts","sourceRoot":"","sources":["../../../src/graphql/resolvers/user-api-key.resolvers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAqFC"}
@@ -1,67 +0,0 @@
1
- declare const _default: {
2
- Query: {
3
- me: (_: any, {}: {}, { authUser }: {
4
- authUser: any;
5
- }) => Promise<import("packages/identity/identity-share/types/index.js").IUser>;
6
- findUserById: (_: any, { id }: {
7
- id: any;
8
- }, { rbac }: {
9
- rbac: any;
10
- }) => Promise<import("packages/identity/identity-share/types/index.js").IUser>;
11
- paginateUser: (_: any, { options }: {
12
- options?: {
13
- page: number;
14
- limit: number;
15
- orderBy: string;
16
- orderDesc: boolean;
17
- search: string;
18
- filters: any[];
19
- };
20
- }, { rbac }: {
21
- rbac: any;
22
- }) => Promise<import("packages/common/common-share/types/index.js").IDraxPaginateResult<import("packages/identity/identity-share/types/index.js").IUser>>;
23
- };
24
- Mutation: {
25
- auth: (_: any, { input }: {
26
- input: any;
27
- }) => Promise<{
28
- accessToken: string;
29
- }>;
30
- createUser: (_: any, { input }: {
31
- input: any;
32
- }, { rbac }: {
33
- rbac: any;
34
- }) => Promise<import("packages/identity/identity-share/types/index.js").IUser>;
35
- updateUser: (_: any, { id, input }: {
36
- id: any;
37
- input: any;
38
- }, { rbac }: {
39
- rbac: any;
40
- }) => Promise<import("packages/identity/identity-share/types/index.js").IUser>;
41
- deleteUser: (_: any, { id }: {
42
- id: any;
43
- }, { rbac }: {
44
- rbac: any;
45
- }) => Promise<boolean>;
46
- changeOwnPassword: (_: any, { currentPassword, newPassword }: {
47
- currentPassword: any;
48
- newPassword: any;
49
- }, { authUser }: {
50
- authUser: any;
51
- }) => Promise<boolean>;
52
- changeUserPassword: (_: any, { userId, newPassword }: {
53
- userId: any;
54
- newPassword: any;
55
- }, { rbac }: {
56
- rbac: any;
57
- }) => Promise<boolean>;
58
- changeAvatar: (_: any, { file }: {
59
- file: any;
60
- }, { rbac, authUser }: {
61
- rbac: any;
62
- authUser: any;
63
- }) => Promise<boolean>;
64
- };
65
- };
66
- export default _default;
67
- //# sourceMappingURL=user.resolvers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user.resolvers.d.ts","sourceRoot":"","sources":["../../../src/graphql/resolvers/user.resolvers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wBAgMC"}
package/types/index.d.ts DELETED
@@ -1,35 +0,0 @@
1
- import UserServiceFactory from "./factory/UserServiceFactory.js";
2
- import RoleServiceFactory from "./factory/RoleServiceFactory.js";
3
- import TenantServiceFactory from "./factory/TenantServiceFactory.js";
4
- import RoleService from "./services/RoleService.js";
5
- import UserService from "./services/UserService.js";
6
- import TenantService from "./services/TenantService.js";
7
- import PermissionService from "./services/PermissionService.js";
8
- import Rbac from "./rbac/Rbac.js";
9
- import { UserRoutes } from "./routes/UserRoutes.js";
10
- import { UserAvatarRoutes } from "./routes/UserAvatarRoutes.js";
11
- import { RoleRoutes } from "./routes/RoleRoutes.js";
12
- import { TenantRoutes } from "./routes/TenantRoutes.js";
13
- import { UserApiKeyRoutes } from "./routes/UserApiKeyRoutes.js";
14
- import AuthUtils from "./utils/AuthUtils.js";
15
- import { jwtMiddleware } from "./middleware/jwtMiddleware.js";
16
- import { rbacMiddleware } from "./middleware/rbacMiddleware.js";
17
- import { apiKeyMiddleware } from "./middleware/apiKeyMiddleware.js";
18
- import IdentityPermissions from "./permissions/IdentityPermissions.js";
19
- import IdentityConfig from "./config/IdentityConfig.js";
20
- import UnauthorizedError from "./errors/UnauthorizedError.js";
21
- import BadCredentialsError from "./errors/BadCredentialsError.js";
22
- import CreateUserIfNotExist from "./setup/CreateUserIfNotExist.js";
23
- import CreateOrUpdateRole from "./setup/CreateOrUpdateRole.js";
24
- import LoadPermissions from "./setup/LoadPermissions.js";
25
- import LoadIdentityConfigFromEnv from "./setup/LoadIdentityConfigFromEnv.js";
26
- import RecoveryUserPassword from "./setup/RecoveryUserPassword.js";
27
- import type { IRoleRepository } from "./interfaces/IRoleRepository";
28
- import type { ITenantRepository } from "./interfaces/ITenantRepository";
29
- import type { IUserRepository } from "./interfaces/IUserRepository";
30
- import type { IUserApiKeyRepository } from "./interfaces/IUserApiKeyRepository";
31
- declare const identityTypeDefs: import("@graphql-tools/utils").TypeSource;
32
- declare const identityResolvers: import("@graphql-tools/utils").IResolvers;
33
- export type { IRoleRepository, ITenantRepository, IUserRepository, IUserApiKeyRepository };
34
- export { UserService, RoleService, TenantService, PermissionService, Rbac, UserServiceFactory, RoleServiceFactory, TenantServiceFactory, identityTypeDefs, identityResolvers, UserRoutes, RoleRoutes, TenantRoutes, UserAvatarRoutes, UserApiKeyRoutes, AuthUtils, jwtMiddleware, rbacMiddleware, apiKeyMiddleware, IdentityPermissions, IdentityConfig, UnauthorizedError, BadCredentialsError, LoadIdentityConfigFromEnv, LoadPermissions, CreateOrUpdateRole, CreateUserIfNotExist, RecoveryUserPassword };
35
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AACjE,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AACjE,OAAO,oBAAoB,MAAM,mCAAmC,CAAC;AAErE,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAEhE,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,aAAa,EAAC,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAC,cAAc,EAAC,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAElE,OAAO,mBAAmB,MAAM,sCAAsC,CAAC;AACvE,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAC9D,OAAO,mBAAmB,MAAM,iCAAiC,CAAC;AAElE,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AACnE,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,yBAAyB,MAAM,sCAAsC,CAAC;AAC7E,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AAEnE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,oCAAoC,CAAC;AAI9E,QAAA,MAAM,gBAAgB,2CAAoC,CAAC;AAC3D,QAAA,MAAM,iBAAiB,2CAAqC,CAAC;AAG7D,YAAY,EACR,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACxB,CAAA;AAED,OAAO,EAEH,WAAW,EACX,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,IAAI,EAGJ,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EAGpB,gBAAgB,EAChB,iBAAiB,EAGjB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAEhB,SAAS,EAGT,aAAa,EACb,cAAc,EACd,gBAAgB,EAGhB,mBAAmB,EAGnB,cAAc,EAGd,iBAAiB,EACjB,mBAAmB,EAGnB,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACvB,CAAA"}
@@ -1,9 +0,0 @@
1
- import { IRole, IRoleBase } from "@drax/identity-share";
2
- import { IDraxCrud } from "@drax/common-share";
3
- interface IRoleRepository extends IDraxCrud<IRole, IRoleBase, IRoleBase> {
4
- findById(id: string): Promise<IRole | null>;
5
- findByName(name: string): Promise<IRole | null>;
6
- fetchAll(): Promise<IRole[]>;
7
- }
8
- export { IRoleRepository };
9
- //# sourceMappingURL=IRoleRepository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IRoleRepository.d.ts","sourceRoot":"","sources":["../../src/interfaces/IRoleRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAE7C,UAAU,eAAgB,SAAQ,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC;IACpE,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAC5C,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAChD,QAAQ,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;CAChC;AAED,OAAO,EAAC,eAAe,EAAC,CAAA"}
@@ -1,9 +0,0 @@
1
- import { ITenant, ITenantBase } from '@drax/identity-share';
2
- import { IDraxCrud } from "@drax/common-share";
3
- interface ITenantRepository extends IDraxCrud<ITenant, ITenantBase, ITenantBase> {
4
- findById(id: string): Promise<ITenant | null>;
5
- findByName(name: string): Promise<ITenant | null>;
6
- fetchAll(): Promise<ITenant[]>;
7
- }
8
- export { ITenantRepository };
9
- //# sourceMappingURL=ITenantRepository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ITenantRepository.d.ts","sourceRoot":"","sources":["../../src/interfaces/ITenantRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAC7C,UAAU,iBAAkB,SAAQ,SAAS,CAAC,OAAO,EAAC,WAAW,EAAC,WAAW,CAAC;IAC1E,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAC9C,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAClD,QAAQ,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CAClC;AAED,OAAO,EAAC,iBAAiB,EAAC,CAAA"}
@@ -1,7 +0,0 @@
1
- import { IUserApiKey, IUserApiKeyBase } from '@drax/identity-share';
2
- import { IDraxCrud } from "@drax/common-share";
3
- interface IUserApiKeyRepository extends IDraxCrud<IUserApiKey, IUserApiKeyBase, IUserApiKeyBase> {
4
- findBySecret(username: string): Promise<IUserApiKey | null>;
5
- }
6
- export { IUserApiKeyRepository };
7
- //# sourceMappingURL=IUserApiKeyRepository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IUserApiKeyRepository.d.ts","sourceRoot":"","sources":["../../src/interfaces/IUserApiKeyRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,eAAe,EAAC,MAAM,sBAAsB,CAAA;AACjE,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAE7C,UAAU,qBAAsB,SAAQ,SAAS,CAAC,WAAW,EAAE,eAAe,EAAE,eAAe,CAAC;IAC5F,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC/D;AAED,OAAO,EAAC,qBAAqB,EAAC,CAAA"}
@@ -1,10 +0,0 @@
1
- import { IUser, IUserCreate, IUserUpdate } from '@drax/identity-share';
2
- import { IDraxCrud } from "@drax/common-share";
3
- interface IUserRepository extends IDraxCrud<IUser, IUserCreate, IUserUpdate> {
4
- findById(id: string): Promise<IUser | null>;
5
- findByUsername(username: string): Promise<IUser | null>;
6
- changePassword(id: string, password: string): Promise<Boolean>;
7
- changeAvatar(id: string, avatarUrl: string): Promise<Boolean>;
8
- }
9
- export { IUserRepository };
10
- //# sourceMappingURL=IUserRepository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IUserRepository.d.ts","sourceRoot":"","sources":["../../src/interfaces/IUserRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,WAAW,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAE7C,UAAU,eAAgB,SAAQ,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC;IACxE,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAC5C,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IACxD,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,GAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7D,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACjE;AAED,OAAO,EAAC,eAAe,EAAC,CAAA"}
@@ -1,4 +0,0 @@
1
- declare function apiKeyMiddleware(request: any, reply: any): Promise<void>;
2
- export default apiKeyMiddleware;
3
- export { apiKeyMiddleware };
4
- //# sourceMappingURL=apiKeyMiddleware.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apiKeyMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/apiKeyMiddleware.ts"],"names":[],"mappings":"AAeA,iBAAe,gBAAgB,CAAE,OAAO,KAAA,EAAE,KAAK,KAAA,iBAgB9C;AAED,eAAe,gBAAgB,CAAC;AAChC,OAAO,EAAC,gBAAgB,EAAC,CAAA"}
@@ -1,4 +0,0 @@
1
- declare function jwtMiddleware(request: any, reply: any, done: any): void;
2
- export default jwtMiddleware;
3
- export { jwtMiddleware };
4
- //# sourceMappingURL=jwtMiddleware.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jwtMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/jwtMiddleware.ts"],"names":[],"mappings":"AAGA,iBAAS,aAAa,CAAE,OAAO,KAAA,EAAE,KAAK,KAAA,EAAE,IAAI,KAAA,QAe3C;AAED,eAAe,aAAa,CAAC;AAC7B,OAAO,EAAC,aAAa,EAAC,CAAA"}
@@ -1,4 +0,0 @@
1
- declare function rbacMiddleware(request: any, reply: any): Promise<void>;
2
- export default rbacMiddleware;
3
- export { rbacMiddleware };
4
- //# sourceMappingURL=rbacMiddleware.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rbacMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/rbacMiddleware.ts"],"names":[],"mappings":"AAgBA,iBAAe,cAAc,CAAE,OAAO,KAAA,EAAE,KAAK,KAAA,iBAiB5C;AAED,eAAe,cAAc,CAAC;AAC9B,OAAO,EAAC,cAAc,EAAC,CAAA"}
@@ -1,16 +0,0 @@
1
- /// <reference types="mongoose/types/document.js" />
2
- /// <reference types="mongoose/types/types.js" />
3
- /// <reference types="mongoose/types/models.js" />
4
- /// <reference types="mongoose/types/schemaoptions.js" />
5
- /// <reference types="mongoose/types/utility.js" />
6
- import { mongoose } from '@drax/common-back';
7
- import { IRole } from '@drax/identity-share';
8
- declare const RoleSchema: mongoose.Schema<IRole, mongoose.Model<IRole, any, any, any, mongoose.Document<unknown, any, IRole> & IRole & {
9
- _id: mongoose.Types.ObjectId;
10
- }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IRole, mongoose.Document<unknown, {}, mongoose.FlatRecord<IRole>> & mongoose.FlatRecord<IRole> & {
11
- _id: mongoose.Types.ObjectId;
12
- }>;
13
- declare const RoleModel: mongoose.PaginateModel<IRole, {}, {}>;
14
- export { RoleSchema, RoleModel };
15
- export default RoleModel;
16
- //# sourceMappingURL=RoleModel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RoleModel.d.ts","sourceRoot":"","sources":["../../src/models/RoleModel.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAA;AAK1C,QAAA,MAAM,UAAU;;;;EAWd,CAAC;AAWH,QAAA,MAAM,SAAS,uCAAgG,CAAC;AAEhH,OAAO,EACH,UAAU,EACV,SAAS,EACZ,CAAA;AAED,eAAe,SAAS,CAAA"}
@@ -1,16 +0,0 @@
1
- /// <reference types="mongoose/types/document.js" />
2
- /// <reference types="mongoose/types/types.js" />
3
- /// <reference types="mongoose/types/models.js" />
4
- /// <reference types="mongoose/types/schemaoptions.js" />
5
- /// <reference types="mongoose/types/utility.js" />
6
- import { mongoose } from '@drax/common-back';
7
- import { ITenant } from '@drax/identity-share';
8
- declare const TenantSchema: mongoose.Schema<ITenant, mongoose.Model<ITenant, any, any, any, mongoose.Document<unknown, any, ITenant> & ITenant & {
9
- _id: mongoose.Types.ObjectId;
10
- }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, ITenant, mongoose.Document<unknown, {}, mongoose.FlatRecord<ITenant>> & mongoose.FlatRecord<ITenant> & {
11
- _id: mongoose.Types.ObjectId;
12
- }>;
13
- declare const TenantModel: mongoose.PaginateModel<ITenant, {}, {}>;
14
- export { TenantSchema, TenantModel };
15
- export default TenantModel;
16
- //# sourceMappingURL=TenantModel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TenantModel.d.ts","sourceRoot":"","sources":["../../src/models/TenantModel.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAA;AAK5C,QAAA,MAAM,YAAY;;;;EAEI,CAAC;AAWvB,QAAA,MAAM,WAAW,yCAA0G,CAAC;AAE5H,OAAO,EACH,YAAY,EACZ,WAAW,EACd,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -1,16 +0,0 @@
1
- /// <reference types="mongoose/types/document.js" />
2
- /// <reference types="mongoose/types/types.js" />
3
- /// <reference types="mongoose/types/models.js" />
4
- /// <reference types="mongoose/types/schemaoptions.js" />
5
- /// <reference types="mongoose/types/utility.js" />
6
- import { mongoose } from '@drax/common-back';
7
- import { IUserApiKey } from "@drax/identity-share";
8
- declare const UserApiKeySchema: mongoose.Schema<IUserApiKey, mongoose.Model<IUserApiKey, any, any, any, mongoose.Document<unknown, any, IUserApiKey> & IUserApiKey & {
9
- _id: mongoose.Types.ObjectId;
10
- }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IUserApiKey, mongoose.Document<unknown, {}, mongoose.FlatRecord<IUserApiKey>> & mongoose.FlatRecord<IUserApiKey> & {
11
- _id: mongoose.Types.ObjectId;
12
- }>;
13
- declare const UserApiKeyModel: mongoose.PaginateModel<IUserApiKey, {}, {}>;
14
- export { UserApiKeySchema, UserApiKeyModel };
15
- export default UserApiKeyModel;
16
- //# sourceMappingURL=UserApiKeyModel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserApiKeyModel.d.ts","sourceRoot":"","sources":["../../src/models/UserApiKeyModel.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAMjD,QAAA,MAAM,gBAAgB;;;;EA8BA,CAAC;AAYvB,QAAA,MAAM,eAAe,6CAAuG,CAAC;AAG7H,OAAO,EACH,gBAAgB,EAChB,eAAe,EAClB,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -1,16 +0,0 @@
1
- /// <reference types="mongoose/types/document.js" />
2
- /// <reference types="mongoose/types/types.js" />
3
- /// <reference types="mongoose/types/models.js" />
4
- /// <reference types="mongoose/types/schemaoptions.js" />
5
- /// <reference types="mongoose/types/utility.js" />
6
- import { mongoose } from '@drax/common-back';
7
- import { IUserGroup } from "@drax/identity-share";
8
- declare const UserGroupSchema: mongoose.Schema<IUserGroup, mongoose.Model<IUserGroup, any, any, any, mongoose.Document<unknown, any, IUserGroup> & IUserGroup & {
9
- _id: mongoose.Types.ObjectId;
10
- }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IUserGroup, mongoose.Document<unknown, {}, mongoose.FlatRecord<IUserGroup>> & mongoose.FlatRecord<IUserGroup> & {
11
- _id: mongoose.Types.ObjectId;
12
- }>;
13
- declare const UserGroupModel: mongoose.PaginateModel<IUserGroup, {}, {}>;
14
- export { UserGroupSchema, UserGroupModel };
15
- export default UserGroupModel;
16
- //# sourceMappingURL=UserGroupModel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserGroupModel.d.ts","sourceRoot":"","sources":["../../src/models/UserGroupModel.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAOhD,QAAA,MAAM,eAAe;;;;EAmBC,CAAC;AAYvB,QAAA,MAAM,cAAc,4CAAwH,CAAC;AAE7I,OAAO,EACH,eAAe,EACf,cAAc,EACjB,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -1,16 +0,0 @@
1
- /// <reference types="mongoose/types/document.js" />
2
- /// <reference types="mongoose/types/types.js" />
3
- /// <reference types="mongoose/types/models.js" />
4
- /// <reference types="mongoose/types/schemaoptions.js" />
5
- /// <reference types="mongoose/types/utility.js" />
6
- import { mongoose } from '@drax/common-back';
7
- import { IUser } from "@drax/identity-share";
8
- declare const UserSchema: mongoose.Schema<IUser, mongoose.Model<IUser, any, any, any, mongoose.Document<unknown, any, IUser> & IUser & {
9
- _id: mongoose.Types.ObjectId;
10
- }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IUser, mongoose.Document<unknown, {}, mongoose.FlatRecord<IUser>> & mongoose.FlatRecord<IUser> & {
11
- _id: mongoose.Types.ObjectId;
12
- }>;
13
- declare const UserModel: mongoose.PaginateModel<IUser, {}, {}>;
14
- export { UserSchema, UserModel };
15
- export default UserModel;
16
- //# sourceMappingURL=UserModel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserModel.d.ts","sourceRoot":"","sources":["../../src/models/UserModel.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAC,QAAQ,EAAqB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAC;AAO3C,QAAA,MAAM,UAAU;;;;EA6DM,CAAC;AAYvB,QAAA,MAAM,SAAS,uCAA+F,CAAC;AAE/G,OAAO,EACH,UAAU,EACV,SAAS,EACZ,CAAA;AAED,eAAe,SAAS,CAAA"}
@@ -1,27 +0,0 @@
1
- declare enum IdentityPermissions {
2
- CreateUser = "user:create",
3
- UpdateUser = "user:update",
4
- DeleteUser = "user:delete",
5
- ViewUser = "user:view",
6
- ManageUser = "user:manage",
7
- CreateUserApiKey = "userApiKey:create",
8
- UpdateUserApiKey = "userApiKey:update",
9
- DeleteUserApiKey = "userApiKey:delete",
10
- ViewUserApiKey = "userApiKey:view",
11
- ViewMyUserApiKey = "userApiKey:myView",
12
- ManageUserApiKey = "userApiKey:manage",
13
- CreateRole = "role:create",
14
- UpdateRole = "role:update",
15
- DeleteRole = "role:delete",
16
- ViewRole = "role:view",
17
- ManageRole = "role:manage",
18
- PermissionsRole = "role:permissions",
19
- CreateTenant = "tenant:create",
20
- UpdateTenant = "tenant:update",
21
- DeleteTenant = "tenant:delete",
22
- ViewTenant = "tenant:view",
23
- ManageTenant = "tenant:manage"
24
- }
25
- export default IdentityPermissions;
26
- export { IdentityPermissions };
27
- //# sourceMappingURL=IdentityPermissions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IdentityPermissions.d.ts","sourceRoot":"","sources":["../../src/permissions/IdentityPermissions.ts"],"names":[],"mappings":"AAAA,aAAK,mBAAmB;IAGpB,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,QAAQ,cAAc;IACtB,UAAU,gBAAgB;IAE1B,gBAAgB,sBAAsB;IACtC,gBAAgB,sBAAsB;IACtC,gBAAgB,sBAAsB;IACtC,cAAc,oBAAoB;IAClC,gBAAgB,sBAAsB;IACtC,gBAAgB,sBAAsB;IAEtC,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,QAAQ,cAAc;IACtB,UAAU,gBAAgB;IAC1B,eAAe,qBAAqB;IAGpC,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,UAAU,gBAAgB;IAC1B,YAAY,kBAAkB;CAEjC;AAED,eAAe,mBAAmB,CAAC;AACnC,OAAO,EAAC,mBAAmB,EAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- import { IJwtUser, IRole } from "@drax/identity-share";
2
- declare class Rbac {
3
- private role;
4
- private authUser;
5
- constructor(authUser: IJwtUser, role: IRole);
6
- get getRole(): IRole;
7
- get getAuthUser(): IJwtUser;
8
- hasPermission(requiredPermission: string): boolean;
9
- assertPermission(requiredPermission: string): void;
10
- assertOrPermissions(requiredPermissions: string[]): boolean;
11
- assertAuthenticated(): void;
12
- }
13
- export default Rbac;
14
- export { Rbac };
15
- //# sourceMappingURL=Rbac.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Rbac.d.ts","sourceRoot":"","sources":["../../src/rbac/Rbac.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,sBAAsB,CAAC;AAGrD,cAAM,IAAI;IACN,OAAO,CAAC,IAAI,CAAQ;IACpB,OAAO,CAAC,QAAQ,CAAW;gBAEf,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK;IAK3C,IAAI,OAAO,UAEV;IAED,IAAI,WAAW,aAEd;IAED,aAAa,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO;IAQlD,gBAAgB,CAAC,kBAAkB,EAAE,MAAM;IAM3C,mBAAmB,CAAC,mBAAmB,EAAE,MAAM,EAAE;IAWjD,mBAAmB;CAMtB;AAED,eAAe,IAAI,CAAC;AACpB,OAAO,EAAC,IAAI,EAAC,CAAA"}