@chevre/domain 24.1.0-alpha.29 → 24.1.0-alpha.30
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.
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +1 -1
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +1 -1
- package/lib/chevre/service/task/acceptCOAOffer.js +2 -2
- package/lib/chevre/service/task/cancelPendingReservation.js +1 -1
- package/lib/chevre/service/task/confirmReserveTransaction.js +1 -1
- package/lib/chevre/service/task/importEventCapacitiesFromCOA.js +1 -1
- package/lib/chevre/service/task/importEventsFromCOA.js +1 -1
- package/lib/chevre/service/task/importOffersFromCOA.js +1 -1
- package/lib/chevre/service/task/returnReserveTransaction.js +1 -1
- package/lib/chevre/service/task/syncResourcesFromCOA.js +1 -1
- package/lib/chevre/service/task/voidReserveTransaction.js +1 -1
- package/lib/chevre/settings.d.ts +8 -3
- package/lib/chevre/settings.js +32 -29
- package/package.json +1 -1
|
@@ -53,7 +53,7 @@ function payMovieTicket(params, options) {
|
|
|
53
53
|
state: '',
|
|
54
54
|
credentialsRepo: repos.credentials // set credentialsRepo(2024-11-20~)
|
|
55
55
|
});
|
|
56
|
-
const seatService = new sdk_1.Surfrock.service.seat.SeatService({ endpoint: String(availableChannel.serviceUrl), auth: mvtkReserveAuthClient }, { timeout: (await settings.getByKey('movieticketReserve')).
|
|
56
|
+
const seatService = new sdk_1.Surfrock.service.seat.SeatService({ endpoint: String(availableChannel.serviceUrl), auth: mvtkReserveAuthClient }, { timeout: (await settings.getByKey('movieticketReserve')).timeoutPay });
|
|
57
57
|
processSeatInfoSyncResult = await (0, processSeatInfoSync_1.processSeatInfoSync)({ seatInfoSyncIn })({ seatService });
|
|
58
58
|
}
|
|
59
59
|
// add recipe(2024-06-03~)
|
|
@@ -74,7 +74,7 @@ function refundMovieTicket(params, options) {
|
|
|
74
74
|
state: '',
|
|
75
75
|
credentialsRepo: repos.credentials // set credentialsRepo(2024-11-20~)
|
|
76
76
|
});
|
|
77
|
-
const seatService = new sdk_1.Surfrock.service.seat.SeatService({ endpoint: String(availableChannel.serviceUrl), auth: mvtkReserveAuthClient }, { timeout: (await settings.getByKey('movieticketReserve')).
|
|
77
|
+
const seatService = new sdk_1.Surfrock.service.seat.SeatService({ endpoint: String(availableChannel.serviceUrl), auth: mvtkReserveAuthClient }, { timeout: (await settings.getByKey('movieticketReserve')).timeoutRefund });
|
|
78
78
|
let seatInfoSyncCancelIn;
|
|
79
79
|
let seatInfoSyncIn;
|
|
80
80
|
const useSeatInfoSyncCancel = availableChannel.credentials?.useSeatInfoSyncCancel === true;
|
|
@@ -61,11 +61,11 @@ function call(params) {
|
|
|
61
61
|
const reserveService = new coa_service_1.COA.service.Reserve({
|
|
62
62
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
63
63
|
auth: coaAuthClient
|
|
64
|
-
}, { timeout: (await settings.getByKey('coa')).
|
|
64
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutReserve });
|
|
65
65
|
const masterService = new coa_service_1.COA.service.Master({
|
|
66
66
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
67
67
|
auth: coaAuthClient
|
|
68
|
-
}, { timeout: (await settings.getByKey('coa')).
|
|
68
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutMaster });
|
|
69
69
|
const { agent, object, potentialActions, purpose } = params.data;
|
|
70
70
|
// agent.idからflgMemberを自動セット(2024-12-16~)
|
|
71
71
|
const isMember = memberClients.includes(agent.id);
|
|
@@ -54,7 +54,7 @@ function call(params) {
|
|
|
54
54
|
const reserveService = new coa_service_1.COA.service.Reserve({
|
|
55
55
|
endpoint: coaAuthClient.options.endpoint,
|
|
56
56
|
auth: coaAuthClient
|
|
57
|
-
}, { timeout: (await settings.getByKey('coa')).
|
|
57
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutReserve });
|
|
58
58
|
const { object, instrument } = data;
|
|
59
59
|
await (0, cancelReservation_2.cancelPendingReservation)({
|
|
60
60
|
object,
|
|
@@ -41,7 +41,7 @@ function call(params) {
|
|
|
41
41
|
const reserveService = new coa_service_1.COA.service.Reserve({
|
|
42
42
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
43
43
|
auth: coaAuthClient
|
|
44
|
-
}, { timeout: (await settings.getByKey('coa')).
|
|
44
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutReserve });
|
|
45
45
|
await confirmReserveTransaction({
|
|
46
46
|
...params.data,
|
|
47
47
|
project: params.project,
|
|
@@ -57,7 +57,7 @@ function call(params) {
|
|
|
57
57
|
const reserveService = new coa_service_1.COA.service.Reserve({
|
|
58
58
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
59
59
|
auth: coaAuthClient
|
|
60
|
-
}, { timeout: (await settings.getByKey('coa')).
|
|
60
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutReserve });
|
|
61
61
|
await EventAggregationService.importFromCOA(params.data)({
|
|
62
62
|
event: new event_1.EventRepo(connection),
|
|
63
63
|
reserveService
|
|
@@ -64,7 +64,7 @@ function call(params) {
|
|
|
64
64
|
const masterService = new coa_service_1.COA.service.Master({
|
|
65
65
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
66
66
|
auth: coaAuthClient
|
|
67
|
-
}, { timeout: (await settings.getByKey('coa')).
|
|
67
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutMaster });
|
|
68
68
|
await EventService.importFromCOA(params.data)({
|
|
69
69
|
action: new action_1.ActionRepo(connection),
|
|
70
70
|
categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
|
|
@@ -67,7 +67,7 @@ function call(params) {
|
|
|
67
67
|
const masterService = new coa_service_1.COA.service.Master({
|
|
68
68
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
69
69
|
auth: coaAuthClient
|
|
70
|
-
}, { timeout: (await settings.getByKey('coa')).
|
|
70
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutMaster });
|
|
71
71
|
await OfferService.event.importFromCOA({
|
|
72
72
|
project: { id: params.data.project.id },
|
|
73
73
|
theaterCode: params.data.theaterCode,
|
|
@@ -75,7 +75,7 @@ function call(params) {
|
|
|
75
75
|
const reserveService = new coa_service_1.COA.service.Reserve({
|
|
76
76
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
77
77
|
auth: coaAuthClient
|
|
78
|
-
}, { timeout: (await settings.getByKey('coa')).
|
|
78
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutReserve });
|
|
79
79
|
await returnReserve({
|
|
80
80
|
...params.data,
|
|
81
81
|
sameAs: { id: params.id }
|
|
@@ -60,7 +60,7 @@ function call(params) {
|
|
|
60
60
|
const masterService = new coa_service_1.COA.service.Master({
|
|
61
61
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
62
62
|
auth: coaAuthClient
|
|
63
|
-
}, { timeout: (await settings.getByKey('coa')).
|
|
63
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutMaster });
|
|
64
64
|
const { agent, object } = params.data;
|
|
65
65
|
if (object.typeOf === factory_1.factory.eventType.ScreeningEventSeries) {
|
|
66
66
|
await syncEventSeries({
|
|
@@ -50,7 +50,7 @@ function call(params) {
|
|
|
50
50
|
const reserveService = new coa_service_1.COA.service.Reserve({
|
|
51
51
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
52
52
|
auth: coaAuthClient
|
|
53
|
-
}, { timeout: (await settings.getByKey('coa')).
|
|
53
|
+
}, { timeout: (await settings.getByKey('coa')).timeoutReserve });
|
|
54
54
|
// const transactionProcessRepo = new TransactionProcessRepo(redisClient, { lockExpiresInSeconds: 120 });
|
|
55
55
|
try {
|
|
56
56
|
await (0, voidTransaction_1.voidTransaction)({
|
package/lib/chevre/settings.d.ts
CHANGED
|
@@ -3,7 +3,11 @@ interface ISurfrockSettings {
|
|
|
3
3
|
/**
|
|
4
4
|
* 着券時タイムアウト
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
timeoutPay: number;
|
|
7
|
+
/**
|
|
8
|
+
* 着券取消時タイムアウト
|
|
9
|
+
*/
|
|
10
|
+
timeoutRefund: number;
|
|
7
11
|
/**
|
|
8
12
|
* 認証時タイムアウト
|
|
9
13
|
*/
|
|
@@ -23,7 +27,8 @@ interface IOptions {
|
|
|
23
27
|
numTryConfirmReserveTransaction: number;
|
|
24
28
|
deliverOrderLimit: number;
|
|
25
29
|
coa: {
|
|
26
|
-
|
|
30
|
+
timeoutReserve: number;
|
|
31
|
+
timeoutMaster: number;
|
|
27
32
|
};
|
|
28
33
|
gmo: {
|
|
29
34
|
timeout: number;
|
|
@@ -40,7 +45,7 @@ interface IDBOptions {
|
|
|
40
45
|
*/
|
|
41
46
|
declare class Settings {
|
|
42
47
|
private readonly options;
|
|
43
|
-
constructor(options:
|
|
48
|
+
constructor(options: IDBOptions);
|
|
44
49
|
/**
|
|
45
50
|
* 設定名称から設定を参照する
|
|
46
51
|
*/
|
package/lib/chevre/settings.js
CHANGED
|
@@ -1,44 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Settings = exports.MONGO_AUTO_INDEX = exports.MONGO_READ_PREFERENCE = exports.MONGO_MAX_TIME_MS = void 0;
|
|
4
|
+
const factory_1 = require("./factory");
|
|
5
|
+
const defaultOptions = {
|
|
6
|
+
abortedTasksWithoutReport: [
|
|
7
|
+
factory_1.factory.taskName.ImportEventCapacitiesFromCOA,
|
|
8
|
+
factory_1.factory.taskName.ImportEventsFromCOA,
|
|
9
|
+
factory_1.factory.taskName.ImportOffersFromCOA,
|
|
10
|
+
],
|
|
11
|
+
numTryConfirmReserveTransaction: 10,
|
|
12
|
+
deliverOrderLimit: 10,
|
|
13
|
+
coa: {
|
|
14
|
+
timeoutReserve: 20000,
|
|
15
|
+
timeoutMaster: 30000
|
|
16
|
+
},
|
|
17
|
+
gmo: {
|
|
18
|
+
timeout: 4000,
|
|
19
|
+
timeoutBackground: 6000
|
|
20
|
+
},
|
|
21
|
+
movieticketReserve: {
|
|
22
|
+
timeoutPay: 5000,
|
|
23
|
+
timeoutRefund: 5000,
|
|
24
|
+
timeoutCheck: 4000,
|
|
25
|
+
minIntervalBetweenPayAndRefund: 10000,
|
|
26
|
+
credentialsExpireInSeconds: 600
|
|
27
|
+
},
|
|
28
|
+
useExperimentalFeature: false
|
|
29
|
+
};
|
|
4
30
|
/**
|
|
5
31
|
* domain settings
|
|
6
32
|
*/
|
|
7
33
|
class Settings {
|
|
8
34
|
// private readonly settingModel: IModel;
|
|
9
35
|
options;
|
|
10
|
-
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
// private readonly coa: {
|
|
14
|
-
// timeout: number;
|
|
15
|
-
// };
|
|
16
|
-
// private readonly gmo: {
|
|
17
|
-
// timeout: number;
|
|
18
|
-
// timeoutBackground: number;
|
|
19
|
-
// };
|
|
20
|
-
// private readonly movieticketReserve: ISurfrockSettings;
|
|
21
|
-
// private readonly useExperimentalFeature: boolean;
|
|
22
|
-
constructor(options) {
|
|
36
|
+
constructor(options
|
|
37
|
+
// options: IOptions & IDBOptions
|
|
38
|
+
) {
|
|
23
39
|
const { connection: _connection, // ひとまず使用しない
|
|
24
|
-
...restOptions
|
|
25
|
-
// abortedTasksWithoutReport,
|
|
26
|
-
// numTryConfirmReserveTransaction,
|
|
27
|
-
// deliverOrderLimit,
|
|
28
|
-
// coa,
|
|
29
|
-
// gmo,
|
|
30
|
-
// movieticketReserve,
|
|
31
|
-
// useExperimentalFeature
|
|
40
|
+
// ...restOptions
|
|
32
41
|
} = options;
|
|
33
42
|
// this.settingModel = connection.model<IDocType, IModel>(modelName, createSchema());
|
|
34
|
-
this.options =
|
|
35
|
-
// this.
|
|
36
|
-
// this.numTryConfirmReserveTransaction = numTryConfirmReserveTransaction;
|
|
37
|
-
// this.deliverOrderLimit = deliverOrderLimit;
|
|
38
|
-
// this.coa = coa;
|
|
39
|
-
// this.gmo = gmo;
|
|
40
|
-
// this.movieticketReserve = movieticketReserve;
|
|
41
|
-
// this.useExperimentalFeature = useExperimentalFeature;
|
|
43
|
+
this.options = defaultOptions;
|
|
44
|
+
// this.options = restOptions; // defaultOptionsでひとまず固定化(2026-05-23~)
|
|
42
45
|
}
|
|
43
46
|
/**
|
|
44
47
|
* 設定名称から設定を参照する
|
package/package.json
CHANGED