@hiennc24/constant 1.6.8 → 1.6.9

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/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import SERVICE_BROKER from "./service.constant.json";
1
+ import SERVICE_BROKER from './service.constant.json';
2
2
  export default SERVICE_BROKER;
3
3
  export type ServiceBrokerConstantType = {
4
4
  [K in keyof typeof SERVICE_BROKER]: (typeof SERVICE_BROKER)[K];
5
5
  };
6
- export { default as COLLECTIONS, CollectionsConstantType, } from "./collections.constant";
6
+ export { default as COLLECTIONS, CollectionsConstantType, } from './collections.constant';
7
7
  export declare const addLocalServices: (services: ServiceBrokerConstantType) => void;
8
+ export { default as PERMISSIONS } from './permission.constant';
package/lib/index.js CHANGED
@@ -3,13 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.addLocalServices = exports.COLLECTIONS = void 0;
6
+ exports.PERMISSIONS = exports.addLocalServices = exports.COLLECTIONS = void 0;
7
7
  const service_constant_json_1 = __importDefault(require("./service.constant.json"));
8
8
  exports.default = service_constant_json_1.default;
9
9
  var collections_constant_1 = require("./collections.constant");
10
10
  Object.defineProperty(exports, "COLLECTIONS", { enumerable: true, get: function () { return __importDefault(collections_constant_1).default; } });
11
11
  const addLocalServices = (services) => {
12
12
  Object.assign(service_constant_json_1.default, services);
13
- console.log("added local services!");
13
+ console.log('added local services!');
14
14
  };
15
15
  exports.addLocalServices = addLocalServices;
16
+ var permission_constant_1 = require("./permission.constant");
17
+ Object.defineProperty(exports, "PERMISSIONS", { enumerable: true, get: function () { return __importDefault(permission_constant_1).default; } });
@@ -17,5 +17,48 @@ declare const PERMISSIONS: {
17
17
  SVC_AUTH_ROLES_UPDATE: string;
18
18
  SVC_AUTH_ROLES_CREATE: string;
19
19
  SVC_AUTH_ROLES_BULK_DELETE: string;
20
+ SYSTEM_PERMISSION_CACHE_EVICT: string;
21
+ ORGANIZATION_APP_FULL: string;
22
+ ORGANIZATION_GROUP_FULL: string;
23
+ ORGANIZATION_EMPLOYEES_FULL: string;
24
+ ORGANIZATION_EMPLOYEES_LIST: string;
25
+ ORGANIZATION_EMPLOYEES_READ: string;
26
+ ORGANIZATION_EMPLOYEES_CREATE: string;
27
+ ORGANIZATION_EMPLOYEES_UPDATE: string;
28
+ ORGANIZATION_EMPLOYEES_DELETE: string;
29
+ ORGANIZATION_EMPLOYEES_DOWNLOAD: string;
30
+ ORGANIZATION_EMPLOYEES_UPLOAD: string;
31
+ ORGANIZATION_EMPLOYEES_CANCEL_APPROVE: string;
32
+ ORGANIZATION_ORGANIZATIONAL_FULL: string;
33
+ ORGANIZATION_ORGANIZATIONAL_LIST: string;
34
+ ORGANIZATION_ORGANIZATIONAL_READ: string;
35
+ ORGANIZATION_ORGANIZATIONAL_CREATE: string;
36
+ ORGANIZATION_ORGANIZATIONAL_UPDATE: string;
37
+ ORGANIZATION_ORGANIZATIONAL_DELETE: string;
38
+ ORGANIZATION_ORGANIZATIONAL_DOWNLOAD: string;
39
+ ORGANIZATION_ORGANIZATIONAL_UPLOAD: string;
40
+ ORGANIZATION_ORGANIZATIONAL_APPROVE: string;
41
+ ORGANIZATION_ORGANIZATIONAL_CANCEL_APPROVE: string;
42
+ ORGANIZATION_ORGANIZATIONAL_UPDATE_STATUS: string;
43
+ ORGANIZATION_VALUE_CHAINS_FULL: string;
44
+ ORGANIZATION_VALUE_CHAINS_LIST: string;
45
+ ORGANIZATION_VALUE_CHAINS_READ: string;
46
+ ORGANIZATION_VALUE_CHAINS_CREATE: string;
47
+ ORGANIZATION_VALUE_CHAINS_UPDATE: string;
48
+ ORGANIZATION_VALUE_CHAINS_DELETE: string;
49
+ ORGANIZATION_VALUE_CHAINS_DOWNLOAD: string;
50
+ ORGANIZATION_VALUE_CHAINS_UPLOAD: string;
51
+ ORGANIZATION_VALUE_CHAINS_APPROVE: string;
52
+ ORGANIZATION_MISSION_FULL: string;
53
+ ORGANIZATION_MISSION_LIST: string;
54
+ ORGANIZATION_MISSION_READ: string;
55
+ ORGANIZATION_MISSION_CREATE: string;
56
+ ORGANIZATION_MISSION_UPDATE: string;
57
+ ORGANIZATION_MISSION_COPY: string;
58
+ ORGANIZATION_MISSION_DELETE: string;
59
+ ORGANIZATION_MISSION_DOWNLOAD: string;
60
+ ORGANIZATION_MISSION_UPLOAD: string;
61
+ ORGANIZATION_MISSION_APPROVE: string;
62
+ ORGANIZATION_MISSION_SETTING: string;
20
63
  };
21
64
  export default PERMISSIONS;
@@ -2,22 +2,71 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const PERMISSIONS = {
4
4
  // 1. System Management Permission
5
- SVC_SYSTEM_MANAGEMENT_FULL: "system_management:*",
5
+ SVC_SYSTEM_MANAGEMENT_FULL: 'system_management:*',
6
6
  // 1.1 Accounts
7
- SVC_AUTH_ACCOUNTS_FULL: "system_management:accounts:*",
8
- SVC_AUTH_ACCOUNTS_LIST: "system_management:accounts:list",
9
- SVC_AUTH_ACCOUNTS_READ: "system_management:accounts:read",
10
- SVC_AUTH_ACCOUNTS_WRITE: "system_management:accounts:write",
11
- SVC_AUTH_ACCOUNTS_UPDATE: "system_management:accounts:update",
12
- SVC_AUTH_ACCOUNTS_CREATE: "system_management:accounts:create",
13
- SVC_AUTH_ACCOUNTS_BULK_DELETE: "system_management:accounts:bulk_delete",
14
- SVC_AUTH_ACCOUNTS_UPDATE_STATUS: "system_management:accounts:update_status",
7
+ SVC_AUTH_ACCOUNTS_FULL: 'system_management:accounts:*',
8
+ SVC_AUTH_ACCOUNTS_LIST: 'system_management:accounts:list',
9
+ SVC_AUTH_ACCOUNTS_READ: 'system_management:accounts:read',
10
+ SVC_AUTH_ACCOUNTS_WRITE: 'system_management:accounts:write',
11
+ SVC_AUTH_ACCOUNTS_UPDATE: 'system_management:accounts:update',
12
+ SVC_AUTH_ACCOUNTS_CREATE: 'system_management:accounts:create',
13
+ SVC_AUTH_ACCOUNTS_BULK_DELETE: 'system_management:accounts:bulk_delete',
14
+ SVC_AUTH_ACCOUNTS_UPDATE_STATUS: 'system_management:accounts:update_status',
15
15
  // 1.2 Roles Management
16
- SVC_AUTH_ROLES_FULL: "system_management:roles:*",
17
- SVC_AUTH_ROLES_LIST: "system_management:roles:list",
18
- SVC_AUTH_ROLES_READ: "system_management:roles:read",
19
- SVC_AUTH_ROLES_UPDATE: "system_management:roles:update",
20
- SVC_AUTH_ROLES_CREATE: "system_management:roles:create",
21
- SVC_AUTH_ROLES_BULK_DELETE: "system_management:roles:bulk_delete",
16
+ SVC_AUTH_ROLES_FULL: 'system_management:roles:*',
17
+ SVC_AUTH_ROLES_LIST: 'system_management:roles:list',
18
+ SVC_AUTH_ROLES_READ: 'system_management:roles:read',
19
+ SVC_AUTH_ROLES_UPDATE: 'system_management:roles:update',
20
+ SVC_AUTH_ROLES_CREATE: 'system_management:roles:create',
21
+ SVC_AUTH_ROLES_BULK_DELETE: 'system_management:roles:bulk_delete',
22
+ // 1.3 Permission Cache (gateway admin force-clear)
23
+ SYSTEM_PERMISSION_CACHE_EVICT: 'system_management:permission_cache:evict',
24
+ // 2. Organization — application + group wildcards
25
+ ORGANIZATION_APP_FULL: 'organization_service:*',
26
+ ORGANIZATION_GROUP_FULL: 'organization_service:operational_organization:*',
27
+ // 2.1 Employees (actions: list, read, create, update, delete, download, upload, cancel_approve)
28
+ ORGANIZATION_EMPLOYEES_FULL: 'organization_service:operational_organization:employees:*',
29
+ ORGANIZATION_EMPLOYEES_LIST: 'organization_service:operational_organization:employees:list',
30
+ ORGANIZATION_EMPLOYEES_READ: 'organization_service:operational_organization:employees:read',
31
+ ORGANIZATION_EMPLOYEES_CREATE: 'organization_service:operational_organization:employees:create',
32
+ ORGANIZATION_EMPLOYEES_UPDATE: 'organization_service:operational_organization:employees:update',
33
+ ORGANIZATION_EMPLOYEES_DELETE: 'organization_service:operational_organization:employees:delete',
34
+ ORGANIZATION_EMPLOYEES_DOWNLOAD: 'organization_service:operational_organization:employees:download',
35
+ ORGANIZATION_EMPLOYEES_UPLOAD: 'organization_service:operational_organization:employees:upload',
36
+ ORGANIZATION_EMPLOYEES_CANCEL_APPROVE: 'organization_service:operational_organization:employees:cancel_approve',
37
+ // 2.2 Organizational (actions: list, read, create, update, delete, download, upload, approve, cancel_approve, update_status)
38
+ ORGANIZATION_ORGANIZATIONAL_FULL: 'organization_service:operational_organization:organizational:*',
39
+ ORGANIZATION_ORGANIZATIONAL_LIST: 'organization_service:operational_organization:organizational:list',
40
+ ORGANIZATION_ORGANIZATIONAL_READ: 'organization_service:operational_organization:organizational:read',
41
+ ORGANIZATION_ORGANIZATIONAL_CREATE: 'organization_service:operational_organization:organizational:create',
42
+ ORGANIZATION_ORGANIZATIONAL_UPDATE: 'organization_service:operational_organization:organizational:update',
43
+ ORGANIZATION_ORGANIZATIONAL_DELETE: 'organization_service:operational_organization:organizational:delete',
44
+ ORGANIZATION_ORGANIZATIONAL_DOWNLOAD: 'organization_service:operational_organization:organizational:download',
45
+ ORGANIZATION_ORGANIZATIONAL_UPLOAD: 'organization_service:operational_organization:organizational:upload',
46
+ ORGANIZATION_ORGANIZATIONAL_APPROVE: 'organization_service:operational_organization:organizational:approve',
47
+ ORGANIZATION_ORGANIZATIONAL_CANCEL_APPROVE: 'organization_service:operational_organization:organizational:cancel_approve',
48
+ ORGANIZATION_ORGANIZATIONAL_UPDATE_STATUS: 'organization_service:operational_organization:organizational:update_status',
49
+ // 2.3 Value Chains (actions: list, read, create, update, delete, download, upload, approve)
50
+ ORGANIZATION_VALUE_CHAINS_FULL: 'organization_service:operational_organization:value_chains:*',
51
+ ORGANIZATION_VALUE_CHAINS_LIST: 'organization_service:operational_organization:value_chains:list',
52
+ ORGANIZATION_VALUE_CHAINS_READ: 'organization_service:operational_organization:value_chains:read',
53
+ ORGANIZATION_VALUE_CHAINS_CREATE: 'organization_service:operational_organization:value_chains:create',
54
+ ORGANIZATION_VALUE_CHAINS_UPDATE: 'organization_service:operational_organization:value_chains:update',
55
+ ORGANIZATION_VALUE_CHAINS_DELETE: 'organization_service:operational_organization:value_chains:delete',
56
+ ORGANIZATION_VALUE_CHAINS_DOWNLOAD: 'organization_service:operational_organization:value_chains:download',
57
+ ORGANIZATION_VALUE_CHAINS_UPLOAD: 'organization_service:operational_organization:value_chains:upload',
58
+ ORGANIZATION_VALUE_CHAINS_APPROVE: 'organization_service:operational_organization:value_chains:approve',
59
+ // 2.4 Mission (actions: list, read, create, update, copy, delete, download, upload, approve, setting)
60
+ ORGANIZATION_MISSION_FULL: 'organization_service:operational_organization:mission:*',
61
+ ORGANIZATION_MISSION_LIST: 'organization_service:operational_organization:mission:list',
62
+ ORGANIZATION_MISSION_READ: 'organization_service:operational_organization:mission:read',
63
+ ORGANIZATION_MISSION_CREATE: 'organization_service:operational_organization:mission:create',
64
+ ORGANIZATION_MISSION_UPDATE: 'organization_service:operational_organization:mission:update',
65
+ ORGANIZATION_MISSION_COPY: 'organization_service:operational_organization:mission:copy',
66
+ ORGANIZATION_MISSION_DELETE: 'organization_service:operational_organization:mission:delete',
67
+ ORGANIZATION_MISSION_DOWNLOAD: 'organization_service:operational_organization:mission:download',
68
+ ORGANIZATION_MISSION_UPLOAD: 'organization_service:operational_organization:mission:upload',
69
+ ORGANIZATION_MISSION_APPROVE: 'organization_service:operational_organization:mission:approve',
70
+ ORGANIZATION_MISSION_SETTING: 'organization_service:operational_organization:mission:setting',
22
71
  };
23
72
  exports.default = PERMISSIONS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiennc24/constant",
3
- "version": "1.6.8",
3
+ "version": "1.6.9",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {