@aptos-scp/scp-component-store-selling-features-domain-model 2.35.0 → 2.35.2

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.
@@ -620,6 +620,7 @@ export declare enum CollectedDataKey {
620
620
  LineNumber = "lineNumber",
621
621
  LoyaltyPlanKey = "LoyaltyPlanKey",
622
622
  LoyaltyActivityId = "LoyaltyActivityId",
623
+ LoyaltyApiError = "LoyaltyApiError",
623
624
  LoyaltyDiscountProratedByService = "LoyaltyDiscountProratedByService",
624
625
  ProratedLoyaltyItemLines = "ProratedLoyaltyItemLines",
625
626
  ManualSubscriptionDiscountFlag = "ManualSubscriptionDiscountFlag",
@@ -627,6 +627,7 @@ var CollectedDataKey;
627
627
  CollectedDataKey["LineNumber"] = "lineNumber";
628
628
  CollectedDataKey["LoyaltyPlanKey"] = "LoyaltyPlanKey";
629
629
  CollectedDataKey["LoyaltyActivityId"] = "LoyaltyActivityId";
630
+ CollectedDataKey["LoyaltyApiError"] = "LoyaltyApiError";
630
631
  CollectedDataKey["LoyaltyDiscountProratedByService"] = "LoyaltyDiscountProratedByService";
631
632
  CollectedDataKey["ProratedLoyaltyItemLines"] = "ProratedLoyaltyItemLines";
632
633
  CollectedDataKey["ManualSubscriptionDiscountFlag"] = "ManualSubscriptionDiscountFlag";
@@ -3,6 +3,7 @@ import { IUser } from "@aptos-scp/scp-component-store-selling-core";
3
3
  import { IAppliedTax } from "@aptos-scp/scp-component-taxation";
4
4
  import { IAuthorizationResponse } from "@aptos-scp/scp-types-commerce-devices";
5
5
  import { ActionType, IPriceChange, ISubline as IPostableSubline, ITaxByTaxRule, ITaxExempt, ITaxOverride, ITaxOverrideDetails, ItemType, ITransactionLineReferenceType, SourceIndicator, UnitPriceSourceIndicator, StyleTypeEnum } from "@aptos-scp/scp-types-commerce-transaction";
6
+ import { ItemSubType } from "@aptos-scp/scp-types-store-items";
6
7
  import { ISublinePricingAdjustmentWithSource } from "./ISerializedPriceCalculationResultsWithSource";
7
8
  import { BaseLineDecorator } from "../../model/BaseLineDecorator";
8
9
  import { IItemPriceSource, ItemLookupKey, SelectedUnitPrice, StoreItem } from "../../model/StoreItem";
@@ -126,6 +127,7 @@ export declare abstract class BaseItemLineDecorator extends BaseLineDecorator<II
126
127
  get presentation(): IItemLine;
127
128
  get extendedPresentationAmount(): Money;
128
129
  get subscriptionFrequencyCodes(): string[];
130
+ get subType(): ItemSubType;
129
131
  get cancelled(): boolean;
130
132
  get extensibilityFormData(): IExtensibilityForm[];
131
133
  get itemTaxExemptAmount(): Money;
@@ -330,6 +330,9 @@ class BaseItemLineDecorator extends BaseLineDecorator_1.BaseLineDecorator {
330
330
  get subscriptionFrequencyCodes() {
331
331
  return this.decoratedTransactionLine.subscriptionFrequencyCodes;
332
332
  }
333
+ get subType() {
334
+ return this.decoratedTransactionLine.subType;
335
+ }
333
336
  get cancelled() {
334
337
  return this.decoratedTransactionLine.cancelled;
335
338
  }
@@ -3,6 +3,7 @@ import { ITransactionLine, IUser } from "@aptos-scp/scp-component-store-selling-
3
3
  import { IAppliedTax } from "@aptos-scp/scp-component-taxation";
4
4
  import { IAuthorizationResponse } from "@aptos-scp/scp-types-commerce-devices";
5
5
  import { ActionType, IPriceChange, ISubline as IPostableSubline, ITaxByTaxAuthority, ITaxByTaxRule, ITaxExempt, ITaxOverride, ITaxOverrideDetails, ItemType, ITransactionLineReferenceType, IUser as IPostedUser, LoyaltyRedemptionType, SourceIndicator, UnitPriceSourceIndicator, ICompetitivePriceInformation, IProratedItemLineReference, IReason, StyleTypeEnum } from "@aptos-scp/scp-types-commerce-transaction";
6
+ import { ItemSubType } from "@aptos-scp/scp-types-store-items";
6
7
  import { ISerializedSublinePricingAdjustmentWithSource, ISublinePricingAdjustmentWithSource } from "./ISerializedPriceCalculationResultsWithSource";
7
8
  import { SecurityAuthorizationStatusType } from "../Constants";
8
9
  import { Customer } from "../Customer";
@@ -209,6 +210,8 @@ export interface IItemLine extends ITransactionLine, IVoidableLine, IPriceProvid
209
210
  * List of delivery frequency codes the item is able to use.
210
211
  */
211
212
  readonly subscriptionFrequencyCodes?: string[];
213
+ /** item sub type */
214
+ readonly subType?: ItemSubType;
212
215
  /**
213
216
  * For order actions, the line number of the item being acted upon from the order.
214
217
  */
@@ -4,6 +4,7 @@ import { IExtendedAmountMaintainer, ITransactionLine, IUser, UiBusinessEvent } f
4
4
  import { IAppliedTax } from "@aptos-scp/scp-component-taxation";
5
5
  import { IAuthorizationResponse } from "@aptos-scp/scp-types-commerce-devices";
6
6
  import { ActionType, ISameTransactionLineReference, ISubline as IPostableSubline, ITaxByTaxRule, ITaxExempt, ITaxOverride, ITaxOverrideDetails, ItemType, ITransactionLineReferenceType, SourceIndicator, UnitPriceSourceIndicator, IPriceChange, IReason, StyleTypeEnum } from "@aptos-scp/scp-types-commerce-transaction";
7
+ import { ItemSubType } from "@aptos-scp/scp-types-store-items";
7
8
  import { ISublinePricingAdjustmentWithSource } from "./ISerializedPriceCalculationResultsWithSource";
8
9
  import { ItemTaxExemptLine, TransactionTaxExemptLine } from "../../model/taxExempt";
9
10
  import { BaseTransactionLine } from "../BaseTransactionLine";
@@ -89,6 +90,7 @@ export declare class ItemLine extends BaseTransactionLine implements IItemLine,
89
90
  private _itemEmployeeDiscountPercent?;
90
91
  private _itemSelectedUnitPrice?;
91
92
  private _subscriptionFrequencyCodes?;
93
+ private _subType?;
92
94
  private _pricingCalculationSourceIndicator?;
93
95
  private _taxationCalculationSourceIndicator?;
94
96
  private _pricingDataSourceIndicator?;
@@ -253,6 +255,7 @@ export declare class ItemLine extends BaseTransactionLine implements IItemLine,
253
255
  get presentation(): IItemLine;
254
256
  get extendedPresentationAmount(): Money;
255
257
  get subscriptionFrequencyCodes(): string[];
258
+ get subType(): ItemSubType;
256
259
  get pricingCalculationSourceIndicator(): SourceIndicator;
257
260
  get taxationCalculationSourceIndicator(): SourceIndicator;
258
261
  get pricingDataSourceIndicator(): SourceIndicator;
@@ -39,7 +39,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
39
39
  // tslint:disable-next-line:cyclomatic-complexity
40
40
  // eslint-disable-next-line complexity
41
41
  static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
42
- var _a, _b, _c, _d, _e, _f, _g;
42
+ var _a, _b, _c, _d, _e, _f, _g, _h;
43
43
  let accountingCurrency = collectedData.get("accountingCurrency");
44
44
  const additionalItemInfo = collectedData.get("additionalItemInfo");
45
45
  const authResponse = collectedData.get(Constants_1.CollectedDataKey.TenderAuthResponse);
@@ -98,6 +98,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
98
98
  itemLine._eligibleForSubscription = (_b = storeItem.treatmentRules) === null || _b === void 0 ? void 0 : _b.eligibleForSubscription;
99
99
  itemLine._eligibleForSendSale = (_c = storeItem.treatmentRules) === null || _c === void 0 ? void 0 : _c.eligibleForSendSale;
100
100
  itemLine._subscriptionFrequencyCodes = storeItem.subscriptionFrequencyCodes;
101
+ itemLine._subType = (_d = storeItem) === null || _d === void 0 ? void 0 : _d.subType;
101
102
  if (collectedData.get(Constants_1.CollectedDataKey.OriginalAlternativeLookupCodesExternalItem)) {
102
103
  itemLine._itemLookupKeys = ItemLine.getItemLookupKeyFromCollectedData(collectedData.get(Constants_1.CollectedDataKey.OriginalAlternativeLookupCodesExternalItem));
103
104
  }
@@ -195,13 +196,13 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
195
196
  if (taxIndicatorOnReceipt) {
196
197
  itemLine._taxIndicatorOnReceipt = taxIndicatorOnReceipt;
197
198
  }
198
- if (((_d = originalLoyaltyInformation) === null || _d === void 0 ? void 0 : _d.length) > 0) {
199
+ if (((_e = originalLoyaltyInformation) === null || _e === void 0 ? void 0 : _e.length) > 0) {
199
200
  itemLine._originalLoyaltyInformation = originalLoyaltyInformation;
200
201
  }
201
202
  if (originalCompetitivePriceInformation) {
202
203
  itemLine._originalCompetitivePriceInformation = originalCompetitivePriceInformation;
203
204
  }
204
- if (((_e = originalSupervisorOverrideInformation) === null || _e === void 0 ? void 0 : _e.length) > 0) {
205
+ if (((_f = originalSupervisorOverrideInformation) === null || _f === void 0 ? void 0 : _f.length) > 0) {
205
206
  itemLine._originalSupervisorOverrideInformation = originalSupervisorOverrideInformation;
206
207
  }
207
208
  if (originalTaxOverride) {
@@ -240,11 +241,11 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
240
241
  itemLine._originalAdjustments = originalAdjustments;
241
242
  }
242
243
  const originalRedemptionLoyaltyTransactionKeys = collectedData.get(Constants_1.CollectedDataKey.OriginalRedemptionLoyaltyTransactionKeys);
243
- if (((_f = originalRedemptionLoyaltyTransactionKeys) === null || _f === void 0 ? void 0 : _f.length) > 0) {
244
+ if (((_g = originalRedemptionLoyaltyTransactionKeys) === null || _g === void 0 ? void 0 : _g.length) > 0) {
244
245
  itemLine._originalRedemptionLoyaltyTransactionKeys = originalRedemptionLoyaltyTransactionKeys;
245
246
  }
246
247
  const originalSaleLoyaltyTransactionKeys = collectedData.get(Constants_1.CollectedDataKey.OriginalSaleLoyaltyTransactionKeys);
247
- if (((_g = originalSaleLoyaltyTransactionKeys) === null || _g === void 0 ? void 0 : _g.length) > 0) {
248
+ if (((_h = originalSaleLoyaltyTransactionKeys) === null || _h === void 0 ? void 0 : _h.length) > 0) {
248
249
  itemLine._originalSaleLoyaltyTransactionKeys = originalSaleLoyaltyTransactionKeys;
249
250
  }
250
251
  const originalTransactionLineReference = collectedData.get(Constants_1.CollectedDataKey.OriginalTransactionLineReference);
@@ -673,6 +674,9 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
673
674
  get subscriptionFrequencyCodes() {
674
675
  return this._subscriptionFrequencyCodes;
675
676
  }
677
+ get subType() {
678
+ return this._subType;
679
+ }
676
680
  get pricingCalculationSourceIndicator() {
677
681
  return this._pricingCalculationSourceIndicator;
678
682
  }
@@ -922,6 +926,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
922
926
  newItemLine._itemEmployeeDiscountPercent = this._itemEmployeeDiscountPercent;
923
927
  newItemLine._itemSelectedUnitPrice = this._itemSelectedUnitPrice;
924
928
  newItemLine._subscriptionFrequencyCodes = this._subscriptionFrequencyCodes;
929
+ newItemLine._subType = this._subType;
925
930
  newItemLine._pricingCalculationSourceIndicator = this._pricingCalculationSourceIndicator;
926
931
  newItemLine._taxationCalculationSourceIndicator = this._taxationCalculationSourceIndicator;
927
932
  newItemLine._pricingDataSourceIndicator = this._pricingDataSourceIndicator;
@@ -1063,6 +1068,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
1063
1068
  this._itemEmployeeDiscountPercent = transactionLineJsonObj._itemEmployeeDiscountPercent;
1064
1069
  this._itemSelectedUnitPrice = transactionLineJsonObj._itemSelectedUnitPrice;
1065
1070
  this._subscriptionFrequencyCodes = transactionLineJsonObj._subscriptionFrequencyCodes;
1071
+ this._subType = transactionLineJsonObj._subType;
1066
1072
  this._pricingCalculationSourceIndicator = transactionLineJsonObj._pricingCalculationSourceIndicator;
1067
1073
  this._taxationCalculationSourceIndicator = transactionLineJsonObj._taxationCalculationSourceIndicator;
1068
1074
  this._pricingDataSourceIndicator = transactionLineJsonObj._pricingDataSourceIndicator;
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.35.0",
3
+ "version": "2.35.2",
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",