@betterstore/sdk 0.6.5 → 0.6.6

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/dist/index.js CHANGED
@@ -439,7 +439,7 @@ var Collections = class {
439
439
  this.apiClient = createApiClient(apiKey, proxy);
440
440
  }
441
441
  async list(params) {
442
- const data = await this.apiClient.post(`/collections`, params);
442
+ const data = await this.apiClient.post(`/collections`, params ?? {});
443
443
  if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("collections" in data)) {
444
444
  return [];
445
445
  }
@@ -533,7 +533,7 @@ var Discounts = class {
533
533
  async list(params) {
534
534
  const data = await this.apiClient.post(
535
535
  "/discounts",
536
- params
536
+ params ?? {}
537
537
  );
538
538
  if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("discounts" in data)) {
539
539
  return [];
@@ -563,7 +563,7 @@ var Products = class {
563
563
  async list(params) {
564
564
  const data = await this.apiClient.post(
565
565
  "/products",
566
- params
566
+ params ?? {}
567
567
  );
568
568
  if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("products" in data)) {
569
569
  return [];
package/dist/index.mjs CHANGED
@@ -399,7 +399,7 @@ var Collections = class {
399
399
  this.apiClient = createApiClient(apiKey, proxy);
400
400
  }
401
401
  async list(params) {
402
- const data = await this.apiClient.post(`/collections`, params);
402
+ const data = await this.apiClient.post(`/collections`, params ?? {});
403
403
  if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("collections" in data)) {
404
404
  return [];
405
405
  }
@@ -493,7 +493,7 @@ var Discounts = class {
493
493
  async list(params) {
494
494
  const data = await this.apiClient.post(
495
495
  "/discounts",
496
- params
496
+ params ?? {}
497
497
  );
498
498
  if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("discounts" in data)) {
499
499
  return [];
@@ -523,7 +523,7 @@ var Products = class {
523
523
  async list(params) {
524
524
  const data = await this.apiClient.post(
525
525
  "/products",
526
- params
526
+ params ?? {}
527
527
  );
528
528
  if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("products" in data)) {
529
529
  return [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",