@managesome/eposmatic-toolkit 0.2.427 → 0.2.429

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 (127) hide show
  1. package/lib/schemas/models/applied_order_discounts.d.ts +80 -0
  2. package/lib/schemas/models/applied_order_discounts.js +106 -0
  3. package/lib/schemas/models/brands.d.ts +45 -0
  4. package/lib/schemas/models/brands.js +45 -0
  5. package/lib/schemas/models/categories.d.ts +60 -0
  6. package/lib/schemas/models/categories.js +67 -0
  7. package/lib/schemas/models/close_dates.js +2 -2
  8. package/lib/schemas/models/dinein_tables.d.ts +6 -6
  9. package/lib/schemas/models/dinein_tables_fingerprints.d.ts +65 -0
  10. package/lib/schemas/models/dinein_tables_fingerprints.js +85 -0
  11. package/lib/schemas/models/discounts.js +3 -3
  12. package/lib/schemas/models/expense_categories.d.ts +83 -0
  13. package/lib/schemas/models/expense_categories.js +64 -0
  14. package/lib/schemas/models/halfhalf_setup.js +3 -3
  15. package/lib/schemas/models/index.d.ts +23 -23
  16. package/lib/schemas/models/index.js +23 -23
  17. package/lib/schemas/models/inventories.d.ts +99 -0
  18. package/lib/schemas/models/inventories.js +87 -0
  19. package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +15 -15
  20. package/lib/schemas/models/items.d.ts +11269 -0
  21. package/lib/schemas/models/items.js +333 -0
  22. package/lib/schemas/models/menus.d.ts +941 -0
  23. package/lib/schemas/models/menus.js +69 -0
  24. package/lib/schemas/models/offers.js +3 -3
  25. package/lib/schemas/models/orders.d.ts +15437 -0
  26. package/lib/schemas/models/orders.js +891 -0
  27. package/lib/schemas/models/public_holidays.js +2 -2
  28. package/lib/schemas/models/purchase_order_receipts.d.ts +3 -3
  29. package/lib/schemas/models/purchase_order_receipts.js +2 -2
  30. package/lib/schemas/models/purchase_order_rfqs.d.ts +1959 -0
  31. package/lib/schemas/models/purchase_order_rfqs.js +328 -0
  32. package/lib/schemas/models/purchase_order_vendor_returns.d.ts +15 -15
  33. package/lib/schemas/models/purchase_order_vendor_returns.js +2 -2
  34. package/lib/schemas/models/purchase_orders.js +4 -4
  35. package/lib/schemas/models/riders.d.ts +65 -0
  36. package/lib/schemas/models/riders.js +74 -0
  37. package/lib/schemas/models/specials.js +3 -3
  38. package/lib/schemas/models/tenant_staffs.d.ts +932 -0
  39. package/lib/schemas/models/tenant_staffs.js +96 -0
  40. package/lib/schemas/models/tenants.d.ts +528 -0
  41. package/lib/schemas/models/tenants.js +755 -0
  42. package/lib/schemas/models/track_order_numbers.d.ts +413 -0
  43. package/lib/schemas/models/track_order_numbers.js +45 -0
  44. package/lib/schemas/models/void_purchase_order_items.js +2 -2
  45. package/lib/schemas/models/void_warehouse_invoice_items.d.ts +6 -6
  46. package/lib/schemas/models/void_warehouse_invoice_items.js +2 -2
  47. package/lib/schemas/models/wallets.d.ts +38 -0
  48. package/lib/schemas/models/wallets.js +37 -0
  49. package/lib/schemas/models/warehouse-activity-logs.js +2 -2
  50. package/lib/schemas/models/warehouse_communications.d.ts +228 -0
  51. package/lib/schemas/models/warehouse_communications.js +216 -0
  52. package/lib/schemas/models/warehouse_internal_movements.d.ts +33 -34
  53. package/lib/schemas/models/warehouse_internal_movements.js +2 -34
  54. package/lib/schemas/models/warehouse_invoices.js +2 -2
  55. package/lib/schemas/models/warehouse_items.js +2 -2
  56. package/lib/schemas/models/warehouse_sale_deliveries.d.ts +167 -0
  57. package/lib/schemas/models/warehouse_sale_deliveries.js +155 -0
  58. package/lib/schemas/models/warehouse_sale_invoices.d.ts +227 -0
  59. package/lib/schemas/models/warehouse_sale_invoices.js +206 -0
  60. package/lib/schemas/models/warehouse_sale_order_rfqs.d.ts +1938 -0
  61. package/lib/schemas/models/warehouse_sale_order_rfqs.js +309 -0
  62. package/lib/schemas/models/warehouse_sale_orders.d.ts +1943 -0
  63. package/lib/schemas/models/warehouse_sale_orders.js +324 -0
  64. package/lib/schemas/models/warehouse_staffs.d.ts +65 -0
  65. package/lib/schemas/models/warehouse_staffs.js +78 -0
  66. package/lib/schemas/models/warehouse_track_order_numbers.d.ts +50 -0
  67. package/lib/schemas/models/warehouse_track_order_numbers.js +52 -0
  68. package/lib/schemas/models/warehouse_vendors.d.ts +3 -3
  69. package/lib/schemas/models/warehouses.d.ts +162 -0
  70. package/lib/schemas/models/warehouses.js +222 -0
  71. package/lib/schemas/types/applied_order_discounts.d.ts +22 -0
  72. package/lib/schemas/types/applied_order_discounts.js +2 -0
  73. package/lib/schemas/types/brands.d.ts +32 -0
  74. package/lib/schemas/types/brands.js +2 -0
  75. package/lib/schemas/types/categories.d.ts +15 -0
  76. package/lib/schemas/types/categories.js +2 -0
  77. package/lib/schemas/types/deliveries.d.ts +1 -1
  78. package/lib/schemas/types/expense_categories.d.ts +20 -0
  79. package/lib/schemas/types/expense_categories.js +2 -0
  80. package/lib/schemas/types/expense_details.d.ts +1 -1
  81. package/lib/schemas/types/index.d.ts +22 -22
  82. package/lib/schemas/types/index.js +22 -22
  83. package/lib/schemas/types/inventories.d.ts +48 -0
  84. package/lib/schemas/types/inventories.js +2 -0
  85. package/lib/schemas/types/items.d.ts +89 -0
  86. package/lib/schemas/types/items.js +2 -0
  87. package/lib/schemas/types/menus.d.ts +17 -0
  88. package/lib/schemas/types/menus.js +2 -0
  89. package/lib/schemas/types/multi_tenants.d.ts +2 -2
  90. package/lib/schemas/types/orders.d.ts +242 -0
  91. package/lib/schemas/types/orders.js +2 -0
  92. package/lib/schemas/types/purchase_order_common.d.ts +1 -1
  93. package/lib/schemas/types/purchase_order_rfqs.d.ts +33 -0
  94. package/lib/schemas/types/purchase_order_rfqs.js +2 -0
  95. package/lib/schemas/types/purchase_orders.d.ts +1 -1
  96. package/lib/schemas/types/reservations.d.ts +1 -1
  97. package/lib/schemas/types/riders.d.ts +16 -0
  98. package/lib/schemas/types/riders.js +2 -0
  99. package/lib/schemas/types/sale_order_common.d.ts +1 -1
  100. package/lib/schemas/types/specials.d.ts +1 -1
  101. package/lib/schemas/types/tenant_staffs.d.ts +22 -0
  102. package/lib/schemas/types/tenant_staffs.js +2 -0
  103. package/lib/schemas/types/tenants.d.ts +205 -0
  104. package/lib/schemas/types/tenants.js +2 -0
  105. package/lib/schemas/types/track_order_numbers.d.ts +10 -0
  106. package/lib/schemas/types/track_order_numbers.js +2 -0
  107. package/lib/schemas/types/wallets.d.ts +7 -0
  108. package/lib/schemas/types/wallets.js +2 -0
  109. package/lib/schemas/types/warehouse_communications.d.ts +54 -0
  110. package/lib/schemas/types/warehouse_communications.js +2 -0
  111. package/lib/schemas/types/warehouse_internal_movements.d.ts +2 -2
  112. package/lib/schemas/types/warehouse_invoices.d.ts +1 -1
  113. package/lib/schemas/types/warehouse_sale_deliveries.d.ts +67 -0
  114. package/lib/schemas/types/warehouse_sale_deliveries.js +2 -0
  115. package/lib/schemas/types/warehouse_sale_invoices.d.ts +49 -0
  116. package/lib/schemas/types/warehouse_sale_invoices.js +2 -0
  117. package/lib/schemas/types/warehouse_sale_order_rfqs.d.ts +25 -0
  118. package/lib/schemas/types/warehouse_sale_order_rfqs.js +2 -0
  119. package/lib/schemas/types/warehouse_sale_orders.d.ts +30 -0
  120. package/lib/schemas/types/warehouse_sale_orders.js +2 -0
  121. package/lib/schemas/types/warehouse_staffs.d.ts +17 -0
  122. package/lib/schemas/types/warehouse_staffs.js +2 -0
  123. package/lib/schemas/types/warehouse_track_order_numbers.d.ts +11 -0
  124. package/lib/schemas/types/warehouse_track_order_numbers.js +2 -0
  125. package/lib/schemas/types/warehouses.d.ts +49 -0
  126. package/lib/schemas/types/warehouses.js +2 -0
  127. package/package.json +1 -1
@@ -0,0 +1,328 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PURCHASE_ORDER_RFQ_COLLECTION_NAME = exports.PurchaseOrderRFQSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ const warehouse_categories_1 = require("./warehouse_categories");
7
+ const warehouse_items_1 = require("./warehouse_items");
8
+ const warehouse_vendors_1 = require("./warehouse_vendors");
9
+ const warehouses_1 = require("./warehouses");
10
+ const StaffDetailsSchema = new mongoose_1.Schema({
11
+ staff_id: {
12
+ type: String,
13
+ required: true,
14
+ },
15
+ staff_name: {
16
+ type: String,
17
+ required: false,
18
+ },
19
+ staff_mobile: {
20
+ type: String,
21
+ required: false,
22
+ },
23
+ staff_email: {
24
+ type: String,
25
+ required: false,
26
+ },
27
+ }, { _id: false, minimize: false });
28
+ const PurchaseOrderRFQItemsSchema = new mongoose_1.Schema({
29
+ _id: {
30
+ type: mongoose_1.Schema.Types.ObjectId,
31
+ required: true,
32
+ immutable: true,
33
+ },
34
+ item_id: {
35
+ type: mongoose_1.Schema.Types.ObjectId,
36
+ required: true,
37
+ immutable: true,
38
+ ref: warehouse_items_1.WAREHOUSE_ITEMS_COLLECTION_NAME,
39
+ },
40
+ is_ready: {
41
+ type: Boolean,
42
+ required: false,
43
+ },
44
+ void_reason: {
45
+ type: String,
46
+ required: false,
47
+ },
48
+ name: {
49
+ type: String,
50
+ required: true,
51
+ },
52
+ quantity: {
53
+ type: Number,
54
+ min: 0,
55
+ required: true,
56
+ },
57
+ price: {
58
+ type: Number,
59
+ min: 0,
60
+ required: true,
61
+ },
62
+ subtotal: {
63
+ type: Number,
64
+ min: 0,
65
+ required: true,
66
+ },
67
+ _net_amount: {
68
+ type: Number,
69
+ min: 0,
70
+ required: true,
71
+ },
72
+ _gross_amount: {
73
+ type: Number,
74
+ min: 0,
75
+ required: true,
76
+ },
77
+ _gst_amount: {
78
+ type: Number,
79
+ min: 0,
80
+ required: true,
81
+ },
82
+ _discount_amount: {
83
+ type: Number,
84
+ min: 0,
85
+ required: true,
86
+ },
87
+ special_instructions: {
88
+ type: String,
89
+ required: false,
90
+ },
91
+ }, {
92
+ _id: false,
93
+ minimize: false,
94
+ });
95
+ const PurchaseOrderRFQCategoriesSchema = new mongoose_1.Schema({
96
+ category_id: {
97
+ type: mongoose_1.Schema.Types.ObjectId,
98
+ required: true,
99
+ immutable: true,
100
+ ref: warehouse_categories_1.WAREHOUSE_CATEGORY_COLLECTION_NAME,
101
+ },
102
+ name: {
103
+ type: String,
104
+ required: true,
105
+ },
106
+ items: {
107
+ type: [PurchaseOrderRFQItemsSchema],
108
+ default: [],
109
+ },
110
+ }, {
111
+ _id: false,
112
+ minimize: false,
113
+ });
114
+ const RequestedVendorEntrySchema = new mongoose_1.Schema({
115
+ vendor_id: {
116
+ type: mongoose_1.Schema.Types.ObjectId,
117
+ required: true,
118
+ ref: warehouse_vendors_1.WAREHOUSE_VENDORS_COLLECTION_NAME,
119
+ },
120
+ vendor_name: { type: String, required: false },
121
+ vendor_email: { type: String, required: false },
122
+ vendor_price: { type: Number, min: 0, required: false },
123
+ status: {
124
+ type: String,
125
+ enum: constants_1.ALL_RFQ_VENDOR_STATUS_NAMES,
126
+ default: constants_1.RFQ_VENDOR_STATUS_ENUM.PENDING,
127
+ },
128
+ }, { _id: false, minimize: false });
129
+ const PurchaseOrderRFQIterationSchema = new mongoose_1.Schema({
130
+ categories: {
131
+ type: [PurchaseOrderRFQCategoriesSchema],
132
+ required: true,
133
+ },
134
+ staff_details: {
135
+ type: StaffDetailsSchema,
136
+ required: true,
137
+ },
138
+ special_instructions: {
139
+ type: String,
140
+ required: false,
141
+ },
142
+ price: {
143
+ type: Number,
144
+ min: 0,
145
+ required: true,
146
+ },
147
+ amount_earned: {
148
+ type: Number,
149
+ min: 0,
150
+ required: true,
151
+ },
152
+ grand_total: {
153
+ type: Number,
154
+ min: 0,
155
+ required: true,
156
+ },
157
+ order_status: {
158
+ type: String,
159
+ enum: constants_1.ALL_PURCHASE_ORDER_RFQ_STATUS_NAMES,
160
+ required: true,
161
+ },
162
+ is_gst_inclusive: {
163
+ type: Boolean,
164
+ required: false,
165
+ },
166
+ gst: {
167
+ type: Number,
168
+ min: 0,
169
+ required: false,
170
+ },
171
+ gst_amount: {
172
+ type: Number,
173
+ min: 0,
174
+ required: false,
175
+ },
176
+ tax_number: {
177
+ type: String,
178
+ required: false,
179
+ },
180
+ updatedAt: {
181
+ type: mongoose_1.Schema.Types.Date,
182
+ required: true,
183
+ },
184
+ }, {
185
+ _id: false,
186
+ timestamps: false,
187
+ versionKey: false,
188
+ });
189
+ exports.PurchaseOrderRFQSchema = new mongoose_1.Schema({
190
+ _id: {
191
+ type: mongoose_1.Schema.Types.ObjectId,
192
+ required: true,
193
+ immutable: true,
194
+ },
195
+ warehouse_id: {
196
+ type: String,
197
+ required: true,
198
+ ref: warehouses_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
199
+ },
200
+ vendor_id: {
201
+ type: mongoose_1.Schema.Types.ObjectId,
202
+ required: false,
203
+ },
204
+ vendor_name: {
205
+ type: String,
206
+ required: false,
207
+ },
208
+ requested_vendors: {
209
+ type: Map,
210
+ of: RequestedVendorEntrySchema,
211
+ required: false,
212
+ },
213
+ order_number: {
214
+ type: Number,
215
+ min: 0,
216
+ required: false,
217
+ },
218
+ order_status: {
219
+ type: String,
220
+ enum: constants_1.ALL_PURCHASE_ORDER_RFQ_STATUS_NAMES,
221
+ required: true,
222
+ default: constants_1.PURCHASE_ORDER_RFQ_STATUS_ENUM.DRAFT,
223
+ },
224
+ categories: {
225
+ type: [PurchaseOrderRFQCategoriesSchema],
226
+ default: [],
227
+ },
228
+ iterations: {
229
+ type: [PurchaseOrderRFQIterationSchema],
230
+ default: [],
231
+ },
232
+ expected_deadline: {
233
+ type: String,
234
+ required: false,
235
+ },
236
+ payment_terms: {
237
+ type: Number,
238
+ min: 0,
239
+ default: 0,
240
+ },
241
+ special_instructions: {
242
+ type: String,
243
+ required: false,
244
+ },
245
+ delete_reason: {
246
+ type: String,
247
+ required: false,
248
+ },
249
+ cancel_reason: {
250
+ type: String,
251
+ required: false,
252
+ },
253
+ staff_details: {
254
+ type: StaffDetailsSchema,
255
+ required: true,
256
+ },
257
+ gst: {
258
+ type: Number,
259
+ min: 0,
260
+ required: false,
261
+ },
262
+ gst_amount: {
263
+ type: Number,
264
+ min: 0,
265
+ required: false,
266
+ },
267
+ is_gst_inclusive: {
268
+ type: Boolean,
269
+ required: false,
270
+ },
271
+ tax_number: {
272
+ type: String,
273
+ required: false,
274
+ },
275
+ is_deleted: {
276
+ type: Boolean,
277
+ default: false,
278
+ },
279
+ order_status_updated_at: {
280
+ type: mongoose_1.Schema.Types.Date,
281
+ required: true,
282
+ default: () => new Date(),
283
+ },
284
+ is_reopened: {
285
+ type: Boolean,
286
+ required: false,
287
+ },
288
+ price: {
289
+ type: Number,
290
+ min: 0,
291
+ required: true,
292
+ },
293
+ amount_earned: {
294
+ type: Number,
295
+ min: 0,
296
+ required: true,
297
+ },
298
+ grand_total: {
299
+ type: Number,
300
+ min: 0,
301
+ required: true,
302
+ },
303
+ createdAt_mins: {
304
+ type: Number,
305
+ required: true,
306
+ immutable: true,
307
+ default: () => {
308
+ const date = new Date();
309
+ return Math.floor(date.getHours() * 60 + date.getMinutes());
310
+ },
311
+ },
312
+ createdAt: {
313
+ type: mongoose_1.Schema.Types.Date,
314
+ required: true,
315
+ default: () => new Date(),
316
+ immutable: true,
317
+ },
318
+ updatedAt: {
319
+ type: mongoose_1.Schema.Types.Date,
320
+ required: true,
321
+ default: () => new Date(),
322
+ },
323
+ }, {
324
+ timestamps: true,
325
+ versionKey: false,
326
+ minimize: false,
327
+ });
328
+ exports.PURCHASE_ORDER_RFQ_COLLECTION_NAME = 'purchase_order_rfqs';
@@ -53,6 +53,8 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
53
53
  _id: string;
54
54
  name: string;
55
55
  } | null | undefined;
56
+ approved_at?: NativeDate | null | undefined;
57
+ dispatched_at?: NativeDate | null | undefined;
56
58
  cancelled_at?: NativeDate | null | undefined;
57
59
  approved_by?: {
58
60
  _id: string;
@@ -62,20 +64,18 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
62
64
  _id: string;
63
65
  name: string;
64
66
  } | null | undefined;
65
- vendor_confirmed_by?: {
67
+ cancelled_by?: {
66
68
  _id: string;
67
69
  name: string;
68
70
  } | null | undefined;
69
- completed_by?: {
71
+ vendor_confirmed_by?: {
70
72
  _id: string;
71
73
  name: string;
72
74
  } | null | undefined;
73
- cancelled_by?: {
75
+ completed_by?: {
74
76
  _id: string;
75
77
  name: string;
76
78
  } | null | undefined;
77
- approved_at?: NativeDate | null | undefined;
78
- dispatched_at?: NativeDate | null | undefined;
79
79
  vendor_confirmed_at?: NativeDate | null | undefined;
80
80
  completed_at?: NativeDate | null | undefined;
81
81
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
@@ -127,6 +127,8 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
127
127
  _id: string;
128
128
  name: string;
129
129
  } | null | undefined;
130
+ approved_at?: NativeDate | null | undefined;
131
+ dispatched_at?: NativeDate | null | undefined;
130
132
  cancelled_at?: NativeDate | null | undefined;
131
133
  approved_by?: {
132
134
  _id: string;
@@ -136,20 +138,18 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
136
138
  _id: string;
137
139
  name: string;
138
140
  } | null | undefined;
139
- vendor_confirmed_by?: {
141
+ cancelled_by?: {
140
142
  _id: string;
141
143
  name: string;
142
144
  } | null | undefined;
143
- completed_by?: {
145
+ vendor_confirmed_by?: {
144
146
  _id: string;
145
147
  name: string;
146
148
  } | null | undefined;
147
- cancelled_by?: {
149
+ completed_by?: {
148
150
  _id: string;
149
151
  name: string;
150
152
  } | null | undefined;
151
- approved_at?: NativeDate | null | undefined;
152
- dispatched_at?: NativeDate | null | undefined;
153
153
  vendor_confirmed_at?: NativeDate | null | undefined;
154
154
  completed_at?: NativeDate | null | undefined;
155
155
  }>> & import("mongoose").FlatRecord<{
@@ -201,6 +201,8 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
201
201
  _id: string;
202
202
  name: string;
203
203
  } | null | undefined;
204
+ approved_at?: NativeDate | null | undefined;
205
+ dispatched_at?: NativeDate | null | undefined;
204
206
  cancelled_at?: NativeDate | null | undefined;
205
207
  approved_by?: {
206
208
  _id: string;
@@ -210,20 +212,18 @@ export declare const PurchaseOrderVendorReturnsSchema: Schema<any, import("mongo
210
212
  _id: string;
211
213
  name: string;
212
214
  } | null | undefined;
213
- vendor_confirmed_by?: {
215
+ cancelled_by?: {
214
216
  _id: string;
215
217
  name: string;
216
218
  } | null | undefined;
217
- completed_by?: {
219
+ vendor_confirmed_by?: {
218
220
  _id: string;
219
221
  name: string;
220
222
  } | null | undefined;
221
- cancelled_by?: {
223
+ completed_by?: {
222
224
  _id: string;
223
225
  name: string;
224
226
  } | null | undefined;
225
- approved_at?: NativeDate | null | undefined;
226
- dispatched_at?: NativeDate | null | undefined;
227
227
  vendor_confirmed_at?: NativeDate | null | undefined;
228
228
  completed_at?: NativeDate | null | undefined;
229
229
  }> & Required<{
@@ -4,9 +4,9 @@ exports.PURCHASE_ORDER_VENDOR_RETURNS_COLLECTION_NAME = exports.PurchaseOrderVen
4
4
  const mongoose_1 = require("mongoose");
5
5
  const constants_1 = require("../../constants");
6
6
  const purchase_orders_1 = require("./purchase_orders");
7
- const warehouse_1 = require("./warehouse");
8
7
  const warehouse_items_1 = require("./warehouse_items");
9
8
  const warehouse_vendors_1 = require("./warehouse_vendors");
9
+ const warehouses_1 = require("./warehouses");
10
10
  const PurchaseOrderVendorReturnActorSchema = new mongoose_1.Schema({
11
11
  _id: {
12
12
  type: String,
@@ -71,7 +71,7 @@ exports.PurchaseOrderVendorReturnsSchema = new mongoose_1.Schema({
71
71
  warehouse_id: {
72
72
  type: String,
73
73
  required: true,
74
- ref: warehouse_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
74
+ ref: warehouses_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
75
75
  },
76
76
  purchase_order_id: {
77
77
  type: mongoose_1.Schema.Types.ObjectId,
@@ -4,11 +4,11 @@ exports.PURCHASE_ORDER_COLLECTION_NAME = exports.PurchaseOrderSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const constants_1 = require("../../constants");
6
6
  const common_models_1 = require("./common-models");
7
- const purchase_order_rfq_1 = require("./purchase_order_rfq");
7
+ const purchase_order_rfqs_1 = require("./purchase_order_rfqs");
8
8
  const warehouse_categories_1 = require("./warehouse_categories");
9
9
  const warehouse_items_1 = require("./warehouse_items");
10
- const warehouse_1 = require("./warehouse");
11
10
  const warehouse_vendors_1 = require("./warehouse_vendors");
11
+ const warehouses_1 = require("./warehouses");
12
12
  const StaffDetailsSchema = new mongoose_1.Schema({
13
13
  staff_id: {
14
14
  type: String,
@@ -183,7 +183,7 @@ exports.PurchaseOrderSchema = new mongoose_1.Schema({
183
183
  warehouse_id: {
184
184
  type: String,
185
185
  required: true,
186
- ref: warehouse_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
186
+ ref: warehouses_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
187
187
  },
188
188
  vendor_id: {
189
189
  type: mongoose_1.Schema.Types.ObjectId,
@@ -197,7 +197,7 @@ exports.PurchaseOrderSchema = new mongoose_1.Schema({
197
197
  rfq_id: {
198
198
  type: mongoose_1.Schema.Types.ObjectId,
199
199
  required: false,
200
- ref: purchase_order_rfq_1.PURCHASE_ORDER_RFQ_COLLECTION_NAME,
200
+ ref: purchase_order_rfqs_1.PURCHASE_ORDER_RFQ_COLLECTION_NAME,
201
201
  },
202
202
  categories: {
203
203
  type: [CatergoriesSchema],
@@ -0,0 +1,65 @@
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";
@@ -0,0 +1,74 @@
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';
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SPECIAL_COLLECTION_NAME = exports.SpecialsSchema = exports.SpecialItemSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const common_models_1 = require("./common-models");
6
- const item_1 = require("./item");
6
+ const items_1 = require("./items");
7
7
  exports.SpecialItemSchema = new mongoose_1.Schema({
8
8
  item_id: {
9
9
  type: mongoose_1.Schema.Types.ObjectId,
@@ -78,7 +78,7 @@ exports.SpecialsSchema = new mongoose_1.Schema({
78
78
  required: true,
79
79
  },
80
80
  included_platforms: {
81
- type: [item_1.PlatformsSchema],
81
+ type: [items_1.PlatformsSchema],
82
82
  required: true,
83
83
  min: 1,
84
84
  },
@@ -119,7 +119,7 @@ exports.SpecialsSchema = new mongoose_1.Schema({
119
119
  default: false,
120
120
  },
121
121
  item_special_hours: {
122
- type: [item_1.SpecialHoursSchema],
122
+ type: [items_1.SpecialHoursSchema],
123
123
  default: null,
124
124
  },
125
125
  modifier_specials: {