@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.
- package/lib/helpers/order/generate-purchase-order-rfq.d.ts +3 -0
- package/lib/helpers/order/generate-purchase-order-rfq.js +64 -0
- package/lib/helpers/order/index.d.ts +1 -0
- package/lib/helpers/order/index.js +1 -0
- package/lib/helpers/store/index.d.ts +1 -0
- package/lib/helpers/store/index.js +1 -0
- package/lib/helpers/store/purchase-order-rfq-cart-actions.d.ts +19 -0
- package/lib/helpers/store/purchase-order-rfq-cart-actions.js +373 -0
- package/lib/schemas/models/applied_order_discounts.d.ts +80 -0
- package/lib/schemas/models/applied_order_discounts.js +106 -0
- package/lib/schemas/models/brands.d.ts +45 -0
- package/lib/schemas/models/brands.js +45 -0
- package/lib/schemas/models/categories.d.ts +60 -0
- package/lib/schemas/models/categories.js +67 -0
- package/lib/schemas/models/close_dates.js +2 -2
- package/lib/schemas/models/dinein_tables.d.ts +6 -6
- package/lib/schemas/models/dinein_tables_fingerprints.d.ts +65 -0
- package/lib/schemas/models/dinein_tables_fingerprints.js +85 -0
- package/lib/schemas/models/discounts.js +3 -3
- package/lib/schemas/models/expense_categories.d.ts +83 -0
- package/lib/schemas/models/expense_categories.js +64 -0
- package/lib/schemas/models/halfhalf_setup.js +3 -3
- package/lib/schemas/models/index.d.ts +23 -23
- package/lib/schemas/models/index.js +23 -23
- package/lib/schemas/models/inventories.d.ts +99 -0
- package/lib/schemas/models/inventories.js +87 -0
- package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +15 -15
- package/lib/schemas/models/items.d.ts +11269 -0
- package/lib/schemas/models/items.js +333 -0
- package/lib/schemas/models/menus.d.ts +941 -0
- package/lib/schemas/models/menus.js +69 -0
- package/lib/schemas/models/offers.js +3 -3
- package/lib/schemas/models/orders.d.ts +15437 -0
- package/lib/schemas/models/orders.js +891 -0
- package/lib/schemas/models/public_holidays.js +2 -2
- package/lib/schemas/models/purchase_order_receipts.d.ts +3 -3
- package/lib/schemas/models/purchase_order_receipts.js +2 -2
- package/lib/schemas/models/purchase_order_rfqs.d.ts +1959 -0
- package/lib/schemas/models/purchase_order_rfqs.js +328 -0
- package/lib/schemas/models/purchase_order_vendor_returns.d.ts +15 -15
- package/lib/schemas/models/purchase_order_vendor_returns.js +2 -2
- package/lib/schemas/models/purchase_orders.js +4 -4
- package/lib/schemas/models/riders.d.ts +65 -0
- package/lib/schemas/models/riders.js +74 -0
- package/lib/schemas/models/specials.js +3 -3
- package/lib/schemas/models/tenant_staffs.d.ts +932 -0
- package/lib/schemas/models/tenant_staffs.js +96 -0
- package/lib/schemas/models/tenants.d.ts +528 -0
- package/lib/schemas/models/tenants.js +755 -0
- package/lib/schemas/models/track_order_numbers.d.ts +413 -0
- package/lib/schemas/models/track_order_numbers.js +45 -0
- package/lib/schemas/models/void_purchase_order_items.js +2 -2
- package/lib/schemas/models/void_warehouse_invoice_items.d.ts +6 -6
- package/lib/schemas/models/void_warehouse_invoice_items.js +2 -2
- package/lib/schemas/models/wallets.d.ts +38 -0
- package/lib/schemas/models/wallets.js +37 -0
- package/lib/schemas/models/warehouse-activity-logs.js +2 -2
- package/lib/schemas/models/warehouse_communications.d.ts +228 -0
- package/lib/schemas/models/warehouse_communications.js +216 -0
- package/lib/schemas/models/warehouse_internal_movements.d.ts +33 -34
- package/lib/schemas/models/warehouse_internal_movements.js +2 -34
- package/lib/schemas/models/warehouse_invoices.js +2 -2
- package/lib/schemas/models/warehouse_items.js +2 -2
- package/lib/schemas/models/warehouse_sale_deliveries.d.ts +167 -0
- package/lib/schemas/models/warehouse_sale_deliveries.js +155 -0
- package/lib/schemas/models/warehouse_sale_invoices.d.ts +227 -0
- package/lib/schemas/models/warehouse_sale_invoices.js +206 -0
- package/lib/schemas/models/warehouse_sale_order_rfqs.d.ts +1938 -0
- package/lib/schemas/models/warehouse_sale_order_rfqs.js +309 -0
- package/lib/schemas/models/warehouse_sale_orders.d.ts +1943 -0
- package/lib/schemas/models/warehouse_sale_orders.js +324 -0
- package/lib/schemas/models/warehouse_staffs.d.ts +65 -0
- package/lib/schemas/models/warehouse_staffs.js +78 -0
- package/lib/schemas/models/warehouse_track_order_numbers.d.ts +50 -0
- package/lib/schemas/models/warehouse_track_order_numbers.js +52 -0
- package/lib/schemas/models/warehouse_vendors.d.ts +3 -3
- package/lib/schemas/models/warehouses.d.ts +162 -0
- package/lib/schemas/models/warehouses.js +222 -0
- package/lib/schemas/types/applied_order_discounts.d.ts +22 -0
- package/lib/schemas/types/applied_order_discounts.js +2 -0
- package/lib/schemas/types/brands.d.ts +32 -0
- package/lib/schemas/types/brands.js +2 -0
- package/lib/schemas/types/categories.d.ts +15 -0
- package/lib/schemas/types/categories.js +2 -0
- package/lib/schemas/types/deliveries.d.ts +1 -1
- package/lib/schemas/types/expense_categories.d.ts +20 -0
- package/lib/schemas/types/expense_categories.js +2 -0
- package/lib/schemas/types/expense_details.d.ts +1 -1
- package/lib/schemas/types/index.d.ts +22 -22
- package/lib/schemas/types/index.js +22 -22
- package/lib/schemas/types/inventories.d.ts +48 -0
- package/lib/schemas/types/inventories.js +2 -0
- package/lib/schemas/types/items.d.ts +89 -0
- package/lib/schemas/types/items.js +2 -0
- package/lib/schemas/types/menus.d.ts +17 -0
- package/lib/schemas/types/menus.js +2 -0
- package/lib/schemas/types/multi_tenants.d.ts +2 -2
- package/lib/schemas/types/orders.d.ts +242 -0
- package/lib/schemas/types/orders.js +2 -0
- package/lib/schemas/types/purchase_order_common.d.ts +1 -1
- package/lib/schemas/types/purchase_order_rfqs.d.ts +33 -0
- package/lib/schemas/types/purchase_order_rfqs.js +2 -0
- package/lib/schemas/types/purchase_orders.d.ts +1 -1
- package/lib/schemas/types/reservations.d.ts +1 -1
- package/lib/schemas/types/riders.d.ts +16 -0
- package/lib/schemas/types/riders.js +2 -0
- package/lib/schemas/types/sale_order_common.d.ts +1 -1
- package/lib/schemas/types/specials.d.ts +1 -1
- package/lib/schemas/types/tenant_staffs.d.ts +22 -0
- package/lib/schemas/types/tenant_staffs.js +2 -0
- package/lib/schemas/types/tenants.d.ts +205 -0
- package/lib/schemas/types/tenants.js +2 -0
- package/lib/schemas/types/track_order_numbers.d.ts +10 -0
- package/lib/schemas/types/track_order_numbers.js +2 -0
- package/lib/schemas/types/wallets.d.ts +7 -0
- package/lib/schemas/types/wallets.js +2 -0
- package/lib/schemas/types/warehouse_communications.d.ts +54 -0
- package/lib/schemas/types/warehouse_communications.js +2 -0
- package/lib/schemas/types/warehouse_internal_movements.d.ts +2 -2
- package/lib/schemas/types/warehouse_invoices.d.ts +1 -1
- package/lib/schemas/types/warehouse_sale_deliveries.d.ts +67 -0
- package/lib/schemas/types/warehouse_sale_deliveries.js +2 -0
- package/lib/schemas/types/warehouse_sale_invoices.d.ts +49 -0
- package/lib/schemas/types/warehouse_sale_invoices.js +2 -0
- package/lib/schemas/types/warehouse_sale_order_rfqs.d.ts +25 -0
- package/lib/schemas/types/warehouse_sale_order_rfqs.js +2 -0
- package/lib/schemas/types/warehouse_sale_orders.d.ts +30 -0
- package/lib/schemas/types/warehouse_sale_orders.js +2 -0
- package/lib/schemas/types/warehouse_staffs.d.ts +17 -0
- package/lib/schemas/types/warehouse_staffs.js +2 -0
- package/lib/schemas/types/warehouse_track_order_numbers.d.ts +11 -0
- package/lib/schemas/types/warehouse_track_order_numbers.js +2 -0
- package/lib/schemas/types/warehouses.d.ts +49 -0
- package/lib/schemas/types/warehouses.js +2 -0
- package/package.json +1 -1
|
@@ -16,13 +16,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("../../helpers/types/customer_wallet_assignments"), exports);
|
|
18
18
|
__exportStar(require("./app_configs"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./applied_order_discounts"), exports);
|
|
20
|
+
__exportStar(require("./brands"), exports);
|
|
21
21
|
__exportStar(require("./cash_drawer_sessions"), exports);
|
|
22
22
|
__exportStar(require("./cash_drawers"), exports);
|
|
23
23
|
__exportStar(require("./cash_in_hand_transactions"), exports);
|
|
24
24
|
__exportStar(require("./cash_in_out"), exports);
|
|
25
|
-
__exportStar(require("./
|
|
25
|
+
__exportStar(require("./categories"), exports);
|
|
26
26
|
__exportStar(require("./close_dates"), exports);
|
|
27
27
|
__exportStar(require("./common"), exports);
|
|
28
28
|
__exportStar(require("./courses"), exports);
|
|
@@ -34,7 +34,7 @@ __exportStar(require("./dinein_floors"), exports);
|
|
|
34
34
|
__exportStar(require("./dinein_tables"), exports);
|
|
35
35
|
__exportStar(require("./dinein_tables_fingerprints"), exports);
|
|
36
36
|
__exportStar(require("./discounts"), exports);
|
|
37
|
-
__exportStar(require("./
|
|
37
|
+
__exportStar(require("./expense_categories"), exports);
|
|
38
38
|
__exportStar(require("./expense_details"), exports);
|
|
39
39
|
__exportStar(require("./gift_cards"), exports);
|
|
40
40
|
__exportStar(require("./halfhalf_setup"), exports);
|
|
@@ -43,64 +43,64 @@ __exportStar(require("./instore_shifts"), exports);
|
|
|
43
43
|
__exportStar(require("./internal_customers"), exports);
|
|
44
44
|
__exportStar(require("./internal_invoices"), exports);
|
|
45
45
|
__exportStar(require("./internal_leads"), exports);
|
|
46
|
-
__exportStar(require("./
|
|
46
|
+
__exportStar(require("./inventories"), exports);
|
|
47
47
|
__exportStar(require("./inventory_categories"), exports);
|
|
48
48
|
__exportStar(require("./inventory_lot_serial_numbers"), exports);
|
|
49
49
|
__exportStar(require("./inventory_transactions"), exports);
|
|
50
|
-
__exportStar(require("./item"), exports);
|
|
51
50
|
__exportStar(require("./item_transactions"), exports);
|
|
51
|
+
__exportStar(require("./items"), exports);
|
|
52
52
|
__exportStar(require("./marketing_fingerprints"), exports);
|
|
53
|
-
__exportStar(require("./
|
|
53
|
+
__exportStar(require("./menus"), exports);
|
|
54
54
|
__exportStar(require("./messaging_devices"), exports);
|
|
55
55
|
__exportStar(require("./modifier_extras"), exports);
|
|
56
56
|
__exportStar(require("./multi_tenants"), exports);
|
|
57
57
|
__exportStar(require("./offers"), exports);
|
|
58
58
|
__exportStar(require("./offers_fingerprints"), exports);
|
|
59
59
|
__exportStar(require("./operational_roles"), exports);
|
|
60
|
-
__exportStar(require("./
|
|
60
|
+
__exportStar(require("./orders"), exports);
|
|
61
61
|
__exportStar(require("./printer_settings"), exports);
|
|
62
62
|
__exportStar(require("./public_holidays"), exports);
|
|
63
63
|
__exportStar(require("./purchase_order_common"), exports);
|
|
64
64
|
__exportStar(require("./purchase_order_receipts"), exports);
|
|
65
|
-
__exportStar(require("./
|
|
65
|
+
__exportStar(require("./purchase_order_rfqs"), exports);
|
|
66
66
|
__exportStar(require("./purchase_order_vendor_returns"), exports);
|
|
67
67
|
__exportStar(require("./purchase_orders"), exports);
|
|
68
68
|
__exportStar(require("./reservations"), exports);
|
|
69
69
|
__exportStar(require("./reviews"), exports);
|
|
70
70
|
__exportStar(require("./rewards_usage"), exports);
|
|
71
|
-
__exportStar(require("./
|
|
71
|
+
__exportStar(require("./riders"), exports);
|
|
72
72
|
__exportStar(require("./sale_order_common"), exports);
|
|
73
|
-
__exportStar(require("./sale_order_deliveries"), exports);
|
|
74
|
-
__exportStar(require("./sale_order_invoices"), exports);
|
|
75
|
-
__exportStar(require("./sale_order_rfq"), exports);
|
|
76
|
-
__exportStar(require("./sale_orders"), exports);
|
|
77
73
|
__exportStar(require("./specials"), exports);
|
|
78
74
|
__exportStar(require("./staff_shifts"), exports);
|
|
79
|
-
__exportStar(require("./tenant"), exports);
|
|
80
75
|
__exportStar(require("./tenant_days"), exports);
|
|
81
76
|
__exportStar(require("./tenant_metadata"), exports);
|
|
82
77
|
__exportStar(require("./tenant_shifts"), exports);
|
|
83
|
-
__exportStar(require("./
|
|
78
|
+
__exportStar(require("./tenant_staffs"), exports);
|
|
79
|
+
__exportStar(require("./tenants"), exports);
|
|
84
80
|
__exportStar(require("./terminal_devices"), exports);
|
|
85
81
|
__exportStar(require("./tokens"), exports);
|
|
86
|
-
__exportStar(require("./
|
|
82
|
+
__exportStar(require("./track_order_numbers"), exports);
|
|
87
83
|
__exportStar(require("./void_order_items"), exports);
|
|
88
84
|
__exportStar(require("./void_purchase_order_items"), exports);
|
|
89
85
|
__exportStar(require("./void_warehouse_invoice_items"), exports);
|
|
90
86
|
__exportStar(require("./vouchers"), exports);
|
|
91
|
-
__exportStar(require("./wallet"), exports);
|
|
92
87
|
__exportStar(require("./wallet_transactions"), exports);
|
|
93
|
-
__exportStar(require("./
|
|
88
|
+
__exportStar(require("./wallets"), exports);
|
|
94
89
|
__exportStar(require("./warehouse-activity-logs"), exports);
|
|
95
|
-
__exportStar(require("./warehouse-communications"), exports);
|
|
96
90
|
__exportStar(require("./warehouse_categories"), exports);
|
|
97
91
|
__exportStar(require("./warehouse_clients"), exports);
|
|
92
|
+
__exportStar(require("./warehouse_communications"), exports);
|
|
98
93
|
__exportStar(require("./warehouse_internal_movements"), exports);
|
|
99
94
|
__exportStar(require("./warehouse_inventory_transactions"), exports);
|
|
100
95
|
__exportStar(require("./warehouse_invoices"), exports);
|
|
101
96
|
__exportStar(require("./warehouse_item_transactions"), exports);
|
|
102
97
|
__exportStar(require("./warehouse_items"), exports);
|
|
103
98
|
__exportStar(require("./warehouse_operational_roles"), exports);
|
|
104
|
-
__exportStar(require("./
|
|
105
|
-
__exportStar(require("./
|
|
99
|
+
__exportStar(require("./warehouse_sale_deliveries"), exports);
|
|
100
|
+
__exportStar(require("./warehouse_sale_invoices"), exports);
|
|
101
|
+
__exportStar(require("./warehouse_sale_order_rfqs"), exports);
|
|
102
|
+
__exportStar(require("./warehouse_sale_orders"), exports);
|
|
103
|
+
__exportStar(require("./warehouse_staffs"), exports);
|
|
104
|
+
__exportStar(require("./warehouse_track_order_numbers"), exports);
|
|
106
105
|
__exportStar(require("./warehouse_vendors"), exports);
|
|
106
|
+
__exportStar(require("./warehouses"), exports);
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,33 @@
|
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { PURCHASE_ORDER_STATUS_ENUM } from '../../constants';
|
|
2
|
-
import { IOrderPayment } from './
|
|
2
|
+
import { IOrderPayment } from './orders';
|
|
3
3
|
import { IPurchaseOrderCommonCategoryByCategoryId, IPurchaseOrderCommonItem, IPurchaseOrderCommonIterationBase } from './purchase_order_common';
|
|
4
4
|
export type IPurchaseOrderItem = IPurchaseOrderCommonItem;
|
|
5
5
|
export type IPurchaseOrderCategory = IPurchaseOrderCommonCategoryByCategoryId;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface IRider {
|
|
2
|
+
_id: string;
|
|
3
|
+
uid: string;
|
|
4
|
+
is_disabled: boolean;
|
|
5
|
+
display_name: string | null;
|
|
6
|
+
phone_number: string;
|
|
7
|
+
email: string | null;
|
|
8
|
+
image_url: string | null;
|
|
9
|
+
lat: number;
|
|
10
|
+
lng: number;
|
|
11
|
+
is_public: boolean;
|
|
12
|
+
is_available: boolean;
|
|
13
|
+
is_verified: boolean;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PLATFORM_TYPE_ENUM, USER_ROLES_ENUM } from '../../constants';
|
|
2
|
+
import { IItemSpecialHour } from './common';
|
|
3
|
+
export interface ITenantStaff {
|
|
4
|
+
_id: string;
|
|
5
|
+
uid: string;
|
|
6
|
+
tenant_id: string;
|
|
7
|
+
staff_auth_code: string | null;
|
|
8
|
+
email: string | null;
|
|
9
|
+
email_verified: boolean;
|
|
10
|
+
display_name: string | null;
|
|
11
|
+
image_url: string | null;
|
|
12
|
+
is_disabled: boolean;
|
|
13
|
+
phone_number: string;
|
|
14
|
+
phone_number_verified: boolean;
|
|
15
|
+
role: USER_ROLES_ENUM;
|
|
16
|
+
allowed_platforms: PLATFORM_TYPE_ENUM[];
|
|
17
|
+
assigned_tables: string[] | null;
|
|
18
|
+
operational_hours?: IItemSpecialHour[] | null;
|
|
19
|
+
cash_in_hand?: number | null;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
}
|