@marteye/studiojs 1.1.31 → 1.1.33

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 CHANGED
@@ -190,6 +190,7 @@ interface MartEyeLiveSaleSettings {
190
190
  hideReplay?: boolean;
191
191
  labels?: string[];
192
192
  tags?: string[];
193
+ queueLots?: boolean;
193
194
  }
194
195
  interface MartEyeTimedSaleSettings {
195
196
  description?: string;
@@ -1253,6 +1254,11 @@ interface CreateCustomerPayload {
1253
1254
  };
1254
1255
  marteyeUid?: string;
1255
1256
  }
1257
+ interface CustomersListResponse {
1258
+ customers: Customer[];
1259
+ lastId: string | null;
1260
+ hasMore: boolean;
1261
+ }
1256
1262
 
1257
1263
  interface CreateApplicationPayload {
1258
1264
  displayName: string;
@@ -1360,6 +1366,7 @@ declare function resources(httpClient: HttpClient): {
1360
1366
  pin?: boolean;
1361
1367
  cascade?: boolean;
1362
1368
  reportEmail?: string;
1369
+ queueLots?: boolean;
1363
1370
  } | null;
1364
1371
  }) => Promise<Sale>;
1365
1372
  };
@@ -1456,7 +1463,7 @@ declare function resources(httpClient: HttpClient): {
1456
1463
  get: (marketId: string, id: string) => Promise<TaxRate>;
1457
1464
  };
1458
1465
  customers: {
1459
- list: (marketId: string) => Promise<Customer>;
1466
+ list: (marketId: string, lastId?: string) => Promise<CustomersListResponse>;
1460
1467
  get: (marketId: string, customerId: string) => Promise<Customer>;
1461
1468
  avatar: (marketId: string, customerId: string) => Promise<Customer>;
1462
1469
  create: (marketId: string, customerData: CreateCustomerPayload) => Promise<Customer>;
@@ -1559,6 +1566,7 @@ declare function Studio(info?: {
1559
1566
  pin?: boolean;
1560
1567
  cascade?: boolean;
1561
1568
  reportEmail?: string;
1569
+ queueLots?: boolean;
1562
1570
  } | null;
1563
1571
  }) => Promise<Sale>;
1564
1572
  };
@@ -1655,7 +1663,7 @@ declare function Studio(info?: {
1655
1663
  get: (marketId: string, id: string) => Promise<TaxRate>;
1656
1664
  };
1657
1665
  customers: {
1658
- list: (marketId: string) => Promise<Customer>;
1666
+ list: (marketId: string, lastId?: string) => Promise<CustomersListResponse>;
1659
1667
  get: (marketId: string, customerId: string) => Promise<Customer>;
1660
1668
  avatar: (marketId: string, customerId: string) => Promise<Customer>;
1661
1669
  create: (marketId: string, customerData: CreateCustomerPayload) => Promise<Customer>;
package/dist/index.esm.js CHANGED
@@ -180,8 +180,12 @@ function create$b(httpClient) {
180
180
  // Path: studiojs/src/resources/markets.ts
181
181
  function create$a(httpClient) {
182
182
  let customers = {
183
- list: async (marketId) => {
184
- return httpClient.get(`/${marketId}/customers`);
183
+ list: async (marketId, lastId) => {
184
+ let params = {};
185
+ if (lastId) {
186
+ params.lastId = lastId;
187
+ }
188
+ return httpClient.get(`/${marketId}/customers`, params);
185
189
  },
186
190
  get: async (marketId, customerId) => {
187
191
  return httpClient.get(`/${marketId}/customers/${customerId}`);
@@ -208,9 +212,9 @@ function create$a(httpClient) {
208
212
  return null;
209
213
  },
210
214
  getByMartEyeUid: async (marketId, marteyeUid) => {
211
- let customers = await httpClient.get(`/${marketId}/customers`, { marteyeUid });
212
- if (customers.length) {
213
- return customers[0];
215
+ const response = await httpClient.get(`/${marketId}/customers`, { marteyeUid });
216
+ if (response.customers && response.customers.length > 0) {
217
+ return response.customers[0];
214
218
  }
215
219
  return null;
216
220
  },