@chevre/domain 24.1.0-alpha.44 → 24.1.0-alpha.46
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.
|
@@ -193,6 +193,20 @@ export interface ISendGridSettings {
|
|
|
193
193
|
apiKey: string;
|
|
194
194
|
alert?: ISendGridAlert;
|
|
195
195
|
}
|
|
196
|
+
interface IHubOnOrderStatusChanged {
|
|
197
|
+
informOrder2hub: factory.project.IInformParams[];
|
|
198
|
+
}
|
|
199
|
+
interface IHubOnReservationStatusChanged {
|
|
200
|
+
informReservation2hub: factory.project.IInformParams[];
|
|
201
|
+
}
|
|
202
|
+
interface IHubOnTaskStatusChanged {
|
|
203
|
+
informTask2hub: factory.project.IInformParams[];
|
|
204
|
+
}
|
|
205
|
+
export interface IHubSettings {
|
|
206
|
+
onOrderStatusChanged: IHubOnOrderStatusChanged;
|
|
207
|
+
onReservationStatusChanged: IHubOnReservationStatusChanged;
|
|
208
|
+
onTaskStatusChanged: IHubOnTaskStatusChanged;
|
|
209
|
+
}
|
|
196
210
|
export interface IIntegrationSettings {
|
|
197
211
|
abortedTasksWithoutReport: string[];
|
|
198
212
|
numTryConfirmReserveTransaction: number;
|
|
@@ -205,6 +219,11 @@ export interface IIntegrationSettings {
|
|
|
205
219
|
* 2026-05-29~
|
|
206
220
|
*/
|
|
207
221
|
sendGrid?: ISendGridSettings;
|
|
222
|
+
/**
|
|
223
|
+
* hubへの連携設定
|
|
224
|
+
* 2026-06-02~
|
|
225
|
+
*/
|
|
226
|
+
hub?: IHubSettings;
|
|
208
227
|
useExperimentalFeature: boolean;
|
|
209
228
|
}
|
|
210
229
|
export interface ISetting {
|
|
@@ -5,7 +5,7 @@ import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
|
5
5
|
import type { AuthorizationRepo } from '../../../repo/authorization';
|
|
6
6
|
import type { EventRepo } from '../../../repo/event';
|
|
7
7
|
import type { EventOfferRepo } from '../../../repo/eventOffer';
|
|
8
|
-
import { EventSeriesRepo } from '../../../repo/eventSeries';
|
|
8
|
+
import type { EventSeriesRepo } from '../../../repo/eventSeries';
|
|
9
9
|
import type { IssuerRepo } from '../../../repo/issuer';
|
|
10
10
|
import type { MemberRepo } from '../../../repo/member';
|
|
11
11
|
import type { MemberProgramRepo } from '../../../repo/memberProgram';
|
|
@@ -71,7 +71,12 @@ interface IAuthorizeOptions {
|
|
|
71
71
|
* acceptedOfferのitemOfferedを最小化するかどうか
|
|
72
72
|
* 2026-05-25~
|
|
73
73
|
*/
|
|
74
|
-
useAcceptedOfferItemOfferedMinimized
|
|
74
|
+
useAcceptedOfferItemOfferedMinimized: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* ticketedSeatなしのacceptedOfferを採用するかどうか
|
|
77
|
+
* 2026-06-01~
|
|
78
|
+
*/
|
|
79
|
+
useAcceptedOfferNoTicketedSeat: boolean;
|
|
75
80
|
}
|
|
76
81
|
/**
|
|
77
82
|
* 興行オファー承認
|
|
@@ -12,11 +12,7 @@ const searchOffersByIds_1 = require("./searchOffersByIds");
|
|
|
12
12
|
* 興行オファー承認
|
|
13
13
|
*/
|
|
14
14
|
function authorize(params, options) {
|
|
15
|
-
return async (repos, settings
|
|
16
|
-
// credentials: {
|
|
17
|
-
// jwt: JWTCredentials;
|
|
18
|
-
// }
|
|
19
|
-
) => {
|
|
15
|
+
return async (repos, settings) => {
|
|
20
16
|
const { noOfferSpecified } = options;
|
|
21
17
|
const { transaction, event } = await validateCreateRequest(params)(repos);
|
|
22
18
|
const { acceptedOffers, ticketOffers, unitPriceOffers } = await validateAcceptedOffers({
|
|
@@ -51,13 +47,12 @@ function authorize(params, options) {
|
|
|
51
47
|
validateEventOfferPeriod: params.validateEventOfferPeriod === true,
|
|
52
48
|
orderNumber,
|
|
53
49
|
instrument: params.instrument,
|
|
54
|
-
// useHoldStockByTransactionNumber: params.useHoldStockByTransactionNumber, // discontinue(2024-07-02~)
|
|
55
|
-
// stockHoldUntilDaysAfterEventEnd,
|
|
56
50
|
...(typeof params.object.broker?.typeOf === 'string') ? { broker: params.object.broker } : undefined
|
|
57
51
|
}, options)(repos, settings);
|
|
58
52
|
acceptedOffers4result = processStartReserveResult.acceptedOffers4result;
|
|
59
53
|
if (!noOfferSpecified) {
|
|
60
54
|
const useAcceptedOfferItemOfferedMinimized = options.useAcceptedOfferItemOfferedMinimized === true;
|
|
55
|
+
const useAcceptedOfferNoTicketedSeat = options.useAcceptedOfferNoTicketedSeat === true;
|
|
61
56
|
await (0, any_1.acceptOffer)({
|
|
62
57
|
orderNumber,
|
|
63
58
|
project: transaction.project,
|
|
@@ -67,7 +62,7 @@ function authorize(params, options) {
|
|
|
67
62
|
return {
|
|
68
63
|
...acceptOfferNoPriceSpec,
|
|
69
64
|
itemOffered: (useAcceptedOfferItemOfferedMinimized) // support useAcceptedOfferItemOfferedMinimized(2026-05-25~)
|
|
70
|
-
? minimizeItemOffered(itemOffered)
|
|
65
|
+
? minimizeItemOffered(itemOffered, { useAcceptedOfferNoTicketedSeat })
|
|
71
66
|
: itemOffered
|
|
72
67
|
};
|
|
73
68
|
})
|
|
@@ -92,7 +87,8 @@ function authorize(params, options) {
|
|
|
92
87
|
* 注文ドキュメントに保管するitemOfferedを最小化する
|
|
93
88
|
* 2026-05-25~
|
|
94
89
|
*/
|
|
95
|
-
function minimizeItemOffered(itemOffered) {
|
|
90
|
+
function minimizeItemOffered(itemOffered, options) {
|
|
91
|
+
const { useAcceptedOfferNoTicketedSeat } = options;
|
|
96
92
|
const { id, reservationNumber, typeOf, reservationFor, reservedTicket } = itemOffered;
|
|
97
93
|
const minimizedReservation = {
|
|
98
94
|
id: reservationFor.id,
|
|
@@ -123,7 +119,8 @@ function minimizeItemOffered(itemOffered) {
|
|
|
123
119
|
reservationFor: minimizedReservation,
|
|
124
120
|
reservedTicket: {
|
|
125
121
|
typeOf: reservedTicket.typeOf,
|
|
126
|
-
|
|
122
|
+
// useAcceptedOfferNoTicketedSeatでない場合のみ座席保管(2026-06-01~)
|
|
123
|
+
...((!useAcceptedOfferNoTicketedSeat && typeof reservedTicket.ticketedSeat?.typeOf === 'string') && { ticketedSeat: reservedTicket.ticketedSeat }),
|
|
127
124
|
...((typeof reservedTicket.identifier === 'string') && { identifier: reservedTicket.identifier })
|
|
128
125
|
}
|
|
129
126
|
};
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import type { IExecuteSettings as IMinimumExecuteSettings } from './eventEmitter/task';
|
|
2
2
|
import { factory } from './factory';
|
|
3
3
|
import type { IntegrationSettingRepo } from './repo/setting/integration';
|
|
4
|
-
interface IOnOrderStatusChanged {
|
|
5
|
-
informOrder2hub?: factory.project.IInformParams[];
|
|
6
|
-
}
|
|
7
|
-
interface IOnReservationStatusChanged {
|
|
8
|
-
informReservation2hub?: factory.project.IInformParams[];
|
|
9
|
-
}
|
|
10
|
-
interface IOnTaskStatusChanged {
|
|
11
|
-
informTask2hub?: factory.project.IInformParams[];
|
|
12
|
-
}
|
|
13
4
|
interface ICallableTask {
|
|
14
5
|
aggregateOnSystem?: ICallableTaskOperation;
|
|
15
6
|
handleNotification?: ICallableTaskOperation;
|
|
@@ -19,18 +10,12 @@ interface IOptions {
|
|
|
19
10
|
* タスク実行処理の実装
|
|
20
11
|
*/
|
|
21
12
|
callableTask?: ICallableTask;
|
|
22
|
-
onOrderStatusChanged: IOnOrderStatusChanged;
|
|
23
|
-
onReservationStatusChanged: IOnReservationStatusChanged;
|
|
24
|
-
onTaskStatusChanged: IOnTaskStatusChanged;
|
|
25
13
|
}
|
|
26
14
|
/**
|
|
27
15
|
* aggregation domain settings
|
|
28
16
|
*/
|
|
29
17
|
declare class AggregationSettings {
|
|
30
18
|
readonly callableTask?: ICallableTask;
|
|
31
|
-
readonly onOrderStatusChanged: IOnOrderStatusChanged;
|
|
32
|
-
readonly onReservationStatusChanged: IOnReservationStatusChanged;
|
|
33
|
-
readonly onTaskStatusChanged: IOnTaskStatusChanged;
|
|
34
19
|
constructor(options: IOptions);
|
|
35
20
|
}
|
|
36
21
|
interface IExecuteSettings extends IMinimumExecuteSettings {
|
|
@@ -6,14 +6,18 @@ exports.AggregationSettings = void 0;
|
|
|
6
6
|
*/
|
|
7
7
|
class AggregationSettings {
|
|
8
8
|
callableTask;
|
|
9
|
-
onOrderStatusChanged;
|
|
10
|
-
onReservationStatusChanged;
|
|
11
|
-
onTaskStatusChanged;
|
|
9
|
+
// public readonly onOrderStatusChanged: IOnOrderStatusChanged;
|
|
10
|
+
// public readonly onReservationStatusChanged: IOnReservationStatusChanged;
|
|
11
|
+
// public readonly onTaskStatusChanged: IOnTaskStatusChanged;
|
|
12
12
|
constructor(options) {
|
|
13
|
-
const { callableTask,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const { callableTask,
|
|
14
|
+
// onOrderStatusChanged,
|
|
15
|
+
// onReservationStatusChanged,
|
|
16
|
+
// onTaskStatusChanged
|
|
17
|
+
} = options;
|
|
18
|
+
// this.onOrderStatusChanged = onOrderStatusChanged;
|
|
19
|
+
// this.onReservationStatusChanged = onReservationStatusChanged;
|
|
20
|
+
// this.onTaskStatusChanged = onTaskStatusChanged;
|
|
17
21
|
if (callableTask !== undefined) {
|
|
18
22
|
this.callableTask = callableTask;
|
|
19
23
|
}
|
package/package.json
CHANGED