@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.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
- return httpClient.get(`/${marketId}/customers`);
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
- let customers = await httpClient.get(`/${marketId}/customers`, { marteyeUid });
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
  },