@chevre/domain 21.8.0-alpha.42 → 21.8.0-alpha.43

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.
@@ -30,6 +30,9 @@ type KeyOfUnitPriceOffer = keyof factory.unitPriceOffer.IUnitPriceOffer;
30
30
  type IProjection = {
31
31
  [key in KeyOfUnitPriceOffer]?: 0 | 1;
32
32
  };
33
+ export type IUnitPriceOfferFromAggregateOffer = factory.unitPriceOffer.IUnitPriceOffer & {
34
+ offerIndex?: number;
35
+ };
33
36
  /**
34
37
  * オファーリポジトリ
35
38
  */
@@ -70,7 +73,7 @@ export declare class MongoRepository {
70
73
  */
71
74
  useOffersAsPrimary?: boolean;
72
75
  }): Promise<{
73
- offers: factory.unitPriceOffer.IUnitPriceOffer[];
76
+ offers: IUnitPriceOfferFromAggregateOffer[];
74
77
  sortedOfferIds: string[];
75
78
  }>;
76
79
  findById(params: {
@@ -3,7 +3,9 @@ type IMovieTicketTypeChargeSpecification = factory.priceSpecification.IPriceSpec
3
3
  type ICategoryCodeChargeSpecification = factory.priceSpecification.IPriceSpecification<factory.priceSpecificationType.CategoryCodeChargeSpecification>;
4
4
  declare function createCompoundPriceSpec4event(params: {
5
5
  eligibleQuantity: factory.quantitativeValue.IQuantitativeValue<factory.unitCode.C62>;
6
- offer: factory.unitPriceOffer.IUnitPriceOffer;
6
+ offer: factory.unitPriceOffer.IUnitPriceOffer & {
7
+ offerIndex?: number;
8
+ };
7
9
  movieTicketTypeChargeSpecs: IMovieTicketTypeChargeSpecification[];
8
10
  videoFormatChargeSpecs: ICategoryCodeChargeSpecification[];
9
11
  soundFormatChargeSpecs: ICategoryCodeChargeSpecification[];
@@ -13,5 +15,6 @@ declare function createCompoundPriceSpec4event(params: {
13
15
  sortIndex?: number;
14
16
  }): factory.product.ITicketOffer & {
15
17
  sortIndex?: number;
18
+ offerIndex?: number;
16
19
  };
17
20
  export { createCompoundPriceSpec4event };
@@ -69,25 +69,18 @@ function createCompoundPriceSpec4event(params) {
69
69
  ...mvtkPriceComponents
70
70
  ];
71
71
  const compoundPriceSpecification = {
72
- // 不要な属性を除外(2022-11-02~)
73
- // project: params.offer.project,
74
72
  typeOf: factory.priceSpecificationType.CompoundPriceSpecification,
75
73
  priceCurrency: factory.priceCurrency.JPY,
76
74
  valueAddedTaxIncluded: true,
77
75
  priceComponent
78
76
  };
79
77
  // 必要な属性のみに限定(2023-02-24~)
80
- // const { project, ...unitOfferFields4ticketOffer } = params.offer;
81
- const { name, description, alternateName, color, typeOf, id,
82
- // addOn,
83
- availability, availableAtOrFrom, category, eligibleMembershipType, eligibleSeatingType, eligibleMonetaryAmount, eligibleSubReservation, priceCurrency, validFrom, validThrough, validRateLimit, additionalProperty, identifier, itemOffered } = params.offer;
84
- return Object.assign(Object.assign({ name, description, alternateName, color, typeOf, id,
85
- // addOn,
86
- // availability,
78
+ const { name, description, alternateName, color, typeOf, id, availability, availableAtOrFrom, category, eligibleMembershipType, eligibleSeatingType, eligibleMonetaryAmount, eligibleSubReservation, priceCurrency, validFrom, validThrough, validRateLimit, additionalProperty, identifier, itemOffered, offerIndex } = params.offer;
79
+ return Object.assign(Object.assign(Object.assign({ name, description, alternateName, color, typeOf, id,
87
80
  availableAtOrFrom, category,
88
81
  eligibleMembershipType, eligibleSeatingType, eligibleMonetaryAmount, eligibleSubReservation,
89
82
  priceCurrency,
90
83
  validFrom, validThrough, validRateLimit, additionalProperty,
91
- identifier, itemOffered, addOn: params.addOn, eligibleQuantity: params.eligibleQuantity, priceSpecification: compoundPriceSpecification }, (typeof params.availability === 'string') ? { availability: params.availability } : { availability }), (typeof params.sortIndex === 'number') ? { sortIndex: params.sortIndex } : undefined);
84
+ identifier, itemOffered, addOn: params.addOn, eligibleQuantity: params.eligibleQuantity, priceSpecification: compoundPriceSpecification }, (typeof params.availability === 'string') ? { availability: params.availability } : { availability }), (typeof params.sortIndex === 'number') ? { sortIndex: params.sortIndex } : undefined), (typeof offerIndex === 'number') ? { offerIndex } : undefined);
92
85
  }
93
86
  exports.createCompoundPriceSpec4event = createCompoundPriceSpec4event;
package/package.json CHANGED
@@ -117,5 +117,5 @@
117
117
  "postversion": "git push origin --tags",
118
118
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
119
119
  },
120
- "version": "21.8.0-alpha.42"
120
+ "version": "21.8.0-alpha.43"
121
121
  }