@aptos-scp/scp-component-store-selling-features-domain-model 2.49.2 → 2.51.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.
@@ -1052,6 +1052,8 @@ export declare const TRANSACTION_WAITING_ON_STARTUP_EVENT: string;
1052
1052
  export declare const TRANSACTION_RESUMING_ON_STARTUP_EVENT: string;
1053
1053
  export declare const STORED_VALUE_REVERSAL_COMPLETED_EVENT_TYPE: string;
1054
1054
  export declare const STORED_VALUE_CERTIFICATE_REVERSAL_COMPLETED_EVENT_TYPE: string;
1055
+ export declare const PAYMENT_AUTH_INITIALIZE_START_EVENT_TYPE: string;
1056
+ export declare const PAYMENT_AUTH_START_EVENT_TYPE: string;
1055
1057
  export declare const TENDER_CHANGE_CANCEL_EVENT_TYPE: string;
1056
1058
  export declare const CASH_DRAWER_SELECTED_EVENT: string;
1057
1059
  export declare const CASH_DRAWER_OPEN_REQUESTED_EVENT: string;
@@ -1063,6 +1063,8 @@ exports.TRANSACTION_WAITING_ON_STARTUP_EVENT = "Transaction.WaitingOnStartup";
1063
1063
  exports.TRANSACTION_RESUMING_ON_STARTUP_EVENT = "Transaction.ResumingOnStartup";
1064
1064
  exports.STORED_VALUE_REVERSAL_COMPLETED_EVENT_TYPE = "StoredValue.ReversalCompleted";
1065
1065
  exports.STORED_VALUE_CERTIFICATE_REVERSAL_COMPLETED_EVENT_TYPE = "StoredValueCertificate.ReversalCompleted";
1066
+ exports.PAYMENT_AUTH_INITIALIZE_START_EVENT_TYPE = "PaymentAuth.InitializeStart";
1067
+ exports.PAYMENT_AUTH_START_EVENT_TYPE = "PaymentAuth.Start";
1066
1068
  exports.TENDER_CHANGE_CANCEL_EVENT_TYPE = "TenderChange.Cancel";
1067
1069
  exports.CASH_DRAWER_SELECTED_EVENT = "CashDrawer.Selected";
1068
1070
  exports.CASH_DRAWER_OPEN_REQUESTED_EVENT = "CashDrawer.OpenRequested";
@@ -1,6 +1,7 @@
1
1
  import { DeviceIdentity, ITransaction, ITransactionLineFactory, IUser } from "@aptos-scp/scp-component-store-selling-core";
2
2
  import { IFiscalSignature } from "@aptos-scp/scp-types-commerce-transaction";
3
3
  import { IFiscalTransactionNumberMaintainer } from "./IFiscalTransactionNumberMaintainer";
4
+ import { ICountryBoxFiscalError } from "./MerchandiseTransaction";
4
5
  import { RetailTransaction } from "./RetailTransaction";
5
6
  import { IInvoiceOperation } from "./IInvoiceOperation";
6
7
  import { Customer } from "./Customer";
@@ -18,10 +19,13 @@ export declare class ReprintReceiptTransaction extends RetailTransaction impleme
18
19
  private _invoiceFiscalTransactionNumber?;
19
20
  private _invoiceTransactionNumber?;
20
21
  private _accountingCurrency?;
22
+ private _countryBoxFiscalError?;
21
23
  static createFromJsonObj(transactionJsonObj: any, transactionLineFactory: ITransactionLineFactory): ReprintReceiptTransaction;
22
24
  constructor(deviceIdentity: DeviceIdentity, businessDayDate: string, transactionNumber: number, user?: IUser, transactionId?: string, invoiceNumber?: string, invoiceSequenceNumber?: number, invoiceSequenceNumberGenerator?: string, fiscalSignature?: IFiscalSignature, customer?: Customer, accountingCurrency?: string);
23
25
  clone(): ITransaction;
24
26
  get transactionStateValues(): Readonly<Map<string, any>>;
27
+ get countryBoxFiscalError(): ICountryBoxFiscalError;
28
+ setCountryBoxFiscalError(countryBoxFiscalError: ICountryBoxFiscalError): ITransaction;
25
29
  get invoiceNumber(): string;
26
30
  get invoiceSequenceNumber(): number;
27
31
  get invoiceSequenceNumberGenerator(): string;
@@ -14,6 +14,7 @@ class ReprintReceiptTransaction extends RetailTransaction_1.RetailTransaction {
14
14
  this._fiscalSignature = fiscalSignature;
15
15
  this._customer = customer;
16
16
  this._accountingCurrency = accountingCurrency;
17
+ this._countryBoxFiscalError = undefined;
17
18
  }
18
19
  static createFromJsonObj(transactionJsonObj, transactionLineFactory) {
19
20
  const transactionId = RetailTransaction_1.RetailTransaction.getTransactionIdFromJsonObject(transactionJsonObj);
@@ -66,7 +67,21 @@ class ReprintReceiptTransaction extends RetailTransaction_1.RetailTransaction {
66
67
  return transaction;
67
68
  }
68
69
  get transactionStateValues() {
69
- return super.transactionStateValues;
70
+ if (!this._countryBoxFiscalError) {
71
+ return super.transactionStateValues;
72
+ }
73
+ return new Map([
74
+ ...super.transactionStateValues.entries(),
75
+ ["transaction.countryBoxFiscalError", this._countryBoxFiscalError],
76
+ ]);
77
+ }
78
+ get countryBoxFiscalError() {
79
+ return this._countryBoxFiscalError;
80
+ }
81
+ setCountryBoxFiscalError(countryBoxFiscalError) {
82
+ const newTransaction = this.clone();
83
+ newTransaction._countryBoxFiscalError = countryBoxFiscalError;
84
+ return newTransaction;
70
85
  }
71
86
  get invoiceNumber() {
72
87
  return this._invoiceNumber;
@@ -169,6 +184,7 @@ class ReprintReceiptTransaction extends RetailTransaction_1.RetailTransaction {
169
184
  this._invoiceFiscalTransactionNumber = transactionJsonObj._invoiceFiscalTransactionNumber;
170
185
  this._invoiceTransactionNumber = transactionJsonObj._invoiceTransactionNumber;
171
186
  this._accountingCurrency = transactionJsonObj._accountingCurrency;
187
+ this._countryBoxFiscalError = transactionJsonObj._countryBoxFiscalError;
172
188
  }
173
189
  }
174
190
  exports.ReprintReceiptTransaction = ReprintReceiptTransaction;
@@ -112,6 +112,9 @@ class RetailTransaction {
112
112
  transaction._taxFreeCreditNoteNumber = this._taxFreeCreditNoteNumber;
113
113
  transaction._taxFreeCreditNoteSequenceNumber = this._taxFreeCreditNoteSequenceNumber;
114
114
  transaction._taxFreeCreditNoteSequenceNumberGenerator = this._taxFreeCreditNoteSequenceNumberGenerator;
115
+ if ("_countryBoxFiscalError" in this) {
116
+ transaction._countryBoxFiscalError = this._countryBoxFiscalError;
117
+ }
115
118
  return transaction;
116
119
  }
117
120
  setTransactionProperty(propertyName, propertyValue) {
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.49.2",
3
+ "version": "2.51.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",