@betterstore/sdk 0.3.15 → 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,11 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.16
4
+
5
+ ### Patch Changes
6
+
7
+ - multi currency functionality
8
+
3
9
  ## 0.3.15
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -91,16 +91,22 @@ interface LineItem {
91
91
  product?: Pick<Product, "title" | "priceInCents" | "images">;
92
92
  metadata?: string;
93
93
  }
94
+ type Currency = {
95
+ code: string;
96
+ exchangeRate: number;
97
+ };
94
98
  interface CheckoutCreateParams {
95
99
  type: "hosted" | "embed";
96
100
  customerId?: string;
97
101
  lineItems: LineItem[];
102
+ currency?: Currency;
98
103
  }
99
104
  interface CheckoutUpdateParams {
100
105
  lineItems?: LineItem[];
101
106
  customerId?: string;
102
107
  tax?: number;
103
108
  shipping?: number;
109
+ currency?: Currency;
104
110
  shippingInfo?: {
105
111
  rateId: string;
106
112
  provider?: string;
@@ -121,6 +127,7 @@ interface CheckoutSession {
121
127
  tax?: number;
122
128
  shipping?: number;
123
129
  currency: string;
130
+ exchangeRate: number;
124
131
  status: "IN_PROGRESS" | "PAYMENT_PENDING" | "ABANDONED" | "CANCELED" | "FAILED";
125
132
  customer?: {
126
133
  id: string;
@@ -227,4 +234,4 @@ declare function createStoreClient(config: {
227
234
  proxy?: string;
228
235
  }): Client;
229
236
 
230
- 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
@@ -91,16 +91,22 @@ interface LineItem {
91
91
  product?: Pick<Product, "title" | "priceInCents" | "images">;
92
92
  metadata?: string;
93
93
  }
94
+ type Currency = {
95
+ code: string;
96
+ exchangeRate: number;
97
+ };
94
98
  interface CheckoutCreateParams {
95
99
  type: "hosted" | "embed";
96
100
  customerId?: string;
97
101
  lineItems: LineItem[];
102
+ currency?: Currency;
98
103
  }
99
104
  interface CheckoutUpdateParams {
100
105
  lineItems?: LineItem[];
101
106
  customerId?: string;
102
107
  tax?: number;
103
108
  shipping?: number;
109
+ currency?: Currency;
104
110
  shippingInfo?: {
105
111
  rateId: string;
106
112
  provider?: string;
@@ -121,6 +127,7 @@ interface CheckoutSession {
121
127
  tax?: number;
122
128
  shipping?: number;
123
129
  currency: string;
130
+ exchangeRate: number;
124
131
  status: "IN_PROGRESS" | "PAYMENT_PENDING" | "ABANDONED" | "CANCELED" | "FAILED";
125
132
  customer?: {
126
133
  id: string;
@@ -227,4 +234,4 @@ declare function createStoreClient(config: {
227
234
  proxy?: string;
228
235
  }): Client;
229
236
 
230
- 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.15",
3
+ "version": "0.3.16",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {