@chevre/domain 21.13.0-alpha.13 → 21.13.0-alpha.14

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.
@@ -77,11 +77,28 @@ interface IStatus {
77
77
  export interface IAggregateEvent {
78
78
  statuses: IStatus[];
79
79
  }
80
- interface IProjection {
81
- [key: string]: number;
82
- }
80
+ type IKeyOfProjection<T extends factory.eventType> = keyof factory.event.IEvent<T> & '_id';
81
+ type IProjection<T extends factory.eventType> = {
82
+ [key in IKeyOfProjection<T>]?: 0 | 1;
83
+ };
83
84
  export import IMinimizedIndividualEvent = EventFactory.IMinimizedIndividualEvent;
84
- export declare const PROJECTION_MINIMIZED_EVENT: IProjection;
85
+ export declare const PROJECTION_MINIMIZED_EVENT: {
86
+ project: number;
87
+ organizer: number;
88
+ _id: number;
89
+ typeOf: number;
90
+ additionalProperty: number;
91
+ name: number;
92
+ doorTime: number;
93
+ endDate: number;
94
+ eventStatus: number;
95
+ location: number;
96
+ startDate: number;
97
+ superEvent: number;
98
+ offers: number;
99
+ coaInfo: number;
100
+ identifier: number;
101
+ };
85
102
  /**
86
103
  * イベントリポジトリ
87
104
  */
@@ -133,13 +150,13 @@ export declare class MongoRepository {
133
150
  save<T extends factory.eventType>(params: {
134
151
  id?: string;
135
152
  attributes: factory.event.IAttributes<T>;
136
- $unset?: IProjection;
153
+ $unset?: IProjection<T>;
137
154
  upsert?: boolean;
138
155
  }): Promise<factory.event.IEvent<T>>;
139
156
  saveMany<T extends factory.eventType>(params: {
140
157
  id: string;
141
158
  attributes: factory.event.IAttributes<T>;
142
- $unset?: IProjection;
159
+ $unset?: IProjection<T>;
143
160
  upsert: boolean;
144
161
  }[]): Promise<void>;
145
162
  save4ttts(params: {
@@ -149,7 +166,7 @@ export declare class MongoRepository {
149
166
  /**
150
167
  * イベントを検索する
151
168
  */
152
- search<T extends factory.eventType>(params: ISearchConditions<T>, projection?: IProjection): Promise<factory.event.IEvent<T>[]>;
169
+ search<T extends factory.eventType>(params: ISearchConditions<T>, projection?: IProjection<T>): Promise<factory.event.IEvent<T>[]>;
153
170
  searchIds<T extends factory.eventType>(params: ISearchConditions<T>): Promise<string[]>;
154
171
  findMinimizedIndividualEventById<T extends factory.eventType.ScreeningEvent | factory.eventType.Event>(params: {
155
172
  id: string;
@@ -26,7 +26,9 @@ import type { AnyExpression, Connection } from 'mongoose';
26
26
  import * as factory from '../factory';
27
27
  type IScreeningRoomSectionWithoutContainsPlace = Omit<factory.place.screeningRoomSection.IPlace, 'containsPlace'>;
28
28
  export type IScreeningRoomFoundByBranchCode = Pick<factory.place.screeningRoom.IPlace, 'typeOf' | 'branchCode' | 'name' | 'containsPlace' | 'seatCount' | 'parentOrganization'>;
29
- export type IKeyOfSearchSeatsProjection = 'typeOf' | 'branchCode' | 'name' | 'seatingType' | 'additionalProperty' | 'containedInPlace.containedInPlace';
29
+ export type IMovieTheaterIncludingScreeningRooms = factory.place.movieTheater.IPlace & {
30
+ containsPlace: factory.place.screeningRoom.IPlace[];
31
+ };
30
32
  /**
31
33
  * 施設リポジトリ
32
34
  */
@@ -35,20 +37,18 @@ export declare class MongoRepository {
35
37
  constructor(connection: Connection);
36
38
  static CREATE_BUS_STOP_MONGO_CONDITIONS(params: factory.place.busStop.ISearchConditions): any[];
37
39
  static CREATE_MOVIE_THEATER_MONGO_CONDITIONS(params: factory.place.movieTheater.ISearchConditions): any[];
38
- static CREATE_SEARCH_SEATS_PROJECTION(params: {
39
- [key in IKeyOfSearchSeatsProjection]?: 0;
40
- }): {
40
+ static CREATE_SEARCH_SEATS_PROJECTION(params: factory.place.seat.IProjection): {
41
41
  [field: string]: AnyExpression;
42
42
  };
43
43
  /**
44
44
  * 施設を保管する
45
45
  */
46
- saveMovieTheater(params: factory.place.movieTheater.IPlaceWithoutScreeningRoom): Promise<factory.place.movieTheater.IPlaceWithoutScreeningRoom>;
47
- saveMovieTheaterByBranchCode4coa(params: factory.place.movieTheater.IPlace): Promise<void>;
46
+ saveMovieTheater(params: factory.place.movieTheater.IPlace): Promise<factory.place.movieTheater.IPlace>;
47
+ saveMovieTheaterByBranchCode4coa(params: IMovieTheaterIncludingScreeningRooms): Promise<void>;
48
48
  /**
49
49
  * 施設検索
50
50
  */
51
- searchMovieTheaters(params: factory.place.movieTheater.ISearchConditions & {}, inclusion: (keyof factory.place.movieTheater.IPlaceWithoutScreeningRoom | '_id' | 'url')[], exclusion: string[]): Promise<factory.place.movieTheater.IPlaceWithoutScreeningRoom[]>;
51
+ searchMovieTheaters(params: factory.place.movieTheater.ISearchConditions, inclusion: (keyof factory.place.movieTheater.IPlace | '_id' | 'url')[], exclusion: string[]): Promise<factory.place.movieTheater.IPlace[]>;
52
52
  deleteMovieTheaterById(params: {
53
53
  project: {
54
54
  id: string;
@@ -162,11 +162,7 @@ export declare class MongoRepository {
162
162
  };
163
163
  typeOf: factory.placeType.ScreeningRoom;
164
164
  }>;
165
- searchScreeningRoomSections(searchConditions: factory.place.screeningRoomSection.ISearchConditions & {
166
- $projection?: {
167
- [key: string]: number;
168
- };
169
- }): Promise<IScreeningRoomSectionWithoutContainsPlace[]>;
165
+ searchScreeningRoomSections(searchConditions: factory.place.screeningRoomSection.ISearchConditions): Promise<IScreeningRoomSectionWithoutContainsPlace[]>;
170
166
  deleteScreeningRoomSection(screeningRoomSection: {
171
167
  project: {
172
168
  id: string;
@@ -248,11 +244,7 @@ export declare class MongoRepository {
248
244
  };
249
245
  typeOf: factory.placeType.ScreeningRoom;
250
246
  }>;
251
- searchSeats(params: Omit<factory.place.seat.ISearchConditions, '$projection'> & {
252
- $projection: {
253
- [key in IKeyOfSearchSeatsProjection]?: 0;
254
- };
255
- }): Promise<factory.place.seat.IPlace[]>;
247
+ searchSeats(params: factory.place.seat.ISearchConditions): Promise<factory.place.seat.IPlace[]>;
256
248
  deleteSeat(seat: {
257
249
  project: {
258
250
  id: string;
@@ -1,5 +1,5 @@
1
1
  import type { MongoRepository as EventRepo } from '../repo/event';
2
- import type { IKeyOfSearchSeatsProjection, MongoRepository as PlaceRepo } from '../repo/place';
2
+ import type { MongoRepository as PlaceRepo } from '../repo/place';
3
3
  import type { MongoRepository as PriceSpecificationRepo } from '../repo/priceSpecification';
4
4
  import type { MongoRepository as ProjectRepo } from '../repo/project';
5
5
  import type { StockHolderRepository as StockHolderRepo } from '../repo/stockHolder';
@@ -38,9 +38,7 @@ export declare function searchEventSeatOffersWithPaging(params: {
38
38
  event: {
39
39
  id: string;
40
40
  };
41
- $projection?: {
42
- [key in IKeyOfSearchSeatsProjection]?: 0;
43
- };
41
+ $projection?: factory.place.seat.IProjection;
44
42
  }): (repos: {
45
43
  event: EventRepo;
46
44
  priceSpecification: PriceSpecificationRepo;
@@ -32,6 +32,8 @@ function onResourceDeleted(params) {
32
32
  }
33
33
  }
34
34
  switch (params.typeOf) {
35
+ case 'POS':
36
+ break;
35
37
  case factory.eventType.ScreeningEventSeries:
36
38
  yield deleteResourcesByScreeningEventSeries({
37
39
  project: { id: params.project.id },
@@ -87,19 +87,12 @@ function createPaymentMethods(params) {
87
87
  const paymentMethodOfInvoice = Object.assign({ identifier: paymentMethodType }, (typeof paymentMethodAmountCurrencyByAuthorizeAction === 'string') ?
88
88
  { amount: { currency: paymentMethodAmountCurrencyByAuthorizeAction } }
89
89
  : undefined);
90
- paymentMethods.push({
91
- accountId: resultAsInvoice.accountId,
92
- additionalProperty: (Array.isArray(resultAsInvoice.additionalProperty)) ? resultAsInvoice.additionalProperty : [],
93
- issuedThrough: resultAsInvoice.issuedThrough,
94
- name: resultAsInvoice.name,
95
- paymentMethodId: resultAsInvoice.paymentMethodId,
96
- paymentStatus: resultAsInvoice.paymentStatus,
97
- totalPaymentDue: resultAsInvoice.totalPaymentDue,
98
- typeOf: paymentMethodType,
90
+ paymentMethods.push(Object.assign({ accountId: resultAsInvoice.accountId, additionalProperty: (Array.isArray(resultAsInvoice.additionalProperty)) ? resultAsInvoice.additionalProperty : [], issuedThrough: resultAsInvoice.issuedThrough, name: resultAsInvoice.name, paymentMethodId: resultAsInvoice.paymentMethodId, paymentStatus: resultAsInvoice.paymentStatus, totalPaymentDue: resultAsInvoice.totalPaymentDue,
99
91
  // CreditCardIFのカード通貨区分を追加(2023-08-15~)
100
92
  // 決済方法区分を保証(2023-08-28~)
101
- paymentMethod: paymentMethodOfInvoice
102
- });
93
+ paymentMethod: paymentMethodOfInvoice }, {
94
+ typeOf: paymentMethodType // IFとして廃止だが、互換性維持対応として(2023-10-30~)
95
+ }));
103
96
  });
104
97
  // 決済方法から注文金額の計算
105
98
  price += authorizePaymentActions
package/package.json CHANGED
@@ -10,8 +10,8 @@
10
10
  ],
11
11
  "dependencies": {
12
12
  "@aws-sdk/credential-providers": "3.433.0",
13
- "@chevre/factory": "4.336.0",
14
- "@cinerino/sdk": "4.0.0-alpha.1",
13
+ "@chevre/factory": "4.337.0",
14
+ "@cinerino/sdk": "5.0.0-alpha.3",
15
15
  "@motionpicture/coa-service": "9.2.0",
16
16
  "@motionpicture/gmo-service": "5.2.0",
17
17
  "@sendgrid/mail": "6.4.0",
@@ -82,6 +82,7 @@
82
82
  "npm": ">=6.0.0"
83
83
  },
84
84
  "keywords": [],
85
+ "license": "UNLICENSED",
85
86
  "main": "./lib/index.js",
86
87
  "types": "./lib/index.d.ts",
87
88
  "files": [
@@ -116,5 +117,5 @@
116
117
  "postversion": "git push origin --tags",
117
118
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
118
119
  },
119
- "version": "21.13.0-alpha.13"
120
+ "version": "21.13.0-alpha.14"
120
121
  }