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