@chevre/domain 23.2.0-alpha.29 → 23.2.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/repo/task.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +1 -1
- package/lib/chevre/service/task/onResourceDeleted.d.ts +6 -0
- package/lib/chevre/service/task/onResourceDeleted.js +58 -0
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +1 -7
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +6 -5
- package/lib/chevre/service/task/onResourceUpdated.js +4 -2
- package/lib/chevre/service/taskHandler.js +1 -0
- package/package.json +2 -2
|
@@ -34,7 +34,7 @@ type ICreatingTask = Pick<factory.task.IAttributes<factory.taskName>, 'data' | '
|
|
|
34
34
|
export declare class TaskRepo {
|
|
35
35
|
readonly taskModel: IModel;
|
|
36
36
|
constructor(connection: Connection);
|
|
37
|
-
static CREATE_MONGO_CONDITIONS(params: factory.task.ISearchConditions): FilterQuery<import("@chevre/factory/lib/task").ITask | import("@chevre/factory/lib/task/confirmMoneyTransfer").ITask | import("@chevre/factory/lib/task/confirmRegisterService").ITask | import("@chevre/factory/lib/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").ITask | import("@chevre/factory/lib/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/task/createAccountingReport").ITask | import("@chevre/factory/lib/task/createEvent").ITask | import("@chevre/factory/lib/task/deletePerson").ITask | import("@chevre/factory/lib/task/deleteTransaction").ITask | import("@chevre/factory/lib/task/givePointAward").ITask | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/task/onEventChanged").ITask | import("@chevre/factory/lib/task/onResourceUpdated").ITask | import("@chevre/factory/lib/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/task/placeOrder").ITask | import("@chevre/factory/lib/task/returnOrder").ITask | import("@chevre/factory/lib/task/returnMoneyTransfer").ITask | import("@chevre/factory/lib/task/returnPayTransaction").ITask | import("@chevre/factory/lib/task/returnPointAward").ITask | import("@chevre/factory/lib/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/task/sendEmailMessage").ITask | import("@chevre/factory/lib/task/sendOrder").ITask | import("@chevre/factory/lib/task/triggerWebhook").ITask | import("@chevre/factory/lib/task/useReservation").ITask | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").ITask | import("@chevre/factory/lib/task/voidPayTransaction").ITask | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").ITask | import("@chevre/factory/lib/task/voidReserveTransaction").ITask>[];
|
|
37
|
+
static CREATE_MONGO_CONDITIONS(params: factory.task.ISearchConditions): FilterQuery<import("@chevre/factory/lib/task").ITask | import("@chevre/factory/lib/task/confirmMoneyTransfer").ITask | import("@chevre/factory/lib/task/confirmRegisterService").ITask | import("@chevre/factory/lib/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").ITask | import("@chevre/factory/lib/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/task/createAccountingReport").ITask | import("@chevre/factory/lib/task/createEvent").ITask | import("@chevre/factory/lib/task/deletePerson").ITask | import("@chevre/factory/lib/task/deleteTransaction").ITask | import("@chevre/factory/lib/task/givePointAward").ITask | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/task/onEventChanged").ITask | import("@chevre/factory/lib/task/onResourceDeleted").ITask | import("@chevre/factory/lib/task/onResourceUpdated").ITask | import("@chevre/factory/lib/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/task/placeOrder").ITask | import("@chevre/factory/lib/task/returnOrder").ITask | import("@chevre/factory/lib/task/returnMoneyTransfer").ITask | import("@chevre/factory/lib/task/returnPayTransaction").ITask | import("@chevre/factory/lib/task/returnPointAward").ITask | import("@chevre/factory/lib/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/task/sendEmailMessage").ITask | import("@chevre/factory/lib/task/sendOrder").ITask | import("@chevre/factory/lib/task/triggerWebhook").ITask | import("@chevre/factory/lib/task/useReservation").ITask | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").ITask | import("@chevre/factory/lib/task/voidPayTransaction").ITask | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").ITask | import("@chevre/factory/lib/task/voidReserveTransaction").ITask>[];
|
|
38
38
|
runImmediately(params: Pick<factory.task.IAttributes<factory.taskName>, 'data' | 'expires' | 'name' | 'project' | 'remainingNumberOfTries' | 'runsAt'> & {
|
|
39
39
|
alternateName?: never;
|
|
40
40
|
identifier?: never;
|
|
@@ -7,5 +7,5 @@ import * as factory from '../../../../factory';
|
|
|
7
7
|
*/
|
|
8
8
|
declare function createOnOrderCancelledTasksByTransaction(params: {
|
|
9
9
|
transaction: Pick<factory.transaction.placeOrder.ITransaction, 'id' | 'project' | 'typeOf'>;
|
|
10
|
-
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
|
|
10
|
+
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceDeleted").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
|
|
11
11
|
export { createOnOrderCancelledTasksByTransaction };
|
package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ declare function createInformTasks(params: {
|
|
|
13
13
|
}, setting: Pick<ISetting, 'onOrderStatusChanged'> | null): factory.task.IAttributes<factory.taskName.TriggerWebhook>[];
|
|
14
14
|
declare function createNextSendOrderTasks(params: {
|
|
15
15
|
order: IInTransitOrder;
|
|
16
|
-
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
|
|
16
|
+
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceDeleted").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
|
|
17
17
|
export { createInformTasks, createNextSendOrderTasks, IInTransitOrder };
|
|
@@ -11,5 +11,5 @@ declare function createInformTasks(order: IReturnedOrder, returnOrderAction: IRe
|
|
|
11
11
|
declare function createOnOrderReturnedTasksByTransaction(params: {
|
|
12
12
|
order: Pick<factory.order.IOrder, 'project' | 'typeOf' | 'orderNumber' | 'customer' | 'price' | 'priceCurrency' | 'orderDate'>;
|
|
13
13
|
potentialActions?: factory.action.transfer.returnAction.order.IPotentialActions;
|
|
14
|
-
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
|
|
14
|
+
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceDeleted").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
|
|
15
15
|
export { createInformTasks, createOnOrderReturnedTasksByTransaction, IReturnAction };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as factory from '../../factory';
|
|
2
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
3
|
+
/**
|
|
4
|
+
* タスク実行関数
|
|
5
|
+
*/
|
|
6
|
+
export declare function call(params: Pick<factory.task.onResourceDeleted.ITask, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.call = call;
|
|
13
|
+
const action_1 = require("../../repo/action");
|
|
14
|
+
const aggregateOffer_1 = require("../../repo/aggregateOffer");
|
|
15
|
+
const categoryCode_1 = require("../../repo/categoryCode");
|
|
16
|
+
const event_1 = require("../../repo/event");
|
|
17
|
+
const eventSeries_1 = require("../../repo/eventSeries");
|
|
18
|
+
const member_1 = require("../../repo/member");
|
|
19
|
+
const note_1 = require("../../repo/note");
|
|
20
|
+
const offerCatalog_1 = require("../../repo/offerCatalog");
|
|
21
|
+
const offerCatalogItem_1 = require("../../repo/offerCatalogItem");
|
|
22
|
+
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
23
|
+
const hasPOS_1 = require("../../repo/place/hasPOS");
|
|
24
|
+
const movieTheater_1 = require("../../repo/place/movieTheater");
|
|
25
|
+
const screeningRoom_1 = require("../../repo/place/screeningRoom");
|
|
26
|
+
const product_1 = require("../../repo/product");
|
|
27
|
+
const productModel_1 = require("../../repo/productModel");
|
|
28
|
+
const productOffer_1 = require("../../repo/productOffer");
|
|
29
|
+
const setting_1 = require("../../repo/setting");
|
|
30
|
+
const task_1 = require("../../repo/task");
|
|
31
|
+
const onResourceDeleted_1 = require("./onResourceUpdated/onResourceDeleted");
|
|
32
|
+
/**
|
|
33
|
+
* タスク実行関数
|
|
34
|
+
*/
|
|
35
|
+
function call(params) {
|
|
36
|
+
return (_a) => __awaiter(this, [_a], void 0, function* ({ connection }) {
|
|
37
|
+
yield (0, onResourceDeleted_1.onResourceDeleted)(params.data)({
|
|
38
|
+
action: new action_1.ActionRepo(connection),
|
|
39
|
+
aggregateOffer: new aggregateOffer_1.AggregateOfferRepo(connection),
|
|
40
|
+
categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
|
|
41
|
+
event: new event_1.EventRepo(connection),
|
|
42
|
+
eventSeries: new eventSeries_1.EventSeriesRepo(connection),
|
|
43
|
+
hasPOS: new hasPOS_1.HasPOSRepo(connection, { id: '' }), // 先の処理で明示的に指定される
|
|
44
|
+
member: new member_1.MemberRepo(connection),
|
|
45
|
+
movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
|
|
46
|
+
note: new note_1.NoteRepo(connection),
|
|
47
|
+
offerCatalog: new offerCatalog_1.OfferCatalogRepo(connection),
|
|
48
|
+
offerCatalogItem: new offerCatalogItem_1.OfferCatalogItemRepo(connection),
|
|
49
|
+
paymentServiceProvider: new paymentServiceProvider_1.PaymentServiceProviderRepo(connection),
|
|
50
|
+
screeningRoom: new screeningRoom_1.ScreeningRoomRepo(connection),
|
|
51
|
+
product: new product_1.ProductRepo(connection),
|
|
52
|
+
productModel: new productModel_1.ProductModelRepo(connection),
|
|
53
|
+
productOffer: new productOffer_1.ProductOfferRepo(connection),
|
|
54
|
+
setting: new setting_1.SettingRepo(connection),
|
|
55
|
+
task: new task_1.TaskRepo(connection)
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
|
-
import type { AccountTitleRepo } from '../../../repo/accountTitle';
|
|
3
2
|
import type { ActionRepo } from '../../../repo/action';
|
|
4
3
|
import type { AggregateOfferRepo } from '../../../repo/aggregateOffer';
|
|
5
4
|
import type { CategoryCodeRepo } from '../../../repo/categoryCode';
|
|
6
|
-
import type { CreativeWorkRepo } from '../../../repo/creativeWork';
|
|
7
5
|
import type { EventRepo } from '../../../repo/event';
|
|
8
6
|
import type { EventSeriesRepo } from '../../../repo/eventSeries';
|
|
9
7
|
import type { MemberRepo } from '../../../repo/member';
|
|
10
8
|
import type { NoteRepo } from '../../../repo/note';
|
|
11
|
-
import type { OfferRepo } from '../../../repo/offer/unitPriceInCatalog';
|
|
12
9
|
import type { OfferCatalogRepo } from '../../../repo/offerCatalog';
|
|
13
10
|
import type { OfferCatalogItemRepo } from '../../../repo/offerCatalogItem';
|
|
14
11
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
@@ -20,12 +17,10 @@ import type { ProductModelRepo } from '../../../repo/productModel';
|
|
|
20
17
|
import type { ProductOfferRepo } from '../../../repo/productOffer';
|
|
21
18
|
import type { SettingRepo } from '../../../repo/setting';
|
|
22
19
|
import type { TaskRepo } from '../../../repo/task';
|
|
23
|
-
export declare function onResourceDeleted(params: factory.task.
|
|
24
|
-
accountTitle: AccountTitleRepo;
|
|
20
|
+
export declare function onResourceDeleted(params: factory.task.onResourceDeleted.IData): (repos: {
|
|
25
21
|
action: ActionRepo;
|
|
26
22
|
aggregateOffer: AggregateOfferRepo;
|
|
27
23
|
categoryCode: CategoryCodeRepo;
|
|
28
|
-
creativeWork: CreativeWorkRepo;
|
|
29
24
|
event: EventRepo;
|
|
30
25
|
eventSeries: EventSeriesRepo;
|
|
31
26
|
hasPOS: HasPOSRepo;
|
|
@@ -33,7 +28,6 @@ export declare function onResourceDeleted(params: factory.task.onResourceUpdated
|
|
|
33
28
|
movieTheater: MovieTheaterRepo;
|
|
34
29
|
note: NoteRepo;
|
|
35
30
|
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
36
|
-
offer: OfferRepo;
|
|
37
31
|
offerCatalog: OfferCatalogRepo;
|
|
38
32
|
offerCatalogItem: OfferCatalogItemRepo;
|
|
39
33
|
screeningRoom: ScreeningRoomRepo;
|
|
@@ -22,9 +22,10 @@ function onResourceDeleted(params) {
|
|
|
22
22
|
const useInform = params.useInform === true
|
|
23
23
|
&& Array.isArray(useInformResourceTypes) && useInformResourceTypes.includes(params.typeOf);
|
|
24
24
|
const isDeleted = params.isDeleted === true;
|
|
25
|
+
const resourceType = params.typeOf;
|
|
25
26
|
if (isDeleted) {
|
|
26
27
|
if (useInform) {
|
|
27
|
-
switch (
|
|
28
|
+
switch (resourceType) {
|
|
28
29
|
case 'POS':
|
|
29
30
|
yield (0, onHasPOSUpdated_1.createInformHasPOSTasks)({
|
|
30
31
|
project: { id: params.project.id },
|
|
@@ -36,7 +37,7 @@ function onResourceDeleted(params) {
|
|
|
36
37
|
// no op
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
switch (
|
|
40
|
+
switch (resourceType) {
|
|
40
41
|
case 'POS':
|
|
41
42
|
break;
|
|
42
43
|
case factory.eventType.ScreeningEventSeries:
|
|
@@ -78,7 +79,7 @@ function onResourceDeleted(params) {
|
|
|
78
79
|
yield (0, syncOfferCatalog_1.syncOfferCatalog)({
|
|
79
80
|
project: { id: params.project.id },
|
|
80
81
|
ids: params.id,
|
|
81
|
-
typeOf:
|
|
82
|
+
typeOf: resourceType,
|
|
82
83
|
isDeleted: true,
|
|
83
84
|
isOfferCatalogItem: params.isOfferCatalogItem === true
|
|
84
85
|
})(repos);
|
|
@@ -91,7 +92,7 @@ function onResourceDeleted(params) {
|
|
|
91
92
|
yield deleteResourcesByProduct({
|
|
92
93
|
project: { id: params.project.id },
|
|
93
94
|
ids: params.id,
|
|
94
|
-
typeOf:
|
|
95
|
+
typeOf: resourceType
|
|
95
96
|
})(repos);
|
|
96
97
|
break;
|
|
97
98
|
// 区分削除に対応(2024-04-18~)
|
|
@@ -104,7 +105,7 @@ function onResourceDeleted(params) {
|
|
|
104
105
|
break;
|
|
105
106
|
default:
|
|
106
107
|
// no op
|
|
107
|
-
throw new factory.errors.NotImplemented(`${
|
|
108
|
+
throw new factory.errors.NotImplemented(`${resourceType} onDeleted not implemented`);
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
});
|
|
@@ -36,7 +36,7 @@ const onAggregateOfferUpdated_1 = require("./onResourceUpdated/onAggregateOfferU
|
|
|
36
36
|
const onCategoryCodeUpdated_1 = require("./onResourceUpdated/onCategoryCodeUpdated");
|
|
37
37
|
const onHasPOSUpdated_1 = require("./onResourceUpdated/onHasPOSUpdated");
|
|
38
38
|
const onOfferCatalogUpdated_1 = require("./onResourceUpdated/onOfferCatalogUpdated");
|
|
39
|
-
|
|
39
|
+
// import { onResourceDeleted } from './onResourceUpdated/onResourceDeleted';
|
|
40
40
|
/**
|
|
41
41
|
* タスク実行関数
|
|
42
42
|
*/
|
|
@@ -73,7 +73,9 @@ function onResourceUpdated(params) {
|
|
|
73
73
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
74
74
|
const isDeleted = params.isDeleted === true;
|
|
75
75
|
if (isDeleted) {
|
|
76
|
-
|
|
76
|
+
// migrate to onResourceDeleted task(2026-01-16~)
|
|
77
|
+
throw new factory.errors.Argument('isDeleted', 'isDeleted must be false');
|
|
78
|
+
// await onResourceDeleted(params)(repos);
|
|
77
79
|
}
|
|
78
80
|
else {
|
|
79
81
|
const setting = yield repos.setting.findOne({ project: { id: { $eq: '*' } } }, ['onResourceUpdated', 'useInformResourceTypes']);
|
|
@@ -59,6 +59,7 @@ function executeTask(task, next) {
|
|
|
59
59
|
case factory.taskName.ImportOffersFromCOA:
|
|
60
60
|
case factory.taskName.InvalidatePaymentUrl:
|
|
61
61
|
case factory.taskName.OnAuthorizationCreated:
|
|
62
|
+
case factory.taskName.OnResourceDeleted:
|
|
62
63
|
case factory.taskName.Pay:
|
|
63
64
|
case factory.taskName.PublishPaymentUrl:
|
|
64
65
|
case factory.taskName.Refund:
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.600.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.600.0",
|
|
14
|
-
"@chevre/factory": "5.4.0-alpha.
|
|
14
|
+
"@chevre/factory": "5.4.0-alpha.19",
|
|
15
15
|
"@cinerino/sdk": "12.13.0",
|
|
16
16
|
"@motionpicture/coa-service": "9.6.0",
|
|
17
17
|
"@motionpicture/gmo-service": "5.4.0-alpha.1",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"postversion": "git push origin --tags",
|
|
117
117
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
118
118
|
},
|
|
119
|
-
"version": "23.2.0-alpha.
|
|
119
|
+
"version": "23.2.0-alpha.30"
|
|
120
120
|
}
|