@chevre/domain 21.8.0-alpha.61 → 21.8.0-alpha.62

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,8 +30,7 @@ async function main() {
30
30
  validateOfferRateLimit: true,
31
31
  addSortIndex: true,
32
32
  limit: 100,
33
- page: 1,
34
- useOffersAsPrimaryForcible: false
33
+ page: 1
35
34
  // ...(typeof availableAtId === 'string') ? { store: { id: availableAtId } } : undefined
36
35
  })({
37
36
  event: eventRepo,
@@ -6,7 +6,7 @@ import { chevre } from '../../../lib/index';
6
6
  const PROJECT_ID = process.env.PROJECT_ID;
7
7
 
8
8
  async function main() {
9
- await mongoose.connect(<string>process.env.MONGOLAB_URI);
9
+ await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
10
10
 
11
11
  const eventRepo = new chevre.repository.Event(mongoose.connection);
12
12
 
@@ -16,7 +16,7 @@ async function main() {
16
16
  // page: 1,
17
17
  // sort: { startDate: 1 },
18
18
  // typeOf: chevre.factory.eventType.ScreeningEvent,
19
- // project: { id: { $eq: PROJECT_ID } },
19
+ project: { id: { $eq: PROJECT_ID } },
20
20
  id: { $eq: 'al6aff83y' },
21
21
  typeOfIn: [chevre.factory.eventType.Event, chevre.factory.eventType.ScreeningEvent]
22
22
  },
@@ -5,19 +5,18 @@ import * as mongoose from 'mongoose';
5
5
  import { chevre } from '../../../lib/index';
6
6
 
7
7
  async function main() {
8
- await mongoose.connect(<string>process.env.MONGOLAB_URI);
8
+ await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
9
9
 
10
10
  const offerRepo = new chevre.repository.Offer(mongoose.connection);
11
11
 
12
- const { offers } = await offerRepo.findOffersByOfferCatalogId({
12
+ const { offers } = await offerRepo.searchByOfferCatalogIdWithSortIndex({
13
13
  limit: 100,
14
14
  page: 1,
15
15
  // ids: ['xx', 'xxx', '1001', '901'],
16
16
  offerCatalog: {
17
17
  id: '0001'
18
18
  },
19
- excludeAppliesToMovieTicket: false,
20
- useOffersAsPrimaryForcible: false
19
+ excludeAppliesToMovieTicket: false
21
20
  });
22
21
  // console.log(offers);
23
22
  console.log(offers.map((offer) => {
@@ -18,7 +18,6 @@ export type IUnitPriceOfferFromAggregateOffer = factory.unitPriceOffer.IUnitPric
18
18
  export declare class MongoRepository {
19
19
  private readonly aggregateOfferModel;
20
20
  private readonly offerCatalogModel;
21
- private readonly taskModel;
22
21
  constructor(connection: Connection);
23
22
  static CREATE_AGGREGATE_OFFERS_MATCH_CONDITIONS(params: factory.unitPriceOffer.ISearchConditions): IMatchStage[];
24
23
  static CREATE_AGGREGATE_OFFERS_PROJECTION(params: IProjection): {
@@ -83,11 +82,7 @@ export declare class MongoRepository {
83
82
  id: string;
84
83
  }): Promise<factory.aggregateOffer.IAggregateOffer>;
85
84
  count(params: Omit<factory.unitPriceOffer.ISearchConditions, 'limit' | 'page' | 'sort'>): Promise<number>;
86
- search(params: factory.unitPriceOffer.ISearchConditions, projection?: IProjection,
87
- /**
88
- * 強制的にoffersコレクションを使用する
89
- */
90
- useOffersAsPrimary?: boolean): Promise<factory.unitPriceOffer.IUnitPriceOffer[]>;
85
+ search(params: factory.unitPriceOffer.ISearchConditions, projection?: IProjection): Promise<factory.unitPriceOffer.IUnitPriceOffer[]>;
91
86
  save(params: factory.unitPriceOffer.IUnitPriceOffer & {
92
87
  $unset?: any;
93
88
  }): Promise<factory.unitPriceOffer.IUnitPriceOffer>;
@@ -132,27 +127,6 @@ export declare class MongoRepository {
132
127
  isDeleted: boolean;
133
128
  typeOf: factory.offerType.AggregateOffer | factory.offerType.Offer;
134
129
  }): Promise<BulkWriteOpResultObject | void>;
135
- /**
136
- * オファー同期専用のタスク保管
137
- */
138
- saveSyncTask(params: {
139
- id: {
140
- $in: string[];
141
- };
142
- identifier: {
143
- $in: string[];
144
- };
145
- isDeleted: boolean;
146
- project: {
147
- id: string;
148
- };
149
- typeOf: factory.offerType.AggregateOffer | factory.offerType.Offer;
150
- options: {
151
- emitImmediately: boolean;
152
- };
153
- }): Promise<{
154
- id: string;
155
- }[]>;
156
130
  private searchFromAggregateOffer;
157
131
  }
158
132
  export {};