@managesome/eposmatic-toolkit 0.2.470 → 0.2.472
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/constants/TENANT_ENUMS.d.ts +57 -0
- package/lib/constants/TENANT_ENUMS.js +62 -1
- package/lib/constants/WAREHOUSE_ENUMS.d.ts +0 -18
- package/lib/constants/WAREHOUSE_ENUMS.js +1 -20
- package/lib/helpers/store/cart-actions.d.ts +1 -0
- package/lib/helpers/store/common-order-actions.js +1 -0
- package/lib/helpers/utils/offer-apply-helpers.d.ts +1 -0
- package/lib/schemas/models/index.d.ts +1 -0
- package/lib/schemas/models/index.js +1 -0
- package/lib/schemas/models/orders.d.ts +3 -0
- package/lib/schemas/models/orders.js +5 -0
- package/lib/schemas/models/tenant-activity-logs.d.ts +120 -0
- package/lib/schemas/models/tenant-activity-logs.js +129 -0
- package/lib/schemas/models/warehouse-activity-logs.d.ts +1 -2
- package/lib/schemas/models/warehouse-activity-logs.js +1 -2
- package/lib/schemas/types/index.d.ts +1 -0
- package/lib/schemas/types/index.js +1 -0
- package/lib/schemas/types/orders.d.ts +1 -0
- package/lib/schemas/types/tenant-activity-logs.d.ts +29 -0
- package/lib/schemas/types/tenant-activity-logs.js +2 -0
- package/lib/schemas/types/warehouse-activity-logs.d.ts +2 -3
- package/lib/schemas/types/warehouse-activity-logs.js +0 -2
- package/package.json +1 -1
|
@@ -15,3 +15,60 @@ export declare enum TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM {
|
|
|
15
15
|
CANCELLED = "CANCELLED"
|
|
16
16
|
}
|
|
17
17
|
export declare const ALL_TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_NAMES: TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM[];
|
|
18
|
+
export declare enum TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM {
|
|
19
|
+
ITEM = "ITEM",
|
|
20
|
+
OFFER = "OFFER",
|
|
21
|
+
VOUCHER = "VOUCHER",
|
|
22
|
+
GIFT_CARD = "GIFT_CARD",
|
|
23
|
+
HALFHALF_ITEM = "HALFHALF_ITEM",
|
|
24
|
+
SPECIAL_ITEM = "SPECIAL_ITEM",
|
|
25
|
+
MODIFIER = "MODIFIER",
|
|
26
|
+
CATEGORY = "CATEGORY",
|
|
27
|
+
ORDER = "ORDER",
|
|
28
|
+
OFFLINE_ORDER = "OFFLINE_ORDER",
|
|
29
|
+
RESERVATION = "RESERVATION",
|
|
30
|
+
BRAND = "BRAND",
|
|
31
|
+
TENANT = "TENANT",
|
|
32
|
+
DINEIN_LAYOUT = "DINEIN_LAYOUT",
|
|
33
|
+
DINEIN_TABLE = "DINEIN_TABLE",
|
|
34
|
+
STAFF = "STAFF",
|
|
35
|
+
INSTORE_SHIFT = "INSTORE_SHIFT",
|
|
36
|
+
OPERATIONAL_ROLES = "OPERATIONAL_ROLES",
|
|
37
|
+
CONFIG = "CONFIG",
|
|
38
|
+
COURSE = "COURSE",
|
|
39
|
+
CASH_DRAWER = "CASH_DRAWER",
|
|
40
|
+
CASH_DRAWER_SESSION = "CASH_DRAWER_SESSION",
|
|
41
|
+
TENANT_DAY = "TENANT_DAY",
|
|
42
|
+
INSTORE_SHIFT_SESSION = "INSTORE_SHIFT_SESSION",
|
|
43
|
+
MENU = "MENU",
|
|
44
|
+
DELIVERY_AREA = "DELIVERY_AREA",
|
|
45
|
+
CLOSED_DATE = "CLOSED_DATE",
|
|
46
|
+
PUBLIC_HOLIDAY = "PUBLIC_HOLIDAY",
|
|
47
|
+
DISCOUNT = "DISCOUNT",
|
|
48
|
+
REVIEW = "REVIEW",
|
|
49
|
+
PRINTER = "PRINTER",
|
|
50
|
+
CUSTOMER = "CUSTOMER",
|
|
51
|
+
PLATFORM_SESSION = "PLATFORM_SESSION",
|
|
52
|
+
DELIVERY_ORDER = "DELIVERY_ORDER",
|
|
53
|
+
RIDER = "RIDER"
|
|
54
|
+
}
|
|
55
|
+
export declare const ALL_TENANT_ACTIVITY_LOG_ENTITY_TYPE_NAMES: TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM[];
|
|
56
|
+
export declare enum TENANT_ACTIVITY_LOG_ACTION_ENUM {
|
|
57
|
+
CREATED = "CREATED",
|
|
58
|
+
UPDATED = "UPDATED",
|
|
59
|
+
DELETED = "DELETED",
|
|
60
|
+
REOPENED = "REOPENED",
|
|
61
|
+
STATUS_CHANGED = "STATUS_CHANGED",
|
|
62
|
+
CANCELLED = "CANCELLED",
|
|
63
|
+
ITEM_ADDED = "ITEM_ADDED",
|
|
64
|
+
ITEM_UPDATED = "ITEM_UPDATED",
|
|
65
|
+
ITEM_REMOVED = "ITEM_REMOVED",
|
|
66
|
+
ITEM_RESTORED = "ITEM_RESTORED"
|
|
67
|
+
}
|
|
68
|
+
export declare const ALL_TENANT_ACTIVITY_LOG_ACTION_NAMES: TENANT_ACTIVITY_LOG_ACTION_ENUM[];
|
|
69
|
+
export declare enum TENANT_ACTIVITY_LOG_SEVERITY_ENUM {
|
|
70
|
+
INFO = "INFO",
|
|
71
|
+
WARNING = "WARNING",
|
|
72
|
+
ERROR = "ERROR"
|
|
73
|
+
}
|
|
74
|
+
export declare const ALL_TENANT_ACTIVITY_LOG_SEVERITY_NAMES: TENANT_ACTIVITY_LOG_SEVERITY_ENUM[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ALL_TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_NAMES = exports.TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM = exports.ALL_TENANT_PURCHASE_ORDER_STATUS_NAMES = exports.TENANT_PURCHASE_ORDER_STATUS_ENUM = void 0;
|
|
3
|
+
exports.ALL_TENANT_ACTIVITY_LOG_SEVERITY_NAMES = exports.TENANT_ACTIVITY_LOG_SEVERITY_ENUM = exports.ALL_TENANT_ACTIVITY_LOG_ACTION_NAMES = exports.TENANT_ACTIVITY_LOG_ACTION_ENUM = exports.ALL_TENANT_ACTIVITY_LOG_ENTITY_TYPE_NAMES = exports.TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM = exports.ALL_TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_NAMES = exports.TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM = exports.ALL_TENANT_PURCHASE_ORDER_STATUS_NAMES = exports.TENANT_PURCHASE_ORDER_STATUS_ENUM = void 0;
|
|
4
4
|
// ======================>> TENANT PURCHASE ORDER <<====================== //
|
|
5
5
|
var TENANT_PURCHASE_ORDER_STATUS_ENUM;
|
|
6
6
|
(function (TENANT_PURCHASE_ORDER_STATUS_ENUM) {
|
|
@@ -22,3 +22,64 @@ var TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
|
22
22
|
TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM["CANCELLED"] = "CANCELLED";
|
|
23
23
|
})(TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM || (exports.TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM = TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM = {}));
|
|
24
24
|
exports.ALL_TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_NAMES = Object.values(TENANT_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM);
|
|
25
|
+
// ======================>> LOGS <<====================== //
|
|
26
|
+
var TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM;
|
|
27
|
+
(function (TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM) {
|
|
28
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["ITEM"] = "ITEM";
|
|
29
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["OFFER"] = "OFFER";
|
|
30
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["VOUCHER"] = "VOUCHER";
|
|
31
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["GIFT_CARD"] = "GIFT_CARD";
|
|
32
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["HALFHALF_ITEM"] = "HALFHALF_ITEM";
|
|
33
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["SPECIAL_ITEM"] = "SPECIAL_ITEM";
|
|
34
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["MODIFIER"] = "MODIFIER";
|
|
35
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["CATEGORY"] = "CATEGORY";
|
|
36
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["ORDER"] = "ORDER";
|
|
37
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["OFFLINE_ORDER"] = "OFFLINE_ORDER";
|
|
38
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["RESERVATION"] = "RESERVATION";
|
|
39
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["BRAND"] = "BRAND";
|
|
40
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["TENANT"] = "TENANT";
|
|
41
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["DINEIN_LAYOUT"] = "DINEIN_LAYOUT";
|
|
42
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["DINEIN_TABLE"] = "DINEIN_TABLE";
|
|
43
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["STAFF"] = "STAFF";
|
|
44
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["INSTORE_SHIFT"] = "INSTORE_SHIFT";
|
|
45
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["OPERATIONAL_ROLES"] = "OPERATIONAL_ROLES";
|
|
46
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["CONFIG"] = "CONFIG";
|
|
47
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["COURSE"] = "COURSE";
|
|
48
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["CASH_DRAWER"] = "CASH_DRAWER";
|
|
49
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["CASH_DRAWER_SESSION"] = "CASH_DRAWER_SESSION";
|
|
50
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["TENANT_DAY"] = "TENANT_DAY";
|
|
51
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["INSTORE_SHIFT_SESSION"] = "INSTORE_SHIFT_SESSION";
|
|
52
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["MENU"] = "MENU";
|
|
53
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["DELIVERY_AREA"] = "DELIVERY_AREA";
|
|
54
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["CLOSED_DATE"] = "CLOSED_DATE";
|
|
55
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["PUBLIC_HOLIDAY"] = "PUBLIC_HOLIDAY";
|
|
56
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["DISCOUNT"] = "DISCOUNT";
|
|
57
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["REVIEW"] = "REVIEW";
|
|
58
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["PRINTER"] = "PRINTER";
|
|
59
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["CUSTOMER"] = "CUSTOMER";
|
|
60
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["PLATFORM_SESSION"] = "PLATFORM_SESSION";
|
|
61
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["DELIVERY_ORDER"] = "DELIVERY_ORDER";
|
|
62
|
+
TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM["RIDER"] = "RIDER";
|
|
63
|
+
})(TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM || (exports.TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM = TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM = {}));
|
|
64
|
+
exports.ALL_TENANT_ACTIVITY_LOG_ENTITY_TYPE_NAMES = Object.values(TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM);
|
|
65
|
+
var TENANT_ACTIVITY_LOG_ACTION_ENUM;
|
|
66
|
+
(function (TENANT_ACTIVITY_LOG_ACTION_ENUM) {
|
|
67
|
+
TENANT_ACTIVITY_LOG_ACTION_ENUM["CREATED"] = "CREATED";
|
|
68
|
+
TENANT_ACTIVITY_LOG_ACTION_ENUM["UPDATED"] = "UPDATED";
|
|
69
|
+
TENANT_ACTIVITY_LOG_ACTION_ENUM["DELETED"] = "DELETED";
|
|
70
|
+
TENANT_ACTIVITY_LOG_ACTION_ENUM["REOPENED"] = "REOPENED";
|
|
71
|
+
TENANT_ACTIVITY_LOG_ACTION_ENUM["STATUS_CHANGED"] = "STATUS_CHANGED";
|
|
72
|
+
TENANT_ACTIVITY_LOG_ACTION_ENUM["CANCELLED"] = "CANCELLED";
|
|
73
|
+
TENANT_ACTIVITY_LOG_ACTION_ENUM["ITEM_ADDED"] = "ITEM_ADDED";
|
|
74
|
+
TENANT_ACTIVITY_LOG_ACTION_ENUM["ITEM_UPDATED"] = "ITEM_UPDATED";
|
|
75
|
+
TENANT_ACTIVITY_LOG_ACTION_ENUM["ITEM_REMOVED"] = "ITEM_REMOVED";
|
|
76
|
+
TENANT_ACTIVITY_LOG_ACTION_ENUM["ITEM_RESTORED"] = "ITEM_RESTORED";
|
|
77
|
+
})(TENANT_ACTIVITY_LOG_ACTION_ENUM || (exports.TENANT_ACTIVITY_LOG_ACTION_ENUM = TENANT_ACTIVITY_LOG_ACTION_ENUM = {}));
|
|
78
|
+
exports.ALL_TENANT_ACTIVITY_LOG_ACTION_NAMES = Object.values(TENANT_ACTIVITY_LOG_ACTION_ENUM);
|
|
79
|
+
var TENANT_ACTIVITY_LOG_SEVERITY_ENUM;
|
|
80
|
+
(function (TENANT_ACTIVITY_LOG_SEVERITY_ENUM) {
|
|
81
|
+
TENANT_ACTIVITY_LOG_SEVERITY_ENUM["INFO"] = "INFO";
|
|
82
|
+
TENANT_ACTIVITY_LOG_SEVERITY_ENUM["WARNING"] = "WARNING";
|
|
83
|
+
TENANT_ACTIVITY_LOG_SEVERITY_ENUM["ERROR"] = "ERROR";
|
|
84
|
+
})(TENANT_ACTIVITY_LOG_SEVERITY_ENUM || (exports.TENANT_ACTIVITY_LOG_SEVERITY_ENUM = TENANT_ACTIVITY_LOG_SEVERITY_ENUM = {}));
|
|
85
|
+
exports.ALL_TENANT_ACTIVITY_LOG_SEVERITY_NAMES = Object.values(TENANT_ACTIVITY_LOG_SEVERITY_ENUM);
|
|
@@ -222,24 +222,6 @@ export declare enum WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM {
|
|
|
222
222
|
NOTE_ADDED = "NOTE_ADDED"
|
|
223
223
|
}
|
|
224
224
|
export declare const ALL_WAREHOUSE_ACTIVITY_LOG_ACTION_NAMES: WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM[];
|
|
225
|
-
export declare enum WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM {
|
|
226
|
-
CREATED = "CREATED",
|
|
227
|
-
UPDATED = "UPDATED",
|
|
228
|
-
DELETED = "DELETED",
|
|
229
|
-
REOPENED = "REOPENED",
|
|
230
|
-
STATUS_CHANGED = "STATUS_CHANGED",
|
|
231
|
-
EMAIL_SENT = "EMAIL_SENT",
|
|
232
|
-
CONFIRMED = "CONFIRMED",
|
|
233
|
-
CANCELLED = "CANCELLED",
|
|
234
|
-
VENDOR_ACCEPTED = "VENDOR_ACCEPTED",
|
|
235
|
-
VENDOR_REJECTED = "VENDOR_REJECTED",
|
|
236
|
-
ITEM_ADDED = "ITEM_ADDED",
|
|
237
|
-
ITEM_UPDATED = "ITEM_UPDATED",
|
|
238
|
-
ITEM_REMOVED = "ITEM_REMOVED",
|
|
239
|
-
ITEM_RESTORED = "ITEM_RESTORED",
|
|
240
|
-
NOTE_ADDED = "NOTE_ADDED"
|
|
241
|
-
}
|
|
242
|
-
export declare const ALL_WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM_NAMES: WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM[];
|
|
243
225
|
export declare enum WAREHOUSE_ACTIVITY_LOG_SEVERITY_ENUM {
|
|
244
226
|
INFO = "INFO",
|
|
245
227
|
WARNING = "WARNING",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ALL_WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_NAMES = exports.WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM = exports.ALL_WAREHOUSE_INTERNAL_MOVEMENT_FLOW_NAMES = exports.WAREHOUSE_INTERNAL_MOVEMENT_FLOW_ENUM = exports.ALL_WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_NAMES = exports.ALL_WAREHOUSE_INVENTORY_LOT_SERIAL_MUTATION_ACTION_NAMES = exports.WAREHOUSE_INVENTORY_LOT_SERIAL_MUTATION_ACTION_ENUM = exports.ALL_WAREHOUSE_INVENTORY_LOT_SERIAL_MOVEMENT_TYPE_NAMES = exports.WAREHOUSE_INVENTORY_LOT_SERIAL_MOVEMENT_TYPE_ENUM = exports.WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM = exports.ALL_WAREHOUSE_INTERNAL_MOVEMENT_STATUS_NAMES = exports.WAREHOUSE_INTERNAL_MOVEMENT_STATUS_ENUM = exports.ALL_WAREHOUSE_INTERNAL_MOVEMENT_RECORD_TYPE_NAMES = exports.WAREHOUSE_INTERNAL_MOVEMENT_RECORD_TYPE_ENUM = exports.ALL_WAREHOUSE_REF_TYPE_NAMES = exports.WAREHOUSE_REF_TYPE_ENUM = exports.ALL_WAREHOUSE_SALE_ORDER_DELIVERY_RETURN_STATUS_NAMES = exports.WAREHOUSE_SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM = exports.ALL_WAREHOUSE_SALE_ORDER_DELIVERY_STATUS_NAMES = exports.WAREHOUSE_SALE_ORDER_DELIVERY_STATUS_ENUM = exports.ALL_WAREHOUSE_SALE_ORDER_PHYSICAL_DOC_KIND_NAMES = exports.WAREHOUSE_SALE_ORDER_PHYSICAL_DOC_KIND_ENUM = exports.ALL_WAREHOUSE_SALE_ORDER_CREDIT_NOTE_STATUS_NAMES = exports.WAREHOUSE_SALE_ORDER_CREDIT_NOTE_STATUS_ENUM = exports.ALL_WAREHOUSE_SALE_ORDER_INVOICE_PAYMENT_STATUS_NAMES = exports.WAREHOUSE_SALE_ORDER_INVOICE_PAYMENT_STATUS_ENUM = exports.ALL_WAREHOUSE_SALE_ORDER_INVOICE_TYPE_NAMES = exports.WAREHOUSE_SALE_ORDER_INVOICE_TYPE_ENUM = exports.ALL_WAREHOUSE_SALE_ORDER_FIN_DOC_KIND_NAMES = exports.WAREHOUSE_SALE_ORDER_FIN_DOC_KIND_ENUM = exports.ALL_WAREHOUSE_SALES_ORDER_STATUS_NAMES = exports.WAREHOUSE_SALES_ORDER_STATUS_ENUM = exports.ALL_WAREHOUSE_SALE_ORDER_RFQ_STATUS_NAMES = exports.WAREHOUSE_SALE_ORDER_RFQ_STATUS_ENUM = exports.ALL_WAREHOUSE_RFQ_VENDOR_STATUS_NAMES = exports.WAREHOUSE_PURCHASE_ORDER_RFQ_VENDOR_STATUS_ENUM = exports.ALL_WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_NAMES = exports.WAREHOUSE_PURCHASE_ORDER_RFQ_STATUS_ENUM = exports.ALL_WAREHOUSE_PURCHASE_ORDER_STATUS_NAMES = exports.WAREHOUSE_PURCHASE_ORDER_STATUS_ENUM = exports.ALL_VOID_WAREHOUSE_INVOICE_ITEM_TYPE_NAMES = exports.VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM = exports.ALL_WAREHOUSE_REMOVAL_STRATEGY_NAMES = exports.WAREHOUSE_REMOVAL_STRATEGY_ENUM = exports.ALL_WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_NAMES = exports.WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM = exports.ALL_WAREHOUSE_LOT_SERIAL_DOC_TYPE_NAMES = exports.WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM = exports.ALL_WAREHOUSE_TRACKING_MODE_NAMES = exports.WAREHOUSE_TRACKING_MODE_ENUM = void 0;
|
|
4
|
-
exports.ALL_WAREHOUSE_CLIENT_TYPE_NAMES = exports.WAREHOUSE_CLIENT_TYPE_ENUM = exports.ALL_WAREHOUSE_SUPPORT_SPECIALIST_PERMISSION_NAMES = exports.ALL_WAREHOUSE_MODERATOR_PERMISSION_NAMES = exports.ALL_WAREHOUSE_USER_PERMISSION_NAMES = exports.WAREHOUSE_USER_PERMISSIONS_ENUM = exports.ALL_WAREHOUSE_ACTIVITY_LOG_SEVERITY_NAMES = exports.WAREHOUSE_ACTIVITY_LOG_SEVERITY_ENUM = exports.
|
|
4
|
+
exports.ALL_WAREHOUSE_CLIENT_TYPE_NAMES = exports.WAREHOUSE_CLIENT_TYPE_ENUM = exports.ALL_WAREHOUSE_SUPPORT_SPECIALIST_PERMISSION_NAMES = exports.ALL_WAREHOUSE_MODERATOR_PERMISSION_NAMES = exports.ALL_WAREHOUSE_USER_PERMISSION_NAMES = exports.WAREHOUSE_USER_PERMISSIONS_ENUM = exports.ALL_WAREHOUSE_ACTIVITY_LOG_SEVERITY_NAMES = exports.WAREHOUSE_ACTIVITY_LOG_SEVERITY_ENUM = exports.ALL_WAREHOUSE_ACTIVITY_LOG_ACTION_NAMES = exports.WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM = exports.ALL_WAREHOUSE_ACTIVITY_LOG_ENTITY_TYPE_NAMES = exports.WAREHOUSE_ACTIVITY_LOG_ENTITY_TYPE_ENUM = exports.ALL_WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_NAMES = exports.WAREHOUSE_PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM = exports.ALL_WAREHOUSE_PURCHASE_ORDER_RECEIPT_STATUS_NAMES = exports.WAREHOUSE_PURCHASE_ORDER_RECEIPT_STATUS_ENUM = exports.ALL_WAREHOUSE_INTERNAL_MOVEMENT_DIRECTION_NAMES = exports.WAREHOUSE_INTERNAL_MOVEMENT_DIRECTION_ENUM = void 0;
|
|
5
5
|
// ======================>> <<====================== //
|
|
6
6
|
var WAREHOUSE_TRACKING_MODE_ENUM;
|
|
7
7
|
(function (WAREHOUSE_TRACKING_MODE_ENUM) {
|
|
@@ -272,25 +272,6 @@ var WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM;
|
|
|
272
272
|
WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM["NOTE_ADDED"] = "NOTE_ADDED";
|
|
273
273
|
})(WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM || (exports.WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM = WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM = {}));
|
|
274
274
|
exports.ALL_WAREHOUSE_ACTIVITY_LOG_ACTION_NAMES = Object.values(WAREHOUSE_ACTIVITY_LOG_ACTION_ENUM);
|
|
275
|
-
var WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM;
|
|
276
|
-
(function (WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM) {
|
|
277
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["CREATED"] = "CREATED";
|
|
278
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["UPDATED"] = "UPDATED";
|
|
279
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["DELETED"] = "DELETED";
|
|
280
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["REOPENED"] = "REOPENED";
|
|
281
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["STATUS_CHANGED"] = "STATUS_CHANGED";
|
|
282
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["EMAIL_SENT"] = "EMAIL_SENT";
|
|
283
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["CONFIRMED"] = "CONFIRMED";
|
|
284
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["CANCELLED"] = "CANCELLED";
|
|
285
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["VENDOR_ACCEPTED"] = "VENDOR_ACCEPTED";
|
|
286
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["VENDOR_REJECTED"] = "VENDOR_REJECTED";
|
|
287
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["ITEM_ADDED"] = "ITEM_ADDED";
|
|
288
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["ITEM_UPDATED"] = "ITEM_UPDATED";
|
|
289
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["ITEM_REMOVED"] = "ITEM_REMOVED";
|
|
290
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["ITEM_RESTORED"] = "ITEM_RESTORED";
|
|
291
|
-
WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM["NOTE_ADDED"] = "NOTE_ADDED";
|
|
292
|
-
})(WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM || (exports.WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM = WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM = {}));
|
|
293
|
-
exports.ALL_WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM_NAMES = Object.values(WAREHOUSE_ACTIVITY_LOG_ACTIONS_ENUM);
|
|
294
275
|
var WAREHOUSE_ACTIVITY_LOG_SEVERITY_ENUM;
|
|
295
276
|
(function (WAREHOUSE_ACTIVITY_LOG_SEVERITY_ENUM) {
|
|
296
277
|
WAREHOUSE_ACTIVITY_LOG_SEVERITY_ENUM["INFO"] = "INFO";
|
|
@@ -109,6 +109,7 @@ export declare function getChangeCourseStatusData(data: Partial<IOrder>, course_
|
|
|
109
109
|
} | null;
|
|
110
110
|
_id?: string | undefined;
|
|
111
111
|
tenant_id?: string | undefined;
|
|
112
|
+
source_tenant_id?: string | null | undefined;
|
|
112
113
|
consumer?: import("../../schemas").IConsumer | undefined;
|
|
113
114
|
platform?: PLATFORMS_ENUM | undefined;
|
|
114
115
|
tip_amount?: number | undefined;
|
|
@@ -346,6 +346,7 @@ function getOrderWithAllFields(order, skipItemMetadata) {
|
|
|
346
346
|
categories: skipItemMetadataFromOrderCategories(order.categories),
|
|
347
347
|
}
|
|
348
348
|
: {}),
|
|
349
|
+
source_tenant_id: order['source_tenant_id'] ?? null,
|
|
349
350
|
delete_reason: order['delete_reason'] ?? null,
|
|
350
351
|
cancel_reason: order['cancel_reason'] ?? null,
|
|
351
352
|
tax_invoice_id: order['tax_invoice_id'] ?? null,
|
|
@@ -40,6 +40,7 @@ offers: IOffer[]): {
|
|
|
40
40
|
wallet_redemptions: import("../../schemas").IWalletRedemptions | null | undefined;
|
|
41
41
|
_id?: string | undefined;
|
|
42
42
|
tenant_id?: string | undefined;
|
|
43
|
+
source_tenant_id?: string | null | undefined;
|
|
43
44
|
consumer?: import("../../schemas").IConsumer | undefined;
|
|
44
45
|
platform?: import("../../constants").PLATFORMS_ENUM | undefined;
|
|
45
46
|
tip_amount?: number | undefined;
|
|
@@ -48,6 +48,7 @@ export * from './rewards_usage';
|
|
|
48
48
|
export * from './riders';
|
|
49
49
|
export * from './specials';
|
|
50
50
|
export * from './staff_shifts';
|
|
51
|
+
export * from './tenant-activity-logs';
|
|
51
52
|
export * from './tenant_days';
|
|
52
53
|
export * from './tenant_metadata';
|
|
53
54
|
export * from './tenant_purchase_order_vendor_returns';
|
|
@@ -64,6 +64,7 @@ __exportStar(require("./rewards_usage"), exports);
|
|
|
64
64
|
__exportStar(require("./riders"), exports);
|
|
65
65
|
__exportStar(require("./specials"), exports);
|
|
66
66
|
__exportStar(require("./staff_shifts"), exports);
|
|
67
|
+
__exportStar(require("./tenant-activity-logs"), exports);
|
|
67
68
|
__exportStar(require("./tenant_days"), exports);
|
|
68
69
|
__exportStar(require("./tenant_metadata"), exports);
|
|
69
70
|
__exportStar(require("./tenant_purchase_order_vendor_returns"), exports);
|
|
@@ -5068,6 +5068,7 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
5068
5068
|
order_settled_at: NativeDate;
|
|
5069
5069
|
order_settled_at_mins: number;
|
|
5070
5070
|
cancel_reason?: string | null | undefined;
|
|
5071
|
+
source_tenant_id?: string | null | undefined;
|
|
5071
5072
|
split_parent_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
5072
5073
|
split_child_ids?: import("mongoose").Types.ObjectId[] | null | undefined;
|
|
5073
5074
|
split_type?: import("../../constants").SPLIT_BILL_TYPE_ENUM | null | undefined;
|
|
@@ -10182,6 +10183,7 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
10182
10183
|
order_settled_at: NativeDate;
|
|
10183
10184
|
order_settled_at_mins: number;
|
|
10184
10185
|
cancel_reason?: string | null | undefined;
|
|
10186
|
+
source_tenant_id?: string | null | undefined;
|
|
10185
10187
|
split_parent_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
10186
10188
|
split_child_ids?: import("mongoose").Types.ObjectId[] | null | undefined;
|
|
10187
10189
|
split_type?: import("../../constants").SPLIT_BILL_TYPE_ENUM | null | undefined;
|
|
@@ -15296,6 +15298,7 @@ export declare const OrderSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
15296
15298
|
order_settled_at: NativeDate;
|
|
15297
15299
|
order_settled_at_mins: number;
|
|
15298
15300
|
cancel_reason?: string | null | undefined;
|
|
15301
|
+
source_tenant_id?: string | null | undefined;
|
|
15299
15302
|
split_parent_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
15300
15303
|
split_child_ids?: import("mongoose").Types.ObjectId[] | null | undefined;
|
|
15301
15304
|
split_type?: import("../../constants").SPLIT_BILL_TYPE_ENUM | null | undefined;
|
|
@@ -601,6 +601,11 @@ exports.OrderSchema = new mongoose_1.Schema({
|
|
|
601
601
|
ref: 'tenants',
|
|
602
602
|
// NOTE: This is not immutable because we need to change the tenant_id when we move the order to another tenant
|
|
603
603
|
},
|
|
604
|
+
source_tenant_id: {
|
|
605
|
+
type: String,
|
|
606
|
+
required: false,
|
|
607
|
+
default: null,
|
|
608
|
+
},
|
|
604
609
|
consumer: {
|
|
605
610
|
type: ConsumerSchema,
|
|
606
611
|
required: true,
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
import { TENANT_ACTIVITY_LOG_SEVERITY_ENUM } from '../../constants';
|
|
3
|
+
export declare const TenantActivityLogSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
4
|
+
timestamps: true;
|
|
5
|
+
versionKey: false;
|
|
6
|
+
minimize: false;
|
|
7
|
+
}, {
|
|
8
|
+
createdAt: NativeDate;
|
|
9
|
+
updatedAt: NativeDate;
|
|
10
|
+
} & {
|
|
11
|
+
_id: import("mongoose").Types.ObjectId;
|
|
12
|
+
tenant_id: string;
|
|
13
|
+
createdAt: NativeDate;
|
|
14
|
+
updatedAt: NativeDate;
|
|
15
|
+
title: string;
|
|
16
|
+
entity_type: import("../../constants").TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM;
|
|
17
|
+
entity_id: string;
|
|
18
|
+
action: import("../../constants").TENANT_ACTIVITY_LOG_ACTION_ENUM;
|
|
19
|
+
severity: TENANT_ACTIVITY_LOG_SEVERITY_ENUM;
|
|
20
|
+
changes: import("mongoose").Types.DocumentArray<{
|
|
21
|
+
field: string;
|
|
22
|
+
old_value?: any;
|
|
23
|
+
new_value?: any;
|
|
24
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
25
|
+
field: string;
|
|
26
|
+
old_value?: any;
|
|
27
|
+
new_value?: any;
|
|
28
|
+
}> & {
|
|
29
|
+
field: string;
|
|
30
|
+
old_value?: any;
|
|
31
|
+
new_value?: any;
|
|
32
|
+
}>;
|
|
33
|
+
description?: string | null | undefined;
|
|
34
|
+
entity_number?: number | null | undefined;
|
|
35
|
+
actor?: {
|
|
36
|
+
role: string;
|
|
37
|
+
staff_id?: string | null | undefined;
|
|
38
|
+
staff_name?: string | null | undefined;
|
|
39
|
+
staff_mobile?: string | null | undefined;
|
|
40
|
+
staff_email?: string | null | undefined;
|
|
41
|
+
} | null | undefined;
|
|
42
|
+
event_at?: NativeDate | null | undefined;
|
|
43
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
44
|
+
createdAt: NativeDate;
|
|
45
|
+
updatedAt: NativeDate;
|
|
46
|
+
} & {
|
|
47
|
+
_id: import("mongoose").Types.ObjectId;
|
|
48
|
+
tenant_id: string;
|
|
49
|
+
createdAt: NativeDate;
|
|
50
|
+
updatedAt: NativeDate;
|
|
51
|
+
title: string;
|
|
52
|
+
entity_type: import("../../constants").TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM;
|
|
53
|
+
entity_id: string;
|
|
54
|
+
action: import("../../constants").TENANT_ACTIVITY_LOG_ACTION_ENUM;
|
|
55
|
+
severity: TENANT_ACTIVITY_LOG_SEVERITY_ENUM;
|
|
56
|
+
changes: import("mongoose").Types.DocumentArray<{
|
|
57
|
+
field: string;
|
|
58
|
+
old_value?: any;
|
|
59
|
+
new_value?: any;
|
|
60
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
61
|
+
field: string;
|
|
62
|
+
old_value?: any;
|
|
63
|
+
new_value?: any;
|
|
64
|
+
}> & {
|
|
65
|
+
field: string;
|
|
66
|
+
old_value?: any;
|
|
67
|
+
new_value?: any;
|
|
68
|
+
}>;
|
|
69
|
+
description?: string | null | undefined;
|
|
70
|
+
entity_number?: number | null | undefined;
|
|
71
|
+
actor?: {
|
|
72
|
+
role: string;
|
|
73
|
+
staff_id?: string | null | undefined;
|
|
74
|
+
staff_name?: string | null | undefined;
|
|
75
|
+
staff_mobile?: string | null | undefined;
|
|
76
|
+
staff_email?: string | null | undefined;
|
|
77
|
+
} | null | undefined;
|
|
78
|
+
event_at?: NativeDate | null | undefined;
|
|
79
|
+
}>> & import("mongoose").FlatRecord<{
|
|
80
|
+
createdAt: NativeDate;
|
|
81
|
+
updatedAt: NativeDate;
|
|
82
|
+
} & {
|
|
83
|
+
_id: import("mongoose").Types.ObjectId;
|
|
84
|
+
tenant_id: string;
|
|
85
|
+
createdAt: NativeDate;
|
|
86
|
+
updatedAt: NativeDate;
|
|
87
|
+
title: string;
|
|
88
|
+
entity_type: import("../../constants").TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM;
|
|
89
|
+
entity_id: string;
|
|
90
|
+
action: import("../../constants").TENANT_ACTIVITY_LOG_ACTION_ENUM;
|
|
91
|
+
severity: TENANT_ACTIVITY_LOG_SEVERITY_ENUM;
|
|
92
|
+
changes: import("mongoose").Types.DocumentArray<{
|
|
93
|
+
field: string;
|
|
94
|
+
old_value?: any;
|
|
95
|
+
new_value?: any;
|
|
96
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
97
|
+
field: string;
|
|
98
|
+
old_value?: any;
|
|
99
|
+
new_value?: any;
|
|
100
|
+
}> & {
|
|
101
|
+
field: string;
|
|
102
|
+
old_value?: any;
|
|
103
|
+
new_value?: any;
|
|
104
|
+
}>;
|
|
105
|
+
description?: string | null | undefined;
|
|
106
|
+
entity_number?: number | null | undefined;
|
|
107
|
+
actor?: {
|
|
108
|
+
role: string;
|
|
109
|
+
staff_id?: string | null | undefined;
|
|
110
|
+
staff_name?: string | null | undefined;
|
|
111
|
+
staff_mobile?: string | null | undefined;
|
|
112
|
+
staff_email?: string | null | undefined;
|
|
113
|
+
} | null | undefined;
|
|
114
|
+
event_at?: NativeDate | null | undefined;
|
|
115
|
+
}> & Required<{
|
|
116
|
+
_id: import("mongoose").Types.ObjectId;
|
|
117
|
+
}> & {
|
|
118
|
+
__v: number;
|
|
119
|
+
}>;
|
|
120
|
+
export declare const TENANT_ACTIVITY_LOGS_COLLECTION_NAME = "tenant_activity_logs";
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TENANT_ACTIVITY_LOGS_COLLECTION_NAME = exports.TenantActivityLogSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const TenantActivityLogActorSchema = new mongoose_1.Schema({
|
|
7
|
+
staff_id: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: false,
|
|
10
|
+
default: null,
|
|
11
|
+
},
|
|
12
|
+
staff_name: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: false,
|
|
15
|
+
default: null,
|
|
16
|
+
},
|
|
17
|
+
staff_email: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: false,
|
|
20
|
+
default: null,
|
|
21
|
+
},
|
|
22
|
+
staff_mobile: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: false,
|
|
25
|
+
default: null,
|
|
26
|
+
},
|
|
27
|
+
role: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
}, {
|
|
32
|
+
_id: false,
|
|
33
|
+
minimize: false,
|
|
34
|
+
});
|
|
35
|
+
const TenantActivityLogChangeSchema = new mongoose_1.Schema({
|
|
36
|
+
field: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: true,
|
|
39
|
+
},
|
|
40
|
+
old_value: {
|
|
41
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
42
|
+
required: false,
|
|
43
|
+
default: null,
|
|
44
|
+
},
|
|
45
|
+
new_value: {
|
|
46
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
47
|
+
required: false,
|
|
48
|
+
default: null,
|
|
49
|
+
},
|
|
50
|
+
}, {
|
|
51
|
+
_id: false,
|
|
52
|
+
minimize: false,
|
|
53
|
+
});
|
|
54
|
+
exports.TenantActivityLogSchema = new mongoose_1.Schema({
|
|
55
|
+
_id: {
|
|
56
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
57
|
+
required: true,
|
|
58
|
+
immutable: true,
|
|
59
|
+
},
|
|
60
|
+
tenant_id: {
|
|
61
|
+
type: String,
|
|
62
|
+
required: true,
|
|
63
|
+
},
|
|
64
|
+
entity_type: {
|
|
65
|
+
type: String,
|
|
66
|
+
enum: constants_1.ALL_TENANT_ACTIVITY_LOG_ENTITY_TYPE_NAMES,
|
|
67
|
+
required: true,
|
|
68
|
+
},
|
|
69
|
+
entity_id: {
|
|
70
|
+
type: String,
|
|
71
|
+
required: true,
|
|
72
|
+
},
|
|
73
|
+
entity_number: {
|
|
74
|
+
type: Number,
|
|
75
|
+
min: 0,
|
|
76
|
+
required: false,
|
|
77
|
+
default: null,
|
|
78
|
+
},
|
|
79
|
+
action: {
|
|
80
|
+
type: String,
|
|
81
|
+
enum: constants_1.ALL_TENANT_ACTIVITY_LOG_ACTION_NAMES,
|
|
82
|
+
required: true,
|
|
83
|
+
},
|
|
84
|
+
title: {
|
|
85
|
+
type: String,
|
|
86
|
+
required: true,
|
|
87
|
+
},
|
|
88
|
+
description: {
|
|
89
|
+
type: String,
|
|
90
|
+
required: false,
|
|
91
|
+
default: null,
|
|
92
|
+
},
|
|
93
|
+
severity: {
|
|
94
|
+
type: String,
|
|
95
|
+
enum: constants_1.ALL_TENANT_ACTIVITY_LOG_SEVERITY_NAMES,
|
|
96
|
+
required: true,
|
|
97
|
+
default: constants_1.TENANT_ACTIVITY_LOG_SEVERITY_ENUM.INFO,
|
|
98
|
+
},
|
|
99
|
+
actor: {
|
|
100
|
+
type: TenantActivityLogActorSchema,
|
|
101
|
+
required: false,
|
|
102
|
+
default: null,
|
|
103
|
+
},
|
|
104
|
+
changes: {
|
|
105
|
+
type: [TenantActivityLogChangeSchema],
|
|
106
|
+
default: [],
|
|
107
|
+
},
|
|
108
|
+
event_at: {
|
|
109
|
+
type: mongoose_1.Schema.Types.Date,
|
|
110
|
+
required: false,
|
|
111
|
+
default: null,
|
|
112
|
+
},
|
|
113
|
+
createdAt: {
|
|
114
|
+
type: mongoose_1.Schema.Types.Date,
|
|
115
|
+
required: true,
|
|
116
|
+
default: () => new Date(),
|
|
117
|
+
immutable: true,
|
|
118
|
+
},
|
|
119
|
+
updatedAt: {
|
|
120
|
+
type: mongoose_1.Schema.Types.Date,
|
|
121
|
+
required: true,
|
|
122
|
+
default: () => new Date(),
|
|
123
|
+
},
|
|
124
|
+
}, {
|
|
125
|
+
timestamps: true,
|
|
126
|
+
versionKey: false,
|
|
127
|
+
minimize: false,
|
|
128
|
+
});
|
|
129
|
+
exports.TENANT_ACTIVITY_LOGS_COLLECTION_NAME = 'tenant_activity_logs';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Schema } from 'mongoose';
|
|
2
2
|
import { WAREHOUSE_ACTIVITY_LOG_SEVERITY_ENUM } from '../../constants';
|
|
3
|
-
import { WAREHOUSE_ACTIVITY_LOGS_COLLECTION_NAME } from '../types/warehouse-activity-logs';
|
|
4
3
|
export declare const WarehouseActivityLogSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
5
4
|
timestamps: true;
|
|
6
5
|
versionKey: false;
|
|
@@ -118,4 +117,4 @@ export declare const WarehouseActivityLogSchema: Schema<any, import("mongoose").
|
|
|
118
117
|
}> & {
|
|
119
118
|
__v: number;
|
|
120
119
|
}>;
|
|
121
|
-
export
|
|
120
|
+
export declare const WAREHOUSE_ACTIVITY_LOGS_COLLECTION_NAME = "warehouse_activity_logs";
|
|
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WAREHOUSE_ACTIVITY_LOGS_COLLECTION_NAME = exports.WarehouseActivityLogSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
|
-
const warehouse_activity_logs_1 = require("../types/warehouse-activity-logs");
|
|
7
|
-
Object.defineProperty(exports, "WAREHOUSE_ACTIVITY_LOGS_COLLECTION_NAME", { enumerable: true, get: function () { return warehouse_activity_logs_1.WAREHOUSE_ACTIVITY_LOGS_COLLECTION_NAME; } });
|
|
8
6
|
const warehouses_1 = require("./warehouses");
|
|
9
7
|
const WarehouseActivityLogActorSchema = new mongoose_1.Schema({
|
|
10
8
|
staff_id: {
|
|
@@ -130,3 +128,4 @@ exports.WarehouseActivityLogSchema = new mongoose_1.Schema({
|
|
|
130
128
|
versionKey: false,
|
|
131
129
|
minimize: false,
|
|
132
130
|
});
|
|
131
|
+
exports.WAREHOUSE_ACTIVITY_LOGS_COLLECTION_NAME = 'warehouse_activity_logs';
|
|
@@ -51,6 +51,7 @@ export * from './rewards_usage';
|
|
|
51
51
|
export * from './riders';
|
|
52
52
|
export * from './specials';
|
|
53
53
|
export * from './staff_shifts';
|
|
54
|
+
export * from './tenant-activity-logs';
|
|
54
55
|
export * from './tenant_days';
|
|
55
56
|
export * from './tenant_metadata';
|
|
56
57
|
export * from './tenant_purchase_order_vendor_returns';
|
|
@@ -67,6 +67,7 @@ __exportStar(require("./rewards_usage"), exports);
|
|
|
67
67
|
__exportStar(require("./riders"), exports);
|
|
68
68
|
__exportStar(require("./specials"), exports);
|
|
69
69
|
__exportStar(require("./staff_shifts"), exports);
|
|
70
|
+
__exportStar(require("./tenant-activity-logs"), exports);
|
|
70
71
|
__exportStar(require("./tenant_days"), exports);
|
|
71
72
|
__exportStar(require("./tenant_metadata"), exports);
|
|
72
73
|
__exportStar(require("./tenant_purchase_order_vendor_returns"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TENANT_ACTIVITY_LOG_ACTION_ENUM, TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM, TENANT_ACTIVITY_LOG_SEVERITY_ENUM } from '../../constants';
|
|
2
|
+
export interface ITenantActivityLogActor {
|
|
3
|
+
staff_id: string;
|
|
4
|
+
staff_name: string | null;
|
|
5
|
+
staff_email: string | null;
|
|
6
|
+
staff_mobile: string | null;
|
|
7
|
+
role: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ITenantActivityLogChange {
|
|
10
|
+
field: string;
|
|
11
|
+
old_value: string | number | boolean | null;
|
|
12
|
+
new_value: string | number | boolean | null;
|
|
13
|
+
}
|
|
14
|
+
export interface ITenantActivityLog {
|
|
15
|
+
_id: string;
|
|
16
|
+
tenant_id: string;
|
|
17
|
+
entity_type: TENANT_ACTIVITY_LOG_ENTITY_TYPE_ENUM;
|
|
18
|
+
entity_id: string;
|
|
19
|
+
entity_number?: number | null;
|
|
20
|
+
action: TENANT_ACTIVITY_LOG_ACTION_ENUM;
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string | null;
|
|
23
|
+
severity: TENANT_ACTIVITY_LOG_SEVERITY_ENUM;
|
|
24
|
+
actor?: ITenantActivityLogActor | null;
|
|
25
|
+
changes?: ITenantActivityLogChange[];
|
|
26
|
+
event_at?: Date | null;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
updatedAt: Date;
|
|
29
|
+
}
|
|
@@ -8,8 +8,8 @@ export interface IWarehouseActivityLogActor {
|
|
|
8
8
|
}
|
|
9
9
|
export interface IWarehouseActivityLogChange {
|
|
10
10
|
field: string;
|
|
11
|
-
old_value: string | number | null;
|
|
12
|
-
new_value: string | number | null;
|
|
11
|
+
old_value: string | number | boolean | null;
|
|
12
|
+
new_value: string | number | boolean | null;
|
|
13
13
|
}
|
|
14
14
|
export interface IWarehouseActivityLog {
|
|
15
15
|
_id: string;
|
|
@@ -27,4 +27,3 @@ export interface IWarehouseActivityLog {
|
|
|
27
27
|
createdAt: Date;
|
|
28
28
|
updatedAt: Date;
|
|
29
29
|
}
|
|
30
|
-
export declare const WAREHOUSE_ACTIVITY_LOGS_COLLECTION_NAME = "warehouse_activity_logs";
|