@chevre/domain 21.4.0-alpha.8 → 21.4.0

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 (96) hide show
  1. package/example/src/chevre/cleanEventsByMovieTheater.ts +32 -0
  2. package/example/src/chevre/createDeleteTransactionTasksOfDeletedPeople.ts +126 -0
  3. package/example/src/chevre/iam/searchMemberOfIdsByMemberId.ts +31 -0
  4. package/example/src/chevre/iam/searchProjectIdsByMemberId.ts +32 -0
  5. package/example/src/chevre/importEventsFromCOA.ts +5 -4
  6. package/example/src/chevre/migrateEventOrganizer.ts +18 -5
  7. package/example/src/chevre/migrateIAMMemberMemberOf.ts +59 -0
  8. package/example/src/chevre/migrateReservationProvider.ts +119 -0
  9. package/example/src/chevre/migrateScreeningRoomOrganizer.ts +91 -0
  10. package/example/src/chevre/processReserve.ts +0 -1
  11. package/example/src/chevre/searchActions.ts +1 -1
  12. package/example/src/chevre/searchPermissions.ts +7 -15
  13. package/lib/chevre/factory/event.d.ts +1 -1
  14. package/lib/chevre/repo/assetTransaction.d.ts +4 -1
  15. package/lib/chevre/repo/assetTransaction.js +6 -12
  16. package/lib/chevre/repo/event.d.ts +16 -0
  17. package/lib/chevre/repo/event.js +34 -1
  18. package/lib/chevre/repo/member.d.ts +77 -5
  19. package/lib/chevre/repo/member.js +115 -97
  20. package/lib/chevre/repo/mongoose/schemas/event.d.ts +3 -3
  21. package/lib/chevre/repo/mongoose/schemas/member.d.ts +7 -7
  22. package/lib/chevre/repo/mongoose/schemas/member.js +22 -8
  23. package/lib/chevre/repo/mongoose/schemas/place.d.ts +6 -6
  24. package/lib/chevre/repo/mongoose/schemas/place.js +9 -2
  25. package/lib/chevre/repo/mongoose/schemas/product.d.ts +3 -3
  26. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +6 -3
  27. package/lib/chevre/repo/mongoose/schemas/reservation.js +10 -4
  28. package/lib/chevre/repo/order.d.ts +21 -0
  29. package/lib/chevre/repo/order.js +54 -62
  30. package/lib/chevre/repo/place.d.ts +57 -16
  31. package/lib/chevre/repo/place.js +112 -167
  32. package/lib/chevre/repo/product.d.ts +2 -4
  33. package/lib/chevre/repo/product.js +52 -7
  34. package/lib/chevre/repo/project.d.ts +5 -3
  35. package/lib/chevre/repo/project.js +48 -8
  36. package/lib/chevre/repo/reservation.d.ts +33 -21
  37. package/lib/chevre/repo/reservation.js +97 -79
  38. package/lib/chevre/repo/role.d.ts +0 -4
  39. package/lib/chevre/repo/role.js +0 -46
  40. package/lib/chevre/repo/seller.d.ts +18 -5
  41. package/lib/chevre/repo/seller.js +53 -46
  42. package/lib/chevre/repo/stockHolder.d.ts +2 -77
  43. package/lib/chevre/repo/stockHolder.js +200 -476
  44. package/lib/chevre/repo/task.d.ts +1 -1
  45. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +3 -2
  46. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +1 -1
  47. package/lib/chevre/service/aggregation/project.js +5 -1
  48. package/lib/chevre/service/assetTransaction/cancelReservation.js +10 -2
  49. package/lib/chevre/service/assetTransaction/pay/account/validation.js +9 -1
  50. package/lib/chevre/service/assetTransaction/pay.js +9 -1
  51. package/lib/chevre/service/assetTransaction/registerService.js +7 -3
  52. package/lib/chevre/service/assetTransaction/reserve/factory.d.ts +6 -1
  53. package/lib/chevre/service/assetTransaction/reserve/factory.js +15 -38
  54. package/lib/chevre/service/assetTransaction/reserve.d.ts +0 -1
  55. package/lib/chevre/service/assetTransaction/reserve.js +7 -22
  56. package/lib/chevre/service/event/createEvent.d.ts +11 -0
  57. package/lib/chevre/service/event/createEvent.js +112 -0
  58. package/lib/chevre/service/event.d.ts +2 -0
  59. package/lib/chevre/service/event.js +8 -4
  60. package/lib/chevre/service/iam.d.ts +5 -0
  61. package/lib/chevre/service/iam.js +7 -19
  62. package/lib/chevre/service/moneyTransfer.js +6 -2
  63. package/lib/chevre/service/notification.js +5 -1
  64. package/lib/chevre/service/offer/event/authorize.d.ts +0 -1
  65. package/lib/chevre/service/offer/event/authorize.js +6 -2
  66. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +1 -1
  67. package/lib/chevre/service/offer/product/searchProductOffers.js +1 -1
  68. package/lib/chevre/service/order/returnOrder.js +8 -1
  69. package/lib/chevre/service/order/sendOrder.js +8 -1
  70. package/lib/chevre/service/payment/creditCard.js +14 -2
  71. package/lib/chevre/service/payment/movieTicket/validation.js +9 -1
  72. package/lib/chevre/service/payment/movieTicket.js +19 -2
  73. package/lib/chevre/service/payment/paymentCard.js +6 -4
  74. package/lib/chevre/service/reserve/cancelReservation.js +15 -28
  75. package/lib/chevre/service/reserve/confirmReservation.js +14 -30
  76. package/lib/chevre/service/reserve/verifyToken4reservation.d.ts +3 -0
  77. package/lib/chevre/service/reserve/verifyToken4reservation.js +3 -1
  78. package/lib/chevre/service/task/{syncScreeningRooms.d.ts → createEvent.d.ts} +1 -1
  79. package/lib/chevre/service/task/{syncScreeningRooms.js → createEvent.js} +11 -3
  80. package/lib/chevre/service/task/onAuthorizationCreated.js +1 -0
  81. package/lib/chevre/service/task/returnPayTransaction.js +1 -0
  82. package/lib/chevre/service/transaction/moneyTransfer.js +9 -1
  83. package/lib/chevre/service/transaction/orderProgramMembership/findCreditCard.js +6 -2
  84. package/lib/chevre/service/transaction/placeOrderInProgress.js +9 -6
  85. package/lib/chevre/service/transaction/returnOrder.js +9 -3
  86. package/lib/chevre/settings.d.ts +0 -2
  87. package/lib/chevre/settings.js +7 -7
  88. package/package.json +3 -3
  89. package/example/src/chevre/findByOrderNumberAndReservationId.ts +0 -20
  90. package/example/src/chevre/findScreeningRoomsByBranchCode.ts +0 -27
  91. package/example/src/chevre/searchHoldReservations.ts +0 -38
  92. package/example/src/chevre/searchScreeningRooms.ts +0 -33
  93. package/example/src/chevre/syncScreeningRooms.ts +0 -21
  94. package/example/src/chevre/syncScreeningRoomsAll.ts +0 -41
  95. package/lib/chevre/repo/mongoose/schemas/holdReservation.d.ts +0 -75
  96. package/lib/chevre/repo/mongoose/schemas/holdReservation.js +0 -93
@@ -25,7 +25,7 @@
25
25
  import { Connection } from 'mongoose';
26
26
  import * as factory from '../factory';
27
27
  type IScreeningRoomSectionWithoutContainsPlace = Omit<factory.place.screeningRoomSection.IPlace, 'containsPlace'>;
28
- export type IScreeningRoomFoundByBranchCode = Pick<factory.place.screeningRoom.IPlace, 'typeOf' | 'branchCode' | 'name' | 'containsPlace' | 'seatCount'>;
28
+ export type IScreeningRoomFoundByBranchCode = Pick<factory.place.screeningRoom.IPlace, 'typeOf' | 'branchCode' | 'name' | 'containsPlace' | 'seatCount' | 'parentOrganization'>;
29
29
  /**
30
30
  * 施設リポジトリ
31
31
  */
@@ -44,12 +44,18 @@ export declare class MongoRepository {
44
44
  */
45
45
  searchMovieTheaters(params: factory.place.movieTheater.ISearchConditions & {}, inclusion: string[], exclusion: string[]): Promise<factory.place.movieTheater.IPlaceWithoutScreeningRoom[]>;
46
46
  deleteMovieTheaterById(params: {
47
+ project: {
48
+ id: string;
49
+ };
47
50
  id: string;
48
51
  }): Promise<void>;
49
- createScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containedInPlace' | 'containsPlace'> & {
52
+ createScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containedInPlace' | 'containsPlace' | 'parentOrganization'> & {
50
53
  containedInPlace: {
51
54
  branchCode: string;
52
55
  };
56
+ parentOrganization?: {
57
+ id?: string;
58
+ };
53
59
  }): Promise<{
54
60
  containedInPlace: {
55
61
  /**
@@ -59,10 +65,13 @@ export declare class MongoRepository {
59
65
  };
60
66
  typeOf: factory.placeType.ScreeningRoom;
61
67
  }>;
62
- updateScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containedInPlace' | 'containsPlace'> & {
68
+ updateScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containedInPlace' | 'containsPlace' | 'parentOrganization'> & {
63
69
  containedInPlace: {
64
70
  branchCode: string;
65
71
  };
72
+ parentOrganization?: {
73
+ id?: string;
74
+ };
66
75
  }, $unset: any): Promise<{
67
76
  containedInPlace: {
68
77
  /**
@@ -72,6 +81,19 @@ export declare class MongoRepository {
72
81
  };
73
82
  typeOf: factory.placeType.ScreeningRoom;
74
83
  }>;
84
+ addParentOrganization2ScreeningRoom(screeningRoom: Pick<factory.place.screeningRoom.IPlace, 'branchCode' | 'parentOrganization' | 'project'> & {
85
+ containedInPlace: {
86
+ branchCode: string;
87
+ };
88
+ }): Promise<{
89
+ containedInPlace: {
90
+ /**
91
+ * 施設ID
92
+ */
93
+ id: string;
94
+ };
95
+ typeOf: factory.placeType.ScreeningRoom;
96
+ }>;
75
97
  updateScreeningRoomsByContainedInPlaceId(screeningRoom: {
76
98
  project: {
77
99
  id: string;
@@ -82,6 +104,9 @@ export declare class MongoRepository {
82
104
  project: {
83
105
  id: string;
84
106
  };
107
+ parentOrganization?: {
108
+ id?: string;
109
+ };
85
110
  /**
86
111
  * ルームコード
87
112
  */
@@ -112,7 +137,11 @@ export declare class MongoRepository {
112
137
  id: string;
113
138
  };
114
139
  }): Promise<void>;
115
- createScreeningRoomSection(screeningRoomSection: IScreeningRoomSectionWithoutContainsPlace): Promise<{
140
+ createScreeningRoomSection(screeningRoomSection: IScreeningRoomSectionWithoutContainsPlace & {
141
+ parentOrganization?: {
142
+ id?: string;
143
+ };
144
+ }): Promise<{
116
145
  containedInPlace: {
117
146
  /**
118
147
  * 施設ID
@@ -128,6 +157,9 @@ export declare class MongoRepository {
128
157
  branchCode: string;
129
158
  };
130
159
  };
160
+ parentOrganization?: {
161
+ id?: string;
162
+ };
131
163
  }, $unset: any): Promise<{
132
164
  containedInPlace: {
133
165
  /**
@@ -146,6 +178,9 @@ export declare class MongoRepository {
146
178
  project: {
147
179
  id: string;
148
180
  };
181
+ parentOrganization?: {
182
+ id?: string;
183
+ };
149
184
  /**
150
185
  * セクションコード
151
186
  */
@@ -171,8 +206,11 @@ export declare class MongoRepository {
171
206
  };
172
207
  typeOf: factory.placeType.ScreeningRoom;
173
208
  }>;
174
- searchScreeningRooms(searchConditions: factory.place.screeningRoom.ISearchConditions): Promise<Omit<factory.place.screeningRoom.IPlace, 'containsPlace'>[]>;
209
+ searchScreeningRooms(searchConditions: factory.place.screeningRoom.ISearchConditions): Promise<Omit<factory.place.screeningRoom.IPlace, 'containsPlace' | 'parentOrganization'>[]>;
175
210
  findScreeningRoomsByBranchCode(params: {
211
+ project: {
212
+ id: string;
213
+ };
176
214
  branchCode: {
177
215
  $eq: string;
178
216
  };
@@ -182,7 +220,11 @@ export declare class MongoRepository {
182
220
  };
183
221
  };
184
222
  }): Promise<IScreeningRoomFoundByBranchCode>;
185
- createSeat(seat: factory.place.seat.IPlace): Promise<{
223
+ createSeat(seat: factory.place.seat.IPlace & {
224
+ parentOrganization?: {
225
+ id?: string;
226
+ };
227
+ }): Promise<{
186
228
  containedInPlace: {
187
229
  /**
188
230
  * 施設ID
@@ -201,6 +243,9 @@ export declare class MongoRepository {
201
243
  };
202
244
  };
203
245
  };
246
+ parentOrganization?: {
247
+ id?: string;
248
+ };
204
249
  }, $unset: any): Promise<{
205
250
  containedInPlace: {
206
251
  /**
@@ -215,6 +260,9 @@ export declare class MongoRepository {
215
260
  project: {
216
261
  id: string;
217
262
  };
263
+ parentOrganization?: {
264
+ id?: string;
265
+ };
218
266
  /**
219
267
  * 座席コード
220
268
  */
@@ -246,16 +294,6 @@ export declare class MongoRepository {
246
294
  };
247
295
  typeOf: factory.placeType.ScreeningRoom;
248
296
  }>;
249
- syncScreeningRooms(__: {
250
- /**
251
- * 施設ID
252
- */
253
- id: string;
254
- /**
255
- * 特定のルームのみ同期する場合、ルームコードを指定する
256
- */
257
- screeningRoomBranchCode?: string;
258
- }): Promise<void>;
259
297
  unsetContainsPlaceFromMovieTheater(params: {
260
298
  /**
261
299
  * 施設ID
@@ -281,6 +319,9 @@ export declare class MongoRepository {
281
319
  id: string;
282
320
  }, projection?: any): Promise<factory.place.busStop.IPlace>;
283
321
  deleteBusStopById(params: {
322
+ project: {
323
+ id: string;
324
+ };
284
325
  id: string;
285
326
  }): Promise<void>;
286
327
  getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;