@managesome/eposmatic-toolkit 0.2.427 → 0.2.430

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 (135) hide show
  1. package/lib/helpers/order/generate-purchase-order-rfq.d.ts +3 -0
  2. package/lib/helpers/order/generate-purchase-order-rfq.js +64 -0
  3. package/lib/helpers/order/index.d.ts +1 -0
  4. package/lib/helpers/order/index.js +1 -0
  5. package/lib/helpers/store/index.d.ts +1 -0
  6. package/lib/helpers/store/index.js +1 -0
  7. package/lib/helpers/store/purchase-order-rfq-cart-actions.d.ts +19 -0
  8. package/lib/helpers/store/purchase-order-rfq-cart-actions.js +373 -0
  9. package/lib/schemas/models/applied_order_discounts.d.ts +80 -0
  10. package/lib/schemas/models/applied_order_discounts.js +106 -0
  11. package/lib/schemas/models/brands.d.ts +45 -0
  12. package/lib/schemas/models/brands.js +45 -0
  13. package/lib/schemas/models/categories.d.ts +60 -0
  14. package/lib/schemas/models/categories.js +67 -0
  15. package/lib/schemas/models/close_dates.js +2 -2
  16. package/lib/schemas/models/dinein_tables.d.ts +6 -6
  17. package/lib/schemas/models/dinein_tables_fingerprints.d.ts +65 -0
  18. package/lib/schemas/models/dinein_tables_fingerprints.js +85 -0
  19. package/lib/schemas/models/discounts.js +3 -3
  20. package/lib/schemas/models/expense_categories.d.ts +83 -0
  21. package/lib/schemas/models/expense_categories.js +64 -0
  22. package/lib/schemas/models/halfhalf_setup.js +3 -3
  23. package/lib/schemas/models/index.d.ts +23 -23
  24. package/lib/schemas/models/index.js +23 -23
  25. package/lib/schemas/models/inventories.d.ts +99 -0
  26. package/lib/schemas/models/inventories.js +87 -0
  27. package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +15 -15
  28. package/lib/schemas/models/items.d.ts +11269 -0
  29. package/lib/schemas/models/items.js +333 -0
  30. package/lib/schemas/models/menus.d.ts +941 -0
  31. package/lib/schemas/models/menus.js +69 -0
  32. package/lib/schemas/models/offers.js +3 -3
  33. package/lib/schemas/models/orders.d.ts +15437 -0
  34. package/lib/schemas/models/orders.js +891 -0
  35. package/lib/schemas/models/public_holidays.js +2 -2
  36. package/lib/schemas/models/purchase_order_receipts.d.ts +3 -3
  37. package/lib/schemas/models/purchase_order_receipts.js +2 -2
  38. package/lib/schemas/models/purchase_order_rfqs.d.ts +1959 -0
  39. package/lib/schemas/models/purchase_order_rfqs.js +328 -0
  40. package/lib/schemas/models/purchase_order_vendor_returns.d.ts +15 -15
  41. package/lib/schemas/models/purchase_order_vendor_returns.js +2 -2
  42. package/lib/schemas/models/purchase_orders.js +4 -4
  43. package/lib/schemas/models/riders.d.ts +65 -0
  44. package/lib/schemas/models/riders.js +74 -0
  45. package/lib/schemas/models/specials.js +3 -3
  46. package/lib/schemas/models/tenant_staffs.d.ts +932 -0
  47. package/lib/schemas/models/tenant_staffs.js +96 -0
  48. package/lib/schemas/models/tenants.d.ts +528 -0
  49. package/lib/schemas/models/tenants.js +755 -0
  50. package/lib/schemas/models/track_order_numbers.d.ts +413 -0
  51. package/lib/schemas/models/track_order_numbers.js +45 -0
  52. package/lib/schemas/models/void_purchase_order_items.js +2 -2
  53. package/lib/schemas/models/void_warehouse_invoice_items.d.ts +6 -6
  54. package/lib/schemas/models/void_warehouse_invoice_items.js +2 -2
  55. package/lib/schemas/models/wallets.d.ts +38 -0
  56. package/lib/schemas/models/wallets.js +37 -0
  57. package/lib/schemas/models/warehouse-activity-logs.js +2 -2
  58. package/lib/schemas/models/warehouse_communications.d.ts +228 -0
  59. package/lib/schemas/models/warehouse_communications.js +216 -0
  60. package/lib/schemas/models/warehouse_internal_movements.d.ts +33 -34
  61. package/lib/schemas/models/warehouse_internal_movements.js +2 -34
  62. package/lib/schemas/models/warehouse_invoices.js +2 -2
  63. package/lib/schemas/models/warehouse_items.js +2 -2
  64. package/lib/schemas/models/warehouse_sale_deliveries.d.ts +167 -0
  65. package/lib/schemas/models/warehouse_sale_deliveries.js +155 -0
  66. package/lib/schemas/models/warehouse_sale_invoices.d.ts +227 -0
  67. package/lib/schemas/models/warehouse_sale_invoices.js +206 -0
  68. package/lib/schemas/models/warehouse_sale_order_rfqs.d.ts +1938 -0
  69. package/lib/schemas/models/warehouse_sale_order_rfqs.js +309 -0
  70. package/lib/schemas/models/warehouse_sale_orders.d.ts +1943 -0
  71. package/lib/schemas/models/warehouse_sale_orders.js +324 -0
  72. package/lib/schemas/models/warehouse_staffs.d.ts +65 -0
  73. package/lib/schemas/models/warehouse_staffs.js +78 -0
  74. package/lib/schemas/models/warehouse_track_order_numbers.d.ts +50 -0
  75. package/lib/schemas/models/warehouse_track_order_numbers.js +52 -0
  76. package/lib/schemas/models/warehouse_vendors.d.ts +3 -3
  77. package/lib/schemas/models/warehouses.d.ts +162 -0
  78. package/lib/schemas/models/warehouses.js +222 -0
  79. package/lib/schemas/types/applied_order_discounts.d.ts +22 -0
  80. package/lib/schemas/types/applied_order_discounts.js +2 -0
  81. package/lib/schemas/types/brands.d.ts +32 -0
  82. package/lib/schemas/types/brands.js +2 -0
  83. package/lib/schemas/types/categories.d.ts +15 -0
  84. package/lib/schemas/types/categories.js +2 -0
  85. package/lib/schemas/types/deliveries.d.ts +1 -1
  86. package/lib/schemas/types/expense_categories.d.ts +20 -0
  87. package/lib/schemas/types/expense_categories.js +2 -0
  88. package/lib/schemas/types/expense_details.d.ts +1 -1
  89. package/lib/schemas/types/index.d.ts +22 -22
  90. package/lib/schemas/types/index.js +22 -22
  91. package/lib/schemas/types/inventories.d.ts +48 -0
  92. package/lib/schemas/types/inventories.js +2 -0
  93. package/lib/schemas/types/items.d.ts +89 -0
  94. package/lib/schemas/types/items.js +2 -0
  95. package/lib/schemas/types/menus.d.ts +17 -0
  96. package/lib/schemas/types/menus.js +2 -0
  97. package/lib/schemas/types/multi_tenants.d.ts +2 -2
  98. package/lib/schemas/types/orders.d.ts +242 -0
  99. package/lib/schemas/types/orders.js +2 -0
  100. package/lib/schemas/types/purchase_order_common.d.ts +1 -1
  101. package/lib/schemas/types/purchase_order_rfqs.d.ts +33 -0
  102. package/lib/schemas/types/purchase_order_rfqs.js +2 -0
  103. package/lib/schemas/types/purchase_orders.d.ts +1 -1
  104. package/lib/schemas/types/reservations.d.ts +1 -1
  105. package/lib/schemas/types/riders.d.ts +16 -0
  106. package/lib/schemas/types/riders.js +2 -0
  107. package/lib/schemas/types/sale_order_common.d.ts +1 -1
  108. package/lib/schemas/types/specials.d.ts +1 -1
  109. package/lib/schemas/types/tenant_staffs.d.ts +22 -0
  110. package/lib/schemas/types/tenant_staffs.js +2 -0
  111. package/lib/schemas/types/tenants.d.ts +205 -0
  112. package/lib/schemas/types/tenants.js +2 -0
  113. package/lib/schemas/types/track_order_numbers.d.ts +10 -0
  114. package/lib/schemas/types/track_order_numbers.js +2 -0
  115. package/lib/schemas/types/wallets.d.ts +7 -0
  116. package/lib/schemas/types/wallets.js +2 -0
  117. package/lib/schemas/types/warehouse_communications.d.ts +54 -0
  118. package/lib/schemas/types/warehouse_communications.js +2 -0
  119. package/lib/schemas/types/warehouse_internal_movements.d.ts +2 -2
  120. package/lib/schemas/types/warehouse_invoices.d.ts +1 -1
  121. package/lib/schemas/types/warehouse_sale_deliveries.d.ts +67 -0
  122. package/lib/schemas/types/warehouse_sale_deliveries.js +2 -0
  123. package/lib/schemas/types/warehouse_sale_invoices.d.ts +49 -0
  124. package/lib/schemas/types/warehouse_sale_invoices.js +2 -0
  125. package/lib/schemas/types/warehouse_sale_order_rfqs.d.ts +25 -0
  126. package/lib/schemas/types/warehouse_sale_order_rfqs.js +2 -0
  127. package/lib/schemas/types/warehouse_sale_orders.d.ts +30 -0
  128. package/lib/schemas/types/warehouse_sale_orders.js +2 -0
  129. package/lib/schemas/types/warehouse_staffs.d.ts +17 -0
  130. package/lib/schemas/types/warehouse_staffs.js +2 -0
  131. package/lib/schemas/types/warehouse_track_order_numbers.d.ts +11 -0
  132. package/lib/schemas/types/warehouse_track_order_numbers.js +2 -0
  133. package/lib/schemas/types/warehouses.d.ts +49 -0
  134. package/lib/schemas/types/warehouses.js +2 -0
  135. package/package.json +1 -1
@@ -0,0 +1,755 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TENANTS_COLLECTION_NAME = exports.TenantSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ const items_1 = require("./items");
7
+ const OrderStatusSchema = { type: String, enum: constants_1.ALL_ORDER_STATUS_NAMES };
8
+ const RatingTypeSchema = { type: String, enum: constants_1.ALL_RATING_TYPES };
9
+ const WebStopTakingOrdersSchema = new mongoose_1.Schema({
10
+ order_types: { type: [String], enum: constants_1.ALL_ORDER_TYPE_NAMES, required: true, default: [] },
11
+ date: { type: mongoose_1.Schema.Types.Date, required: true },
12
+ }, {
13
+ _id: false,
14
+ minimize: false,
15
+ });
16
+ exports.TenantSchema = new mongoose_1.Schema({
17
+ _id: {
18
+ type: String,
19
+ required: true,
20
+ immutable: true,
21
+ },
22
+ brand_id: {
23
+ type: String,
24
+ required: true,
25
+ immutable: true,
26
+ ref: 'brands',
27
+ },
28
+ provider_id: {
29
+ type: String,
30
+ required: true,
31
+ immutable: true,
32
+ ref: 'providers',
33
+ },
34
+ name: {
35
+ type: String,
36
+ required: true,
37
+ },
38
+ image_url: {
39
+ type: String,
40
+ required: true,
41
+ },
42
+ active: {
43
+ type: Boolean,
44
+ default: 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
+ coordinates: {
87
+ type: [Number, Number],
88
+ default: [0, 0],
89
+ },
90
+ city: {
91
+ type: String,
92
+ default: '',
93
+ },
94
+ google_review_link: {
95
+ type: String,
96
+ default: null,
97
+ },
98
+ takeaway_time: {
99
+ type: Number,
100
+ // half an hour in milliseconds
101
+ default: 1800000,
102
+ },
103
+ delivery_time: {
104
+ type: Number,
105
+ default: 1800000,
106
+ },
107
+ enable_inventory: {
108
+ type: Boolean,
109
+ default: false,
110
+ },
111
+ pay_first_for_dine_in: {
112
+ type: Boolean,
113
+ default: false,
114
+ },
115
+ closed_store_message: {
116
+ type: String,
117
+ default: null,
118
+ },
119
+ break_time_message: {
120
+ type: String,
121
+ default: null,
122
+ },
123
+ announcement_message: {
124
+ type: String,
125
+ default: null,
126
+ },
127
+ review_emails: {
128
+ type: [String],
129
+ default: [],
130
+ },
131
+ review_phone_numbers: {
132
+ type: [String],
133
+ default: [],
134
+ },
135
+ enabled_review_platforms: {
136
+ type: [items_1.PlatformsSchema],
137
+ default: [],
138
+ },
139
+ payment_report_emails: {
140
+ type: [String],
141
+ default: [],
142
+ },
143
+ pos_enable_internal_auth: {
144
+ type: Boolean,
145
+ default: false,
146
+ },
147
+ pos_enable_takeaway: {
148
+ type: Boolean,
149
+ default: true,
150
+ },
151
+ pos_enable_delivery: {
152
+ type: Boolean,
153
+ default: true,
154
+ },
155
+ pos_enable_dine_in: {
156
+ type: Boolean,
157
+ default: true,
158
+ },
159
+ pos_enable_drive_thru: {
160
+ type: Boolean,
161
+ default: false,
162
+ },
163
+ pos_enable_kiosk: {
164
+ type: Boolean,
165
+ default: false,
166
+ },
167
+ pos_pre_ordering_days: {
168
+ type: Number,
169
+ required: false,
170
+ },
171
+ pos_opt_in_for_holiday_surcharge: {
172
+ type: Boolean,
173
+ default: false,
174
+ },
175
+ pos_holiday_surcharge: {
176
+ type: Number,
177
+ default: 0,
178
+ },
179
+ pos_enable_card_payments: {
180
+ type: Boolean,
181
+ default: true,
182
+ },
183
+ pos_min_takeaway_order_value: {
184
+ type: Number,
185
+ default: 0,
186
+ },
187
+ pos_end_seating_when_order_paid_off: {
188
+ type: Boolean,
189
+ default: true,
190
+ },
191
+ pos_accedental_touch_protection_enabled: {
192
+ type: Boolean,
193
+ required: false,
194
+ },
195
+ web_charge_customer_for_online_processing: {
196
+ type: Boolean,
197
+ default: true,
198
+ },
199
+ web_allow_ordering_till_closing_time: {
200
+ type: Boolean,
201
+ default: false,
202
+ },
203
+ web_enable_takeaway: {
204
+ type: Boolean,
205
+ default: true,
206
+ },
207
+ web_enable_delivery: {
208
+ type: Boolean,
209
+ default: true,
210
+ },
211
+ web_enable_dine_in: {
212
+ type: Boolean,
213
+ default: true,
214
+ },
215
+ web_pre_ordering_days: {
216
+ type: Number,
217
+ required: false,
218
+ },
219
+ max_preorder_delivery_minutes: {
220
+ type: Number,
221
+ required: false,
222
+ },
223
+ max_preorder_takeaway_minutes: {
224
+ type: Number,
225
+ required: false,
226
+ },
227
+ default_prep_minutes: {
228
+ type: Number,
229
+ required: true,
230
+ default: 15,
231
+ },
232
+ web_opt_in_for_holiday_surcharge: {
233
+ type: Boolean,
234
+ default: false,
235
+ },
236
+ web_holiday_surcharge: {
237
+ type: Number,
238
+ default: 0,
239
+ },
240
+ web_enable_cash_payments_takeaway: {
241
+ type: Boolean,
242
+ default: true,
243
+ },
244
+ web_enable_cash_payments_delivery: {
245
+ type: Boolean,
246
+ default: true,
247
+ },
248
+ web_enable_cash_payments_dine_in: {
249
+ type: Boolean,
250
+ default: true,
251
+ },
252
+ web_min_takeaway_order_value: {
253
+ type: Number,
254
+ default: 0,
255
+ },
256
+ web_max_cash_order_value: {
257
+ type: Number,
258
+ default: 0,
259
+ },
260
+ web_stop_taking_orders: {
261
+ type: WebStopTakingOrdersSchema,
262
+ default: null,
263
+ },
264
+ web_unpaid_payment_types: {
265
+ type: [String],
266
+ enum: constants_1.ALL_WEB_UNPAID_PAYMENT_TYPES,
267
+ required: true,
268
+ default: [
269
+ constants_1.WEB_UNPAID_PAYMENT_TYPE_ENUM.CASH_ON_DELIVERY,
270
+ constants_1.WEB_UNPAID_PAYMENT_TYPE_ENUM.CARD_ON_DELIVERY,
271
+ constants_1.WEB_UNPAID_PAYMENT_TYPE_ENUM.CASH_ON_TAKEAWAY,
272
+ constants_1.WEB_UNPAID_PAYMENT_TYPE_ENUM.CARD_ON_TAKEAWAY,
273
+ ],
274
+ },
275
+ web_enable_pre_ordering: {
276
+ type: Boolean,
277
+ required: false,
278
+ },
279
+ web_pre_ordering_visibility_minutes: {
280
+ type: Number,
281
+ required: false,
282
+ },
283
+ opt_in_for_radius_based_delivery: {
284
+ type: Boolean,
285
+ default: false,
286
+ },
287
+ min_delivery_order_value: {
288
+ type: Number,
289
+ default: 0,
290
+ },
291
+ delivery_radius: {
292
+ type: Number,
293
+ default: 0,
294
+ },
295
+ delivery_min_cost: {
296
+ type: Number,
297
+ default: 0,
298
+ },
299
+ delivery_min_cost_distance_mtrs: {
300
+ type: Number,
301
+ default: 0,
302
+ },
303
+ delivery_cost_per_meter: {
304
+ type: Number,
305
+ default: 0,
306
+ },
307
+ delivery_free_over: {
308
+ type: Number,
309
+ default: 0,
310
+ },
311
+ delivery_order_value_per_meter: {
312
+ type: Number,
313
+ default: 0,
314
+ },
315
+ static_delivery_cost_multiplier: {
316
+ type: Number,
317
+ default: 0,
318
+ },
319
+ rider_revenue_type: {
320
+ type: String,
321
+ enum: constants_1.ALL_RIDER_FEE_TYPES,
322
+ default: constants_1.RIDER_FEE_TYPE_ENUM.DELIVERY_CHARGES_FULL,
323
+ },
324
+ rider_revenue_per_meter: {
325
+ type: Number,
326
+ default: 0,
327
+ },
328
+ static_rider_revenue_multiplier: {
329
+ type: Number,
330
+ default: 0,
331
+ },
332
+ min_service_fee_order_value: {
333
+ type: Number,
334
+ default: 0,
335
+ },
336
+ packaging_charges: {
337
+ type: Number,
338
+ default: 0,
339
+ },
340
+ packaging_charges_free_over: {
341
+ type: Number,
342
+ default: 0,
343
+ },
344
+ min_packaging_charges_order_value: {
345
+ type: Number,
346
+ default: 0,
347
+ },
348
+ cash_in_hand_limit: {
349
+ type: Number,
350
+ default: 0,
351
+ },
352
+ rider_pickup_food_image_mandatory: {
353
+ type: Boolean,
354
+ required: false,
355
+ },
356
+ rider_dropoff_food_image_mandatory: {
357
+ type: Boolean,
358
+ required: false,
359
+ },
360
+ disable_reason_for_discount: {
361
+ type: Boolean,
362
+ required: false,
363
+ },
364
+ brand_color: {
365
+ type: String,
366
+ default: '#5B0888FF',
367
+ },
368
+ restaurant_address: {
369
+ type: String,
370
+ default: '',
371
+ },
372
+ public_business_name: {
373
+ type: String,
374
+ default: '',
375
+ },
376
+ support_email: {
377
+ type: String,
378
+ default: '',
379
+ },
380
+ business_website: {
381
+ type: String,
382
+ default: null,
383
+ },
384
+ staff_ordering_domain: {
385
+ type: String,
386
+ default: null,
387
+ },
388
+ business_type: {
389
+ type: String,
390
+ default: '',
391
+ },
392
+ tax_business_number: {
393
+ type: String,
394
+ default: '',
395
+ },
396
+ track_order_number_by: {
397
+ type: String,
398
+ enum: constants_1.ALL_TRACK_ORDER_NUMBER_TYPES,
399
+ default: constants_1.TRACK_ORDER_NUMBER_ENUM.DAY,
400
+ },
401
+ order_number_grouping_type: {
402
+ type: String,
403
+ enum: constants_1.ALL_ORDER_NUMBER_GROUPING_TYPES,
404
+ default: constants_1.ORDER_NUMBER_GROUPING_TYPE_ENUM.ORDER_TYPE,
405
+ },
406
+ public_phone_numbers: {
407
+ type: [String],
408
+ default: [],
409
+ },
410
+ web_show_featured_items: {
411
+ type: Boolean,
412
+ default: false,
413
+ },
414
+ featured_category_name: {
415
+ type: String,
416
+ default: 'Popular',
417
+ },
418
+ operational_time_zone_offset_gmt: {
419
+ type: Number,
420
+ min: -12,
421
+ max: 14,
422
+ default: 0,
423
+ },
424
+ operational_start_time: {
425
+ type: Number,
426
+ min: 0,
427
+ max: 1440,
428
+ default: 360,
429
+ },
430
+ operational_end_time: {
431
+ type: Number,
432
+ min: 0,
433
+ max: 1440,
434
+ default: 360,
435
+ },
436
+ card_gst: {
437
+ type: Number,
438
+ default: 0,
439
+ },
440
+ cash_gst: {
441
+ type: Number,
442
+ default: 0,
443
+ },
444
+ default_gst_type: {
445
+ type: String,
446
+ enum: constants_1.ALL_GST_TYPES,
447
+ default: constants_1.GST_TYPE_ENUM.CARD,
448
+ },
449
+ web_design_type: {
450
+ type: String,
451
+ enum: constants_1.ALL_ONLINE_ORDERING_DESIGN_TYPES,
452
+ default: constants_1.ONLINE_ORDERING_DESIGN_TYPE_ENUM.CLASSIC,
453
+ },
454
+ web_cover_image: {
455
+ type: String,
456
+ default: '',
457
+ },
458
+ web_favicon: {
459
+ type: String,
460
+ default: '',
461
+ },
462
+ store_description: {
463
+ type: String,
464
+ default: '',
465
+ },
466
+ // ====><====
467
+ dinein_service_fee: {
468
+ type: Number,
469
+ default: 0,
470
+ },
471
+ card_processing_provider: {
472
+ type: String,
473
+ enum: constants_1.ALL_CARD_PROCESSING_PROVIDERS,
474
+ required: false,
475
+ },
476
+ card_processing_account_id: {
477
+ type: String,
478
+ required: false,
479
+ },
480
+ _card_processing_account_token: {
481
+ type: String,
482
+ required: false,
483
+ },
484
+ sms_processing_provider: {
485
+ type: String,
486
+ enum: constants_1.ALL_SMS_PROCESSING_PROVIDERS,
487
+ required: false,
488
+ },
489
+ sms_processing_account_id: {
490
+ type: String,
491
+ required: false,
492
+ },
493
+ email_processing_provider: {
494
+ type: String,
495
+ enum: constants_1.ALL_EMAIL_PROCESSING_PROVIDERS,
496
+ required: false,
497
+ },
498
+ email_processing_account_id: {
499
+ type: String,
500
+ required: false,
501
+ },
502
+ // ====><====
503
+ send_sms_on_order_status: {
504
+ type: [OrderStatusSchema],
505
+ default: [constants_1.ORDER_STATUS_ENUM.CANCELLED],
506
+ },
507
+ send_email_on_order_status: {
508
+ type: [OrderStatusSchema],
509
+ default: [
510
+ constants_1.ORDER_STATUS_ENUM.PLACED,
511
+ constants_1.ORDER_STATUS_ENUM.OUT_FOR_DELIVERY,
512
+ constants_1.ORDER_STATUS_ENUM.OUT_FOR_DELIVERY,
513
+ constants_1.ORDER_STATUS_ENUM.CANCELLED,
514
+ ],
515
+ },
516
+ auto_sms_platforms: {
517
+ type: [items_1.PlatformsSchema],
518
+ default: [
519
+ constants_1.PLATFORMS_ENUM.WEB_DELIVERY,
520
+ constants_1.PLATFORMS_ENUM.WEB_TAKE_AWAY,
521
+ constants_1.PLATFORMS_ENUM.APP_DELIVERY,
522
+ constants_1.PLATFORMS_ENUM.APP_TAKE_AWAY,
523
+ ],
524
+ },
525
+ auto_email_platforms: {
526
+ type: [items_1.PlatformsSchema],
527
+ default: [
528
+ constants_1.PLATFORMS_ENUM.WEB_DELIVERY,
529
+ constants_1.PLATFORMS_ENUM.WEB_TAKE_AWAY,
530
+ constants_1.PLATFORMS_ENUM.APP_DELIVERY,
531
+ constants_1.PLATFORMS_ENUM.APP_TAKE_AWAY,
532
+ constants_1.PLATFORMS_ENUM.POS_DELIVERY,
533
+ ],
534
+ },
535
+ alert_phone_numbers: {
536
+ type: [String],
537
+ default: [],
538
+ },
539
+ alert_email_addresses: {
540
+ type: [String],
541
+ default: [],
542
+ },
543
+ alert_when: {
544
+ type: [String],
545
+ enum: constants_1.ALL_ALERT_NOTIFICATIONS_TYPES,
546
+ default: [],
547
+ },
548
+ // ====><====
549
+ auto_accept_order_for_platforms: {
550
+ type: [items_1.PlatformsSchema],
551
+ default: [
552
+ constants_1.PLATFORMS_ENUM.POS_DELIVERY,
553
+ constants_1.PLATFORMS_ENUM.POS_DINE_IN,
554
+ constants_1.PLATFORMS_ENUM.POS_TAKE_AWAY,
555
+ constants_1.PLATFORMS_ENUM.POS_DELIVERY,
556
+ constants_1.PLATFORMS_ENUM.POS_DINE_IN,
557
+ constants_1.PLATFORMS_ENUM.POS_WALK_IN,
558
+ ],
559
+ },
560
+ custom_payment_types: {
561
+ type: [String],
562
+ default: [],
563
+ },
564
+ expense_payment_types: {
565
+ type: [String],
566
+ default: [],
567
+ },
568
+ takeaway_is_pickup: {
569
+ type: Boolean,
570
+ required: false,
571
+ },
572
+ reservation_enabled: {
573
+ type: Boolean,
574
+ default: false,
575
+ },
576
+ ms_clarity_id: {
577
+ type: String,
578
+ required: false,
579
+ },
580
+ fb_pixel_id: {
581
+ type: String,
582
+ required: false,
583
+ },
584
+ gtm_id: {
585
+ type: String,
586
+ required: false,
587
+ },
588
+ tax_invoice_provider: {
589
+ type: String,
590
+ enum: constants_1.ALL_TAX_INVOICE_PROVIDERS,
591
+ required: false,
592
+ },
593
+ tax_invoice_generation_id: {
594
+ type: String,
595
+ required: false,
596
+ },
597
+ _tax_invoice_generation_token: {
598
+ type: String,
599
+ required: false,
600
+ },
601
+ web_hide_order_total_for_staff: {
602
+ type: Boolean,
603
+ required: false,
604
+ },
605
+ is_service_fee_percentage: {
606
+ type: Boolean,
607
+ required: false,
608
+ },
609
+ is_service_fee_taxable: {
610
+ type: Boolean,
611
+ required: false,
612
+ },
613
+ is_surcharge_percentage: {
614
+ type: Boolean,
615
+ required: false,
616
+ },
617
+ is_surcharge_taxable: {
618
+ type: Boolean,
619
+ required: false,
620
+ },
621
+ exclude_discount_from_gst: {
622
+ type: Boolean,
623
+ required: false,
624
+ },
625
+ apply_service_fee_on_original_price: {
626
+ type: Boolean,
627
+ required: false,
628
+ },
629
+ is_gst_inclusive: {
630
+ type: Boolean,
631
+ required: false,
632
+ },
633
+ apply_tax_on_complimentary_payment: {
634
+ type: Boolean,
635
+ required: false,
636
+ },
637
+ web_auth_type: {
638
+ type: String,
639
+ enum: constants_1.ALL_WEB_AUTH_TYPES,
640
+ required: false,
641
+ },
642
+ delivery_areas_search_type: {
643
+ type: String,
644
+ enum: constants_1.ALL_DELIVERY_AREAS_SEARCH_TYPES,
645
+ required: false,
646
+ },
647
+ integrations: {
648
+ type: [String],
649
+ enum: constants_1.ALL_INTEGRATIONS,
650
+ default: [],
651
+ },
652
+ exempt_gst_for_platforms: {
653
+ type: [items_1.PlatformsSchema],
654
+ default: [],
655
+ },
656
+ edit_settled_order: {
657
+ type: Boolean,
658
+ required: false,
659
+ },
660
+ omit_offers_for_anonymous: {
661
+ type: Boolean,
662
+ required: false,
663
+ },
664
+ playstore_url: {
665
+ type: String,
666
+ required: false,
667
+ },
668
+ appstore_url: {
669
+ type: String,
670
+ required: false,
671
+ },
672
+ dark_mode: {
673
+ type: Boolean,
674
+ required: false,
675
+ },
676
+ hide_gst_value: {
677
+ type: Boolean,
678
+ required: false,
679
+ },
680
+ subscription_expiry: {
681
+ type: mongoose_1.Schema.Types.Date,
682
+ required: false,
683
+ },
684
+ digital_menu_images: {
685
+ type: [String],
686
+ required: false,
687
+ },
688
+ web_slider_images: {
689
+ type: [String],
690
+ required: false,
691
+ },
692
+ enabled_rating_types: {
693
+ type: [RatingTypeSchema],
694
+ default: [],
695
+ },
696
+ specials_name: {
697
+ type: String,
698
+ required: false,
699
+ },
700
+ order_completion_type: {
701
+ type: String,
702
+ enum: constants_1.ALL_ORDER_COMPLETION_TYPES,
703
+ default: constants_1.ORDER_COMPLETION_TYPE_ENUM.DEFAULT_ON,
704
+ },
705
+ twitter_link: {
706
+ type: String,
707
+ required: false,
708
+ },
709
+ instagram_link: {
710
+ type: String,
711
+ required: false,
712
+ },
713
+ fb_link: {
714
+ type: String,
715
+ required: false,
716
+ },
717
+ tiktok_link: {
718
+ type: String,
719
+ required: false,
720
+ },
721
+ receipt_qr_type: {
722
+ type: String,
723
+ enum: constants_1.ALL_RECEIPT_QR_CODE_TYPES,
724
+ required: false,
725
+ },
726
+ menu_source: {
727
+ type: String,
728
+ required: false,
729
+ },
730
+ app_version: {
731
+ type: String,
732
+ required: false,
733
+ },
734
+ force_isolated_printing: {
735
+ type: Boolean,
736
+ required: false,
737
+ },
738
+ // ====><====
739
+ createdAt: {
740
+ type: mongoose_1.Schema.Types.Date,
741
+ required: true,
742
+ default: () => new Date(),
743
+ immutable: true,
744
+ },
745
+ updatedAt: {
746
+ type: mongoose_1.Schema.Types.Date,
747
+ required: true,
748
+ default: () => new Date(),
749
+ },
750
+ }, {
751
+ timestamps: true,
752
+ versionKey: false,
753
+ minimize: false,
754
+ });
755
+ exports.TENANTS_COLLECTION_NAME = 'tenants';