kcommons 2.2.1 → 3.0.0
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/build/constants/entityTypes.constants.js +1 -1
- package/build/constants/permission.constants.d.ts +7 -1
- package/build/constants/permission.constants.js +20 -4
- package/build/index.d.ts +1 -0
- package/build/index.js +3 -5
- package/build/typings/approvals/approvalChain.typings.js +1 -1
- package/build/typings/dept-type/deptType.typings.d.ts +5 -0
- package/build/typings/dept-type/deptType.typings.js +9 -0
- package/build/typings/includes/approvalChain.include.js +1 -1
- package/build/typings/includes/companyVendors.inlcude.js +1 -1
- package/build/typings/includes/department.include.js +1 -1
- package/build/typings/includes/itemCategory.include.js +1 -1
- package/build/typings/includes/offices.include.js +1 -1
- package/build/typings/includes/roles.include.d.ts +4 -1
- package/build/typings/includes/roles.include.js +4 -1
- package/build/typings/includes/storeInventory.include.js +1 -1
- package/build/typings/includes/storeLocation.include.js +1 -1
- package/build/typings/includes/user.include.js +1 -1
- package/package.json +1 -1
|
@@ -7,4 +7,4 @@ var EntityTypes;
|
|
|
7
7
|
EntityTypes["PURCHASE_LOCATION"] = "purchase_location";
|
|
8
8
|
EntityTypes["GATE"] = "gate";
|
|
9
9
|
EntityTypes["OFFICE"] = "office";
|
|
10
|
-
})(EntityTypes
|
|
10
|
+
})(EntityTypes = exports.EntityTypes || (exports.EntityTypes = {}));
|
|
@@ -18,7 +18,7 @@ export declare enum DOCUMENTS {
|
|
|
18
18
|
export declare enum PERMISSION_ENTITIES_OTHERS {
|
|
19
19
|
ITEMS = "Items"
|
|
20
20
|
}
|
|
21
|
-
export type IPERMISSION_ENTITIES = DOCUMENTS | PERMISSION_ENTITIES_OTHERS;
|
|
21
|
+
export declare type IPERMISSION_ENTITIES = DOCUMENTS | PERMISSION_ENTITIES_OTHERS;
|
|
22
22
|
export declare const PERMISSION_ENTITIES: {
|
|
23
23
|
ITEMS: PERMISSION_ENTITIES_OTHERS.ITEMS;
|
|
24
24
|
INDENT: DOCUMENTS.INDENT;
|
|
@@ -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) {
|
|
@@ -8,7 +9,7 @@ var PERMISSION_ACTIONS;
|
|
|
8
9
|
PERMISSION_ACTIONS["STV"] = "send_to_vendor_perm";
|
|
9
10
|
PERMISSION_ACTIONS["APPROVALS"] = "approvals_perm";
|
|
10
11
|
PERMISSION_ACTIONS["VIEW"] = "view";
|
|
11
|
-
})(PERMISSION_ACTIONS
|
|
12
|
+
})(PERMISSION_ACTIONS = exports.PERMISSION_ACTIONS || (exports.PERMISSION_ACTIONS = {}));
|
|
12
13
|
var DOCUMENTS;
|
|
13
14
|
(function (DOCUMENTS) {
|
|
14
15
|
DOCUMENTS["INDENT"] = "Indent";
|
|
@@ -20,11 +21,11 @@ var DOCUMENTS;
|
|
|
20
21
|
DOCUMENTS["RFP"] = "RFP";
|
|
21
22
|
DOCUMENTS["PO"] = "PO";
|
|
22
23
|
DOCUMENTS["GRN"] = "GRN";
|
|
23
|
-
})(DOCUMENTS
|
|
24
|
+
})(DOCUMENTS = exports.DOCUMENTS || (exports.DOCUMENTS = {}));
|
|
24
25
|
var PERMISSION_ENTITIES_OTHERS;
|
|
25
26
|
(function (PERMISSION_ENTITIES_OTHERS) {
|
|
26
27
|
PERMISSION_ENTITIES_OTHERS["ITEMS"] = "Items";
|
|
27
|
-
})(PERMISSION_ENTITIES_OTHERS
|
|
28
|
+
})(PERMISSION_ENTITIES_OTHERS = exports.PERMISSION_ENTITIES_OTHERS || (exports.PERMISSION_ENTITIES_OTHERS = {}));
|
|
28
29
|
exports.PERMISSION_ENTITIES = Object.assign(Object.assign({}, DOCUMENTS), PERMISSION_ENTITIES_OTHERS);
|
|
29
30
|
exports.PERMISSION_CONFIG = {
|
|
30
31
|
[exports.PERMISSION_ENTITIES.INDENT]: [
|
|
@@ -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
package/build/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
|
@@ -38,3 +34,5 @@ __exportStar(require("./constants/entityTypes.constants"), exports);
|
|
|
38
34
|
__exportStar(require("./typings/indent/indent_priority"), exports);
|
|
39
35
|
// PR
|
|
40
36
|
__exportStar(require("./typings/pr/pr_priority"), exports);
|
|
37
|
+
// dept types
|
|
38
|
+
__exportStar(require("./typings/dept-type/deptType.typings"), exports);
|
|
@@ -6,4 +6,4 @@ var ApprovalAction;
|
|
|
6
6
|
ApprovalAction["APPROVED"] = "APPROVED";
|
|
7
7
|
ApprovalAction["REJECTED"] = "REJECTED";
|
|
8
8
|
ApprovalAction["CANCELLED"] = "CANCELLED";
|
|
9
|
-
})(ApprovalAction
|
|
9
|
+
})(ApprovalAction = exports.ApprovalAction || (exports.ApprovalAction = {}));
|
|
@@ -4,4 +4,4 @@ exports.ApprovalConfigInlcude = void 0;
|
|
|
4
4
|
var ApprovalConfigInlcude;
|
|
5
5
|
(function (ApprovalConfigInlcude) {
|
|
6
6
|
ApprovalConfigInlcude["approval_chain"] = "approval_chain";
|
|
7
|
-
})(ApprovalConfigInlcude
|
|
7
|
+
})(ApprovalConfigInlcude = exports.ApprovalConfigInlcude || (exports.ApprovalConfigInlcude = {}));
|
|
@@ -5,4 +5,4 @@ var CompanyVendorsInclude;
|
|
|
5
5
|
(function (CompanyVendorsInclude) {
|
|
6
6
|
CompanyVendorsInclude["COMPANY"] = "company";
|
|
7
7
|
CompanyVendorsInclude["VENDOR"] = "vendor";
|
|
8
|
-
})(CompanyVendorsInclude
|
|
8
|
+
})(CompanyVendorsInclude = exports.CompanyVendorsInclude || (exports.CompanyVendorsInclude = {}));
|
|
@@ -5,4 +5,4 @@ var DepartmentInclude;
|
|
|
5
5
|
(function (DepartmentInclude) {
|
|
6
6
|
DepartmentInclude["subdepartments"] = "subdepartments";
|
|
7
7
|
DepartmentInclude["roles"] = "roles";
|
|
8
|
-
})(DepartmentInclude
|
|
8
|
+
})(DepartmentInclude = exports.DepartmentInclude || (exports.DepartmentInclude = {}));
|
|
@@ -4,4 +4,4 @@ exports.ItemCategoryInclude = void 0;
|
|
|
4
4
|
var ItemCategoryInclude;
|
|
5
5
|
(function (ItemCategoryInclude) {
|
|
6
6
|
ItemCategoryInclude["subcategories"] = "subcategories";
|
|
7
|
-
})(ItemCategoryInclude
|
|
7
|
+
})(ItemCategoryInclude = exports.ItemCategoryInclude || (exports.ItemCategoryInclude = {}));
|
|
@@ -8,4 +8,4 @@ var OfficeInclude;
|
|
|
8
8
|
OfficeInclude["departments"] = "departments";
|
|
9
9
|
OfficeInclude["served_by_store_locations"] = "served_by_store_locations";
|
|
10
10
|
OfficeInclude["associated_purchase_locations"] = "associated_purchase_locations";
|
|
11
|
-
})(OfficeInclude
|
|
11
|
+
})(OfficeInclude = exports.OfficeInclude || (exports.OfficeInclude = {}));
|
|
@@ -4,4 +4,7 @@ exports.RolesInclude = void 0;
|
|
|
4
4
|
var RolesInclude;
|
|
5
5
|
(function (RolesInclude) {
|
|
6
6
|
RolesInclude["permissions"] = "permissions";
|
|
7
|
-
|
|
7
|
+
RolesInclude["assigned_active_users"] = "assigned_active_users";
|
|
8
|
+
RolesInclude["approval_chains"] = "approval_chains";
|
|
9
|
+
RolesInclude["assigned_users"] = "assigned_users";
|
|
10
|
+
})(RolesInclude = exports.RolesInclude || (exports.RolesInclude = {}));
|
|
@@ -5,4 +5,4 @@ var StoreInventoryItemIncludes;
|
|
|
5
5
|
(function (StoreInventoryItemIncludes) {
|
|
6
6
|
StoreInventoryItemIncludes["item"] = "item";
|
|
7
7
|
StoreInventoryItemIncludes["store"] = "store";
|
|
8
|
-
})(StoreInventoryItemIncludes
|
|
8
|
+
})(StoreInventoryItemIncludes = exports.StoreInventoryItemIncludes || (exports.StoreInventoryItemIncludes = {}));
|
|
@@ -9,4 +9,4 @@ var StoreLocationInclude;
|
|
|
9
9
|
StoreLocationInclude["roles"] = "roles";
|
|
10
10
|
StoreLocationInclude["target_offices"] = "target_offices";
|
|
11
11
|
StoreLocationInclude["served_by_purchase_locations"] = "served_by_purchase_locations";
|
|
12
|
-
})(StoreLocationInclude
|
|
12
|
+
})(StoreLocationInclude = exports.StoreLocationInclude || (exports.StoreLocationInclude = {}));
|
|
@@ -8,4 +8,4 @@ var UserInclude;
|
|
|
8
8
|
UserInclude["assigned_offices"] = "assigned_offices";
|
|
9
9
|
UserInclude["assigned_stores"] = "assigned_stores";
|
|
10
10
|
UserInclude["assigned_roles"] = "assigned_roles";
|
|
11
|
-
})(UserInclude
|
|
11
|
+
})(UserInclude = exports.UserInclude || (exports.UserInclude = {}));
|