@chevre/domain 21.28.0-alpha.2 → 21.28.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.
Files changed (28) hide show
  1. package/example/src/chevre/aggregation/aggregateEventReservation.ts +1 -1
  2. package/example/src/chevre/aggregation/aggregateOffersOnEvent.ts +1 -1
  3. package/example/src/chevre/importEventsFromCOA.ts +2 -2
  4. package/example/src/chevre/migrateMovieTheaterAdditionalProperties.ts +1 -1
  5. package/lib/chevre/repo/place/movieTheater.d.ts +47 -0
  6. package/lib/chevre/repo/place/movieTheater.js +30 -0
  7. package/lib/chevre/repo/place/screeningRoom.d.ts +113 -0
  8. package/lib/chevre/repo/{place.js → place/screeningRoom.js} +17 -262
  9. package/lib/chevre/repo/place/section.d.ts +64 -0
  10. package/lib/chevre/repo/place/section.js +274 -0
  11. package/lib/chevre/repository.d.ts +16 -5
  12. package/lib/chevre/repository.js +34 -15
  13. package/lib/chevre/service/aggregation/event/aggregateOffers.d.ts +2 -2
  14. package/lib/chevre/service/aggregation/event/aggregateOffers.js +1 -1
  15. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.d.ts +2 -2
  16. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +1 -1
  17. package/lib/chevre/service/event.d.ts +2 -2
  18. package/lib/chevre/service/event.js +1 -1
  19. package/lib/chevre/service/project.d.ts +6 -3
  20. package/lib/chevre/service/project.js +2 -2
  21. package/lib/chevre/service/task/aggregateOffers.js +2 -2
  22. package/lib/chevre/service/task/aggregateScreeningEvent.js +2 -2
  23. package/lib/chevre/service/task/importEventsFromCOA.js +2 -2
  24. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +2 -2
  25. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +8 -3
  26. package/lib/chevre/service/task/onResourceUpdated.js +4 -4
  27. package/package.json +3 -3
  28. package/lib/chevre/repo/place.d.ts +0 -207
@@ -191,7 +191,7 @@ function deleteResourcesByMovieTheater(params) {
191
191
  location: { id: placeId }
192
192
  });
193
193
  // ルーム削除
194
- const deletePlaceResult = yield repos.place.deleteScreeningRoomsByMovieTheaterId({
194
+ const deletePlaceResult = yield repos.screeningRoom.deleteScreeningRoomsByMovieTheaterId({
195
195
  project: { id: params.project.id },
196
196
  containedInPlace: { id: placeId }
197
197
  });
@@ -250,14 +250,19 @@ function deleteResourcesBySeller(params) {
250
250
  project: { id: params.project.id },
251
251
  organizer: { id: sellerId }
252
252
  });
253
+ // ルーム削除
254
+ const deleteScreeningRoomResult = yield repos.screeningRoom.deleteScreeningRoomsByParentOrganizationId({
255
+ project: { id: params.project.id },
256
+ parentOrganization: { id: sellerId }
257
+ });
253
258
  // 施設削除
254
- const deletePlaceResult = yield repos.place.deleteManyByParentOrganizationId({
259
+ const deleteMovieTheaterResult = yield repos.movieTheater.deleteMovieTheatersByParentOrganizationId({
255
260
  project: { id: params.project.id },
256
261
  parentOrganization: { id: sellerId }
257
262
  });
258
263
  deleteResult = {
259
264
  deleteMemberResult, deletePaymentServiceProviderResult, deleteProductOfferResult,
260
- deleteEventResult, deletePlaceResult
265
+ deleteEventResult, deleteScreeningRoomResult, deleteMovieTheaterResult
261
266
  };
262
267
  }
263
268
  catch (error) {
@@ -23,9 +23,9 @@ const offer_1 = require("../../repo/offer");
23
23
  const offerCatalog_1 = require("../../repo/offerCatalog");
24
24
  const offerCatalogItem_1 = require("../../repo/offerCatalogItem");
25
25
  const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
26
- const place_1 = require("../../repo/place");
27
26
  const hasPOS_1 = require("../../repo/place/hasPOS");
28
27
  const movieTheater_1 = require("../../repo/place/movieTheater");
28
+ const screeningRoom_1 = require("../../repo/place/screeningRoom");
29
29
  const product_1 = require("../../repo/product");
30
30
  const productOffer_1 = require("../../repo/productOffer");
31
31
  const task_1 = require("../../repo/task");
@@ -55,7 +55,7 @@ function call(data) {
55
55
  offerCatalog: new offerCatalog_1.MongoRepository(connection),
56
56
  offerCatalogItem: new offerCatalogItem_1.MongoRepository(connection),
57
57
  paymentServiceProvider: new paymentServiceProvider_1.MongoRepository(connection),
58
- place: new place_1.MongoRepository(connection),
58
+ screeningRoom: new screeningRoom_1.MongoRepository(connection),
59
59
  product: new product_1.MongoRepository(connection),
60
60
  productOffer: new productOffer_1.MongoRepository(connection),
61
61
  task: new task_1.MongoRepository(connection)
@@ -382,7 +382,7 @@ function createInformMovieTheaterTasks(params) {
382
382
  throw new factory.errors.NotFound(factory.placeType.MovieTheater);
383
383
  }
384
384
  // ルームを検索
385
- const screeningRooms = yield repos.place.searchScreeningRooms({
385
+ const screeningRooms = yield repos.screeningRoom.searchScreeningRooms({
386
386
  containedInPlace: { id: { $eq: movieTheater.id } }
387
387
  });
388
388
  const movieTheaters4inform = [Object.assign(Object.assign({}, movieTheater), { containsPlace: screeningRooms.map((room) => {
@@ -511,7 +511,7 @@ function syncMovieTheater(params) {
511
511
  if (movieTheater === undefined) {
512
512
  throw new factory.errors.NotFound(factory.placeType.MovieTheater);
513
513
  }
514
- yield repos.place.updateScreeningRoomsByContainedInPlaceId({
514
+ yield repos.screeningRoom.updateScreeningRoomsByContainedInPlaceId({
515
515
  project: { id: params.project.id },
516
516
  containedInPlace: movieTheater
517
517
  });
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.365.0-alpha.0",
14
- "@cinerino/sdk": "5.15.0",
13
+ "@chevre/factory": "4.365.0-alpha.1",
14
+ "@cinerino/sdk": "5.17.0-alpha.1",
15
15
  "@motionpicture/coa-service": "9.4.0",
16
16
  "@motionpicture/gmo-service": "5.3.0",
17
17
  "@sendgrid/mail": "6.4.0",
@@ -110,5 +110,5 @@
110
110
  "postversion": "git push origin --tags",
111
111
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
112
112
  },
113
- "version": "21.28.0-alpha.2"
113
+ "version": "21.28.0-alpha.4"
114
114
  }
@@ -1,207 +0,0 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/middlewares" />
11
- /// <reference types="mongoose/types/indexes" />
12
- /// <reference types="mongoose/types/models" />
13
- /// <reference types="mongoose/types/mongooseoptions" />
14
- /// <reference types="mongoose/types/pipelinestage" />
15
- /// <reference types="mongoose/types/populate" />
16
- /// <reference types="mongoose/types/query" />
17
- /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
- /// <reference types="mongoose/types/session" />
20
- /// <reference types="mongoose/types/types" />
21
- /// <reference types="mongoose/types/utility" />
22
- /// <reference types="mongoose/types/validation" />
23
- /// <reference types="mongoose/types/virtuals" />
24
- /// <reference types="mongoose/types/inferschematype" />
25
- import type { Connection, FilterQuery } from 'mongoose';
26
- import * as factory from '../factory';
27
- type IScreeningRoomSectionWithoutContainsPlace = Omit<factory.place.screeningRoomSection.IPlace, 'containsPlace'>;
28
- export type IScreeningRoomFoundByBranchCode = Pick<factory.place.screeningRoom.IPlace, 'typeOf' | 'branchCode' | 'name' | 'containsPlace' | 'seatCount' | 'parentOrganization'>;
29
- /**
30
- * 施設リポジトリ
31
- */
32
- export declare class MongoRepository {
33
- private readonly placeModel;
34
- constructor(connection: Connection);
35
- createScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containedInPlace' | 'containsPlace' | 'parentOrganization'> & {
36
- containedInPlace: {
37
- branchCode: string;
38
- };
39
- parentOrganization?: {
40
- id?: string;
41
- };
42
- }): Promise<{
43
- containedInPlace: {
44
- /**
45
- * 施設ID
46
- */
47
- id: string;
48
- };
49
- typeOf: factory.placeType.ScreeningRoom;
50
- }>;
51
- updateScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containedInPlace' | 'containsPlace' | 'parentOrganization'> & {
52
- containedInPlace: {
53
- branchCode: string;
54
- };
55
- parentOrganization?: {
56
- id?: string;
57
- };
58
- }, $unset: any): Promise<{
59
- containedInPlace: {
60
- /**
61
- * 施設ID
62
- */
63
- id: string;
64
- };
65
- typeOf: factory.placeType.ScreeningRoom;
66
- }>;
67
- updateScreeningRoomsByContainedInPlaceId(screeningRoom: {
68
- project: {
69
- id: string;
70
- };
71
- containedInPlace: Pick<factory.place.screeningRoom.IContainedInPlace, 'id' | 'name'>;
72
- }): Promise<void>;
73
- deleteScreeningRoom(screeningRoom: {
74
- project: {
75
- id: string;
76
- };
77
- parentOrganization?: {
78
- id?: string;
79
- };
80
- /**
81
- * ルームコード
82
- */
83
- branchCode: string;
84
- containedInPlace: {
85
- /**
86
- * 施設コード
87
- */
88
- branchCode: string;
89
- };
90
- }): Promise<{
91
- containedInPlace: {
92
- /**
93
- * 施設ID
94
- */
95
- id: string;
96
- };
97
- typeOf: factory.placeType.ScreeningRoom;
98
- }>;
99
- deleteScreeningRoomsByMovieTheaterId(params: {
100
- project: {
101
- id: string;
102
- };
103
- containedInPlace: {
104
- /**
105
- * 施設ID
106
- */
107
- id: string;
108
- };
109
- }): Promise<import("mongodb").DeleteResult>;
110
- createScreeningRoomSection(screeningRoomSection: IScreeningRoomSectionWithoutContainsPlace & {
111
- parentOrganization?: {
112
- id?: string;
113
- };
114
- }): Promise<{
115
- containedInPlace: {
116
- /**
117
- * 施設ID
118
- */
119
- id: string;
120
- };
121
- typeOf: factory.placeType.ScreeningRoom;
122
- }>;
123
- updateScreeningRoomSection(screeningRoomSection: Omit<factory.place.screeningRoomSection.IPlace, 'containedInPlace'> & {
124
- containedInPlace: {
125
- branchCode: string;
126
- containedInPlace: {
127
- branchCode: string;
128
- };
129
- };
130
- parentOrganization?: {
131
- id?: string;
132
- };
133
- }, $unset: any): Promise<{
134
- containedInPlace: {
135
- /**
136
- * 施設ID
137
- */
138
- id: string;
139
- };
140
- typeOf: factory.placeType.ScreeningRoom;
141
- }>;
142
- searchScreeningRoomSections(searchConditions: factory.place.screeningRoomSection.ISearchConditions): Promise<IScreeningRoomSectionWithoutContainsPlace[]>;
143
- deleteScreeningRoomSection(screeningRoomSection: {
144
- project: {
145
- id: string;
146
- };
147
- parentOrganization?: {
148
- id?: string;
149
- };
150
- /**
151
- * セクションコード
152
- */
153
- branchCode: string;
154
- containedInPlace: {
155
- /**
156
- * ルームコード
157
- */
158
- branchCode: string;
159
- containedInPlace: {
160
- /**
161
- * 施設コード
162
- */
163
- branchCode: string;
164
- };
165
- };
166
- }): Promise<{
167
- containedInPlace: {
168
- /**
169
- * 施設ID
170
- */
171
- id: string;
172
- };
173
- typeOf: factory.placeType.ScreeningRoom;
174
- }>;
175
- searchScreeningRooms(searchConditions: factory.place.screeningRoom.ISearchConditions): Promise<Omit<factory.place.screeningRoom.IPlace, 'containsPlace' | 'parentOrganization'>[]>;
176
- findScreeningRoomsByBranchCode(params: {
177
- project: {
178
- id: string;
179
- };
180
- branchCode: {
181
- $eq: string;
182
- };
183
- containedInPlace: {
184
- id: {
185
- $eq: string;
186
- };
187
- };
188
- }): Promise<IScreeningRoomFoundByBranchCode>;
189
- deleteManyByParentOrganizationId(params: {
190
- project: {
191
- id: string;
192
- };
193
- parentOrganization: {
194
- /**
195
- * 販売者ID
196
- */
197
- id: string;
198
- };
199
- }): Promise<import("mongodb").DeleteResult>;
200
- deleteByProject(params: {
201
- project: {
202
- id: string;
203
- };
204
- }): Promise<void>;
205
- getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
206
- }
207
- export {};