@chevre/domain 23.0.0-alpha.0 → 23.0.0-alpha.2

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.
@@ -13,7 +13,7 @@ async function main() {
13
13
  const taskRepo = await chevre.repository.Task.createInstance(mongoose.connection);
14
14
 
15
15
  const events = <Pick<
16
- chevre.factory.event.IEvent<chevre.factory.eventType.ScreeningEvent>,
16
+ chevre.factory.event.screeningEvent.IEvent,
17
17
  'id' | 'typeOf' | 'startDate' | 'project'
18
18
  >[]>await eventRepo.projectEventFields(
19
19
  {
@@ -35,7 +35,7 @@ async function main() {
35
35
  await cursor.eachAsync(async (doc) => {
36
36
  i += 1;
37
37
  const event: Pick<
38
- chevre.factory.event.IEvent<chevre.factory.eventType.ScreeningEvent>,
38
+ chevre.factory.event.screeningEvent.IEvent,
39
39
  'startDate' | 'endDate' | 'project' | 'id'
40
40
  > = doc.toObject();
41
41
 
@@ -1,5 +1,5 @@
1
1
  import * as factory from '../factory';
2
- export type IMinimizedIndividualEvent = Pick<factory.event.IEvent<factory.eventType.ScreeningEvent>, 'project' | 'organizer' | 'id' | 'typeOf' | 'name' | 'doorTime' | 'endDate' | 'eventStatus' | 'location' | 'startDate' | 'superEvent' | 'offers' | 'coaInfo' | 'identifier' | 'maximumPhysicalAttendeeCapacity'>;
2
+ export type IMinimizedIndividualEvent = Pick<factory.event.screeningEvent.IEvent, 'project' | 'organizer' | 'id' | 'typeOf' | 'name' | 'doorTime' | 'endDate' | 'eventStatus' | 'location' | 'startDate' | 'superEvent' | 'offers' | 'coaInfo' | 'identifier' | 'maximumPhysicalAttendeeCapacity'>;
3
3
  /**
4
4
  * 興行イベントのsuperEventを作成する
5
5
  */
@@ -21,7 +21,7 @@ export interface IUpdateAggregateReservationParams {
21
21
  remainingAttendeeCapacity?: '';
22
22
  };
23
23
  }
24
- export type ISearchConditions = factory.event.ISearchConditions<factory.eventType.ScreeningEvent>;
24
+ export type ISearchConditions = factory.event.screeningEvent.ISearchConditions;
25
25
  interface IAggregationByStatus {
26
26
  eventCount: number;
27
27
  reservationCount: number;
@@ -44,17 +44,17 @@ interface IAggregateEvent {
44
44
  statuses: IStatus[];
45
45
  }
46
46
  export import IMinimizedIndividualEvent = EventFactory.IMinimizedIndividualEvent;
47
- type IKeyOfProjection = Exclude<keyof factory.event.IEvent<factory.eventType.ScreeningEvent>, 'id'> | 'aggregateOffer' | 'superEvent.location.id' | 'offers.itemOffered' | 'offers.itemOffered.id';
48
- type IKeyOfProjection4publicFields = Exclude<keyof factory.event.IEvent<factory.eventType.ScreeningEvent>, 'id' | 'offers'>;
47
+ type IKeyOfProjection = Exclude<keyof factory.event.screeningEvent.IEvent, 'id'> | 'aggregateOffer' | 'superEvent.location.id' | 'offers.itemOffered' | 'offers.itemOffered.id';
48
+ type IKeyOfProjection4publicFields = Exclude<keyof factory.event.screeningEvent.IEvent, 'id' | 'offers'>;
49
49
  /**
50
50
  * minimizedEvent検索時のprojection候補
51
51
  * add(2024-07-18~)
52
52
  */
53
53
  type IKeyOfProjection4minimizedEvent = Exclude<keyof IMinimizedIndividualEvent, 'additionalProperty' | 'id'> | 'superEvent.id' | 'location.branchCode' | 'superEvent.workPerformed.identifier' | 'superEvent.location.id' | 'offers.itemOffered' | 'offers.itemOffered.id' | 'offers.offeredThrough' | 'offers.unacceptedPaymentMethod' | 'offers.eligibleQuantity';
54
54
  type IUnset = {
55
- [key in keyof factory.event.IEvent<factory.eventType.ScreeningEvent>]?: 1;
55
+ [key in keyof factory.event.screeningEvent.IEvent]?: 1;
56
56
  };
57
- export type ICreatingEvent4ttts = Pick<factory.event.IAttributes<factory.eventType.ScreeningEvent>, 'additionalProperty' | 'doorTime' | 'endDate' | 'eventStatus' | 'location' | 'name' | 'offers' | 'organizer' | 'project' | 'startDate' | 'superEvent' | 'typeOf'> & {
57
+ export type ICreatingEvent4ttts = Pick<factory.event.screeningEvent.IAttributes, 'additionalProperty' | 'doorTime' | 'endDate' | 'eventStatus' | 'location' | 'name' | 'offers' | 'organizer' | 'project' | 'startDate' | 'superEvent' | 'typeOf'> & {
58
58
  identifier: string;
59
59
  };
60
60
  /**
@@ -63,12 +63,12 @@ export type ICreatingEvent4ttts = Pick<factory.event.IAttributes<factory.eventTy
63
63
  export declare class EventRepo {
64
64
  private readonly eventModel;
65
65
  constructor(connection: Connection);
66
- static CREATE_MONGO_CONDITIONS(conditions: ISearchConditions): FilterQuery<factory.event.IEvent<factory.eventType.ScreeningEvent>>[];
66
+ static CREATE_MONGO_CONDITIONS(conditions: ISearchConditions): FilterQuery<factory.event.screeningEvent.IEvent>[];
67
67
  /**
68
68
  * 複数イベントを作成する
69
69
  */
70
70
  createManyEvents(params: {
71
- attributes: factory.event.IAttributes<factory.eventType.ScreeningEvent>[];
71
+ attributes: factory.event.screeningEvent.IAttributes[];
72
72
  expectsNoContent: boolean;
73
73
  }): Promise<string[] | void>;
74
74
  /**
@@ -77,7 +77,7 @@ export declare class EventRepo {
77
77
  * 存在すれば、特定の属性のみ更新する
78
78
  */
79
79
  upsertManyByAdditionalProperty(params: {
80
- events: factory.event.IAttributes<factory.eventType.ScreeningEvent>[];
80
+ events: factory.event.screeningEvent.IAttributes[];
81
81
  additionalPropertyFilter: {
82
82
  name: string;
83
83
  };
@@ -140,7 +140,7 @@ export declare class EventRepo {
140
140
  */
141
141
  saveEvent(params: {
142
142
  id?: string;
143
- attributes: factory.event.IAttributes<factory.eventType.ScreeningEvent>;
143
+ attributes: factory.event.screeningEvent.IAttributes;
144
144
  /**
145
145
  * ドキュメント作成時には無視される
146
146
  */
@@ -154,7 +154,7 @@ export declare class EventRepo {
154
154
  */
155
155
  saveManyEvents(params: {
156
156
  id: string;
157
- attributes: factory.event.IAttributes<factory.eventType.ScreeningEvent>;
157
+ attributes: factory.event.screeningEvent.IAttributes;
158
158
  $unset?: IUnset;
159
159
  upsert: boolean;
160
160
  }[]): Promise<void>;
@@ -169,7 +169,7 @@ export declare class EventRepo {
169
169
  /**
170
170
  * イベントを検索する(inclusion projection)
171
171
  */
172
- projectEventFields(params: ISearchConditions, inclusion: IKeyOfProjection[]): Promise<Omit<factory.event.IEvent<factory.eventType.ScreeningEvent>, 'aggregateOffer'>[]>;
172
+ projectEventFields(params: ISearchConditions, inclusion: IKeyOfProjection[]): Promise<Omit<factory.event.screeningEvent.IEvent, 'aggregateOffer'>[]>;
173
173
  /**
174
174
  * apiで公開属性を検索する(2024-10-13~)
175
175
  */
@@ -186,7 +186,7 @@ export declare class EventRepo {
186
186
  * offers.seller.makesOfferをavailableAtOrFromでfilterする
187
187
  */
188
188
  sellerMakesOfferAvailableAtIn?: string[];
189
- }): Promise<Omit<factory.event.IEvent<factory.eventType.ScreeningEvent>, 'aggregateOffer'>[]>;
189
+ }): Promise<Omit<factory.event.screeningEvent.IEvent, 'aggregateOffer'>[]>;
190
190
  /**
191
191
  * IDのみで検索する
192
192
  * projectionなし
@@ -205,7 +205,7 @@ export declare class EventRepo {
205
205
  $eq: string;
206
206
  };
207
207
  };
208
- }): Promise<Omit<factory.event.IEvent<factory.eventType.ScreeningEvent>, 'aggregateOffer'>>;
208
+ }): Promise<Omit<factory.event.screeningEvent.IEvent, 'aggregateOffer'>>;
209
209
  searchEventIds(params: ISearchConditions): Promise<string[]>;
210
210
  /**
211
211
  * 特定イベントから指定フィールドのみ取得する
@@ -360,7 +360,7 @@ export declare class EventRepo {
360
360
  };
361
361
  }): Promise<void>;
362
362
  unsetUnnecessaryFields(params: {
363
- filter: FilterQuery<factory.event.IEvent<factory.eventType.ScreeningEvent>>;
363
+ filter: FilterQuery<factory.event.screeningEvent.IEvent>;
364
364
  $unset: IUnset;
365
365
  }): Promise<import("mongoose").UpdateWriteOpResult>;
366
366
  aggregateEvent(params: {
@@ -261,7 +261,6 @@ class EventRepo {
261
261
  createManyEvents(params) {
262
262
  return __awaiter(this, void 0, void 0, function* () {
263
263
  const uniqid = yield Promise.resolve().then(() => require('uniqid'));
264
- // let docs: HydratedDocument<factory.event.IEvent<T>>[];
265
264
  const insertingDocs = params.attributes.map((p) => {
266
265
  return Object.assign({ _id: uniqid() }, p);
267
266
  });
@@ -1,6 +1,6 @@
1
1
  import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
2
2
  import * as factory from '../../../factory';
3
- type IDocTypeAsScreeningEvent = factory.event.IAttributes<factory.eventType.ScreeningEvent> & {
3
+ type IDocTypeAsScreeningEvent = factory.event.screeningEvent.IAttributes & {
4
4
  _id: string;
5
5
  aggregateOffer?: factory.event.screeningEvent.IAggregateOffer;
6
6
  };
@@ -213,7 +213,7 @@ function getUnacceptedPaymentMethodByEvent(params) {
213
213
  */
214
214
  function searchEventTicketOffers(params) {
215
215
  return (repos) => __awaiter(this, void 0, void 0, function* () {
216
- const eventType = params.event.typeOf;
216
+ // const eventType = params.event.typeOf;
217
217
  // optimize projection(2024-07-17~)
218
218
  const event = yield repos.event.projectEventFieldsById({ id: params.event.id }, [
219
219
  'project', 'typeOf', 'startDate',
@@ -197,7 +197,7 @@ function getUnacceptedPaymentMethodByEvent(params) {
197
197
  */
198
198
  function searchOffersByIds(params) {
199
199
  return (repos) => __awaiter(this, void 0, void 0, function* () {
200
- const eventType = params.event.typeOf;
200
+ // const eventType = params.event.typeOf;
201
201
  // optimize projection(2024-07-17~)
202
202
  const event = yield repos.event.projectEventFieldsById({ id: params.event.id }, [
203
203
  'project', 'typeOf', 'startDate',
@@ -16,7 +16,7 @@ exports.validateEvent = validateEvent;
16
16
  function validateEvent(__) {
17
17
  return (__2) => __awaiter(this, void 0, void 0, function* () {
18
18
  // const event: Pick<factory.event.screeningEvent.IEvent, 'id' | 'startDate'> =
19
- // await repos.event.projectEventFieldsById<factory.eventType.ScreeningEvent>(
19
+ // await repos.event.projectEventFieldsById(
20
20
  // { id: params.id },
21
21
  // ['startDate']
22
22
  // );
package/package.json CHANGED
@@ -11,8 +11,8 @@
11
11
  "dependencies": {
12
12
  "@aws-sdk/client-cognito-identity-provider": "3.600.0",
13
13
  "@aws-sdk/credential-providers": "3.600.0",
14
- "@chevre/factory": "5.0.0-alpha.0",
15
- "@cinerino/sdk": "12.5.0-alpha.1",
14
+ "@chevre/factory": "5.0.0-alpha.2",
15
+ "@cinerino/sdk": "12.5.0-alpha.2",
16
16
  "@motionpicture/coa-service": "9.6.0",
17
17
  "@motionpicture/gmo-service": "5.4.0-alpha.1",
18
18
  "@sendgrid/client": "8.1.4",
@@ -115,5 +115,5 @@
115
115
  "postversion": "git push origin --tags",
116
116
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
117
117
  },
118
- "version": "23.0.0-alpha.0"
118
+ "version": "23.0.0-alpha.2"
119
119
  }