@aptos-scp/scp-component-store-selling-features-domain-model 1.60.0 → 2.0.0

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.
@@ -23,7 +23,6 @@ export declare const BALANCE_INQUIRY_EVENT: string;
23
23
  export declare const BALANCE_INQUIRY_RECEIPT_EVENT: string;
24
24
  export declare const CANCEL_TENDER_SESSION_EVENT: string;
25
25
  export declare const CANCEL_PARTIAL_AUTHORIZATION_EVENT: string;
26
- export declare const CANCEL_TENDER_AUTHORIZATION_EVENT: string;
27
26
  export declare const CHANGE_PASSWORD_EVENT: string;
28
27
  export declare const CLOSE_TERMINAL_EVENT: string;
29
28
  export declare const CLOSE_TRANSACTION_EVENT = "CloseTransaction";
@@ -26,7 +26,6 @@ exports.BALANCE_INQUIRY_EVENT = "BalanceInquiry";
26
26
  exports.BALANCE_INQUIRY_RECEIPT_EVENT = "BalanceInquiryReceipt";
27
27
  exports.CANCEL_TENDER_SESSION_EVENT = "CancelTenderSession";
28
28
  exports.CANCEL_PARTIAL_AUTHORIZATION_EVENT = "CancelPartialAuthorization";
29
- exports.CANCEL_TENDER_AUTHORIZATION_EVENT = "CancelTenderAuthorization";
30
29
  exports.CHANGE_PASSWORD_EVENT = "ChangePassword";
31
30
  exports.CLOSE_TERMINAL_EVENT = "CloseTerminal";
32
31
  exports.CLOSE_TRANSACTION_EVENT = "CloseTransaction";
@@ -166,6 +166,7 @@ export declare enum UiInputKey {
166
166
  GIFT_CARD_PIN = "input_giftCardPin",
167
167
  GIFT_RECEIPT_MODE = "input_giftReceiptMode",
168
168
  INVOICE_NUMBER = "input_invoiceNumber",
169
+ DISPLAY_ACCOUNT_SUMMARY_ON_PED = "input_displayAccountSummaryOnPED",
169
170
  IS_INVOICE = "input_isInvoice",
170
171
  IDENTIFICATION_TYPE = "input_identificationType",
171
172
  ITEM_COMMENT = "input_selectedComment",
@@ -198,6 +199,7 @@ export declare enum UiInputKey {
198
199
  RETURNING_ITEM_FEE = "input_returningItemFee",
199
200
  REFUND_ITEM_FEE_ITEM_LINE_REFERENCE = "input_refundFeeItemItemLineReference",
200
201
  RETURNING_ITEM_QUANTITY = "input_returningItemQuantity",
202
+ SCREEN_TITLE = "input_screenTitle",
201
203
  SHIPPING = "input_shipping",
202
204
  HAS_PROMISED_TO_PAY_WITH_PLCC = "input_hasPromisedToPayWithPLCC",
203
205
  HAS_SHIPPING_FEE_OVERRIDE = "input_hasShippingFeeOverride",
@@ -468,6 +470,7 @@ export declare enum CollectedDataKey {
468
470
  FeesByFulfillmentGroup = "FeesByFulfillmentGroup",
469
471
  FulfillmentGroupId = "FulfillmentGroupId",
470
472
  BusinessDayDate = "BusinessDayDate",
473
+ CancelPaymentFunction = "cancelPaymentFunction",
471
474
  CardNumber = "CardNumber",
472
475
  CashDrawerStatus = "CashDrawerStatus",
473
476
  CashDrawerStatusChangeSuccess = "cashDrawerStatusChangeSuccess",
@@ -1054,4 +1057,9 @@ export interface IPaymentAccountLookupEventData {
1054
1057
  deviceId: string;
1055
1058
  entryMethod?: EntryMethod;
1056
1059
  }
1060
+ export declare const CANCEL_PAYMENT_FUNCTION_EVENT: string;
1061
+ export interface ICancelPaymentFunctionData {
1062
+ deviceId: string;
1063
+ reason?: string;
1064
+ }
1057
1065
  export declare const DELIVERY_SHIPPING_FEE_UPDATED_EVENT: string;
@@ -168,6 +168,7 @@ var UiInputKey;
168
168
  UiInputKey["GIFT_CARD_PIN"] = "input_giftCardPin";
169
169
  UiInputKey["GIFT_RECEIPT_MODE"] = "input_giftReceiptMode";
170
170
  UiInputKey["INVOICE_NUMBER"] = "input_invoiceNumber";
171
+ UiInputKey["DISPLAY_ACCOUNT_SUMMARY_ON_PED"] = "input_displayAccountSummaryOnPED";
171
172
  UiInputKey["IS_INVOICE"] = "input_isInvoice";
172
173
  UiInputKey["IDENTIFICATION_TYPE"] = "input_identificationType";
173
174
  UiInputKey["ITEM_COMMENT"] = "input_selectedComment";
@@ -200,6 +201,7 @@ var UiInputKey;
200
201
  UiInputKey["RETURNING_ITEM_FEE"] = "input_returningItemFee";
201
202
  UiInputKey["REFUND_ITEM_FEE_ITEM_LINE_REFERENCE"] = "input_refundFeeItemItemLineReference";
202
203
  UiInputKey["RETURNING_ITEM_QUANTITY"] = "input_returningItemQuantity";
204
+ UiInputKey["SCREEN_TITLE"] = "input_screenTitle";
203
205
  UiInputKey["SHIPPING"] = "input_shipping";
204
206
  UiInputKey["HAS_PROMISED_TO_PAY_WITH_PLCC"] = "input_hasPromisedToPayWithPLCC";
205
207
  UiInputKey["HAS_SHIPPING_FEE_OVERRIDE"] = "input_hasShippingFeeOverride";
@@ -476,6 +478,7 @@ var CollectedDataKey;
476
478
  CollectedDataKey["FeesByFulfillmentGroup"] = "FeesByFulfillmentGroup";
477
479
  CollectedDataKey["FulfillmentGroupId"] = "FulfillmentGroupId";
478
480
  CollectedDataKey["BusinessDayDate"] = "BusinessDayDate";
481
+ CollectedDataKey["CancelPaymentFunction"] = "cancelPaymentFunction";
479
482
  CollectedDataKey["CardNumber"] = "CardNumber";
480
483
  CollectedDataKey["CashDrawerStatus"] = "CashDrawerStatus";
481
484
  CollectedDataKey["CashDrawerStatusChangeSuccess"] = "cashDrawerStatusChangeSuccess";
@@ -1056,5 +1059,6 @@ var AssignCustomerForReturnAction;
1056
1059
  })(AssignCustomerForReturnAction = exports.AssignCustomerForReturnAction || (exports.AssignCustomerForReturnAction = {}));
1057
1060
  exports.DELIVERY_CONTACT_UPDATED_EVENT = "Delivery.ContactUpdated";
1058
1061
  exports.PAYMENT_ACCOUNT_LOOKUP_EVENT = "PaymentAccount.Lookup";
1062
+ exports.CANCEL_PAYMENT_FUNCTION_EVENT = "Cancel.PaymentFunction";
1059
1063
  exports.DELIVERY_SHIPPING_FEE_UPDATED_EVENT = "Delivery.ShippingFeeUpdated";
1060
1064
  //# sourceMappingURL=Constants.js.map
@@ -12,4 +12,8 @@ export interface IPaymentAccountLookupLine extends ITransactionLine {
12
12
  readonly authorizationDeviceId?: string;
13
13
  readonly accountBalance?: IMoney;
14
14
  readonly tenderName?: string;
15
+ readonly creditLimit?: IMoney;
16
+ readonly minimumPayment?: IMoney;
17
+ readonly paymentDueDate?: string;
18
+ readonly openToBuy?: IMoney;
15
19
  }
@@ -15,6 +15,10 @@ export declare class PaymentAccountLookupLine extends BaseTransactionLine implem
15
15
  private readonly _authorizationDeviceId?;
16
16
  private readonly _accountBalance?;
17
17
  private readonly _tenderName?;
18
+ private readonly _creditLimit?;
19
+ private readonly _minimumPayment?;
20
+ private readonly _paymentDueDate?;
21
+ private readonly _openToBuy?;
18
22
  static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): PaymentAccountLookupLine;
19
23
  static createFromJsonObject(transactionLineJsonObj: any): PaymentAccountLookupLine;
20
24
  get couldAffectPricing(): boolean;
@@ -27,7 +31,11 @@ export declare class PaymentAccountLookupLine extends BaseTransactionLine implem
27
31
  get authorizationDeviceId(): string;
28
32
  get accountBalance(): IMoney;
29
33
  get tenderName(): string;
30
- protected constructor(lineNumber: number, lineType: string, cardHolder: ICardHolder, lookupResult?: PaymentAccountLookupResult, lookupResultReason?: string, accountNumber?: string, cardToken?: string, referenceNumber?: string, authorizationDeviceId?: string, accountBalance?: IMoney, tenderName?: string);
34
+ get creditLimit(): IMoney;
35
+ get minimumPayment(): IMoney;
36
+ get paymentDueDate(): string;
37
+ get openToBuy(): IMoney;
38
+ protected constructor(lineNumber: number, lineType: string, cardHolder: ICardHolder, lookupResult?: PaymentAccountLookupResult, lookupResultReason?: string, accountNumber?: string, cardToken?: string, referenceNumber?: string, authorizationDeviceId?: string, accountBalance?: IMoney, tenderName?: string, creditLimit?: IMoney, minimumPayment?: IMoney, paymentDueDate?: string, openToBuy?: IMoney);
31
39
  protected newTransactionLine(): PaymentAccountLookupLine;
32
40
  }
33
41
  export declare function isPaymentAccountLookupLine(transactionLine: ITransactionLine): transactionLine is PaymentAccountLookupLine;
@@ -6,7 +6,7 @@ const BaseTransactionLine_1 = require("../BaseTransactionLine");
6
6
  const Constants_1 = require("../Constants");
7
7
  exports.PAYMENT_ACCOUNT_LOOKUP_LINE_TYPE = "PaymentAccountLookup";
8
8
  class PaymentAccountLookupLine extends BaseTransactionLine_1.BaseTransactionLine {
9
- constructor(lineNumber, lineType, cardHolder, lookupResult, lookupResultReason, accountNumber, cardToken, referenceNumber, authorizationDeviceId, accountBalance, tenderName) {
9
+ constructor(lineNumber, lineType, cardHolder, lookupResult, lookupResultReason, accountNumber, cardToken, referenceNumber, authorizationDeviceId, accountBalance, tenderName, creditLimit, minimumPayment, paymentDueDate, openToBuy) {
10
10
  super(lineNumber, lineType);
11
11
  this._cardHolder = cardHolder;
12
12
  this._lookupResult = lookupResult;
@@ -17,9 +17,13 @@ class PaymentAccountLookupLine extends BaseTransactionLine_1.BaseTransactionLine
17
17
  this._authorizationDeviceId = authorizationDeviceId;
18
18
  this._accountBalance = accountBalance;
19
19
  this._tenderName = tenderName;
20
+ this._creditLimit = creditLimit;
21
+ this._minimumPayment = minimumPayment;
22
+ this._paymentDueDate = paymentDueDate;
23
+ this._openToBuy = openToBuy;
20
24
  }
21
25
  static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
22
- var _a, _b, _c, _d, _e, _f, _g;
26
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
23
27
  const accountLookupResponse = collectedData.get(Constants_1.CollectedDataKey.TenderAuthResponse);
24
28
  const lookupResult = convertResponseCodeToLookupResult((_a = accountLookupResponse) === null || _a === void 0 ? void 0 : _a.responseCode);
25
29
  const lookupResultReason = (_b = accountLookupResponse) === null || _b === void 0 ? void 0 : _b.status;
@@ -28,9 +32,13 @@ class PaymentAccountLookupLine extends BaseTransactionLine_1.BaseTransactionLine
28
32
  const cardToken = (_e = accountLookupResponse) === null || _e === void 0 ? void 0 : _e.cardToken;
29
33
  const referenceNumber = (_f = accountLookupResponse) === null || _f === void 0 ? void 0 : _f.referenceNumber;
30
34
  const accountBalance = (_g = accountLookupResponse) === null || _g === void 0 ? void 0 : _g.balance;
35
+ const creditLimit = (_h = accountLookupResponse) === null || _h === void 0 ? void 0 : _h.creditLimit;
36
+ const minimumPayment = (_j = accountLookupResponse) === null || _j === void 0 ? void 0 : _j.minimumPaymentDue;
37
+ const paymentDueDate = (_k = accountLookupResponse) === null || _k === void 0 ? void 0 : _k.paymentDueDate;
38
+ const openToBuy = (_l = accountLookupResponse) === null || _l === void 0 ? void 0 : _l.openToBuy;
31
39
  const authorizationDeviceId = collectedData.get(Constants_1.CollectedDataKey.AuthorizationDeviceId);
32
40
  const tenderName = collectedData.get(Constants_1.CollectedDataKey.TenderName);
33
- return new PaymentAccountLookupLine(lineNumber, lineType, cardHolder, lookupResult, lookupResultReason, accountNumber, cardToken, referenceNumber, authorizationDeviceId, accountBalance, tenderName);
41
+ return new PaymentAccountLookupLine(lineNumber, lineType, cardHolder, lookupResult, lookupResultReason, accountNumber, cardToken, referenceNumber, authorizationDeviceId, accountBalance, tenderName, creditLimit, minimumPayment, paymentDueDate, openToBuy);
34
42
  }
35
43
  static createFromJsonObject(transactionLineJsonObj) {
36
44
  const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
@@ -44,7 +52,11 @@ class PaymentAccountLookupLine extends BaseTransactionLine_1.BaseTransactionLine
44
52
  const authorizationDeviceId = transactionLineJsonObj._authorizationDeviceId;
45
53
  const accountBalance = transactionLineJsonObj._accountBalance;
46
54
  const tenderName = transactionLineJsonObj._tenderName;
47
- const accountLookupLine = new PaymentAccountLookupLine(lineNumber, lineType, cardHolder, lookupResult, lookupResultReason, accountNumber, cardToken, referenceNumber, authorizationDeviceId, accountBalance, tenderName);
55
+ const creditLimit = transactionLineJsonObj._creditLimit;
56
+ const minimumPayment = transactionLineJsonObj._minimumPayment;
57
+ const paymentDueDate = transactionLineJsonObj._paymentDueDate;
58
+ const openToBuy = transactionLineJsonObj._openToBuy;
59
+ const accountLookupLine = new PaymentAccountLookupLine(lineNumber, lineType, cardHolder, lookupResult, lookupResultReason, accountNumber, cardToken, referenceNumber, authorizationDeviceId, accountBalance, tenderName, creditLimit, minimumPayment, paymentDueDate, openToBuy);
48
60
  accountLookupLine.loadFromJsonObject(transactionLineJsonObj);
49
61
  return accountLookupLine;
50
62
  }
@@ -78,8 +90,20 @@ class PaymentAccountLookupLine extends BaseTransactionLine_1.BaseTransactionLine
78
90
  get tenderName() {
79
91
  return this._tenderName;
80
92
  }
93
+ get creditLimit() {
94
+ return this._creditLimit;
95
+ }
96
+ get minimumPayment() {
97
+ return this._minimumPayment;
98
+ }
99
+ get paymentDueDate() {
100
+ return this._paymentDueDate;
101
+ }
102
+ get openToBuy() {
103
+ return this._openToBuy;
104
+ }
81
105
  newTransactionLine() {
82
- return new PaymentAccountLookupLine(this.lineNumber, this.lineType, this._cardHolder, this._lookupResult, this._lookupResultReason, this._accountNumber, this._cardToken, this._referenceNumber, this._authorizationDeviceId, this._accountBalance, this._tenderName);
106
+ return new PaymentAccountLookupLine(this.lineNumber, this.lineType, this._cardHolder, this._lookupResult, this._lookupResultReason, this._accountNumber, this._cardToken, this._referenceNumber, this._authorizationDeviceId, this._accountBalance, this._tenderName, this._creditLimit, this._minimumPayment, this._paymentDueDate, this._openToBuy);
83
107
  }
84
108
  }
85
109
  exports.PaymentAccountLookupLine = PaymentAccountLookupLine;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptos-scp/scp-component-store-selling-features-domain-model",
3
- "version": "1.60.0",
3
+ "version": "2.0.0",
4
4
  "description": "This component library provides the common components to handle the coordination of processing the business events from the UI.",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -61,7 +61,7 @@
61
61
  "@aptos-scp/scp-component-user": "^1.4.0",
62
62
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
63
63
  "@aptos-scp/scp-types-core-config": "^2.2.1",
64
- "@aptos-scp/scp-types-commerce-devices": "^5.1.0",
64
+ "@aptos-scp/scp-types-commerce-devices": "^6.0.0",
65
65
  "@aptos-scp/scp-types-commerce-transaction": "^1.77.0",
66
66
  "@aptos-scp/scp-types-customer": "^3.7.0",
67
67
  "@aptos-scp/scp-types-einvoice": "^1.17.0",
@@ -83,7 +83,7 @@
83
83
  "@aptos-scp/scp-component-taxation": "^5.27.3",
84
84
  "@aptos-scp/scp-component-user": "^1.4.0",
85
85
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
86
- "@aptos-scp/scp-types-commerce-devices": "^5.2.0",
86
+ "@aptos-scp/scp-types-commerce-devices": "^6.0.0",
87
87
  "@aptos-scp/scp-types-commerce-transaction": "^1.77.0",
88
88
  "@aptos-scp/scp-types-core": "^1.0.5",
89
89
  "@aptos-scp/scp-types-core-config": "^2.2.1",