@aptos-scp/scp-component-store-selling-features-domain-model 2.23.0 → 2.25.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/README.md +1 -0
- package/lib/domain/model/Constants.d.ts +4 -1
- package/lib/domain/model/Constants.js +3 -0
- package/lib/domain/model/PaymentFunctionSession.d.ts +23 -0
- package/lib/domain/model/PaymentFunctionSession.js +51 -0
- package/lib/domain/model/fiscalDevice/FiscalDeviceStatusLine.js +2 -0
- package/lib/domain/model/index.d.ts +1 -0
- package/lib/domain/model/index.js +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -579,6 +579,7 @@ export declare enum CollectedDataKey {
|
|
|
579
579
|
FiscalVarianceInformation = "FiscalVarianceInformation",
|
|
580
580
|
FiscalDeviceErrorCode = "fiscalDeviceErrorCode",
|
|
581
581
|
FiscalDeviceErrorDescription = "fiscalDeviceErrorDescription",
|
|
582
|
+
FiscalErrorSource = "fiscalErrorSource",
|
|
582
583
|
FiscalDeviceUserMessage = "fiscalDeviceUserMessage",
|
|
583
584
|
ForcedAuthorizationApproval = "ForcedAuthorizationApproval",
|
|
584
585
|
ForfeitChangeConfirmation = "ForfeitChangeConfirmation",
|
|
@@ -694,6 +695,7 @@ export declare enum CollectedDataKey {
|
|
|
694
695
|
PaymentAccountHolderMismatchAction = "paymentAccountHolderMismatchAction",
|
|
695
696
|
PaymentAccountHolderValidationLineReference = "paymentAccountHolderValidationLineReference",
|
|
696
697
|
PaymentAccountLookupLineReference = "paymentAccountLookupLineReference",
|
|
698
|
+
PaymentFunction = "paymentFunction",
|
|
697
699
|
PaidOutReference = "paidOutReference",
|
|
698
700
|
PhoneNumber = "phoneNumber",
|
|
699
701
|
Percent = "percentage",
|
|
@@ -1092,7 +1094,8 @@ export declare enum PaymentFunction {
|
|
|
1092
1094
|
AccountSummaryDisplay = "AccountSummaryDisplay",
|
|
1093
1095
|
CustomerInput = "CustomerInput",
|
|
1094
1096
|
DonationPrompt = "DonationPrompt",
|
|
1095
|
-
TenderAuthorization = "TenderAuthorization"
|
|
1097
|
+
TenderAuthorization = "TenderAuthorization",
|
|
1098
|
+
OptInConfirmation = "OptInConfirmation"
|
|
1096
1099
|
}
|
|
1097
1100
|
export declare const DELIVERY_CONTACT_UPDATED_EVENT: string;
|
|
1098
1101
|
export declare const DELIVERY_ITEM_UPDATED_EVENT: string;
|
|
@@ -586,6 +586,7 @@ var CollectedDataKey;
|
|
|
586
586
|
CollectedDataKey["FiscalVarianceInformation"] = "FiscalVarianceInformation";
|
|
587
587
|
CollectedDataKey["FiscalDeviceErrorCode"] = "fiscalDeviceErrorCode";
|
|
588
588
|
CollectedDataKey["FiscalDeviceErrorDescription"] = "fiscalDeviceErrorDescription";
|
|
589
|
+
CollectedDataKey["FiscalErrorSource"] = "fiscalErrorSource";
|
|
589
590
|
CollectedDataKey["FiscalDeviceUserMessage"] = "fiscalDeviceUserMessage";
|
|
590
591
|
CollectedDataKey["ForcedAuthorizationApproval"] = "ForcedAuthorizationApproval";
|
|
591
592
|
CollectedDataKey["ForfeitChangeConfirmation"] = "ForfeitChangeConfirmation";
|
|
@@ -701,6 +702,7 @@ var CollectedDataKey;
|
|
|
701
702
|
CollectedDataKey["PaymentAccountHolderMismatchAction"] = "paymentAccountHolderMismatchAction";
|
|
702
703
|
CollectedDataKey["PaymentAccountHolderValidationLineReference"] = "paymentAccountHolderValidationLineReference";
|
|
703
704
|
CollectedDataKey["PaymentAccountLookupLineReference"] = "paymentAccountLookupLineReference";
|
|
705
|
+
CollectedDataKey["PaymentFunction"] = "paymentFunction";
|
|
704
706
|
CollectedDataKey["PaidOutReference"] = "paidOutReference";
|
|
705
707
|
CollectedDataKey["PhoneNumber"] = "phoneNumber";
|
|
706
708
|
CollectedDataKey["Percent"] = "percentage";
|
|
@@ -1100,6 +1102,7 @@ var PaymentFunction;
|
|
|
1100
1102
|
PaymentFunction["CustomerInput"] = "CustomerInput";
|
|
1101
1103
|
PaymentFunction["DonationPrompt"] = "DonationPrompt";
|
|
1102
1104
|
PaymentFunction["TenderAuthorization"] = "TenderAuthorization";
|
|
1105
|
+
PaymentFunction["OptInConfirmation"] = "OptInConfirmation";
|
|
1103
1106
|
})(PaymentFunction = exports.PaymentFunction || (exports.PaymentFunction = {}));
|
|
1104
1107
|
exports.DELIVERY_CONTACT_UPDATED_EVENT = "Delivery.ContactUpdated";
|
|
1105
1108
|
exports.DELIVERY_ITEM_UPDATED_EVENT = "Delivery.ItemUpdated";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IState } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { PaymentFunction } from "./Constants";
|
|
3
|
+
export declare const PAYMENT_FUNCTION_SESSION: string;
|
|
4
|
+
export declare enum PaymentFunctionSessionState {
|
|
5
|
+
Completed = "Completed",
|
|
6
|
+
InProgress = "InProgress"
|
|
7
|
+
}
|
|
8
|
+
export declare class PaymentFunctionSession implements IState {
|
|
9
|
+
private readonly _type;
|
|
10
|
+
private readonly _state;
|
|
11
|
+
private readonly _deviceId;
|
|
12
|
+
private readonly _paymentFunction;
|
|
13
|
+
static createFromJsonObject(paymentFunctionSessionJsonObj: any): PaymentFunctionSession;
|
|
14
|
+
static create(): PaymentFunctionSession;
|
|
15
|
+
get type(): string;
|
|
16
|
+
get deviceId(): string | undefined;
|
|
17
|
+
get paymentFunction(): PaymentFunction | undefined;
|
|
18
|
+
get stateValues(): Readonly<Map<string, any>>;
|
|
19
|
+
get inProgress(): boolean;
|
|
20
|
+
startPaymentFunction(paymentFunction: PaymentFunction, deviceId: string): PaymentFunctionSession;
|
|
21
|
+
complete(): PaymentFunctionSession;
|
|
22
|
+
private constructor();
|
|
23
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PAYMENT_FUNCTION_SESSION = "PaymentFunctionSession";
|
|
4
|
+
var PaymentFunctionSessionState;
|
|
5
|
+
(function (PaymentFunctionSessionState) {
|
|
6
|
+
PaymentFunctionSessionState["Completed"] = "Completed";
|
|
7
|
+
PaymentFunctionSessionState["InProgress"] = "InProgress";
|
|
8
|
+
})(PaymentFunctionSessionState = exports.PaymentFunctionSessionState || (exports.PaymentFunctionSessionState = {}));
|
|
9
|
+
class PaymentFunctionSession {
|
|
10
|
+
constructor(state, paymentFunction, deviceId) {
|
|
11
|
+
this._type = exports.PAYMENT_FUNCTION_SESSION;
|
|
12
|
+
this._state = state;
|
|
13
|
+
this._deviceId = deviceId;
|
|
14
|
+
this._paymentFunction = paymentFunction;
|
|
15
|
+
}
|
|
16
|
+
static createFromJsonObject(paymentFunctionSessionJsonObj) {
|
|
17
|
+
const state = paymentFunctionSessionJsonObj._state;
|
|
18
|
+
const deviceId = paymentFunctionSessionJsonObj._deviceId;
|
|
19
|
+
const paymentFunction = paymentFunctionSessionJsonObj._paymentFunction;
|
|
20
|
+
return new PaymentFunctionSession(state, paymentFunction, deviceId);
|
|
21
|
+
}
|
|
22
|
+
static create() {
|
|
23
|
+
return new PaymentFunctionSession(PaymentFunctionSessionState.Completed);
|
|
24
|
+
}
|
|
25
|
+
get type() {
|
|
26
|
+
return this._type;
|
|
27
|
+
}
|
|
28
|
+
get deviceId() {
|
|
29
|
+
return this._deviceId;
|
|
30
|
+
}
|
|
31
|
+
get paymentFunction() {
|
|
32
|
+
return this._paymentFunction;
|
|
33
|
+
}
|
|
34
|
+
get stateValues() {
|
|
35
|
+
return new Map([
|
|
36
|
+
["PaymentFunctionSession.state", this._state],
|
|
37
|
+
["PaymentFunctionSession.paymentFunction", this._paymentFunction],
|
|
38
|
+
]);
|
|
39
|
+
}
|
|
40
|
+
get inProgress() {
|
|
41
|
+
return this._state === PaymentFunctionSessionState.InProgress;
|
|
42
|
+
}
|
|
43
|
+
startPaymentFunction(paymentFunction, deviceId) {
|
|
44
|
+
return new PaymentFunctionSession(PaymentFunctionSessionState.InProgress, paymentFunction, deviceId);
|
|
45
|
+
}
|
|
46
|
+
complete() {
|
|
47
|
+
return new PaymentFunctionSession(PaymentFunctionSessionState.Completed);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.PaymentFunctionSession = PaymentFunctionSession;
|
|
51
|
+
//# sourceMappingURL=PaymentFunctionSession.js.map
|
|
@@ -33,11 +33,13 @@ class FiscalDeviceStatusLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
33
33
|
successful: false,
|
|
34
34
|
errorCode: undefined,
|
|
35
35
|
errorDescription: undefined,
|
|
36
|
+
errorSource: undefined,
|
|
36
37
|
userMessage: undefined,
|
|
37
38
|
};
|
|
38
39
|
fiscalDeviceActivityResult.successful = (_a = collectedData.get(Constants_1.CollectedDataKey.FiscalDeviceActivitySuccessful), (_a !== null && _a !== void 0 ? _a : false));
|
|
39
40
|
fiscalDeviceActivityResult.errorCode = collectedData.get(Constants_1.CollectedDataKey.FiscalDeviceErrorCode);
|
|
40
41
|
fiscalDeviceActivityResult.errorDescription = collectedData.get(Constants_1.CollectedDataKey.FiscalDeviceErrorDescription);
|
|
42
|
+
fiscalDeviceActivityResult.errorSource = collectedData.get(Constants_1.CollectedDataKey.FiscalErrorSource);
|
|
41
43
|
fiscalDeviceActivityResult.userMessage = collectedData.get(Constants_1.CollectedDataKey.FiscalDeviceUserMessage);
|
|
42
44
|
const transactionLineReference = collectedData.get(Constants_1.CollectedDataKey.TransactionLineReference);
|
|
43
45
|
const fiscalDeviceInformation = collectedData.get(Constants_1.CollectedDataKey.FiscalDeviceInformation);
|
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.25.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",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@aptos-scp/scp-component-user": "^1.4.0",
|
|
86
86
|
"@aptos-scp/scp-types-client-registration": "^1.4.0",
|
|
87
87
|
"@aptos-scp/scp-types-commerce-devices": "^6.3.0",
|
|
88
|
-
"@aptos-scp/scp-types-commerce-transaction": "^1.
|
|
88
|
+
"@aptos-scp/scp-types-commerce-transaction": "^1.85.0",
|
|
89
89
|
"@aptos-scp/scp-types-core": "^1.0.5",
|
|
90
90
|
"@aptos-scp/scp-types-core-config": "^2.2.1",
|
|
91
91
|
"@aptos-scp/scp-types-currency-conversion": "^1.2.0",
|