@aptos-scp/scp-component-store-selling-features-domain-model 1.40.0 → 1.41.1

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.
@@ -59,7 +59,8 @@ export declare enum TenderAuthCategory {
59
59
  LoyaltyVoucherService = "LoyaltyVoucherService",
60
60
  StoredValueCardService = "StoredValueCardService",
61
61
  StoredValueCertificateService = "StoredValueCertificateService",
62
- Wallet = "Wallet"
62
+ Wallet = "Wallet",
63
+ PayByLink = "PayByLink"
63
64
  }
64
65
  export declare enum OverTenderRule {
65
66
  NotAllowed = "NotAllowed",
@@ -430,7 +431,8 @@ export declare enum UiInputKey {
430
431
  REFUNDABLE_TENDERS = "input_refundableTenders",
431
432
  BEST_REDEMPTION_PROMPT_STATUS = "input_bestRedemptionPromptStatus",
432
433
  TENDER_IS_ORIGINAL_TENDER = "input_tenderIsOriginalTender",
433
- TENDER_KEYED_ENTRY = "input_tenderKeyedEntry"
434
+ TENDER_KEYED_ENTRY = "input_tenderKeyedEntry",
435
+ PAY_BY_LINK_CUSTOMER = "input_payByLinkCustomer"
434
436
  }
435
437
  export declare enum CollectedDataKey {
436
438
  Abort = "abort",
@@ -653,6 +655,7 @@ export declare enum CollectedDataKey {
653
655
  PrimaryLanguage = "primaryLanguage",
654
656
  ProductInquiryInventory = "productInquiryLocalInventory",
655
657
  ProximitySearchInventory = "proximitySearchLocalInventory",
658
+ PayByLinkCustomer = "payByLinkCustomer",
656
659
  QualifiedUserRestriction = "QualifiedUserRestriction",
657
660
  Quantity = "quantity",
658
661
  ReasonComment = "reasonComment",
@@ -926,7 +929,9 @@ export declare enum CollectedDataKey {
926
929
  MembershipTypeDescription = "membershipTypeDescription",
927
930
  IsPermanentMembershipDiscount = "isPermanentMembershipDiscount",
928
931
  TerminalForceClosed = "TerminalForceClosed",
929
- TotalLineTax = "totalLineTax"
932
+ TotalLineTax = "totalLineTax",
933
+ EmployeeFlag = "employeeFlag",
934
+ TriggeredByLoyaltyAwards = "triggeredByLoyaltyAwards"
930
935
  }
931
936
  export declare enum ItemLookupType {
932
937
  ProductInquiryDetail = "ProductInquiryDetail",
@@ -57,6 +57,7 @@ var TenderAuthCategory;
57
57
  TenderAuthCategory["StoredValueCardService"] = "StoredValueCardService";
58
58
  TenderAuthCategory["StoredValueCertificateService"] = "StoredValueCertificateService";
59
59
  TenderAuthCategory["Wallet"] = "Wallet";
60
+ TenderAuthCategory["PayByLink"] = "PayByLink";
60
61
  })(TenderAuthCategory = exports.TenderAuthCategory || (exports.TenderAuthCategory = {}));
61
62
  var OverTenderRule;
62
63
  (function (OverTenderRule) {
@@ -434,6 +435,7 @@ var UiInputKey;
434
435
  UiInputKey["BEST_REDEMPTION_PROMPT_STATUS"] = "input_bestRedemptionPromptStatus";
435
436
  UiInputKey["TENDER_IS_ORIGINAL_TENDER"] = "input_tenderIsOriginalTender";
436
437
  UiInputKey["TENDER_KEYED_ENTRY"] = "input_tenderKeyedEntry";
438
+ UiInputKey["PAY_BY_LINK_CUSTOMER"] = "input_payByLinkCustomer";
437
439
  })(UiInputKey = exports.UiInputKey || (exports.UiInputKey = {}));
438
440
  //
439
441
  // Keys for use in relaying data collectedData (qualification) and nonContextualData (action).
@@ -662,6 +664,7 @@ var CollectedDataKey;
662
664
  CollectedDataKey["PrimaryLanguage"] = "primaryLanguage";
663
665
  CollectedDataKey["ProductInquiryInventory"] = "productInquiryLocalInventory";
664
666
  CollectedDataKey["ProximitySearchInventory"] = "proximitySearchLocalInventory";
667
+ CollectedDataKey["PayByLinkCustomer"] = "payByLinkCustomer";
665
668
  CollectedDataKey["QualifiedUserRestriction"] = "QualifiedUserRestriction";
666
669
  CollectedDataKey["Quantity"] = "quantity";
667
670
  CollectedDataKey["ReasonComment"] = "reasonComment";
@@ -936,6 +939,8 @@ var CollectedDataKey;
936
939
  CollectedDataKey["IsPermanentMembershipDiscount"] = "isPermanentMembershipDiscount";
937
940
  CollectedDataKey["TerminalForceClosed"] = "TerminalForceClosed";
938
941
  CollectedDataKey["TotalLineTax"] = "totalLineTax";
942
+ CollectedDataKey["EmployeeFlag"] = "employeeFlag";
943
+ CollectedDataKey["TriggeredByLoyaltyAwards"] = "triggeredByLoyaltyAwards";
939
944
  })(CollectedDataKey = exports.CollectedDataKey || (exports.CollectedDataKey = {}));
940
945
  var ItemLookupType;
941
946
  (function (ItemLookupType) {
@@ -284,6 +284,9 @@ class BaseManualDiscountLine extends BaseTransactionLine_1.BaseTransactionLine {
284
284
  if (collectedData.has(Constants_1.CollectedDataKey.EmployeeId)) {
285
285
  this._isEmployeeDiscount = !!collectedData.get(Constants_1.CollectedDataKey.EmployeeId);
286
286
  }
287
+ else {
288
+ this._isEmployeeDiscount = !!collectedData.get(Constants_1.CollectedDataKey.EmployeeFlag);
289
+ }
287
290
  }
288
291
  loadAutoAppliedFromCollectedData(collectedData) {
289
292
  if (collectedData.has(Constants_1.CollectedDataKey.AutoApplied)) {
@@ -313,10 +316,12 @@ class BaseManualDiscountLine extends BaseTransactionLine_1.BaseTransactionLine {
313
316
  }
314
317
  loadLoyaltyDiscountFromCollectedData(collectedData) {
315
318
  if (collectedData.has(Constants_1.CollectedDataKey.LoyaltyPlanKey) ||
316
- collectedData.has(Constants_1.CollectedDataKey.MembershipTypeKey)) {
319
+ collectedData.has(Constants_1.CollectedDataKey.MembershipTypeKey) ||
320
+ collectedData.has(Constants_1.CollectedDataKey.TriggeredByLoyaltyAwards)) {
317
321
  this._isLoyaltyDiscount =
318
322
  !!collectedData.get(Constants_1.CollectedDataKey.LoyaltyPlanKey) ||
319
- !!collectedData.get(Constants_1.CollectedDataKey.MembershipTypeKey);
323
+ !!collectedData.get(Constants_1.CollectedDataKey.MembershipTypeKey) ||
324
+ !!collectedData.get(Constants_1.CollectedDataKey.TriggeredByLoyaltyAwards);
320
325
  }
321
326
  }
322
327
  loadAmountFromJsonObject(transactionLineJsonObj) {
@@ -283,6 +283,7 @@ export interface IOriginalLoyaltyInformation {
283
283
  readonly originalDiscountlineNumber?: number;
284
284
  readonly discountProratedByService?: boolean;
285
285
  readonly itemLineReferences?: IProratedItemLineReference[];
286
+ readonly triggeredByLoyaltyAwards?: boolean;
286
287
  }
287
288
  export interface IOriginalCompetitivePriceInformation {
288
289
  readonly pricingRuleId?: string;
@@ -1,6 +1,6 @@
1
1
  import { Money } from "@aptos-scp/scp-component-business-core";
2
2
  import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
3
- import { EntryMethod, IAuthorizationResponse, TenderSubType } from "@aptos-scp/scp-types-commerce-devices";
3
+ import { EntryMethod, IAuthorizationResponse, IPayByLinkCustomer, TenderSubType } from "@aptos-scp/scp-types-commerce-devices";
4
4
  import { ActionType, ITransactionLineReference, ITransactionLineReferenceType, TenderAuthFailureReasonCode, TenderAuthorizationStatus } from "@aptos-scp/scp-types-commerce-transaction";
5
5
  import { IOriginalTransactionRefundReference } from "..";
6
6
  import { BaseTransactionLine } from "../BaseTransactionLine";
@@ -33,6 +33,8 @@ export declare class TenderAuthorizationStatusLine extends BaseTransactionLine i
33
33
  private _excludedRefundCardTypeNames;
34
34
  private _subType;
35
35
  private readonly _isChangeProcessing;
36
+ private _payByLinkCustomer;
37
+ private _storeLanguage;
36
38
  static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): TenderAuthorizationStatusLine;
37
39
  static createFromJsonObject(transactionLineJsonObj: any): TenderAuthorizationStatusLine;
38
40
  get couldAffectPricing(): boolean;
@@ -63,7 +65,9 @@ export declare class TenderAuthorizationStatusLine extends BaseTransactionLine i
63
65
  get mappedRefundCardTypeName(): string;
64
66
  get excludedRefundCardTypeNames(): string[];
65
67
  get isTenderAuthorizationFallback(): boolean;
66
- protected constructor(lineNumber: number, lineType: string, status: TenderAuthorizationStatus, tenderAmount: Money, authResponse: IAuthorizationResponse, failureReasonCode: TenderAuthFailureReasonCode, authorizationDeviceId: string, transactionLineReference: ITransactionLineReferenceType, forcedAuthorizationApproval: boolean, cardNumber: string, giftCardPin: string, valueCertificateNumber: string, offlineAuthorizationCode: string, offlineApprovalCode: string, tenderAuthCategory: TenderAuthCategory, tenderType: TenderType, tenderTypeName: string, entryMethod: EntryMethod, tenderReversalFailed: boolean, originalTenderLineReferences: IOriginalTransactionRefundReference[], actionType: ActionType, mappedRefundTenderTypeName: string, mappedRefundCardTypeName: string, excludedRefundCardTypeNames: string[], subType: TenderSubType, isChangeProcessing: boolean, isTenderAuthorizationFallback: boolean);
68
+ get payByLinkCustomer(): IPayByLinkCustomer;
69
+ get storeLanguage(): string;
70
+ protected constructor(lineNumber: number, lineType: string, status: TenderAuthorizationStatus, tenderAmount: Money, authResponse: IAuthorizationResponse, failureReasonCode: TenderAuthFailureReasonCode, authorizationDeviceId: string, transactionLineReference: ITransactionLineReferenceType, forcedAuthorizationApproval: boolean, cardNumber: string, giftCardPin: string, valueCertificateNumber: string, offlineAuthorizationCode: string, offlineApprovalCode: string, tenderAuthCategory: TenderAuthCategory, tenderType: TenderType, tenderTypeName: string, entryMethod: EntryMethod, tenderReversalFailed: boolean, originalTenderLineReferences: IOriginalTransactionRefundReference[], actionType: ActionType, mappedRefundTenderTypeName: string, mappedRefundCardTypeName: string, excludedRefundCardTypeNames: string[], subType: TenderSubType, isChangeProcessing: boolean, isTenderAuthorizationFallback: boolean, payByLinkCustomer: IPayByLinkCustomer, storeLanguage: string);
67
71
  protected newTransactionLine(): TenderAuthorizationStatusLine;
68
72
  }
69
73
  export declare function isTenderAuthorizationStatusLine(transactionLine: ITransactionLine): transactionLine is TenderAuthorizationStatusLine;
@@ -9,7 +9,7 @@ const Constants_1 = require("../Constants");
9
9
  const TenderType_1 = require("../TenderType");
10
10
  exports.TENDER_AUTH_STATUS_LINE_TYPE = "TenderAuthorizationStatus";
11
11
  class TenderAuthorizationStatusLine extends BaseTransactionLine_1.BaseTransactionLine {
12
- constructor(lineNumber, lineType, status, tenderAmount, authResponse, failureReasonCode, authorizationDeviceId, transactionLineReference, forcedAuthorizationApproval, cardNumber, giftCardPin, valueCertificateNumber, offlineAuthorizationCode, offlineApprovalCode, tenderAuthCategory, tenderType, tenderTypeName, entryMethod, tenderReversalFailed, originalTenderLineReferences, actionType, mappedRefundTenderTypeName, mappedRefundCardTypeName, excludedRefundCardTypeNames, subType, isChangeProcessing, isTenderAuthorizationFallback) {
12
+ constructor(lineNumber, lineType, status, tenderAmount, authResponse, failureReasonCode, authorizationDeviceId, transactionLineReference, forcedAuthorizationApproval, cardNumber, giftCardPin, valueCertificateNumber, offlineAuthorizationCode, offlineApprovalCode, tenderAuthCategory, tenderType, tenderTypeName, entryMethod, tenderReversalFailed, originalTenderLineReferences, actionType, mappedRefundTenderTypeName, mappedRefundCardTypeName, excludedRefundCardTypeNames, subType, isChangeProcessing, isTenderAuthorizationFallback, payByLinkCustomer, storeLanguage) {
13
13
  super(lineNumber, lineType);
14
14
  this._status = status;
15
15
  this._tenderAmount = tenderAmount;
@@ -36,6 +36,8 @@ class TenderAuthorizationStatusLine extends BaseTransactionLine_1.BaseTransactio
36
36
  this._subType = subType;
37
37
  this._isChangeProcessing = isChangeProcessing;
38
38
  this._isTenderAuthorizationFallback = isTenderAuthorizationFallback;
39
+ this._payByLinkCustomer = payByLinkCustomer;
40
+ this._storeLanguage = storeLanguage;
39
41
  }
40
42
  static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
41
43
  var _a;
@@ -67,7 +69,9 @@ class TenderAuthorizationStatusLine extends BaseTransactionLine_1.BaseTransactio
67
69
  const subType = collectedData.get(Constants_1.CollectedDataKey.TenderSubType);
68
70
  const isChangeProcessing = collectedData.get(Constants_1.CollectedDataKey.IsChangeProcessing);
69
71
  const isTenderAuthorizationFallback = collectedData.get(Constants_1.CollectedDataKey.IsTenderFallback);
70
- return new TenderAuthorizationStatusLine(lineNumber, lineType, status, tenderAmount, authResponse, failureReasonCode, authorizationDeviceId, transactionLineReference, forcedAuthorizationApproval, cardNumber, giftCardPin, valueCertificateNumber, offlineAuthorizationCode, offlineApprovalCode, tenderAuthCategory, tenderType, tenderTypeName, entryMethod, tenderReversalFailed, originalTenderLineReferences, actionType, mappedRefundTenderTypeName, mappedRefundCardTypeNames, excludedRefundCardTypeNames, subType, isChangeProcessing, isTenderAuthorizationFallback);
72
+ const payByLinkCustomer = collectedData.get(Constants_1.CollectedDataKey.PayByLinkCustomer);
73
+ const storeLanguage = collectedData.get(Constants_1.CollectedDataKey.PrimaryLanguage);
74
+ return new TenderAuthorizationStatusLine(lineNumber, lineType, status, tenderAmount, authResponse, failureReasonCode, authorizationDeviceId, transactionLineReference, forcedAuthorizationApproval, cardNumber, giftCardPin, valueCertificateNumber, offlineAuthorizationCode, offlineApprovalCode, tenderAuthCategory, tenderType, tenderTypeName, entryMethod, tenderReversalFailed, originalTenderLineReferences, actionType, mappedRefundTenderTypeName, mappedRefundCardTypeNames, excludedRefundCardTypeNames, subType, isChangeProcessing, isTenderAuthorizationFallback, payByLinkCustomer, storeLanguage);
71
75
  }
72
76
  static createFromJsonObject(transactionLineJsonObj) {
73
77
  const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
@@ -111,7 +115,9 @@ class TenderAuthorizationStatusLine extends BaseTransactionLine_1.BaseTransactio
111
115
  }
112
116
  const status = scp_types_commerce_transaction_1.TenderAuthorizationStatus[transactionLineJsonObj._status];
113
117
  const failureReasonCode = scp_types_commerce_transaction_1.TenderAuthFailureReasonCode[transactionLineJsonObj._failureReasonCode];
114
- const tenderAuthorizationStatusLine = new TenderAuthorizationStatusLine(lineNumber, lineType, status, tenderAmount, authResponse, failureReasonCode, authorizationDeviceId, transactionLineReference, forcedAuthorizationApproval, cardNumber, giftCardPin, valueCertificateNumber, offlineAuthorizationCode, offlineApprovalCode, tenderAuthCategory, tenderType, tenderTypeName, entryMethod, tenderReversalFailed, originalTenderLineReferences, actionType, mappedRefundTenderTypeName, mappedRefundCardTypeName, excludedRefundCardTypeNames, subType, isChangeProcessing, isTenderAuthorizationFallback);
118
+ const payByLinkCustomer = transactionLineJsonObj._payByLinkCustomer;
119
+ const storeLanguage = transactionLineJsonObj._storeLanguage;
120
+ const tenderAuthorizationStatusLine = new TenderAuthorizationStatusLine(lineNumber, lineType, status, tenderAmount, authResponse, failureReasonCode, authorizationDeviceId, transactionLineReference, forcedAuthorizationApproval, cardNumber, giftCardPin, valueCertificateNumber, offlineAuthorizationCode, offlineApprovalCode, tenderAuthCategory, tenderType, tenderTypeName, entryMethod, tenderReversalFailed, originalTenderLineReferences, actionType, mappedRefundTenderTypeName, mappedRefundCardTypeName, excludedRefundCardTypeNames, subType, isChangeProcessing, isTenderAuthorizationFallback, payByLinkCustomer, storeLanguage);
115
121
  tenderAuthorizationStatusLine.loadFromJsonObject(transactionLineJsonObj);
116
122
  return tenderAuthorizationStatusLine;
117
123
  }
@@ -199,8 +205,14 @@ class TenderAuthorizationStatusLine extends BaseTransactionLine_1.BaseTransactio
199
205
  get isTenderAuthorizationFallback() {
200
206
  return this._isTenderAuthorizationFallback;
201
207
  }
208
+ get payByLinkCustomer() {
209
+ return this._payByLinkCustomer;
210
+ }
211
+ get storeLanguage() {
212
+ return this._storeLanguage;
213
+ }
202
214
  newTransactionLine() {
203
- return new TenderAuthorizationStatusLine(this.lineNumber, this.lineType, this.status, this.tenderAmount, this.authResponse, this.failureReasonCode, this.authorizationDeviceId, this.transactionLineReference, this.forcedAuthorizationApproval, this.cardNumber, this.giftCardPin, this._valueCertificateNumber, this.offlineAuthorizationCode, this.offlineApprovalCode, this.tenderAuthCategory, this._tenderType, this.tenderTypeName, this._entryMethod, this._tenderReversalFailed, this._originalTenderLineReferences, this._actionType, this._mappedRefundTenderTypeName, this._mappedRefundCardTypeName, this._excludedRefundCardTypeNames, this._subType, this._isChangeProcessing, this._isTenderAuthorizationFallback);
215
+ return new TenderAuthorizationStatusLine(this.lineNumber, this.lineType, this.status, this.tenderAmount, this.authResponse, this.failureReasonCode, this.authorizationDeviceId, this.transactionLineReference, this.forcedAuthorizationApproval, this.cardNumber, this.giftCardPin, this._valueCertificateNumber, this.offlineAuthorizationCode, this.offlineApprovalCode, this.tenderAuthCategory, this._tenderType, this.tenderTypeName, this._entryMethod, this._tenderReversalFailed, this._originalTenderLineReferences, this._actionType, this._mappedRefundTenderTypeName, this._mappedRefundCardTypeName, this._excludedRefundCardTypeNames, this._subType, this._isChangeProcessing, this._isTenderAuthorizationFallback, this._payByLinkCustomer, this._storeLanguage);
204
216
  }
205
217
  }
206
218
  exports.TenderAuthorizationStatusLine = TenderAuthorizationStatusLine;
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.40.0",
3
+ "version": "1.41.1",
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",
@@ -54,15 +54,15 @@
54
54
  "peerDependencies": {
55
55
  "@aptos-scp/scp-component-business-core": "^1.12.7",
56
56
  "@aptos-scp/scp-component-logging": "^2.1.16",
57
- "@aptos-scp/scp-component-pricing": "^7.57.0",
57
+ "@aptos-scp/scp-component-pricing": "^7.61.0",
58
58
  "@aptos-scp/scp-component-store-items": "^1.19.0",
59
59
  "@aptos-scp/scp-component-store-selling-core": "^18.9.3",
60
60
  "@aptos-scp/scp-component-taxation": "^5.27.3",
61
61
  "@aptos-scp/scp-component-user": "^1.4.0",
62
62
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
63
63
  "@aptos-scp/scp-types-core-config": "^2.2.1",
64
- "@aptos-scp/scp-types-commerce-devices": "^3.3.0",
65
- "@aptos-scp/scp-types-commerce-transaction": "^1.67.0",
64
+ "@aptos-scp/scp-types-commerce-devices": "^3.9.0",
65
+ "@aptos-scp/scp-types-commerce-transaction": "^1.69.1",
66
66
  "@aptos-scp/scp-types-customer": "^3.7.0",
67
67
  "@aptos-scp/scp-types-einvoice": "^1.17.0",
68
68
  "@aptos-scp/scp-types-inventory": "^2.0.0",
@@ -76,15 +76,15 @@
76
76
  "@aptos-scp/scp-component-business-core": "^1.12.7",
77
77
  "@aptos-scp/scp-component-commit-configs": "^4.1.3",
78
78
  "@aptos-scp/scp-component-logging": "^2.1.16",
79
- "@aptos-scp/scp-component-pricing": "^7.57.0",
79
+ "@aptos-scp/scp-component-pricing": "^7.61.0",
80
80
  "@aptos-scp/scp-component-rn-circuit-breaker": "^1.0.15",
81
81
  "@aptos-scp/scp-component-store-items": "^1.19.0",
82
82
  "@aptos-scp/scp-component-store-selling-core": "^18.9.3",
83
83
  "@aptos-scp/scp-component-taxation": "^5.27.3",
84
84
  "@aptos-scp/scp-component-user": "^1.4.0",
85
85
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
86
- "@aptos-scp/scp-types-commerce-devices": "^3.6.0",
87
- "@aptos-scp/scp-types-commerce-transaction": "^1.67.0",
86
+ "@aptos-scp/scp-types-commerce-devices": "^3.9.0",
87
+ "@aptos-scp/scp-types-commerce-transaction": "^1.69.1",
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",
@@ -94,7 +94,7 @@
94
94
  "@aptos-scp/scp-types-inventory": "^2.0.0",
95
95
  "@aptos-scp/scp-types-loyalty-memberships": "^2.3.0",
96
96
  "@aptos-scp/scp-types-orders": "^4.11.0",
97
- "@aptos-scp/scp-types-pricing": "^4.25.0",
97
+ "@aptos-scp/scp-types-pricing": "^4.26.0",
98
98
  "@aptos-scp/scp-types-ss-transaction-history": "^1.6.0",
99
99
  "@aptos-scp/scp-types-store-items": "^1.23.0",
100
100
  "@aptos-scp/scp-types-terminal-settings": "^1.3.0",