@managesome/eposmatic-toolkit 0.2.455 → 0.2.458

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.
Files changed (176) hide show
  1. package/lib/constants/WORKER_ENDPOINTS.d.ts +1 -0
  2. package/lib/constants/WORKER_ENDPOINTS.js +2 -0
  3. package/lib/helpers/types/workers.d.ts +15 -1
  4. package/package.json +1 -1
  5. package/lib/constants/PURCHASE_ORDER.d.ts +0 -16
  6. package/lib/constants/PURCHASE_ORDER.js +0 -100
  7. package/lib/constants/RFQ.d.ts +0 -0
  8. package/lib/constants/RFQ.js +0 -1
  9. package/lib/helpers/order/generate-purchase-order-rfq.d.ts +0 -3
  10. package/lib/helpers/order/generate-purchase-order-rfq.js +0 -64
  11. package/lib/helpers/order/generate-purchase-order.d.ts +0 -11
  12. package/lib/helpers/order/generate-purchase-order.js +0 -196
  13. package/lib/helpers/store/all-purchase-orders-actions.d.ts +0 -13
  14. package/lib/helpers/store/all-purchase-orders-actions.js +0 -56
  15. package/lib/helpers/store/all-sale-orders-actions.d.ts +0 -2
  16. package/lib/helpers/store/all-sale-orders-actions.js +0 -8
  17. package/lib/helpers/store/all-warehouse-sale-orders-actions.d.ts +0 -2
  18. package/lib/helpers/store/all-warehouse-sale-orders-actions.js +0 -8
  19. package/lib/helpers/store/common-purchase-order-actions.d.ts +0 -31
  20. package/lib/helpers/store/common-purchase-order-actions.js +0 -543
  21. package/lib/helpers/store/common-sale-order-actions.d.ts +0 -5
  22. package/lib/helpers/store/common-sale-order-actions.js +0 -65
  23. package/lib/helpers/store/purchase-order-rfq-cart-actions.d.ts +0 -19
  24. package/lib/helpers/store/purchase-order-rfq-cart-actions.js +0 -373
  25. package/lib/helpers/store/purchase-orders-cart-actions.d.ts +0 -57
  26. package/lib/helpers/store/purchase-orders-cart-actions.js +0 -486
  27. package/lib/helpers/types/purchase-order-cart-actions.d.ts +0 -26
  28. package/lib/helpers/types/purchase-order-cart-actions.js +0 -2
  29. package/lib/helpers/utils/invoice-x-report-helpers.d.ts +0 -58
  30. package/lib/helpers/utils/invoice-x-report-helpers.js +0 -1432
  31. package/lib/helpers/utils/purchase-order-engine.d.ts +0 -9
  32. package/lib/helpers/utils/purchase-order-engine.js +0 -34
  33. package/lib/helpers/utils/purchase-order-receipt-engine.d.ts +0 -149
  34. package/lib/helpers/utils/purchase-order-receipt-engine.js +0 -214
  35. package/lib/helpers/utils/purchase-order-x-report-helpers.d.ts +0 -58
  36. package/lib/helpers/utils/purchase-order-x-report-helpers.js +0 -1440
  37. package/lib/helpers/utils/sale-order-x-report-helpers.d.ts +0 -44
  38. package/lib/helpers/utils/sale-order-x-report-helpers.js +0 -22
  39. package/lib/helpers/utils/sale-x-report-helpers.d.ts +0 -58
  40. package/lib/helpers/utils/sale-x-report-helpers.js +0 -1456
  41. package/lib/helpers/utils/terminal-devices-helpers.d.ts +0 -2
  42. package/lib/helpers/utils/terminal-devices-helpers.js +0 -13
  43. package/lib/helpers/utils/void-purchase-order-items-helpers.d.ts +0 -3
  44. package/lib/helpers/utils/void-purchase-order-items-helpers.js +0 -38
  45. package/lib/helpers/utils/void-purchase-order-items-report-helpers.d.ts +0 -13
  46. package/lib/helpers/utils/void-purchase-order-items-report-helpers.js +0 -22
  47. package/lib/schemas/models/applied-order-discounts.d.ts +0 -80
  48. package/lib/schemas/models/applied-order-discounts.js +0 -106
  49. package/lib/schemas/models/brand.d.ts +0 -45
  50. package/lib/schemas/models/brand.js +0 -45
  51. package/lib/schemas/models/category.d.ts +0 -60
  52. package/lib/schemas/models/category.js +0 -67
  53. package/lib/schemas/models/dinein_table_fingerprints.d.ts +0 -65
  54. package/lib/schemas/models/dinein_table_fingerprints.js +0 -85
  55. package/lib/schemas/models/expense_category.d.ts +0 -83
  56. package/lib/schemas/models/expense_category.js +0 -64
  57. package/lib/schemas/models/internal_movements.d.ts +0 -357
  58. package/lib/schemas/models/internal_movements.js +0 -323
  59. package/lib/schemas/models/inventory.d.ts +0 -99
  60. package/lib/schemas/models/inventory.js +0 -87
  61. package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +0 -154
  62. package/lib/schemas/models/inventory_lot_serial_numbers.js +0 -193
  63. package/lib/schemas/models/item.d.ts +0 -11269
  64. package/lib/schemas/models/item.js +0 -333
  65. package/lib/schemas/models/menu.d.ts +0 -941
  66. package/lib/schemas/models/menu.js +0 -69
  67. package/lib/schemas/models/order.d.ts +0 -15437
  68. package/lib/schemas/models/order.js +0 -891
  69. package/lib/schemas/models/purchase_order_receipts.d.ts +0 -165
  70. package/lib/schemas/models/purchase_order_receipts.js +0 -151
  71. package/lib/schemas/models/purchase_order_rfq.d.ts +0 -1959
  72. package/lib/schemas/models/purchase_order_rfq.js +0 -328
  73. package/lib/schemas/models/purchase_order_rfqs.d.ts +0 -1959
  74. package/lib/schemas/models/purchase_order_rfqs.js +0 -328
  75. package/lib/schemas/models/purchase_order_vendor_returns.d.ts +0 -234
  76. package/lib/schemas/models/purchase_order_vendor_returns.js +0 -188
  77. package/lib/schemas/models/purchase_orders.d.ts +0 -2678
  78. package/lib/schemas/models/purchase_orders.js +0 -336
  79. package/lib/schemas/models/rider.d.ts +0 -65
  80. package/lib/schemas/models/rider.js +0 -74
  81. package/lib/schemas/models/sale_order_deliveries.d.ts +0 -167
  82. package/lib/schemas/models/sale_order_deliveries.js +0 -155
  83. package/lib/schemas/models/sale_order_invoices.d.ts +0 -227
  84. package/lib/schemas/models/sale_order_invoices.js +0 -206
  85. package/lib/schemas/models/sale_order_rfq.d.ts +0 -1938
  86. package/lib/schemas/models/sale_order_rfq.js +0 -309
  87. package/lib/schemas/models/sale_orders.d.ts +0 -1943
  88. package/lib/schemas/models/sale_orders.js +0 -324
  89. package/lib/schemas/models/tenant.d.ts +0 -528
  90. package/lib/schemas/models/tenant.js +0 -755
  91. package/lib/schemas/models/tenant_staff.d.ts +0 -932
  92. package/lib/schemas/models/tenant_staff.js +0 -96
  93. package/lib/schemas/models/track_order_number.d.ts +0 -413
  94. package/lib/schemas/models/track_order_number.js +0 -45
  95. package/lib/schemas/models/void_purchase_order_items.d.ts +0 -176
  96. package/lib/schemas/models/void_purchase_order_items.js +0 -177
  97. package/lib/schemas/models/void_warehouse_invoice_items.d.ts +0 -176
  98. package/lib/schemas/models/void_warehouse_invoice_items.js +0 -176
  99. package/lib/schemas/models/wallet.d.ts +0 -38
  100. package/lib/schemas/models/wallet.js +0 -37
  101. package/lib/schemas/models/warehouse-communications.d.ts +0 -228
  102. package/lib/schemas/models/warehouse-communications.js +0 -216
  103. package/lib/schemas/models/warehouse.d.ts +0 -162
  104. package/lib/schemas/models/warehouse.js +0 -222
  105. package/lib/schemas/models/warehouse_staff.d.ts +0 -65
  106. package/lib/schemas/models/warehouse_staff.js +0 -78
  107. package/lib/schemas/models/warehouse_track_order_number.d.ts +0 -50
  108. package/lib/schemas/models/warehouse_track_order_number.js +0 -52
  109. package/lib/schemas/types/applied-order-discounts.d.ts +0 -22
  110. package/lib/schemas/types/applied-order-discounts.js +0 -2
  111. package/lib/schemas/types/brand.d.ts +0 -32
  112. package/lib/schemas/types/brand.js +0 -2
  113. package/lib/schemas/types/category.d.ts +0 -15
  114. package/lib/schemas/types/category.js +0 -2
  115. package/lib/schemas/types/expense_category.d.ts +0 -20
  116. package/lib/schemas/types/expense_category.js +0 -2
  117. package/lib/schemas/types/internal_movements.d.ts +0 -73
  118. package/lib/schemas/types/internal_movements.js +0 -2
  119. package/lib/schemas/types/inventory.d.ts +0 -48
  120. package/lib/schemas/types/inventory.js +0 -2
  121. package/lib/schemas/types/inventory_lot_serial_numbers.d.ts +0 -85
  122. package/lib/schemas/types/inventory_lot_serial_numbers.js +0 -4
  123. package/lib/schemas/types/item.d.ts +0 -89
  124. package/lib/schemas/types/item.js +0 -2
  125. package/lib/schemas/types/menu.d.ts +0 -17
  126. package/lib/schemas/types/menu.js +0 -2
  127. package/lib/schemas/types/order.d.ts +0 -242
  128. package/lib/schemas/types/order.js +0 -2
  129. package/lib/schemas/types/purchase_order_common.d.ts +0 -39
  130. package/lib/schemas/types/purchase_order_common.js +0 -2
  131. package/lib/schemas/types/purchase_order_receipts.d.ts +0 -39
  132. package/lib/schemas/types/purchase_order_receipts.js +0 -21
  133. package/lib/schemas/types/purchase_order_rfq.d.ts +0 -33
  134. package/lib/schemas/types/purchase_order_rfq.js +0 -2
  135. package/lib/schemas/types/purchase_order_rfqs.d.ts +0 -33
  136. package/lib/schemas/types/purchase_order_rfqs.js +0 -2
  137. package/lib/schemas/types/purchase_order_vendor_returns.d.ts +0 -49
  138. package/lib/schemas/types/purchase_order_vendor_returns.js +0 -42
  139. package/lib/schemas/types/purchase_orders.d.ts +0 -33
  140. package/lib/schemas/types/purchase_orders.js +0 -2
  141. package/lib/schemas/types/rider.d.ts +0 -16
  142. package/lib/schemas/types/rider.js +0 -2
  143. package/lib/schemas/types/sale_order_common.d.ts +0 -39
  144. package/lib/schemas/types/sale_order_common.js +0 -2
  145. package/lib/schemas/types/sale_order_deliveries.d.ts +0 -67
  146. package/lib/schemas/types/sale_order_deliveries.js +0 -2
  147. package/lib/schemas/types/sale_order_invoices.d.ts +0 -49
  148. package/lib/schemas/types/sale_order_invoices.js +0 -2
  149. package/lib/schemas/types/sale_order_rfq.d.ts +0 -25
  150. package/lib/schemas/types/sale_order_rfq.js +0 -2
  151. package/lib/schemas/types/sale_orders.d.ts +0 -30
  152. package/lib/schemas/types/sale_orders.js +0 -2
  153. package/lib/schemas/types/tenant.d.ts +0 -205
  154. package/lib/schemas/types/tenant.js +0 -2
  155. package/lib/schemas/types/tenant_staff.d.ts +0 -22
  156. package/lib/schemas/types/tenant_staff.js +0 -2
  157. package/lib/schemas/types/track_order_number.d.ts +0 -10
  158. package/lib/schemas/types/track_order_number.js +0 -2
  159. package/lib/schemas/types/void_purchase_order_items.d.ts +0 -37
  160. package/lib/schemas/types/void_purchase_order_items.js +0 -2
  161. package/lib/schemas/types/void_warehouse_invoice_items.d.ts +0 -37
  162. package/lib/schemas/types/void_warehouse_invoice_items.js +0 -2
  163. package/lib/schemas/types/wallet.d.ts +0 -7
  164. package/lib/schemas/types/wallet.js +0 -2
  165. package/lib/schemas/types/warehouse-communications.d.ts +0 -54
  166. package/lib/schemas/types/warehouse-communications.js +0 -2
  167. package/lib/schemas/types/warehouse.d.ts +0 -49
  168. package/lib/schemas/types/warehouse.js +0 -2
  169. package/lib/schemas/types/warehouse_purchase_order_common.d.ts +0 -39
  170. package/lib/schemas/types/warehouse_purchase_order_common.js +0 -2
  171. package/lib/schemas/types/warehouse_sale_order_common.d.ts +0 -39
  172. package/lib/schemas/types/warehouse_sale_order_common.js +0 -2
  173. package/lib/schemas/types/warehouse_staff.d.ts +0 -17
  174. package/lib/schemas/types/warehouse_staff.js +0 -2
  175. package/lib/schemas/types/warehouse_track_order_number.d.ts +0 -11
  176. package/lib/schemas/types/warehouse_track_order_number.js +0 -2
@@ -1,336 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PURCHASE_ORDER_COLLECTION_NAME = exports.PurchaseOrderSchema = void 0;
4
- const mongoose_1 = require("mongoose");
5
- const constants_1 = require("../../constants");
6
- const common_models_1 = require("./common-models");
7
- const purchase_order_rfqs_1 = require("./purchase_order_rfqs");
8
- const warehouse_categories_1 = require("./warehouse_categories");
9
- const warehouse_items_1 = require("./warehouse_items");
10
- const warehouse_vendors_1 = require("./warehouse_vendors");
11
- const warehouses_1 = require("./warehouses");
12
- const StaffDetailsSchema = new mongoose_1.Schema({
13
- staff_id: {
14
- type: String,
15
- required: true,
16
- },
17
- staff_name: {
18
- type: String,
19
- default: '',
20
- },
21
- staff_mobile: {
22
- type: String,
23
- default: null,
24
- },
25
- staff_email: {
26
- type: String,
27
- default: null,
28
- },
29
- }, { _id: false, minimize: false });
30
- const ItemsModal = new mongoose_1.Schema({
31
- _id: {
32
- type: mongoose_1.Schema.Types.ObjectId,
33
- required: true,
34
- immutable: true,
35
- },
36
- item_id: {
37
- type: mongoose_1.Schema.Types.ObjectId,
38
- required: true,
39
- immutable: true,
40
- ref: warehouse_items_1.WAREHOUSE_ITEMS_COLLECTION_NAME,
41
- },
42
- is_ready: {
43
- type: Boolean,
44
- required: false,
45
- },
46
- void_reason: {
47
- type: String,
48
- required: false,
49
- },
50
- name: {
51
- type: String,
52
- required: true,
53
- },
54
- price: {
55
- type: Number,
56
- min: 0,
57
- required: true,
58
- },
59
- subtotal: {
60
- type: Number,
61
- min: 0,
62
- required: true,
63
- },
64
- quantity: {
65
- type: Number,
66
- min: 0,
67
- required: true,
68
- },
69
- _gst_amount: {
70
- type: Number,
71
- min: 0,
72
- required: true,
73
- },
74
- _net_amount: {
75
- type: Number,
76
- min: 0,
77
- required: true,
78
- },
79
- _gross_amount: {
80
- type: Number,
81
- min: 0,
82
- required: true,
83
- },
84
- _discount_amount: {
85
- type: Number,
86
- min: 0,
87
- required: true,
88
- },
89
- special_instructions: {
90
- type: String,
91
- default: '',
92
- },
93
- });
94
- const CatergoriesSchema = new mongoose_1.Schema({
95
- category_id: {
96
- type: mongoose_1.Schema.Types.ObjectId,
97
- required: true,
98
- immutable: true,
99
- ref: warehouse_categories_1.WAREHOUSE_CATEGORY_COLLECTION_NAME,
100
- },
101
- name: {
102
- type: String,
103
- required: true,
104
- },
105
- items: {
106
- type: [ItemsModal],
107
- default: [],
108
- },
109
- }, {
110
- _id: false,
111
- minimize: false,
112
- });
113
- const IterationsOrderSchema = new mongoose_1.Schema({
114
- categories: {
115
- type: [CatergoriesSchema],
116
- required: true,
117
- },
118
- special_instructions: {
119
- type: String,
120
- default: '',
121
- },
122
- payments: {
123
- type: [common_models_1.PaymentsSchema],
124
- required: true,
125
- },
126
- order_status: {
127
- type: String,
128
- enum: constants_1.ALL_PURCHASE_ORDER_STATUS_NAMES,
129
- required: true,
130
- },
131
- price: {
132
- type: Number,
133
- min: 0,
134
- required: true,
135
- },
136
- amount_earned: {
137
- type: Number,
138
- min: 0,
139
- required: true,
140
- },
141
- grand_total: {
142
- type: Number,
143
- min: 0,
144
- required: true,
145
- },
146
- staff_details: {
147
- type: StaffDetailsSchema,
148
- required: false,
149
- },
150
- gst: {
151
- type: Number,
152
- min: 0,
153
- required: false,
154
- },
155
- gst_amount: {
156
- type: Number,
157
- min: 0,
158
- required: false,
159
- },
160
- is_gst_inclusive: {
161
- type: Boolean,
162
- required: false,
163
- },
164
- tax_number: {
165
- type: String,
166
- default: '',
167
- },
168
- updatedAt: {
169
- type: mongoose_1.Schema.Types.Date,
170
- required: true,
171
- },
172
- }, {
173
- _id: false,
174
- timestamps: false,
175
- versionKey: false,
176
- });
177
- exports.PurchaseOrderSchema = new mongoose_1.Schema({
178
- _id: {
179
- type: mongoose_1.Schema.Types.ObjectId,
180
- required: true,
181
- immutable: true,
182
- },
183
- warehouse_id: {
184
- type: String,
185
- required: true,
186
- ref: warehouses_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
187
- },
188
- vendor_id: {
189
- type: mongoose_1.Schema.Types.ObjectId,
190
- required: true,
191
- ref: warehouse_vendors_1.WAREHOUSE_VENDORS_COLLECTION_NAME,
192
- },
193
- vendor_name: {
194
- type: String,
195
- default: '',
196
- },
197
- rfq_id: {
198
- type: mongoose_1.Schema.Types.ObjectId,
199
- required: false,
200
- ref: purchase_order_rfqs_1.PURCHASE_ORDER_RFQ_COLLECTION_NAME,
201
- },
202
- categories: {
203
- type: [CatergoriesSchema],
204
- default: [],
205
- },
206
- iterations: {
207
- type: [IterationsOrderSchema],
208
- default: [],
209
- },
210
- special_instructions: {
211
- type: String,
212
- default: '',
213
- },
214
- payments: {
215
- type: [common_models_1.PaymentsSchema],
216
- required: true,
217
- },
218
- order_status: {
219
- type: String,
220
- enum: constants_1.ALL_PURCHASE_ORDER_STATUS_NAMES,
221
- required: true,
222
- },
223
- tax_number: {
224
- type: String,
225
- default: '',
226
- },
227
- price: {
228
- type: Number,
229
- min: 0,
230
- required: true,
231
- },
232
- amount_collected: {
233
- type: Number,
234
- min: 0,
235
- required: true,
236
- },
237
- amount_earned: {
238
- type: Number,
239
- min: 0,
240
- required: true,
241
- },
242
- grand_total: {
243
- type: Number,
244
- min: 0,
245
- required: true,
246
- },
247
- order_number: {
248
- type: Number,
249
- min: 0,
250
- default: null,
251
- },
252
- //
253
- delete_reason: {
254
- type: String,
255
- required: false,
256
- },
257
- cancel_reason: {
258
- type: String,
259
- required: false,
260
- },
261
- // common fields
262
- staff_details: {
263
- type: StaffDetailsSchema,
264
- required: true,
265
- },
266
- gst: {
267
- type: Number,
268
- min: 0,
269
- required: false,
270
- },
271
- gst_amount: {
272
- type: Number,
273
- min: 0,
274
- required: false,
275
- },
276
- is_gst_inclusive: {
277
- type: Boolean,
278
- required: false,
279
- },
280
- //
281
- is_deleted: {
282
- type: Boolean,
283
- default: false,
284
- },
285
- order_status_updated_at: {
286
- type: mongoose_1.Schema.Types.Date,
287
- required: true,
288
- default: () => new Date(),
289
- },
290
- is_reopened: {
291
- type: Boolean,
292
- required: false,
293
- },
294
- deferred_settlement: {
295
- type: Boolean,
296
- required: false,
297
- },
298
- order_settled_at: {
299
- type: mongoose_1.Schema.Types.Date,
300
- required: true,
301
- default: () => new Date(),
302
- },
303
- order_settled_at_mins: {
304
- type: Number,
305
- required: true,
306
- default: () => {
307
- const date = new Date();
308
- return Math.floor(date.getHours() * 60 + date.getMinutes());
309
- },
310
- },
311
- createdAt_mins: {
312
- type: Number,
313
- required: true,
314
- immutable: true,
315
- default: () => {
316
- const date = new Date();
317
- return Math.floor(date.getHours() * 60 + date.getMinutes());
318
- },
319
- },
320
- createdAt: {
321
- type: mongoose_1.Schema.Types.Date,
322
- required: true,
323
- default: () => new Date(),
324
- immutable: true,
325
- },
326
- updatedAt: {
327
- type: mongoose_1.Schema.Types.Date,
328
- required: true,
329
- default: () => new Date(),
330
- },
331
- }, {
332
- timestamps: true,
333
- versionKey: false,
334
- minimize: false,
335
- });
336
- exports.PURCHASE_ORDER_COLLECTION_NAME = 'purchase_orders';
@@ -1,65 +0,0 @@
1
- import { Schema } from 'mongoose';
2
- export declare const RiderSchema: 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
- lat: number;
15
- lng: number;
16
- phone_number: string;
17
- uid: string;
18
- display_name: string;
19
- email: string;
20
- is_disabled: boolean;
21
- is_available: boolean;
22
- is_public: boolean;
23
- is_verified: boolean;
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
- lat: number;
33
- lng: number;
34
- phone_number: string;
35
- uid: string;
36
- display_name: string;
37
- email: string;
38
- is_disabled: boolean;
39
- is_available: boolean;
40
- is_public: boolean;
41
- is_verified: boolean;
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
- lat: number;
51
- lng: number;
52
- phone_number: string;
53
- uid: string;
54
- display_name: string;
55
- email: string;
56
- is_disabled: boolean;
57
- is_available: boolean;
58
- is_public: boolean;
59
- is_verified: boolean;
60
- }> & Required<{
61
- _id: import("mongoose").Types.ObjectId;
62
- }> & {
63
- __v: number;
64
- }>;
65
- export declare const RIDERS_COLLECTION_NAME = "riders";
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RIDERS_COLLECTION_NAME = exports.RiderSchema = void 0;
4
- const mongoose_1 = require("mongoose");
5
- exports.RiderSchema = new mongoose_1.Schema({
6
- _id: {
7
- type: mongoose_1.Schema.Types.ObjectId,
8
- required: true,
9
- immutable: true,
10
- },
11
- uid: {
12
- type: String,
13
- required: true,
14
- immutable: true,
15
- },
16
- is_disabled: {
17
- type: Boolean,
18
- default: false,
19
- },
20
- display_name: {
21
- type: String,
22
- default: null,
23
- },
24
- phone_number: {
25
- type: String,
26
- required: true,
27
- minlength: 10,
28
- immutable: true,
29
- },
30
- email: {
31
- type: String,
32
- default: null,
33
- },
34
- image_url: {
35
- type: String,
36
- default: null,
37
- },
38
- lat: {
39
- type: Number,
40
- default: 0,
41
- },
42
- lng: {
43
- type: Number,
44
- default: 0,
45
- },
46
- is_public: {
47
- type: Boolean,
48
- default: false,
49
- },
50
- is_available: {
51
- type: Boolean,
52
- default: false,
53
- },
54
- is_verified: {
55
- type: Boolean,
56
- default: false,
57
- },
58
- createdAt: {
59
- type: Date,
60
- required: true,
61
- immutable: true,
62
- default: () => new Date(),
63
- },
64
- updatedAt: {
65
- type: Date,
66
- required: true,
67
- default: () => new Date(),
68
- },
69
- }, {
70
- timestamps: true,
71
- versionKey: false,
72
- minimize: false,
73
- });
74
- exports.RIDERS_COLLECTION_NAME = 'riders';
@@ -1,167 +0,0 @@
1
- import { Schema } from 'mongoose';
2
- export declare const WAREHOUSE_SALE_DELIVERY_COLLECTION_NAME = "warehouse_sale_deliveries";
3
- export declare const SaleOrderDeliveriesSchema: 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
- createdAt_mins: number;
13
- createdAt: NativeDate;
14
- updatedAt: NativeDate;
15
- items: import("mongoose").Types.DocumentArray<{
16
- quantity: number;
17
- item_id: import("mongoose").Types.ObjectId;
18
- item_name: string;
19
- reason?: string | null | undefined;
20
- }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
21
- quantity: number;
22
- item_id: import("mongoose").Types.ObjectId;
23
- item_name: string;
24
- reason?: string | null | undefined;
25
- }> & {
26
- quantity: number;
27
- item_id: import("mongoose").Types.ObjectId;
28
- item_name: string;
29
- reason?: string | null | undefined;
30
- }>;
31
- status: import("../../constants").SALE_ORDER_DELIVERY_STATUS_ENUM | import("../../constants").SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
32
- warehouse_id: string;
33
- doc_kind: import("../../constants").SALE_ORDER_PHYSICAL_DOC_KIND_ENUM;
34
- sale_order_id: import("mongoose").Types.ObjectId;
35
- cancel_reason?: string | null | undefined;
36
- notes?: string | null | undefined;
37
- created_by?: {
38
- _id: string;
39
- name: string;
40
- } | null | undefined;
41
- cancelled_at?: NativeDate | null | undefined;
42
- inventory_consumed?: boolean | null | undefined;
43
- cancelled_by?: {
44
- _id: string;
45
- name: string;
46
- } | null | undefined;
47
- applied_to_doc_id?: import("mongoose").Types.ObjectId | null | undefined;
48
- inventory_restocked?: boolean | null | undefined;
49
- delivered_by?: {
50
- _id: string;
51
- name: string;
52
- } | null | undefined;
53
- returned_by?: {
54
- _id: string;
55
- name: string;
56
- } | null | undefined;
57
- delivered_at?: NativeDate | null | undefined;
58
- returned_at?: NativeDate | null | undefined;
59
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
60
- createdAt: NativeDate;
61
- updatedAt: NativeDate;
62
- } & {
63
- _id: import("mongoose").Types.ObjectId;
64
- createdAt_mins: number;
65
- createdAt: NativeDate;
66
- updatedAt: NativeDate;
67
- items: import("mongoose").Types.DocumentArray<{
68
- quantity: number;
69
- item_id: import("mongoose").Types.ObjectId;
70
- item_name: string;
71
- reason?: string | null | undefined;
72
- }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
73
- quantity: number;
74
- item_id: import("mongoose").Types.ObjectId;
75
- item_name: string;
76
- reason?: string | null | undefined;
77
- }> & {
78
- quantity: number;
79
- item_id: import("mongoose").Types.ObjectId;
80
- item_name: string;
81
- reason?: string | null | undefined;
82
- }>;
83
- status: import("../../constants").SALE_ORDER_DELIVERY_STATUS_ENUM | import("../../constants").SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
84
- warehouse_id: string;
85
- doc_kind: import("../../constants").SALE_ORDER_PHYSICAL_DOC_KIND_ENUM;
86
- sale_order_id: import("mongoose").Types.ObjectId;
87
- cancel_reason?: string | null | undefined;
88
- notes?: string | null | undefined;
89
- created_by?: {
90
- _id: string;
91
- name: string;
92
- } | null | undefined;
93
- cancelled_at?: NativeDate | null | undefined;
94
- inventory_consumed?: boolean | null | undefined;
95
- cancelled_by?: {
96
- _id: string;
97
- name: string;
98
- } | null | undefined;
99
- applied_to_doc_id?: import("mongoose").Types.ObjectId | null | undefined;
100
- inventory_restocked?: boolean | null | undefined;
101
- delivered_by?: {
102
- _id: string;
103
- name: string;
104
- } | null | undefined;
105
- returned_by?: {
106
- _id: string;
107
- name: string;
108
- } | null | undefined;
109
- delivered_at?: NativeDate | null | undefined;
110
- returned_at?: NativeDate | null | undefined;
111
- }>> & import("mongoose").FlatRecord<{
112
- createdAt: NativeDate;
113
- updatedAt: NativeDate;
114
- } & {
115
- _id: import("mongoose").Types.ObjectId;
116
- createdAt_mins: number;
117
- createdAt: NativeDate;
118
- updatedAt: NativeDate;
119
- items: import("mongoose").Types.DocumentArray<{
120
- quantity: number;
121
- item_id: import("mongoose").Types.ObjectId;
122
- item_name: string;
123
- reason?: string | null | undefined;
124
- }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
125
- quantity: number;
126
- item_id: import("mongoose").Types.ObjectId;
127
- item_name: string;
128
- reason?: string | null | undefined;
129
- }> & {
130
- quantity: number;
131
- item_id: import("mongoose").Types.ObjectId;
132
- item_name: string;
133
- reason?: string | null | undefined;
134
- }>;
135
- status: import("../../constants").SALE_ORDER_DELIVERY_STATUS_ENUM | import("../../constants").SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
136
- warehouse_id: string;
137
- doc_kind: import("../../constants").SALE_ORDER_PHYSICAL_DOC_KIND_ENUM;
138
- sale_order_id: import("mongoose").Types.ObjectId;
139
- cancel_reason?: string | null | undefined;
140
- notes?: string | null | undefined;
141
- created_by?: {
142
- _id: string;
143
- name: string;
144
- } | null | undefined;
145
- cancelled_at?: NativeDate | null | undefined;
146
- inventory_consumed?: boolean | null | undefined;
147
- cancelled_by?: {
148
- _id: string;
149
- name: string;
150
- } | null | undefined;
151
- applied_to_doc_id?: import("mongoose").Types.ObjectId | null | undefined;
152
- inventory_restocked?: boolean | null | undefined;
153
- delivered_by?: {
154
- _id: string;
155
- name: string;
156
- } | null | undefined;
157
- returned_by?: {
158
- _id: string;
159
- name: string;
160
- } | null | undefined;
161
- delivered_at?: NativeDate | null | undefined;
162
- returned_at?: NativeDate | null | undefined;
163
- }> & Required<{
164
- _id: import("mongoose").Types.ObjectId;
165
- }> & {
166
- __v: number;
167
- }>;