@chopkola/common 1.0.203 → 1.0.205
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LucideIcon } from "lucide-react";
|
|
2
|
+
import { Currency } from "../../global";
|
|
2
3
|
export declare enum ActiveBusinessSummaryStatisticsIconEnum {
|
|
3
4
|
WALLET = "wallet",
|
|
4
5
|
SHOPPING_BAG = "shopping_bag",
|
|
@@ -31,6 +32,7 @@ export type ActiveBusinessSummaryStatisticsResourceData = {
|
|
|
31
32
|
orders: any[];
|
|
32
33
|
delivery_status: any[];
|
|
33
34
|
stats: ActiveBusinessStats;
|
|
35
|
+
currency: Currency;
|
|
34
36
|
};
|
|
35
37
|
export interface GetActiveBusinessSummaryStatisticsResourceDataI {
|
|
36
38
|
data: ActiveBusinessSummaryStatisticsResourceData;
|
package/build/types/cart.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ export interface BaseCartItem extends Timestamps {
|
|
|
13
13
|
unit_price: MoneyString;
|
|
14
14
|
total_price: MoneyString;
|
|
15
15
|
}
|
|
16
|
+
export interface BaseAddToCartInput {
|
|
17
|
+
cart_id: UUID;
|
|
18
|
+
vendor_id: UUID;
|
|
19
|
+
quantity: number;
|
|
20
|
+
}
|
|
16
21
|
export interface MealCartItemMetadata {
|
|
17
22
|
special_instructions: Nullable<string>;
|
|
18
23
|
selected_options: CartSelectedModifierOption[];
|
|
@@ -25,6 +30,11 @@ export interface MealCartItem extends BaseCartItem {
|
|
|
25
30
|
inventory_item_id: null;
|
|
26
31
|
metadata: MealCartItemMetadata;
|
|
27
32
|
}
|
|
33
|
+
export interface AddMealToCartInput extends BaseAddToCartInput {
|
|
34
|
+
item_type: CartItemTypeEnum.MEAL;
|
|
35
|
+
meal_id: UUID;
|
|
36
|
+
metadata: MealCartItemMetadata;
|
|
37
|
+
}
|
|
28
38
|
export interface ProductCartItemMetadata {
|
|
29
39
|
special_instructions: Nullable<string>;
|
|
30
40
|
accepts_substitutions: boolean;
|
|
@@ -37,6 +47,13 @@ export interface ProductCartItem extends BaseCartItem {
|
|
|
37
47
|
inventory_item_id: UUID;
|
|
38
48
|
metadata: ProductCartItemMetadata;
|
|
39
49
|
}
|
|
50
|
+
export interface AddProductToCartInput extends BaseAddToCartInput {
|
|
51
|
+
item_type: CartItemTypeEnum.PRODUCT;
|
|
52
|
+
product_id: UUID;
|
|
53
|
+
product_variant_id?: UUID;
|
|
54
|
+
inventory_item_id: UUID;
|
|
55
|
+
metadata: ProductCartItemMetadata;
|
|
56
|
+
}
|
|
40
57
|
export interface ReservationCartItemMetadata {
|
|
41
58
|
reservation_date: DateString;
|
|
42
59
|
reservation_time: TimeString;
|
|
@@ -51,7 +68,12 @@ export interface ReservationCartItem extends BaseCartItem {
|
|
|
51
68
|
inventory_item_id: null;
|
|
52
69
|
metadata: ReservationCartItemMetadata;
|
|
53
70
|
}
|
|
71
|
+
export interface AddReservationToCartInput extends BaseAddToCartInput {
|
|
72
|
+
item_type: CartItemTypeEnum.RESERVATION;
|
|
73
|
+
metadata: ReservationCartItemMetadata;
|
|
74
|
+
}
|
|
54
75
|
export type CartItem = MealCartItem | ProductCartItem | ReservationCartItem;
|
|
76
|
+
export type AddToCartInput = AddMealToCartInput | AddProductToCartInput | AddReservationToCartInput;
|
|
55
77
|
export interface BaseCart<T extends CartItem> extends Timestamps {
|
|
56
78
|
id: UUID;
|
|
57
79
|
user_id: Nullable<UUID>;
|