@managesome/eposmatic-toolkit 0.2.454 → 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.
Files changed (190) hide show
  1. package/lib/constants/WORKER_ENDPOINTS.d.ts +2 -0
  2. package/lib/constants/WORKER_ENDPOINTS.js +3 -0
  3. package/lib/helpers/store/common-warehouse-internal-movement-actions.d.ts +12 -0
  4. package/lib/helpers/store/common-warehouse-internal-movement-actions.js +33 -0
  5. package/lib/helpers/store/common-warehouse-purchase-order-receipt-actions.d.ts +12 -0
  6. package/lib/helpers/store/common-warehouse-purchase-order-receipt-actions.js +37 -0
  7. package/lib/helpers/store/index.d.ts +2 -0
  8. package/lib/helpers/store/index.js +2 -0
  9. package/lib/helpers/types/workers.d.ts +16 -1
  10. package/lib/schemas/models/index.d.ts +1 -0
  11. package/lib/schemas/models/index.js +1 -0
  12. package/lib/schemas/models/warehouse_internal_movements.d.ts +3 -3
  13. package/lib/schemas/models/warehouse_inventory_lot_serial_numbers.d.ts +3 -3
  14. package/lib/schemas/models/warehouse_sale_deliveries.d.ts +3 -3
  15. package/lib/schemas/models/warehouse_sale_invoices.d.ts +3 -3
  16. package/lib/schemas/types/index.d.ts +2 -0
  17. package/lib/schemas/types/index.js +2 -0
  18. package/package.json +1 -1
  19. package/lib/constants/PURCHASE_ORDER.d.ts +0 -16
  20. package/lib/constants/PURCHASE_ORDER.js +0 -100
  21. package/lib/constants/RFQ.d.ts +0 -0
  22. package/lib/constants/RFQ.js +0 -1
  23. package/lib/helpers/order/generate-purchase-order-rfq.d.ts +0 -3
  24. package/lib/helpers/order/generate-purchase-order-rfq.js +0 -64
  25. package/lib/helpers/order/generate-purchase-order.d.ts +0 -11
  26. package/lib/helpers/order/generate-purchase-order.js +0 -196
  27. package/lib/helpers/store/all-purchase-orders-actions.d.ts +0 -13
  28. package/lib/helpers/store/all-purchase-orders-actions.js +0 -56
  29. package/lib/helpers/store/all-sale-orders-actions.d.ts +0 -2
  30. package/lib/helpers/store/all-sale-orders-actions.js +0 -8
  31. package/lib/helpers/store/all-warehouse-sale-orders-actions.d.ts +0 -2
  32. package/lib/helpers/store/all-warehouse-sale-orders-actions.js +0 -8
  33. package/lib/helpers/store/common-purchase-order-actions.d.ts +0 -31
  34. package/lib/helpers/store/common-purchase-order-actions.js +0 -543
  35. package/lib/helpers/store/common-sale-order-actions.d.ts +0 -5
  36. package/lib/helpers/store/common-sale-order-actions.js +0 -65
  37. package/lib/helpers/store/purchase-order-rfq-cart-actions.d.ts +0 -19
  38. package/lib/helpers/store/purchase-order-rfq-cart-actions.js +0 -373
  39. package/lib/helpers/store/purchase-orders-cart-actions.d.ts +0 -57
  40. package/lib/helpers/store/purchase-orders-cart-actions.js +0 -486
  41. package/lib/helpers/types/purchase-order-cart-actions.d.ts +0 -26
  42. package/lib/helpers/types/purchase-order-cart-actions.js +0 -2
  43. package/lib/helpers/utils/invoice-x-report-helpers.d.ts +0 -58
  44. package/lib/helpers/utils/invoice-x-report-helpers.js +0 -1432
  45. package/lib/helpers/utils/purchase-order-engine.d.ts +0 -9
  46. package/lib/helpers/utils/purchase-order-engine.js +0 -34
  47. package/lib/helpers/utils/purchase-order-receipt-engine.d.ts +0 -149
  48. package/lib/helpers/utils/purchase-order-receipt-engine.js +0 -214
  49. package/lib/helpers/utils/purchase-order-x-report-helpers.d.ts +0 -58
  50. package/lib/helpers/utils/purchase-order-x-report-helpers.js +0 -1440
  51. package/lib/helpers/utils/sale-order-x-report-helpers.d.ts +0 -44
  52. package/lib/helpers/utils/sale-order-x-report-helpers.js +0 -22
  53. package/lib/helpers/utils/sale-x-report-helpers.d.ts +0 -58
  54. package/lib/helpers/utils/sale-x-report-helpers.js +0 -1456
  55. package/lib/helpers/utils/terminal-devices-helpers.d.ts +0 -2
  56. package/lib/helpers/utils/terminal-devices-helpers.js +0 -13
  57. package/lib/helpers/utils/void-purchase-order-items-helpers.d.ts +0 -3
  58. package/lib/helpers/utils/void-purchase-order-items-helpers.js +0 -38
  59. package/lib/helpers/utils/void-purchase-order-items-report-helpers.d.ts +0 -13
  60. package/lib/helpers/utils/void-purchase-order-items-report-helpers.js +0 -22
  61. package/lib/schemas/models/applied-order-discounts.d.ts +0 -80
  62. package/lib/schemas/models/applied-order-discounts.js +0 -106
  63. package/lib/schemas/models/brand.d.ts +0 -45
  64. package/lib/schemas/models/brand.js +0 -45
  65. package/lib/schemas/models/category.d.ts +0 -60
  66. package/lib/schemas/models/category.js +0 -67
  67. package/lib/schemas/models/dinein_table_fingerprints.d.ts +0 -65
  68. package/lib/schemas/models/dinein_table_fingerprints.js +0 -85
  69. package/lib/schemas/models/expense_category.d.ts +0 -83
  70. package/lib/schemas/models/expense_category.js +0 -64
  71. package/lib/schemas/models/internal_movements.d.ts +0 -357
  72. package/lib/schemas/models/internal_movements.js +0 -323
  73. package/lib/schemas/models/inventory.d.ts +0 -99
  74. package/lib/schemas/models/inventory.js +0 -87
  75. package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +0 -154
  76. package/lib/schemas/models/inventory_lot_serial_numbers.js +0 -193
  77. package/lib/schemas/models/item.d.ts +0 -11269
  78. package/lib/schemas/models/item.js +0 -333
  79. package/lib/schemas/models/menu.d.ts +0 -941
  80. package/lib/schemas/models/menu.js +0 -69
  81. package/lib/schemas/models/order.d.ts +0 -15437
  82. package/lib/schemas/models/order.js +0 -891
  83. package/lib/schemas/models/purchase_order_receipts.d.ts +0 -165
  84. package/lib/schemas/models/purchase_order_receipts.js +0 -151
  85. package/lib/schemas/models/purchase_order_rfq.d.ts +0 -1959
  86. package/lib/schemas/models/purchase_order_rfq.js +0 -328
  87. package/lib/schemas/models/purchase_order_rfqs.d.ts +0 -1959
  88. package/lib/schemas/models/purchase_order_rfqs.js +0 -328
  89. package/lib/schemas/models/purchase_order_vendor_returns.d.ts +0 -234
  90. package/lib/schemas/models/purchase_order_vendor_returns.js +0 -188
  91. package/lib/schemas/models/purchase_orders.d.ts +0 -2678
  92. package/lib/schemas/models/purchase_orders.js +0 -336
  93. package/lib/schemas/models/rider.d.ts +0 -65
  94. package/lib/schemas/models/rider.js +0 -74
  95. package/lib/schemas/models/sale_order_deliveries.d.ts +0 -167
  96. package/lib/schemas/models/sale_order_deliveries.js +0 -155
  97. package/lib/schemas/models/sale_order_invoices.d.ts +0 -227
  98. package/lib/schemas/models/sale_order_invoices.js +0 -206
  99. package/lib/schemas/models/sale_order_rfq.d.ts +0 -1938
  100. package/lib/schemas/models/sale_order_rfq.js +0 -309
  101. package/lib/schemas/models/sale_orders.d.ts +0 -1943
  102. package/lib/schemas/models/sale_orders.js +0 -324
  103. package/lib/schemas/models/tenant.d.ts +0 -528
  104. package/lib/schemas/models/tenant.js +0 -755
  105. package/lib/schemas/models/tenant_staff.d.ts +0 -932
  106. package/lib/schemas/models/tenant_staff.js +0 -96
  107. package/lib/schemas/models/track_order_number.d.ts +0 -413
  108. package/lib/schemas/models/track_order_number.js +0 -45
  109. package/lib/schemas/models/void_purchase_order_items.d.ts +0 -176
  110. package/lib/schemas/models/void_purchase_order_items.js +0 -177
  111. package/lib/schemas/models/void_warehouse_invoice_items.d.ts +0 -176
  112. package/lib/schemas/models/void_warehouse_invoice_items.js +0 -176
  113. package/lib/schemas/models/wallet.d.ts +0 -38
  114. package/lib/schemas/models/wallet.js +0 -37
  115. package/lib/schemas/models/warehouse-communications.d.ts +0 -228
  116. package/lib/schemas/models/warehouse-communications.js +0 -216
  117. package/lib/schemas/models/warehouse.d.ts +0 -162
  118. package/lib/schemas/models/warehouse.js +0 -222
  119. package/lib/schemas/models/warehouse_staff.d.ts +0 -65
  120. package/lib/schemas/models/warehouse_staff.js +0 -78
  121. package/lib/schemas/models/warehouse_track_order_number.d.ts +0 -50
  122. package/lib/schemas/models/warehouse_track_order_number.js +0 -52
  123. package/lib/schemas/types/applied-order-discounts.d.ts +0 -22
  124. package/lib/schemas/types/applied-order-discounts.js +0 -2
  125. package/lib/schemas/types/brand.d.ts +0 -32
  126. package/lib/schemas/types/brand.js +0 -2
  127. package/lib/schemas/types/category.d.ts +0 -15
  128. package/lib/schemas/types/category.js +0 -2
  129. package/lib/schemas/types/expense_category.d.ts +0 -20
  130. package/lib/schemas/types/expense_category.js +0 -2
  131. package/lib/schemas/types/internal_movements.d.ts +0 -73
  132. package/lib/schemas/types/internal_movements.js +0 -2
  133. package/lib/schemas/types/inventory.d.ts +0 -48
  134. package/lib/schemas/types/inventory.js +0 -2
  135. package/lib/schemas/types/inventory_lot_serial_numbers.d.ts +0 -85
  136. package/lib/schemas/types/inventory_lot_serial_numbers.js +0 -4
  137. package/lib/schemas/types/item.d.ts +0 -89
  138. package/lib/schemas/types/item.js +0 -2
  139. package/lib/schemas/types/menu.d.ts +0 -17
  140. package/lib/schemas/types/menu.js +0 -2
  141. package/lib/schemas/types/order.d.ts +0 -242
  142. package/lib/schemas/types/order.js +0 -2
  143. package/lib/schemas/types/purchase_order_common.d.ts +0 -39
  144. package/lib/schemas/types/purchase_order_common.js +0 -2
  145. package/lib/schemas/types/purchase_order_receipts.d.ts +0 -39
  146. package/lib/schemas/types/purchase_order_receipts.js +0 -21
  147. package/lib/schemas/types/purchase_order_rfq.d.ts +0 -33
  148. package/lib/schemas/types/purchase_order_rfq.js +0 -2
  149. package/lib/schemas/types/purchase_order_rfqs.d.ts +0 -33
  150. package/lib/schemas/types/purchase_order_rfqs.js +0 -2
  151. package/lib/schemas/types/purchase_order_vendor_returns.d.ts +0 -49
  152. package/lib/schemas/types/purchase_order_vendor_returns.js +0 -42
  153. package/lib/schemas/types/purchase_orders.d.ts +0 -33
  154. package/lib/schemas/types/purchase_orders.js +0 -2
  155. package/lib/schemas/types/rider.d.ts +0 -16
  156. package/lib/schemas/types/rider.js +0 -2
  157. package/lib/schemas/types/sale_order_common.d.ts +0 -39
  158. package/lib/schemas/types/sale_order_common.js +0 -2
  159. package/lib/schemas/types/sale_order_deliveries.d.ts +0 -67
  160. package/lib/schemas/types/sale_order_deliveries.js +0 -2
  161. package/lib/schemas/types/sale_order_invoices.d.ts +0 -49
  162. package/lib/schemas/types/sale_order_invoices.js +0 -2
  163. package/lib/schemas/types/sale_order_rfq.d.ts +0 -25
  164. package/lib/schemas/types/sale_order_rfq.js +0 -2
  165. package/lib/schemas/types/sale_orders.d.ts +0 -30
  166. package/lib/schemas/types/sale_orders.js +0 -2
  167. package/lib/schemas/types/tenant.d.ts +0 -205
  168. package/lib/schemas/types/tenant.js +0 -2
  169. package/lib/schemas/types/tenant_staff.d.ts +0 -22
  170. package/lib/schemas/types/tenant_staff.js +0 -2
  171. package/lib/schemas/types/track_order_number.d.ts +0 -10
  172. package/lib/schemas/types/track_order_number.js +0 -2
  173. package/lib/schemas/types/void_purchase_order_items.d.ts +0 -37
  174. package/lib/schemas/types/void_purchase_order_items.js +0 -2
  175. package/lib/schemas/types/void_warehouse_invoice_items.d.ts +0 -37
  176. package/lib/schemas/types/void_warehouse_invoice_items.js +0 -2
  177. package/lib/schemas/types/wallet.d.ts +0 -7
  178. package/lib/schemas/types/wallet.js +0 -2
  179. package/lib/schemas/types/warehouse-communications.d.ts +0 -54
  180. package/lib/schemas/types/warehouse-communications.js +0 -2
  181. package/lib/schemas/types/warehouse.d.ts +0 -49
  182. package/lib/schemas/types/warehouse.js +0 -2
  183. package/lib/schemas/types/warehouse_purchase_order_common.d.ts +0 -39
  184. package/lib/schemas/types/warehouse_purchase_order_common.js +0 -2
  185. package/lib/schemas/types/warehouse_sale_order_common.d.ts +0 -39
  186. package/lib/schemas/types/warehouse_sale_order_common.js +0 -2
  187. package/lib/schemas/types/warehouse_staff.d.ts +0 -17
  188. package/lib/schemas/types/warehouse_staff.js +0 -2
  189. package/lib/schemas/types/warehouse_track_order_number.d.ts +0 -11
  190. package/lib/schemas/types/warehouse_track_order_number.js +0 -2
@@ -1,755 +0,0 @@
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 item_1 = require("./item");
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: [item_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: [item_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: [item_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: [item_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: [item_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';