@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,48 +0,0 @@
1
- import { INVENTORY_ITEM_TYPE_ENUM, INVENTORY_ITEM_UNIT_ENUM } from '../../constants';
2
- import { IIngredient } from './common';
3
- export interface IInventory {
4
- _id: string;
5
- code: string;
6
- tenant_id: string;
7
- category_id: string | null;
8
- name: string;
9
- unit: INVENTORY_ITEM_UNIT_ENUM;
10
- threshold_quantity: number;
11
- quantity_left: number;
12
- unit_price: number;
13
- remaining_stock_price: number;
14
- type: INVENTORY_ITEM_TYPE_ENUM;
15
- ingredients?: IIngredient[] | null;
16
- image_url: string | null;
17
- active: boolean;
18
- createdAt: Date;
19
- updatedAt: Date;
20
- }
21
- export interface IKitchenInventory {
22
- _id: string;
23
- code: string;
24
- tenant_id: string;
25
- category_id: string | null;
26
- name: string;
27
- unit: INVENTORY_ITEM_UNIT_ENUM;
28
- threshold_quantity: number;
29
- quantity_left: number;
30
- unit_price: number;
31
- remaining_stock_price: number;
32
- type: INVENTORY_ITEM_TYPE_ENUM;
33
- ingredients?: IIngredient[] | null;
34
- image_url: string | null;
35
- active: boolean;
36
- createdAt: Date;
37
- updatedAt: Date;
38
- previous_quantity_left: number;
39
- previous_unit_price: number;
40
- previous_remaining_stock_price: number;
41
- quantity_added: number;
42
- quantity_consumed: number;
43
- quantity_wasted: number;
44
- quantity_short: number;
45
- variance_quantity: number;
46
- total_transactions: number;
47
- new_stock_price: number;
48
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,85 +0,0 @@
1
- import { LOT_SERIAL_DOC_TYPE_ENUM, LOT_SERIAL_MOVEMENT_SOURCE_ENUM, WAREHOUSE_REF_TYPE_ENUM, TRACKING_MODE_ENUM } from '../../constants';
2
- export type TTrackedMode = TRACKING_MODE_ENUM.LOT | TRACKING_MODE_ENUM.SERIAL;
3
- export type TInventoryLotSerialMovementType = 'IN' | 'OUT';
4
- export interface IInventoryLotSerialActorRef {
5
- uid: string;
6
- name: string;
7
- }
8
- export type IInventoryLotSerialNumberCommon = {
9
- _id: string;
10
- ref_id: string;
11
- ref_type: WAREHOUSE_REF_TYPE_ENUM;
12
- inventory_code: string;
13
- tracking_mode: TTrackedMode;
14
- lot_number?: string;
15
- serial_number?: string;
16
- expiry_date?: Date | null;
17
- best_before_date?: Date | null;
18
- removal_date?: Date | null;
19
- alert_date?: Date | null;
20
- created_by?: IInventoryLotSerialActorRef | null;
21
- updated_by?: IInventoryLotSerialActorRef | null;
22
- createdAt: Date;
23
- updatedAt: Date;
24
- };
25
- export interface IInventoryLotSerialNumberBalance extends IInventoryLotSerialNumberCommon {
26
- doc_type: LOT_SERIAL_DOC_TYPE_ENUM.BALANCE;
27
- quantity_available: number;
28
- is_available?: boolean;
29
- received_at?: Date | null;
30
- received_by?: IInventoryLotSerialActorRef | null;
31
- last_moved_at?: Date | null;
32
- last_moved_by?: IInventoryLotSerialActorRef | null;
33
- }
34
- export interface IInventoryLotSerialNumberMovement extends IInventoryLotSerialNumberCommon {
35
- doc_type: LOT_SERIAL_DOC_TYPE_ENUM.MOVEMENT;
36
- movement_type: TInventoryLotSerialMovementType;
37
- quantity: number;
38
- occurred_at: Date;
39
- occurred_by?: IInventoryLotSerialActorRef | null;
40
- source: LOT_SERIAL_MOVEMENT_SOURCE_ENUM;
41
- source_id?: string;
42
- }
43
- export type IInventoryLotSerialNumber = IInventoryLotSerialNumberBalance | IInventoryLotSerialNumberMovement;
44
- export type TInventoryLotSerialMutationAction = 'RECEIVE' | 'CONSUME' | 'RESTOCK';
45
- export interface IInventoryLotSerialMutationItem {
46
- inventory_code: string;
47
- tracking_mode: TTrackedMode;
48
- lot_number?: string;
49
- serial_number?: string;
50
- quantity: number;
51
- occurred_at?: Date | string;
52
- expiry_date?: Date | string | null;
53
- best_before_date?: Date | string | null;
54
- removal_date?: Date | string | null;
55
- alert_date?: Date | string | null;
56
- }
57
- export interface IPostInventoryLotSerialMutationBody {
58
- ref_id: string;
59
- ref_type: WAREHOUSE_REF_TYPE_ENUM;
60
- action: TInventoryLotSerialMutationAction;
61
- source: LOT_SERIAL_MOVEMENT_SOURCE_ENUM;
62
- source_id?: string;
63
- items: IInventoryLotSerialMutationItem[];
64
- }
65
- export interface IPostInventoryLotSerialMutationResponse {
66
- message: string;
67
- action: TInventoryLotSerialMutationAction;
68
- ref_id: string;
69
- ref_type: WAREHOUSE_REF_TYPE_ENUM;
70
- source: LOT_SERIAL_MOVEMENT_SOURCE_ENUM;
71
- source_id: string | null;
72
- total_items: number;
73
- }
74
- export interface IGetInventoryLotSerialNumbersQuery {
75
- ref_id?: string;
76
- ref_type?: WAREHOUSE_REF_TYPE_ENUM;
77
- source?: LOT_SERIAL_MOVEMENT_SOURCE_ENUM | string;
78
- movement_type?: TInventoryLotSerialMovementType | string;
79
- from_date?: Date | string;
80
- to_date?: Date | string;
81
- limit?: number;
82
- offset?: number;
83
- }
84
- export type IGetInventoryLotSerialNumbersResponse = IInventoryLotSerialNumber[];
85
- export declare const INVENTORY_LOT_SERIAL_NUMBERS_COLLECTION_NAME = "inventory_lot_serial_numbers";
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.INVENTORY_LOT_SERIAL_NUMBERS_COLLECTION_NAME = void 0;
4
- exports.INVENTORY_LOT_SERIAL_NUMBERS_COLLECTION_NAME = 'inventory_lot_serial_numbers';
@@ -1,89 +0,0 @@
1
- import { ITEM_CAVEATS_ENUM, ITEM_DIETARY_PREFERENCE_ENUM, ORDER_ITEM_TYPE_ENUM, PLATFORMS_ENUM } from '../../constants';
2
- import { IIngredient, IItemSpecialHour, IPrice } from './common';
3
- export interface IModifier {
4
- _id: string /** * Unique identifier for the modifier */;
5
- ref: string /** * Ref To The Original Modifier */;
6
- name: string;
7
- description: string;
8
- active: boolean;
9
- sold_out: string[];
10
- sort_id: number;
11
- min_num_options?: number | null;
12
- max_num_options?: number | null;
13
- min_option_choice_quantity?: number | null;
14
- max_option_choice_quantity?: number | null;
15
- min_aggregate_options_quantity?: number | null;
16
- max_aggregate_options_quantity?: number | null;
17
- num_free_options?: number | null;
18
- exempt_discount?: boolean;
19
- minimized?: boolean;
20
- options: IModifierOption[];
21
- }
22
- export interface IModifierOption {
23
- _id: string /** * Unique identifier for the modifier option */;
24
- ref: string /** * Ref To The Original Modifier Option */;
25
- name: string;
26
- active: boolean;
27
- sold_out: string[];
28
- sort_id: number;
29
- excluded_platforms: PLATFORMS_ENUM[];
30
- price?: IPrice | null;
31
- multiplier?: number | null;
32
- modifiers?: IModifier[] | null;
33
- default?: boolean;
34
- ingredients?: IIngredient[] | null;
35
- item_modifier_option_special_hours?: IItemSpecialHour[] | null;
36
- }
37
- export interface IItem {
38
- _id: string;
39
- brand_id: string;
40
- tenants: string[];
41
- category_id: string;
42
- included_platforms: PLATFORMS_ENUM[];
43
- name: string;
44
- hide_name: boolean;
45
- description: string;
46
- active: boolean;
47
- sold_out: string[];
48
- sort_id: number;
49
- price: IPrice | null;
50
- discount_amount: IPrice | null;
51
- is_discount_percentage: boolean;
52
- caveats: ITEM_CAVEATS_ENUM[];
53
- dietary_preferences: ITEM_DIETARY_PREFERENCE_ENUM[];
54
- tax_rate: IPrice | null;
55
- keywords: string[];
56
- image_url: string;
57
- ingredients: IIngredient[] | null;
58
- item_special_hours: IItemSpecialHour[] | null;
59
- modifiers: IModifier[] | null;
60
- is_featured: boolean;
61
- featured_sort_id: number;
62
- display_price?: number | null;
63
- show_starting_from?: boolean;
64
- use_source_ingredients?: boolean;
65
- createdAt: Date;
66
- updatedAt: Date;
67
- }
68
- export interface IGeneralItem {
69
- _id: string;
70
- type: ORDER_ITEM_TYPE_ENUM;
71
- tenants: string[];
72
- name: string;
73
- category_id: string;
74
- category_name: string;
75
- category_image_url: string;
76
- image_url: string;
77
- description: string;
78
- }
79
- export interface IItemCosting {
80
- _id: string;
81
- item_id: string;
82
- category_id: string;
83
- item_name: string;
84
- category_name: string;
85
- total_transactions: number;
86
- quantity_consumed: number;
87
- selling_price: number;
88
- cost_price: number;
89
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,17 +0,0 @@
1
- import { PLATFORMS_ENUM } from '../../constants';
2
- import { IItemSpecialHour } from './common';
3
- import { IIncludedCategory } from './courses';
4
- export interface IMenu {
5
- _id: string;
6
- tenant_id: string;
7
- included_platforms: PLATFORMS_ENUM[];
8
- name: string;
9
- subtitle: string;
10
- sort_id: number;
11
- default: boolean;
12
- active: boolean;
13
- included_categories: IIncludedCategory[];
14
- menu_special_hours: IItemSpecialHour[] | null;
15
- createdAt: Date;
16
- updatedAt: Date;
17
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,242 +0,0 @@
1
- import { GIFT_CARD_REWARD_TYPE_ENUM, ORDER_ITEM_TYPE_ENUM, ORDER_STATUS_ENUM, PAYMENT_METHOD_EXPECTED_ENUM, PAYMENT_PROVIDERS_ENUM, PAYMENT_STATUS_ENUM, PAYMENT_TYPE_ENUM, PLATFORMS_ENUM, SPLIT_BILL_TYPE_ENUM } from '../../constants';
2
- export interface IOrderCourse {
3
- name: string;
4
- course_id: string;
5
- item_ids: string[];
6
- called: boolean;
7
- }
8
- export interface IConsumer {
9
- email: string;
10
- first_name: string;
11
- last_name: string;
12
- phone: string;
13
- }
14
- export interface IOrderCategory {
15
- name: string;
16
- category_id: string;
17
- items: IOrderItem[];
18
- }
19
- export interface IOrderItem {
20
- _id: string;
21
- item_id: string;
22
- menu_id?: string | null;
23
- item_type: ORDER_ITEM_TYPE_ENUM;
24
- is_ready?: boolean;
25
- void_reason?: string;
26
- seat_number?: number;
27
- is_split?: boolean;
28
- name: string;
29
- price: number;
30
- subtotal: number;
31
- tax_rate: number;
32
- quantity: number;
33
- _net_amount: number;
34
- _gross_amount: number;
35
- _gst_amount: number;
36
- _discount_amount: number;
37
- special_instructions: string;
38
- item_discount_details: IDiscountDetails | null;
39
- modifiers: IOrderModifier[] | null;
40
- }
41
- export interface IOrderModifier {
42
- _id: string;
43
- ref: string;
44
- name: string;
45
- options: IOrderOption[];
46
- }
47
- export interface IOrderOption {
48
- _id: string;
49
- ref: string;
50
- name: string;
51
- price: number;
52
- quantity: number;
53
- is_free: boolean;
54
- modifiers: IOrderModifier[] | null;
55
- }
56
- export interface ICardDetails {
57
- transaction_id: string;
58
- payment_provider_linked_customer_id: string | null;
59
- card_number: string;
60
- card_type: string;
61
- card_holder_name: string;
62
- card_charges: number;
63
- card_country_code: string | null;
64
- payment_provider: PAYMENT_PROVIDERS_ENUM;
65
- }
66
- export interface IStaffDetails {
67
- staff_id: string;
68
- staff_name: string;
69
- staff_mobile: string | null;
70
- staff_email: string | null;
71
- }
72
- export interface IDiscountDetails {
73
- voucher_discount?: number;
74
- voucher_discount_id?: string;
75
- voucher_discount_name?: string;
76
- is_voucher_discount_percentage?: boolean;
77
- voucher_discount_reason?: string;
78
- voucher_reference_number?: string;
79
- special_discount?: number;
80
- special_discount_id?: string;
81
- special_discount_name?: string;
82
- is_special_discount_percentage?: boolean;
83
- special_discount_reason?: string;
84
- special_reference_number?: string;
85
- loyalty_discount?: number;
86
- loyalty_discount_id?: string;
87
- loyalty_discount_name?: string;
88
- is_loyalty_discount_percentage?: boolean;
89
- loyalty_discount_reason?: string;
90
- loyalty_reference_number?: string;
91
- total_discount: number;
92
- }
93
- export interface IOrderDeliveryDetails {
94
- city: string;
95
- address_instructions: string;
96
- state: string;
97
- street: string;
98
- lat: number;
99
- lng: number;
100
- zip_code: string;
101
- country_code: string;
102
- delivery_code: string;
103
- delivery_cost: number;
104
- rider_revenue?: number | null;
105
- estimated_delivery_time: Date | null;
106
- distance_in_meters_from_store: number;
107
- rider_details?: IStaffDetails | null;
108
- }
109
- export interface IOrderDineInDetails {
110
- floor_id: string;
111
- table_id: string;
112
- table_name: string;
113
- num_of_guests: number;
114
- start_time: Date;
115
- reservation_time: Date;
116
- prep_minutes?: number | null;
117
- /** @deprecated Use top-level order_taker_details instead. */
118
- order_taker_details?: IStaffDetails | null;
119
- courses: IOrderCourse[] | null;
120
- }
121
- export interface IOrderTakeawayDetails {
122
- estimated_takeaway_time: Date | null;
123
- }
124
- export interface IGiftCardRedemption {
125
- gift_card_id: string;
126
- mystery_gift_type?: GIFT_CARD_REWARD_TYPE_ENUM | null;
127
- redeemed_times: number;
128
- }
129
- export interface IWalletRedemptions {
130
- cashback_amount?: number | null;
131
- gift_cards?: IGiftCardRedemption[] | null;
132
- }
133
- interface CommonOptionalFields {
134
- delivery_details?: IOrderDeliveryDetails | null;
135
- dinein_details?: IOrderDineInDetails | null;
136
- takeaway_details?: IOrderTakeawayDetails | null;
137
- staff_details?: IStaffDetails | null;
138
- order_taker_details?: IStaffDetails | null;
139
- order_discount_details?: IDiscountDetails | null;
140
- total_discount_applied?: number;
141
- is_surcharge_percentage?: boolean;
142
- is_surcharge_taxable?: boolean;
143
- is_service_fee_percentage?: boolean;
144
- is_service_fee_taxable?: boolean;
145
- exclude_discount_from_gst?: boolean;
146
- apply_service_fee_on_original_price?: boolean;
147
- is_gst_inclusive?: boolean;
148
- surcharge?: number;
149
- surcharge_amount?: number;
150
- service_fee?: number;
151
- service_fee_amount?: number;
152
- gst?: number;
153
- gst_amount?: number;
154
- packaging_charges?: number;
155
- adjustment_amount?: number | null;
156
- adjustment_reason?: string | null;
157
- tax_invoice_provider_charges?: number;
158
- }
159
- export interface IOrderIteration extends CommonOptionalFields {
160
- consumer: IOrder['consumer'];
161
- platform: PLATFORMS_ENUM;
162
- tip_amount: IOrder['tip_amount'];
163
- categories: IOrder['categories'];
164
- special_instructions: IOrder['special_instructions'];
165
- payments: IOrder['payments'];
166
- order_status: IOrder['order_status'];
167
- tax_number: IOrder['tax_number'];
168
- tax_amount: IOrder['tax_amount'];
169
- price: IOrder['price'];
170
- amount_earned: IOrder['amount_earned'];
171
- grand_total: IOrder['grand_total'];
172
- updatedAt: IOrder['updatedAt'];
173
- }
174
- export interface IOrderPayment {
175
- /**
176
- * _id is generated on the server side
177
- */
178
- _id?: string;
179
- payment_type: PAYMENT_TYPE_ENUM | string;
180
- payment_status: PAYMENT_STATUS_ENUM;
181
- card_details: ICardDetails | null;
182
- amount_paid: number;
183
- amount_due: number;
184
- amount_refunded: number;
185
- refund_reason?: string;
186
- payment_id: string | null;
187
- note?: string | null;
188
- }
189
- export interface IOrder extends CommonOptionalFields {
190
- _id: string;
191
- tenant_id: string;
192
- consumer: IConsumer;
193
- platform: PLATFORMS_ENUM;
194
- tip_amount: number;
195
- categories: IOrderCategory[];
196
- iterations: IOrderIteration[];
197
- special_instructions: string;
198
- payments: IOrderPayment[];
199
- split_parent_id?: string | null;
200
- split_child_ids?: string[] | null;
201
- split_type?: SPLIT_BILL_TYPE_ENUM | null;
202
- order_status: ORDER_STATUS_ENUM;
203
- tax_number: string;
204
- tax_amount: number;
205
- /**
206
- * price is the total price of the all items in the order
207
- * without any discounts
208
- */
209
- price: number;
210
- /**
211
- * amount_collected is the total amount collected from the consumer
212
- */
213
- amount_collected: number;
214
- /**
215
- * amount_earned is the total amount amount_earned by the store
216
- */
217
- amount_earned: number;
218
- /**
219
- * grand_total is the final amount of the order including all taxes and discounts
220
- */
221
- grand_total: number;
222
- order_number: number | null;
223
- delete_reason?: string | null;
224
- cancel_reason?: string | null;
225
- tax_invoice_id?: string | null;
226
- is_deleted: boolean;
227
- order_status_updated_at: Date;
228
- rating?: number | null;
229
- review?: string | null;
230
- is_reopened?: boolean;
231
- deferred_settlement?: boolean;
232
- payment_method_expected?: PAYMENT_METHOD_EXPECTED_ENUM;
233
- order_taker_details?: IStaffDetails | null;
234
- redeemed_offers?: Record<string, number> | null;
235
- wallet_redemptions?: IWalletRedemptions | null;
236
- order_settled_at: Date;
237
- order_settled_at_mins: number;
238
- createdAt_mins: number;
239
- createdAt: Date;
240
- updatedAt: Date;
241
- }
242
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,39 +0,0 @@
1
- import { IStaffDetails } from './orders';
2
- export interface IPurchaseOrderCommonItem {
3
- _id: string;
4
- item_id: string;
5
- is_ready?: boolean;
6
- void_reason?: string | null;
7
- name: string;
8
- price: number;
9
- subtotal: number;
10
- quantity: number;
11
- _net_amount: number;
12
- _gross_amount: number;
13
- _gst_amount: number;
14
- _discount_amount: number;
15
- special_instructions: string;
16
- }
17
- export interface IPurchaseOrderCommonCategoryByCategoryId {
18
- name: string;
19
- category_id: string;
20
- items: IPurchaseOrderCommonItem[];
21
- }
22
- export interface IPurchaseOrderCommonCategoryById {
23
- _id: string;
24
- name: string;
25
- items: IPurchaseOrderCommonItem[];
26
- }
27
- export interface IPurchaseOrderCommonIterationBase<TCategory, TStatus> {
28
- categories: TCategory[];
29
- staff_details: IStaffDetails;
30
- is_gst_inclusive?: boolean;
31
- gst?: number | null;
32
- gst_amount?: number | null;
33
- special_instructions: string;
34
- price: number;
35
- amount_earned: number;
36
- grand_total: number;
37
- order_status: TStatus;
38
- updatedAt: Date;
39
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,39 +0,0 @@
1
- import { PURCHASE_ORDER_RECEIPT_STATUS_ENUM } from '../../constants';
2
- export interface IPurchaseOrderReceiptStatusConfig {
3
- status: PURCHASE_ORDER_RECEIPT_STATUS_ENUM;
4
- color: string;
5
- contrast_color: string;
6
- }
7
- export declare const DEFAULT_PO_RECEIPT_STATUSES: IPurchaseOrderReceiptStatusConfig[];
8
- export interface IPurchaseOrderReceiptItem {
9
- _id: string;
10
- item_id: string;
11
- name: string;
12
- ordered_quantity: number;
13
- received_quantity: number;
14
- price: number;
15
- subtotal: number;
16
- }
17
- export interface IPurchaseOrderReceiptActor {
18
- _id: string;
19
- name: string;
20
- }
21
- export interface IPurchaseOrderReceipt {
22
- _id: string;
23
- warehouse_id: string;
24
- purchase_order_id: string;
25
- vendor_id: string;
26
- vendor_name: string;
27
- receipt_status: PURCHASE_ORDER_RECEIPT_STATUS_ENUM;
28
- items: IPurchaseOrderReceiptItem[];
29
- total_received_amount: number;
30
- notes?: string | null;
31
- created_by?: IPurchaseOrderReceiptActor | null;
32
- validated_by?: IPurchaseOrderReceiptActor | null;
33
- validated_at?: Date | null;
34
- cancelled_at?: Date | null;
35
- cancel_reason?: string | null;
36
- createdAt_mins: number;
37
- createdAt: Date;
38
- updatedAt: Date;
39
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_PO_RECEIPT_STATUSES = void 0;
4
- const constants_1 = require("../../constants");
5
- exports.DEFAULT_PO_RECEIPT_STATUSES = [
6
- {
7
- status: constants_1.PURCHASE_ORDER_RECEIPT_STATUS_ENUM.DRAFT,
8
- color: '#727472',
9
- contrast_color: '#FFFFFF',
10
- },
11
- {
12
- status: constants_1.PURCHASE_ORDER_RECEIPT_STATUS_ENUM.VALIDATED,
13
- color: '#4CC417',
14
- contrast_color: '#FFFFFF',
15
- },
16
- {
17
- status: constants_1.PURCHASE_ORDER_RECEIPT_STATUS_ENUM.CANCELLED,
18
- color: '#FF0000',
19
- contrast_color: '#FFFFFF',
20
- },
21
- ];
@@ -1,33 +0,0 @@
1
- import { PURCHASE_ORDER_RFQ_STATUS_ENUM, RFQ_VENDOR_STATUS_ENUM } from '../../constants';
2
- import { IPurchaseOrderCommonCategoryByCategoryId, IPurchaseOrderCommonItem, IPurchaseOrderCommonIterationBase } from './purchase_order_common';
3
- export type IPurchaseOrderRFQItem = IPurchaseOrderCommonItem;
4
- export type IPurchaseOrderRFQCategory = IPurchaseOrderCommonCategoryByCategoryId;
5
- export interface IPurchaseOrderRFQIteration extends IPurchaseOrderCommonIterationBase<IPurchaseOrderRFQCategory, PURCHASE_ORDER_RFQ_STATUS_ENUM | string> {
6
- tax_number: string;
7
- }
8
- export interface IRFQVendorEntry {
9
- vendor_id: string;
10
- vendor_name: string;
11
- vendor_email?: string | null;
12
- vendor_price?: number | null;
13
- status: RFQ_VENDOR_STATUS_ENUM;
14
- }
15
- export interface IPurchaseOrderRFQ extends IPurchaseOrderRFQIteration {
16
- _id: string;
17
- warehouse_id: string;
18
- vendor_id: string | null;
19
- vendor_name: string | null;
20
- requested_vendors: Record<string, IRFQVendorEntry>;
21
- iterations: IPurchaseOrderRFQIteration[];
22
- order_number: number | null;
23
- expected_deadline: string;
24
- payment_terms: number;
25
- delete_reason?: string | null;
26
- cancel_reason?: string | null;
27
- is_deleted: boolean;
28
- order_status_updated_at: Date;
29
- special_instructions: string;
30
- is_reopened?: boolean;
31
- createdAt_mins: number;
32
- createdAt: Date;
33
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,33 +0,0 @@
1
- import { PURCHASE_ORDER_RFQ_STATUS_ENUM, RFQ_VENDOR_STATUS_ENUM } from '../../constants';
2
- import { IPurchaseOrderCommonCategoryByCategoryId, IPurchaseOrderCommonItem, IPurchaseOrderCommonIterationBase } from './purchase_order_common';
3
- export type IPurchaseOrderRFQItem = IPurchaseOrderCommonItem;
4
- export type IPurchaseOrderRFQCategory = IPurchaseOrderCommonCategoryByCategoryId;
5
- export interface IPurchaseOrderRFQIteration extends IPurchaseOrderCommonIterationBase<IPurchaseOrderRFQCategory, PURCHASE_ORDER_RFQ_STATUS_ENUM | string> {
6
- tax_number: string;
7
- }
8
- export interface IRFQVendorEntry {
9
- vendor_id: string;
10
- vendor_name: string;
11
- vendor_email?: string | null;
12
- vendor_price?: number | null;
13
- status: RFQ_VENDOR_STATUS_ENUM;
14
- }
15
- export interface IPurchaseOrderRFQ extends IPurchaseOrderRFQIteration {
16
- _id: string;
17
- warehouse_id: string;
18
- vendor_id: string | null;
19
- vendor_name: string | null;
20
- requested_vendors?: Record<string, IRFQVendorEntry> | null;
21
- iterations: IPurchaseOrderRFQIteration[];
22
- order_number: number | null;
23
- expected_deadline: string;
24
- payment_terms: number;
25
- delete_reason?: string | null;
26
- cancel_reason?: string | null;
27
- is_deleted: boolean;
28
- order_status_updated_at: Date;
29
- special_instructions: string;
30
- is_reopened?: boolean;
31
- createdAt_mins: number;
32
- createdAt: Date;
33
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });