plac-micro-common 1.3.68 → 1.3.70

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.
@@ -3,6 +3,7 @@ export declare const REDIS_CACHE_KEYS: {
3
3
  readonly Info: (appId: string) => string;
4
4
  };
5
5
  readonly AppClient: {
6
+ readonly Info: (id: string) => string;
6
7
  readonly ClientIdInfo: (clientId: string) => string;
7
8
  };
8
9
  readonly General: {
@@ -14,6 +15,8 @@ export declare const REDIS_CACHE_KEYS: {
14
15
  };
15
16
  readonly User: {
16
17
  readonly Info: (userId: string) => string;
18
+ readonly RoleMenu: (userId: string, appId: string) => string;
19
+ readonly RolePermission: (userId: string, appId: string) => string;
17
20
  };
18
21
  };
19
22
  export declare const REDIS_CACHE_TTL: {
@@ -25,4 +28,8 @@ export declare const REDIS_CACHE_TTL: {
25
28
  };
26
29
  Dropdown: number;
27
30
  UserInfo: number;
31
+ User: {
32
+ RoleMenu: number;
33
+ RolePermission: number;
34
+ };
28
35
  };
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.REDIS_CACHE_TTL = exports.REDIS_CACHE_KEYS = void 0;
4
4
  exports.REDIS_CACHE_KEYS = {
5
5
  App: {
6
- Info: (appId) => `app:${appId}:info`,
6
+ Info: (appId) => `app:${appId}`,
7
7
  },
8
8
  AppClient: {
9
- ClientIdInfo: (clientId) => `app-client-clientId:${clientId}:info`,
9
+ Info: (id) => `app-client:${id}`,
10
+ ClientIdInfo: (clientId) => `app-client-clientId:${clientId}`,
10
11
  },
11
12
  General: {
12
13
  MaritalStatus: "v1:general:dropdown:marital-status",
@@ -16,7 +17,9 @@ exports.REDIS_CACHE_KEYS = {
16
17
  Occupation: "v1:general:dropdown:occupation",
17
18
  },
18
19
  User: {
19
- Info: (userId) => `auth:user:${userId}:info`,
20
+ Info: (userId) => `user:${userId}`,
21
+ RoleMenu: (userId, appId) => `user-role-menu:${userId}:${appId}`,
22
+ RolePermission: (userId, appId) => `user-role-permission:${userId}:${appId}`,
20
23
  },
21
24
  };
22
25
  exports.REDIS_CACHE_TTL = {
@@ -26,6 +29,10 @@ exports.REDIS_CACHE_TTL = {
26
29
  AppClientInfo: {
27
30
  Default: 60 * 60 * 12, // 12 hour
28
31
  },
29
- Dropdown: 60 * 60 * 6, // 6 hours
32
+ Dropdown: 60 * 60 * 6, // 12 hours
30
33
  UserInfo: 60 * 15, // 15 minutes
34
+ User: {
35
+ RoleMenu: 60 * 15, // 15 minutes
36
+ RolePermission: 60 * 15, // 15 minutes
37
+ },
31
38
  };
@@ -29,6 +29,7 @@ export declare const PermissionResource: {
29
29
  readonly Policy: "policy";
30
30
  readonly Quotation: "quotation";
31
31
  readonly Role: "role";
32
+ readonly Referral: "referral";
32
33
  readonly Staff: "staff";
33
34
  readonly User: "user";
34
35
  };
@@ -33,6 +33,7 @@ exports.PermissionResource = {
33
33
  Policy: "policy",
34
34
  Quotation: "quotation",
35
35
  Role: "role",
36
+ Referral: "referral",
36
37
  Staff: "staff",
37
38
  User: "user",
38
39
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plac-micro-common",
3
- "version": "1.3.68",
3
+ "version": "1.3.70",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {