@aptos-scp/scp-component-store-selling-features-domain-model 2.34.3 → 2.35.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.
@@ -1,5 +1,5 @@
1
1
  import { Money, Price } from "@aptos-scp/scp-component-business-core";
2
- import { IExternalId, IImage, IItem, IPrice as IStoreItemsPrice, IProductAttribute, IProductAttributeTranslation, IStoreItemDescriptor, ItemType as StoreItemType, OrganizationScope, PriceChangeLevelType, Status, TreatmentRules, ITranslation } from "@aptos-scp/scp-component-store-items";
2
+ import { IExternalId, IImage, IItem, IPrice as IStoreItemsPrice, IProductAttribute, IProductAttributeTranslation, IStoreItemDescriptor, ItemType as StoreItemType, ItemSubType, OrganizationScope, PriceChangeLevelType, Status, TreatmentRules, ITranslation } from "@aptos-scp/scp-component-store-items";
3
3
  import { IConfigurationManager, RetailLocationIdentity } from "@aptos-scp/scp-component-store-selling-core";
4
4
  import { ItemType } from "@aptos-scp/scp-types-commerce-transaction";
5
5
  import { MerchandiseHierarchyNodeResponseV2 } from "@aptos-scp/scp-types-store-items";
@@ -145,6 +145,7 @@ export declare class StoreItem implements ISourceIndication, IStoreItemDescripto
145
145
  defaultReturnPrice?: Price;
146
146
  images?: IImage[];
147
147
  subscriptionFrequencyCodes?: string[];
148
+ subType?: ItemSubType;
148
149
  static createFromJsonObject(storeItemJsonObj: any): StoreItem;
149
150
  static convertStoreItemComponentIPriceToPrice(value: IStoreItemsPrice): Price;
150
151
  static createFromItemObject(configurationManager: IConfigurationManager, retailLocationIdentity: RetailLocationIdentity, accountingCurrency: string, itemToConvert: IItem, locale?: string, sourceIndicator?: SourceType): StoreItem;
@@ -322,6 +322,9 @@ class StoreItem {
322
322
  if (storeItemJsonObj.subscriptionFrequencyCodes) {
323
323
  storeItem.subscriptionFrequencyCodes = storeItemJsonObj.subscriptionFrequencyCodes;
324
324
  }
325
+ if (storeItemJsonObj.subType) {
326
+ storeItem.subType = storeItemJsonObj.subType;
327
+ }
325
328
  storeItem.departmentGroupId = StoreItem.getStringFromJsonObject(storeItemJsonObj.departmentGroupId);
326
329
  return storeItem;
327
330
  }
@@ -447,6 +450,9 @@ class StoreItem {
447
450
  if (item.subscriptionFrequencyCodes) {
448
451
  storeItem.subscriptionFrequencyCodes = item.subscriptionFrequencyCodes;
449
452
  }
453
+ if (item.subType) {
454
+ storeItem.subType = item.subType;
455
+ }
450
456
  }
451
457
  catch (err) {
452
458
  logger.catching(err, entryMessage);
@@ -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.34.3",
3
+ "version": "2.35.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",
@@ -56,7 +56,7 @@
56
56
  "@aptos-scp/scp-component-business-core": "^1.12.7",
57
57
  "@aptos-scp/scp-component-logging": "^2.1.16",
58
58
  "@aptos-scp/scp-component-pricing": "^7.66.4",
59
- "@aptos-scp/scp-component-store-items": "^1.22.2",
59
+ "@aptos-scp/scp-component-store-items": "^1.23.0",
60
60
  "@aptos-scp/scp-component-store-selling-core": "^18.9.3",
61
61
  "@aptos-scp/scp-component-taxation": "^5.28.0",
62
62
  "@aptos-scp/scp-component-user": "^1.4.0",
@@ -79,7 +79,7 @@
79
79
  "@aptos-scp/scp-component-logging": "^2.1.16",
80
80
  "@aptos-scp/scp-component-pricing": "^7.66.4",
81
81
  "@aptos-scp/scp-component-rn-circuit-breaker": "^1.0.15",
82
- "@aptos-scp/scp-component-store-items": "^1.22.2",
82
+ "@aptos-scp/scp-component-store-items": "^1.23.0",
83
83
  "@aptos-scp/scp-component-store-selling-core": "^18.9.3",
84
84
  "@aptos-scp/scp-component-taxation": "^5.28.0",
85
85
  "@aptos-scp/scp-component-user": "^1.4.0",
@@ -97,7 +97,7 @@
97
97
  "@aptos-scp/scp-types-orders": "^4.11.0",
98
98
  "@aptos-scp/scp-types-pricing": "^4.30.0",
99
99
  "@aptos-scp/scp-types-ss-transaction-history": "^1.6.0",
100
- "@aptos-scp/scp-types-store-items": "^1.34.0",
100
+ "@aptos-scp/scp-types-store-items": "^1.41.0",
101
101
  "@aptos-scp/scp-types-terminal-settings": "^1.3.0",
102
102
  "@aptos-scp/scp-types-transaction": "^1.4.3",
103
103
  "@aptos-scp/scp-types-user": "^1.5.2",