@aptos-scp/scp-component-store-selling-features-domain-model 2.38.1 → 2.40.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.
@@ -180,6 +180,8 @@ export declare enum UiInputKey {
180
180
  ITEM_FILTER_BY = "input_itemFilterBy",
181
181
  ITEM_CALCULATION_PROFILE = "item_calculationProfile",
182
182
  ITEM_FULFILLMENT_TYPE = "input_itemFulfillmentType",
183
+ ITEM_PRE_ORDER = "input_itemPreOrder",
184
+ ITEM_PRE_ORDER_AVAILABLE_DATE = "input_itemPreOrderAvailableDate",
183
185
  ITEM_LOOKUP_TYPE = "input_itemLookupType",
184
186
  LAST_TRANSACTION = "input_lastTransaction",
185
187
  LINE_NUMBER = "input_lineNumber",
@@ -1005,7 +1007,9 @@ export declare enum CollectedDataKey {
1005
1007
  TotalLineTax = "totalLineTax",
1006
1008
  CustomerInputScreens = "customerInputScreens",
1007
1009
  CustomerInputMode = "customerInputMode",
1008
- PreAuthCapture = "preAuthCapture"
1010
+ PreAuthCapture = "preAuthCapture",
1011
+ PreOrder = "preOrder",
1012
+ PreOrderAvailableDate = "preOrderAvailableDate"
1009
1013
  }
1010
1014
  export declare enum ItemLookupType {
1011
1015
  ProductInquiryDetail = "ProductInquiryDetail",
@@ -181,6 +181,8 @@ var UiInputKey;
181
181
  UiInputKey["ITEM_FILTER_BY"] = "input_itemFilterBy";
182
182
  UiInputKey["ITEM_CALCULATION_PROFILE"] = "item_calculationProfile";
183
183
  UiInputKey["ITEM_FULFILLMENT_TYPE"] = "input_itemFulfillmentType";
184
+ UiInputKey["ITEM_PRE_ORDER"] = "input_itemPreOrder";
185
+ UiInputKey["ITEM_PRE_ORDER_AVAILABLE_DATE"] = "input_itemPreOrderAvailableDate";
184
186
  UiInputKey["ITEM_LOOKUP_TYPE"] = "input_itemLookupType";
185
187
  UiInputKey["LAST_TRANSACTION"] = "input_lastTransaction";
186
188
  UiInputKey["LINE_NUMBER"] = "input_lineNumber";
@@ -1013,6 +1015,8 @@ var CollectedDataKey;
1013
1015
  CollectedDataKey["CustomerInputScreens"] = "customerInputScreens";
1014
1016
  CollectedDataKey["CustomerInputMode"] = "customerInputMode";
1015
1017
  CollectedDataKey["PreAuthCapture"] = "preAuthCapture";
1018
+ CollectedDataKey["PreOrder"] = "preOrder";
1019
+ CollectedDataKey["PreOrderAvailableDate"] = "preOrderAvailableDate";
1016
1020
  })(CollectedDataKey = exports.CollectedDataKey || (exports.CollectedDataKey = {}));
1017
1021
  var ItemLookupType;
1018
1022
  (function (ItemLookupType) {
@@ -60,6 +60,8 @@ export declare abstract class BaseItemLineDecorator extends BaseLineDecorator<II
60
60
  get sublines(): IItemSubline[];
61
61
  get fulfillmentGroupId(): number;
62
62
  get sendSale(): boolean;
63
+ get preOrder(): boolean;
64
+ get preOrderAvailableDate(): string;
63
65
  get subscribed(): boolean;
64
66
  get subscriptionQuantity(): number;
65
67
  get taxByAuthorityBeforeVoid(): IAppliedTax[];
@@ -129,6 +129,12 @@ class BaseItemLineDecorator extends BaseLineDecorator_1.BaseLineDecorator {
129
129
  get sendSale() {
130
130
  return this.decoratedTransactionLine.sendSale;
131
131
  }
132
+ get preOrder() {
133
+ return this.decoratedTransactionLine.preOrder;
134
+ }
135
+ get preOrderAvailableDate() {
136
+ return this.decoratedTransactionLine.preOrderAvailableDate;
137
+ }
132
138
  get subscribed() {
133
139
  return this.decoratedTransactionLine.subscribed;
134
140
  }
@@ -258,6 +258,12 @@ export interface IItemLine extends ITransactionLine, IVoidableLine, IPriceProvid
258
258
  */
259
259
  readonly originalSaleLoyaltyTransactionKeys?: string[];
260
260
  readonly rewardCardTenders?: IRewardCardTender[];
261
+ /** Flag that indicates that the order item is a pre-order */
262
+ readonly preOrder?: boolean;
263
+ /**
264
+ * For pre-order items, the available date of the item.
265
+ */
266
+ readonly preOrderAvailableDate?: string;
261
267
  setTransactionLineTaxes(transactionLineTaxes: ITransactionLineTaxes, extendedAmount?: Money): IItemLine;
262
268
  setSublines(sublines: IItemSubline[]): IItemLine;
263
269
  setTaxExemptInformation(taxExemptLine: ItemTaxExemptLine | TransactionTaxExemptLine, preTaxExemptDetails: IAppliedTax[]): IItemLine;
@@ -301,6 +307,7 @@ export interface IItemSubline {
301
307
  readonly quantity: number;
302
308
  readonly adjustments: ISerializedSublinePricingAdjustmentWithSource[];
303
309
  readonly taxByAuthority: ITaxByTaxAuthority[];
310
+ readonly rewardCardTenders?: IRewardCardTender[];
304
311
  readonly taxExemptDisplayName?: string;
305
312
  readonly extendedAmountExcludingTax?: Money;
306
313
  readonly extendedAmountIncludingTax?: Money;
@@ -1,4 +1,4 @@
1
- import { IPricingMetadataPersistanceObject, ISerializedLinePricingAdjustment, ISerializedLinePricingRewardCardTender, ISerializedSubline, ISerializedSublinePricingAdjustment, ISublinePricingAdjustment, RewardIssue } from "@aptos-scp/scp-component-pricing";
1
+ import { IPricingMetadataPersistanceObject, ISerializedLinePricingAdjustment, ISerializedLinePricingRewardCardTender, ISerializedPricingRewardCardTender, ISerializedSubline, ISerializedSublinePricingAdjustment, ISublinePricingAdjustment, RewardIssue } from "@aptos-scp/scp-component-pricing";
2
2
  import { ISerializedNonFinancialReward } from "@aptos-scp/scp-component-pricing/lib/interfaces/ILineNonFinancialReward";
3
3
  import { ICompetitivePriceInformation, ILoyaltyInformation, ISupervisorOverrideInformation, PricingAdjustmentScope, SourceIndicator } from "@aptos-scp/scp-types-commerce-transaction";
4
4
  import { PotentialPromotion, RewardCardDiscount, RewardCardTender } from "@aptos-scp/scp-types-pricing";
@@ -31,6 +31,7 @@ export interface ISerializedSublineWithSource extends ISerializedSubline {
31
31
  export interface ISerializedSublineQuantityWithSource {
32
32
  quantity: number;
33
33
  adjustments: ISerializedSublinePricingAdjustmentWithSource[];
34
+ rewardCardTenders?: ISerializedPricingRewardCardTender[];
34
35
  }
35
36
  export interface ISerializedSublinePricingAdjustmentWithSource extends ISerializedSublinePricingAdjustment {
36
37
  sourceIndicator?: SourceIndicator;
@@ -114,6 +114,8 @@ export declare class ItemLine extends BaseTransactionLine implements IItemLine,
114
114
  private _originalAdjustments?;
115
115
  private _taxIndicatorOnReceipt?;
116
116
  private _rewardCardTenders?;
117
+ private _preOrder?;
118
+ private _preOrderAvailableDate?;
117
119
  /**
118
120
  * The create method is called by the transaction line factory to create an instance and initialize it from the
119
121
  * data collected during the qualification process.
@@ -215,6 +217,8 @@ export declare class ItemLine extends BaseTransactionLine implements IItemLine,
215
217
  get sublineIndexFromReturnItem(): number;
216
218
  get fulfillmentGroupId(): number;
217
219
  get sendSale(): boolean;
220
+ get preOrder(): boolean;
221
+ get preOrderAvailableDate(): string;
218
222
  get subscribed(): boolean;
219
223
  get subscriptionQuantity(): number;
220
224
  get subLineFromReturnItem(): IPostableSubline;
@@ -54,6 +54,8 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
54
54
  const lineNumberFromOrder = collectedData.get(Constants_1.CollectedDataKey.LineNumberFromOrder);
55
55
  const lineSavings = collectedData.get(Constants_1.CollectedDataKey.LineSavings);
56
56
  const sendSaleLine = collectedData.get(Constants_1.CollectedDataKey.SendSaleItem);
57
+ const preOrder = collectedData.get(Constants_1.CollectedDataKey.PreOrder);
58
+ const preOrderAvailableDate = collectedData.get(Constants_1.CollectedDataKey.PreOrderAvailableDate);
57
59
  const originalAdjustments = collectedData.get(Constants_1.CollectedDataKey.OriginalAdjustments);
58
60
  accountingCurrency = (storeItem.price && storeItem.price.amount.currency) || accountingCurrency;
59
61
  let itemLine = new ItemLine(lineNumber, lineType, (storeItem.price && storeItem.price.amount.currency) || accountingCurrency, lineSavings);
@@ -81,6 +83,10 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
81
83
  if (sendSaleLine) {
82
84
  itemLine._sendSale = true;
83
85
  }
86
+ if (preOrder) {
87
+ itemLine._preOrder = true;
88
+ itemLine._preOrderAvailableDate = preOrderAvailableDate;
89
+ }
84
90
  itemLine._authorizationDeviceId = authorizationDeviceId;
85
91
  itemLine._actionType = actionType;
86
92
  itemLine._enteredLookupKey = ItemLine.getEnteredLookupKeyFromCollectedData(collectedData);
@@ -551,6 +557,12 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
551
557
  get sendSale() {
552
558
  return this._sendSale;
553
559
  }
560
+ get preOrder() {
561
+ return this._preOrder;
562
+ }
563
+ get preOrderAvailableDate() {
564
+ return this._preOrderAvailableDate;
565
+ }
554
566
  get subscribed() {
555
567
  return this._subscribed;
556
568
  }
@@ -908,6 +920,8 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
908
920
  newItemLine._lineNumberFromReturnCanonicalSubItem = this._lineNumberFromReturnCanonicalSubItem;
909
921
  newItemLine._fulfillmentGroupId = this._fulfillmentGroupId;
910
922
  newItemLine._sendSale = this._sendSale;
923
+ newItemLine._preOrder = this._preOrder;
924
+ newItemLine._preOrderAvailableDate = this._preOrderAvailableDate;
911
925
  newItemLine._subscribed = this._subscribed;
912
926
  newItemLine._subscriptionQuantity = this._subscriptionQuantity;
913
927
  newItemLine._returnable = this._returnable;
@@ -1035,6 +1049,8 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
1035
1049
  this._lineNumberFromReturnCanonicalSubItem = transactionLineJsonObj._lineNumberFromReturnCanonicalSubItem;
1036
1050
  this._fulfillmentGroupId = transactionLineJsonObj._fulfillmentGroupId;
1037
1051
  this._sendSale = transactionLineJsonObj._sendSale;
1052
+ this._preOrder = transactionLineJsonObj._preOrder;
1053
+ this._preOrderAvailableDate = transactionLineJsonObj._preOrderAvailableDate;
1038
1054
  this._subscribed = transactionLineJsonObj._subscribed;
1039
1055
  this._subscriptionQuantity = transactionLineJsonObj._subscriptionQuantity;
1040
1056
  this._returnable = transactionLineJsonObj._returnable;
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.38.1",
3
+ "version": "2.40.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",
@@ -56,7 +56,7 @@
56
56
  "peerDependencies": {
57
57
  "@aptos-scp/scp-component-business-core": "^1.12.7",
58
58
  "@aptos-scp/scp-component-logging": "^2.1.16",
59
- "@aptos-scp/scp-component-pricing": "^7.68.0",
59
+ "@aptos-scp/scp-component-pricing": "^7.69.0",
60
60
  "@aptos-scp/scp-component-store-items": "^1.23.0",
61
61
  "@aptos-scp/scp-component-store-selling-core": "^18.9.3",
62
62
  "@aptos-scp/scp-component-taxation": "^5.28.0",
@@ -64,7 +64,7 @@
64
64
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
65
65
  "@aptos-scp/scp-types-core-config": "^2.2.1",
66
66
  "@aptos-scp/scp-types-commerce-devices": "^6.10.0",
67
- "@aptos-scp/scp-types-commerce-transaction": "^1.91.0",
67
+ "@aptos-scp/scp-types-commerce-transaction": "^1.92.0",
68
68
  "@aptos-scp/scp-types-customer": "^3.7.0",
69
69
  "@aptos-scp/scp-types-einvoice": "^1.17.0",
70
70
  "@aptos-scp/scp-types-inventory": "^2.0.0",
@@ -78,7 +78,7 @@
78
78
  "@aptos-scp/scp-component-business-core": "^1.12.7",
79
79
  "@aptos-scp/scp-component-commit-configs": "^4.1.3",
80
80
  "@aptos-scp/scp-component-logging": "^2.1.16",
81
- "@aptos-scp/scp-component-pricing": "^7.68.0",
81
+ "@aptos-scp/scp-component-pricing": "^7.69.0",
82
82
  "@aptos-scp/scp-component-rn-circuit-breaker": "^1.0.15",
83
83
  "@aptos-scp/scp-component-store-items": "^1.23.0",
84
84
  "@aptos-scp/scp-component-store-selling-core": "^18.9.3",
@@ -86,14 +86,14 @@
86
86
  "@aptos-scp/scp-component-user": "^1.4.0",
87
87
  "@aptos-scp/scp-types-client-registration": "^1.4.0",
88
88
  "@aptos-scp/scp-types-commerce-devices": "^6.10.0",
89
- "@aptos-scp/scp-types-commerce-transaction": "^1.91.0",
89
+ "@aptos-scp/scp-types-commerce-transaction": "^1.92.0",
90
90
  "@aptos-scp/scp-types-core": "^1.0.5",
91
91
  "@aptos-scp/scp-types-core-config": "^2.2.1",
92
92
  "@aptos-scp/scp-types-currency-conversion": "^1.2.0",
93
93
  "@aptos-scp/scp-types-customer": "^3.7.0",
94
94
  "@aptos-scp/scp-types-einvoice": "^1.17.0",
95
95
  "@aptos-scp/scp-types-fiscal-transaction": "^1.4.3",
96
- "@aptos-scp/scp-types-inventory": "^2.0.0",
96
+ "@aptos-scp/scp-types-inventory": "^2.2.0",
97
97
  "@aptos-scp/scp-types-loyalty-memberships": "^2.3.0",
98
98
  "@aptos-scp/scp-types-orders": "^4.11.0",
99
99
  "@aptos-scp/scp-types-pricing": "^4.31.1",