@aptos-scp/scp-component-store-selling-features-domain-model 3.3.1 → 3.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.
@@ -343,3 +343,4 @@ export declare const COUNTRY_BOX_START_TRANSACTION_EVENT: string;
343
343
  export declare const COUNTRY_BOX_FINISH_TRANSACTION_EVENT: string;
344
344
  export declare const FULFILLMENT_AUTHORIZATION_EVENT: string;
345
345
  export declare const COUNTRY_BOX_REPORT_GENERATION_EVENT: string;
346
+ export declare const PAYMENT_NOTIFICATION_START_EVENT: string;
@@ -350,4 +350,5 @@ exports.COUNTRY_BOX_START_TRANSACTION_EVENT = "CountryBoxStartTransactionEvent";
350
350
  exports.COUNTRY_BOX_FINISH_TRANSACTION_EVENT = "CountryBoxFinishTransactionEvent";
351
351
  exports.FULFILLMENT_AUTHORIZATION_EVENT = "FulfillmentAuthorization";
352
352
  exports.COUNTRY_BOX_REPORT_GENERATION_EVENT = "CountryBoxReportGenerationEvent";
353
+ exports.PAYMENT_NOTIFICATION_START_EVENT = "PaymentNotificationStart";
353
354
  //# sourceMappingURL=UIBusinessEventTypes.js.map
@@ -478,7 +478,9 @@ export declare enum UiInputKey {
478
478
  FEE_LINE_FOR_REFUND = "input_feeLineForRefund",
479
479
  FEE_REFUND_SOURCE = "input_feeRefundSource",
480
480
  FEE_REFUNDABLE_AMOUNT = "input_feeRefundableAmount",
481
- ITEM_TERMS_AND_CONDITIONS_ACCEPTED = "input_itemTermsAndConditionsAccepted"
481
+ ITEM_TERMS_AND_CONDITIONS_ACCEPTED = "input_itemTermsAndConditionsAccepted",
482
+ PAYMENT_AUTHORIZATION_REQUEST = "input_paymentAuthorizationRequest",
483
+ PAYMENT_AUTHORIZATION_RESPONSE = "input_paymentAuthorizationResponse"
482
484
  }
483
485
  export declare enum CollectedDataKey {
484
486
  Abort = "abort",
@@ -1028,7 +1030,8 @@ export declare enum CollectedDataKey {
1028
1030
  CustomerInputMode = "customerInputMode",
1029
1031
  PreAuthCapture = "preAuthCapture",
1030
1032
  PreOrder = "preOrder",
1031
- PreOrderAvailableDate = "preOrderAvailableDate"
1033
+ PreOrderAvailableDate = "preOrderAvailableDate",
1034
+ PaymentAuthorizationResponse = "paymentAuthorizationResponse"
1032
1035
  }
1033
1036
  export declare enum ItemLookupType {
1034
1037
  ProductInquiryDetail = "ProductInquiryDetail",
@@ -1055,6 +1058,7 @@ export declare const TRANSACTION_RESUMING_ON_STARTUP_EVENT: string;
1055
1058
  export declare const STORED_VALUE_REVERSAL_COMPLETED_EVENT_TYPE: string;
1056
1059
  export declare const STORED_VALUE_CERTIFICATE_REVERSAL_COMPLETED_EVENT_TYPE: string;
1057
1060
  export declare const PAYMENT_AUTH_INITIALIZE_START_EVENT_TYPE: string;
1061
+ export declare const PAYMENT_AUTH_CANCEL_START_EVENT_TYPE: string;
1058
1062
  export declare const PAYMENT_AUTH_START_EVENT_TYPE: string;
1059
1063
  export declare const TENDER_CHANGE_CANCEL_EVENT_TYPE: string;
1060
1064
  export declare const CASH_DRAWER_SELECTED_EVENT: string;
@@ -480,6 +480,8 @@ var UiInputKey;
480
480
  UiInputKey["FEE_REFUND_SOURCE"] = "input_feeRefundSource";
481
481
  UiInputKey["FEE_REFUNDABLE_AMOUNT"] = "input_feeRefundableAmount";
482
482
  UiInputKey["ITEM_TERMS_AND_CONDITIONS_ACCEPTED"] = "input_itemTermsAndConditionsAccepted";
483
+ UiInputKey["PAYMENT_AUTHORIZATION_REQUEST"] = "input_paymentAuthorizationRequest";
484
+ UiInputKey["PAYMENT_AUTHORIZATION_RESPONSE"] = "input_paymentAuthorizationResponse";
483
485
  })(UiInputKey = exports.UiInputKey || (exports.UiInputKey = {}));
484
486
  //
485
487
  // Keys for use in relaying data collectedData (qualification) and nonContextualData (action).
@@ -1036,6 +1038,7 @@ var CollectedDataKey;
1036
1038
  CollectedDataKey["PreAuthCapture"] = "preAuthCapture";
1037
1039
  CollectedDataKey["PreOrder"] = "preOrder";
1038
1040
  CollectedDataKey["PreOrderAvailableDate"] = "preOrderAvailableDate";
1041
+ CollectedDataKey["PaymentAuthorizationResponse"] = "paymentAuthorizationResponse";
1039
1042
  })(CollectedDataKey = exports.CollectedDataKey || (exports.CollectedDataKey = {}));
1040
1043
  var ItemLookupType;
1041
1044
  (function (ItemLookupType) {
@@ -1066,6 +1069,7 @@ exports.TRANSACTION_RESUMING_ON_STARTUP_EVENT = "Transaction.ResumingOnStartup";
1066
1069
  exports.STORED_VALUE_REVERSAL_COMPLETED_EVENT_TYPE = "StoredValue.ReversalCompleted";
1067
1070
  exports.STORED_VALUE_CERTIFICATE_REVERSAL_COMPLETED_EVENT_TYPE = "StoredValueCertificate.ReversalCompleted";
1068
1071
  exports.PAYMENT_AUTH_INITIALIZE_START_EVENT_TYPE = "PaymentAuth.InitializeStart";
1072
+ exports.PAYMENT_AUTH_CANCEL_START_EVENT_TYPE = "PaymentAuth.CancelStart";
1069
1073
  exports.PAYMENT_AUTH_START_EVENT_TYPE = "PaymentAuth.Start";
1070
1074
  exports.TENDER_CHANGE_CANCEL_EVENT_TYPE = "TenderChange.Cancel";
1071
1075
  exports.CASH_DRAWER_SELECTED_EVENT = "CashDrawer.Selected";
@@ -0,0 +1,23 @@
1
+ import { IState } from "@aptos-scp/scp-component-store-selling-core";
2
+ export declare const PAYMENT_NOTIFICATION_SESSION: string;
3
+ export declare enum PaymentNotificationSessionState {
4
+ Inactive = "Inactive",
5
+ Initializing = "Initializing",
6
+ InProgress = "InProgress",
7
+ Completed = "Completed"
8
+ }
9
+ export declare class PaymentNotificationSession implements IState {
10
+ private readonly _type;
11
+ private readonly _state;
12
+ private readonly _paymentAuthorizationResponse;
13
+ static createFromJsonObject(paymentNotificationSessionJsonObj: any): PaymentNotificationSession;
14
+ static create(): PaymentNotificationSession;
15
+ get type(): string;
16
+ get state(): PaymentNotificationSessionState;
17
+ get paymentAuthorizationResponse(): any;
18
+ get stateValues(): Readonly<Map<string, any>>;
19
+ initialize(): PaymentNotificationSession;
20
+ inProgress(lastPaymentAuthorizationResponse?: any): PaymentNotificationSession;
21
+ complete(): PaymentNotificationSession;
22
+ private constructor();
23
+ }
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const scp_component_logging_1 = require("@aptos-scp/scp-component-logging");
4
+ const logger = scp_component_logging_1.LogManager.getLogger("com.aptos.storesellingfeatures.domain.model.PaymentNotificationSession");
5
+ exports.PAYMENT_NOTIFICATION_SESSION = "PaymentNotificationSession";
6
+ var PaymentNotificationSessionState;
7
+ (function (PaymentNotificationSessionState) {
8
+ PaymentNotificationSessionState["Inactive"] = "Inactive";
9
+ PaymentNotificationSessionState["Initializing"] = "Initializing";
10
+ PaymentNotificationSessionState["InProgress"] = "InProgress";
11
+ PaymentNotificationSessionState["Completed"] = "Completed";
12
+ })(PaymentNotificationSessionState = exports.PaymentNotificationSessionState || (exports.PaymentNotificationSessionState = {}));
13
+ class PaymentNotificationSession {
14
+ constructor(state, paymentAuthorizationResponse) {
15
+ this._type = exports.PAYMENT_NOTIFICATION_SESSION;
16
+ this._state = state;
17
+ if (state === PaymentNotificationSessionState.Initializing ||
18
+ state === PaymentNotificationSessionState.Completed) {
19
+ this._paymentAuthorizationResponse = undefined;
20
+ }
21
+ else if (paymentAuthorizationResponse) {
22
+ this._paymentAuthorizationResponse = paymentAuthorizationResponse;
23
+ }
24
+ }
25
+ static createFromJsonObject(paymentNotificationSessionJsonObj) {
26
+ logger.traceEntry("createFromJsonObject");
27
+ return new PaymentNotificationSession(paymentNotificationSessionJsonObj._state, paymentNotificationSessionJsonObj._paymentAuthorizationResponse);
28
+ }
29
+ static create() {
30
+ logger.traceEntry("create");
31
+ return new PaymentNotificationSession(PaymentNotificationSessionState.Inactive);
32
+ }
33
+ get type() {
34
+ return this._type;
35
+ }
36
+ get state() {
37
+ return this._state;
38
+ }
39
+ get paymentAuthorizationResponse() {
40
+ return this._paymentAuthorizationResponse;
41
+ }
42
+ get stateValues() {
43
+ return new Map([
44
+ ["PaymentNotificationSession.state", this._state],
45
+ ["PaymentNotificationSession.paymentAuthorizationResponse", this._paymentAuthorizationResponse],
46
+ ]);
47
+ }
48
+ initialize() {
49
+ return new PaymentNotificationSession(PaymentNotificationSessionState.Initializing);
50
+ }
51
+ inProgress(lastPaymentAuthorizationResponse) {
52
+ return new PaymentNotificationSession(PaymentNotificationSessionState.InProgress, lastPaymentAuthorizationResponse);
53
+ }
54
+ complete() {
55
+ return new PaymentNotificationSession(PaymentNotificationSessionState.Completed);
56
+ }
57
+ }
58
+ exports.PaymentNotificationSession = PaymentNotificationSession;
59
+ //# sourceMappingURL=PaymentNotificationSession.js.map
@@ -38,6 +38,7 @@ export * from "./MerchandiseTransaction";
38
38
  export * from "./TenderControlTransaction";
39
39
  export * from "./ApplicationControlTransaction";
40
40
  export * from "./ReceiptSession";
41
+ export * from "./PaymentNotificationSession";
41
42
  export * from "./ReprintReceiptTransaction";
42
43
  export * from "./ResumeTransactionSession";
43
44
  export * from "./StoredValueCardSession";
@@ -40,6 +40,7 @@ __export(require("./MerchandiseTransaction"));
40
40
  __export(require("./TenderControlTransaction"));
41
41
  __export(require("./ApplicationControlTransaction"));
42
42
  __export(require("./ReceiptSession"));
43
+ __export(require("./PaymentNotificationSession"));
43
44
  __export(require("./ReprintReceiptTransaction"));
44
45
  __export(require("./ResumeTransactionSession"));
45
46
  __export(require("./StoredValueCardSession"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptos-scp/scp-component-store-selling-features-domain-model",
3
- "version": "3.3.1",
3
+ "version": "3.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",