@aptos-scp/scp-component-store-selling-features-domain-model 1.4.1 → 1.6.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.
@@ -935,6 +935,7 @@ export interface IItemQuantityChangeEventData {
935
935
  quantity: Quantity;
936
936
  addedLineNumbers?: number[];
937
937
  }
938
+ export declare const CANCEL_TRANSACTION_ITEM_EVENT: string;
938
939
  export declare const RETURN_WITH_TRANSACTION_ITEM_EVENT: string;
939
940
  export interface IReturnWithTransactionItemEventData {
940
941
  originalItemLineNumber: number;
@@ -938,6 +938,7 @@ exports.STORED_VALUE_CERTIFICATE_REVERSAL_COMPLETED_EVENT_TYPE = "StoredValueCer
938
938
  exports.TENDER_CHANGE_CANCEL_EVENT_TYPE = "TenderChange.Cancel";
939
939
  exports.CASH_DRAWER_OPEN_REQUESTED_EVENT = "CashDrawer.OpenRequested";
940
940
  exports.ITEM_QUANTITY_CHANGE_EVENT = "Item.QuantityChange";
941
+ exports.CANCEL_TRANSACTION_ITEM_EVENT = "Item.CancelTransaction";
941
942
  exports.RETURN_WITH_TRANSACTION_ITEM_EVENT = "Item.ReturnWithTransaction";
942
943
  exports.USER_NOTIFICATION_ERROR_EVENT_TYPE = "userNotificationError";
943
944
  var ItemDiscountBehavior;
@@ -1,5 +1,5 @@
1
1
  import { ITransactionLine, ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
2
- import { ITaxAuthorityForExemption, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
2
+ import { ITaxAuthorityForExemption, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
3
3
  import { BaseTaxExemptLineDecorator } from "./BaseTaxExemptLineDecorator";
4
4
  import { ItemTaxExemptLine } from "./ItemTaxExemptLine";
5
5
  export declare const DECORATOR_TYPE_ITEM_TAX_EXEMPT_CHANGE: string;
@@ -15,11 +15,13 @@ export declare class ItemTaxExemptLineModificationDecorator extends BaseTaxExemp
15
15
  private _newPresetRateExemption?;
16
16
  private _newPresetExemptionCategory?;
17
17
  private _newPresetExemptionRate?;
18
+ private _newCertificateAttachmentLineReference?;
18
19
  static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): ItemTaxExemptLineModificationDecorator;
19
- constructor(itemTaxExemptLine: ItemTaxExemptLine, annotationSourceLineNumber: number, newTaxExemptType: TaxExemptType, newCertificateId: string, newReasonCode?: string, newReasonDescription?: string, newReasonListType?: string, newDisplayName?: string, newExemptedTaxAuthorities?: ITaxAuthorityForExemption[], newPresetRateExemption?: boolean, newPresetExemptionCategory?: string, newPresetExemptionRate?: string);
20
+ constructor(itemTaxExemptLine: ItemTaxExemptLine, annotationSourceLineNumber: number, newTaxExemptType: TaxExemptType, newCertificateId: string, newReasonCode?: string, newReasonDescription?: string, newReasonListType?: string, newDisplayName?: string, newExemptedTaxAuthorities?: ITaxAuthorityForExemption[], newPresetRateExemption?: boolean, newPresetExemptionCategory?: string, newPresetExemptionRate?: string, newCertificateAttachmentLineReference?: ITransactionLineReferenceType);
20
21
  get taxExemptType(): TaxExemptType;
21
22
  get certificateId(): string;
22
23
  get reasonCode(): string;
24
+ get certificateAttachmentLineReference(): ITransactionLineReferenceType;
23
25
  get reasonDescription(): string;
24
26
  get reasonListType(): string;
25
27
  get displayName(): string;
@@ -9,7 +9,7 @@ function isItemTaxExemptLineModificationDecorator(transactionLine) {
9
9
  }
10
10
  exports.isItemTaxExemptLineModificationDecorator = isItemTaxExemptLineModificationDecorator;
11
11
  class ItemTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator {
12
- constructor(itemTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificateId, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate) {
12
+ constructor(itemTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificateId, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate, newCertificateAttachmentLineReference) {
13
13
  super(exports.DECORATOR_TYPE_ITEM_TAX_EXEMPT_CHANGE, itemTaxExemptLine, undefined, ITEM_TAX_EXEMPT_ANNOTATION_SOURCE_TYPE, annotationSourceLineNumber);
14
14
  this._newTaxExemptType = newTaxExemptType;
15
15
  this._newCertificateId = newCertificateId;
@@ -21,6 +21,7 @@ class ItemTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_
21
21
  this._newPresetRateExemption = newPresetRateExemption;
22
22
  this._newPresetExemptionCategory = newPresetExemptionCategory;
23
23
  this._newPresetExemptionRate = newPresetExemptionRate;
24
+ this._newCertificateAttachmentLineReference = newCertificateAttachmentLineReference;
24
25
  }
25
26
  static createFromJsonObject(transactionLineJsonObj, transactionLineFactory) {
26
27
  const decoratedTransactionLineJsonObj = BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
@@ -35,8 +36,9 @@ class ItemTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_
35
36
  const newPresetRateExemption = transactionLineJsonObj._newPresetRateExemption;
36
37
  const newPresetExemptionCategory = transactionLineJsonObj._newPresetExemptionCategory;
37
38
  const newPresetExemptionRate = transactionLineJsonObj._newPresetExemptionRate;
39
+ const newCertificateAttachmentLineReference = transactionLineJsonObj._newCertificateAttachmentLineReference;
38
40
  const annotationSourceLineNumber = BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator.getAnnotationSourceLineNumberFromJsonObject(transactionLineJsonObj);
39
- const itemTaxExemptLineModificationDecorator = new ItemTaxExemptLineModificationDecorator(decoratedItemTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificateId, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate);
41
+ const itemTaxExemptLineModificationDecorator = new ItemTaxExemptLineModificationDecorator(decoratedItemTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificateId, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate, newCertificateAttachmentLineReference);
40
42
  return itemTaxExemptLineModificationDecorator;
41
43
  }
42
44
  get taxExemptType() {
@@ -48,6 +50,10 @@ class ItemTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_
48
50
  get reasonCode() {
49
51
  return this._newReasonCode || this.decoratedTransactionLine.reasonCode;
50
52
  }
53
+ get certificateAttachmentLineReference() {
54
+ return (this._newCertificateAttachmentLineReference ||
55
+ this.decoratedTransactionLine.certificateAttachmentLineReference);
56
+ }
51
57
  get reasonDescription() {
52
58
  return this._newReasonDescription || this.decoratedTransactionLine.reasonDescription;
53
59
  }
@@ -81,10 +87,12 @@ class ItemTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_
81
87
  newItemTaxExemptLineModificationDecorator._newPresetRateExemption = this._newPresetRateExemption;
82
88
  newItemTaxExemptLineModificationDecorator._newPresetExemptionCategory = this._newPresetExemptionCategory;
83
89
  newItemTaxExemptLineModificationDecorator._newPresetExemptionRate = this._newPresetExemptionRate;
90
+ newItemTaxExemptLineModificationDecorator._newCertificateAttachmentLineReference =
91
+ this._newCertificateAttachmentLineReference;
84
92
  return newItemTaxExemptLineModificationDecorator;
85
93
  }
86
94
  newTransactionLine() {
87
- return new ItemTaxExemptLineModificationDecorator(this.decoratedTransactionLine, this.annotationSourceLineNumber, this._newTaxExemptType, this._newCertificateId, this._newReasonCode, this._newReasonDescription, this._newReasonListType, this._newDisplayName, this._newExemptedTaxAuthorities, this._newPresetRateExemption, this._newPresetExemptionCategory, this._newPresetExemptionRate);
95
+ return new ItemTaxExemptLineModificationDecorator(this.decoratedTransactionLine, this.annotationSourceLineNumber, this._newTaxExemptType, this._newCertificateId, this._newReasonCode, this._newReasonDescription, this._newReasonListType, this._newDisplayName, this._newExemptedTaxAuthorities, this._newPresetRateExemption, this._newPresetExemptionCategory, this._newPresetExemptionRate, this._newCertificateAttachmentLineReference);
88
96
  }
89
97
  }
90
98
  exports.ItemTaxExemptLineModificationDecorator = ItemTaxExemptLineModificationDecorator;
@@ -1,5 +1,5 @@
1
1
  import { ITransactionLine, ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
2
- import { ITaxAuthorityForExemption, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
2
+ import { ITaxAuthorityForExemption, ITransactionLineReferenceType, TaxExemptType } from "@aptos-scp/scp-types-commerce-transaction";
3
3
  import { BaseTaxExemptLineDecorator } from "./BaseTaxExemptLineDecorator";
4
4
  import { TransactionTaxExemptLine } from "./TransactionTaxExemptLine";
5
5
  export declare const DECORATOR_TYPE_TRANSACTION_TAX_EXEMPT_CHANGE: string;
@@ -15,11 +15,13 @@ export declare class TransactionTaxExemptLineModificationDecorator extends BaseT
15
15
  private _newPresetRateExemption?;
16
16
  private _newPresetExemptionCategory?;
17
17
  private _newPresetExemptionRate?;
18
+ private _newCertificateAttachmentLineReference?;
18
19
  static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): TransactionTaxExemptLineModificationDecorator;
19
- constructor(transactionTaxExemptLine: TransactionTaxExemptLine, annotationSourceLineNumber: number, newTaxExemptType: TaxExemptType, newCertificateId: string, newReasonCode?: string, newReasonDescription?: string, newReasonListType?: string, newDisplayName?: string, newExemptedTaxAuthorities?: ITaxAuthorityForExemption[], newPresetRateExemption?: boolean, newPresetExemptionCategory?: string, newPresetExemptionRate?: string);
20
+ constructor(transactionTaxExemptLine: TransactionTaxExemptLine, annotationSourceLineNumber: number, newTaxExemptType: TaxExemptType, newCertificateId: string, newReasonCode?: string, newReasonDescription?: string, newReasonListType?: string, newDisplayName?: string, newExemptedTaxAuthorities?: ITaxAuthorityForExemption[], newPresetRateExemption?: boolean, newPresetExemptionCategory?: string, newPresetExemptionRate?: string, newCertificateAttachmentLineReference?: ITransactionLineReferenceType);
20
21
  get taxExemptType(): TaxExemptType;
21
22
  get certificateId(): string;
22
23
  get reasonCode(): string;
24
+ get certificateAttachmentLineReference(): ITransactionLineReferenceType;
23
25
  get reasonDescription(): string;
24
26
  get reasonListType(): string;
25
27
  get displayName(): string;
@@ -9,7 +9,7 @@ function isTransactionTaxExemptLineModificationDecorator(transactionLine) {
9
9
  }
10
10
  exports.isTransactionTaxExemptLineModificationDecorator = isTransactionTaxExemptLineModificationDecorator;
11
11
  class TransactionTaxExemptLineModificationDecorator extends BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator {
12
- constructor(transactionTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificateId, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate) {
12
+ constructor(transactionTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificateId, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate, newCertificateAttachmentLineReference) {
13
13
  super(exports.DECORATOR_TYPE_TRANSACTION_TAX_EXEMPT_CHANGE, transactionTaxExemptLine, undefined, TRANSACTION_TAX_EXEMPT_ANNOTATION_SOURCE_TYPE, annotationSourceLineNumber);
14
14
  this._newTaxExemptType = newTaxExemptType;
15
15
  this._newCertificateId = newCertificateId;
@@ -21,6 +21,7 @@ class TransactionTaxExemptLineModificationDecorator extends BaseTaxExemptLineDec
21
21
  this._newPresetRateExemption = newPresetRateExemption;
22
22
  this._newPresetExemptionCategory = newPresetExemptionCategory;
23
23
  this._newPresetExemptionRate = newPresetExemptionRate;
24
+ this._newCertificateAttachmentLineReference = newCertificateAttachmentLineReference;
24
25
  }
25
26
  static createFromJsonObject(transactionLineJsonObj, transactionLineFactory) {
26
27
  const decoratedTransactionLineJsonObj = BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
@@ -35,8 +36,9 @@ class TransactionTaxExemptLineModificationDecorator extends BaseTaxExemptLineDec
35
36
  const newPresetRateExemption = transactionLineJsonObj._newPresetRateExemption;
36
37
  const newPresetExemptionCategory = transactionLineJsonObj._newPresetExemptionCategory;
37
38
  const newPresetExemptionRate = transactionLineJsonObj._newPresetExemptionRate;
39
+ const newCertificateAttachmentLineReference = transactionLineJsonObj._newCertificateAttachmentLineReference;
38
40
  const annotationSourceLineNumber = BaseTaxExemptLineDecorator_1.BaseTaxExemptLineDecorator.getAnnotationSourceLineNumberFromJsonObject(transactionLineJsonObj);
39
- const transactionTaxExemptLineModificationDecorator = new TransactionTaxExemptLineModificationDecorator(decoratedTransactionTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificateId, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate);
41
+ const transactionTaxExemptLineModificationDecorator = new TransactionTaxExemptLineModificationDecorator(decoratedTransactionTaxExemptLine, annotationSourceLineNumber, newTaxExemptType, newCertificateId, newReasonCode, newReasonDescription, newReasonListType, newDisplayName, newExemptedTaxAuthorities, newPresetRateExemption, newPresetExemptionCategory, newPresetExemptionRate, newCertificateAttachmentLineReference);
40
42
  return transactionTaxExemptLineModificationDecorator;
41
43
  }
42
44
  get taxExemptType() {
@@ -48,6 +50,10 @@ class TransactionTaxExemptLineModificationDecorator extends BaseTaxExemptLineDec
48
50
  get reasonCode() {
49
51
  return this._newReasonCode || this.decoratedTransactionLine.reasonCode;
50
52
  }
53
+ get certificateAttachmentLineReference() {
54
+ return (this._newCertificateAttachmentLineReference ||
55
+ this.decoratedTransactionLine.certificateAttachmentLineReference);
56
+ }
51
57
  get reasonDescription() {
52
58
  return this._newReasonDescription || this.decoratedTransactionLine.reasonDescription;
53
59
  }
@@ -83,10 +89,12 @@ class TransactionTaxExemptLineModificationDecorator extends BaseTaxExemptLineDec
83
89
  newTransactionTaxExemptLineModificationDecorator._newPresetExemptionCategory =
84
90
  this._newPresetExemptionCategory;
85
91
  newTransactionTaxExemptLineModificationDecorator._newPresetExemptionRate = this._newPresetExemptionRate;
92
+ newTransactionTaxExemptLineModificationDecorator._newCertificateAttachmentLineReference =
93
+ this._newCertificateAttachmentLineReference;
86
94
  return newTransactionTaxExemptLineModificationDecorator;
87
95
  }
88
96
  newTransactionLine() {
89
- return new TransactionTaxExemptLineModificationDecorator(this.decoratedTransactionLine, this.annotationSourceLineNumber, this._newTaxExemptType, this._newCertificateId, this._newReasonCode, this._newReasonDescription, this._newReasonListType, this._newDisplayName, this._newExemptedTaxAuthorities, this._newPresetRateExemption, this._newPresetExemptionCategory, this._newPresetExemptionRate);
97
+ return new TransactionTaxExemptLineModificationDecorator(this.decoratedTransactionLine, this.annotationSourceLineNumber, this._newTaxExemptType, this._newCertificateId, this._newReasonCode, this._newReasonDescription, this._newReasonListType, this._newDisplayName, this._newExemptedTaxAuthorities, this._newPresetRateExemption, this._newPresetExemptionCategory, this._newPresetExemptionRate, this._newCertificateAttachmentLineReference);
90
98
  }
91
99
  }
92
100
  exports.TransactionTaxExemptLineModificationDecorator = TransactionTaxExemptLineModificationDecorator;
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.4.1",
3
+ "version": "1.6.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",