@marteye/studiojs 1.1.30 → 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,7 +216,11 @@ function create$a(httpClient) {
212
216
  return null;
213
217
  },
214
218
  getByMartEyeUid: async (marketId, marteyeUid) => {
215
- return httpClient.get(`/${marketId}/customers`, { marteyeUid });
219
+ const response = await httpClient.get(`/${marketId}/customers`, { marteyeUid });
220
+ if (response.customers && response.customers.length > 0) {
221
+ return response.customers[0];
222
+ }
223
+ return null;
216
224
  },
217
225
  };
218
226
  return customers;