shopoflex-types 1.0.94 → 1.0.96
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/dist/productCart.d.ts +38 -34
- package/package.json +1 -1
package/dist/productCart.d.ts
CHANGED
|
@@ -7,6 +7,36 @@ export type NameType = {
|
|
|
7
7
|
} & {
|
|
8
8
|
[key: string]: string;
|
|
9
9
|
};
|
|
10
|
+
export interface UsageTypes {
|
|
11
|
+
types: ("main_product" | "addon")[];
|
|
12
|
+
}
|
|
13
|
+
export interface CompositionType {
|
|
14
|
+
componentId: string;
|
|
15
|
+
variantId: string;
|
|
16
|
+
quantity: number;
|
|
17
|
+
priceOverride?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface VariantType {
|
|
20
|
+
variantId: string;
|
|
21
|
+
sku?: string;
|
|
22
|
+
priceModel: PriceModel;
|
|
23
|
+
stockHandle: StockHandle;
|
|
24
|
+
composition?: CompositionType[];
|
|
25
|
+
isComposite?: boolean;
|
|
26
|
+
attributes?: VariantAttribute[];
|
|
27
|
+
files?: FileType[];
|
|
28
|
+
barcode?: string;
|
|
29
|
+
isActive?: boolean;
|
|
30
|
+
sortOrder?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface VariantAttribute {
|
|
33
|
+
type: string;
|
|
34
|
+
value: string;
|
|
35
|
+
displayValue: NameType;
|
|
36
|
+
displayType: 'color' | 'text' | string;
|
|
37
|
+
hexColor?: string;
|
|
38
|
+
imageUrl?: string;
|
|
39
|
+
}
|
|
10
40
|
export interface ProductType {
|
|
11
41
|
_id?: string;
|
|
12
42
|
name: NameType;
|
|
@@ -14,27 +44,26 @@ export interface ProductType {
|
|
|
14
44
|
sku?: string;
|
|
15
45
|
categoriesIds: string[];
|
|
16
46
|
dimensions?: Dimensions;
|
|
17
|
-
|
|
47
|
+
variants: VariantType[];
|
|
18
48
|
tags?: string[];
|
|
19
49
|
branchesIds?: string[];
|
|
20
50
|
modifiers?: Modifier[];
|
|
21
51
|
hasModifiers?: boolean;
|
|
22
|
-
composition?: CompositionType[];
|
|
23
|
-
isComposite?: boolean;
|
|
24
52
|
isSellable?: boolean;
|
|
25
|
-
|
|
53
|
+
usageTypes?: UsageTypes;
|
|
54
|
+
label?: Label;
|
|
26
55
|
hasVariants?: boolean;
|
|
27
|
-
|
|
56
|
+
sort?: number;
|
|
57
|
+
isActive: boolean;
|
|
28
58
|
specifications?: {
|
|
29
59
|
active: boolean;
|
|
30
60
|
values: any[];
|
|
31
61
|
};
|
|
32
|
-
availableFor?: [];
|
|
62
|
+
availableFor?: string[];
|
|
63
|
+
vendorId: any;
|
|
33
64
|
linkedProduct?: any;
|
|
34
65
|
createdAt?: Date;
|
|
35
66
|
updatedAt?: Date;
|
|
36
|
-
isActive: boolean;
|
|
37
|
-
vendorId: any;
|
|
38
67
|
}
|
|
39
68
|
export interface Modifier {
|
|
40
69
|
name?: NameType;
|
|
@@ -80,6 +109,7 @@ export interface Cart {
|
|
|
80
109
|
discount: number;
|
|
81
110
|
delivery: number;
|
|
82
111
|
total: number;
|
|
112
|
+
tax?: number;
|
|
83
113
|
totalsByUnit?: Record<UnitTypeValue, number>;
|
|
84
114
|
}
|
|
85
115
|
export interface CartModelType extends Cart {
|
|
@@ -115,31 +145,6 @@ export interface Category {
|
|
|
115
145
|
isActive: boolean;
|
|
116
146
|
vendorId: string | any;
|
|
117
147
|
}
|
|
118
|
-
export interface CompositionType {
|
|
119
|
-
componentId: string;
|
|
120
|
-
variantId: string;
|
|
121
|
-
quantity: number;
|
|
122
|
-
priceOverride?: number;
|
|
123
|
-
}
|
|
124
|
-
export interface VariantType {
|
|
125
|
-
variantId: string;
|
|
126
|
-
sku?: string;
|
|
127
|
-
priceModel: PriceModel;
|
|
128
|
-
stockHandle: StockHandle;
|
|
129
|
-
attributes?: VariantAttribute[];
|
|
130
|
-
files?: FileType[];
|
|
131
|
-
barcode?: string;
|
|
132
|
-
isActive?: boolean;
|
|
133
|
-
sortOrder?: number;
|
|
134
|
-
}
|
|
135
|
-
export interface VariantAttribute {
|
|
136
|
-
type: string;
|
|
137
|
-
value: string;
|
|
138
|
-
displayValue: NameType;
|
|
139
|
-
displayType: 'color' | 'text' | string;
|
|
140
|
-
hexColor?: string;
|
|
141
|
-
imageUrl?: string;
|
|
142
|
-
}
|
|
143
148
|
export interface GroupedCategory {
|
|
144
149
|
categoryName: NameType;
|
|
145
150
|
products: ProductType[];
|
|
@@ -180,7 +185,6 @@ export interface OrderType {
|
|
|
180
185
|
category?: string;
|
|
181
186
|
discountedAmount?: number;
|
|
182
187
|
};
|
|
183
|
-
tax?: number;
|
|
184
188
|
processedBy?: mongoose.Types.ObjectId | string;
|
|
185
189
|
deliveredBy?: mongoose.Types.ObjectId | string;
|
|
186
190
|
terminalId?: string;
|