@chevre/domain 21.6.0-alpha.3 → 21.6.0-alpha.4

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.
@@ -105,7 +105,6 @@ async function main() {
105
105
  },
106
106
  offers: {
107
107
  typeOf: chevre.factory.offerType.Offer,
108
- priceCurrency: chevre.factory.priceCurrency.JPY,
109
108
  availabilityEnds: moment('2023-06-26T14:20:00.000Z')
110
109
  .toDate(),
111
110
  availabilityStarts: moment('2023-06-23T15:00:00.000Z')
@@ -275,7 +274,6 @@ async function main() {
275
274
  },
276
275
  offers: {
277
276
  typeOf: chevre.factory.offerType.Offer,
278
- priceCurrency: chevre.factory.priceCurrency.JPY,
279
277
  availabilityEnds: moment('2023-06-26T14:20:00.000Z')
280
278
  .toDate(),
281
279
  availabilityStarts: moment('2023-06-23T15:00:00.000Z')
@@ -6,14 +6,26 @@ import { chevre } from '../../../lib/index';
6
6
  async function main() {
7
7
  await mongoose.connect(<string>process.env.MONGOLAB_URI);
8
8
 
9
- const offerRepo = new chevre.repository.Offer(mongoose.connection);
9
+ const eventRepo = new chevre.repository.Event(mongoose.connection);
10
10
 
11
11
  let updateResult: any;
12
- updateResult = await offerRepo.unsetUnnecessaryFields({
13
- filter: { 'category.project': { $exists: true } },
14
- $unset: { 'category.project': 1 }
12
+ updateResult = await eventRepo.unsetUnnecessaryFields({
13
+ filter: { 'offers.acceptedPaymentMethod': { $exists: true } },
14
+ $unset: { 'offers.acceptedPaymentMethod': 1 }
15
15
  });
16
- console.log('offers unset', updateResult);
16
+ console.log('events unset', updateResult);
17
+
18
+ updateResult = await eventRepo.unsetUnnecessaryFields({
19
+ filter: { 'offers.project': { $exists: true } },
20
+ $unset: { 'offers.project': 1 }
21
+ });
22
+ console.log('events unset', updateResult);
23
+
24
+ updateResult = await eventRepo.unsetUnnecessaryFields({
25
+ filter: { 'offers.priceCurrency': { $exists: true } },
26
+ $unset: { 'offers.priceCurrency': 1 }
27
+ });
28
+ console.log('events unset', updateResult);
17
29
  }
18
30
 
19
31
  main()
@@ -455,14 +455,13 @@ function createScreeningEventFromCOA(params) {
455
455
  .toDate();
456
456
  }
457
457
  const offers = {
458
- // 不要なので廃止(2022-12-19~)
459
- // project: { typeOf: params.project.typeOf, id: params.project.id },
460
458
  typeOf: factory.offerType.Offer,
461
459
  offeredThrough: {
462
460
  typeOf: 'WebAPI',
463
461
  identifier: factory.service.webAPI.Identifier.COA
464
462
  },
465
- priceCurrency: factory.priceCurrency.JPY,
463
+ // 廃止(2023-08-07~)
464
+ // priceCurrency: factory.priceCurrency.JPY,
466
465
  itemOffered: {
467
466
  serviceOutput: {
468
467
  reservedTicket: {
@@ -605,10 +604,7 @@ function createScreeningEventSeriesFromCOA(params) {
605
604
  endDate: endDate,
606
605
  startDate: startDate,
607
606
  coaInfo,
608
- offers: Object.assign({
609
- // 不要なので廃止(2023-06-09~)
610
- // project: { typeOf: params.project.typeOf, id: params.project.id },
611
- typeOf: factory.offerType.Offer, priceCurrency: factory.priceCurrency.JPY }, (Array.isArray(unacceptedPaymentMethod)) ? { unacceptedPaymentMethod: unacceptedPaymentMethod } : undefined),
607
+ offers: Object.assign({ typeOf: factory.offerType.Offer }, (Array.isArray(unacceptedPaymentMethod)) ? { unacceptedPaymentMethod: unacceptedPaymentMethod } : undefined),
612
608
  additionalProperty
613
609
  };
614
610
  }
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "dependencies": {
12
- "@chevre/factory": "4.324.0-alpha.0",
12
+ "@chevre/factory": "4.324.0-alpha.1",
13
13
  "@cinerino/sdk": "3.162.2",
14
14
  "@motionpicture/coa-service": "9.2.0",
15
15
  "@motionpicture/gmo-service": "5.2.0",
@@ -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.6.0-alpha.3"
120
+ "version": "21.6.0-alpha.4"
121
121
  }