kcommons 2.3.0 → 3.0.1

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.
@@ -43,3 +43,9 @@ export declare const PERMISSION_CONFIG: {
43
43
  Items: PERMISSION_ACTIONS[];
44
44
  GRN: PERMISSION_ACTIONS[];
45
45
  };
46
+ export declare const EntitySpecificDocuments: {
47
+ gate: DOCUMENTS[];
48
+ office: DOCUMENTS[];
49
+ store_location: DOCUMENTS[];
50
+ purchase_location: DOCUMENTS[];
51
+ };
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PERMISSION_CONFIG = exports.PERMISSION_ENTITIES = exports.PERMISSION_ENTITIES_OTHERS = exports.DOCUMENTS = exports.PERMISSION_ACTIONS = void 0;
3
+ exports.EntitySpecificDocuments = exports.PERMISSION_CONFIG = exports.PERMISSION_ENTITIES = exports.PERMISSION_ENTITIES_OTHERS = exports.DOCUMENTS = exports.PERMISSION_ACTIONS = void 0;
4
+ const entityTypes_constants_1 = require("./entityTypes.constants");
4
5
  //Make sure the value matches the corresponding column name of Permissions table/Schema
5
6
  var PERMISSION_ACTIONS;
6
7
  (function (PERMISSION_ACTIONS) {
@@ -75,3 +76,18 @@ exports.PERMISSION_CONFIG = {
75
76
  PERMISSION_ACTIONS.CRUDSAC,
76
77
  ],
77
78
  };
79
+ exports.EntitySpecificDocuments = {
80
+ [entityTypes_constants_1.EntityTypes.GATE]: [exports.PERMISSION_ENTITIES.GRN],
81
+ [entityTypes_constants_1.EntityTypes.OFFICE]: [exports.PERMISSION_ENTITIES.INDENT],
82
+ [entityTypes_constants_1.EntityTypes.STORE_LOCATION]: [
83
+ exports.PERMISSION_ENTITIES.MRN,
84
+ exports.PERMISSION_ENTITIES.PR,
85
+ exports.PERMISSION_ENTITIES.MI,
86
+ ],
87
+ [entityTypes_constants_1.EntityTypes.PURCHASE_LOCATION]: [
88
+ exports.PERMISSION_ENTITIES.RFQ,
89
+ exports.PERMISSION_ENTITIES.RFP,
90
+ exports.PERMISSION_ENTITIES.RFI,
91
+ exports.PERMISSION_ENTITIES.PO,
92
+ ],
93
+ };
package/build/index.d.ts CHANGED
@@ -17,3 +17,4 @@ export * from "./constants/permission.constants";
17
17
  export * from "./constants/entityTypes.constants";
18
18
  export * from "./typings/indent/indent_priority";
19
19
  export * from "./typings/pr/pr_priority";
20
+ export * from "./typings/dept-type/deptType.typings";
package/build/index.js CHANGED
@@ -34,3 +34,5 @@ __exportStar(require("./constants/entityTypes.constants"), exports);
34
34
  __exportStar(require("./typings/indent/indent_priority"), exports);
35
35
  // PR
36
36
  __exportStar(require("./typings/pr/pr_priority"), exports);
37
+ // dept types
38
+ __exportStar(require("./typings/dept-type/deptType.typings"), exports);
@@ -0,0 +1,5 @@
1
+ export declare const DEPT_TYPES: {
2
+ PURCHASE: string;
3
+ STORE: string;
4
+ OFFICE: string;
5
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEPT_TYPES = void 0;
4
+ exports.DEPT_TYPES = {
5
+ PURCHASE: "Purchase",
6
+ STORE: "Store",
7
+ OFFICE: "Office",
8
+ };
9
+ console.log("hello");
@@ -1,7 +1,13 @@
1
1
  export declare enum UserInclude {
2
- assigned_departments = "assigned_departments",
3
- assigned_subdepartments = "assigned_subdepartments",
4
- assigned_offices = "assigned_offices",
5
- assigned_stores = "assigned_stores",
2
+ subordinates = "subordinates",
3
+ as_incharge_in_purchase_locations = "as_incharge_in_purchase_locations",
4
+ as_incharge_in_store_locations = "as_incharge_in_store_locations",
5
+ as_incharge_in_offices = "as_incharge_in_offices",
6
+ as_contact_person_companies = "as_contact_person_companies",
7
+ as_contact_person_offices = "as_contact_person_offices",
8
+ owned_companies = "owned_companies",
9
+ head_for_departments = "head_for_departments",
10
+ approved_items = "approved_items",
11
+ approval_chains = "approval_chains",
6
12
  assigned_roles = "assigned_roles"
7
13
  }
@@ -3,9 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UserInclude = void 0;
4
4
  var UserInclude;
5
5
  (function (UserInclude) {
6
- UserInclude["assigned_departments"] = "assigned_departments";
7
- UserInclude["assigned_subdepartments"] = "assigned_subdepartments";
8
- UserInclude["assigned_offices"] = "assigned_offices";
9
- UserInclude["assigned_stores"] = "assigned_stores";
6
+ UserInclude["subordinates"] = "subordinates";
7
+ UserInclude["as_incharge_in_purchase_locations"] = "as_incharge_in_purchase_locations";
8
+ UserInclude["as_incharge_in_store_locations"] = "as_incharge_in_store_locations";
9
+ UserInclude["as_incharge_in_offices"] = "as_incharge_in_offices";
10
+ UserInclude["as_contact_person_companies"] = "as_contact_person_companies";
11
+ UserInclude["as_contact_person_offices"] = "as_contact_person_offices";
12
+ UserInclude["owned_companies"] = "owned_companies";
13
+ UserInclude["head_for_departments"] = "head_for_departments";
14
+ UserInclude["approved_items"] = "approved_items";
15
+ UserInclude["approval_chains"] = "approval_chains";
10
16
  UserInclude["assigned_roles"] = "assigned_roles";
11
17
  })(UserInclude = exports.UserInclude || (exports.UserInclude = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kcommons",
3
- "version": "2.3.0",
3
+ "version": "3.0.1",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.js",