@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.d.mts +5312 -1592
- package/dist/index.d.ts +5312 -1592
- package/dist/index.js +7 -11
- package/dist/index.mjs +7 -11
- package/package.json +1 -1
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|