@chevre/domain 24.1.0-alpha.1 → 24.1.0-alpha.10

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.
Files changed (29) hide show
  1. package/README.md +0 -2
  2. package/lib/chevre/repo/acceptedOffer.d.ts +1 -1
  3. package/lib/chevre/repo/acceptedOffer.js +10 -10
  4. package/lib/chevre/repo/accountingReport.d.ts +9 -2
  5. package/lib/chevre/repo/accountingReport.js +30 -28
  6. package/lib/chevre/repo/aggregateReservation.d.ts +6 -0
  7. package/lib/chevre/repo/aggregateReservation.js +9 -0
  8. package/lib/chevre/repo/factory/reservation/createMongoConditions.js +155 -180
  9. package/lib/chevre/repo/mongoose/schemas/accountingReport.js +10 -9
  10. package/lib/chevre/repo/mongoose/schemas/order.js +108 -108
  11. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +1 -0
  12. package/lib/chevre/repo/mongoose/schemas/reservation.js +117 -117
  13. package/lib/chevre/repo/order.d.ts +2 -1
  14. package/lib/chevre/repo/order.js +171 -170
  15. package/lib/chevre/repo/project.d.ts +0 -3
  16. package/lib/chevre/repo/project.js +0 -10
  17. package/lib/chevre/repo/reservation.d.ts +2 -0
  18. package/lib/chevre/service/aggregation/event/aggregateOffers.js +17 -26
  19. package/lib/chevre/service/order/createAccountingReportIfNotExist.d.ts +1 -3
  20. package/lib/chevre/service/order/createAccountingReportIfNotExist.js +67 -72
  21. package/lib/chevre/service/reserve/useReservation.d.ts +1 -1
  22. package/lib/chevre/service/reserve/useReservation.js +20 -24
  23. package/lib/chevre/service/task/createAccountingReport.js +11 -9
  24. package/lib/chevre/service/task/useReservation.d.ts +2 -2
  25. package/lib/chevre/service/task/useReservation.js +6 -18
  26. package/lib/chevre/service/taskHandler.js +1 -0
  27. package/package.json +2 -2
  28. package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +0 -33
  29. package/lib/chevre/repo/mongoose/schemas/productModel.js +0 -57
package/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Chevre Domain Library for Node.js
2
2
 
3
3
  [![npm (scoped)](https://img.shields.io/npm/v/@chevre/domain.svg)](https://www.npmjs.com/package/@chevre/domain)
4
- [![CircleCI](https://circleci.com/gh/chevre-jp/domain.svg?style=svg)](https://circleci.com/gh/chevre-jp/domain)
5
- [![Coverage Status](https://coveralls.io/repos/github/chevre-jp/domain/badge.svg?branch=master)](https://coveralls.io/github/chevre-jp/domain?branch=master)
6
4
  [![Known Vulnerabilities](https://snyk.io/test/github/chevre-jp/domain/badge.svg)](https://snyk.io/test/github/chevre-jp/domain)
7
5
  [![npm](https://img.shields.io/npm/dm/@chevre/domain.svg)](https://nodei.co/npm/@chevre/domain/)
8
6
 
@@ -21,7 +21,7 @@ export declare class AcceptedOfferRepo {
21
21
  * オファー展開の注文検索
22
22
  */
23
23
  searchWithUnwoundAcceptedOffers(params: factory.order.ISearchConditions, projection: IProjection4searchWithUnwoundAcceptedOffers, options: {
24
- useLimitAfterSkip: boolean;
24
+ useMatchBeforeUnwind: boolean;
25
25
  }): Promise<factory.order.IOrder[]>;
26
26
  aggreateOwnershipInfosByOrder(filter: {
27
27
  orderNumber: {
@@ -17,9 +17,16 @@ class AcceptedOfferRepo {
17
17
  * オファー展開の注文検索
18
18
  */
19
19
  async searchWithUnwoundAcceptedOffers(params, projection, options) {
20
- const { useLimitAfterSkip } = options;
20
+ const { useMatchBeforeUnwind } = options;
21
21
  const conditions = order_2.OrderRepo.CREATE_MONGO_CONDITIONS(params);
22
22
  const aggregate = this.orderModel.aggregate();
23
+ if (useMatchBeforeUnwind) {
24
+ // unwind->matchでは遅い?
25
+ // match->unwind->matchにする(2026-05-08~)
26
+ conditions.forEach((c) => {
27
+ aggregate.match(c);
28
+ });
29
+ }
23
30
  // pipelineの順序に注意
24
31
  // @see https://docs.mongodb.com/manual/reference/operator/aggregation/sort/
25
32
  /* istanbul ignore else */
@@ -37,17 +44,10 @@ class AcceptedOfferRepo {
37
44
  if (typeof params.limit === 'number' && params.limit > 0) {
38
45
  const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
39
46
  // support skip -> limit(2025-07-09~)
40
- if (useLimitAfterSkip) {
41
- aggregate.skip(params.limit * (page - 1))
42
- .limit(params.limit);
43
- }
44
- else {
45
- aggregate.limit(params.limit * page)
46
- .skip(params.limit * (page - 1));
47
- }
47
+ aggregate.skip(params.limit * (page - 1))
48
+ .limit(params.limit);
48
49
  }
49
50
  return aggregate
50
- // .allowDiskUse(true) // false化(2023-11-30~)
51
51
  .option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
52
52
  .exec();
53
53
  }
@@ -2,6 +2,11 @@ import type { Connection, PipelineStage } from 'mongoose';
2
2
  import { factory } from '../factory';
3
3
  import { IDocType } from './mongoose/schemas/accountingReport';
4
4
  type IMatchStage = PipelineStage.Match;
5
+ type IReportAsFindResult = Pick<factory.report.accountingReport.IReport, 'mainEntity'> & {
6
+ isPartOf: {
7
+ mainEntity: factory.report.accountingReport.IOrderAsMainEntity;
8
+ };
9
+ };
5
10
  /**
6
11
  * 経理レポートリポジトリ
7
12
  */
@@ -35,11 +40,13 @@ export declare class AccountingReportRepo {
35
40
  };
36
41
  hasPart: factory.report.accountingReport.IChildReport;
37
42
  }): Promise<void>;
38
- search(params: factory.report.accountingReport.ISearchConditions & {
43
+ findAccountingReports(params: factory.report.accountingReport.ISearchConditions & {
39
44
  seller?: {
40
45
  id?: string;
41
46
  };
42
- }): Promise<any[]>;
47
+ limit: number;
48
+ page: number;
49
+ }): Promise<IReportAsFindResult[]>;
43
50
  unsetUnnecessaryFields(params: {
44
51
  filter: any;
45
52
  $unset: any;
@@ -4,7 +4,6 @@ exports.AccountingReportRepo = void 0;
4
4
  const errorHandler_1 = require("../errorHandler");
5
5
  const factory_1 = require("../factory");
6
6
  const accountingReport_1 = require("./mongoose/schemas/accountingReport");
7
- const DEFAULT_SEARCH_LIMIT = 100;
8
7
  /**
9
8
  * 経理レポートリポジトリ
10
9
  */
@@ -49,28 +48,30 @@ class AccountingReportRepo {
49
48
  $match: { 'mainEntity.orderDate': { $lte: orderDateLte } }
50
49
  });
51
50
  }
52
- const reservationForStartDateGte = params.order?.acceptedOffers?.itemOffered?.reservationFor?.startDate?.$gte;
53
- if (reservationForStartDateGte instanceof Date) {
54
- matchStages.push({
55
- $match: {
56
- 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': {
57
- $exists: true,
58
- $gte: reservationForStartDateGte
59
- }
60
- }
61
- });
62
- }
63
- const reservationForStartDateLte = params.order?.acceptedOffers?.itemOffered?.reservationFor?.startDate?.$lte;
64
- if (reservationForStartDateLte instanceof Date) {
65
- matchStages.push({
66
- $match: {
67
- 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': {
68
- $exists: true,
69
- $lte: reservationForStartDateLte
70
- }
71
- }
72
- });
73
- }
51
+ // discontinue(2026-05-01~)
52
+ // const reservationForStartDateGte = params.order?.acceptedOffers?.itemOffered?.reservationFor?.startDate?.$gte;
53
+ // if (reservationForStartDateGte instanceof Date) {
54
+ // matchStages.push({
55
+ // $match: {
56
+ // 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': {
57
+ // $exists: true,
58
+ // $gte: reservationForStartDateGte
59
+ // }
60
+ // }
61
+ // });
62
+ // }
63
+ // discontinue(2026-05-01~)
64
+ // const reservationForStartDateLte = params.order?.acceptedOffers?.itemOffered?.reservationFor?.startDate?.$lte;
65
+ // if (reservationForStartDateLte instanceof Date) {
66
+ // matchStages.push({
67
+ // $match: {
68
+ // 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': {
69
+ // $exists: true,
70
+ // $lte: reservationForStartDateLte
71
+ // }
72
+ // }
73
+ // });
74
+ // }
74
75
  return matchStages;
75
76
  }
76
77
  async syncMainEntity(params) {
@@ -135,9 +136,8 @@ class AccountingReportRepo {
135
136
  throw new factory_1.factory.errors.NotFound(this.accountingReportModel.modelName);
136
137
  }
137
138
  }
138
- async search(params) {
139
- const limit = (typeof params.limit === 'number') ? Math.min(params.limit, DEFAULT_SEARCH_LIMIT) : DEFAULT_SEARCH_LIMIT;
140
- const page = (typeof params.page === 'number') ? Math.max(params.page, 1) : 1;
139
+ async findAccountingReports(params) {
140
+ const { limit, page } = params;
141
141
  const unwindAcceptedOffers = params.$unwindAcceptedOffers === '1';
142
142
  const matchStages = AccountingReportRepo.CREATE_MONGO_CONDITIONS(params);
143
143
  const aggregate = this.accountingReportModel.aggregate([
@@ -157,9 +157,11 @@ class AccountingReportRepo {
157
157
  }
158
158
  }
159
159
  ]);
160
- return aggregate.allowDiskUse(true)
161
- .limit(limit * page)
160
+ return aggregate
161
+ // .limit(limit * page)
162
+ // .skip(limit * (page - 1))
162
163
  .skip(limit * (page - 1))
164
+ .limit(limit)
163
165
  // .setOptions({ maxTimeMS: 10000 })
164
166
  .exec();
165
167
  }
@@ -54,5 +54,11 @@ export declare class AggregateReservationRepo {
54
54
  filter: any;
55
55
  $unset: any;
56
56
  }): Promise<import("mongoose").UpdateWriteOpResult>;
57
+ /**
58
+ * イベント開始日時が指定以前の集計を削除する
59
+ */
60
+ deleteManyByEventStartDate(params: {
61
+ reservationForStartDateLte: Date;
62
+ }): Promise<import("mongodb").DeleteResult>;
57
63
  }
58
64
  export {};
@@ -132,5 +132,14 @@ class AggregateReservationRepo {
132
132
  return this.aggregateReservationModel.updateMany(params.filter, { $unset: params.$unset }, { timestamps: false })
133
133
  .exec();
134
134
  }
135
+ /**
136
+ * イベント開始日時が指定以前の集計を削除する
137
+ */
138
+ async deleteManyByEventStartDate(params) {
139
+ return this.aggregateReservationModel.deleteMany({
140
+ 'reservationFor.startDate': { $lte: params.reservationForStartDateLte }
141
+ })
142
+ .exec();
143
+ }
135
144
  }
136
145
  exports.AggregateReservationRepo = AggregateReservationRepo;
@@ -390,47 +390,21 @@ function CREATE_MONGO_CONDITIONS(params) {
390
390
  }
391
391
  /* istanbul ignore else */
392
392
  if (params.reservedTicket !== undefined) {
393
- /* istanbul ignore else */
394
- if (params.reservedTicket.ticketType !== undefined) {
395
- /* istanbul ignore else */
396
- if (Array.isArray(params.reservedTicket.ticketType.ids)) {
397
- andConditions.push({
398
- 'reservedTicket.ticketType.id': {
399
- $exists: true,
400
- $in: params.reservedTicket.ticketType.ids
401
- }
402
- });
403
- }
404
- // 単価オファーカテゴリーでの検索は廃止(2026-04-02~)
405
- // /* istanbul ignore else */
406
- // if (params.reservedTicket.ticketType.category !== undefined) {
407
- // /* istanbul ignore else */
408
- // if (Array.isArray(params.reservedTicket.ticketType.category.ids)) {
409
- // andConditions.push(
410
- // {
411
- // 'reservedTicket.ticketType.category.id': {
412
- // $exists: true,
413
- // $in: params.reservedTicket.ticketType.category.ids
414
- // }
415
- // }
416
- // );
417
- // }
418
- // /* istanbul ignore else */
419
- // if (params.reservedTicket.ticketType.category.codeValue !== undefined
420
- // && params.reservedTicket.ticketType.category !== null) {
421
- // if (Array.isArray(params.reservedTicket.ticketType.category.codeValue.$in)) {
422
- // andConditions.push(
423
- // {
424
- // 'reservedTicket.ticketType.category.codeValue': {
425
- // $exists: true,
426
- // $in: params.reservedTicket.ticketType.category.codeValue.$in
427
- // }
428
- // }
429
- // );
430
- // }
431
- // }
432
- // }
433
- }
393
+ // discontinue ticketType(2026-05-06~)
394
+ // /* istanbul ignore else */
395
+ // if (params.reservedTicket.ticketType !== undefined) {
396
+ // /* istanbul ignore else */
397
+ // if (Array.isArray(params.reservedTicket.ticketType.ids)) {
398
+ // andConditions.push(
399
+ // {
400
+ // 'reservedTicket.ticketType.id': {
401
+ // $exists: true,
402
+ // $in: params.reservedTicket.ticketType.ids
403
+ // }
404
+ // }
405
+ // );
406
+ // }
407
+ // }
434
408
  /* istanbul ignore else */
435
409
  if (params.reservedTicket.ticketedSeat !== undefined) {
436
410
  /* istanbul ignore else */
@@ -481,41 +455,41 @@ function CREATE_MONGO_CONDITIONS(params) {
481
455
  }
482
456
  });
483
457
  }
484
- const brokerIdentifierAll = params.broker?.identifier?.$all;
485
- if (Array.isArray(brokerIdentifierAll)) {
486
- andConditions.push({
487
- 'broker.identifier': {
488
- $exists: true,
489
- $all: brokerIdentifierAll
490
- }
491
- });
492
- }
493
- const brokerIdentifierIn = params.broker?.identifier?.$in;
494
- if (Array.isArray(brokerIdentifierIn)) {
495
- andConditions.push({
496
- 'broker.identifier': {
497
- $exists: true,
498
- $in: brokerIdentifierIn
499
- }
500
- });
501
- }
502
- const brokerIdentifierNin = params.broker?.identifier?.$nin;
503
- if (Array.isArray(brokerIdentifierNin)) {
504
- andConditions.push({
505
- 'broker.identifier': {
506
- $nin: brokerIdentifierNin
507
- }
508
- });
509
- }
510
- const brokerIdentifierElemMatch = params.broker?.identifier?.$elemMatch;
511
- if (brokerIdentifierElemMatch !== undefined && brokerIdentifierElemMatch !== null) {
512
- andConditions.push({
513
- 'broker.identifier': {
514
- $exists: true,
515
- $elemMatch: brokerIdentifierElemMatch
516
- }
517
- });
518
- }
458
+ // const brokerIdentifierAll = params.broker?.identifier?.$all;
459
+ // if (Array.isArray(brokerIdentifierAll)) {
460
+ // andConditions.push({
461
+ // 'broker.identifier': {
462
+ // $exists: true,
463
+ // $all: brokerIdentifierAll
464
+ // }
465
+ // });
466
+ // }
467
+ // const brokerIdentifierIn = params.broker?.identifier?.$in;
468
+ // if (Array.isArray(brokerIdentifierIn)) {
469
+ // andConditions.push({
470
+ // 'broker.identifier': {
471
+ // $exists: true,
472
+ // $in: brokerIdentifierIn
473
+ // }
474
+ // });
475
+ // }
476
+ // const brokerIdentifierNin = params.broker?.identifier?.$nin;
477
+ // if (Array.isArray(brokerIdentifierNin)) {
478
+ // andConditions.push({
479
+ // 'broker.identifier': {
480
+ // $nin: brokerIdentifierNin
481
+ // }
482
+ // });
483
+ // }
484
+ // const brokerIdentifierElemMatch = params.broker?.identifier?.$elemMatch;
485
+ // if (brokerIdentifierElemMatch !== undefined && brokerIdentifierElemMatch !== null) {
486
+ // andConditions.push({
487
+ // 'broker.identifier': {
488
+ // $exists: true,
489
+ // $elemMatch: brokerIdentifierElemMatch
490
+ // }
491
+ // });
492
+ // }
519
493
  /* istanbul ignore else */
520
494
  if (params.underName !== undefined) {
521
495
  /* istanbul ignore else */
@@ -632,49 +606,49 @@ function CREATE_MONGO_CONDITIONS(params) {
632
606
  });
633
607
  }
634
608
  }
635
- /* istanbul ignore else */
636
- if (params.underName.identifier !== undefined) {
637
- if (Array.isArray(params.underName.identifier.$all)) {
638
- andConditions.push({
639
- 'underName.identifier': {
640
- $exists: true,
641
- $all: params.underName.identifier.$all
642
- }
643
- });
644
- }
645
- if (Array.isArray(params.underName.identifier.$in)) {
646
- andConditions.push({
647
- 'underName.identifier': {
648
- $exists: true,
649
- $in: params.underName.identifier.$in
650
- }
651
- });
652
- }
653
- if (Array.isArray(params.underName.identifier.$nin)) {
654
- andConditions.push({
655
- 'underName.identifier': {
656
- $nin: params.underName.identifier.$nin
657
- }
658
- });
659
- }
660
- if (params.underName.identifier.$elemMatch !== undefined) {
661
- andConditions.push({
662
- 'underName.identifier': {
663
- $exists: true,
664
- $elemMatch: params.underName.identifier.$elemMatch
665
- }
666
- });
667
- }
668
- }
669
- /* istanbul ignore else */
670
- if (Array.isArray(params.underName.identifiers)) {
671
- andConditions.push({
672
- 'underName.identifier': {
673
- $exists: true,
674
- $in: params.underName.identifiers
675
- }
676
- });
677
- }
609
+ // /* istanbul ignore else */
610
+ // if (params.underName.identifier !== undefined) {
611
+ // if (Array.isArray(params.underName.identifier.$all)) {
612
+ // andConditions.push({
613
+ // 'underName.identifier': {
614
+ // $exists: true,
615
+ // $all: params.underName.identifier.$all
616
+ // }
617
+ // });
618
+ // }
619
+ // if (Array.isArray(params.underName.identifier.$in)) {
620
+ // andConditions.push({
621
+ // 'underName.identifier': {
622
+ // $exists: true,
623
+ // $in: params.underName.identifier.$in
624
+ // }
625
+ // });
626
+ // }
627
+ // if (Array.isArray(params.underName.identifier.$nin)) {
628
+ // andConditions.push({
629
+ // 'underName.identifier': {
630
+ // $nin: params.underName.identifier.$nin
631
+ // }
632
+ // });
633
+ // }
634
+ // if (params.underName.identifier.$elemMatch !== undefined) {
635
+ // andConditions.push({
636
+ // 'underName.identifier': {
637
+ // $exists: true,
638
+ // $elemMatch: params.underName.identifier.$elemMatch
639
+ // }
640
+ // });
641
+ // }
642
+ // }
643
+ // /* istanbul ignore else */
644
+ // if (Array.isArray(params.underName.identifiers)) {
645
+ // andConditions.push({
646
+ // 'underName.identifier': {
647
+ // $exists: true,
648
+ // $in: params.underName.identifiers
649
+ // }
650
+ // });
651
+ // }
678
652
  }
679
653
  /* istanbul ignore else */
680
654
  if (typeof params.attended === 'boolean') {
@@ -688,66 +662,67 @@ function CREATE_MONGO_CONDITIONS(params) {
688
662
  checkedIn: params.checkedIn
689
663
  });
690
664
  }
691
- /* istanbul ignore else */
692
- if (params.additionalProperty !== undefined) {
693
- if (Array.isArray(params.additionalProperty.$all)) {
694
- andConditions.push({
695
- additionalProperty: {
696
- $exists: true,
697
- $all: params.additionalProperty.$all
698
- }
699
- });
700
- }
701
- if (Array.isArray(params.additionalProperty.$in)) {
702
- andConditions.push({
703
- additionalProperty: {
704
- $exists: true,
705
- $in: params.additionalProperty.$in
706
- }
707
- });
708
- }
709
- if (Array.isArray(params.additionalProperty.$nin)) {
710
- andConditions.push({
711
- additionalProperty: {
712
- $nin: params.additionalProperty.$nin
713
- }
714
- });
715
- }
716
- if (params.additionalProperty.$elemMatch !== undefined) {
717
- andConditions.push({
718
- additionalProperty: {
719
- $exists: true,
720
- $elemMatch: params.additionalProperty.$elemMatch
721
- }
722
- });
723
- }
724
- }
725
- const programMembershipUsedIdentifierEq = params.programMembershipUsed?.identifier?.$eq;
726
- if (typeof programMembershipUsedIdentifierEq === 'string') {
727
- andConditions.push({
728
- 'programMembershipUsed.identifier': {
729
- $exists: true,
730
- $eq: programMembershipUsedIdentifierEq
731
- }
732
- });
733
- }
734
- const programMembershipUsedIssuedThroughServiceTypeCodeValueEq = params.programMembershipUsed?.issuedThrough?.serviceType?.codeValue?.$eq;
735
- if (typeof programMembershipUsedIssuedThroughServiceTypeCodeValueEq === 'string') {
736
- andConditions.push({
737
- 'programMembershipUsed.issuedThrough.serviceType.codeValue': {
738
- $exists: true,
739
- $eq: programMembershipUsedIssuedThroughServiceTypeCodeValueEq
740
- }
741
- });
742
- }
743
- const appliesToMovieTicketIdentifierEq = params.price?.priceComponent?.appliesToMovieTicket?.identifier?.$eq;
744
- if (typeof appliesToMovieTicketIdentifierEq === 'string') {
745
- andConditions.push({
746
- 'price.priceComponent.appliesToMovieTicket.identifier': {
747
- $exists: true,
748
- $eq: appliesToMovieTicketIdentifierEq
749
- }
750
- });
751
- }
665
+ // /* istanbul ignore else */
666
+ // if (params.additionalProperty !== undefined) {
667
+ // if (Array.isArray(params.additionalProperty.$all)) {
668
+ // andConditions.push({
669
+ // additionalProperty: {
670
+ // $exists: true,
671
+ // $all: params.additionalProperty.$all
672
+ // }
673
+ // });
674
+ // }
675
+ // if (Array.isArray(params.additionalProperty.$in)) {
676
+ // andConditions.push({
677
+ // additionalProperty: {
678
+ // $exists: true,
679
+ // $in: params.additionalProperty.$in
680
+ // }
681
+ // });
682
+ // }
683
+ // if (Array.isArray(params.additionalProperty.$nin)) {
684
+ // andConditions.push({
685
+ // additionalProperty: {
686
+ // $nin: params.additionalProperty.$nin
687
+ // }
688
+ // });
689
+ // }
690
+ // if (params.additionalProperty.$elemMatch !== undefined) {
691
+ // andConditions.push({
692
+ // additionalProperty: {
693
+ // $exists: true,
694
+ // $elemMatch: params.additionalProperty.$elemMatch
695
+ // }
696
+ // });
697
+ // }
698
+ // }
699
+ // const programMembershipUsedIdentifierEq = params.programMembershipUsed?.identifier?.$eq;
700
+ // if (typeof programMembershipUsedIdentifierEq === 'string') {
701
+ // andConditions.push({
702
+ // 'programMembershipUsed.identifier': {
703
+ // $exists: true,
704
+ // $eq: programMembershipUsedIdentifierEq
705
+ // }
706
+ // });
707
+ // }
708
+ // const programMembershipUsedIssuedThroughServiceTypeCodeValueEq =
709
+ // params.programMembershipUsed?.issuedThrough?.serviceType?.codeValue?.$eq;
710
+ // if (typeof programMembershipUsedIssuedThroughServiceTypeCodeValueEq === 'string') {
711
+ // andConditions.push({
712
+ // 'programMembershipUsed.issuedThrough.serviceType.codeValue': {
713
+ // $exists: true,
714
+ // $eq: programMembershipUsedIssuedThroughServiceTypeCodeValueEq
715
+ // }
716
+ // });
717
+ // }
718
+ // const appliesToMovieTicketIdentifierEq = params.price?.priceComponent?.appliesToMovieTicket?.identifier?.$eq;
719
+ // if (typeof appliesToMovieTicketIdentifierEq === 'string') {
720
+ // andConditions.push({
721
+ // 'price.priceComponent.appliesToMovieTicket.identifier': {
722
+ // $exists: true,
723
+ // $eq: appliesToMovieTicketIdentifierEq
724
+ // }
725
+ // });
726
+ // }
752
727
  return andConditions;
753
728
  }
@@ -117,15 +117,16 @@ const indexes = [
117
117
  }
118
118
  }
119
119
  ],
120
- [
121
- { 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': 1, 'mainEntity.orderDate': -1 },
122
- {
123
- name: 'searchByItemOfferedReservationForStartDate',
124
- partialFilterExpression: {
125
- 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': { $exists: true }
126
- }
127
- }
128
- ]
120
+ // discontinue(2026-05-01~)
121
+ // [
122
+ // { 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': 1, 'mainEntity.orderDate': -1 },
123
+ // {
124
+ // name: 'searchByItemOfferedReservationForStartDate',
125
+ // partialFilterExpression: {
126
+ // 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': { $exists: true }
127
+ // }
128
+ // }
129
+ // ]
129
130
  ];
130
131
  exports.indexes = indexes;
131
132
  /**