@chevre/domain 21.27.0-alpha.9 → 21.27.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.
- package/example/src/chevre/{aggregateEventReservation.ts → aggregation/aggregateEventReservation.ts} +2 -3
- package/example/src/chevre/aggregation/aggregateOffersOnEvent.ts +82 -0
- package/example/src/chevre/{aggregateAllEvents.ts → aggregation/createAggregateEventTasks.ts} +26 -13
- package/example/src/chevre/aggregation/searchAggregateReservations.ts +33 -0
- package/example/src/chevre/searchEvents.ts +4 -4
- package/example/src/chevre/transaction/processPlaceOrder.ts +1 -2
- package/example/src/chevre/unsetUnnecessaryFields.ts +4 -4
- package/lib/chevre/credentials.d.ts +7 -0
- package/lib/chevre/credentials.js +10 -6
- package/lib/chevre/repo/action.d.ts +2 -2
- package/lib/chevre/repo/action.js +64 -49
- package/lib/chevre/repo/aggregateReservation.d.ts +68 -0
- package/lib/chevre/repo/aggregateReservation.js +135 -0
- package/lib/chevre/repo/event.d.ts +16 -14
- package/lib/chevre/repo/event.js +62 -20
- package/lib/chevre/repo/mongoose/schemas/action.js +18 -0
- package/lib/chevre/repo/mongoose/schemas/aggregateReservation.d.ts +5 -0
- package/lib/chevre/repo/mongoose/schemas/aggregateReservation.js +84 -0
- package/lib/chevre/repo/mongoose/schemas/event.js +1 -1
- package/lib/chevre/repo/offer.d.ts +5 -0
- package/lib/chevre/repository.d.ts +5 -0
- package/lib/chevre/repository.js +15 -2
- package/lib/chevre/service/aggregation/event/aggregateOffers.d.ts +31 -0
- package/lib/chevre/service/aggregation/event/aggregateOffers.js +290 -0
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.d.ts +3 -4
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +33 -238
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.d.ts +2 -0
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +19 -15
- package/lib/chevre/service/aggregation/event/findEventOffers.d.ts +2 -2
- package/lib/chevre/service/aggregation/event/findEventOffers.js +0 -2
- package/lib/chevre/service/aggregation/event.d.ts +2 -1
- package/lib/chevre/service/aggregation/event.js +3 -1
- package/lib/chevre/service/assetTransaction/pay.d.ts +4 -1
- package/lib/chevre/service/assetTransaction/pay.js +53 -27
- package/lib/chevre/service/assetTransaction/reserve.js +2 -1
- package/lib/chevre/service/event.js +16 -23
- package/lib/chevre/service/notification.js +0 -102
- package/lib/chevre/service/offer/onEventChanged.d.ts +25 -0
- package/lib/chevre/service/offer/onEventChanged.js +232 -0
- package/lib/chevre/service/offer.d.ts +0 -40
- package/lib/chevre/service/offer.js +1 -184
- package/lib/chevre/service/payment/any.d.ts +4 -2
- package/lib/chevre/service/payment/any.js +76 -48
- package/lib/chevre/service/payment/creditCard.js +14 -7
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.js +1 -9
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +2 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +2 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +2 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +2 -2
- package/lib/chevre/service/task/aggregateOffers.d.ts +7 -0
- package/lib/chevre/service/task/aggregateOffers.js +47 -0
- package/lib/chevre/service/task/aggregateScreeningEvent.js +0 -2
- package/lib/chevre/service/task/aggregateUseActionsOnEvent.js +2 -0
- package/lib/chevre/service/task/onEventChanged.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/preStart.js +0 -18
- package/lib/chevre/settings.d.ts +1 -0
- package/lib/chevre/settings.js +2 -1
- package/package.json +3 -3
|
@@ -13,13 +13,13 @@ exports.call = void 0;
|
|
|
13
13
|
const event_1 = require("../../repo/event");
|
|
14
14
|
const project_1 = require("../../repo/project");
|
|
15
15
|
const task_1 = require("../../repo/task");
|
|
16
|
-
const
|
|
16
|
+
const onEventChanged_1 = require("../offer/onEventChanged");
|
|
17
17
|
/**
|
|
18
18
|
* タスク実行関数
|
|
19
19
|
*/
|
|
20
20
|
function call(data) {
|
|
21
21
|
return (settings) => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
yield (0,
|
|
22
|
+
yield (0, onEventChanged_1.onEventChanged)(data)({
|
|
23
23
|
event: new event_1.MongoRepository(settings.connection),
|
|
24
24
|
project: new project_1.MongoRepository(settings.connection),
|
|
25
25
|
task: new task_1.MongoRepository(settings.connection)
|
|
@@ -287,7 +287,6 @@ function createOrder4returnPolicy(params) {
|
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
289
|
const TIMEOUT = 5000;
|
|
290
|
-
// tslint:disable-next-line:max-func-body-length
|
|
291
290
|
function getReturnPolicyByProject(params) {
|
|
292
291
|
var _a;
|
|
293
292
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -342,23 +341,6 @@ function getReturnPolicyByProject(params) {
|
|
|
342
341
|
return returnPolicy;
|
|
343
342
|
}
|
|
344
343
|
catch (err) {
|
|
345
|
-
if (err.name === 'TimeoutError') {
|
|
346
|
-
// tslint:disable-next-line:no-console
|
|
347
|
-
console.error('getReturnPolicyByProject: Timeout: It took more than 5 seconds to get the result!', err);
|
|
348
|
-
}
|
|
349
|
-
else if (err.name === 'AbortError') {
|
|
350
|
-
// tslint:disable-next-line:no-console
|
|
351
|
-
console.error('getReturnPolicyByProject: Fetch aborted by user action (browser stop button, closing tab, etc.', err);
|
|
352
|
-
}
|
|
353
|
-
else if (err.name === 'TypeError') {
|
|
354
|
-
// tslint:disable-next-line:no-console
|
|
355
|
-
console.error('getReturnPolicyByProject: AbortSignal.timeout() method is not supported', err);
|
|
356
|
-
}
|
|
357
|
-
else {
|
|
358
|
-
// A network error, or some other problem.
|
|
359
|
-
// tslint:disable-next-line:no-console
|
|
360
|
-
console.error(`getReturnPolicyByProject: Error: type: ${err.name}, message: ${err.message}`, err);
|
|
361
|
-
}
|
|
362
344
|
throw err;
|
|
363
345
|
}
|
|
364
346
|
});
|
package/lib/chevre/settings.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export declare const USE_SEND_EMAIL_MESSAGE_ON_ORDER_PROCESSING: boolean;
|
|
|
42
42
|
export declare const USE_OWNERSHIP_INFO_BY_WEB_APPLICATION: boolean;
|
|
43
43
|
export declare const USE_CHECK_RESOURCE_TASK: boolean;
|
|
44
44
|
export declare const USE_OPTIMIZE_RESERVATION_EXCEPTIONS: string[];
|
|
45
|
+
export declare const USE_OPTIMIZE_INFORM_EVENT: boolean;
|
|
45
46
|
export declare const MONGO_MAX_TIME_MS: number;
|
|
46
47
|
export declare const MONGO_READ_PREFERENCE: string;
|
|
47
48
|
export declare const MONGO_AUTO_INDEX: boolean;
|
package/lib/chevre/settings.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.settings = exports.DELIVER_ORDER_LIMIT = exports.MONGO_AUTO_INDEX = exports.MONGO_READ_PREFERENCE = exports.MONGO_MAX_TIME_MS = exports.USE_OPTIMIZE_RESERVATION_EXCEPTIONS = exports.USE_CHECK_RESOURCE_TASK = exports.USE_OWNERSHIP_INFO_BY_WEB_APPLICATION = exports.USE_SEND_EMAIL_MESSAGE_ON_ORDER_PROCESSING = exports.USE_FETCH_API = exports.USE_OPTIMIZE_TICKET_OFFER = exports.USE_DELETE_EVENT_BY_ORDER = exports.USE_ASSET_TRANSACTION_SYNC_PROCESSING = exports.DEFAULT_TASKS_EXPORT_AGENT_NAME = exports.DEFAULT_SENDER_EMAIL = exports.TRANSACTION_CANCELED_STORAGE_PERIOD_IN_DAYS = exports.TRANSACTION_CONFIRMED_STORAGE_PERIOD_IN_DAYS = exports.ASSET_TRANSACTION_STORAGE_PERIOD_IN_DAYS = exports.MAX_NUM_CREDIT_CARD_PAYMENT_METHOD = exports.ABORTED_TASKS_WITHOUT_REPORT = exports.MAXIMUM_RESERVATION_GRACE_PERIOD_IN_DAYS = exports.TRIGGER_WEBHOOK_RETRY_INTERVAL_IN_MS = exports.TRIGGER_WEBHOOK_MAX_RETRY_COUNT = void 0;
|
|
3
|
+
exports.settings = exports.DELIVER_ORDER_LIMIT = exports.MONGO_AUTO_INDEX = exports.MONGO_READ_PREFERENCE = exports.MONGO_MAX_TIME_MS = exports.USE_OPTIMIZE_INFORM_EVENT = exports.USE_OPTIMIZE_RESERVATION_EXCEPTIONS = exports.USE_CHECK_RESOURCE_TASK = exports.USE_OWNERSHIP_INFO_BY_WEB_APPLICATION = exports.USE_SEND_EMAIL_MESSAGE_ON_ORDER_PROCESSING = exports.USE_FETCH_API = exports.USE_OPTIMIZE_TICKET_OFFER = exports.USE_DELETE_EVENT_BY_ORDER = exports.USE_ASSET_TRANSACTION_SYNC_PROCESSING = exports.DEFAULT_TASKS_EXPORT_AGENT_NAME = exports.DEFAULT_SENDER_EMAIL = exports.TRANSACTION_CANCELED_STORAGE_PERIOD_IN_DAYS = exports.TRANSACTION_CONFIRMED_STORAGE_PERIOD_IN_DAYS = exports.ASSET_TRANSACTION_STORAGE_PERIOD_IN_DAYS = exports.MAX_NUM_CREDIT_CARD_PAYMENT_METHOD = exports.ABORTED_TASKS_WITHOUT_REPORT = exports.MAXIMUM_RESERVATION_GRACE_PERIOD_IN_DAYS = exports.TRIGGER_WEBHOOK_RETRY_INTERVAL_IN_MS = exports.TRIGGER_WEBHOOK_MAX_RETRY_COUNT = void 0;
|
|
4
4
|
const factory = require("./factory");
|
|
5
5
|
const transactionWebhookUrls = (typeof process.env.INFORM_TRANSACTION_URL === 'string')
|
|
6
6
|
? process.env.INFORM_TRANSACTION_URL.split(' ')
|
|
@@ -68,6 +68,7 @@ exports.USE_CHECK_RESOURCE_TASK = process.env.USE_CHECK_RESOURCE_TASK === '1';
|
|
|
68
68
|
exports.USE_OPTIMIZE_RESERVATION_EXCEPTIONS = (typeof process.env.USE_OPTIMIZE_RESERVATION_EXCEPTIONS === 'string')
|
|
69
69
|
? process.env.USE_OPTIMIZE_RESERVATION_EXCEPTIONS.split(' ')
|
|
70
70
|
: [];
|
|
71
|
+
exports.USE_OPTIMIZE_INFORM_EVENT = process.env.USE_OPTIMIZE_INFORM_EVENT === '1';
|
|
71
72
|
exports.MONGO_MAX_TIME_MS = (typeof process.env.MONGO_MAX_TIME_MS === 'string')
|
|
72
73
|
? Number(process.env.MONGO_MAX_TIME_MS)
|
|
73
74
|
// tslint:disable-next-line:no-magic-numbers
|
package/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/credential-providers": "3.433.0",
|
|
13
|
-
"@chevre/factory": "4.364.0
|
|
14
|
-
"@cinerino/sdk": "5.
|
|
13
|
+
"@chevre/factory": "4.364.0",
|
|
14
|
+
"@cinerino/sdk": "5.15.0",
|
|
15
15
|
"@motionpicture/coa-service": "9.4.0",
|
|
16
16
|
"@motionpicture/gmo-service": "5.3.0",
|
|
17
17
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"postversion": "git push origin --tags",
|
|
111
111
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
112
112
|
},
|
|
113
|
-
"version": "21.27.0
|
|
113
|
+
"version": "21.27.0"
|
|
114
114
|
}
|