@betterstore/sdk 0.3.20 → 0.3.22
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 +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -229,7 +229,7 @@ declare class Products {
|
|
|
229
229
|
retrieve(productId: string): Promise<Product>;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
declare function
|
|
232
|
+
declare function createBetterStore(config: {
|
|
233
233
|
apiKey: string;
|
|
234
234
|
proxy?: string;
|
|
235
235
|
}): {
|
|
@@ -237,11 +237,11 @@ declare function betterStore(config: {
|
|
|
237
237
|
products: Products;
|
|
238
238
|
customer: Customer;
|
|
239
239
|
};
|
|
240
|
-
declare function createStoreClient(config
|
|
240
|
+
declare function createStoreClient(config?: {
|
|
241
241
|
proxy?: string;
|
|
242
242
|
}): Client;
|
|
243
|
-
declare function createStoreHelpers(config
|
|
243
|
+
declare function createStoreHelpers(config?: {
|
|
244
244
|
proxy?: string;
|
|
245
245
|
}): Helpers;
|
|
246
246
|
|
|
247
|
-
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, createStoreHelpers,
|
|
247
|
+
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, createStoreHelpers, createBetterStore as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -229,7 +229,7 @@ declare class Products {
|
|
|
229
229
|
retrieve(productId: string): Promise<Product>;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
declare function
|
|
232
|
+
declare function createBetterStore(config: {
|
|
233
233
|
apiKey: string;
|
|
234
234
|
proxy?: string;
|
|
235
235
|
}): {
|
|
@@ -237,11 +237,11 @@ declare function betterStore(config: {
|
|
|
237
237
|
products: Products;
|
|
238
238
|
customer: Customer;
|
|
239
239
|
};
|
|
240
|
-
declare function createStoreClient(config
|
|
240
|
+
declare function createStoreClient(config?: {
|
|
241
241
|
proxy?: string;
|
|
242
242
|
}): Client;
|
|
243
|
-
declare function createStoreHelpers(config
|
|
243
|
+
declare function createStoreHelpers(config?: {
|
|
244
244
|
proxy?: string;
|
|
245
245
|
}): Helpers;
|
|
246
246
|
|
|
247
|
-
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, createStoreHelpers,
|
|
247
|
+
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, createStoreHelpers, createBetterStore as default };
|
package/dist/index.js
CHANGED
|
@@ -54,7 +54,7 @@ __export(index_exports, {
|
|
|
54
54
|
ShippingRate: () => import_shippo.Rate,
|
|
55
55
|
createStoreClient: () => createStoreClient,
|
|
56
56
|
createStoreHelpers: () => createStoreHelpers,
|
|
57
|
-
default: () =>
|
|
57
|
+
default: () => createBetterStore
|
|
58
58
|
});
|
|
59
59
|
module.exports = __toCommonJS(index_exports);
|
|
60
60
|
|
|
@@ -378,7 +378,7 @@ var ProductStatus = /* @__PURE__ */ ((ProductStatus2) => {
|
|
|
378
378
|
})(ProductStatus || {});
|
|
379
379
|
|
|
380
380
|
// src/index.ts
|
|
381
|
-
function
|
|
381
|
+
function createBetterStore(config) {
|
|
382
382
|
if (!config.apiKey) {
|
|
383
383
|
throw new Error("API key is required.");
|
|
384
384
|
}
|
|
@@ -389,10 +389,10 @@ function betterStore(config) {
|
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
391
|
function createStoreClient(config) {
|
|
392
|
-
return new client_default(config.proxy);
|
|
392
|
+
return new client_default(config == null ? void 0 : config.proxy);
|
|
393
393
|
}
|
|
394
394
|
function createStoreHelpers(config) {
|
|
395
|
-
return new helpers_default(config.proxy);
|
|
395
|
+
return new helpers_default(config == null ? void 0 : config.proxy);
|
|
396
396
|
}
|
|
397
397
|
// Annotate the CommonJS export names for ESM import in node:
|
|
398
398
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -339,7 +339,7 @@ var ProductStatus = /* @__PURE__ */ ((ProductStatus2) => {
|
|
|
339
339
|
})(ProductStatus || {});
|
|
340
340
|
|
|
341
341
|
// src/index.ts
|
|
342
|
-
function
|
|
342
|
+
function createBetterStore(config) {
|
|
343
343
|
if (!config.apiKey) {
|
|
344
344
|
throw new Error("API key is required.");
|
|
345
345
|
}
|
|
@@ -350,15 +350,15 @@ function betterStore(config) {
|
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
352
|
function createStoreClient(config) {
|
|
353
|
-
return new client_default(config.proxy);
|
|
353
|
+
return new client_default(config == null ? void 0 : config.proxy);
|
|
354
354
|
}
|
|
355
355
|
function createStoreHelpers(config) {
|
|
356
|
-
return new helpers_default(config.proxy);
|
|
356
|
+
return new helpers_default(config == null ? void 0 : config.proxy);
|
|
357
357
|
}
|
|
358
358
|
export {
|
|
359
359
|
ProductStatus,
|
|
360
360
|
Rate as ShippingRate,
|
|
361
361
|
createStoreClient,
|
|
362
362
|
createStoreHelpers,
|
|
363
|
-
|
|
363
|
+
createBetterStore as default
|
|
364
364
|
};
|