storemw-core-client 1.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.
- package/.env +1 -0
- package/.vscode/launch.json +24 -0
- package/dist/config/config.d.ts +6 -0
- package/dist/config/config.js +13 -0
- package/dist/config/env.d.ts +7 -0
- package/dist/config/env.js +16 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +32 -0
- package/dist/lib/ApiService.d.ts +41 -0
- package/dist/lib/ApiService.js +143 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/index.js +9 -0
- package/dist/lib/queryParams.d.ts +43 -0
- package/dist/lib/queryParams.js +99 -0
- package/dist/services/account/AccountService.d.ts +52 -0
- package/dist/services/account/AccountService.js +119 -0
- package/dist/services/auth/AuthService.d.ts +44 -0
- package/dist/services/auth/AuthService.js +76 -0
- package/dist/services/branch/BranchService.d.ts +124 -0
- package/dist/services/branch/BranchService.js +162 -0
- package/dist/services/business/BusinessService.d.ts +91 -0
- package/dist/services/business/BusinessService.js +153 -0
- package/dist/services/document/DocumentService.d.ts +578 -0
- package/dist/services/document/DocumentService.js +615 -0
- package/dist/services/index.d.ts +36 -0
- package/dist/services/index.js +97 -0
- package/dist/services/injection_field/InjectionFieldService.d.ts +113 -0
- package/dist/services/injection_field/InjectionFieldService.js +220 -0
- package/dist/services/inventory/InventoryService.d.ts +27 -0
- package/dist/services/inventory/InventoryService.js +231 -0
- package/dist/services/item/ItemService.d.ts +227 -0
- package/dist/services/item/ItemService.js +411 -0
- package/dist/services/location/LocationService.d.ts +154 -0
- package/dist/services/location/LocationService.js +256 -0
- package/dist/services/logistic/LogisticService.d.ts +104 -0
- package/dist/services/logistic/LogisticService.js +150 -0
- package/dist/services/permission/PermissionService.d.ts +296 -0
- package/dist/services/permission/PermissionService.js +576 -0
- package/dist/services/permission/config/custom/adminPermission.d.ts +4 -0
- package/dist/services/permission/config/custom/adminPermission.js +18 -0
- package/dist/services/permission/config/custom/config.d.ts +40 -0
- package/dist/services/permission/config/custom/config.js +23 -0
- package/dist/services/permission/config/default/adminPermission.d.ts +2 -0
- package/dist/services/permission/config/default/adminPermission.js +129 -0
- package/dist/services/permission/config/default/agentPermission.d.ts +2 -0
- package/dist/services/permission/config/default/agentPermission.js +43 -0
- package/dist/services/permission/config/default/customerPermission.d.ts +2 -0
- package/dist/services/permission/config/default/customerPermission.js +10 -0
- package/dist/services/permission/config/default/driverPermission.d.ts +2 -0
- package/dist/services/permission/config/default/driverPermission.js +4 -0
- package/dist/services/permission/config/default/workerPermission.d.ts +2 -0
- package/dist/services/permission/config/default/workerPermission.js +25 -0
- package/dist/services/rate/RateService.d.ts +201 -0
- package/dist/services/rate/RateService.js +303 -0
- package/dist/services/region/RegionService.d.ts +111 -0
- package/dist/services/region/RegionService.js +193 -0
- package/dist/services/repository/RepositoryService.d.ts +153 -0
- package/dist/services/repository/RepositoryService.js +243 -0
- package/dist/services/transaction/TransactionService.d.ts +153 -0
- package/dist/services/transaction/TransactionService.js +173 -0
- package/dist/services/user/BranchUserService.d.ts +129 -0
- package/dist/services/user/BranchUserService.js +193 -0
- package/dist/services/user/UserRoleService.d.ts +105 -0
- package/dist/services/user/UserRoleService.js +193 -0
- package/dist/services/user/UserService.d.ts +269 -0
- package/dist/services/user/UserService.js +477 -0
- package/dist/services/wallet/WalletService.d.ts +104 -0
- package/dist/services/wallet/WalletService.js +163 -0
- package/dist/utils/dateUtils.d.ts +6 -0
- package/dist/utils/dateUtils.js +28 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +13 -0
- package/package.json +27 -0
- package/src/config/config.ts +15 -0
- package/src/config/env.ts +18 -0
- package/src/config/index.ts +2 -0
- package/src/index.ts +41 -0
- package/src/lib/ApiService.ts +170 -0
- package/src/lib/index.ts +5 -0
- package/src/lib/queryParams.ts +162 -0
- package/src/services/account/AccountService.ts +232 -0
- package/src/services/auth/AuthService.ts +125 -0
- package/src/services/branch/BranchService.ts +330 -0
- package/src/services/business/BusinessService.ts +277 -0
- package/src/services/document/DocumentService.ts +1471 -0
- package/src/services/index.ts +73 -0
- package/src/services/injection_field/InjectionFieldService.ts +483 -0
- package/src/services/inventory/InventoryService.ts +314 -0
- package/src/services/item/ItemService.ts +707 -0
- package/src/services/location/LocationService.ts +505 -0
- package/src/services/logistic/LogisticService.ts +285 -0
- package/src/services/permission/PermissionService.ts +1069 -0
- package/src/services/permission/config/custom/adminPermission.ts +19 -0
- package/src/services/permission/config/custom/config.ts +39 -0
- package/src/services/permission/config/default/adminPermission.ts +129 -0
- package/src/services/permission/config/default/agentPermission.ts +42 -0
- package/src/services/permission/config/default/customerPermission.ts +9 -0
- package/src/services/permission/config/default/driverPermission.ts +4 -0
- package/src/services/permission/config/default/workerPermission.ts +25 -0
- package/src/services/rate/RateService.ts +570 -0
- package/src/services/region/RegionService.ts +353 -0
- package/src/services/repository/RepositoryService.ts +437 -0
- package/src/services/transaction/TransactionService.ts +404 -0
- package/src/services/user/BranchUserService.ts +381 -0
- package/src/services/user/UserRoleService.ts +342 -0
- package/src/services/user/UserService.ts +807 -0
- package/src/services/wallet/WalletService.ts +300 -0
- package/src/utils/dateUtils.ts +26 -0
- package/src/utils/index.ts +2 -0
- package/tsconfig.json +119 -0
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PermissionService = exports.permissionModuleTypes = exports.permissionScopeTypes = exports.permissionFunctionTypes = exports.permissionFunctionActionTypes = exports.targetPermissionTypes = exports.permissionTypes = void 0;
|
|
4
|
+
const lib_1 = require("@/lib");
|
|
5
|
+
/** Load Custom Configs */
|
|
6
|
+
const config_1 = require("./config/custom/config");
|
|
7
|
+
const adminPermission_1 = require("./config/custom/adminPermission");
|
|
8
|
+
exports.permissionTypes = {
|
|
9
|
+
role: "role",
|
|
10
|
+
};
|
|
11
|
+
exports.targetPermissionTypes = {
|
|
12
|
+
role: "role",
|
|
13
|
+
};
|
|
14
|
+
const adminPermission_2 = require("./config/default/adminPermission");
|
|
15
|
+
const workerPermission_1 = require("./config/default/workerPermission");
|
|
16
|
+
const agentPermission_1 = require("./config/default/agentPermission");
|
|
17
|
+
const driverPermission_1 = require("./config/default/driverPermission");
|
|
18
|
+
const customerPermission_1 = require("./config/default/customerPermission");
|
|
19
|
+
exports.permissionFunctionActionTypes = {
|
|
20
|
+
pageAccess: "pageAccess",
|
|
21
|
+
callAction: "callAction",
|
|
22
|
+
};
|
|
23
|
+
exports.permissionFunctionTypes = {
|
|
24
|
+
pageList: { id: "pageList", label: "Browse", type: "pageAccess", description: "View Listing" },
|
|
25
|
+
pageNew: { id: "pageNew", label: "Create", type: "pageAccess", description: "Create New" },
|
|
26
|
+
pageView: { id: "pageView", label: "View", type: "pageAccess", description: "View Detail" },
|
|
27
|
+
pageUpdate: { id: "pageUpdate", label: "Update", type: "pageAccess", description: "Modify Detail" },
|
|
28
|
+
pageStockPost: { id: "pageStockPost", label: "Post to Stock", type: "pageAccess", description: "Update Stock" },
|
|
29
|
+
pageVerifyOut: { id: "pageVerifyOut", label: "Verify Out", type: "pageAccess", description: "Stock Deduction" },
|
|
30
|
+
pageVerifyIn: { id: "pageVerifyIn", label: "Verify In", type: "pageAccess", description: "Stock Increment" },
|
|
31
|
+
pageVerifyTransferIn: { id: "pageVerifyTransferIn", label: "Verify Transfer In", type: "pageAccess", description: "Transfer Increment" },
|
|
32
|
+
pageExecute: { id: "pageExecute", label: "Execute", type: "pageAccess", description: "Execution" },
|
|
33
|
+
pagePack: { id: "pagePack", label: "Pack", type: "pageAccess", description: "Perform Packing" },
|
|
34
|
+
pageImages: { id: "pageImages", label: "Images", type: "pageAccess", description: "Manage Images" },
|
|
35
|
+
pageSettings: { id: "pageSettings", label: "Settings", type: "pageAccess", description: "Manage Settings" },
|
|
36
|
+
pageChildrenNew: { id: "pageChildrenNew", label: "Create Children", type: "pageAccess", description: "Create Sub Assets" },
|
|
37
|
+
pageChildrenUpdate: { id: "pageChildrenUpdate", label: "Update Children", type: "pageAccess", description: "Modify Sub Assets" },
|
|
38
|
+
remove: { id: "remove", label: "Remove", type: "callAction", description: "Deletion" },
|
|
39
|
+
removeChildren: { id: "removeChildren", label: "Remove Children", type: "callAction", description: "Sub Assets Deletion" },
|
|
40
|
+
cancel: { id: "cancel", label: "Cancel", type: "callAction", description: "Cancellation" },
|
|
41
|
+
verifyOutLogs: { id: "verifyOutLogs", label: "Verify Out History", type: "callAction", description: "Browse History" },
|
|
42
|
+
verifyOutUndo: { id: "verifyOutUndo", label: "Undo Verify Out", type: "callAction", description: "Undo Action" },
|
|
43
|
+
verifyOutNew: { id: "verifyOutNew", label: "Create Verify Out", type: "callAction", description: "Perform Action" },
|
|
44
|
+
verifyInLogs: { id: "verifyInLogs", label: "Verify In History", type: "callAction", description: "Browse History" },
|
|
45
|
+
verifyInUndo: { id: "verifyInUndo", label: "Undo Verify In", type: "callAction", description: "Undo Action" },
|
|
46
|
+
verifyInNew: { id: "verifyInNew", label: "Create Verify In", type: "callAction", description: "Perform Action" },
|
|
47
|
+
verifyTransferInLogs: { id: "verifyTransferInLogs", label: "Verify Transfer In History", type: "callAction", description: "Browse History" },
|
|
48
|
+
verifyTransferInUndo: { id: "verifyTransferInUndo", label: "Undo Verify Transfer In", type: "callAction", description: "Undo Action" },
|
|
49
|
+
verifyTransferInNew: { id: "verifyTransferInNew", label: "Create Verify Transfer In", type: "callAction", description: "Perform Action" },
|
|
50
|
+
};
|
|
51
|
+
// export type PermissionScopeType =
|
|
52
|
+
// | "product"
|
|
53
|
+
// | "document"
|
|
54
|
+
// | "repository"
|
|
55
|
+
// | "logistic"
|
|
56
|
+
// | "operation"
|
|
57
|
+
// | "user"
|
|
58
|
+
// | "userRole"
|
|
59
|
+
// | "userBranches"
|
|
60
|
+
// | "branchUsers"
|
|
61
|
+
// | "group"
|
|
62
|
+
// | "region"
|
|
63
|
+
// | "business"
|
|
64
|
+
// | "customField"
|
|
65
|
+
// // | "injectionProp"
|
|
66
|
+
// | "injectionField"
|
|
67
|
+
// | "report"
|
|
68
|
+
// | "scheduler"
|
|
69
|
+
// | "rate"
|
|
70
|
+
// | "audit"
|
|
71
|
+
// | "wallet"
|
|
72
|
+
// | "transaction"
|
|
73
|
+
// | "userApiKey";
|
|
74
|
+
// const _customPermissionScopeTypes = [
|
|
75
|
+
// "customSettings"
|
|
76
|
+
// ] as const
|
|
77
|
+
const _permissionScopeTypes = [
|
|
78
|
+
"product",
|
|
79
|
+
"document",
|
|
80
|
+
"repository",
|
|
81
|
+
"logistic",
|
|
82
|
+
"operation",
|
|
83
|
+
"user",
|
|
84
|
+
"userRole",
|
|
85
|
+
"userBranches",
|
|
86
|
+
"branchUsers",
|
|
87
|
+
"group",
|
|
88
|
+
"region",
|
|
89
|
+
"business",
|
|
90
|
+
"customField",
|
|
91
|
+
"injectionField",
|
|
92
|
+
"report",
|
|
93
|
+
"scheduler",
|
|
94
|
+
"rate",
|
|
95
|
+
"audit",
|
|
96
|
+
"wallet",
|
|
97
|
+
"transaction",
|
|
98
|
+
"userApiKey",
|
|
99
|
+
...config_1._customPermissionScopeTypes
|
|
100
|
+
];
|
|
101
|
+
// const customPermissionScopeTypes = {
|
|
102
|
+
// customSettings: { id: "customSettings", label: "Custom", description: "" },
|
|
103
|
+
// } as const
|
|
104
|
+
exports.permissionScopeTypes = {
|
|
105
|
+
product: { id: "product", label: "Products", postValue: "product", description: "" },
|
|
106
|
+
document: { id: "document", label: "Documents", postValue: "document", description: "" },
|
|
107
|
+
repository: { id: "repository", label: "Repositories", postValue: "repository", description: "" },
|
|
108
|
+
logistic: { id: "logistic", label: "Logistics", postValue: "logistic", description: "" },
|
|
109
|
+
operation: { id: "operation", label: "Operations", postValue: "operation", description: "" },
|
|
110
|
+
user: { id: "user", label: "Users", postValue: "user", description: "" },
|
|
111
|
+
userRole: { id: "userRole", label: "Roles and Permissions", postValue: "user_role", description: "" },
|
|
112
|
+
userBranches: { id: "userBranches", label: "User Branches", postValue: "user_branch", description: "" },
|
|
113
|
+
branchUsers: { id: "branchUsers", label: "Branch Users", postValue: "branch_user", description: "" },
|
|
114
|
+
group: { id: "group", label: "User Groups", postValue: "group", description: "" },
|
|
115
|
+
region: { id: "region", label: "Regions", postValue: "region", description: "" },
|
|
116
|
+
business: { id: "business", label: "Business", postValue: "business", description: "" },
|
|
117
|
+
customField: { id: "customField", label: "Custom Fields", postValue: "custom_field", description: "" },
|
|
118
|
+
// injectionProp: { id: "injectionProp", label: "Injection Props", postValue: "", description: "" },
|
|
119
|
+
injectionField: { id: "injectionField", label: "Injection Fields", postValue: "injection_field", description: "" },
|
|
120
|
+
report: { id: "report", label: "Reports", postValue: "report", description: "" },
|
|
121
|
+
scheduler: { id: "scheduler", label: "Schedulers", postValue: "scheduler", description: "" },
|
|
122
|
+
rate: { id: "rate", label: "Rates", postValue: "rate", description: "" },
|
|
123
|
+
audit: { id: "audit", label: "Audit Trails", postValue: "audit_trail", description: "" },
|
|
124
|
+
wallet: { id: "wallet", label: "Wallets", postValue: "wallet", description: "" },
|
|
125
|
+
transaction: { id: "transaction", label: "Transactions", postValue: "transaction", description: "" },
|
|
126
|
+
userApiKey: { id: "userApiKey", label: "User API Keys", postValue: "userApiKey", description: "" },
|
|
127
|
+
...config_1.customPermissionScopeTypes
|
|
128
|
+
};
|
|
129
|
+
exports.permissionModuleTypes = {
|
|
130
|
+
product: {
|
|
131
|
+
product: { id: "product", label: "Manage Items", postValue: "product", description: "Product Catalogue" },
|
|
132
|
+
item: { id: "item", label: "Manage Item Uoms", postValue: "item", description: "Sku Items Catalogue" },
|
|
133
|
+
brand: { id: "brand", label: "Manage Brands", postValue: "brand", description: "Product Brands" },
|
|
134
|
+
category: { id: "category", label: "Manage Categories", postValue: "category", description: "Organize Product Category" },
|
|
135
|
+
uom: { id: "uom", label: "Manage Uoms", postValue: "uom", description: "Unit Measures" },
|
|
136
|
+
},
|
|
137
|
+
document: {
|
|
138
|
+
salesOrder: { id: "salesOrder", label: "Sales Orders", postValue: "sales", description: "All Functions" },
|
|
139
|
+
proformaSales: { id: "proformaSales", label: "Proforma Sales", postValue: "proforma_sales", description: "All Functions" },
|
|
140
|
+
cashSales: { id: "cashSales", label: "Cash Sales", postValue: "cash_sales", description: "All Functions" },
|
|
141
|
+
retailCashSales: { id: "retailCashSales", label: "Retail Cash Sales", postValue: "retail_cash_sales", description: "All Functions" },
|
|
142
|
+
deliveryOrder: { id: "deliveryOrder", label: "Delivery Orders", postValue: "delivery", description: "All Functions" },
|
|
143
|
+
replacementDelivery: { id: "replacementDelivery", label: "Replacement Delivery", postValue: "replacement_delivery", description: "All Functions" },
|
|
144
|
+
salesDebitNote: { id: "salesDebitNote", label: "Sales Debit Notes", postValue: "sales_debit_note", description: "All Functions" },
|
|
145
|
+
salesCreditNote: { id: "salesCreditNote", label: "Sales Credit Notes", postValue: "sales_credit_note", description: "All Functions" },
|
|
146
|
+
salesInvoice: { id: "salesInvoice", label: "Sales Invoice", postValue: "sales_invoice", description: "All Functions" },
|
|
147
|
+
purchaseOrder: { id: "purchaseOrder", label: "Purchase Orders", postValue: "purchase", description: "All Functions" },
|
|
148
|
+
purchaseReturn: { id: "purchaseReturn", label: "Purchase Returns", postValue: "purchase_return", description: "All Functions" },
|
|
149
|
+
purchaseInvoice: { id: "purchaseInvoice", label: "Purchase Invoices", postValue: "purchase_invoice", description: "All Functions" },
|
|
150
|
+
itemReceive: { id: "itemReceive", label: "Item Receives", postValue: "item_receive", description: "All Functions" },
|
|
151
|
+
itemTransfer: { id: "itemTransfer", label: "Item Transfers", postValue: "item_transfer", description: "All Functions" },
|
|
152
|
+
itemRelocate: { id: "itemRelocate", label: "Item Relocates", postValue: "item_relocate", description: "All Functions" },
|
|
153
|
+
itemTransform: { id: "itemTransform", label: "Item Transforms", postValue: "item_transform", description: "All Functions" },
|
|
154
|
+
itemIssue: { id: "itemIssue", label: "Item Issues", postValue: "item_issue", description: "All Functions" },
|
|
155
|
+
itemAdjustment: { id: "itemAdjustment", label: "Item Adjustments", postValue: "item_adjustment", description: "All Functions" },
|
|
156
|
+
stockTake: { id: "stockTake", label: "Stock Takes", postValue: "stock_take", description: "All Functions" },
|
|
157
|
+
transferReturn: { id: "transferReturn", label: "Transfer Returns", postValue: "transfer_return", description: "All Functions" },
|
|
158
|
+
transferRequisition: { id: "transferRequisition", label: "Transfer Requisitions", postValue: "transfer_requisition", description: "All Functions" },
|
|
159
|
+
tripOrder: { id: "tripOrder", label: "Delivery Trips", postValue: "trip", description: "All Functions" },
|
|
160
|
+
pickOrder: { id: "pickOrder", label: "Pick Orders Trips", postValue: "pick_order", description: "All Functions" },
|
|
161
|
+
retailPrescription: { id: "retailPrescription", label: "Retail Prescriptions", postValue: "retail_prescription", description: "All Functions" },
|
|
162
|
+
},
|
|
163
|
+
repository: {
|
|
164
|
+
container: { id: "container", label: "Containers", postValue: "container", description: "Shipment Containers" },
|
|
165
|
+
package: { id: "package", label: "Packages", postValue: "pakage", description: "Item Packages" },
|
|
166
|
+
},
|
|
167
|
+
logistic: {
|
|
168
|
+
transporter: { id: "transporter", label: "Transporters", postValue: "transporter", description: "Fulfillment Parties" },
|
|
169
|
+
},
|
|
170
|
+
operation: {
|
|
171
|
+
examineInventory: { id: "examineInventory", label: "Examine Inventory", postValue: "examine_inventory", description: "View Item Inventory" },
|
|
172
|
+
itemRelocateThreshold: { id: "itemRelocateThreshold", label: "Relocate Threshold", postValue: "item_relocate_threshold", description: "Relocate Threshold Control" },
|
|
173
|
+
itemReorderThreshold: { id: "itemReorderThreshold", label: "Reorder Threshold", postValue: "item_reorder_threshold", description: "Reorder Threshold Control" },
|
|
174
|
+
},
|
|
175
|
+
user: {
|
|
176
|
+
administrator: { id: "administrator", label: "Manage Administrators", postValue: "administrator", description: "All Functions" },
|
|
177
|
+
customer: { id: "customer", label: "Manage Customers", postValue: "customer", description: "All Functions" },
|
|
178
|
+
driver: { id: "driver", label: "Manage Drivers", postValue: "driver", description: "All Functions" },
|
|
179
|
+
member: { id: "member", label: "Manage Members", postValue: "member", description: "All Functions" },
|
|
180
|
+
retail: { id: "retail", label: "Manage Retailers", postValue: "retail", description: "All Functions" },
|
|
181
|
+
supplier: { id: "supplier", label: "Manage Suppliers", postValue: "supplier", description: "All Functions" },
|
|
182
|
+
worker: { id: "worker", label: "Manage Workers", postValue: "worker", description: "All Functions" },
|
|
183
|
+
},
|
|
184
|
+
userRole: {
|
|
185
|
+
role: { id: "role", label: "Roles", postValue: "role", description: "User Roles" },
|
|
186
|
+
permission: { id: "permission", label: "Permissions", postValue: "permission", description: "Assign Permissions" },
|
|
187
|
+
},
|
|
188
|
+
userBranches: {
|
|
189
|
+
customer: { id: "customer", label: "For Customers", postValue: "customer", description: "Customer Branches" },
|
|
190
|
+
retail: { id: "retail", label: "For Retailers", postValue: "retail", description: "Retail Outlets" },
|
|
191
|
+
},
|
|
192
|
+
branchUsers: {
|
|
193
|
+
customer: { id: "customer", label: "For Customers", postValue: "customer", description: "Customer Branch Users" },
|
|
194
|
+
retail: { id: "retail", label: "For Retailers", postValue: "retail", description: "Retail Outlet Users" },
|
|
195
|
+
},
|
|
196
|
+
group: {
|
|
197
|
+
administrator: { id: "administrator", label: "For Administrators", postValue: "administrator", description: "All Functions" },
|
|
198
|
+
customer: { id: "customer", label: "For Customers", postValue: "customer", description: "All Functions" },
|
|
199
|
+
supplier: { id: "supplier", label: "For Suppliers", postValue: "supplier", description: "All Functions" },
|
|
200
|
+
},
|
|
201
|
+
region: {
|
|
202
|
+
country: { id: "country", label: "Country", postValue: "country", description: "All Functions" },
|
|
203
|
+
area: { id: "area", label: "Area", postValue: "area", description: "All Functions" },
|
|
204
|
+
},
|
|
205
|
+
business: {
|
|
206
|
+
business: { id: "business", label: "Manage Business", postValue: "business", description: "Multiple business entity" },
|
|
207
|
+
},
|
|
208
|
+
customField: {
|
|
209
|
+
customField: { id: "customField", label: "Manage Custom Fields", postValue: "custom_field", description: "Custom Fields For Certain Resources" },
|
|
210
|
+
},
|
|
211
|
+
// injectionProp: {
|
|
212
|
+
// injectionProp: { id: "injectionProp", label: "Manage Injection Props", postValue: "", description: "Injection Props For Certain Resources" },
|
|
213
|
+
// },
|
|
214
|
+
injectionField: {
|
|
215
|
+
injectionField: { id: "injectionField", label: "Manage Injection Fields", postValue: "injection_field", description: "Injection Fields For Certain Resources" },
|
|
216
|
+
},
|
|
217
|
+
report: {
|
|
218
|
+
productItem: { id: "productItem", label: "Product Items", postValue: "item_report", description: "All Functions" },
|
|
219
|
+
salesOrder: { id: "salesOrder", label: "Sales Orders", postValue: "sales_report", description: "All Functions" },
|
|
220
|
+
salesOrderItem: { id: "salesOrderItem", label: "Sales Order Items", postValue: "sales_item_report", description: "All Functions" },
|
|
221
|
+
deliveryOrder: { id: "deliveryOrder", label: "Delivery Orders", postValue: "delivery_report", description: "All Functions" },
|
|
222
|
+
deliveryOrderItem: { id: "deliveryOrderItem", label: "Delivery Order Items", postValue: "delivery_item_report", description: "All Functions" },
|
|
223
|
+
itemReceive: { id: "itemReceive", label: "Item Receives", postValue: "item_receive_report", description: "All Functions" },
|
|
224
|
+
itemReceiveItem: { id: "itemReceiveItem", label: "Item Receive Items", postValue: "item_receive_item_report", description: "All Functions" },
|
|
225
|
+
itemTransfer: { id: "itemTransfer", label: "Item Transfers", postValue: "item_transfer_report", description: "All Functions" },
|
|
226
|
+
itemTransferItem: { id: "itemTransferItem", label: "Item Transfer Items", postValue: "item_transfer_item_report", description: "All Functions" },
|
|
227
|
+
},
|
|
228
|
+
scheduler: {
|
|
229
|
+
schedulerTask: { id: "schedulerTask", label: "Manage Task Schedule", postValue: "scheduler_task", description: "" },
|
|
230
|
+
schedulerLog: { id: "schedulerLog", label: "Manage Log Schedule", postValue: "scheduler_log", description: "" },
|
|
231
|
+
schedulerRequest: { id: "schedulerRequest", label: "Manage Request Schedule", postValue: "scheduler_request", description: "" },
|
|
232
|
+
schedulerConsole: { id: "schedulerConsole", label: "Scheduler Console", postValue: "scheduler_console", description: "" },
|
|
233
|
+
},
|
|
234
|
+
rate: {
|
|
235
|
+
shippingRate: { id: "shippingRate", label: "Manage Shipping Rate", postValue: "shipping_rate", description: "" },
|
|
236
|
+
shippingRule: { id: "shippingRule", label: "Manage Shipping Rule", postValue: "shipping_rule", description: "" },
|
|
237
|
+
taxRate: { id: "taxRate", label: "Manage Tax Rate", postValue: "tax_rate", description: "" },
|
|
238
|
+
},
|
|
239
|
+
audit: {
|
|
240
|
+
auditTrail: { id: "auditTrail", label: "Manage Audit Trails", postValue: "audit_trail", description: "" },
|
|
241
|
+
auditTrailTag: { id: "auditTrailTag", label: "Manage Audit Trail Tags", postValue: "audit_trail_tag", description: "" },
|
|
242
|
+
},
|
|
243
|
+
wallet: {
|
|
244
|
+
wallet: { id: "wallet", label: "Manage Wallets", postValue: "wallet", description: "" },
|
|
245
|
+
walletUser: { id: "walletUser", label: "Manage Wallet Users", postValue: "wallet_user", description: "" },
|
|
246
|
+
},
|
|
247
|
+
transaction: {
|
|
248
|
+
request: { id: "request", label: "Manage Request Transactions", postValue: "request", description: "" },
|
|
249
|
+
wallet: { id: "wallet", label: "Manage Wallet Transactions", postValue: "wallet", description: "" },
|
|
250
|
+
},
|
|
251
|
+
userApiKey: {
|
|
252
|
+
apiKey: { id: "apiKey", label: "Manage User API Keys", postValue: "api_key", description: "" },
|
|
253
|
+
},
|
|
254
|
+
...config_1.customPermissionModuleTypes
|
|
255
|
+
};
|
|
256
|
+
const memberPermissionsConfig = {};
|
|
257
|
+
const getChangePayload = (permissionType, data) => {
|
|
258
|
+
if (permissionType === "role" && "userRoles" in data) {
|
|
259
|
+
// scope_type: scopeValue,
|
|
260
|
+
// scope_name: targetId,
|
|
261
|
+
// permission_type: permissionId,
|
|
262
|
+
// status: status ? 1 : 0,
|
|
263
|
+
// is_custom: isCustomScopeId
|
|
264
|
+
return {
|
|
265
|
+
permissions: data.userRoles.map(i => ({
|
|
266
|
+
scope_type: i.scopeType,
|
|
267
|
+
scope_name: i.moduleType,
|
|
268
|
+
permission_type: i.functionType,
|
|
269
|
+
status: (i.status === true) ? 1 : 0,
|
|
270
|
+
is_custom: (i.isCustomScope === true) ? 1 : 0,
|
|
271
|
+
})),
|
|
272
|
+
// location_name: data.location.locationName,
|
|
273
|
+
// location_type: data.location.locationType,
|
|
274
|
+
// person_name: data.location.personName,
|
|
275
|
+
// person_contact: data.location.personContact,
|
|
276
|
+
// person_email: data.location.personEmail,
|
|
277
|
+
// address_1: data.location.address1,
|
|
278
|
+
// address_2: data.location.address2,
|
|
279
|
+
// postcode: data.location.postcode,
|
|
280
|
+
// state_id: data.location.stateId,
|
|
281
|
+
// country_id: data.location.countryId,
|
|
282
|
+
// area: data.location.areaId,
|
|
283
|
+
// is_default: (data.location.isDefault === true) ? 1 : 0,
|
|
284
|
+
// status: (data.location.status === true) ? 1 : 0,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
const checkValidScopeId = (id) => {
|
|
289
|
+
return Object.values(exports.permissionScopeTypes).some(scope => scope.id === id);
|
|
290
|
+
// let checkStatus = false;
|
|
291
|
+
// Object.keys(permissionScopeTypes).forEach((i: any) => {
|
|
292
|
+
// if (permissionScopeTypes[i]?.id === id) {
|
|
293
|
+
// checkStatus = true
|
|
294
|
+
// }
|
|
295
|
+
// })
|
|
296
|
+
// return checkStatus
|
|
297
|
+
};
|
|
298
|
+
const checkObjectHasKey = (obj, key) => {
|
|
299
|
+
return key in obj;
|
|
300
|
+
};
|
|
301
|
+
const PermissionService = (props) => {
|
|
302
|
+
const { isOwnerUser = false, userPermissions = {}, permissionType = "role", permissionTargetType = "role", routeType = "administrator", scopeType = "user", moduleType = "administrator", customToken = '', } = props ?? {};
|
|
303
|
+
const { makeCall } = (0, lib_1.ApiService)(customToken ? { customToken } : {});
|
|
304
|
+
const endpoint1 = "role";
|
|
305
|
+
// const endpoint2 = "locations"
|
|
306
|
+
const changePermission = async ({ id, data, permissionType: overridePermissionType, permissionTargetType: overridePermissionTargetType }) => {
|
|
307
|
+
let url = `${endpoint1}/change/${id}`;
|
|
308
|
+
let _permissionType = overridePermissionType || permissionType;
|
|
309
|
+
let payload = getChangePayload(_permissionType, data);
|
|
310
|
+
const postData = {
|
|
311
|
+
scope: {
|
|
312
|
+
target: overridePermissionTargetType || permissionTargetType,
|
|
313
|
+
action: "",
|
|
314
|
+
},
|
|
315
|
+
payload
|
|
316
|
+
};
|
|
317
|
+
const response = await makeCall({
|
|
318
|
+
url,
|
|
319
|
+
method: "put",
|
|
320
|
+
payload: postData,
|
|
321
|
+
// configuration
|
|
322
|
+
});
|
|
323
|
+
return response;
|
|
324
|
+
};
|
|
325
|
+
const validatePermission = ({
|
|
326
|
+
// routeType,
|
|
327
|
+
// parentScopeType,
|
|
328
|
+
scopeType, moduleType,
|
|
329
|
+
// parentScopeValue,
|
|
330
|
+
// scopeType,
|
|
331
|
+
functionType }) => {
|
|
332
|
+
// let {
|
|
333
|
+
// assignedRoles,
|
|
334
|
+
// assignedPermissions
|
|
335
|
+
// } = getRolePermissions()
|
|
336
|
+
let assignedPermissions = userPermissions; // loginPermissionConfigs
|
|
337
|
+
console.log('assignedPermissions', assignedPermissions);
|
|
338
|
+
const scope = assignedPermissions[scopeType];
|
|
339
|
+
if (!scope)
|
|
340
|
+
throw `Invalid permission in scope ${scopeType}`;
|
|
341
|
+
const module = scope[moduleType];
|
|
342
|
+
if (!Array.isArray(module)) {
|
|
343
|
+
throw `Invalid permission in module ${moduleType}`;
|
|
344
|
+
}
|
|
345
|
+
// console.log('module', module, functionType)
|
|
346
|
+
return module.includes(functionType);
|
|
347
|
+
// check scopeType exist
|
|
348
|
+
// if (scopeType in assignedPermissions === false) return false
|
|
349
|
+
// // check moduleType exist
|
|
350
|
+
// if (moduleType in assignedPermissions[scopeType] === false) return false
|
|
351
|
+
// // let listPermissions = assignedPermissions[scopeType][moduleType]
|
|
352
|
+
// let allowFunctions = assignedPermissions[scopeType][moduleType]
|
|
353
|
+
// // console.log('listPermissions', listPermissions, assignedPermissions)
|
|
354
|
+
// // check permission is array format
|
|
355
|
+
// if (Array.isArray(allowFunctions) === false) return false;
|
|
356
|
+
// if (allowFunctions.includes(functionType)) { // permission is exists
|
|
357
|
+
// return true;
|
|
358
|
+
// }
|
|
359
|
+
// return false;
|
|
360
|
+
};
|
|
361
|
+
const getPermissionConfig = (routeType) => {
|
|
362
|
+
console.log('routeType >>>', routeType);
|
|
363
|
+
if (routeType === "administrator") {
|
|
364
|
+
return (Object.keys(adminPermission_1.customAdminPermissionsConfig).length > 0) ? adminPermission_1.customAdminPermissionsConfig : adminPermission_2.adminPermissionsConfig;
|
|
365
|
+
}
|
|
366
|
+
if (routeType === "customer")
|
|
367
|
+
return customerPermission_1.customerPermissionsConfig;
|
|
368
|
+
if (routeType === "workstation")
|
|
369
|
+
return workerPermission_1.workerPermissionsConfig;
|
|
370
|
+
if (routeType === "retail")
|
|
371
|
+
return agentPermission_1.agentPermissionsConfig;
|
|
372
|
+
if (routeType === "driver")
|
|
373
|
+
return driverPermission_1.driverPermissionsConfig;
|
|
374
|
+
return {};
|
|
375
|
+
};
|
|
376
|
+
const checkPermissionAllow = ({ routeType: overrideRouteType, scopeType: overrideScopeType, moduleType: overrideModuleType, functionType }) => {
|
|
377
|
+
let permissionStatus = false;
|
|
378
|
+
try {
|
|
379
|
+
let _scopeType_ = overrideScopeType || scopeType;
|
|
380
|
+
let _moduleType_ = overrideModuleType || moduleType;
|
|
381
|
+
let _routeType = overrideRouteType || routeType;
|
|
382
|
+
if (!_routeType)
|
|
383
|
+
throw new Error(`Invalid route type in permission`);
|
|
384
|
+
let permissionConfigs = getPermissionConfig(routeType);
|
|
385
|
+
// if (routeType === "administrator") permissionConfigs = adminPermissionsConfig
|
|
386
|
+
// if (routeType === "customer") permissionConfigs = customerPermissionsConfig
|
|
387
|
+
// if (routeType === "workstation") permissionConfigs = workerPermissionsConfig
|
|
388
|
+
// if (routeType === "retail") permissionConfigs = retailPermissionsConfig
|
|
389
|
+
// if (routeType === "driver") permissionConfigs = driverPermissionsConfig
|
|
390
|
+
let _scopeType = _scopeType_;
|
|
391
|
+
let _moduleType = _moduleType_;
|
|
392
|
+
let _functionType = functionType;
|
|
393
|
+
// if (overrideRouteType) _routeType =
|
|
394
|
+
// if (overrideScopeId) _scopeType =
|
|
395
|
+
// if (overrideScopeType) _moduleType = overrideScopeType
|
|
396
|
+
// if (overrideFunctionType) _functionType = overrideFunctionType
|
|
397
|
+
// check the scope id valid
|
|
398
|
+
if (checkValidScopeId(_scopeType) === false)
|
|
399
|
+
throw new Error(`Unsupported scope id : ${_scopeType}`);
|
|
400
|
+
const scopeConfig = permissionConfigs[_scopeType];
|
|
401
|
+
if (!scopeConfig) {
|
|
402
|
+
throw new Error(`Scope config is missing for: ${_scopeType}`);
|
|
403
|
+
}
|
|
404
|
+
if (!checkObjectHasKey(scopeConfig, _moduleType)) {
|
|
405
|
+
throw new Error(`Unsupported scope type: ${_moduleType} (${_scopeType})`);
|
|
406
|
+
}
|
|
407
|
+
const moduleConfig = scopeConfig[_moduleType];
|
|
408
|
+
if (!moduleConfig) {
|
|
409
|
+
throw new Error(`Module config is missing: ${_moduleType} (${_scopeType})`);
|
|
410
|
+
}
|
|
411
|
+
if (!checkObjectHasKey(moduleConfig, _functionType)) {
|
|
412
|
+
console.log('_scopeType', _scopeType);
|
|
413
|
+
console.log('_moduleType', _moduleType);
|
|
414
|
+
console.log('moduleConfig', moduleConfig, scopeConfig, _functionType);
|
|
415
|
+
throw new Error(`Unsupported function type: ${_moduleType} > ${_functionType} (${_scopeType})`);
|
|
416
|
+
}
|
|
417
|
+
// let permissionName = _functionType;
|
|
418
|
+
// let permissionStatus = false;
|
|
419
|
+
// console.log('permissionConfigs[_scopeType][_moduleType]', routeType, permissionConfigs[_scopeType][_moduleType], _functionType)
|
|
420
|
+
// check routeType exists
|
|
421
|
+
// if (checkObjectHasKey({
|
|
422
|
+
// obj: permissionConfigs[_scopeType][_moduleType][_functionType],
|
|
423
|
+
// key: routeType
|
|
424
|
+
// })) {
|
|
425
|
+
// system configured has this option
|
|
426
|
+
// permissionStatus = permissionConfigs[_scopeType][_moduleType][_functionType][_routeType]
|
|
427
|
+
// let allowFunctions = permissionConfigs[_scopeType][_moduleType]
|
|
428
|
+
// console.log('permissionStatus', _scopeType, permissionConfigs[_scopeType][_moduleType][_functionType], _moduleType, _functionType, permissionStatus)
|
|
429
|
+
// need to check the auth access token for permissions for this logged in user
|
|
430
|
+
// if (permissionStatus) {
|
|
431
|
+
// console.log('checkIsOwnerUser()', checkIsOwnerUser())
|
|
432
|
+
// if (checkIsOwnerUser() === true) {
|
|
433
|
+
if (isOwnerUser === true) {
|
|
434
|
+
// is owner always all permission open
|
|
435
|
+
permissionStatus = true;
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
// get the scope value
|
|
439
|
+
// let _selectedScopes = moduleConfig; // scopeIds[_scopeType]
|
|
440
|
+
// override the permission if the real auth token access allow
|
|
441
|
+
permissionStatus = validatePermission({
|
|
442
|
+
// routeType,
|
|
443
|
+
// parentScopeType: _scopeType,
|
|
444
|
+
scopeType: _scopeType,
|
|
445
|
+
// parentScopeValue: "", // _selectedScopes?.value,
|
|
446
|
+
// scopeType: _moduleType,
|
|
447
|
+
moduleType: _moduleType,
|
|
448
|
+
functionType: _functionType
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
// }
|
|
452
|
+
// } else {
|
|
453
|
+
// permissionStatus = false; // not exists mean no permission
|
|
454
|
+
// // throw new Error(`Unsupported permission configs`, permissionConfigs[selectScopeId][selectScopeType][_functionType])
|
|
455
|
+
// }
|
|
456
|
+
// return permissionStatus
|
|
457
|
+
}
|
|
458
|
+
catch (error) {
|
|
459
|
+
permissionStatus = false;
|
|
460
|
+
console.log('error', error);
|
|
461
|
+
}
|
|
462
|
+
finally {
|
|
463
|
+
return permissionStatus;
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
// const list = async (props: PermissionLocationProps) => {
|
|
467
|
+
// const { locationType: overrideLocationType } = props;
|
|
468
|
+
// let _locationType = overrideLocationType || locationType
|
|
469
|
+
// let url: string
|
|
470
|
+
// if (_locationType === "location") { // only for location
|
|
471
|
+
// url = buildApiListUrl(
|
|
472
|
+
// `${endpoint2}/${_locationType}`,
|
|
473
|
+
// props
|
|
474
|
+
// );
|
|
475
|
+
// } else { // for rack, slot, zone
|
|
476
|
+
// url = buildApiListUrl(
|
|
477
|
+
// `${endpoint2}/${_locationType}/${props?.locationId}`,
|
|
478
|
+
// props
|
|
479
|
+
// );
|
|
480
|
+
// }
|
|
481
|
+
// const response = await makeCall({
|
|
482
|
+
// url,
|
|
483
|
+
// method: "get",
|
|
484
|
+
// payload: {},
|
|
485
|
+
// // configuration
|
|
486
|
+
// });
|
|
487
|
+
// return response;
|
|
488
|
+
// }
|
|
489
|
+
// const get = async (props: GetPermissionProps) => {
|
|
490
|
+
// const { id, locationType: overrideLocationType } = props;
|
|
491
|
+
// const url = buildApiGetUrl(
|
|
492
|
+
// `${endpoint1}/${overrideLocationType || locationType}/${id}`,
|
|
493
|
+
// props
|
|
494
|
+
// );
|
|
495
|
+
// const response = await makeCall({
|
|
496
|
+
// url,
|
|
497
|
+
// method: "get",
|
|
498
|
+
// payload: {},
|
|
499
|
+
// // configuration
|
|
500
|
+
// });
|
|
501
|
+
// return response;
|
|
502
|
+
// }
|
|
503
|
+
// const create = async ({ data, locationType: overrideLocationType, locationTargetType: overrideLocationTargetType }: CreatePermissionProps) => {
|
|
504
|
+
// let _locationType = overrideLocationType || locationType
|
|
505
|
+
// let payload: any = getCreatePayload(_locationType, data)
|
|
506
|
+
// let url = `${endpoint1}`;
|
|
507
|
+
// let postData = {
|
|
508
|
+
// scope: {
|
|
509
|
+
// target: overrideLocationTargetType || locationTargetType,
|
|
510
|
+
// action: "",
|
|
511
|
+
// },
|
|
512
|
+
// payload
|
|
513
|
+
// }
|
|
514
|
+
// const response = await makeCall({
|
|
515
|
+
// url,
|
|
516
|
+
// method: "post",
|
|
517
|
+
// payload: postData
|
|
518
|
+
// });
|
|
519
|
+
// return response;
|
|
520
|
+
// }
|
|
521
|
+
// const update = async ({ id, data, locationType: overrideLocationType, locationTargetType: overrideLocationTargetType }: UpdatePermissionProps) => {
|
|
522
|
+
// let url = `${endpoint1}/${id}`
|
|
523
|
+
// let _locationType = overrideLocationType || locationType
|
|
524
|
+
// let payload: any = getUpdatePayload(_locationType, data)
|
|
525
|
+
// const postData = {
|
|
526
|
+
// scope: {
|
|
527
|
+
// target: overrideLocationTargetType || locationTargetType,
|
|
528
|
+
// action: "",
|
|
529
|
+
// },
|
|
530
|
+
// payload
|
|
531
|
+
// }
|
|
532
|
+
// const response = await makeCall({
|
|
533
|
+
// url,
|
|
534
|
+
// method: "put",
|
|
535
|
+
// payload: postData
|
|
536
|
+
// });
|
|
537
|
+
// return response;
|
|
538
|
+
// }
|
|
539
|
+
// const remove = async ({ ids, locationTargetType: overrideLocationTargetType }: RemovePermissionProps) => {
|
|
540
|
+
// let url = `${endpoint2}/delete`
|
|
541
|
+
// const postData = {
|
|
542
|
+
// scope: {
|
|
543
|
+
// target: overrideLocationTargetType || locationTargetType,
|
|
544
|
+
// },
|
|
545
|
+
// payload: {
|
|
546
|
+
// ids
|
|
547
|
+
// }
|
|
548
|
+
// }
|
|
549
|
+
// const response = await makeCall({
|
|
550
|
+
// url,
|
|
551
|
+
// method: "post",
|
|
552
|
+
// payload: postData
|
|
553
|
+
// });
|
|
554
|
+
// return response;
|
|
555
|
+
// }
|
|
556
|
+
// const getDataTypes = async ({ locationType: overrideLocationType }: GetDataTypePermissionProps) => {
|
|
557
|
+
// let url = `${endpoint2}/data_types/${overrideLocationType || locationType}`
|
|
558
|
+
// const response = await makeCall({
|
|
559
|
+
// url,
|
|
560
|
+
// method: "get",
|
|
561
|
+
// });
|
|
562
|
+
// return response;
|
|
563
|
+
// }
|
|
564
|
+
return {
|
|
565
|
+
getPermissionConfig,
|
|
566
|
+
checkPermissionAllow,
|
|
567
|
+
changePermission,
|
|
568
|
+
// list,
|
|
569
|
+
// get,
|
|
570
|
+
// create,
|
|
571
|
+
// update,
|
|
572
|
+
// remove,
|
|
573
|
+
// getDataTypes
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
exports.PermissionService = PermissionService;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customAdminPermissionsConfig = void 0;
|
|
4
|
+
const adminPermission_1 = require("../default/adminPermission");
|
|
5
|
+
/** Initial Empty Override */
|
|
6
|
+
// export const customAdminPermissionsConfig = {} as const
|
|
7
|
+
/** Your custom overrides */
|
|
8
|
+
exports.customAdminPermissionsConfig = {
|
|
9
|
+
...adminPermission_1.adminPermissionsConfig,
|
|
10
|
+
customSettings: {
|
|
11
|
+
transportType: { pageList: true, pageView: true, pageUpdate: true, pageNew: true, remove: true },
|
|
12
|
+
transportService: { pageList: true, pageView: true, pageUpdate: true, pageNew: true, remove: true },
|
|
13
|
+
},
|
|
14
|
+
user: {
|
|
15
|
+
...adminPermission_1.adminPermissionsConfig.user,
|
|
16
|
+
driver: { pageList: true, pageNew: true, pageUpdate: true, remove: true }
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Permission, ModuleTypeMetaScoped } from "../../PermissionService";
|
|
2
|
+
/** Initial Empty Setup */
|
|
3
|
+
/** Your Customization */
|
|
4
|
+
export declare const _customPermissionScopeTypes: readonly ["customSettings"];
|
|
5
|
+
export declare const customPermissionScopeTypes: {
|
|
6
|
+
readonly customSettings: {
|
|
7
|
+
readonly id: "customSettings";
|
|
8
|
+
readonly label: "Custom";
|
|
9
|
+
readonly postValue: "";
|
|
10
|
+
readonly description: "";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type CustomModuleTransport = "transportType" | "transportService";
|
|
14
|
+
export type CustomPermissionMap = {
|
|
15
|
+
customSettings: {
|
|
16
|
+
[module in CustomModuleTransport]?: Permission;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type CustomModuleTypesMap = {
|
|
20
|
+
customSettings: {
|
|
21
|
+
[key in CustomModuleTransport]: ModuleTypeMetaScoped<key>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const customPermissionModuleTypes: {
|
|
25
|
+
readonly customSettings: {
|
|
26
|
+
readonly transportType: {
|
|
27
|
+
readonly id: "transportType";
|
|
28
|
+
readonly label: "Transport Types";
|
|
29
|
+
readonly postValue: "transport_type";
|
|
30
|
+
readonly description: "Manage Transport Types";
|
|
31
|
+
};
|
|
32
|
+
readonly transportService: {
|
|
33
|
+
readonly id: "transportService";
|
|
34
|
+
readonly label: "Transport Services";
|
|
35
|
+
readonly postValue: "transport_service";
|
|
36
|
+
readonly description: "Manage Transport Services";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export {};
|