@marteye/studiojs 1.1.31 → 1.1.32
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.ts +7 -2
- package/dist/index.esm.js +9 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/resources/customers.d.ts +6 -1
- package/dist/resources.d.ts +1 -1
- package/dist/studio.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -184,8 +184,12 @@ function create$b(httpClient) {
|
|
|
184
184
|
// Path: studiojs/src/resources/markets.ts
|
|
185
185
|
function create$a(httpClient) {
|
|
186
186
|
let customers = {
|
|
187
|
-
list: async (marketId) => {
|
|
188
|
-
|
|
187
|
+
list: async (marketId, lastId) => {
|
|
188
|
+
let params = {};
|
|
189
|
+
if (lastId) {
|
|
190
|
+
params.lastId = lastId;
|
|
191
|
+
}
|
|
192
|
+
return httpClient.get(`/${marketId}/customers`, params);
|
|
189
193
|
},
|
|
190
194
|
get: async (marketId, customerId) => {
|
|
191
195
|
return httpClient.get(`/${marketId}/customers/${customerId}`);
|
|
@@ -212,9 +216,9 @@ function create$a(httpClient) {
|
|
|
212
216
|
return null;
|
|
213
217
|
},
|
|
214
218
|
getByMartEyeUid: async (marketId, marteyeUid) => {
|
|
215
|
-
|
|
216
|
-
if (customers.length) {
|
|
217
|
-
return customers[0];
|
|
219
|
+
const response = await httpClient.get(`/${marketId}/customers`, { marteyeUid });
|
|
220
|
+
if (response.customers && response.customers.length > 0) {
|
|
221
|
+
return response.customers[0];
|
|
218
222
|
}
|
|
219
223
|
return null;
|
|
220
224
|
},
|