@managesome/eposmatic-toolkit 0.2.455 → 0.2.457
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/WORKER_ENDPOINTS.d.ts +2 -0
- package/lib/constants/WORKER_ENDPOINTS.js +3 -0
- package/lib/helpers/types/workers.d.ts +16 -1
- package/lib/schemas/models/index.d.ts +1 -0
- package/lib/schemas/models/index.js +1 -0
- package/lib/schemas/types/index.d.ts +2 -0
- package/lib/schemas/types/index.js +2 -0
- package/package.json +1 -1
- package/lib/constants/PURCHASE_ORDER.d.ts +0 -16
- package/lib/constants/PURCHASE_ORDER.js +0 -100
- package/lib/constants/RFQ.d.ts +0 -0
- package/lib/constants/RFQ.js +0 -1
- package/lib/helpers/order/generate-purchase-order-rfq.d.ts +0 -3
- package/lib/helpers/order/generate-purchase-order-rfq.js +0 -64
- package/lib/helpers/order/generate-purchase-order.d.ts +0 -11
- package/lib/helpers/order/generate-purchase-order.js +0 -196
- package/lib/helpers/store/all-purchase-orders-actions.d.ts +0 -13
- package/lib/helpers/store/all-purchase-orders-actions.js +0 -56
- package/lib/helpers/store/all-sale-orders-actions.d.ts +0 -2
- package/lib/helpers/store/all-sale-orders-actions.js +0 -8
- package/lib/helpers/store/all-warehouse-sale-orders-actions.d.ts +0 -2
- package/lib/helpers/store/all-warehouse-sale-orders-actions.js +0 -8
- package/lib/helpers/store/common-purchase-order-actions.d.ts +0 -31
- package/lib/helpers/store/common-purchase-order-actions.js +0 -543
- package/lib/helpers/store/common-sale-order-actions.d.ts +0 -5
- package/lib/helpers/store/common-sale-order-actions.js +0 -65
- package/lib/helpers/store/purchase-order-rfq-cart-actions.d.ts +0 -19
- package/lib/helpers/store/purchase-order-rfq-cart-actions.js +0 -373
- package/lib/helpers/store/purchase-orders-cart-actions.d.ts +0 -57
- package/lib/helpers/store/purchase-orders-cart-actions.js +0 -486
- package/lib/helpers/types/purchase-order-cart-actions.d.ts +0 -26
- package/lib/helpers/types/purchase-order-cart-actions.js +0 -2
- package/lib/helpers/utils/invoice-x-report-helpers.d.ts +0 -58
- package/lib/helpers/utils/invoice-x-report-helpers.js +0 -1432
- package/lib/helpers/utils/purchase-order-engine.d.ts +0 -9
- package/lib/helpers/utils/purchase-order-engine.js +0 -34
- package/lib/helpers/utils/purchase-order-receipt-engine.d.ts +0 -149
- package/lib/helpers/utils/purchase-order-receipt-engine.js +0 -214
- package/lib/helpers/utils/purchase-order-x-report-helpers.d.ts +0 -58
- package/lib/helpers/utils/purchase-order-x-report-helpers.js +0 -1440
- package/lib/helpers/utils/sale-order-x-report-helpers.d.ts +0 -44
- package/lib/helpers/utils/sale-order-x-report-helpers.js +0 -22
- package/lib/helpers/utils/sale-x-report-helpers.d.ts +0 -58
- package/lib/helpers/utils/sale-x-report-helpers.js +0 -1456
- package/lib/helpers/utils/terminal-devices-helpers.d.ts +0 -2
- package/lib/helpers/utils/terminal-devices-helpers.js +0 -13
- package/lib/helpers/utils/void-purchase-order-items-helpers.d.ts +0 -3
- package/lib/helpers/utils/void-purchase-order-items-helpers.js +0 -38
- package/lib/helpers/utils/void-purchase-order-items-report-helpers.d.ts +0 -13
- package/lib/helpers/utils/void-purchase-order-items-report-helpers.js +0 -22
- package/lib/schemas/models/applied-order-discounts.d.ts +0 -80
- package/lib/schemas/models/applied-order-discounts.js +0 -106
- package/lib/schemas/models/brand.d.ts +0 -45
- package/lib/schemas/models/brand.js +0 -45
- package/lib/schemas/models/category.d.ts +0 -60
- package/lib/schemas/models/category.js +0 -67
- package/lib/schemas/models/dinein_table_fingerprints.d.ts +0 -65
- package/lib/schemas/models/dinein_table_fingerprints.js +0 -85
- package/lib/schemas/models/expense_category.d.ts +0 -83
- package/lib/schemas/models/expense_category.js +0 -64
- package/lib/schemas/models/internal_movements.d.ts +0 -357
- package/lib/schemas/models/internal_movements.js +0 -323
- package/lib/schemas/models/inventory.d.ts +0 -99
- package/lib/schemas/models/inventory.js +0 -87
- package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +0 -154
- package/lib/schemas/models/inventory_lot_serial_numbers.js +0 -193
- package/lib/schemas/models/item.d.ts +0 -11269
- package/lib/schemas/models/item.js +0 -333
- package/lib/schemas/models/menu.d.ts +0 -941
- package/lib/schemas/models/menu.js +0 -69
- package/lib/schemas/models/order.d.ts +0 -15437
- package/lib/schemas/models/order.js +0 -891
- package/lib/schemas/models/purchase_order_receipts.d.ts +0 -165
- package/lib/schemas/models/purchase_order_receipts.js +0 -151
- package/lib/schemas/models/purchase_order_rfq.d.ts +0 -1959
- package/lib/schemas/models/purchase_order_rfq.js +0 -328
- package/lib/schemas/models/purchase_order_rfqs.d.ts +0 -1959
- package/lib/schemas/models/purchase_order_rfqs.js +0 -328
- package/lib/schemas/models/purchase_order_vendor_returns.d.ts +0 -234
- package/lib/schemas/models/purchase_order_vendor_returns.js +0 -188
- package/lib/schemas/models/purchase_orders.d.ts +0 -2678
- package/lib/schemas/models/purchase_orders.js +0 -336
- package/lib/schemas/models/rider.d.ts +0 -65
- package/lib/schemas/models/rider.js +0 -74
- package/lib/schemas/models/sale_order_deliveries.d.ts +0 -167
- package/lib/schemas/models/sale_order_deliveries.js +0 -155
- package/lib/schemas/models/sale_order_invoices.d.ts +0 -227
- package/lib/schemas/models/sale_order_invoices.js +0 -206
- package/lib/schemas/models/sale_order_rfq.d.ts +0 -1938
- package/lib/schemas/models/sale_order_rfq.js +0 -309
- package/lib/schemas/models/sale_orders.d.ts +0 -1943
- package/lib/schemas/models/sale_orders.js +0 -324
- package/lib/schemas/models/tenant.d.ts +0 -528
- package/lib/schemas/models/tenant.js +0 -755
- package/lib/schemas/models/tenant_staff.d.ts +0 -932
- package/lib/schemas/models/tenant_staff.js +0 -96
- package/lib/schemas/models/track_order_number.d.ts +0 -413
- package/lib/schemas/models/track_order_number.js +0 -45
- package/lib/schemas/models/void_purchase_order_items.d.ts +0 -176
- package/lib/schemas/models/void_purchase_order_items.js +0 -177
- package/lib/schemas/models/void_warehouse_invoice_items.d.ts +0 -176
- package/lib/schemas/models/void_warehouse_invoice_items.js +0 -176
- package/lib/schemas/models/wallet.d.ts +0 -38
- package/lib/schemas/models/wallet.js +0 -37
- package/lib/schemas/models/warehouse-communications.d.ts +0 -228
- package/lib/schemas/models/warehouse-communications.js +0 -216
- package/lib/schemas/models/warehouse.d.ts +0 -162
- package/lib/schemas/models/warehouse.js +0 -222
- package/lib/schemas/models/warehouse_staff.d.ts +0 -65
- package/lib/schemas/models/warehouse_staff.js +0 -78
- package/lib/schemas/models/warehouse_track_order_number.d.ts +0 -50
- package/lib/schemas/models/warehouse_track_order_number.js +0 -52
- package/lib/schemas/types/applied-order-discounts.d.ts +0 -22
- package/lib/schemas/types/applied-order-discounts.js +0 -2
- package/lib/schemas/types/brand.d.ts +0 -32
- package/lib/schemas/types/brand.js +0 -2
- package/lib/schemas/types/category.d.ts +0 -15
- package/lib/schemas/types/category.js +0 -2
- package/lib/schemas/types/expense_category.d.ts +0 -20
- package/lib/schemas/types/expense_category.js +0 -2
- package/lib/schemas/types/internal_movements.d.ts +0 -73
- package/lib/schemas/types/internal_movements.js +0 -2
- package/lib/schemas/types/inventory.d.ts +0 -48
- package/lib/schemas/types/inventory.js +0 -2
- package/lib/schemas/types/inventory_lot_serial_numbers.d.ts +0 -85
- package/lib/schemas/types/inventory_lot_serial_numbers.js +0 -4
- package/lib/schemas/types/item.d.ts +0 -89
- package/lib/schemas/types/item.js +0 -2
- package/lib/schemas/types/menu.d.ts +0 -17
- package/lib/schemas/types/menu.js +0 -2
- package/lib/schemas/types/order.d.ts +0 -242
- package/lib/schemas/types/order.js +0 -2
- package/lib/schemas/types/purchase_order_common.d.ts +0 -39
- package/lib/schemas/types/purchase_order_common.js +0 -2
- package/lib/schemas/types/purchase_order_receipts.d.ts +0 -39
- package/lib/schemas/types/purchase_order_receipts.js +0 -21
- package/lib/schemas/types/purchase_order_rfq.d.ts +0 -33
- package/lib/schemas/types/purchase_order_rfq.js +0 -2
- package/lib/schemas/types/purchase_order_rfqs.d.ts +0 -33
- package/lib/schemas/types/purchase_order_rfqs.js +0 -2
- package/lib/schemas/types/purchase_order_vendor_returns.d.ts +0 -49
- package/lib/schemas/types/purchase_order_vendor_returns.js +0 -42
- package/lib/schemas/types/purchase_orders.d.ts +0 -33
- package/lib/schemas/types/purchase_orders.js +0 -2
- package/lib/schemas/types/rider.d.ts +0 -16
- package/lib/schemas/types/rider.js +0 -2
- package/lib/schemas/types/sale_order_common.d.ts +0 -39
- package/lib/schemas/types/sale_order_common.js +0 -2
- package/lib/schemas/types/sale_order_deliveries.d.ts +0 -67
- package/lib/schemas/types/sale_order_deliveries.js +0 -2
- package/lib/schemas/types/sale_order_invoices.d.ts +0 -49
- package/lib/schemas/types/sale_order_invoices.js +0 -2
- package/lib/schemas/types/sale_order_rfq.d.ts +0 -25
- package/lib/schemas/types/sale_order_rfq.js +0 -2
- package/lib/schemas/types/sale_orders.d.ts +0 -30
- package/lib/schemas/types/sale_orders.js +0 -2
- package/lib/schemas/types/tenant.d.ts +0 -205
- package/lib/schemas/types/tenant.js +0 -2
- package/lib/schemas/types/tenant_staff.d.ts +0 -22
- package/lib/schemas/types/tenant_staff.js +0 -2
- package/lib/schemas/types/track_order_number.d.ts +0 -10
- package/lib/schemas/types/track_order_number.js +0 -2
- package/lib/schemas/types/void_purchase_order_items.d.ts +0 -37
- package/lib/schemas/types/void_purchase_order_items.js +0 -2
- package/lib/schemas/types/void_warehouse_invoice_items.d.ts +0 -37
- package/lib/schemas/types/void_warehouse_invoice_items.js +0 -2
- package/lib/schemas/types/wallet.d.ts +0 -7
- package/lib/schemas/types/wallet.js +0 -2
- package/lib/schemas/types/warehouse-communications.d.ts +0 -54
- package/lib/schemas/types/warehouse-communications.js +0 -2
- package/lib/schemas/types/warehouse.d.ts +0 -49
- package/lib/schemas/types/warehouse.js +0 -2
- package/lib/schemas/types/warehouse_purchase_order_common.d.ts +0 -39
- package/lib/schemas/types/warehouse_purchase_order_common.js +0 -2
- package/lib/schemas/types/warehouse_sale_order_common.d.ts +0 -39
- package/lib/schemas/types/warehouse_sale_order_common.js +0 -2
- package/lib/schemas/types/warehouse_staff.d.ts +0 -17
- package/lib/schemas/types/warehouse_staff.js +0 -2
- package/lib/schemas/types/warehouse_track_order_number.d.ts +0 -11
- package/lib/schemas/types/warehouse_track_order_number.js +0 -2
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WAREHOUSE_SETTINGS_COLLECTION_NAME = exports.WarehouseSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const constants_1 = require("../../constants");
|
|
6
|
-
exports.WarehouseSchema = new mongoose_1.Schema({
|
|
7
|
-
_id: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true,
|
|
10
|
-
immutable: true,
|
|
11
|
-
},
|
|
12
|
-
brand_id: {
|
|
13
|
-
type: String,
|
|
14
|
-
required: true,
|
|
15
|
-
immutable: true,
|
|
16
|
-
ref: 'brands',
|
|
17
|
-
},
|
|
18
|
-
name: {
|
|
19
|
-
type: String,
|
|
20
|
-
required: true,
|
|
21
|
-
},
|
|
22
|
-
warehouse_address: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: '',
|
|
25
|
-
},
|
|
26
|
-
public_business_name: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: '',
|
|
29
|
-
},
|
|
30
|
-
support_email: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: '',
|
|
33
|
-
},
|
|
34
|
-
public_phone_numbers: {
|
|
35
|
-
type: [String],
|
|
36
|
-
default: [],
|
|
37
|
-
},
|
|
38
|
-
image_url: {
|
|
39
|
-
type: String,
|
|
40
|
-
required: true,
|
|
41
|
-
},
|
|
42
|
-
active: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
required: true,
|
|
45
|
-
},
|
|
46
|
-
currency_code: {
|
|
47
|
-
type: String,
|
|
48
|
-
enum: constants_1.ALL_CURRENCY_CODES,
|
|
49
|
-
default: constants_1.CURRENCY_CODE_ENUM.PKR,
|
|
50
|
-
},
|
|
51
|
-
currency_symbol: {
|
|
52
|
-
type: String,
|
|
53
|
-
enum: constants_1.ALL_CURRENCY_SYMBOLS,
|
|
54
|
-
default: constants_1.CURRENCY_SYMBOL_ENUM.Rs,
|
|
55
|
-
},
|
|
56
|
-
currency_name: {
|
|
57
|
-
type: String,
|
|
58
|
-
enum: constants_1.ALL_CURRENCY_NAMES,
|
|
59
|
-
default: constants_1.CURRENCY_NAME_ENUM.PAKISTANI_RUPEE,
|
|
60
|
-
},
|
|
61
|
-
country_code: {
|
|
62
|
-
type: String,
|
|
63
|
-
enum: constants_1.ALL_COUNTRY_CODES,
|
|
64
|
-
default: constants_1.COUNTRY_CODE_ENUM['+92'],
|
|
65
|
-
},
|
|
66
|
-
country_alpha_2: {
|
|
67
|
-
type: String,
|
|
68
|
-
enum: constants_1.ALL_COUNTRY_ALPHA_2_TYPES,
|
|
69
|
-
default: constants_1.COUNTRY_ALPHA_2_ENUM.PK,
|
|
70
|
-
},
|
|
71
|
-
country_alpha_3: {
|
|
72
|
-
type: String,
|
|
73
|
-
enum: constants_1.ALL_COUNTRY_ALPHA_3_TYPES,
|
|
74
|
-
default: constants_1.COUNTRY_ALPHA_3_ENUM.PAK,
|
|
75
|
-
},
|
|
76
|
-
country_name: {
|
|
77
|
-
type: String,
|
|
78
|
-
enum: constants_1.ALL_COUNTRY_NAME_TYPES,
|
|
79
|
-
default: constants_1.COUNTRY_NAME_ENUM.PAKISTAN,
|
|
80
|
-
},
|
|
81
|
-
country_flag: {
|
|
82
|
-
type: String,
|
|
83
|
-
enum: constants_1.ALL_COUNTRY_FLAG_TYPES,
|
|
84
|
-
default: constants_1.COUNTRY_FLAG_ENUM['🇵🇰'],
|
|
85
|
-
},
|
|
86
|
-
is_gst_inclusive: {
|
|
87
|
-
type: Boolean,
|
|
88
|
-
required: false,
|
|
89
|
-
},
|
|
90
|
-
hide_gst_value: {
|
|
91
|
-
type: Boolean,
|
|
92
|
-
required: false,
|
|
93
|
-
},
|
|
94
|
-
exclude_discount_from_gst: {
|
|
95
|
-
type: Boolean,
|
|
96
|
-
required: false,
|
|
97
|
-
},
|
|
98
|
-
po_card_gst: {
|
|
99
|
-
type: Number,
|
|
100
|
-
default: 0,
|
|
101
|
-
},
|
|
102
|
-
po_cash_gst: {
|
|
103
|
-
type: Number,
|
|
104
|
-
default: 0,
|
|
105
|
-
},
|
|
106
|
-
invoice_card_gst: {
|
|
107
|
-
type: Number,
|
|
108
|
-
default: 0,
|
|
109
|
-
},
|
|
110
|
-
invoice_cash_gst: {
|
|
111
|
-
type: Number,
|
|
112
|
-
default: 0,
|
|
113
|
-
},
|
|
114
|
-
default_po_gst_type: {
|
|
115
|
-
type: String,
|
|
116
|
-
enum: constants_1.ALL_GST_TYPES,
|
|
117
|
-
default: constants_1.GST_TYPE_ENUM.CARD,
|
|
118
|
-
},
|
|
119
|
-
default_invoice_gst_type: {
|
|
120
|
-
type: String,
|
|
121
|
-
enum: constants_1.ALL_GST_TYPES,
|
|
122
|
-
default: constants_1.GST_TYPE_ENUM.CARD,
|
|
123
|
-
},
|
|
124
|
-
tax_business_number: {
|
|
125
|
-
type: String,
|
|
126
|
-
default: '',
|
|
127
|
-
},
|
|
128
|
-
tax_invoice_provider: {
|
|
129
|
-
type: String,
|
|
130
|
-
enum: constants_1.ALL_TAX_INVOICE_PROVIDERS,
|
|
131
|
-
required: false,
|
|
132
|
-
},
|
|
133
|
-
tax_invoice_generation_id: {
|
|
134
|
-
type: String,
|
|
135
|
-
required: false,
|
|
136
|
-
},
|
|
137
|
-
_tax_invoice_generation_token: {
|
|
138
|
-
type: String,
|
|
139
|
-
required: false,
|
|
140
|
-
},
|
|
141
|
-
track_purchase_order_number_by: {
|
|
142
|
-
type: String,
|
|
143
|
-
enum: constants_1.ALL_TRACK_ORDER_NUMBER_TYPES,
|
|
144
|
-
default: constants_1.TRACK_ORDER_NUMBER_ENUM.DAY,
|
|
145
|
-
},
|
|
146
|
-
track_invoice_number_by: {
|
|
147
|
-
type: String,
|
|
148
|
-
enum: constants_1.ALL_TRACK_ORDER_NUMBER_TYPES,
|
|
149
|
-
default: constants_1.TRACK_ORDER_NUMBER_ENUM.DAY,
|
|
150
|
-
},
|
|
151
|
-
operational_time_zone_offset_gmt: {
|
|
152
|
-
type: Number,
|
|
153
|
-
min: -12,
|
|
154
|
-
max: 14,
|
|
155
|
-
default: 0,
|
|
156
|
-
},
|
|
157
|
-
operational_start_time: {
|
|
158
|
-
type: Number,
|
|
159
|
-
min: 0,
|
|
160
|
-
max: 1440,
|
|
161
|
-
default: 360,
|
|
162
|
-
},
|
|
163
|
-
operational_end_time: {
|
|
164
|
-
type: Number,
|
|
165
|
-
min: 0,
|
|
166
|
-
max: 1440,
|
|
167
|
-
default: 360,
|
|
168
|
-
},
|
|
169
|
-
coordinates: {
|
|
170
|
-
type: [Number, Number],
|
|
171
|
-
default: [0, 0],
|
|
172
|
-
},
|
|
173
|
-
brand_color: {
|
|
174
|
-
type: String,
|
|
175
|
-
default: '#5B0888FF',
|
|
176
|
-
},
|
|
177
|
-
alert_phone_numbers: {
|
|
178
|
-
type: [String],
|
|
179
|
-
default: [],
|
|
180
|
-
},
|
|
181
|
-
alert_email_addresses: {
|
|
182
|
-
type: [String],
|
|
183
|
-
default: [],
|
|
184
|
-
},
|
|
185
|
-
alert_when: {
|
|
186
|
-
type: [String],
|
|
187
|
-
default: [],
|
|
188
|
-
},
|
|
189
|
-
enable_lot_serial_tracking: {
|
|
190
|
-
type: Boolean,
|
|
191
|
-
default: false,
|
|
192
|
-
},
|
|
193
|
-
default_removal_strategy: {
|
|
194
|
-
type: String,
|
|
195
|
-
enum: constants_1.ALL_REMOVAL_STRATEGY_TYPES,
|
|
196
|
-
default: constants_1.REMOVAL_STRATEGY_ENUM.FIFO,
|
|
197
|
-
},
|
|
198
|
-
po_custom_payment_types: {
|
|
199
|
-
type: [String],
|
|
200
|
-
default: [],
|
|
201
|
-
},
|
|
202
|
-
invoice_custom_payment_types: {
|
|
203
|
-
type: [String],
|
|
204
|
-
default: [],
|
|
205
|
-
},
|
|
206
|
-
createdAt: {
|
|
207
|
-
type: mongoose_1.Schema.Types.Date,
|
|
208
|
-
required: true,
|
|
209
|
-
default: () => new Date(),
|
|
210
|
-
immutable: true,
|
|
211
|
-
},
|
|
212
|
-
updatedAt: {
|
|
213
|
-
type: mongoose_1.Schema.Types.Date,
|
|
214
|
-
required: true,
|
|
215
|
-
default: () => new Date(),
|
|
216
|
-
},
|
|
217
|
-
}, {
|
|
218
|
-
timestamps: true,
|
|
219
|
-
versionKey: false,
|
|
220
|
-
minimize: false,
|
|
221
|
-
});
|
|
222
|
-
exports.WAREHOUSE_SETTINGS_COLLECTION_NAME = 'warehouses';
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export declare const WarehouseStaffSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
3
|
-
timestamps: true;
|
|
4
|
-
versionKey: false;
|
|
5
|
-
minimize: false;
|
|
6
|
-
}, {
|
|
7
|
-
createdAt: NativeDate;
|
|
8
|
-
updatedAt: NativeDate;
|
|
9
|
-
} & {
|
|
10
|
-
_id: import("mongoose").Types.ObjectId;
|
|
11
|
-
createdAt: NativeDate;
|
|
12
|
-
updatedAt: NativeDate;
|
|
13
|
-
image_url: string;
|
|
14
|
-
phone_number: string;
|
|
15
|
-
uid: string;
|
|
16
|
-
display_name: string;
|
|
17
|
-
email: string;
|
|
18
|
-
email_verified: boolean;
|
|
19
|
-
phone_number_verified: boolean;
|
|
20
|
-
is_disabled: boolean;
|
|
21
|
-
warehouse_id: string;
|
|
22
|
-
staff_auth_code: string;
|
|
23
|
-
role: import("../../constants").USER_ROLES_ENUM;
|
|
24
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
25
|
-
createdAt: NativeDate;
|
|
26
|
-
updatedAt: NativeDate;
|
|
27
|
-
} & {
|
|
28
|
-
_id: import("mongoose").Types.ObjectId;
|
|
29
|
-
createdAt: NativeDate;
|
|
30
|
-
updatedAt: NativeDate;
|
|
31
|
-
image_url: string;
|
|
32
|
-
phone_number: string;
|
|
33
|
-
uid: string;
|
|
34
|
-
display_name: string;
|
|
35
|
-
email: string;
|
|
36
|
-
email_verified: boolean;
|
|
37
|
-
phone_number_verified: boolean;
|
|
38
|
-
is_disabled: boolean;
|
|
39
|
-
warehouse_id: string;
|
|
40
|
-
staff_auth_code: string;
|
|
41
|
-
role: import("../../constants").USER_ROLES_ENUM;
|
|
42
|
-
}>> & import("mongoose").FlatRecord<{
|
|
43
|
-
createdAt: NativeDate;
|
|
44
|
-
updatedAt: NativeDate;
|
|
45
|
-
} & {
|
|
46
|
-
_id: import("mongoose").Types.ObjectId;
|
|
47
|
-
createdAt: NativeDate;
|
|
48
|
-
updatedAt: NativeDate;
|
|
49
|
-
image_url: string;
|
|
50
|
-
phone_number: string;
|
|
51
|
-
uid: string;
|
|
52
|
-
display_name: string;
|
|
53
|
-
email: string;
|
|
54
|
-
email_verified: boolean;
|
|
55
|
-
phone_number_verified: boolean;
|
|
56
|
-
is_disabled: boolean;
|
|
57
|
-
warehouse_id: string;
|
|
58
|
-
staff_auth_code: string;
|
|
59
|
-
role: import("../../constants").USER_ROLES_ENUM;
|
|
60
|
-
}> & Required<{
|
|
61
|
-
_id: import("mongoose").Types.ObjectId;
|
|
62
|
-
}> & {
|
|
63
|
-
__v: number;
|
|
64
|
-
}>;
|
|
65
|
-
export declare const WAREHOUSE_STAFF_COLLECTION_NAME = "warehouse_staffs";
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WAREHOUSE_STAFF_COLLECTION_NAME = exports.WarehouseStaffSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const constants_1 = require("../../constants");
|
|
6
|
-
exports.WarehouseStaffSchema = new mongoose_1.Schema({
|
|
7
|
-
_id: {
|
|
8
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
9
|
-
required: true,
|
|
10
|
-
immutable: true,
|
|
11
|
-
},
|
|
12
|
-
uid: {
|
|
13
|
-
type: String,
|
|
14
|
-
required: true,
|
|
15
|
-
immutable: true,
|
|
16
|
-
},
|
|
17
|
-
warehouse_id: {
|
|
18
|
-
type: String,
|
|
19
|
-
required: true,
|
|
20
|
-
immutable: true,
|
|
21
|
-
ref: 'warehouses',
|
|
22
|
-
},
|
|
23
|
-
staff_auth_code: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: null,
|
|
26
|
-
},
|
|
27
|
-
email: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: null,
|
|
30
|
-
},
|
|
31
|
-
email_verified: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: false,
|
|
34
|
-
},
|
|
35
|
-
display_name: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: null,
|
|
38
|
-
},
|
|
39
|
-
image_url: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: null,
|
|
42
|
-
},
|
|
43
|
-
is_disabled: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: false,
|
|
46
|
-
},
|
|
47
|
-
phone_number: {
|
|
48
|
-
type: String,
|
|
49
|
-
required: true,
|
|
50
|
-
minlength: 10,
|
|
51
|
-
immutable: true,
|
|
52
|
-
},
|
|
53
|
-
phone_number_verified: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: false,
|
|
56
|
-
},
|
|
57
|
-
role: {
|
|
58
|
-
type: String,
|
|
59
|
-
required: true,
|
|
60
|
-
enum: constants_1.ALL_USER_ROLES,
|
|
61
|
-
},
|
|
62
|
-
createdAt: {
|
|
63
|
-
type: Date,
|
|
64
|
-
required: true,
|
|
65
|
-
immutable: true,
|
|
66
|
-
default: () => new Date(),
|
|
67
|
-
},
|
|
68
|
-
updatedAt: {
|
|
69
|
-
type: Date,
|
|
70
|
-
required: true,
|
|
71
|
-
default: () => new Date(),
|
|
72
|
-
},
|
|
73
|
-
}, {
|
|
74
|
-
timestamps: true,
|
|
75
|
-
versionKey: false,
|
|
76
|
-
minimize: false,
|
|
77
|
-
});
|
|
78
|
-
exports.WAREHOUSE_STAFF_COLLECTION_NAME = 'warehouse_staffs';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export declare const WarehouseTrackOrderNumberSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
3
|
-
timestamps: true;
|
|
4
|
-
versionKey: false;
|
|
5
|
-
minimize: false;
|
|
6
|
-
}, {
|
|
7
|
-
createdAt: NativeDate;
|
|
8
|
-
updatedAt: NativeDate;
|
|
9
|
-
} & {
|
|
10
|
-
_id: string;
|
|
11
|
-
createdAt: NativeDate;
|
|
12
|
-
updatedAt: NativeDate;
|
|
13
|
-
PO_YEAR: number;
|
|
14
|
-
PO_MONTH: number;
|
|
15
|
-
PO_DAY: number;
|
|
16
|
-
INVOICE_YEAR: number;
|
|
17
|
-
INVOICE_MONTH: number;
|
|
18
|
-
INVOICE_DAY: number;
|
|
19
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
20
|
-
createdAt: NativeDate;
|
|
21
|
-
updatedAt: NativeDate;
|
|
22
|
-
} & {
|
|
23
|
-
_id: string;
|
|
24
|
-
createdAt: NativeDate;
|
|
25
|
-
updatedAt: NativeDate;
|
|
26
|
-
PO_YEAR: number;
|
|
27
|
-
PO_MONTH: number;
|
|
28
|
-
PO_DAY: number;
|
|
29
|
-
INVOICE_YEAR: number;
|
|
30
|
-
INVOICE_MONTH: number;
|
|
31
|
-
INVOICE_DAY: number;
|
|
32
|
-
}>> & import("mongoose").FlatRecord<{
|
|
33
|
-
createdAt: NativeDate;
|
|
34
|
-
updatedAt: NativeDate;
|
|
35
|
-
} & {
|
|
36
|
-
_id: string;
|
|
37
|
-
createdAt: NativeDate;
|
|
38
|
-
updatedAt: NativeDate;
|
|
39
|
-
PO_YEAR: number;
|
|
40
|
-
PO_MONTH: number;
|
|
41
|
-
PO_DAY: number;
|
|
42
|
-
INVOICE_YEAR: number;
|
|
43
|
-
INVOICE_MONTH: number;
|
|
44
|
-
INVOICE_DAY: number;
|
|
45
|
-
}> & Required<{
|
|
46
|
-
_id: string;
|
|
47
|
-
}> & {
|
|
48
|
-
__v: number;
|
|
49
|
-
}>;
|
|
50
|
-
export declare const WAREHOUSE_TRACK_ORDER_NUMBERS_COLLECTION_NAME = "warehouse_track_order_numbers";
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WAREHOUSE_TRACK_ORDER_NUMBERS_COLLECTION_NAME = exports.WarehouseTrackOrderNumberSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
exports.WarehouseTrackOrderNumberSchema = new mongoose_1.Schema({
|
|
6
|
-
_id: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
immutable: true,
|
|
10
|
-
ref: 'warehouses',
|
|
11
|
-
},
|
|
12
|
-
PO_YEAR: {
|
|
13
|
-
type: Number,
|
|
14
|
-
default: 0,
|
|
15
|
-
},
|
|
16
|
-
PO_MONTH: {
|
|
17
|
-
type: Number,
|
|
18
|
-
default: 0,
|
|
19
|
-
},
|
|
20
|
-
PO_DAY: {
|
|
21
|
-
type: Number,
|
|
22
|
-
default: 0,
|
|
23
|
-
},
|
|
24
|
-
INVOICE_YEAR: {
|
|
25
|
-
type: Number,
|
|
26
|
-
default: 0,
|
|
27
|
-
},
|
|
28
|
-
INVOICE_MONTH: {
|
|
29
|
-
type: Number,
|
|
30
|
-
default: 0,
|
|
31
|
-
},
|
|
32
|
-
INVOICE_DAY: {
|
|
33
|
-
type: Number,
|
|
34
|
-
default: 0,
|
|
35
|
-
},
|
|
36
|
-
createdAt: {
|
|
37
|
-
type: mongoose_1.Schema.Types.Date,
|
|
38
|
-
required: true,
|
|
39
|
-
default: () => new Date(),
|
|
40
|
-
immutable: true,
|
|
41
|
-
},
|
|
42
|
-
updatedAt: {
|
|
43
|
-
type: mongoose_1.Schema.Types.Date,
|
|
44
|
-
required: true,
|
|
45
|
-
default: () => new Date(),
|
|
46
|
-
},
|
|
47
|
-
}, {
|
|
48
|
-
timestamps: true,
|
|
49
|
-
versionKey: false,
|
|
50
|
-
minimize: false,
|
|
51
|
-
});
|
|
52
|
-
exports.WAREHOUSE_TRACK_ORDER_NUMBERS_COLLECTION_NAME = 'warehouse_track_order_numbers';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { DISCOUNT_APPLICABILITY_ENUM, DISCOUNT_TYPE_ENUM, PLATFORMS_ENUM } from '../../constants';
|
|
2
|
-
export interface IAppliedOrderDiscount {
|
|
3
|
-
_id: string;
|
|
4
|
-
tenant_id: string;
|
|
5
|
-
order_id: string;
|
|
6
|
-
discount_id: string;
|
|
7
|
-
type: DISCOUNT_TYPE_ENUM;
|
|
8
|
-
applicability: DISCOUNT_APPLICABILITY_ENUM;
|
|
9
|
-
platform: PLATFORMS_ENUM;
|
|
10
|
-
name: string;
|
|
11
|
-
order_amount: number;
|
|
12
|
-
discount_amount: number;
|
|
13
|
-
discount_rate: number | null;
|
|
14
|
-
reason: string;
|
|
15
|
-
reference_number: string | null;
|
|
16
|
-
staff_id: string;
|
|
17
|
-
staff_phone: string;
|
|
18
|
-
staff_name: string;
|
|
19
|
-
createdAt_mins: number;
|
|
20
|
-
createdAt: Date;
|
|
21
|
-
updatedAt: Date;
|
|
22
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { MULTI_TENANT_WEBSITE_TYPE_ENUM } from '../../constants';
|
|
2
|
-
export interface IBrand {
|
|
3
|
-
_id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
image_url: string;
|
|
6
|
-
multi_tenant_website: string | null;
|
|
7
|
-
website_display_type: MULTI_TENANT_WEBSITE_TYPE_ENUM;
|
|
8
|
-
createdAt: Date;
|
|
9
|
-
updatedAt: Date;
|
|
10
|
-
}
|
|
11
|
-
export interface IBrandTenants {
|
|
12
|
-
_id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
image_url: string;
|
|
15
|
-
tenants: {
|
|
16
|
-
_id: string;
|
|
17
|
-
name: string;
|
|
18
|
-
image_url: string;
|
|
19
|
-
}[];
|
|
20
|
-
}
|
|
21
|
-
export declare type IBrandsWithTenants = IBrandTenants[];
|
|
22
|
-
export interface IBrandWarehouses {
|
|
23
|
-
_id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
image_url: string;
|
|
26
|
-
warehouses: {
|
|
27
|
-
_id: string;
|
|
28
|
-
name: string;
|
|
29
|
-
image_url: string;
|
|
30
|
-
}[];
|
|
31
|
-
}
|
|
32
|
-
export declare type IBrandsWithWarehouses = IBrandWarehouses[];
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CATEGORY_DISPLAY_TYPE_ENUM } from '../../constants';
|
|
2
|
-
export interface ICategory {
|
|
3
|
-
_id: string;
|
|
4
|
-
brand_id: string;
|
|
5
|
-
tenants: string[];
|
|
6
|
-
image_url: string;
|
|
7
|
-
banner_url?: string | null;
|
|
8
|
-
name: string;
|
|
9
|
-
subtitle: string;
|
|
10
|
-
active: boolean;
|
|
11
|
-
sort_id: number;
|
|
12
|
-
display_type: CATEGORY_DISPLAY_TYPE_ENUM;
|
|
13
|
-
createdAt: Date;
|
|
14
|
-
updatedAt: Date;
|
|
15
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IExpenseDetails } from './expense_details';
|
|
2
|
-
export interface IExpenseSubCategory {
|
|
3
|
-
_id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
sort_id: number;
|
|
6
|
-
}
|
|
7
|
-
export interface IExpenseCategory {
|
|
8
|
-
_id: string;
|
|
9
|
-
tenant_id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
description: string;
|
|
12
|
-
sort_id: number;
|
|
13
|
-
sub_categories: IExpenseSubCategory[];
|
|
14
|
-
createdAt: Date;
|
|
15
|
-
updatedAt: Date;
|
|
16
|
-
}
|
|
17
|
-
export interface IExpenseCategoryDetails extends IExpenseCategory {
|
|
18
|
-
details: IExpenseDetails[];
|
|
19
|
-
}
|
|
20
|
-
export type IExpenseCategoriesWithDetails = IExpenseCategoryDetails[];
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM, INTERNAL_MOVEMENT_FLOW_ENUM, INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM, INTERNAL_MOVEMENT_RECORD_TYPE_ENUM, INTERNAL_MOVEMENT_STATUS_ENUM, REF_TYPE_ENUM } from '../../constants';
|
|
2
|
-
export interface IInternalMovementActorRef {
|
|
3
|
-
uid: string;
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
|
-
export interface IInternalMovementItem {
|
|
7
|
-
_id: string;
|
|
8
|
-
item_id: string;
|
|
9
|
-
inventory_code: string;
|
|
10
|
-
item_name: string;
|
|
11
|
-
quantity: number;
|
|
12
|
-
received_qty: number;
|
|
13
|
-
notes?: string | null;
|
|
14
|
-
}
|
|
15
|
-
export interface IInternalMovementStatusMeta {
|
|
16
|
-
requested_at?: Date | null;
|
|
17
|
-
approved_at?: Date | null;
|
|
18
|
-
dispatched_at?: Date | null;
|
|
19
|
-
delivered_at?: Date | null;
|
|
20
|
-
received_at?: Date | null;
|
|
21
|
-
cancelled_at?: Date | null;
|
|
22
|
-
requested_by?: IInternalMovementActorRef | null;
|
|
23
|
-
approved_by?: IInternalMovementActorRef | null;
|
|
24
|
-
dispatched_by?: IInternalMovementActorRef | null;
|
|
25
|
-
delivered_by?: IInternalMovementActorRef | null;
|
|
26
|
-
received_by?: IInternalMovementActorRef | null;
|
|
27
|
-
cancelled_by?: IInternalMovementActorRef | null;
|
|
28
|
-
}
|
|
29
|
-
export interface IInternalMovementEditRequestMeta {
|
|
30
|
-
edit_request_status: INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM;
|
|
31
|
-
edit_requested_at?: Date | null;
|
|
32
|
-
edit_requested_by?: IInternalMovementActorRef | null;
|
|
33
|
-
edit_request_note?: string | null;
|
|
34
|
-
edit_request_reviewed_at?: Date | null;
|
|
35
|
-
edit_request_reviewed_by?: IInternalMovementActorRef | null;
|
|
36
|
-
edit_request_decision_note?: string | null;
|
|
37
|
-
edit_approved_for_context_id?: string | null;
|
|
38
|
-
}
|
|
39
|
-
export interface IInternalMovementCancelRequestMeta {
|
|
40
|
-
cancel_request_status: INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM;
|
|
41
|
-
cancel_requested_at?: Date | null;
|
|
42
|
-
cancel_requested_by?: IInternalMovementActorRef | null;
|
|
43
|
-
cancel_request_note?: string | null;
|
|
44
|
-
cancel_request_reviewed_at?: Date | null;
|
|
45
|
-
cancel_request_reviewed_by?: IInternalMovementActorRef | null;
|
|
46
|
-
cancel_request_decision_note?: string | null;
|
|
47
|
-
}
|
|
48
|
-
export interface IInternalMovement extends IInternalMovementStatusMeta, IInternalMovementEditRequestMeta, IInternalMovementCancelRequestMeta {
|
|
49
|
-
_id: string;
|
|
50
|
-
ref_id: string;
|
|
51
|
-
ref_type: REF_TYPE_ENUM;
|
|
52
|
-
doc_number: string;
|
|
53
|
-
record_type: INTERNAL_MOVEMENT_RECORD_TYPE_ENUM;
|
|
54
|
-
status: INTERNAL_MOVEMENT_STATUS_ENUM;
|
|
55
|
-
flow: INTERNAL_MOVEMENT_FLOW_ENUM;
|
|
56
|
-
source_id: string;
|
|
57
|
-
source_type: INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
|
|
58
|
-
source_name: string;
|
|
59
|
-
destination_id: string;
|
|
60
|
-
destination_type: INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
|
|
61
|
-
destination_name: string;
|
|
62
|
-
items: IInternalMovementItem[];
|
|
63
|
-
total_items: number;
|
|
64
|
-
total_quantity: number;
|
|
65
|
-
parent_movement_id?: string | null;
|
|
66
|
-
notes?: string | null;
|
|
67
|
-
created_by: IInternalMovementActorRef;
|
|
68
|
-
updated_by?: IInternalMovementActorRef | null;
|
|
69
|
-
cancelled_reason?: string | null;
|
|
70
|
-
is_deleted: boolean;
|
|
71
|
-
createdAt: Date;
|
|
72
|
-
updatedAt: Date;
|
|
73
|
-
}
|