@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.41
4
+
5
+ ### Patch Changes
6
+
7
+ - new product items logic update
8
+
3
9
  ## 0.3.40
4
10
 
5
11
  ### Patch Changes
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
- stockAvailable: number;
45
- stockCommited: number;
46
- stockUnavailable: number;
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?: Pick<Product, "title" | "priceInCents" | "images" | "id" | "description" | "category" | "tags"> & {
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
- stockAvailable: number;
45
- stockCommited: number;
46
- stockUnavailable: number;
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?: Pick<Product, "title" | "priceInCents" | "images" | "id" | "description" | "category" | "tags"> & {
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.40",
3
+ "version": "0.3.41",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {