@open-tender/cloud 0.3.1 → 0.3.3

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/.DS_Store CHANGED
Binary file
@@ -113,6 +113,7 @@ declare class OpenTenderAPI {
113
113
  postResetPassword(new_password: string, token: string): Promise<unknown>;
114
114
  getCustomer(token: string): Promise<unknown>;
115
115
  putCustomer(token: string, data: any): Promise<unknown>;
116
+ deleteCustomer(token: string): Promise<void | null | undefined>;
116
117
  postCustomerPosToken(token: string, posToken: string): Promise<unknown>;
117
118
  postSendVerificationEmail(token: string, linkUrl: string): Promise<unknown>;
118
119
  postVerifyAccount(verifyToken: string): Promise<unknown>;
@@ -541,6 +541,9 @@ class OpenTenderAPI {
541
541
  putCustomer(token, data) {
542
542
  return this.request(`/customer`, 'PUT', data, null, token);
543
543
  }
544
+ deleteCustomer(token) {
545
+ return this.request(`/customer`, 'DELETE', null, null, token);
546
+ }
544
547
  postCustomerPosToken(token, posToken) {
545
548
  const data = { pos_token: posToken };
546
549
  return this.request(`/customer/pos-token`, 'POST', data, null, token);
@@ -67,8 +67,7 @@ exports.selectCustomerLoyaltyProgram = (0, toolkit_1.createSelector)((state) =>
67
67
  const { entities, loading, error } = state.customer.loyalty;
68
68
  return { entities, loading, error };
69
69
  }, ({ entities, loading, error }) => {
70
- const programs = entities.filter(i => (i.loyalty_type === 'CREDIT' || i.loyalty_type === 'POINTS') &&
71
- (i.spend.order_type === null || i.spend.order_type === 'OLO'));
70
+ const programs = entities.filter(i => i.spend.order_type === null || i.spend.order_type === 'OLO');
72
71
  const program = programs.length ? programs[0] : null;
73
72
  return { program, loading, error };
74
73
  });
@@ -113,6 +113,7 @@ declare class OpenTenderAPI {
113
113
  postResetPassword(new_password: string, token: string): Promise<unknown>;
114
114
  getCustomer(token: string): Promise<unknown>;
115
115
  putCustomer(token: string, data: any): Promise<unknown>;
116
+ deleteCustomer(token: string): Promise<void | null | undefined>;
116
117
  postCustomerPosToken(token: string, posToken: string): Promise<unknown>;
117
118
  postSendVerificationEmail(token: string, linkUrl: string): Promise<unknown>;
118
119
  postVerifyAccount(verifyToken: string): Promise<unknown>;
@@ -539,6 +539,9 @@ class OpenTenderAPI {
539
539
  putCustomer(token, data) {
540
540
  return this.request(`/customer`, 'PUT', data, null, token);
541
541
  }
542
+ deleteCustomer(token) {
543
+ return this.request(`/customer`, 'DELETE', null, null, token);
544
+ }
542
545
  postCustomerPosToken(token, posToken) {
543
546
  const data = { pos_token: posToken };
544
547
  return this.request(`/customer/pos-token`, 'POST', data, null, token);
@@ -62,8 +62,7 @@ export const selectCustomerLoyaltyProgram = createSelector((state) => {
62
62
  const { entities, loading, error } = state.customer.loyalty;
63
63
  return { entities, loading, error };
64
64
  }, ({ entities, loading, error }) => {
65
- const programs = entities.filter(i => (i.loyalty_type === 'CREDIT' || i.loyalty_type === 'POINTS') &&
66
- (i.spend.order_type === null || i.spend.order_type === 'OLO'));
65
+ const programs = entities.filter(i => i.spend.order_type === null || i.spend.order_type === 'OLO');
67
66
  const program = programs.length ? programs[0] : null;
68
67
  return { program, loading, error };
69
68
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/cloud",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",