@marteye/studiojs 1.1.30 → 1.1.31

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
@@ -1461,7 +1461,7 @@ declare function resources(httpClient: HttpClient): {
1461
1461
  avatar: (marketId: string, customerId: string) => Promise<Customer>;
1462
1462
  create: (marketId: string, customerData: CreateCustomerPayload) => Promise<Customer>;
1463
1463
  getByAccountNumber: (marketId: string, accountNumber: string) => Promise<Customer | null>;
1464
- getByMartEyeUid: (marketId: string, marteyeUid: string) => Promise<Customer>;
1464
+ getByMartEyeUid: (marketId: string, marteyeUid: string) => Promise<Customer | null>;
1465
1465
  };
1466
1466
  search: {
1467
1467
  query: (marketId: string, query: string) => Promise<SearchResult>;
@@ -1660,7 +1660,7 @@ declare function Studio(info?: {
1660
1660
  avatar: (marketId: string, customerId: string) => Promise<Customer>;
1661
1661
  create: (marketId: string, customerData: CreateCustomerPayload) => Promise<Customer>;
1662
1662
  getByAccountNumber: (marketId: string, accountNumber: string) => Promise<Customer | null>;
1663
- getByMartEyeUid: (marketId: string, marteyeUid: string) => Promise<Customer>;
1663
+ getByMartEyeUid: (marketId: string, marteyeUid: string) => Promise<Customer | null>;
1664
1664
  };
1665
1665
  search: {
1666
1666
  query: (marketId: string, query: string) => Promise<SearchResult>;
package/dist/index.esm.js CHANGED
@@ -208,7 +208,11 @@ function create$a(httpClient) {
208
208
  return null;
209
209
  },
210
210
  getByMartEyeUid: async (marketId, marteyeUid) => {
211
- return httpClient.get(`/${marketId}/customers`, { marteyeUid });
211
+ let customers = await httpClient.get(`/${marketId}/customers`, { marteyeUid });
212
+ if (customers.length) {
213
+ return customers[0];
214
+ }
215
+ return null;
212
216
  },
213
217
  };
214
218
  return customers;