@open-tender/store 0.3.76 → 0.3.77

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.
@@ -76,7 +76,6 @@ export declare const resetPosCheckout: import("@reduxjs/toolkit").ActionCreatorW
76
76
  export declare const selectPosCheckout: (state: AppState) => CheckoutState;
77
77
  export declare const selectPosCheck: (state: AppState) => Order | null;
78
78
  export declare const selectPosCustomer: (state: AppState) => CustomerCheckout | null;
79
- export declare const selectPosCustomerProfile: (state: AppState) => import("../types").Customer | null;
80
79
  export declare const selectPosCustomerName: (state: AppState) => string | null;
81
80
  export declare const selectPosCustomerNameShort: (state: AppState) => string | null;
82
81
  export declare const selectPosPendingDiscounts: (state: AppState) => boolean;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.checkoutReducer = exports.selectPosCheckGiftCardCodes = exports.selectPosCheckTenders = exports.selectPosCheckTotal = exports.selectPosAmountDue = exports.selectPosPendingDiscounts = exports.selectPosCustomerNameShort = exports.selectPosCustomerName = exports.selectPosCustomerProfile = exports.selectPosCustomer = exports.selectPosCheck = exports.selectPosCheckout = exports.setPoints = exports.setPendingDiscounts = exports.removeCustomer = exports.addCustomer = exports.setTaxExempt = exports.removeTip = exports.addTip = exports.removeTax = exports.addTax = exports.removeDiscount = exports.addDiscount = exports.removeSurcharge = exports.addSurcharge = exports.removeGiftCard = exports.addGiftCard = exports.handleCheckoutError = exports.resetPosCheck = exports.resetPosCheckout = exports.activateGiftCards = exports.voidPosOrder = exports.submitPosOrder = exports.validatePosOrder = exports.completeChipDNA = exports.identifyCustomer = exports.updateCart = exports.updateTender = exports.removeTender = exports.addTender = exports.CheckoutActionType = void 0;
4
+ exports.checkoutReducer = exports.selectPosCheckGiftCardCodes = exports.selectPosCheckTenders = exports.selectPosCheckTotal = exports.selectPosAmountDue = exports.selectPosPendingDiscounts = exports.selectPosCustomerNameShort = exports.selectPosCustomerName = exports.selectPosCustomer = exports.selectPosCheck = exports.selectPosCheckout = exports.setPoints = exports.setPendingDiscounts = exports.removeCustomer = exports.addCustomer = exports.setTaxExempt = exports.removeTip = exports.addTip = exports.removeTax = exports.addTax = exports.removeDiscount = exports.addDiscount = exports.removeSurcharge = exports.addSurcharge = exports.removeGiftCard = exports.addGiftCard = exports.handleCheckoutError = exports.resetPosCheck = exports.resetPosCheckout = exports.activateGiftCards = exports.voidPosOrder = exports.submitPosOrder = exports.validatePosOrder = exports.completeChipDNA = exports.identifyCustomer = exports.updateCart = exports.updateTender = exports.removeTender = exports.addTender = exports.CheckoutActionType = void 0;
5
5
  var tslib_1 = require("tslib");
6
6
  var toolkit_1 = require("@reduxjs/toolkit");
7
7
  var uuid_1 = require("uuid");
@@ -643,26 +643,17 @@ var selectPosCheck = function (state) { return state.checkout.check; };
643
643
  exports.selectPosCheck = selectPosCheck;
644
644
  var selectPosCustomer = function (state) { return state.checkout.customer; };
645
645
  exports.selectPosCustomer = selectPosCustomer;
646
- var selectPosCustomerProfile = function (state) {
647
- if (!state.checkout.customer)
648
- return null;
649
- var customer = state.checkout.customer.customer;
650
- return customer;
651
- };
652
- exports.selectPosCustomerProfile = selectPosCustomerProfile;
653
646
  var selectPosCustomerName = function (state) {
654
647
  if (!state.checkout.customer)
655
648
  return null;
656
- var customer = state.checkout.customer.customer;
657
- var first_name = customer.first_name, last_name = customer.last_name;
649
+ var _a = state.checkout.customer, first_name = _a.first_name, last_name = _a.last_name;
658
650
  return "".concat(first_name, " ").concat(last_name);
659
651
  };
660
652
  exports.selectPosCustomerName = selectPosCustomerName;
661
653
  var selectPosCustomerNameShort = function (state) {
662
654
  if (!state.checkout.customer)
663
655
  return null;
664
- var customer = state.checkout.customer.customer;
665
- var first_name = customer.first_name, last_name = customer.last_name;
656
+ var _a = state.checkout.customer, first_name = _a.first_name, last_name = _a.last_name;
666
657
  var lastName = (last_name === null || last_name === void 0 ? void 0 : last_name.charAt(0)) || '';
667
658
  return "".concat(first_name, " ").concat(lastName);
668
659
  };
@@ -28,7 +28,11 @@ export interface CustomerDiscount {
28
28
  }
29
29
  export declare type CustomerDiscounts = Array<CustomerDiscount>;
30
30
  export interface CustomerCheckout {
31
- customer: Customer;
31
+ customer_id: number;
32
+ first_name: string;
33
+ last_name: string;
34
+ email: string;
35
+ phone: string;
32
36
  discounts: CustomerDiscounts;
33
37
  points: any;
34
38
  discount: any;
@@ -76,7 +76,6 @@ export declare const resetPosCheckout: import("@reduxjs/toolkit").ActionCreatorW
76
76
  export declare const selectPosCheckout: (state: AppState) => CheckoutState;
77
77
  export declare const selectPosCheck: (state: AppState) => Order | null;
78
78
  export declare const selectPosCustomer: (state: AppState) => CustomerCheckout | null;
79
- export declare const selectPosCustomerProfile: (state: AppState) => import("../types").Customer | null;
80
79
  export declare const selectPosCustomerName: (state: AppState) => string | null;
81
80
  export declare const selectPosCustomerNameShort: (state: AppState) => string | null;
82
81
  export declare const selectPosPendingDiscounts: (state: AppState) => boolean;
@@ -637,24 +637,16 @@ export var resetPosCheckout = (_a = checkoutSlice.actions, _a.resetPosCheckout),
637
637
  export var selectPosCheckout = function (state) { return state.checkout; };
638
638
  export var selectPosCheck = function (state) { return state.checkout.check; };
639
639
  export var selectPosCustomer = function (state) { return state.checkout.customer; };
640
- export var selectPosCustomerProfile = function (state) {
641
- if (!state.checkout.customer)
642
- return null;
643
- var customer = state.checkout.customer.customer;
644
- return customer;
645
- };
646
640
  export var selectPosCustomerName = function (state) {
647
641
  if (!state.checkout.customer)
648
642
  return null;
649
- var customer = state.checkout.customer.customer;
650
- var first_name = customer.first_name, last_name = customer.last_name;
643
+ var _a = state.checkout.customer, first_name = _a.first_name, last_name = _a.last_name;
651
644
  return "".concat(first_name, " ").concat(last_name);
652
645
  };
653
646
  export var selectPosCustomerNameShort = function (state) {
654
647
  if (!state.checkout.customer)
655
648
  return null;
656
- var customer = state.checkout.customer.customer;
657
- var first_name = customer.first_name, last_name = customer.last_name;
649
+ var _a = state.checkout.customer, first_name = _a.first_name, last_name = _a.last_name;
658
650
  var lastName = (last_name === null || last_name === void 0 ? void 0 : last_name.charAt(0)) || '';
659
651
  return "".concat(first_name, " ").concat(lastName);
660
652
  };
@@ -28,7 +28,11 @@ export interface CustomerDiscount {
28
28
  }
29
29
  export declare type CustomerDiscounts = Array<CustomerDiscount>;
30
30
  export interface CustomerCheckout {
31
- customer: Customer;
31
+ customer_id: number;
32
+ first_name: string;
33
+ last_name: string;
34
+ email: string;
35
+ phone: string;
32
36
  discounts: CustomerDiscounts;
33
37
  points: any;
34
38
  discount: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "0.3.76",
3
+ "version": "0.3.77",
4
4
  "description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",