@betterstore/sdk 0.3.14 → 0.3.16

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,17 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.16
4
+
5
+ ### Patch Changes
6
+
7
+ - multi currency functionality
8
+
9
+ ## 0.3.15
10
+
11
+ ### Patch Changes
12
+
13
+ - optional product added to line item
14
+
3
15
  ## 0.3.14
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -88,18 +88,25 @@ interface LineItem {
88
88
  value: string;
89
89
  }[];
90
90
  discountId?: string;
91
+ product?: Pick<Product, "title" | "priceInCents" | "images">;
91
92
  metadata?: string;
92
93
  }
94
+ type Currency = {
95
+ code: string;
96
+ exchangeRate: number;
97
+ };
93
98
  interface CheckoutCreateParams {
94
99
  type: "hosted" | "embed";
95
100
  customerId?: string;
96
101
  lineItems: LineItem[];
102
+ currency?: Currency;
97
103
  }
98
104
  interface CheckoutUpdateParams {
99
105
  lineItems?: LineItem[];
100
106
  customerId?: string;
101
107
  tax?: number;
102
108
  shipping?: number;
109
+ currency?: Currency;
103
110
  shippingInfo?: {
104
111
  rateId: string;
105
112
  provider?: string;
@@ -120,6 +127,7 @@ interface CheckoutSession {
120
127
  tax?: number;
121
128
  shipping?: number;
122
129
  currency: string;
130
+ exchangeRate: number;
123
131
  status: "IN_PROGRESS" | "PAYMENT_PENDING" | "ABANDONED" | "CANCELED" | "FAILED";
124
132
  customer?: {
125
133
  id: string;
@@ -226,4 +234,4 @@ declare function createStoreClient(config: {
226
234
  proxy?: string;
227
235
  }): Client;
228
236
 
229
- export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type Product, type ProductOption, ProductStatus, type ProductVariant, type VariantOption, createStoreClient, betterStore as default };
237
+ 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 VariantOption, createStoreClient, betterStore as default };
package/dist/index.d.ts CHANGED
@@ -88,18 +88,25 @@ interface LineItem {
88
88
  value: string;
89
89
  }[];
90
90
  discountId?: string;
91
+ product?: Pick<Product, "title" | "priceInCents" | "images">;
91
92
  metadata?: string;
92
93
  }
94
+ type Currency = {
95
+ code: string;
96
+ exchangeRate: number;
97
+ };
93
98
  interface CheckoutCreateParams {
94
99
  type: "hosted" | "embed";
95
100
  customerId?: string;
96
101
  lineItems: LineItem[];
102
+ currency?: Currency;
97
103
  }
98
104
  interface CheckoutUpdateParams {
99
105
  lineItems?: LineItem[];
100
106
  customerId?: string;
101
107
  tax?: number;
102
108
  shipping?: number;
109
+ currency?: Currency;
103
110
  shippingInfo?: {
104
111
  rateId: string;
105
112
  provider?: string;
@@ -120,6 +127,7 @@ interface CheckoutSession {
120
127
  tax?: number;
121
128
  shipping?: number;
122
129
  currency: string;
130
+ exchangeRate: number;
123
131
  status: "IN_PROGRESS" | "PAYMENT_PENDING" | "ABANDONED" | "CANCELED" | "FAILED";
124
132
  customer?: {
125
133
  id: string;
@@ -226,4 +234,4 @@ declare function createStoreClient(config: {
226
234
  proxy?: string;
227
235
  }): Client;
228
236
 
229
- export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type Product, type ProductOption, ProductStatus, type ProductVariant, type VariantOption, createStoreClient, betterStore as default };
237
+ 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 VariantOption, createStoreClient, betterStore as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.14",
3
+ "version": "0.3.16",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {