@betterstore/sdk 0.3.35 → 0.3.36

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.36
4
+
5
+ ### Patch Changes
6
+
7
+ - line items type changed
8
+
3
9
  ## 0.3.35
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -99,14 +99,26 @@ interface LineItem {
99
99
  value: string;
100
100
  }[];
101
101
  discountId?: string;
102
- product?: Pick<Product, "title" | "priceInCents" | "images">;
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
+ };
103
112
  metadata?: string;
104
113
  }
114
+ interface LineItemCreate extends Omit<LineItem, "product"> {
115
+ product?: Pick<Product, "title" | "priceInCents" | "images">;
116
+ }
105
117
  type Currency = string;
106
118
  interface CheckoutCreateParams {
107
119
  type: "hosted" | "embed";
108
120
  customerId?: string;
109
- lineItems: LineItem[];
121
+ lineItems: LineItemCreate[];
110
122
  currency?: Currency;
111
123
  }
112
124
  interface CheckoutUpdateParams {
@@ -248,4 +260,4 @@ declare function createStoreHelpers(config?: {
248
260
  proxy?: string;
249
261
  }): Helpers;
250
262
 
251
- export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type Product, type ProductOption, ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
263
+ export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type LineItemCreate, type Product, type ProductOption, ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
package/dist/index.d.ts CHANGED
@@ -99,14 +99,26 @@ interface LineItem {
99
99
  value: string;
100
100
  }[];
101
101
  discountId?: string;
102
- product?: Pick<Product, "title" | "priceInCents" | "images">;
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
+ };
103
112
  metadata?: string;
104
113
  }
114
+ interface LineItemCreate extends Omit<LineItem, "product"> {
115
+ product?: Pick<Product, "title" | "priceInCents" | "images">;
116
+ }
105
117
  type Currency = string;
106
118
  interface CheckoutCreateParams {
107
119
  type: "hosted" | "embed";
108
120
  customerId?: string;
109
- lineItems: LineItem[];
121
+ lineItems: LineItemCreate[];
110
122
  currency?: Currency;
111
123
  }
112
124
  interface CheckoutUpdateParams {
@@ -248,4 +260,4 @@ declare function createStoreHelpers(config?: {
248
260
  proxy?: string;
249
261
  }): Helpers;
250
262
 
251
- export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type Product, type ProductOption, ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
263
+ export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type LineItemCreate, type Product, type ProductOption, ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.35",
3
+ "version": "0.3.36",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {