@betterstore/sdk 0.3.40 → 0.3.41
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/CHANGELOG.md +6 -0
- package/dist/index.d.mts +9 -15
- package/dist/index.d.ts +9 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -41,11 +41,12 @@ interface VariantOption {
|
|
|
41
41
|
interface ProductVariant {
|
|
42
42
|
sku: string;
|
|
43
43
|
images: string[];
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
isPhysical: boolean;
|
|
45
|
+
weightInGrams?: number;
|
|
46
|
+
heightInCm?: number;
|
|
47
|
+
widthInCm?: number;
|
|
48
|
+
lengthInCm?: number;
|
|
47
49
|
priceInCents: number;
|
|
48
|
-
productId: string;
|
|
49
50
|
variantOptions: VariantOption[];
|
|
50
51
|
}
|
|
51
52
|
interface ProductOption {
|
|
@@ -91,24 +92,17 @@ interface ZasilkovnaRate extends BaseRate {
|
|
|
91
92
|
clientSecret: string;
|
|
92
93
|
}
|
|
93
94
|
|
|
95
|
+
type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents"> & {
|
|
96
|
+
selectedVariant: Pick<ProductVariant, "sku" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "variantOptions">;
|
|
97
|
+
};
|
|
94
98
|
interface LineItem {
|
|
95
99
|
quantity: number;
|
|
96
|
-
productId: string;
|
|
97
100
|
variantOptions: {
|
|
98
101
|
name: string;
|
|
99
102
|
value: string;
|
|
100
103
|
}[];
|
|
101
104
|
discountId?: string;
|
|
102
|
-
product
|
|
103
|
-
productVariants: {
|
|
104
|
-
variantOptions: {
|
|
105
|
-
name: string;
|
|
106
|
-
value: string;
|
|
107
|
-
}[];
|
|
108
|
-
priceInCents: number;
|
|
109
|
-
images: string[];
|
|
110
|
-
}[];
|
|
111
|
-
};
|
|
105
|
+
product: ProductData;
|
|
112
106
|
metadata?: string;
|
|
113
107
|
}
|
|
114
108
|
interface LineItemCreate extends Omit<LineItem, "product" | "metadata"> {
|
package/dist/index.d.ts
CHANGED
|
@@ -41,11 +41,12 @@ interface VariantOption {
|
|
|
41
41
|
interface ProductVariant {
|
|
42
42
|
sku: string;
|
|
43
43
|
images: string[];
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
isPhysical: boolean;
|
|
45
|
+
weightInGrams?: number;
|
|
46
|
+
heightInCm?: number;
|
|
47
|
+
widthInCm?: number;
|
|
48
|
+
lengthInCm?: number;
|
|
47
49
|
priceInCents: number;
|
|
48
|
-
productId: string;
|
|
49
50
|
variantOptions: VariantOption[];
|
|
50
51
|
}
|
|
51
52
|
interface ProductOption {
|
|
@@ -91,24 +92,17 @@ interface ZasilkovnaRate extends BaseRate {
|
|
|
91
92
|
clientSecret: string;
|
|
92
93
|
}
|
|
93
94
|
|
|
95
|
+
type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents"> & {
|
|
96
|
+
selectedVariant: Pick<ProductVariant, "sku" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "variantOptions">;
|
|
97
|
+
};
|
|
94
98
|
interface LineItem {
|
|
95
99
|
quantity: number;
|
|
96
|
-
productId: string;
|
|
97
100
|
variantOptions: {
|
|
98
101
|
name: string;
|
|
99
102
|
value: string;
|
|
100
103
|
}[];
|
|
101
104
|
discountId?: string;
|
|
102
|
-
product
|
|
103
|
-
productVariants: {
|
|
104
|
-
variantOptions: {
|
|
105
|
-
name: string;
|
|
106
|
-
value: string;
|
|
107
|
-
}[];
|
|
108
|
-
priceInCents: number;
|
|
109
|
-
images: string[];
|
|
110
|
-
}[];
|
|
111
|
-
};
|
|
105
|
+
product: ProductData;
|
|
112
106
|
metadata?: string;
|
|
113
107
|
}
|
|
114
108
|
interface LineItemCreate extends Omit<LineItem, "product" | "metadata"> {
|