@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
|
@@ -7,7 +7,7 @@ exports.call = call;
|
|
|
7
7
|
const coa_service_1 = require("@motionpicture/coa-service");
|
|
8
8
|
const moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
9
9
|
const factory_1 = require("../../factory");
|
|
10
|
-
const
|
|
10
|
+
const update_1 = require("../../repo/action/update");
|
|
11
11
|
const categoryCode_1 = require("../../repo/categoryCode");
|
|
12
12
|
const creativeWork_1 = require("../../repo/creativeWork");
|
|
13
13
|
const credentials_1 = require("../../repo/credentials");
|
|
@@ -53,7 +53,7 @@ function call(params) {
|
|
|
53
53
|
...(credentialsRepo !== undefined) ? { credentialsRepo } : undefined
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
const updateActionRepo = new
|
|
56
|
+
const updateActionRepo = new update_1.UpdateActionRepo(connection);
|
|
57
57
|
try {
|
|
58
58
|
const masterService = new coa_service_1.COA.service.Master({
|
|
59
59
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
@@ -66,7 +66,9 @@ function call(params) {
|
|
|
66
66
|
object,
|
|
67
67
|
sameAs: { id: params.id }
|
|
68
68
|
})({
|
|
69
|
-
|
|
69
|
+
actions: {
|
|
70
|
+
update: updateActionRepo
|
|
71
|
+
},
|
|
70
72
|
categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
|
|
71
73
|
creativeWork: new creativeWork_1.CreativeWorkRepo(connection),
|
|
72
74
|
eventSeries: new eventSeries_1.EventSeriesRepo(connection),
|
|
@@ -80,7 +82,9 @@ function call(params) {
|
|
|
80
82
|
object,
|
|
81
83
|
sameAs: { id: params.id }
|
|
82
84
|
})({
|
|
83
|
-
|
|
85
|
+
actions: {
|
|
86
|
+
update: updateActionRepo
|
|
87
|
+
},
|
|
84
88
|
categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
|
|
85
89
|
creativeWork: new creativeWork_1.CreativeWorkRepo(connection),
|
|
86
90
|
event: new event_1.EventRepo(connection),
|
|
@@ -132,7 +136,7 @@ function syncEventSeries(params) {
|
|
|
132
136
|
targetCollection: { typeOf: factory_1.factory.eventType.ScreeningEventSeries },
|
|
133
137
|
sameAs: { id: params.sameAs.id, typeOf: 'Task' }
|
|
134
138
|
};
|
|
135
|
-
const action = await repos.
|
|
139
|
+
const action = await repos.actions.update.startUpdateAction(actionAttributes);
|
|
136
140
|
let saveResult;
|
|
137
141
|
try {
|
|
138
142
|
const movieTheater = (await repos.movieTheater.projectFields({
|
|
@@ -168,7 +172,7 @@ function syncEventSeries(params) {
|
|
|
168
172
|
}
|
|
169
173
|
catch (error) {
|
|
170
174
|
try {
|
|
171
|
-
await repos.
|
|
175
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: action.typeOf, id: action.id, error });
|
|
172
176
|
}
|
|
173
177
|
catch (__) {
|
|
174
178
|
// no op
|
|
@@ -181,7 +185,7 @@ function syncEventSeries(params) {
|
|
|
181
185
|
typeOf: eventSeries.typeOf
|
|
182
186
|
};
|
|
183
187
|
});
|
|
184
|
-
await repos.
|
|
188
|
+
await repos.actions.update.completeUpdateAction({ typeOf: action.typeOf, id: action.id, result });
|
|
185
189
|
};
|
|
186
190
|
}
|
|
187
191
|
function syncEvents(params) {
|
|
@@ -206,7 +210,7 @@ function syncEvents(params) {
|
|
|
206
210
|
targetCollection: { typeOf: factory_1.factory.eventType.ScreeningEvent },
|
|
207
211
|
sameAs: { id: params.sameAs.id, typeOf: 'Task' }
|
|
208
212
|
};
|
|
209
|
-
const action = await repos.
|
|
213
|
+
const action = await repos.actions.update.startUpdateAction(actionAttributes);
|
|
210
214
|
let saveResult;
|
|
211
215
|
try {
|
|
212
216
|
const movieTheater = (await repos.movieTheater.projectFields({
|
|
@@ -288,7 +292,7 @@ function syncEvents(params) {
|
|
|
288
292
|
}
|
|
289
293
|
catch (error) {
|
|
290
294
|
try {
|
|
291
|
-
await repos.
|
|
295
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: action.typeOf, id: action.id, error });
|
|
292
296
|
}
|
|
293
297
|
catch (__) {
|
|
294
298
|
// no op
|
|
@@ -301,6 +305,6 @@ function syncEvents(params) {
|
|
|
301
305
|
typeOf: event.typeOf
|
|
302
306
|
};
|
|
303
307
|
});
|
|
304
|
-
await repos.
|
|
308
|
+
await repos.actions.update.completeUpdateAction({ typeOf: action.typeOf, id: action.id, result });
|
|
305
309
|
};
|
|
306
310
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.call = call;
|
|
4
|
-
const
|
|
4
|
+
const inform_1 = require("../../repo/action/inform");
|
|
5
5
|
const potentialAction_1 = require("../../repo/potentialAction");
|
|
6
6
|
const setting_1 = require("../../repo/setting");
|
|
7
7
|
const notification_1 = require("../notification");
|
|
@@ -14,7 +14,9 @@ function call(params) {
|
|
|
14
14
|
...params.data,
|
|
15
15
|
project: { id: params.project.id }
|
|
16
16
|
})({
|
|
17
|
-
|
|
17
|
+
actions: {
|
|
18
|
+
inform: new inform_1.InformActionRepo(connection)
|
|
19
|
+
},
|
|
18
20
|
potentialAction: new potentialAction_1.PotentialActionRepo(connection),
|
|
19
21
|
setting: new setting_1.SettingRepo(connection)
|
|
20
22
|
});
|
|
@@ -2,7 +2,7 @@ import { factory } from '../../factory';
|
|
|
2
2
|
import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
3
3
|
import type { AccountingReportRepo } from '../../repo/accountingReport';
|
|
4
4
|
import type { ActionRepo } from '../../repo/action';
|
|
5
|
-
import type { UpdateActionRepo } from '../../repo/
|
|
5
|
+
import type { UpdateActionRepo } from '../../repo/action/update';
|
|
6
6
|
import type { AdminTransactionRepo } from '../../repo/adminTransaction';
|
|
7
7
|
import type { AssetTransactionRepo } from '../../repo/assetTransaction';
|
|
8
8
|
import type { NoteRepo } from '../../repo/note';
|
|
@@ -14,7 +14,9 @@ interface IDeleteTransactionRepos {
|
|
|
14
14
|
acceptedOffer: AcceptedOfferRepo;
|
|
15
15
|
accountingReport: AccountingReportRepo;
|
|
16
16
|
action: ActionRepo;
|
|
17
|
-
|
|
17
|
+
actions: {
|
|
18
|
+
update: UpdateActionRepo;
|
|
19
|
+
};
|
|
18
20
|
adminTransaction: AdminTransactionRepo;
|
|
19
21
|
assetTransaction: AssetTransactionRepo;
|
|
20
22
|
note: NoteRepo;
|
|
@@ -71,7 +71,7 @@ function deleteTransactionById(params) {
|
|
|
71
71
|
let deletedReservationNumbers = [];
|
|
72
72
|
let deleteActionResult;
|
|
73
73
|
let deleteOrderResult;
|
|
74
|
-
const action = await repos.
|
|
74
|
+
const action = await repos.actions.update.startUpdateAction(actionAttributes);
|
|
75
75
|
try {
|
|
76
76
|
const transactionTypeOf = transaction.typeOf;
|
|
77
77
|
switch (transactionTypeOf) {
|
|
@@ -146,7 +146,7 @@ function deleteTransactionById(params) {
|
|
|
146
146
|
}
|
|
147
147
|
catch (error) {
|
|
148
148
|
try {
|
|
149
|
-
await repos.
|
|
149
|
+
await repos.actions.update.giveUpUpdateAction({ typeOf: action.typeOf, id: action.id, error });
|
|
150
150
|
}
|
|
151
151
|
catch (__) {
|
|
152
152
|
// 失敗したら仕方ない
|
|
@@ -166,6 +166,6 @@ function deleteTransactionById(params) {
|
|
|
166
166
|
deleteOrderResult // 2026-07-10~
|
|
167
167
|
// ...(deleteMessagessResult !== undefined) ? { deleteMessagessResult } : undefined
|
|
168
168
|
};
|
|
169
|
-
await repos.
|
|
169
|
+
await repos.actions.update.completeUpdateAction({ typeOf: action.typeOf, id: action.id, result: actionResult });
|
|
170
170
|
};
|
|
171
171
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.1090.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.1090.0",
|
|
14
|
-
"@chevre/factory": "10.3.0-alpha.
|
|
14
|
+
"@chevre/factory": "10.3.0-alpha.6",
|
|
15
15
|
"@motionpicture/coa-service": "10.0.0",
|
|
16
16
|
"@motionpicture/gmo-service": "6.1.0-alpha.0",
|
|
17
17
|
"@sendgrid/client": "8.1.4",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"postversion": "git push origin --tags",
|
|
89
89
|
"prepublishOnly": "npm run clean && npm run build"
|
|
90
90
|
},
|
|
91
|
-
"version": "26.0.0-alpha.
|
|
91
|
+
"version": "26.0.0-alpha.30"
|
|
92
92
|
}
|