@betterstore/sdk 0.7.2 → 0.7.4

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
@@ -44,11 +44,13 @@ var BaseClient = class {
44
44
  if (val !== void 0) searchParams.set(key, val);
45
45
  });
46
46
  }
47
- console.log(`${url}?${searchParams.toString()}`);
48
- const res = await fetch(`${url}?${searchParams.toString()}`, {
49
- method: "GET",
50
- headers: this.headers
51
- });
47
+ const res = await fetch(
48
+ `${url}${searchParams.size > 0 ? `?${searchParams.toString()}` : ""}`,
49
+ {
50
+ method: "GET",
51
+ headers: this.headers
52
+ }
53
+ );
52
54
  return this.handleResponse(res);
53
55
  }
54
56
  async post(path, body) {
@@ -131,12 +133,6 @@ var ClientCustomersNamespace = class {
131
133
  data
132
134
  );
133
135
  }
134
- async update(id, data) {
135
- return this.client.post(
136
- `/api/client/customers/update/${id}`,
137
- data
138
- );
139
- }
140
136
  };
141
137
 
142
138
  // src/namespaces/client/client-utils.ts
package/dist/index.mjs CHANGED
@@ -17,11 +17,13 @@ var BaseClient = class {
17
17
  if (val !== void 0) searchParams.set(key, val);
18
18
  });
19
19
  }
20
- console.log(`${url}?${searchParams.toString()}`);
21
- const res = await fetch(`${url}?${searchParams.toString()}`, {
22
- method: "GET",
23
- headers: this.headers
24
- });
20
+ const res = await fetch(
21
+ `${url}${searchParams.size > 0 ? `?${searchParams.toString()}` : ""}`,
22
+ {
23
+ method: "GET",
24
+ headers: this.headers
25
+ }
26
+ );
25
27
  return this.handleResponse(res);
26
28
  }
27
29
  async post(path, body) {
@@ -104,12 +106,6 @@ var ClientCustomersNamespace = class {
104
106
  data
105
107
  );
106
108
  }
107
- async update(id, data) {
108
- return this.client.post(
109
- `/api/client/customers/update/${id}`,
110
- data
111
- );
112
- }
113
109
  };
114
110
 
115
111
  // src/namespaces/client/client-utils.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",