@chevre/domain 21.4.0-alpha.9 → 21.5.0-alpha.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 (94) 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 +24 -0
  17. package/lib/chevre/repo/event.js +43 -1
  18. package/lib/chevre/repo/member.d.ts +92 -5
  19. package/lib/chevre/repo/member.js +125 -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/paymentServiceProvider.d.ts +5 -0
  31. package/lib/chevre/repo/paymentServiceProvider.js +11 -0
  32. package/lib/chevre/repo/place.d.ts +68 -16
  33. package/lib/chevre/repo/place.js +121 -167
  34. package/lib/chevre/repo/product.d.ts +2 -4
  35. package/lib/chevre/repo/product.js +52 -7
  36. package/lib/chevre/repo/productOffer.d.ts +5 -0
  37. package/lib/chevre/repo/productOffer.js +16 -0
  38. package/lib/chevre/repo/project.d.ts +5 -3
  39. package/lib/chevre/repo/project.js +48 -8
  40. package/lib/chevre/repo/reservation.d.ts +33 -21
  41. package/lib/chevre/repo/reservation.js +97 -79
  42. package/lib/chevre/repo/role.d.ts +0 -4
  43. package/lib/chevre/repo/role.js +0 -46
  44. package/lib/chevre/repo/seller.d.ts +14 -2
  45. package/lib/chevre/repo/seller.js +13 -8
  46. package/lib/chevre/repo/stockHolder.d.ts +2 -77
  47. package/lib/chevre/repo/stockHolder.js +200 -476
  48. package/lib/chevre/repo/task.d.ts +1 -1
  49. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +3 -2
  50. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +1 -1
  51. package/lib/chevre/service/aggregation/project.js +5 -1
  52. package/lib/chevre/service/assetTransaction/cancelReservation.js +10 -2
  53. package/lib/chevre/service/assetTransaction/registerService.js +7 -3
  54. package/lib/chevre/service/assetTransaction/reserve/factory.d.ts +6 -1
  55. package/lib/chevre/service/assetTransaction/reserve/factory.js +15 -38
  56. package/lib/chevre/service/assetTransaction/reserve.d.ts +0 -1
  57. package/lib/chevre/service/assetTransaction/reserve.js +7 -22
  58. package/lib/chevre/service/event/createEvent.d.ts +11 -0
  59. package/lib/chevre/service/event/createEvent.js +112 -0
  60. package/lib/chevre/service/event.d.ts +2 -0
  61. package/lib/chevre/service/event.js +8 -4
  62. package/lib/chevre/service/iam.d.ts +5 -0
  63. package/lib/chevre/service/iam.js +7 -19
  64. package/lib/chevre/service/moneyTransfer.js +6 -2
  65. package/lib/chevre/service/notification.js +5 -1
  66. package/lib/chevre/service/offer/event/authorize.d.ts +0 -1
  67. package/lib/chevre/service/offer/event/authorize.js +6 -2
  68. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +1 -1
  69. package/lib/chevre/service/offer/product/searchProductOffers.js +1 -1
  70. package/lib/chevre/service/order/returnOrder.js +8 -1
  71. package/lib/chevre/service/order/sendOrder.js +8 -1
  72. package/lib/chevre/service/payment/creditCard.js +5 -1
  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/onResourceUpdated.js +128 -39
  82. package/lib/chevre/service/task/returnPayTransaction.js +1 -0
  83. package/lib/chevre/service/transaction/orderProgramMembership/findCreditCard.js +6 -2
  84. package/lib/chevre/settings.d.ts +0 -2
  85. package/lib/chevre/settings.js +7 -7
  86. package/package.json +3 -3
  87. package/example/src/chevre/findByOrderNumberAndReservationId.ts +0 -20
  88. package/example/src/chevre/findScreeningRoomsByBranchCode.ts +0 -27
  89. package/example/src/chevre/searchHoldReservations.ts +0 -38
  90. package/example/src/chevre/searchScreeningRooms.ts +0 -33
  91. package/example/src/chevre/syncScreeningRooms.ts +0 -21
  92. package/example/src/chevre/syncScreeningRoomsAll.ts +0 -41
  93. package/lib/chevre/repo/mongoose/schemas/holdReservation.d.ts +0 -75
  94. package/lib/chevre/repo/mongoose/schemas/holdReservation.js +0 -93
@@ -85,10 +85,8 @@ export declare class StockHolderRepository {
85
85
  static KEY_PREFIX_NEW: string;
86
86
  static KEY_PREFIX: string;
87
87
  private readonly redisClient;
88
- private readonly holdReservationModel;
89
- constructor(redisClient: RedisClientType, connection: Connection);
88
+ constructor(redisClient: RedisClientType, __: Connection);
90
89
  private static offer2field;
91
- private static offer2subReservation;
92
90
  private static createKey;
93
91
  /**
94
92
  * 新リポジトリを使用するかどうか
@@ -101,12 +99,7 @@ export declare class StockHolderRepository {
101
99
  /**
102
100
  * 座席をロックする
103
101
  */
104
- lock(lockKey: ILockKey & {
105
- /**
106
- * テスト目的の強制オプション
107
- */
108
- useMongooseForcibly?: boolean;
109
- }): Promise<void>;
102
+ lock(lockKey: ILockKey & {}): Promise<void>;
110
103
  /**
111
104
  * 座席ロックを解除する
112
105
  */
@@ -128,10 +121,6 @@ export declare class StockHolderRepository {
128
121
  * 保持者を取得する
129
122
  */
130
123
  getHolder(params: Omit<IUnlockKey, 'holder'>): Promise<string | null | undefined>;
131
- /**
132
- * 在庫状況を検索する
133
- * offers.lengthが0だと"ERR wrong number of arguments for 'hmget' command"となるので注意
134
- */
135
124
  searchHolders(params: {
136
125
  project: {
137
126
  id: string;
@@ -144,72 +133,8 @@ export declare class StockHolderRepository {
144
133
  /**
145
134
  * 汎用的な検索(mongooseのみ対応)
146
135
  */
147
- search(params: {
148
- limit?: number;
149
- page?: number;
150
- sort?: {
151
- 'reservationFor.startDate': factory.sortType;
152
- };
153
- project?: {
154
- id?: {
155
- $eq?: string;
156
- };
157
- };
158
- reservationFor?: {
159
- id?: {
160
- $eq?: string;
161
- };
162
- };
163
- reservationNumber?: {
164
- $eq?: string;
165
- };
166
- id?: {
167
- $eq?: string;
168
- };
169
- identifier?: {
170
- $eq?: string;
171
- };
172
- reservedTicket?: {
173
- ticketedSeat?: {
174
- seatNumber?: {
175
- $eq?: string;
176
- };
177
- seatSection?: {
178
- $eq?: string;
179
- };
180
- };
181
- };
182
- }): Promise<ISearchResult[]>;
183
136
  /**
184
137
  * 汎用的な集計(mongooseのみ対応)
185
138
  */
186
- aggregateByReservationFor(params: {
187
- limit?: number;
188
- page?: number;
189
- project?: {
190
- id?: {
191
- $eq?: string;
192
- };
193
- };
194
- reservationFor?: {
195
- id?: {
196
- $eq?: string;
197
- };
198
- };
199
- }): Promise<{
200
- typeOf: 'AggregateReservation';
201
- reservationCount: number;
202
- reservationFor: {
203
- id: string;
204
- startDate: Date;
205
- };
206
- reservationPackageCount: number;
207
- objectSize: number;
208
- }[]>;
209
139
  private checkIfConflicted;
210
- private initializeHoldReservation;
211
- /**
212
- * 仮で追加したholdReservationsが重複していないかどうか検証する
213
- */
214
- private checkIfAlreadyInUse;
215
140
  }