@aptos-scp/scp-component-store-selling-features-domain-model 2.3.0 → 2.4.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 +4 -0
- package/lib/domain/model/Constants.js +4 -0
- package/lib/domain/model/account/IPaymentAccountHolderMismatchStatusLine.d.ts +6 -0
- package/lib/domain/model/account/IPaymentAccountHolderMismatchStatusLine.js +3 -0
- package/lib/domain/model/account/PaymentAccountHolderMismatchStatusLine.d.ts +17 -0
- package/lib/domain/model/account/PaymentAccountHolderMismatchStatusLine.js +43 -0
- package/lib/domain/model/account/index.d.ts +2 -0
- package/lib/domain/model/account/index.js +1 -0
- package/package.json +2 -2
|
@@ -137,6 +137,7 @@ export declare const SHIPPING_FEE_EVENT = "ShippingFee";
|
|
|
137
137
|
export declare const SHIPPING_FEE_CHANGE_EVENT = "ShippingFeeChange";
|
|
138
138
|
export declare const ADD_SHIPPING_FEE_EVENT = "AddShippingFee";
|
|
139
139
|
export declare const APPLY_FEE_DISCOUNT_EVENT = "ApplyFeeDiscount";
|
|
140
|
+
export declare const PAYMENT_ACCOUNT_HOLDER_MISMATCH_STATUS_EVENT: string;
|
|
140
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;
|
|
@@ -140,6 +140,7 @@ exports.SHIPPING_FEE_EVENT = "ShippingFee";
|
|
|
140
140
|
exports.SHIPPING_FEE_CHANGE_EVENT = "ShippingFeeChange";
|
|
141
141
|
exports.ADD_SHIPPING_FEE_EVENT = "AddShippingFee";
|
|
142
142
|
exports.APPLY_FEE_DISCOUNT_EVENT = "ApplyFeeDiscount";
|
|
143
|
+
exports.PAYMENT_ACCOUNT_HOLDER_MISMATCH_STATUS_EVENT = "PaymentAccountHolderMismatchStatus";
|
|
143
144
|
exports.PAYMENT_ACCOUNT_HOLDER_VALIDATE_EVENT = "PaymentAccountHolderValidate";
|
|
144
145
|
exports.SHIPPING_FEE_REFUND_EVENT = "ShippingFeeRefund";
|
|
145
146
|
exports.RETURN_ITEM_EVENT = "ReturnItem";
|
|
@@ -218,6 +218,8 @@ export declare enum UiInputKey {
|
|
|
218
218
|
OFFLINE_BUSINESS_DAY_DATE = "input_offlineBusinessDayDate",
|
|
219
219
|
ORIGINAL_ITEM = "input_originalItem",
|
|
220
220
|
ORIGINAL_TRANSACTION_LINE_REFERENCES = "input_originalTransactionLineReferences",
|
|
221
|
+
PAYMENT_ACCOUNT_HOLDER_MISMATCH_ACTION = "input_paymentAccountHolderMismatchAction",
|
|
222
|
+
PAYMENT_ACCOUNT_HOLDER_VALIDATE = "input_paymentAccountHolderValidate",
|
|
221
223
|
PAID_AMOUNT = "input_paidAmount",
|
|
222
224
|
PAID_OUT_REFERENCE = "input_paidOutReference",
|
|
223
225
|
ATTACHMENTS = "input_attachments",
|
|
@@ -664,6 +666,8 @@ export declare enum CollectedDataKey {
|
|
|
664
666
|
TenderPaymentIsCompleted = "tenderPaymentIsCompleted",
|
|
665
667
|
PaginationMetadata = "paginationMetadata",
|
|
666
668
|
PaidAmount = "PaidAmount",
|
|
669
|
+
PaymentAccountHolderMismatchAction = "paymentAccountHolderMismatchAction",
|
|
670
|
+
PaymentAccountHolderValidationLineReference = "paymentAccountHolderValidationLineReference",
|
|
667
671
|
PaymentAccountLookupLineReference = "paymentAccountLookupLineReference",
|
|
668
672
|
PaidOutReference = "paidOutReference",
|
|
669
673
|
PhoneNumber = "phoneNumber",
|
|
@@ -220,6 +220,8 @@ var UiInputKey;
|
|
|
220
220
|
UiInputKey["OFFLINE_BUSINESS_DAY_DATE"] = "input_offlineBusinessDayDate";
|
|
221
221
|
UiInputKey["ORIGINAL_ITEM"] = "input_originalItem";
|
|
222
222
|
UiInputKey["ORIGINAL_TRANSACTION_LINE_REFERENCES"] = "input_originalTransactionLineReferences";
|
|
223
|
+
UiInputKey["PAYMENT_ACCOUNT_HOLDER_MISMATCH_ACTION"] = "input_paymentAccountHolderMismatchAction";
|
|
224
|
+
UiInputKey["PAYMENT_ACCOUNT_HOLDER_VALIDATE"] = "input_paymentAccountHolderValidate";
|
|
223
225
|
UiInputKey["PAID_AMOUNT"] = "input_paidAmount";
|
|
224
226
|
UiInputKey["PAID_OUT_REFERENCE"] = "input_paidOutReference";
|
|
225
227
|
UiInputKey["ATTACHMENTS"] = "input_attachments";
|
|
@@ -672,6 +674,8 @@ var CollectedDataKey;
|
|
|
672
674
|
CollectedDataKey["TenderPaymentIsCompleted"] = "tenderPaymentIsCompleted";
|
|
673
675
|
CollectedDataKey["PaginationMetadata"] = "paginationMetadata";
|
|
674
676
|
CollectedDataKey["PaidAmount"] = "PaidAmount";
|
|
677
|
+
CollectedDataKey["PaymentAccountHolderMismatchAction"] = "paymentAccountHolderMismatchAction";
|
|
678
|
+
CollectedDataKey["PaymentAccountHolderValidationLineReference"] = "paymentAccountHolderValidationLineReference";
|
|
675
679
|
CollectedDataKey["PaymentAccountLookupLineReference"] = "paymentAccountLookupLineReference";
|
|
676
680
|
CollectedDataKey["PaidOutReference"] = "paidOutReference";
|
|
677
681
|
CollectedDataKey["PhoneNumber"] = "phoneNumber";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ITransactionLine } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { ISameTransactionLineReference, PaymentAccountHolderMismatchAction } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
|
+
export interface IPaymentAccountHolderMismatchStatusLine extends ITransactionLine {
|
|
4
|
+
readonly action: PaymentAccountHolderMismatchAction;
|
|
5
|
+
readonly paymentAccountHolderValidationLineReference: ISameTransactionLineReference;
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { ISameTransactionLineReference, PaymentAccountHolderMismatchAction } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
|
+
import { BaseTransactionLine } from "../BaseTransactionLine";
|
|
4
|
+
import { IPaymentAccountHolderMismatchStatusLine } from "./IPaymentAccountHolderMismatchStatusLine";
|
|
5
|
+
export declare const PAYMENT_ACCOUNT_HOLDER_MISMATCH_STATUS_LINE_TYPE: string;
|
|
6
|
+
export declare class PaymentAccountHolderMismatchStatusLine extends BaseTransactionLine implements IPaymentAccountHolderMismatchStatusLine {
|
|
7
|
+
private readonly _action;
|
|
8
|
+
private readonly _paymentAccountHolderValidationLineReference?;
|
|
9
|
+
static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): PaymentAccountHolderMismatchStatusLine;
|
|
10
|
+
static createFromJsonObject(transactionLineJsonObj: any): PaymentAccountHolderMismatchStatusLine;
|
|
11
|
+
get couldAffectPricing(): boolean;
|
|
12
|
+
get action(): PaymentAccountHolderMismatchAction;
|
|
13
|
+
get paymentAccountHolderValidationLineReference(): ISameTransactionLineReference | undefined;
|
|
14
|
+
constructor(lineNumber: number, lineType: string, action: PaymentAccountHolderMismatchAction, paymentAccountHolderValidationLineReference: ISameTransactionLineReference);
|
|
15
|
+
protected newTransactionLine(): PaymentAccountHolderMismatchStatusLine;
|
|
16
|
+
}
|
|
17
|
+
export declare function isPaymentAccountHolderMismatchStatusLine(transactionLine: ITransactionLine): transactionLine is IPaymentAccountHolderMismatchStatusLine;
|
|
@@ -0,0 +1,43 @@
|
|
|
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_MISMATCH_STATUS_LINE_TYPE = "PaymentAccountHolderMismatchStatus";
|
|
6
|
+
class PaymentAccountHolderMismatchStatusLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
7
|
+
constructor(lineNumber, lineType, action, paymentAccountHolderValidationLineReference) {
|
|
8
|
+
super(lineNumber, lineType);
|
|
9
|
+
this._action = action;
|
|
10
|
+
this._paymentAccountHolderValidationLineReference = paymentAccountHolderValidationLineReference;
|
|
11
|
+
}
|
|
12
|
+
static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
|
|
13
|
+
const action = collectedData.get(Constants_1.CollectedDataKey.PaymentAccountHolderMismatchAction);
|
|
14
|
+
const paymentAccountHolderValidationLineReference = collectedData.get(Constants_1.CollectedDataKey.PaymentAccountHolderValidationLineReference);
|
|
15
|
+
return new PaymentAccountHolderMismatchStatusLine(lineNumber, lineType, action, paymentAccountHolderValidationLineReference);
|
|
16
|
+
}
|
|
17
|
+
static createFromJsonObject(transactionLineJsonObj) {
|
|
18
|
+
const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
|
|
19
|
+
const lineType = BaseTransactionLine_1.BaseTransactionLine.lineTypeFromJsonObject(transactionLineJsonObj);
|
|
20
|
+
const action = transactionLineJsonObj._action;
|
|
21
|
+
const paymentAccountHolderValidationLineReference = transactionLineJsonObj._paymentAccountHolderValidationLineReference;
|
|
22
|
+
return new PaymentAccountHolderMismatchStatusLine(lineNumber, lineType, action, paymentAccountHolderValidationLineReference);
|
|
23
|
+
}
|
|
24
|
+
get couldAffectPricing() {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
get action() {
|
|
28
|
+
return this._action;
|
|
29
|
+
}
|
|
30
|
+
get paymentAccountHolderValidationLineReference() {
|
|
31
|
+
return this._paymentAccountHolderValidationLineReference;
|
|
32
|
+
}
|
|
33
|
+
newTransactionLine() {
|
|
34
|
+
return new PaymentAccountHolderMismatchStatusLine(this.lineNumber, this.lineType, this._action, this._paymentAccountHolderValidationLineReference);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.PaymentAccountHolderMismatchStatusLine = PaymentAccountHolderMismatchStatusLine;
|
|
38
|
+
function isPaymentAccountHolderMismatchStatusLine(transactionLine) {
|
|
39
|
+
return (transactionLine instanceof PaymentAccountHolderMismatchStatusLine ||
|
|
40
|
+
transactionLine.lineType === exports.PAYMENT_ACCOUNT_HOLDER_MISMATCH_STATUS_LINE_TYPE);
|
|
41
|
+
}
|
|
42
|
+
exports.isPaymentAccountHolderMismatchStatusLine = isPaymentAccountHolderMismatchStatusLine;
|
|
43
|
+
//# sourceMappingURL=PaymentAccountHolderMismatchStatusLine.js.map
|
|
@@ -3,3 +3,5 @@ export * from "./IPaymentAccountLookupLine";
|
|
|
3
3
|
export * from "./PaymentAccountSession";
|
|
4
4
|
export * from "./PaymentAccountHolderValidationLine";
|
|
5
5
|
export * from "./IPaymentAccountHolderValidationLine";
|
|
6
|
+
export * from "./PaymentAccountHolderMismatchStatusLine";
|
|
7
|
+
export * from "./IPaymentAccountHolderMismatchStatusLine";
|
|
@@ -6,4 +6,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
__export(require("./PaymentAccountLookupLine"));
|
|
7
7
|
__export(require("./PaymentAccountSession"));
|
|
8
8
|
__export(require("./PaymentAccountHolderValidationLine"));
|
|
9
|
+
__export(require("./PaymentAccountHolderMismatchStatusLine"));
|
|
9
10
|
//# sourceMappingURL=index.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": "2.
|
|
3
|
+
"version": "2.4.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",
|
|
@@ -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": "^6.0.0",
|
|
87
|
-
"@aptos-scp/scp-types-commerce-transaction": "^1.
|
|
87
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.78.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",
|