@chevre/domain 26.0.0-alpha.29 → 26.0.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/action/actionProcess.d.ts +1 -1
- package/lib/chevre/repo/action/inform.d.ts +45 -0
- package/lib/chevre/repo/action/inform.js +159 -0
- package/lib/chevre/repo/{updateAction.d.ts → action/update.d.ts} +2 -2
- package/lib/chevre/repo/{updateAction.js → action/update.js} +4 -4
- package/lib/chevre/repo/action.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/action/inform.d.ts +13 -0
- package/lib/chevre/repo/mongoose/schemas/action/inform.js +81 -0
- package/lib/chevre/repo/mongoose/schemas/{updateAction.d.ts → action/update.d.ts} +3 -3
- package/lib/chevre/repo/mongoose/schemas/{updateAction.js → action/update.js} +4 -4
- package/lib/chevre/repository.d.ts +5 -5
- package/lib/chevre/repository.js +12 -12
- package/lib/chevre/service/event/processUpdateMovieTheater.d.ts +4 -2
- package/lib/chevre/service/event/processUpdateMovieTheater.js +3 -3
- package/lib/chevre/service/event.d.ts +4 -2
- package/lib/chevre/service/event.js +3 -3
- package/lib/chevre/service/notification/triggerWebhook.d.ts +4 -2
- package/lib/chevre/service/notification/triggerWebhook.js +5 -16
- package/lib/chevre/service/offer/onEventChanged.js +0 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered/factory.js +2 -4
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.js +2 -4
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.js +2 -4
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.js +5 -7
- package/lib/chevre/service/order/onOrderUpdated/factory.js +0 -3
- package/lib/chevre/service/task/deleteTransaction.js +4 -2
- package/lib/chevre/service/task/importEventsFromCOA.js +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByAggregateOffer.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByAggregateOffer.js +3 -3
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByEventSeries.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByEventSeries.js +3 -3
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByMovieTheater.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByMovieTheater.js +3 -3
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByOfferCatalog.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByOfferCatalog.js +3 -3
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByProduct.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByProduct.js +3 -3
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByRoom.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByRoom.js +3 -3
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesBySeller.d.ts +4 -2
- package/lib/chevre/service/task/onResourceDeleted/deleteResourcesBySeller.js +3 -3
- package/lib/chevre/service/task/onResourceDeleted.js +4 -2
- package/lib/chevre/service/task/onResourceUpdated/onAggregateOfferUpdated.js +0 -1
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +0 -1
- package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.js +0 -1
- package/lib/chevre/service/task/onResourceUpdated.js +0 -8
- package/lib/chevre/service/task/syncResourcesFromCOA.js +14 -10
- package/lib/chevre/service/task/triggerWebhook.js +4 -2
- package/lib/chevre/service/taskHandler/onOperationFailed/informTaskIfNeeded.js +0 -1
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +4 -2
- package/lib/chevre/service/transaction/deleteTransaction.js +3 -3
- package/package.json +2 -2
|
@@ -203,7 +203,6 @@ function createInformTasks(params, setting) {
|
|
|
203
203
|
const informActionAttributes = {
|
|
204
204
|
object: event4inform,
|
|
205
205
|
recipient: {
|
|
206
|
-
id: '',
|
|
207
206
|
name: String(informEvent.recipient?.name),
|
|
208
207
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
209
208
|
// url: informUrl // discontinue(2025-02-13~)
|
|
@@ -257,7 +256,6 @@ function createInform2aggTasks(params, setting) {
|
|
|
257
256
|
const informActionAttributes = {
|
|
258
257
|
object: informObject,
|
|
259
258
|
recipient: {
|
|
260
|
-
id: '',
|
|
261
259
|
name: String(informEvent.recipient?.name),
|
|
262
260
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
263
261
|
// url: informUrl // discontinue(2025-02-13~)
|
|
@@ -12,16 +12,14 @@ setting) {
|
|
|
12
12
|
const order4inform = creteOrder4inform(order);
|
|
13
13
|
const informIdentifier = `${factory_1.factory.order.OrderType.Order}:${order4inform.orderNumber}:${order4inform.orderStatus}`;
|
|
14
14
|
if (Array.isArray(informOrder) && informOrder.length > 0) {
|
|
15
|
-
let recipientId = '';
|
|
16
|
-
recipientId = order.customer.id;
|
|
15
|
+
// let recipientId = '';
|
|
16
|
+
// recipientId = order.customer.id;
|
|
17
17
|
informOrder.forEach((informOrderParams) => {
|
|
18
18
|
if (typeof informOrderParams.recipient?.url === 'string') {
|
|
19
19
|
const informActionAttributes = {
|
|
20
20
|
about: { orderNumber: order.orderNumber, typeOf: factory_1.factory.order.OrderType.Order },
|
|
21
21
|
object: order4inform,
|
|
22
22
|
recipient: {
|
|
23
|
-
// url: informOrderParams.recipient.url, // discontinue(2025-02-13~)
|
|
24
|
-
id: recipientId,
|
|
25
23
|
name: informOrderParams.recipient?.name,
|
|
26
24
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
27
25
|
},
|
|
@@ -25,16 +25,14 @@ setting) {
|
|
|
25
25
|
const order4inform = creteOrder4inform(order);
|
|
26
26
|
const informIdentifier = `${factory_1.factory.order.OrderType.Order}:${order4inform.orderNumber}:${order4inform.orderStatus}:${order.acceptedOffers.page}`;
|
|
27
27
|
if (Array.isArray(informOrder) && informOrder.length > 0) {
|
|
28
|
-
let recipientId = '';
|
|
29
|
-
recipientId = order.customer.id;
|
|
28
|
+
// let recipientId = '';
|
|
29
|
+
// recipientId = order.customer.id;
|
|
30
30
|
informOrder.forEach((informOrderParams) => {
|
|
31
31
|
if (typeof informOrderParams.recipient?.url === 'string') {
|
|
32
32
|
const informActionAttributes = {
|
|
33
33
|
about: { orderNumber: order.orderNumber, typeOf: factory_1.factory.order.OrderType.Order },
|
|
34
34
|
object: order4inform,
|
|
35
35
|
recipient: {
|
|
36
|
-
// url: informOrderParams.recipient.url, // discontinue(2025-02-13~)
|
|
37
|
-
id: recipientId,
|
|
38
36
|
name: informOrderParams.recipient?.name,
|
|
39
37
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
40
38
|
},
|
|
@@ -15,16 +15,14 @@ function createInformProcessingOrderTasks(order, setting) {
|
|
|
15
15
|
const order4inform = creteProcessingOrderAsNotification(order);
|
|
16
16
|
const informIdentifier = `${factory_1.factory.order.OrderType.Order}:${order4inform.orderNumber}:${order4inform.orderStatus}`;
|
|
17
17
|
if (Array.isArray(informOrder) && informOrder.length > 0) {
|
|
18
|
-
let recipientId = '';
|
|
19
|
-
recipientId = order.customer.id;
|
|
18
|
+
// let recipientId = '';
|
|
19
|
+
// recipientId = order.customer.id;
|
|
20
20
|
informOrder.forEach((informOrderParams) => {
|
|
21
21
|
if (typeof informOrderParams.recipient?.url === 'string') {
|
|
22
22
|
const informActionAttributes = {
|
|
23
23
|
about: { orderNumber: order.orderNumber, typeOf: factory_1.factory.order.OrderType.Order },
|
|
24
24
|
object: order4inform,
|
|
25
25
|
recipient: {
|
|
26
|
-
// url: informOrderParams.recipient.url, // discontinue(2025-02-13~)
|
|
27
|
-
id: recipientId,
|
|
28
26
|
name: informOrderParams.recipient?.name,
|
|
29
27
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
30
28
|
},
|
|
@@ -16,19 +16,17 @@ function createInformTasks(order, returnOrderAction, setting) {
|
|
|
16
16
|
// informObject = createOrder4inform(order);
|
|
17
17
|
// }
|
|
18
18
|
if (Array.isArray(informOrder) && informOrder.length > 0) {
|
|
19
|
-
let recipientId = '';
|
|
20
|
-
recipientId = order.customer.id;
|
|
21
|
-
if (typeof order.returner?.id === 'string') {
|
|
22
|
-
|
|
23
|
-
}
|
|
19
|
+
// let recipientId = '';
|
|
20
|
+
// recipientId = order.customer.id;
|
|
21
|
+
// if (typeof order.returner?.id === 'string') {
|
|
22
|
+
// recipientId = order.returner.id;
|
|
23
|
+
// }
|
|
24
24
|
informOrder.forEach((informOrderParams) => {
|
|
25
25
|
if (typeof informOrderParams.recipient?.url === 'string') {
|
|
26
26
|
const informActionAttributes = {
|
|
27
27
|
about: { orderNumber: order.orderNumber, typeOf: factory_1.factory.order.OrderType.Order },
|
|
28
28
|
object: informObject,
|
|
29
29
|
recipient: {
|
|
30
|
-
// url: informOrderParams.recipient.url, // discontinue(2025-02-13~)
|
|
31
|
-
id: recipientId,
|
|
32
30
|
name: informOrderParams.recipient?.name,
|
|
33
31
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
34
32
|
},
|
|
@@ -10,15 +10,12 @@ setting) {
|
|
|
10
10
|
const informTasks = [];
|
|
11
11
|
const order4inform = creteOrder4inform(order);
|
|
12
12
|
if (Array.isArray(informOrder) && informOrder.length > 0) {
|
|
13
|
-
const recipientId = '';
|
|
14
13
|
informOrder.forEach((informOrderParams) => {
|
|
15
14
|
if (typeof informOrderParams.recipient?.url === 'string') {
|
|
16
15
|
const informActionAttributes = {
|
|
17
16
|
about: { orderNumber: order4inform.orderNumber, typeOf: factory_1.factory.order.OrderType.Order },
|
|
18
17
|
object: order4inform,
|
|
19
18
|
recipient: {
|
|
20
|
-
// url: informOrderParams.recipient.url, // discontinue(2025-02-13~)
|
|
21
|
-
id: recipientId,
|
|
22
19
|
name: informOrderParams.recipient?.name,
|
|
23
20
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
24
21
|
},
|
|
@@ -4,7 +4,7 @@ exports.call = call;
|
|
|
4
4
|
const acceptedOffer_1 = require("../../repo/acceptedOffer");
|
|
5
5
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
6
6
|
const action_1 = require("../../repo/action");
|
|
7
|
-
const
|
|
7
|
+
const update_1 = require("../../repo/action/update");
|
|
8
8
|
const adminTransaction_1 = require("../../repo/adminTransaction");
|
|
9
9
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
10
10
|
const note_1 = require("../../repo/note");
|
|
@@ -23,7 +23,9 @@ function call(params) {
|
|
|
23
23
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
24
24
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
25
25
|
action: new action_1.ActionRepo(connection),
|
|
26
|
-
|
|
26
|
+
actions: {
|
|
27
|
+
update: new update_1.UpdateActionRepo(connection),
|
|
28
|
+
},
|
|
27
29
|
adminTransaction: new adminTransaction_1.AdminTransactionRepo(connection),
|
|
28
30
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
29
31
|
note: new note_1.NoteRepo(connection),
|
|
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.call = call;
|
|
37
37
|
const coa_service_1 = require("@motionpicture/coa-service");
|
|
38
|
-
const
|
|
38
|
+
const update_1 = require("../../repo/action/update");
|
|
39
39
|
const categoryCode_1 = require("../../repo/categoryCode");
|
|
40
40
|
const creativeWork_1 = require("../../repo/creativeWork");
|
|
41
41
|
const event_1 = require("../../repo/event");
|
|
@@ -71,7 +71,9 @@ function call(params) {
|
|
|
71
71
|
...params.data,
|
|
72
72
|
project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project }
|
|
73
73
|
})({
|
|
74
|
-
|
|
74
|
+
actions: {
|
|
75
|
+
update: new update_1.UpdateActionRepo(connection),
|
|
76
|
+
},
|
|
75
77
|
categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
|
|
76
78
|
creativeWork: new creativeWork_1.CreativeWorkRepo(connection),
|
|
77
79
|
event: new event_1.EventRepo(connection),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UpdateActionRepo } from '../../../repo/
|
|
1
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
2
2
|
import type { OfferCatalogRepo } from '../../../repo/offerCatalog';
|
|
3
3
|
import type { OfferCatalogItemRepo } from '../../../repo/offerCatalogItem';
|
|
4
4
|
export declare function deleteResourcesByAggregateOffer(params: {
|
|
@@ -7,7 +7,9 @@ export declare function deleteResourcesByAggregateOffer(params: {
|
|
|
7
7
|
};
|
|
8
8
|
ids: string[];
|
|
9
9
|
}): (repos: {
|
|
10
|
-
|
|
10
|
+
actions: {
|
|
11
|
+
update: UpdateActionRepo;
|
|
12
|
+
};
|
|
11
13
|
offerCatalog: OfferCatalogRepo;
|
|
12
14
|
offerCatalogItem: OfferCatalogItemRepo;
|
|
13
15
|
}) => Promise<void>;
|
|
@@ -15,7 +15,7 @@ function deleteResourcesByAggregateOffer(params) {
|
|
|
15
15
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
16
16
|
};
|
|
17
17
|
let deleteResult;
|
|
18
|
-
const action = await repos.
|
|
18
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
19
19
|
try {
|
|
20
20
|
// カタログからpullItemListElement
|
|
21
21
|
const updateCatalogResult = await repos.offerCatalog.pullItemListElement({
|
|
@@ -31,14 +31,14 @@ function deleteResourcesByAggregateOffer(params) {
|
|
|
31
31
|
}
|
|
32
32
|
catch (error) {
|
|
33
33
|
try {
|
|
34
|
-
await repos.
|
|
34
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
35
35
|
}
|
|
36
36
|
catch (_) {
|
|
37
37
|
// no op
|
|
38
38
|
}
|
|
39
39
|
throw error;
|
|
40
40
|
}
|
|
41
|
-
await repos.
|
|
41
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UpdateActionRepo } from '../../../repo/
|
|
1
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
2
2
|
import type { EventRepo } from '../../../repo/event';
|
|
3
3
|
export declare function deleteResourcesByEventSeries(params: {
|
|
4
4
|
project: {
|
|
@@ -6,6 +6,8 @@ export declare function deleteResourcesByEventSeries(params: {
|
|
|
6
6
|
};
|
|
7
7
|
ids: string[];
|
|
8
8
|
}): (repos: {
|
|
9
|
-
|
|
9
|
+
actions: {
|
|
10
|
+
update: UpdateActionRepo;
|
|
11
|
+
};
|
|
10
12
|
event: EventRepo;
|
|
11
13
|
}) => Promise<void>;
|
|
@@ -15,7 +15,7 @@ function deleteResourcesByEventSeries(params) {
|
|
|
15
15
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
16
16
|
};
|
|
17
17
|
let deleteResult;
|
|
18
|
-
const action = await repos.
|
|
18
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
19
19
|
try {
|
|
20
20
|
// イベント削除
|
|
21
21
|
const deleteScreeningEventResult = await repos.event.deleteManyBySuperEventId({
|
|
@@ -28,14 +28,14 @@ function deleteResourcesByEventSeries(params) {
|
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
30
|
try {
|
|
31
|
-
await repos.
|
|
31
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
32
32
|
}
|
|
33
33
|
catch (_) {
|
|
34
34
|
// no op
|
|
35
35
|
}
|
|
36
36
|
throw error;
|
|
37
37
|
}
|
|
38
|
-
await repos.
|
|
38
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UpdateActionRepo } from '../../../repo/
|
|
1
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
2
2
|
import type { EventRepo } from '../../../repo/event';
|
|
3
3
|
import type { EventSeriesRepo } from '../../../repo/eventSeries';
|
|
4
4
|
import type { ScreeningRoomRepo } from '../../../repo/place/screeningRoom';
|
|
@@ -8,7 +8,9 @@ export declare function deleteResourcesByMovieTheater(params: {
|
|
|
8
8
|
};
|
|
9
9
|
ids: string[];
|
|
10
10
|
}): (repos: {
|
|
11
|
-
|
|
11
|
+
actions: {
|
|
12
|
+
update: UpdateActionRepo;
|
|
13
|
+
};
|
|
12
14
|
event: EventRepo;
|
|
13
15
|
eventSeries: EventSeriesRepo;
|
|
14
16
|
screeningRoom: ScreeningRoomRepo;
|
|
@@ -15,7 +15,7 @@ function deleteResourcesByMovieTheater(params) {
|
|
|
15
15
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
16
16
|
};
|
|
17
17
|
let deleteResult;
|
|
18
|
-
const action = await repos.
|
|
18
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
19
19
|
try {
|
|
20
20
|
// イベント削除
|
|
21
21
|
const deleteScreeningEventResult = await repos.event.deleteManyBySuperEventLocationId({
|
|
@@ -36,14 +36,14 @@ function deleteResourcesByMovieTheater(params) {
|
|
|
36
36
|
}
|
|
37
37
|
catch (error) {
|
|
38
38
|
try {
|
|
39
|
-
await repos.
|
|
39
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
40
40
|
}
|
|
41
41
|
catch (_) {
|
|
42
42
|
// no op
|
|
43
43
|
}
|
|
44
44
|
throw error;
|
|
45
45
|
}
|
|
46
|
-
await repos.
|
|
46
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UpdateActionRepo } from '../../../repo/
|
|
1
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
2
2
|
import type { AggregateOfferRepo } from '../../../repo/aggregateOffer';
|
|
3
3
|
import type { EventRepo } from '../../../repo/event';
|
|
4
4
|
import type { OfferCatalogRepo } from '../../../repo/offerCatalog';
|
|
@@ -9,7 +9,9 @@ export declare function deleteResourcesByOfferCatalog(params: {
|
|
|
9
9
|
};
|
|
10
10
|
ids: string[];
|
|
11
11
|
}): (repos: {
|
|
12
|
-
|
|
12
|
+
actions: {
|
|
13
|
+
update: UpdateActionRepo;
|
|
14
|
+
};
|
|
13
15
|
aggregateOffer: AggregateOfferRepo;
|
|
14
16
|
event: EventRepo;
|
|
15
17
|
offerCatalog: OfferCatalogRepo;
|
|
@@ -15,7 +15,7 @@ function deleteResourcesByOfferCatalog(params) {
|
|
|
15
15
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
16
16
|
};
|
|
17
17
|
let deleteResult;
|
|
18
|
-
const action = await repos.
|
|
18
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
19
19
|
try {
|
|
20
20
|
// カタログからプロダクト検索
|
|
21
21
|
const productsWithCatalog = await repos.product.projectFields({
|
|
@@ -53,14 +53,14 @@ function deleteResourcesByOfferCatalog(params) {
|
|
|
53
53
|
}
|
|
54
54
|
catch (error) {
|
|
55
55
|
try {
|
|
56
|
-
await repos.
|
|
56
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
57
57
|
}
|
|
58
58
|
catch (_) {
|
|
59
59
|
// no op
|
|
60
60
|
}
|
|
61
61
|
throw error;
|
|
62
62
|
}
|
|
63
|
-
await repos.
|
|
63
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import type { UpdateActionRepo } from '../../../repo/
|
|
2
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
3
3
|
import type { AggregateOfferRepo } from '../../../repo/aggregateOffer';
|
|
4
4
|
import type { EventRepo } from '../../../repo/event';
|
|
5
5
|
import type { NoteRepo } from '../../../repo/note';
|
|
@@ -11,7 +11,9 @@ export declare function deleteResourcesByProduct(params: {
|
|
|
11
11
|
ids: string[];
|
|
12
12
|
typeOf: factory.product.ProductType;
|
|
13
13
|
}): (repos: {
|
|
14
|
-
|
|
14
|
+
actions: {
|
|
15
|
+
update: UpdateActionRepo;
|
|
16
|
+
};
|
|
15
17
|
aggregateOffer: AggregateOfferRepo;
|
|
16
18
|
event: EventRepo;
|
|
17
19
|
note: NoteRepo;
|
|
@@ -15,7 +15,7 @@ function deleteResourcesByProduct(params) {
|
|
|
15
15
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
16
16
|
};
|
|
17
17
|
let deleteResult;
|
|
18
|
-
const action = await repos.
|
|
18
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
19
19
|
try {
|
|
20
20
|
// 興行を設定されたイベント削除
|
|
21
21
|
const deleteEventResult = await repos.event.deleteManyEventsByItemOfferedId({
|
|
@@ -35,14 +35,14 @@ function deleteResourcesByProduct(params) {
|
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
37
|
try {
|
|
38
|
-
await repos.
|
|
38
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
39
39
|
}
|
|
40
40
|
catch (_) {
|
|
41
41
|
// no op
|
|
42
42
|
}
|
|
43
43
|
throw error;
|
|
44
44
|
}
|
|
45
|
-
await repos.
|
|
45
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UpdateActionRepo } from '../../../repo/
|
|
1
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
2
2
|
import type { EventRepo } from '../../../repo/event';
|
|
3
3
|
export declare function deleteResourcesByRoom(params: {
|
|
4
4
|
project: {
|
|
@@ -15,6 +15,8 @@ export declare function deleteResourcesByRoom(params: {
|
|
|
15
15
|
id: string;
|
|
16
16
|
};
|
|
17
17
|
}): (repos: {
|
|
18
|
-
|
|
18
|
+
actions: {
|
|
19
|
+
update: UpdateActionRepo;
|
|
20
|
+
};
|
|
19
21
|
event: EventRepo;
|
|
20
22
|
}) => Promise<void>;
|
|
@@ -16,7 +16,7 @@ function deleteResourcesByRoom(params) {
|
|
|
16
16
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
17
17
|
};
|
|
18
18
|
let deleteResult;
|
|
19
|
-
const action = await repos.
|
|
19
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
20
20
|
try {
|
|
21
21
|
// イベント削除
|
|
22
22
|
const deleteScreeningEventResult = await repos.event.deleteManyEventsByScreeningRoom({
|
|
@@ -30,13 +30,13 @@ function deleteResourcesByRoom(params) {
|
|
|
30
30
|
}
|
|
31
31
|
catch (error) {
|
|
32
32
|
try {
|
|
33
|
-
await repos.
|
|
33
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
34
34
|
}
|
|
35
35
|
catch (_) {
|
|
36
36
|
// no op
|
|
37
37
|
}
|
|
38
38
|
throw error;
|
|
39
39
|
}
|
|
40
|
-
await repos.
|
|
40
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
41
41
|
};
|
|
42
42
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UpdateActionRepo } from '../../../repo/
|
|
1
|
+
import type { UpdateActionRepo } from '../../../repo/action/update';
|
|
2
2
|
import type { EventRepo } from '../../../repo/event';
|
|
3
3
|
import type { EventOfferRepo } from '../../../repo/eventOffer';
|
|
4
4
|
import type { EventSeriesRepo } from '../../../repo/eventSeries';
|
|
@@ -12,7 +12,9 @@ export declare function deleteResourcesBySeller(params: {
|
|
|
12
12
|
};
|
|
13
13
|
ids: string[];
|
|
14
14
|
}): (repos: {
|
|
15
|
-
|
|
15
|
+
actions: {
|
|
16
|
+
update: UpdateActionRepo;
|
|
17
|
+
};
|
|
16
18
|
event: EventRepo;
|
|
17
19
|
eventOffer: EventOfferRepo;
|
|
18
20
|
eventSeries: EventSeriesRepo;
|
|
@@ -15,7 +15,7 @@ function deleteResourcesBySeller(params) {
|
|
|
15
15
|
typeOf: factory_1.factory.actionType.DeleteAction
|
|
16
16
|
};
|
|
17
17
|
let deleteResult;
|
|
18
|
-
const action = await repos.
|
|
18
|
+
const action = await repos.actions.update.startUpdateAction(deleteActionAttributes);
|
|
19
19
|
try {
|
|
20
20
|
// メンバー削除
|
|
21
21
|
const deleteMemberResult = await repos.member.deleteManyByMemberOfId({
|
|
@@ -65,14 +65,14 @@ function deleteResourcesBySeller(params) {
|
|
|
65
65
|
}
|
|
66
66
|
catch (error) {
|
|
67
67
|
try {
|
|
68
|
-
await repos.
|
|
68
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, error });
|
|
69
69
|
}
|
|
70
70
|
catch (_) {
|
|
71
71
|
// no op
|
|
72
72
|
}
|
|
73
73
|
throw error;
|
|
74
74
|
}
|
|
75
|
-
await repos.
|
|
75
|
+
await repos.actions.update.completeUpdateAction({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.call = call;
|
|
4
4
|
const factory_1 = require("../../factory");
|
|
5
|
-
const
|
|
5
|
+
const update_1 = require("../../repo/action/update");
|
|
6
6
|
const aggregateOffer_1 = require("../../repo/aggregateOffer");
|
|
7
7
|
const categoryCode_1 = require("../../repo/categoryCode");
|
|
8
8
|
const event_1 = require("../../repo/event");
|
|
@@ -34,7 +34,9 @@ const syncOfferCatalog_1 = require("./onResourceUpdated/syncOfferCatalog");
|
|
|
34
34
|
function call(params) {
|
|
35
35
|
return async ({ connection }) => {
|
|
36
36
|
await onResourceDeleted(params.data)({
|
|
37
|
-
|
|
37
|
+
actions: {
|
|
38
|
+
update: new update_1.UpdateActionRepo(connection),
|
|
39
|
+
},
|
|
38
40
|
aggregateOffer: new aggregateOffer_1.AggregateOfferRepo(connection),
|
|
39
41
|
categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
|
|
40
42
|
event: new event_1.EventRepo(connection),
|
|
@@ -26,7 +26,6 @@ function createInformOfferTasks(params, setting) {
|
|
|
26
26
|
const informActionAttributes = {
|
|
27
27
|
object: offer4inform,
|
|
28
28
|
recipient: {
|
|
29
|
-
id: '',
|
|
30
29
|
name: String(informResource.recipient?.name),
|
|
31
30
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
32
31
|
// url: informUrl // discontinue(2025-02-13~)
|
|
@@ -44,7 +44,6 @@ function createInformHasPOSTasks(params) {
|
|
|
44
44
|
const informActionAttributes = {
|
|
45
45
|
object: movieTheater4inform,
|
|
46
46
|
recipient: {
|
|
47
|
-
id: '',
|
|
48
47
|
name: String(informResource.recipient?.name),
|
|
49
48
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
50
49
|
// url: informUrl // discontinue(2025-02-13~)
|
|
@@ -32,7 +32,6 @@ function createInformOfferCatalogTasks(params, setting) {
|
|
|
32
32
|
const informActionAttributes = {
|
|
33
33
|
object: offerCatalog4inform,
|
|
34
34
|
recipient: {
|
|
35
|
-
id: '',
|
|
36
35
|
name: String(informResource.recipient?.name),
|
|
37
36
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
38
37
|
// url: informUrl // discontinue(2025-02-13~)
|
|
@@ -198,7 +198,6 @@ function createInformNoteTasks(params, setting) {
|
|
|
198
198
|
const informActionAttributes = {
|
|
199
199
|
object: informObject,
|
|
200
200
|
recipient: {
|
|
201
|
-
id: '',
|
|
202
201
|
name: String(informResource.recipient?.name),
|
|
203
202
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
204
203
|
// url: informUrl // discontinue(2025-02-13~)
|
|
@@ -247,7 +246,6 @@ function createInformMovieTasks(params, setting) {
|
|
|
247
246
|
const informActionAttributes = {
|
|
248
247
|
object: movie4inform,
|
|
249
248
|
recipient: {
|
|
250
|
-
id: '',
|
|
251
249
|
name: String(informResource.recipient?.name),
|
|
252
250
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
253
251
|
// url: informUrl // discontinue(2025-02-13~)
|
|
@@ -298,7 +296,6 @@ function createInformProductTasks(params, setting) {
|
|
|
298
296
|
const informActionAttributes = {
|
|
299
297
|
object: product4inform,
|
|
300
298
|
recipient: {
|
|
301
|
-
id: '',
|
|
302
299
|
name: String(informResource.recipient?.name),
|
|
303
300
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
304
301
|
// url: informUrl // discontinue(2025-02-13~)
|
|
@@ -347,7 +344,6 @@ function createInformCategoryCodeTasks(params, setting) {
|
|
|
347
344
|
const informActionAttributes = {
|
|
348
345
|
object: categoryCode4inform,
|
|
349
346
|
recipient: {
|
|
350
|
-
id: '',
|
|
351
347
|
name: String(informResource.recipient?.name),
|
|
352
348
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
353
349
|
// url: informUrl // discontinue(2025-02-13~)
|
|
@@ -446,7 +442,6 @@ function createInformMovieTheaterTasks(params, setting) {
|
|
|
446
442
|
const informActionAttributes = {
|
|
447
443
|
object: movieTheater4inform,
|
|
448
444
|
recipient: {
|
|
449
|
-
id: '',
|
|
450
445
|
name: String(informResource.recipient?.name),
|
|
451
446
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
452
447
|
// url: informUrl // discontinue(2025-02-13~)
|
|
@@ -509,7 +504,6 @@ function createInformRoomTasks(params, setting) {
|
|
|
509
504
|
const informActionAttributes = {
|
|
510
505
|
object: room4inform,
|
|
511
506
|
recipient: {
|
|
512
|
-
id: '',
|
|
513
507
|
name: String(informResource.recipient?.name),
|
|
514
508
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
515
509
|
},
|
|
@@ -567,7 +561,6 @@ function createInformEntranceGateTasks(params, setting) {
|
|
|
567
561
|
const informActionAttributes = {
|
|
568
562
|
object: entranceGateAsNotification,
|
|
569
563
|
recipient: {
|
|
570
|
-
id: '',
|
|
571
564
|
name: String(informResource.recipient?.name),
|
|
572
565
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
573
566
|
},
|
|
@@ -639,7 +632,6 @@ function createInformAccountTitleTasks(params, setting) {
|
|
|
639
632
|
const informActionAttributes = {
|
|
640
633
|
object: informObject,
|
|
641
634
|
recipient: {
|
|
642
|
-
id: '',
|
|
643
635
|
name: String(informResource.recipient?.name),
|
|
644
636
|
typeOf: factory_1.factory.creativeWorkType.WebApplication
|
|
645
637
|
// url: informUrl // discontinue(2025-02-13~)
|