@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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.22
4
+
5
+ ### Patch Changes
6
+
7
+ - formatting issue
8
+
9
+ ## 0.3.21
10
+
11
+ ### Patch Changes
12
+
13
+ - params optimalization
14
+
3
15
  ## 0.3.20
4
16
 
5
17
  ### Patch Changes
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 betterStore(config: {
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, betterStore as default };
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 betterStore(config: {
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, betterStore as default };
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: () => betterStore
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 betterStore(config) {
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 betterStore(config) {
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
- betterStore as default
363
+ createBetterStore as default
364
364
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.20",
3
+ "version": "0.3.22",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {