@aptos-scp/scp-component-store-selling-features-domain-model 1.53.4 → 1.54.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.
- package/lib/domain/UIBusinessEventTypes.d.ts +1 -0
- package/lib/domain/UIBusinessEventTypes.js +1 -0
- package/lib/domain/model/Constants.d.ts +8 -0
- package/lib/domain/model/Constants.js +8 -0
- package/lib/domain/model/account/IPaymentAccountHolderValidationLine.d.ts +9 -0
- package/lib/domain/model/account/IPaymentAccountHolderValidationLine.js +3 -0
- package/lib/domain/model/account/PaymentAccountHolderValidationLine.d.ts +22 -0
- package/lib/domain/model/account/PaymentAccountHolderValidationLine.js +60 -0
- package/lib/domain/model/account/index.d.ts +2 -0
- package/lib/domain/model/account/index.js +1 -0
- package/package.json +3 -3
|
@@ -138,6 +138,7 @@ export declare const SHIPPING_FEE_EVENT = "ShippingFee";
|
|
|
138
138
|
export declare const SHIPPING_FEE_CHANGE_EVENT = "ShippingFeeChange";
|
|
139
139
|
export declare const ADD_SHIPPING_FEE_EVENT = "AddShippingFee";
|
|
140
140
|
export declare const APPLY_FEE_DISCOUNT_EVENT = "ApplyFeeDiscount";
|
|
141
|
+
export declare const PAYMENT_ACCOUNT_HOLDER_VALIDATE_EVENT: string;
|
|
141
142
|
export declare const SHIPPING_FEE_REFUND_EVENT: string;
|
|
142
143
|
export declare const RETURN_ITEM_EVENT: string;
|
|
143
144
|
export declare const ITEM_FEE_REFUND_EVENT: string;
|
|
@@ -141,6 +141,7 @@ exports.SHIPPING_FEE_EVENT = "ShippingFee";
|
|
|
141
141
|
exports.SHIPPING_FEE_CHANGE_EVENT = "ShippingFeeChange";
|
|
142
142
|
exports.ADD_SHIPPING_FEE_EVENT = "AddShippingFee";
|
|
143
143
|
exports.APPLY_FEE_DISCOUNT_EVENT = "ApplyFeeDiscount";
|
|
144
|
+
exports.PAYMENT_ACCOUNT_HOLDER_VALIDATE_EVENT = "PaymentAccountHolderValidate";
|
|
144
145
|
exports.SHIPPING_FEE_REFUND_EVENT = "ShippingFeeRefund";
|
|
145
146
|
exports.RETURN_ITEM_EVENT = "ReturnItem";
|
|
146
147
|
exports.ITEM_FEE_REFUND_EVENT = "RefundItemFee";
|
|
@@ -102,6 +102,7 @@ export declare enum UiInputKey {
|
|
|
102
102
|
SAME_AS_BILLTO = "input_sameAsBillTo",
|
|
103
103
|
BILLING = "input_billing",
|
|
104
104
|
CANCEL_PAYMENT_REASON = "input_cancelPaymentReason",
|
|
105
|
+
CARD_HOLDER = "input_cardHolder",
|
|
105
106
|
CASH_DRAWER_STATUS = "input_cashDrawerStatus",
|
|
106
107
|
COMPLETE_RESUME_EVENT = "input_resumeCompleteEvent",
|
|
107
108
|
COUNTRY_CODE = "input_countryCode",
|
|
@@ -140,6 +141,7 @@ export declare enum UiInputKey {
|
|
|
140
141
|
FEE_TYPE = "input_feeType",
|
|
141
142
|
FEE_UNIT_COST = "input_feeUnitCost",
|
|
142
143
|
FISCAL_CODE = "fiscalCode",
|
|
144
|
+
FIRST_ADMIN_DIVISION = "input_firstAdminDivision",
|
|
143
145
|
FISCAL_DEVICE_ACTIVITY_SUCCESSFUL = "fiscalDeviceActivitySuccessful",
|
|
144
146
|
FISCAL_DEVICE_ERROR_CODE = "fiscalDeviceErrorCode",
|
|
145
147
|
FISCAL_DEVICE_ERROR_DESCRIPTION = "fiscalDeviceErrorDescription",
|
|
@@ -164,6 +166,7 @@ export declare enum UiInputKey {
|
|
|
164
166
|
GIFT_RECEIPT_MODE = "input_giftReceiptMode",
|
|
165
167
|
INVOICE_NUMBER = "input_invoiceNumber",
|
|
166
168
|
IS_INVOICE = "input_isInvoice",
|
|
169
|
+
IDENTIFICATION_TYPE = "input_identificationType",
|
|
167
170
|
ITEM_COMMENT = "input_selectedComment",
|
|
168
171
|
ITEM_FILTER_BY = "input_itemFilterBy",
|
|
169
172
|
ITEM_CALCULATION_PROFILE = "item_calculationProfile",
|
|
@@ -445,6 +448,7 @@ export declare enum CollectedDataKey {
|
|
|
445
448
|
Abort = "abort",
|
|
446
449
|
AccountingCurrency = "accountingCurrency",
|
|
447
450
|
ActionType = "actionType",
|
|
451
|
+
AccountHolderMismatch = "accountHolderMismatch",
|
|
448
452
|
AllowedDiscountType = "allowedDiscountType",
|
|
449
453
|
Amount = "amount",
|
|
450
454
|
AssignCustomer = "assignCustomer",
|
|
@@ -507,6 +511,8 @@ export declare enum CollectedDataKey {
|
|
|
507
511
|
EvaluateOnly = "evaluateOnly",
|
|
508
512
|
ExchangeRate = "exchangeRate",
|
|
509
513
|
ExchangeRates = "exchangeRates",
|
|
514
|
+
FirstAdminDivision = "firstAdminDivision",
|
|
515
|
+
FirstName = "firstName",
|
|
510
516
|
ForeignTenderAmount = "foreignTenderAmount",
|
|
511
517
|
FiscalConfigValidation = "fiscalConfigValidation",
|
|
512
518
|
TaxExemptDisplayName = "taxExemptDisplayName",
|
|
@@ -559,6 +565,7 @@ export declare enum CollectedDataKey {
|
|
|
559
565
|
GiftCardPin = "GiftCardPin",
|
|
560
566
|
GiftReceiptMode = "GiftReceiptMode",
|
|
561
567
|
HardSoftStopItems = "hardSoftStopItems",
|
|
568
|
+
IdentificationType = "identificationType",
|
|
562
569
|
IncomingCashDrawerStatusCode = "IncomingCashDrawerStatusCode",
|
|
563
570
|
InputSource = "inputSource",
|
|
564
571
|
InternalCouponNumber = "internalCouponNumber",
|
|
@@ -570,6 +577,7 @@ export declare enum CollectedDataKey {
|
|
|
570
577
|
ItemQuantityInBasket = "itemQuantityInBasket",
|
|
571
578
|
ItemStatus = "itemStatus",
|
|
572
579
|
ItemStopStatusMessage = "itemStopStatusMessage",
|
|
580
|
+
LastName = "lastName",
|
|
573
581
|
LastTransaction = "lastTransaction",
|
|
574
582
|
LineNumberReference = "lineNumberReference",
|
|
575
583
|
LineNumbers = "LineNumbers",
|
|
@@ -105,6 +105,7 @@ var UiInputKey;
|
|
|
105
105
|
UiInputKey["SAME_AS_BILLTO"] = "input_sameAsBillTo";
|
|
106
106
|
UiInputKey["BILLING"] = "input_billing";
|
|
107
107
|
UiInputKey["CANCEL_PAYMENT_REASON"] = "input_cancelPaymentReason";
|
|
108
|
+
UiInputKey["CARD_HOLDER"] = "input_cardHolder";
|
|
108
109
|
UiInputKey["CASH_DRAWER_STATUS"] = "input_cashDrawerStatus";
|
|
109
110
|
UiInputKey["COMPLETE_RESUME_EVENT"] = "input_resumeCompleteEvent";
|
|
110
111
|
UiInputKey["COUNTRY_CODE"] = "input_countryCode";
|
|
@@ -143,6 +144,7 @@ var UiInputKey;
|
|
|
143
144
|
UiInputKey["FEE_TYPE"] = "input_feeType";
|
|
144
145
|
UiInputKey["FEE_UNIT_COST"] = "input_feeUnitCost";
|
|
145
146
|
UiInputKey["FISCAL_CODE"] = "fiscalCode";
|
|
147
|
+
UiInputKey["FIRST_ADMIN_DIVISION"] = "input_firstAdminDivision";
|
|
146
148
|
UiInputKey["FISCAL_DEVICE_ACTIVITY_SUCCESSFUL"] = "fiscalDeviceActivitySuccessful";
|
|
147
149
|
UiInputKey["FISCAL_DEVICE_ERROR_CODE"] = "fiscalDeviceErrorCode";
|
|
148
150
|
UiInputKey["FISCAL_DEVICE_ERROR_DESCRIPTION"] = "fiscalDeviceErrorDescription";
|
|
@@ -167,6 +169,7 @@ var UiInputKey;
|
|
|
167
169
|
UiInputKey["GIFT_RECEIPT_MODE"] = "input_giftReceiptMode";
|
|
168
170
|
UiInputKey["INVOICE_NUMBER"] = "input_invoiceNumber";
|
|
169
171
|
UiInputKey["IS_INVOICE"] = "input_isInvoice";
|
|
172
|
+
UiInputKey["IDENTIFICATION_TYPE"] = "input_identificationType";
|
|
170
173
|
UiInputKey["ITEM_COMMENT"] = "input_selectedComment";
|
|
171
174
|
UiInputKey["ITEM_FILTER_BY"] = "input_itemFilterBy";
|
|
172
175
|
UiInputKey["ITEM_CALCULATION_PROFILE"] = "item_calculationProfile";
|
|
@@ -454,6 +457,7 @@ var CollectedDataKey;
|
|
|
454
457
|
CollectedDataKey["Abort"] = "abort";
|
|
455
458
|
CollectedDataKey["AccountingCurrency"] = "accountingCurrency";
|
|
456
459
|
CollectedDataKey["ActionType"] = "actionType";
|
|
460
|
+
CollectedDataKey["AccountHolderMismatch"] = "accountHolderMismatch";
|
|
457
461
|
CollectedDataKey["AllowedDiscountType"] = "allowedDiscountType";
|
|
458
462
|
CollectedDataKey["Amount"] = "amount";
|
|
459
463
|
CollectedDataKey["AssignCustomer"] = "assignCustomer";
|
|
@@ -516,6 +520,8 @@ var CollectedDataKey;
|
|
|
516
520
|
CollectedDataKey["EvaluateOnly"] = "evaluateOnly";
|
|
517
521
|
CollectedDataKey["ExchangeRate"] = "exchangeRate";
|
|
518
522
|
CollectedDataKey["ExchangeRates"] = "exchangeRates";
|
|
523
|
+
CollectedDataKey["FirstAdminDivision"] = "firstAdminDivision";
|
|
524
|
+
CollectedDataKey["FirstName"] = "firstName";
|
|
519
525
|
CollectedDataKey["ForeignTenderAmount"] = "foreignTenderAmount";
|
|
520
526
|
CollectedDataKey["FiscalConfigValidation"] = "fiscalConfigValidation";
|
|
521
527
|
CollectedDataKey["TaxExemptDisplayName"] = "taxExemptDisplayName";
|
|
@@ -568,6 +574,7 @@ var CollectedDataKey;
|
|
|
568
574
|
CollectedDataKey["GiftCardPin"] = "GiftCardPin";
|
|
569
575
|
CollectedDataKey["GiftReceiptMode"] = "GiftReceiptMode";
|
|
570
576
|
CollectedDataKey["HardSoftStopItems"] = "hardSoftStopItems";
|
|
577
|
+
CollectedDataKey["IdentificationType"] = "identificationType";
|
|
571
578
|
CollectedDataKey["IncomingCashDrawerStatusCode"] = "IncomingCashDrawerStatusCode";
|
|
572
579
|
CollectedDataKey["InputSource"] = "inputSource";
|
|
573
580
|
CollectedDataKey["InternalCouponNumber"] = "internalCouponNumber";
|
|
@@ -579,6 +586,7 @@ var CollectedDataKey;
|
|
|
579
586
|
CollectedDataKey["ItemQuantityInBasket"] = "itemQuantityInBasket";
|
|
580
587
|
CollectedDataKey["ItemStatus"] = "itemStatus";
|
|
581
588
|
CollectedDataKey["ItemStopStatusMessage"] = "itemStopStatusMessage";
|
|
589
|
+
CollectedDataKey["LastName"] = "lastName";
|
|
582
590
|
CollectedDataKey["LastTransaction"] = "lastTransaction";
|
|
583
591
|
CollectedDataKey["LineNumberReference"] = "lineNumberReference";
|
|
584
592
|
CollectedDataKey["LineNumbers"] = "LineNumbers";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ITransactionLine } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { ICardHolder } from "@aptos-scp/scp-types-commerce-devices";
|
|
3
|
+
import { PaymentAccountHolderIdentificationType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
4
|
+
export interface IPaymentAccountHolderValidationLine extends ITransactionLine {
|
|
5
|
+
readonly accountHolder: ICardHolder;
|
|
6
|
+
readonly identificationType: PaymentAccountHolderIdentificationType;
|
|
7
|
+
readonly firstAdminDivision: string;
|
|
8
|
+
readonly accountHolderMismatch?: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { PaymentAccountHolderIdentificationType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
|
+
import { ICardHolder } from "@aptos-scp/scp-types-commerce-devices";
|
|
4
|
+
import { BaseTransactionLine } from "../BaseTransactionLine";
|
|
5
|
+
import { IPaymentAccountHolderValidationLine } from "./IPaymentAccountHolderValidationLine";
|
|
6
|
+
export declare const PAYMENT_ACCOUNT_HOLDER_VALIDATION_LINE_TYPE: string;
|
|
7
|
+
export declare class PaymentAccountHolderValidationLine extends BaseTransactionLine implements IPaymentAccountHolderValidationLine {
|
|
8
|
+
private readonly _accountHolder;
|
|
9
|
+
private readonly _identificationType;
|
|
10
|
+
private readonly _firstAdminDivision;
|
|
11
|
+
private readonly _accountHolderMismatch?;
|
|
12
|
+
static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): PaymentAccountHolderValidationLine;
|
|
13
|
+
static createFromJsonObject(transactionLineJsonObj: any): PaymentAccountHolderValidationLine;
|
|
14
|
+
get couldAffectPricing(): boolean;
|
|
15
|
+
get accountHolder(): ICardHolder;
|
|
16
|
+
get identificationType(): PaymentAccountHolderIdentificationType;
|
|
17
|
+
get firstAdminDivision(): string;
|
|
18
|
+
get accountHolderMismatch(): boolean;
|
|
19
|
+
constructor(lineNumber: number, lineType: string, accountHolder: ICardHolder, identificationType: PaymentAccountHolderIdentificationType, firstAdminDivision: string, accountHolderMismatch: boolean);
|
|
20
|
+
protected newTransactionLine(): PaymentAccountHolderValidationLine;
|
|
21
|
+
}
|
|
22
|
+
export declare function isPaymentAccountHolderValidationLine(transactionLine: ITransactionLine): transactionLine is IPaymentAccountHolderValidationLine;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const BaseTransactionLine_1 = require("../BaseTransactionLine");
|
|
4
|
+
const Constants_1 = require("../Constants");
|
|
5
|
+
exports.PAYMENT_ACCOUNT_HOLDER_VALIDATION_LINE_TYPE = "PaymentAccountHolderValidation";
|
|
6
|
+
class PaymentAccountHolderValidationLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
7
|
+
constructor(lineNumber, lineType, accountHolder, identificationType, firstAdminDivision, accountHolderMismatch) {
|
|
8
|
+
super(lineNumber, lineType);
|
|
9
|
+
this._accountHolder = accountHolder;
|
|
10
|
+
this._identificationType = identificationType;
|
|
11
|
+
this._firstAdminDivision = firstAdminDivision;
|
|
12
|
+
this._accountHolderMismatch = accountHolderMismatch;
|
|
13
|
+
}
|
|
14
|
+
static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
|
|
15
|
+
const firstName = collectedData.get(Constants_1.CollectedDataKey.FirstName);
|
|
16
|
+
const lastName = collectedData.get(Constants_1.CollectedDataKey.LastName);
|
|
17
|
+
const accountHolder = {
|
|
18
|
+
firstName,
|
|
19
|
+
lastName,
|
|
20
|
+
};
|
|
21
|
+
const identificationType = collectedData.get(Constants_1.CollectedDataKey.IdentificationType);
|
|
22
|
+
const firstAdminDivision = collectedData.get(Constants_1.CollectedDataKey.FirstAdminDivision);
|
|
23
|
+
const accountHolderMismatch = collectedData.get(Constants_1.CollectedDataKey.AccountHolderMismatch);
|
|
24
|
+
return new PaymentAccountHolderValidationLine(lineNumber, lineType, accountHolder, identificationType, firstAdminDivision, accountHolderMismatch);
|
|
25
|
+
}
|
|
26
|
+
static createFromJsonObject(transactionLineJsonObj) {
|
|
27
|
+
const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
|
|
28
|
+
const lineType = BaseTransactionLine_1.BaseTransactionLine.lineTypeFromJsonObject(transactionLineJsonObj);
|
|
29
|
+
const accountHolder = transactionLineJsonObj._accountHolder;
|
|
30
|
+
const identificationType = transactionLineJsonObj._identificationType;
|
|
31
|
+
const firstAdminDivision = transactionLineJsonObj._firstAdminDivision;
|
|
32
|
+
const accountHolderMismatch = transactionLineJsonObj._accountHolderMismatch;
|
|
33
|
+
return new PaymentAccountHolderValidationLine(lineNumber, lineType, accountHolder, identificationType, firstAdminDivision, accountHolderMismatch);
|
|
34
|
+
}
|
|
35
|
+
get couldAffectPricing() {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
get accountHolder() {
|
|
39
|
+
return this._accountHolder;
|
|
40
|
+
}
|
|
41
|
+
get identificationType() {
|
|
42
|
+
return this._identificationType;
|
|
43
|
+
}
|
|
44
|
+
get firstAdminDivision() {
|
|
45
|
+
return this._firstAdminDivision;
|
|
46
|
+
}
|
|
47
|
+
get accountHolderMismatch() {
|
|
48
|
+
return this._accountHolderMismatch;
|
|
49
|
+
}
|
|
50
|
+
newTransactionLine() {
|
|
51
|
+
return new PaymentAccountHolderValidationLine(this.lineNumber, this.lineType, this._accountHolder, this._identificationType, this._firstAdminDivision, this._accountHolderMismatch);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.PaymentAccountHolderValidationLine = PaymentAccountHolderValidationLine;
|
|
55
|
+
function isPaymentAccountHolderValidationLine(transactionLine) {
|
|
56
|
+
return (transactionLine instanceof PaymentAccountHolderValidationLine ||
|
|
57
|
+
transactionLine.lineType === exports.PAYMENT_ACCOUNT_HOLDER_VALIDATION_LINE_TYPE);
|
|
58
|
+
}
|
|
59
|
+
exports.isPaymentAccountHolderValidationLine = isPaymentAccountHolderValidationLine;
|
|
60
|
+
//# sourceMappingURL=PaymentAccountHolderValidationLine.js.map
|
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.
|
|
3
|
+
"version": "1.54.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",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@aptos-scp/scp-types-client-registration": "^1.4.0",
|
|
63
63
|
"@aptos-scp/scp-types-core-config": "^2.2.1",
|
|
64
64
|
"@aptos-scp/scp-types-commerce-devices": "^3.14.0",
|
|
65
|
-
"@aptos-scp/scp-types-commerce-transaction": "^1.
|
|
65
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.75.0",
|
|
66
66
|
"@aptos-scp/scp-types-customer": "^3.7.0",
|
|
67
67
|
"@aptos-scp/scp-types-einvoice": "^1.17.0",
|
|
68
68
|
"@aptos-scp/scp-types-inventory": "^2.0.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@aptos-scp/scp-component-user": "^1.4.0",
|
|
85
85
|
"@aptos-scp/scp-types-client-registration": "^1.4.0",
|
|
86
86
|
"@aptos-scp/scp-types-commerce-devices": "^3.14.0",
|
|
87
|
-
"@aptos-scp/scp-types-commerce-transaction": "^1.
|
|
87
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.75.0",
|
|
88
88
|
"@aptos-scp/scp-types-core": "^1.0.5",
|
|
89
89
|
"@aptos-scp/scp-types-core-config": "^2.2.1",
|
|
90
90
|
"@aptos-scp/scp-types-currency-conversion": "^1.2.0",
|