@betterstore/sdk 0.3.8 → 0.3.10
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 +12 -0
- package/dist/index.d.mts +9 -27
- package/dist/index.d.ts +9 -27
- package/dist/index.js +32326 -30
- package/dist/index.mjs +32336 -12
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { Rate } from 'shippo';
|
|
2
|
+
export { Rate as ShippingRate } from 'shippo';
|
|
3
|
+
|
|
1
4
|
type Address = {
|
|
2
5
|
name: string;
|
|
3
6
|
company?: string;
|
|
@@ -85,6 +88,7 @@ interface LineItem {
|
|
|
85
88
|
value: string;
|
|
86
89
|
}[];
|
|
87
90
|
discountId?: string;
|
|
91
|
+
metadata?: string;
|
|
88
92
|
}
|
|
89
93
|
interface CheckoutCreateParams {
|
|
90
94
|
type: "hosted" | "embed";
|
|
@@ -95,35 +99,13 @@ interface CheckoutUpdateParams {
|
|
|
95
99
|
lineItems?: LineItem[];
|
|
96
100
|
customerId?: string;
|
|
97
101
|
}
|
|
98
|
-
|
|
99
|
-
id: string;
|
|
100
|
-
rate: number;
|
|
101
|
-
provider: string;
|
|
102
|
-
service: string;
|
|
103
|
-
estimatedDays: number;
|
|
104
|
-
}
|
|
102
|
+
|
|
105
103
|
interface CheckoutSession {
|
|
106
104
|
id: string;
|
|
107
105
|
createdAt: Date;
|
|
108
106
|
updatedAt: Date;
|
|
109
107
|
clientSecret: string;
|
|
110
|
-
lineItems:
|
|
111
|
-
quantity: number;
|
|
112
|
-
discount?: any;
|
|
113
|
-
variantOptions: {
|
|
114
|
-
name: string;
|
|
115
|
-
value: string;
|
|
116
|
-
}[];
|
|
117
|
-
product?: {
|
|
118
|
-
id: string;
|
|
119
|
-
title: string;
|
|
120
|
-
description?: string;
|
|
121
|
-
images: string[];
|
|
122
|
-
category: string;
|
|
123
|
-
tags: string[];
|
|
124
|
-
priceInCents: number;
|
|
125
|
-
};
|
|
126
|
-
}[];
|
|
108
|
+
lineItems: LineItem[];
|
|
127
109
|
total?: number;
|
|
128
110
|
subtotal?: number;
|
|
129
111
|
tax?: number;
|
|
@@ -154,7 +136,7 @@ declare class Checkout {
|
|
|
154
136
|
/**
|
|
155
137
|
* Get shipping rates for a checkout session
|
|
156
138
|
*/
|
|
157
|
-
getShippingRates(checkoutId: string): Promise<
|
|
139
|
+
getShippingRates(checkoutId: string): Promise<Rate[]>;
|
|
158
140
|
/**
|
|
159
141
|
* Generate payment secret for a checkout session
|
|
160
142
|
*/
|
|
@@ -175,7 +157,7 @@ declare class Client {
|
|
|
175
157
|
/**
|
|
176
158
|
* Get shipping rates for a checkout session
|
|
177
159
|
*/
|
|
178
|
-
getCheckoutShippingRates(clientSecret: string, checkoutId: string): Promise<
|
|
160
|
+
getCheckoutShippingRates(clientSecret: string, checkoutId: string): Promise<Rate[]>;
|
|
179
161
|
/**
|
|
180
162
|
* Generate payment secret for a checkout session
|
|
181
163
|
*/
|
|
@@ -234,4 +216,4 @@ declare function createStoreClient(config: {
|
|
|
234
216
|
proxy?: string;
|
|
235
217
|
}): Client;
|
|
236
218
|
|
|
237
|
-
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
|
|
219
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { Rate } from 'shippo';
|
|
2
|
+
export { Rate as ShippingRate } from 'shippo';
|
|
3
|
+
|
|
1
4
|
type Address = {
|
|
2
5
|
name: string;
|
|
3
6
|
company?: string;
|
|
@@ -85,6 +88,7 @@ interface LineItem {
|
|
|
85
88
|
value: string;
|
|
86
89
|
}[];
|
|
87
90
|
discountId?: string;
|
|
91
|
+
metadata?: string;
|
|
88
92
|
}
|
|
89
93
|
interface CheckoutCreateParams {
|
|
90
94
|
type: "hosted" | "embed";
|
|
@@ -95,35 +99,13 @@ interface CheckoutUpdateParams {
|
|
|
95
99
|
lineItems?: LineItem[];
|
|
96
100
|
customerId?: string;
|
|
97
101
|
}
|
|
98
|
-
|
|
99
|
-
id: string;
|
|
100
|
-
rate: number;
|
|
101
|
-
provider: string;
|
|
102
|
-
service: string;
|
|
103
|
-
estimatedDays: number;
|
|
104
|
-
}
|
|
102
|
+
|
|
105
103
|
interface CheckoutSession {
|
|
106
104
|
id: string;
|
|
107
105
|
createdAt: Date;
|
|
108
106
|
updatedAt: Date;
|
|
109
107
|
clientSecret: string;
|
|
110
|
-
lineItems:
|
|
111
|
-
quantity: number;
|
|
112
|
-
discount?: any;
|
|
113
|
-
variantOptions: {
|
|
114
|
-
name: string;
|
|
115
|
-
value: string;
|
|
116
|
-
}[];
|
|
117
|
-
product?: {
|
|
118
|
-
id: string;
|
|
119
|
-
title: string;
|
|
120
|
-
description?: string;
|
|
121
|
-
images: string[];
|
|
122
|
-
category: string;
|
|
123
|
-
tags: string[];
|
|
124
|
-
priceInCents: number;
|
|
125
|
-
};
|
|
126
|
-
}[];
|
|
108
|
+
lineItems: LineItem[];
|
|
127
109
|
total?: number;
|
|
128
110
|
subtotal?: number;
|
|
129
111
|
tax?: number;
|
|
@@ -154,7 +136,7 @@ declare class Checkout {
|
|
|
154
136
|
/**
|
|
155
137
|
* Get shipping rates for a checkout session
|
|
156
138
|
*/
|
|
157
|
-
getShippingRates(checkoutId: string): Promise<
|
|
139
|
+
getShippingRates(checkoutId: string): Promise<Rate[]>;
|
|
158
140
|
/**
|
|
159
141
|
* Generate payment secret for a checkout session
|
|
160
142
|
*/
|
|
@@ -175,7 +157,7 @@ declare class Client {
|
|
|
175
157
|
/**
|
|
176
158
|
* Get shipping rates for a checkout session
|
|
177
159
|
*/
|
|
178
|
-
getCheckoutShippingRates(clientSecret: string, checkoutId: string): Promise<
|
|
160
|
+
getCheckoutShippingRates(clientSecret: string, checkoutId: string): Promise<Rate[]>;
|
|
179
161
|
/**
|
|
180
162
|
* Generate payment secret for a checkout session
|
|
181
163
|
*/
|
|
@@ -234,4 +216,4 @@ declare function createStoreClient(config: {
|
|
|
234
216
|
proxy?: string;
|
|
235
217
|
}): Client;
|
|
236
218
|
|
|
237
|
-
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
|
|
219
|
+
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 };
|