@chevre/domain 21.37.0-alpha.8 → 21.37.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 (73) hide show
  1. package/example/src/chevre/processOrder.ts +87 -0
  2. package/example/src/chevre/transaction/processPlaceOrder.ts +17 -143
  3. package/lib/chevre/factory/reservedAgentIdentifireNames.js +2 -1
  4. package/lib/chevre/factory/transaction.d.ts +1 -4
  5. package/lib/chevre/repo/passport.d.ts +39 -0
  6. package/lib/chevre/repo/passport.js +134 -0
  7. package/lib/chevre/repo/task.d.ts +9 -0
  8. package/lib/chevre/repo/task.js +23 -2
  9. package/lib/chevre/repository.d.ts +5 -0
  10. package/lib/chevre/repository.js +15 -2
  11. package/lib/chevre/service/accountTransaction/deposit.js +0 -1
  12. package/lib/chevre/service/accountTransaction/transfer.js +0 -1
  13. package/lib/chevre/service/accountTransaction/withdraw.js +0 -1
  14. package/lib/chevre/service/assetTransaction/reserve/cancel.d.ts +22 -0
  15. package/lib/chevre/service/assetTransaction/reserve/cancel.js +41 -0
  16. package/lib/chevre/service/assetTransaction/reserve/confirm/factory.d.ts +8 -0
  17. package/lib/chevre/service/assetTransaction/reserve/confirm/factory.js +94 -0
  18. package/lib/chevre/service/assetTransaction/reserve/confirm.d.ts +19 -0
  19. package/lib/chevre/service/assetTransaction/reserve/confirm.js +93 -0
  20. package/lib/chevre/service/assetTransaction/reserve/exportTasksById.d.ts +15 -0
  21. package/lib/chevre/service/assetTransaction/reserve/exportTasksById.js +99 -0
  22. package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.d.ts +28 -0
  23. package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +405 -0
  24. package/lib/chevre/service/assetTransaction/reserve/start/factory/createPointAward.d.ts +15 -0
  25. package/lib/chevre/service/assetTransaction/reserve/start/factory/createPointAward.js +40 -0
  26. package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.d.ts +54 -0
  27. package/lib/chevre/service/assetTransaction/reserve/{factory.js → start/factory/createReservation.js} +3 -222
  28. package/lib/chevre/service/assetTransaction/reserve/start/factory/createStartParams.d.ts +22 -0
  29. package/lib/chevre/service/assetTransaction/reserve/start/factory/createStartParams.js +90 -0
  30. package/lib/chevre/service/assetTransaction/reserve/{factory → start/factory}/price.d.ts +1 -1
  31. package/lib/chevre/service/assetTransaction/reserve/{factory → start/factory}/price.js +1 -1
  32. package/lib/chevre/service/assetTransaction/reserve/start.d.ts +74 -0
  33. package/lib/chevre/service/assetTransaction/reserve/start.js +570 -0
  34. package/lib/chevre/service/assetTransaction/reserve.d.ts +6 -128
  35. package/lib/chevre/service/assetTransaction/reserve.js +9 -1047
  36. package/lib/chevre/service/offer/event/{defaultOffer.d.ts → authorize/defaultOffer.d.ts} +1 -1
  37. package/lib/chevre/service/offer/event/{defaultOffer.js → authorize/defaultOffer.js} +1 -1
  38. package/lib/chevre/service/offer/event/{factory.d.ts → authorize/factory.d.ts} +13 -20
  39. package/lib/chevre/service/offer/event/{factory.js → authorize/factory.js} +72 -146
  40. package/lib/chevre/service/offer/event/{processStartReserve4chevre.d.ts → authorize/processStartReserve4chevre.d.ts} +19 -19
  41. package/lib/chevre/service/offer/event/{processStartReserve4chevre.js → authorize/processStartReserve4chevre.js} +8 -13
  42. package/lib/chevre/service/offer/event/authorize.d.ts +1 -1
  43. package/lib/chevre/service/offer/event/authorize.js +104 -128
  44. package/lib/chevre/service/offer/event/importFromCOA/factory.d.ts +9 -0
  45. package/lib/chevre/service/offer/event/importFromCOA/factory.js +67 -0
  46. package/lib/chevre/service/offer/event/importFromCOA.js +1 -1
  47. package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +0 -3
  48. package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +3 -3
  49. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.d.ts +4 -4
  50. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.d.ts +16 -0
  51. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.js +168 -0
  52. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +4 -5
  53. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +4 -135
  54. package/lib/chevre/service/order/onOrderStatusChanged.d.ts +2 -2
  55. package/lib/chevre/service/order/onOrderStatusChanged.js +2 -1
  56. package/lib/chevre/service/order.d.ts +2 -2
  57. package/lib/chevre/service/order.js +2 -1
  58. package/lib/chevre/service/transaction/moneyTransfer.d.ts +3 -2
  59. package/lib/chevre/service/transaction/moneyTransfer.js +1 -2
  60. package/lib/chevre/service/transaction/placeOrderInProgress/start/factory.d.ts +10 -0
  61. package/lib/chevre/service/transaction/placeOrderInProgress/start/factory.js +36 -0
  62. package/lib/chevre/service/transaction/placeOrderInProgress/start.d.ts +6 -1
  63. package/lib/chevre/service/transaction/placeOrderInProgress/start.js +26 -12
  64. package/lib/chevre/service/validation/validateOrder.js +1 -1
  65. package/lib/chevre/settings.d.ts +1 -0
  66. package/lib/chevre/settings.js +5 -1
  67. package/package.json +3 -3
  68. package/example/src/chevre/migrateAuthorizeEventServiceOfferResult.ts +0 -163
  69. package/lib/chevre/service/assetTransaction/reserve/factory.d.ts +0 -96
  70. package/lib/chevre/service/transaction/placeOrderInProgress/factory.d.ts +0 -2
  71. package/lib/chevre/service/transaction/placeOrderInProgress/factory.js +0 -29
  72. package/lib/chevre/service/transaction/validation.d.ts +0 -14
  73. package/lib/chevre/service/transaction/validation.js +0 -101
@@ -1,130 +1,8 @@
1
- import * as factory from '../../factory';
2
- import type { MongoRepository as ActionRepo } from '../../repo/action';
3
- import type { MongoRepository as AssetTransactionRepo } from '../../repo/assetTransaction';
4
- import type { IMinimizedIndividualEvent, MongoRepository as EventRepo } from '../../repo/event';
5
- import type { MongoRepository as OfferRepo } from '../../repo/offer';
6
- import type { MongoRepository as OfferCatalogRepo } from '../../repo/offerCatalog';
7
- import type { MongoRepository as OfferCatalogItemRepo } from '../../repo/offerCatalogItem';
8
- import type { MongoRepository as OrderRepo } from '../../repo/order';
9
- import type { MongoRepository as PaymentServiceRepo } from '../../repo/paymentService';
10
- import type { MongoRepository as SeatRepo } from '../../repo/place/seat';
11
- import type { MongoRepository as PriceSpecificationRepo } from '../../repo/priceSpecification';
12
- import type { MongoRepository as ProductRepo } from '../../repo/product';
13
- import type { MongoRepository as ProductOfferRepo } from '../../repo/productOffer';
14
- import type { MongoRepository as ProjectRepo } from '../../repo/project';
15
- import type { RedisRepository as OfferRateLimitRepo } from '../../repo/rateLimit/offer';
16
- import type { MongoRepository as ReservationRepo } from '../../repo/reservation';
17
- import type { StockHolderRepository as StockHolderRepo } from '../../repo/stockHolder';
18
- import type { MongoRepository as TaskRepo } from '../../repo/task';
19
- export interface IStartOperationRepos {
20
- stockHolder: StockHolderRepo;
21
- event: EventRepo;
22
- offer: OfferRepo;
23
- offerCatalog: OfferCatalogRepo;
24
- offerCatalogItem: OfferCatalogItemRepo;
25
- offerRateLimit: OfferRateLimitRepo;
26
- paymentService: PaymentServiceRepo;
27
- product: ProductRepo;
28
- productOffer: ProductOfferRepo;
29
- priceSpecification: PriceSpecificationRepo;
30
- project: ProjectRepo;
31
- seat: SeatRepo;
32
- task: TaskRepo;
33
- assetTransaction: AssetTransactionRepo;
34
- }
35
- export type IStartOperation<T> = (repos: IStartOperationRepos) => Promise<T>;
36
- export interface IAddReservationsOperationRepos {
37
- stockHolder: StockHolderRepo;
38
- event: EventRepo;
39
- offer: OfferRepo;
40
- offerCatalog: OfferCatalogRepo;
41
- offerCatalogItem: OfferCatalogItemRepo;
42
- offerRateLimit: OfferRateLimitRepo;
43
- paymentService: PaymentServiceRepo;
44
- product: ProductRepo;
45
- productOffer: ProductOfferRepo;
46
- priceSpecification: PriceSpecificationRepo;
47
- seat: SeatRepo;
48
- task: TaskRepo;
49
- assetTransaction: AssetTransactionRepo;
50
- }
51
- export type ICancelOperation<T> = (repos: {
52
- action: ActionRepo;
53
- stockHolder: StockHolderRepo;
54
- offerRateLimit: OfferRateLimitRepo;
55
- reservation: ReservationRepo;
56
- task: TaskRepo;
57
- assetTransaction: AssetTransactionRepo;
58
- }) => Promise<T>;
59
- export type ITaskAndTransactionOperation<T> = (repos: {
60
- task: TaskRepo;
61
- assetTransaction: AssetTransactionRepo;
62
- }) => Promise<T>;
63
- interface IConfirmRepo {
64
- action: ActionRepo;
65
- assetTransaction: AssetTransactionRepo;
66
- order: OrderRepo;
67
- reservation: ReservationRepo;
68
- task: TaskRepo;
69
- }
70
- export type IConfirmOperation<T> = (repos: IConfirmRepo) => Promise<T>;
71
- type IObjectSubReservation = factory.assetTransaction.reserve.IObjectSubReservation;
72
- type IStartParams = factory.assetTransaction.reserve.IStartParamsWithoutDetail & {
73
- /**
74
- * 承認アクションを介した場合に検索済のイベント
75
- */
76
- preSearchedEvent?: IMinimizedIndividualEvent<factory.eventType.Event | factory.eventType.ScreeningEvent>;
77
- /**
78
- * 承認アクションを介した場合に検索済のオファーリスト
79
- */
80
- preSearchedTicketOffers?: factory.product.ITicketOffer[];
81
- /**
82
- * 承認アクションを介した場合に検索済の単価オファーリスト
83
- */
84
- preSearchedUnitPriceOffers?: factory.unitPriceOffer.IUnitPriceOffer[];
85
- /**
86
- * 販売アプリケーション
87
- */
88
- availableAtOrFrom?: {
89
- id?: string;
90
- };
91
- /**
92
- * イベントの販売期間を検証するかどうか
93
- */
94
- validateEventOfferPeriod: boolean;
95
- /**
96
- * イベントのオファー(最大予約座席数)を検証するかどうか
97
- */
98
- validateEvent: boolean;
99
- validateAppliesToMovieTicket: boolean;
100
- };
101
1
  /**
102
- * 取引開始
2
+ * 予約取引サービス
103
3
  */
104
- export declare function start(params: IStartParams & {
105
- stockHoldUntilDaysAfterEventEnd: number;
106
- }): IStartOperation<{
107
- transaction: Pick<factory.assetTransaction.ITransaction<factory.assetTransactionType.Reserve>, 'id'>;
108
- objectSubReservations: IObjectSubReservation[];
109
- issuedThrough: factory.assetTransaction.reserve.IIssuedThrough;
110
- }>;
111
- /**
112
- * 取引確定
113
- */
114
- export declare function confirm(params: factory.assetTransaction.reserve.IConfirmParams): IConfirmOperation<void>;
115
- /**
116
- * 取引中止
117
- */
118
- export declare function cancel(params: {
119
- id?: string;
120
- transactionNumber?: string;
121
- }): ICancelOperation<void>;
122
- /**
123
- * 取引タスク出力
124
- */
125
- export declare function exportTasksById(params: {
126
- id: string;
127
- }): ITaskAndTransactionOperation<{
128
- id: string;
129
- }[]>;
130
- export {};
4
+ import { cancel } from './reserve/cancel';
5
+ import { confirm } from './reserve/confirm';
6
+ import { exportTasksById } from './reserve/exportTasksById';
7
+ import { start } from './reserve/start';
8
+ export { cancel, confirm, start, exportTasksById };