@chevre/domain 21.6.0-alpha.0 → 21.6.0-alpha.2
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/migrateEventOrganizer.ts +33 -12
- package/lib/chevre/repo/event.d.ts +15 -0
- package/lib/chevre/repo/event.js +12 -0
- package/lib/chevre/repo/offer.d.ts +15 -0
- package/lib/chevre/repo/offer.js +21 -0
- package/lib/chevre/repo/offerCatalog.d.ts +14 -0
- package/lib/chevre/repo/offerCatalog.js +21 -0
- package/lib/chevre/repo/product.d.ts +8 -0
- package/lib/chevre/repo/product.js +9 -0
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +4 -0
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +158 -1
- package/lib/chevre/service/task/onResourceUpdated.js +4 -0
- package/package.json +3 -3
|
@@ -5,7 +5,7 @@ import * as mongoose from 'mongoose';
|
|
|
5
5
|
import { chevre } from '../../../lib/index';
|
|
6
6
|
|
|
7
7
|
// const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
-
|
|
8
|
+
const EXCLUDED_PROJECT_ID = process.env.EXCLUDED_PROJECT_ID;
|
|
9
9
|
|
|
10
10
|
// tslint:disable-next-line:max-func-body-length
|
|
11
11
|
async function main() {
|
|
@@ -17,7 +17,7 @@ async function main() {
|
|
|
17
17
|
const cursor = eventRepo.getCursor(
|
|
18
18
|
{
|
|
19
19
|
// 'project.id': { $eq: project.id },
|
|
20
|
-
|
|
20
|
+
'project.id': { $ne: EXCLUDED_PROJECT_ID },
|
|
21
21
|
typeOf: {
|
|
22
22
|
$in: [
|
|
23
23
|
// chevre.factory.eventType.ScreeningEvent,
|
|
@@ -96,16 +96,16 @@ async function main() {
|
|
|
96
96
|
|
|
97
97
|
if (alreadyMigrated) {
|
|
98
98
|
console.log('already exist...', event.project.id, event.id, event.startDate, organizerId, i);
|
|
99
|
-
if (organizerId
|
|
99
|
+
if (organizerId === sellerId) {
|
|
100
|
+
console.log('organizerId is valid', event.project.id, event.id, event.startDate, organizerId, i);
|
|
101
|
+
} else {
|
|
100
102
|
invalidOrganizerCount += 1;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (typeof sellerId === 'string') {
|
|
108
|
-
const newOrganizer: chevre.factory.event.screeningEventSeries.IOrganizer = {
|
|
103
|
+
|
|
104
|
+
// organizerを修正する
|
|
105
|
+
if (typeof sellerId !== 'string') {
|
|
106
|
+
throw new Error('movieTheater not found');
|
|
107
|
+
}
|
|
108
|
+
const fixedOrganizer: chevre.factory.event.screeningEventSeries.IOrganizer = {
|
|
109
109
|
id: sellerId
|
|
110
110
|
};
|
|
111
111
|
console.log('updating event...', event.project.id, event.id, event.startDate, i);
|
|
@@ -114,12 +114,33 @@ async function main() {
|
|
|
114
114
|
id: event.id,
|
|
115
115
|
attributes: <any>{
|
|
116
116
|
typeOf: event.typeOf,
|
|
117
|
-
organizer:
|
|
117
|
+
organizer: fixedOrganizer
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
updateCount += 1;
|
|
121
121
|
console.log('updated.', event.project.id, event.id, event.startDate, i);
|
|
122
122
|
}
|
|
123
|
+
} else {
|
|
124
|
+
throw new Error('organizer not found');
|
|
125
|
+
// if (typeof sellerId !== 'string') {
|
|
126
|
+
// throw new Error('movieTheater not found');
|
|
127
|
+
// }
|
|
128
|
+
// if (typeof sellerId === 'string') {
|
|
129
|
+
// const newOrganizer: chevre.factory.event.screeningEventSeries.IOrganizer = {
|
|
130
|
+
// id: sellerId
|
|
131
|
+
// };
|
|
132
|
+
// console.log('updating event...', event.project.id, event.id, event.startDate, i);
|
|
133
|
+
// await eventRepo.updatePartiallyById({
|
|
134
|
+
// project: { id: event.project.id },
|
|
135
|
+
// id: event.id,
|
|
136
|
+
// attributes: <any>{
|
|
137
|
+
// typeOf: event.typeOf,
|
|
138
|
+
// organizer: newOrganizer
|
|
139
|
+
// }
|
|
140
|
+
// });
|
|
141
|
+
// updateCount += 1;
|
|
142
|
+
// console.log('updated.', event.project.id, event.id, event.startDate, i);
|
|
143
|
+
// }
|
|
123
144
|
}
|
|
124
145
|
});
|
|
125
146
|
|
|
@@ -237,6 +237,21 @@ export declare class MongoRepository {
|
|
|
237
237
|
};
|
|
238
238
|
};
|
|
239
239
|
}): Promise<import("mongodb").DeleteResult>;
|
|
240
|
+
/**
|
|
241
|
+
* 興行(プロダクト)から削除する
|
|
242
|
+
*/
|
|
243
|
+
deleteManyByItemOfferedId(params: {
|
|
244
|
+
project: {
|
|
245
|
+
id: string;
|
|
246
|
+
};
|
|
247
|
+
offers: {
|
|
248
|
+
itemOffered: {
|
|
249
|
+
id: {
|
|
250
|
+
$in: string[];
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
}): Promise<import("mongodb").DeleteResult>;
|
|
240
255
|
deleteByProject(params: {
|
|
241
256
|
project: {
|
|
242
257
|
id: string;
|
package/lib/chevre/repo/event.js
CHANGED
|
@@ -954,6 +954,18 @@ class MongoRepository {
|
|
|
954
954
|
.exec();
|
|
955
955
|
});
|
|
956
956
|
}
|
|
957
|
+
/**
|
|
958
|
+
* 興行(プロダクト)から削除する
|
|
959
|
+
*/
|
|
960
|
+
deleteManyByItemOfferedId(params) {
|
|
961
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
962
|
+
return this.eventModel.deleteMany({
|
|
963
|
+
'project.id': { $eq: params.project.id },
|
|
964
|
+
'offers.itemOffered.id': { $exists: true, $in: params.offers.itemOffered.id.$in }
|
|
965
|
+
})
|
|
966
|
+
.exec();
|
|
967
|
+
});
|
|
968
|
+
}
|
|
957
969
|
deleteByProject(params) {
|
|
958
970
|
return __awaiter(this, void 0, void 0, function* () {
|
|
959
971
|
yield this.eventModel.deleteMany({
|
|
@@ -71,6 +71,21 @@ export declare class MongoRepository {
|
|
|
71
71
|
attributes: factory.unitPriceOffer.IUnitPriceOffer;
|
|
72
72
|
upsert?: boolean;
|
|
73
73
|
}[]): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* プロダクトIDからアドオンを除外する
|
|
76
|
+
*/
|
|
77
|
+
pullAddOns(params: {
|
|
78
|
+
project: {
|
|
79
|
+
id: string;
|
|
80
|
+
};
|
|
81
|
+
addOn: {
|
|
82
|
+
itemOffered: {
|
|
83
|
+
id: {
|
|
84
|
+
$in: string[];
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}): Promise<import("mongodb").UpdateResult | undefined>;
|
|
74
89
|
deleteById(params: {
|
|
75
90
|
id: string;
|
|
76
91
|
}): Promise<void>;
|
package/lib/chevre/repo/offer.js
CHANGED
|
@@ -494,6 +494,27 @@ class MongoRepository {
|
|
|
494
494
|
}
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
|
+
/**
|
|
498
|
+
* プロダクトIDからアドオンを除外する
|
|
499
|
+
*/
|
|
500
|
+
pullAddOns(params) {
|
|
501
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
502
|
+
if (params.addOn.itemOffered.id.$in.length === 0) {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
return this.offerModel.updateMany({
|
|
506
|
+
'project.id': { $eq: params.project.id },
|
|
507
|
+
'addOn.itemOffered.id': { $exists: true, $in: params.addOn.itemOffered.id.$in }
|
|
508
|
+
}, {
|
|
509
|
+
$pull: {
|
|
510
|
+
addOn: {
|
|
511
|
+
'itemOffered.id': { $in: params.addOn.itemOffered.id.$in }
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
})
|
|
515
|
+
.exec();
|
|
516
|
+
});
|
|
517
|
+
}
|
|
497
518
|
deleteById(params) {
|
|
498
519
|
return __awaiter(this, void 0, void 0, function* () {
|
|
499
520
|
yield this.offerModel.findOneAndRemove({ _id: params.id })
|
|
@@ -52,6 +52,20 @@ export declare class MongoRepository {
|
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
}): Promise<void>;
|
|
55
|
+
pullItemListElement(params: {
|
|
56
|
+
project: {
|
|
57
|
+
id: string;
|
|
58
|
+
};
|
|
59
|
+
$pull: {
|
|
60
|
+
itemListElement: {
|
|
61
|
+
$elemMatch: {
|
|
62
|
+
id: {
|
|
63
|
+
$in: string[];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}): Promise<import("mongodb").UpdateResult | undefined>;
|
|
55
69
|
search(params: factory.offerCatalog.ISearchConditions): Promise<(Omit<factory.offerCatalog.IOfferCatalog, 'itemListElement'> & {
|
|
56
70
|
numberOfItems?: number;
|
|
57
71
|
})[]>;
|
|
@@ -178,6 +178,27 @@ class MongoRepository {
|
|
|
178
178
|
.exec();
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
+
pullItemListElement(params) {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
+
if (params.$pull.itemListElement.$elemMatch.id.$in.length === 0) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
return this.offerCatalogModel.updateMany({
|
|
187
|
+
'project.id': { $eq: params.project.id },
|
|
188
|
+
'itemListElement.id': {
|
|
189
|
+
$exists: true,
|
|
190
|
+
$in: params.$pull.itemListElement.$elemMatch.id.$in
|
|
191
|
+
}
|
|
192
|
+
}, {
|
|
193
|
+
$pull: {
|
|
194
|
+
itemListElement: {
|
|
195
|
+
id: { $in: params.$pull.itemListElement.$elemMatch.id.$in }
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
})
|
|
199
|
+
.exec();
|
|
200
|
+
});
|
|
201
|
+
}
|
|
181
202
|
search(params) {
|
|
182
203
|
var _a;
|
|
183
204
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -68,6 +68,14 @@ export declare class MongoRepository {
|
|
|
68
68
|
*/
|
|
69
69
|
createIfNotExist?: boolean;
|
|
70
70
|
}): Promise<factory.product.IProduct>;
|
|
71
|
+
deleteByHasOfferCatalog(params: {
|
|
72
|
+
project: {
|
|
73
|
+
id: string;
|
|
74
|
+
};
|
|
75
|
+
hasOfferCatalog: {
|
|
76
|
+
id: string;
|
|
77
|
+
};
|
|
78
|
+
}): Promise<import("mongodb").DeleteResult>;
|
|
71
79
|
/**
|
|
72
80
|
* プロジェクト指定で削除する
|
|
73
81
|
*/
|
|
@@ -371,6 +371,15 @@ class MongoRepository {
|
|
|
371
371
|
return doc.toObject();
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
+
deleteByHasOfferCatalog(params) {
|
|
375
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
376
|
+
return this.productModel.deleteMany({
|
|
377
|
+
'project.id': { $eq: params.project.id },
|
|
378
|
+
'hasOfferCatalog.id': { $exists: true, $eq: params.hasOfferCatalog.id }
|
|
379
|
+
})
|
|
380
|
+
.exec();
|
|
381
|
+
});
|
|
382
|
+
}
|
|
374
383
|
/**
|
|
375
384
|
* プロジェクト指定で削除する
|
|
376
385
|
*/
|
|
@@ -5,6 +5,8 @@ import { MongoRepository as CategoryCodeRepo } from '../../../repo/categoryCode'
|
|
|
5
5
|
import { MongoRepository as CreativeWorkRepo } from '../../../repo/creativeWork';
|
|
6
6
|
import { MongoRepository as EventRepo } from '../../../repo/event';
|
|
7
7
|
import { MongoRepository as MemberRepo } from '../../../repo/member';
|
|
8
|
+
import { MongoRepository as OfferRepo } from '../../../repo/offer';
|
|
9
|
+
import { MongoRepository as OfferCatalogRepo } from '../../../repo/offerCatalog';
|
|
8
10
|
import { MongoRepository as PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
9
11
|
import { MongoRepository as PlaceRepo } from '../../../repo/place';
|
|
10
12
|
import { MongoRepository as ProductRepo } from '../../../repo/product';
|
|
@@ -18,6 +20,8 @@ export declare function onResourceDeleted(params: factory.task.onResourceUpdated
|
|
|
18
20
|
event: EventRepo;
|
|
19
21
|
member: MemberRepo;
|
|
20
22
|
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
23
|
+
offer: OfferRepo;
|
|
24
|
+
offerCatalog: OfferCatalogRepo;
|
|
21
25
|
place: PlaceRepo;
|
|
22
26
|
product: ProductRepo;
|
|
23
27
|
productOffer: ProductOfferRepo;
|
|
@@ -41,8 +41,30 @@ function onResourceDeleted(params) {
|
|
|
41
41
|
ids: params.id
|
|
42
42
|
})(repos);
|
|
43
43
|
break;
|
|
44
|
+
case factory.offerType.Offer:
|
|
45
|
+
yield deleteResourcesByOffer({
|
|
46
|
+
project: { id: params.project.id },
|
|
47
|
+
ids: params.id
|
|
48
|
+
})(repos);
|
|
49
|
+
break;
|
|
50
|
+
case 'OfferCatalog':
|
|
51
|
+
yield deleteResourcesByOfferCatalog({
|
|
52
|
+
project: { id: params.project.id },
|
|
53
|
+
ids: params.id
|
|
54
|
+
})(repos);
|
|
55
|
+
break;
|
|
56
|
+
case factory.product.ProductType.EventService:
|
|
57
|
+
case factory.product.ProductType.Product:
|
|
58
|
+
case factory.product.ProductType.Transportation:
|
|
59
|
+
yield deleteResourcesByProduct({
|
|
60
|
+
project: { id: params.project.id },
|
|
61
|
+
ids: params.id,
|
|
62
|
+
typeOf: params.typeOf
|
|
63
|
+
})(repos);
|
|
64
|
+
break;
|
|
44
65
|
default:
|
|
45
|
-
|
|
66
|
+
// no op
|
|
67
|
+
throw new factory.errors.NotImplemented(`${params.typeOf} onDeleted not implemented`);
|
|
46
68
|
}
|
|
47
69
|
}
|
|
48
70
|
});
|
|
@@ -228,3 +250,138 @@ function deleteResourcesBySeller(params) {
|
|
|
228
250
|
}
|
|
229
251
|
});
|
|
230
252
|
}
|
|
253
|
+
function deleteResourcesByOffer(params) {
|
|
254
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
255
|
+
if (params.ids.length !== 1) {
|
|
256
|
+
throw new factory.errors.Argument('id', 'id.length must be 1');
|
|
257
|
+
}
|
|
258
|
+
for (const offerId of params.ids) {
|
|
259
|
+
const deleteActionAttributes = {
|
|
260
|
+
agent: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
261
|
+
object: { id: offerId, typeOf: factory.offerType.Offer },
|
|
262
|
+
project: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
263
|
+
typeOf: factory.actionType.DeleteAction
|
|
264
|
+
};
|
|
265
|
+
let deleteResult;
|
|
266
|
+
const action = yield repos.action.start(deleteActionAttributes);
|
|
267
|
+
try {
|
|
268
|
+
// カタログからpullItemListElement
|
|
269
|
+
const updateCatalogResult = yield repos.offerCatalog.pullItemListElement({
|
|
270
|
+
project: { id: params.project.id },
|
|
271
|
+
$pull: { itemListElement: { $elemMatch: { id: { $in: [offerId] } } } }
|
|
272
|
+
});
|
|
273
|
+
deleteResult = { updateCatalogResult };
|
|
274
|
+
}
|
|
275
|
+
catch (error) {
|
|
276
|
+
try {
|
|
277
|
+
const actionError = Object.assign(Object.assign({}, error), { message: error.message, name: error.name });
|
|
278
|
+
yield repos.action.giveUp({ typeOf: deleteActionAttributes.typeOf, id: action.id, error: actionError });
|
|
279
|
+
}
|
|
280
|
+
catch (_) {
|
|
281
|
+
// no op
|
|
282
|
+
}
|
|
283
|
+
throw error;
|
|
284
|
+
}
|
|
285
|
+
yield repos.action.complete({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
function deleteResourcesByOfferCatalog(params) {
|
|
290
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
291
|
+
if (params.ids.length !== 1) {
|
|
292
|
+
throw new factory.errors.Argument('id', 'id.length must be 1');
|
|
293
|
+
}
|
|
294
|
+
for (const catalogId of params.ids) {
|
|
295
|
+
const deleteActionAttributes = {
|
|
296
|
+
agent: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
297
|
+
object: { id: catalogId, typeOf: 'OfferCatalog' },
|
|
298
|
+
project: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
299
|
+
typeOf: factory.actionType.DeleteAction
|
|
300
|
+
};
|
|
301
|
+
let deleteResult;
|
|
302
|
+
const action = yield repos.action.start(deleteActionAttributes);
|
|
303
|
+
try {
|
|
304
|
+
// カタログからプロダクト検索
|
|
305
|
+
const productsWithCatalog = yield repos.product.search({
|
|
306
|
+
project: { id: { $eq: params.project.id } },
|
|
307
|
+
hasOfferCatalog: { id: { $eq: catalogId } }
|
|
308
|
+
}, ['_id'], []);
|
|
309
|
+
let deleteEventResult;
|
|
310
|
+
let updateOfferResult;
|
|
311
|
+
if (productsWithCatalog.length > 0) {
|
|
312
|
+
const deletingProductIds = productsWithCatalog.map((product) => product.id);
|
|
313
|
+
// 興行を設定されたイベント削除
|
|
314
|
+
deleteEventResult = yield repos.event.deleteManyByItemOfferedId({
|
|
315
|
+
project: { id: params.project.id },
|
|
316
|
+
offers: { itemOffered: { id: { $in: deletingProductIds } } }
|
|
317
|
+
});
|
|
318
|
+
// アドオンから除外
|
|
319
|
+
updateOfferResult = yield repos.offer.pullAddOns({
|
|
320
|
+
project: { id: params.project.id },
|
|
321
|
+
addOn: { itemOffered: { id: { $in: deletingProductIds } } }
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
// プロダクト削除
|
|
325
|
+
const deleteProductResult = yield repos.product.deleteByHasOfferCatalog({
|
|
326
|
+
project: { id: params.project.id },
|
|
327
|
+
hasOfferCatalog: { id: catalogId }
|
|
328
|
+
});
|
|
329
|
+
deleteResult = { deleteEventResult, deleteProductResult, updateOfferResult };
|
|
330
|
+
}
|
|
331
|
+
catch (error) {
|
|
332
|
+
try {
|
|
333
|
+
const actionError = Object.assign(Object.assign({}, error), { message: error.message, name: error.name });
|
|
334
|
+
yield repos.action.giveUp({ typeOf: deleteActionAttributes.typeOf, id: action.id, error: actionError });
|
|
335
|
+
}
|
|
336
|
+
catch (_) {
|
|
337
|
+
// no op
|
|
338
|
+
}
|
|
339
|
+
throw error;
|
|
340
|
+
}
|
|
341
|
+
yield repos.action.complete({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
function deleteResourcesByProduct(params) {
|
|
346
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
347
|
+
if (params.ids.length !== 1) {
|
|
348
|
+
throw new factory.errors.Argument('id', 'id.length must be 1');
|
|
349
|
+
}
|
|
350
|
+
for (const productId of params.ids) {
|
|
351
|
+
const deleteActionAttributes = {
|
|
352
|
+
agent: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
353
|
+
object: { id: productId, typeOf: params.typeOf },
|
|
354
|
+
project: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
355
|
+
typeOf: factory.actionType.DeleteAction
|
|
356
|
+
};
|
|
357
|
+
let deleteResult;
|
|
358
|
+
const action = yield repos.action.start(deleteActionAttributes);
|
|
359
|
+
try {
|
|
360
|
+
let deleteEventResult;
|
|
361
|
+
let updateOfferResult;
|
|
362
|
+
// 興行を設定されたイベント削除
|
|
363
|
+
deleteEventResult = yield repos.event.deleteManyByItemOfferedId({
|
|
364
|
+
project: { id: params.project.id },
|
|
365
|
+
offers: { itemOffered: { id: { $in: [productId] } } }
|
|
366
|
+
});
|
|
367
|
+
// アドオンから除外
|
|
368
|
+
updateOfferResult = yield repos.offer.pullAddOns({
|
|
369
|
+
project: { id: params.project.id },
|
|
370
|
+
addOn: { itemOffered: { id: { $in: [productId] } } }
|
|
371
|
+
});
|
|
372
|
+
deleteResult = { deleteEventResult, updateOfferResult };
|
|
373
|
+
}
|
|
374
|
+
catch (error) {
|
|
375
|
+
try {
|
|
376
|
+
const actionError = Object.assign(Object.assign({}, error), { message: error.message, name: error.name });
|
|
377
|
+
yield repos.action.giveUp({ typeOf: deleteActionAttributes.typeOf, id: action.id, error: actionError });
|
|
378
|
+
}
|
|
379
|
+
catch (_) {
|
|
380
|
+
// no op
|
|
381
|
+
}
|
|
382
|
+
throw error;
|
|
383
|
+
}
|
|
384
|
+
yield repos.action.complete({ typeOf: deleteActionAttributes.typeOf, id: action.id, result: deleteResult });
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
}
|
|
@@ -17,6 +17,8 @@ const categoryCode_1 = require("../../repo/categoryCode");
|
|
|
17
17
|
const creativeWork_1 = require("../../repo/creativeWork");
|
|
18
18
|
const event_1 = require("../../repo/event");
|
|
19
19
|
const member_1 = require("../../repo/member");
|
|
20
|
+
const offer_1 = require("../../repo/offer");
|
|
21
|
+
const offerCatalog_1 = require("../../repo/offerCatalog");
|
|
20
22
|
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
21
23
|
const place_1 = require("../../repo/place");
|
|
22
24
|
const product_1 = require("../../repo/product");
|
|
@@ -37,6 +39,8 @@ function call(data) {
|
|
|
37
39
|
creativeWork: new creativeWork_1.MongoRepository(connectionSettings.connection),
|
|
38
40
|
event: new event_1.MongoRepository(connectionSettings.connection),
|
|
39
41
|
member: new member_1.MongoRepository(connectionSettings.connection),
|
|
42
|
+
offer: new offer_1.MongoRepository(connectionSettings.connection),
|
|
43
|
+
offerCatalog: new offerCatalog_1.MongoRepository(connectionSettings.connection),
|
|
40
44
|
paymentServiceProvider: new paymentServiceProvider_1.MongoRepository(connectionSettings.connection),
|
|
41
45
|
place: new place_1.MongoRepository(connectionSettings.connection),
|
|
42
46
|
product: new product_1.MongoRepository(connectionSettings.connection),
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.
|
|
13
|
-
"@cinerino/sdk": "3.162.
|
|
12
|
+
"@chevre/factory": "4.323.0",
|
|
13
|
+
"@cinerino/sdk": "3.162.2",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
16
16
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"postversion": "git push origin --tags",
|
|
118
118
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
119
119
|
},
|
|
120
|
-
"version": "21.6.0-alpha.
|
|
120
|
+
"version": "21.6.0-alpha.2"
|
|
121
121
|
}
|