@chevre/domain 21.8.0-alpha.28 → 21.8.0-alpha.29
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.
|
@@ -35,6 +35,7 @@ export declare class MongoRepository {
|
|
|
35
35
|
private readonly aggregateOfferModel;
|
|
36
36
|
private readonly offerModel;
|
|
37
37
|
private readonly offerCatalogModel;
|
|
38
|
+
private readonly taskModel;
|
|
38
39
|
constructor(connection: Connection);
|
|
39
40
|
static CREATE_OFFER_MONGO_CONDITIONS(params: factory.unitPriceOffer.ISearchConditions): any[];
|
|
40
41
|
/**
|
|
@@ -66,7 +67,6 @@ export declare class MongoRepository {
|
|
|
66
67
|
findById(params: {
|
|
67
68
|
id: string;
|
|
68
69
|
}): Promise<factory.unitPriceOffer.IUnitPriceOffer>;
|
|
69
|
-
count(params: factory.unitPriceOffer.ISearchConditions): Promise<number>;
|
|
70
70
|
search(params: factory.unitPriceOffer.ISearchConditions, projection?: IProjection): Promise<factory.unitPriceOffer.IUnitPriceOffer[]>;
|
|
71
71
|
save(params: factory.unitPriceOffer.IUnitPriceOffer): Promise<factory.unitPriceOffer.IUnitPriceOffer>;
|
|
72
72
|
/**
|
|
@@ -92,18 +92,12 @@ export declare class MongoRepository {
|
|
|
92
92
|
};
|
|
93
93
|
}): Promise<import("mongodb").UpdateResult | undefined>;
|
|
94
94
|
deleteById(params: {
|
|
95
|
-
id: string;
|
|
96
|
-
}): Promise<void>;
|
|
97
|
-
deleteByProject(params: {
|
|
98
95
|
project: {
|
|
99
96
|
id: string;
|
|
100
97
|
};
|
|
98
|
+
id: string;
|
|
101
99
|
}): Promise<void>;
|
|
102
100
|
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
103
|
-
unsetUnnecessaryFields(params: {
|
|
104
|
-
filter: any;
|
|
105
|
-
$unset: any;
|
|
106
|
-
}): Promise<import("mongodb").UpdateResult>;
|
|
107
101
|
sync2aggregateOffer(params: {
|
|
108
102
|
id?: {
|
|
109
103
|
$in: string[];
|
|
@@ -114,6 +108,26 @@ export declare class MongoRepository {
|
|
|
114
108
|
project: {
|
|
115
109
|
id: string;
|
|
116
110
|
};
|
|
111
|
+
isDeleted: boolean;
|
|
112
|
+
typeOf: factory.offerType.AggregateOffer | factory.offerType.Offer;
|
|
117
113
|
}): Promise<BulkWriteOpResultObject | void>;
|
|
114
|
+
/**
|
|
115
|
+
* オファー同期専用のタスク保管
|
|
116
|
+
*/
|
|
117
|
+
saveSyncTask(params: {
|
|
118
|
+
id: {
|
|
119
|
+
$in: string[];
|
|
120
|
+
};
|
|
121
|
+
identifier: {
|
|
122
|
+
$in: string[];
|
|
123
|
+
};
|
|
124
|
+
isDeleted: boolean;
|
|
125
|
+
project: {
|
|
126
|
+
id: string;
|
|
127
|
+
};
|
|
128
|
+
typeOf: factory.offerType.AggregateOffer | factory.offerType.Offer;
|
|
129
|
+
}): Promise<{
|
|
130
|
+
id: string;
|
|
131
|
+
}[]>;
|
|
118
132
|
}
|
|
119
133
|
export {};
|
package/lib/chevre/repo/offer.js
CHANGED
|
@@ -26,6 +26,8 @@ const factory = require("../factory");
|
|
|
26
26
|
const aggregateOffer_1 = require("./mongoose/schemas/aggregateOffer");
|
|
27
27
|
const offer_1 = require("./mongoose/schemas/offer");
|
|
28
28
|
const offerCatalog_1 = require("./mongoose/schemas/offerCatalog");
|
|
29
|
+
const task_1 = require("./mongoose/schemas/task");
|
|
30
|
+
const task_2 = require("../eventEmitter/task");
|
|
29
31
|
const settings_1 = require("../settings");
|
|
30
32
|
/**
|
|
31
33
|
* オファーリポジトリ
|
|
@@ -35,6 +37,7 @@ class MongoRepository {
|
|
|
35
37
|
this.aggregateOfferModel = connection.model(aggregateOffer_1.modelName, aggregateOffer_1.schema);
|
|
36
38
|
this.offerModel = connection.model(offer_1.modelName, offer_1.schema);
|
|
37
39
|
this.offerCatalogModel = connection.model(offerCatalog_1.modelName, offerCatalog_1.schema);
|
|
40
|
+
this.taskModel = connection.model(task_1.modelName, task_1.schema);
|
|
38
41
|
}
|
|
39
42
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
40
43
|
static CREATE_OFFER_MONGO_CONDITIONS(params) {
|
|
@@ -412,14 +415,14 @@ class MongoRepository {
|
|
|
412
415
|
return doc.toObject();
|
|
413
416
|
});
|
|
414
417
|
}
|
|
415
|
-
count(
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
}
|
|
418
|
+
// public async count(
|
|
419
|
+
// params: factory.unitPriceOffer.ISearchConditions
|
|
420
|
+
// ): Promise<number> {
|
|
421
|
+
// const conditions = MongoRepository.CREATE_OFFER_MONGO_CONDITIONS(params);
|
|
422
|
+
// return this.offerModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
423
|
+
// .setOptions({ maxTimeMS: MONGO_MAX_TIME_MS })
|
|
424
|
+
// .exec();
|
|
425
|
+
// }
|
|
423
426
|
search(params, projection) {
|
|
424
427
|
var _a;
|
|
425
428
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -462,6 +465,16 @@ class MongoRepository {
|
|
|
462
465
|
if (doc === null) {
|
|
463
466
|
throw new factory.errors.NotFound(this.offerModel.modelName);
|
|
464
467
|
}
|
|
468
|
+
// 同期タスク作成(2023-09-03~)
|
|
469
|
+
if (typeof doc._id === 'string') {
|
|
470
|
+
yield this.saveSyncTask({
|
|
471
|
+
project: { id: params.project.id },
|
|
472
|
+
id: { $in: [doc._id] },
|
|
473
|
+
identifier: { $in: [] },
|
|
474
|
+
isDeleted: false,
|
|
475
|
+
typeOf: factory.offerType.Offer
|
|
476
|
+
});
|
|
477
|
+
}
|
|
465
478
|
return doc.toObject();
|
|
466
479
|
});
|
|
467
480
|
}
|
|
@@ -502,6 +515,14 @@ class MongoRepository {
|
|
|
502
515
|
}
|
|
503
516
|
if (bulkWriteOps.length > 0) {
|
|
504
517
|
yield this.offerModel.bulkWrite(bulkWriteOps, { ordered: false });
|
|
518
|
+
// 同期タスク作成(2023-09-03~)
|
|
519
|
+
yield this.saveSyncTask({
|
|
520
|
+
project: { id: params[0].attributes.project.id },
|
|
521
|
+
id: { $in: [] },
|
|
522
|
+
identifier: { $in: params.map((savingOffer) => savingOffer.attributes.identifier) },
|
|
523
|
+
isDeleted: false,
|
|
524
|
+
typeOf: factory.offerType.Offer
|
|
525
|
+
});
|
|
505
526
|
}
|
|
506
527
|
});
|
|
507
528
|
}
|
|
@@ -513,10 +534,14 @@ class MongoRepository {
|
|
|
513
534
|
if (params.addOn.itemOffered.id.$in.length === 0) {
|
|
514
535
|
return;
|
|
515
536
|
}
|
|
516
|
-
|
|
537
|
+
const conditions = {
|
|
517
538
|
'project.id': { $eq: params.project.id },
|
|
518
539
|
'addOn.itemOffered.id': { $exists: true, $in: params.addOn.itemOffered.id.$in }
|
|
519
|
-
}
|
|
540
|
+
};
|
|
541
|
+
const updatingOffers = yield this.offerModel.find(conditions, { _id: 1 })
|
|
542
|
+
.exec()
|
|
543
|
+
.then((docs) => docs.map((doc) => doc.toObject()));
|
|
544
|
+
const result = yield this.offerModel.updateMany(conditions, {
|
|
520
545
|
$pull: {
|
|
521
546
|
addOn: {
|
|
522
547
|
'itemOffered.id': { $in: params.addOn.itemOffered.id.$in }
|
|
@@ -524,92 +549,178 @@ class MongoRepository {
|
|
|
524
549
|
}
|
|
525
550
|
})
|
|
526
551
|
.exec();
|
|
552
|
+
// 同期タスク作成(2023-09-03~)
|
|
553
|
+
if (updatingOffers.length > 0) {
|
|
554
|
+
yield this.saveSyncTask({
|
|
555
|
+
project: { id: params.project.id },
|
|
556
|
+
id: { $in: updatingOffers.map((offer) => offer.id) },
|
|
557
|
+
identifier: { $in: [] },
|
|
558
|
+
isDeleted: false,
|
|
559
|
+
typeOf: factory.offerType.Offer
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
return result;
|
|
527
563
|
});
|
|
528
564
|
}
|
|
529
565
|
deleteById(params) {
|
|
530
566
|
return __awaiter(this, void 0, void 0, function* () {
|
|
531
|
-
yield this.offerModel.findOneAndRemove({ _id: params.id })
|
|
532
|
-
.exec();
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
deleteByProject(params) {
|
|
536
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
537
|
-
yield this.offerModel.deleteMany({
|
|
538
|
-
'project.id': { $eq: params.project.id }
|
|
539
|
-
})
|
|
567
|
+
yield this.offerModel.findOneAndRemove({ _id: params.id }, { projection: { _id: 1 } })
|
|
540
568
|
.exec();
|
|
569
|
+
// 同期タスク作成(2023-09-03~)
|
|
570
|
+
yield this.saveSyncTask({
|
|
571
|
+
project: { id: params.project.id },
|
|
572
|
+
id: { $in: [params.id] },
|
|
573
|
+
identifier: { $in: [] },
|
|
574
|
+
isDeleted: true,
|
|
575
|
+
typeOf: factory.offerType.Offer
|
|
576
|
+
});
|
|
541
577
|
});
|
|
542
578
|
}
|
|
579
|
+
// public async deleteByProject(params: {
|
|
580
|
+
// project: { id: string };
|
|
581
|
+
// }): Promise<void> {
|
|
582
|
+
// await this.offerModel.deleteMany({
|
|
583
|
+
// 'project.id': { $eq: params.project.id }
|
|
584
|
+
// })
|
|
585
|
+
// .exec();
|
|
586
|
+
// }
|
|
543
587
|
getCursor(conditions, projection) {
|
|
544
588
|
return this.offerModel.find(conditions, projection)
|
|
545
589
|
.sort({ 'priceSpecification.price': factory.sortType.Descending })
|
|
546
590
|
.cursor();
|
|
547
591
|
}
|
|
548
|
-
unsetUnnecessaryFields(params
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
592
|
+
// public async unsetUnnecessaryFields(params: {
|
|
593
|
+
// filter: any;
|
|
594
|
+
// $unset: any;
|
|
595
|
+
// }) {
|
|
596
|
+
// return this.offerModel.updateMany(
|
|
597
|
+
// params.filter,
|
|
598
|
+
// { $unset: params.$unset }
|
|
599
|
+
// )
|
|
600
|
+
// .exec();
|
|
601
|
+
// }
|
|
554
602
|
sync2aggregateOffer(params) {
|
|
555
603
|
var _a, _b;
|
|
556
604
|
return __awaiter(this, void 0, void 0, function* () {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
.
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
605
|
+
if (params.typeOf === factory.offerType.Offer) {
|
|
606
|
+
const idIn = (_a = params.id) === null || _a === void 0 ? void 0 : _a.$in;
|
|
607
|
+
const identifierIn = (_b = params.identifier) === null || _b === void 0 ? void 0 : _b.$in;
|
|
608
|
+
if (params.isDeleted === true) {
|
|
609
|
+
if (Array.isArray(idIn) && idIn.length > 0) {
|
|
610
|
+
yield this.aggregateOfferModel.deleteMany({
|
|
611
|
+
'project.id': { $eq: params.project.id },
|
|
612
|
+
_id: { $in: idIn }
|
|
613
|
+
})
|
|
614
|
+
.exec();
|
|
615
|
+
}
|
|
616
|
+
// コードで削除することは現状ない
|
|
617
|
+
// if (Array.isArray(identifierIn) && identifierIn.length > 0) {
|
|
618
|
+
// await this.aggregateOfferModel.deleteMany({
|
|
619
|
+
// 'project.id': { $eq: params.project.id },
|
|
620
|
+
// 'offers.identifier': { $exists: true, $in: identifierIn }
|
|
621
|
+
// })
|
|
622
|
+
// .exec();
|
|
623
|
+
// }
|
|
624
|
+
}
|
|
625
|
+
else {
|
|
626
|
+
let unitPriceOffers = [];
|
|
627
|
+
if (Array.isArray(idIn) && idIn.length > 0) {
|
|
628
|
+
unitPriceOffers = yield this.offerModel.find({
|
|
629
|
+
'project.id': { $eq: params.project.id },
|
|
630
|
+
_id: { $in: idIn }
|
|
631
|
+
}, {
|
|
632
|
+
__v: 0,
|
|
633
|
+
createdAt: 0,
|
|
634
|
+
updatedAt: 0,
|
|
635
|
+
offers: 0
|
|
636
|
+
})
|
|
637
|
+
.exec()
|
|
638
|
+
.then((docs) => docs.map((doc) => doc.toObject()));
|
|
639
|
+
}
|
|
640
|
+
if (Array.isArray(identifierIn) && identifierIn.length > 0) {
|
|
641
|
+
unitPriceOffers = yield this.offerModel.find({
|
|
642
|
+
'project.id': { $eq: params.project.id },
|
|
643
|
+
identifier: { $exists: true, $in: identifierIn }
|
|
644
|
+
}, {
|
|
645
|
+
__v: 0,
|
|
646
|
+
createdAt: 0,
|
|
647
|
+
updatedAt: 0,
|
|
648
|
+
offers: 0
|
|
649
|
+
})
|
|
650
|
+
.exec()
|
|
651
|
+
.then((docs) => docs.map((doc) => doc.toObject()));
|
|
652
|
+
}
|
|
653
|
+
const bulkWriteOps = [];
|
|
654
|
+
if (unitPriceOffers.length > 0) {
|
|
655
|
+
unitPriceOffers.forEach((unitPriceOffer) => {
|
|
656
|
+
delete unitPriceOffer._id;
|
|
657
|
+
const $set = {
|
|
658
|
+
project: unitPriceOffer.project,
|
|
659
|
+
typeOf: factory.offerType.AggregateOffer,
|
|
660
|
+
offers: [unitPriceOffer]
|
|
661
|
+
};
|
|
662
|
+
bulkWriteOps.push({
|
|
663
|
+
updateOne: {
|
|
664
|
+
filter: {
|
|
665
|
+
'project.id': { $eq: unitPriceOffer.project.id },
|
|
666
|
+
_id: { $eq: unitPriceOffer.id }
|
|
667
|
+
},
|
|
668
|
+
update: {
|
|
669
|
+
$set,
|
|
670
|
+
$setOnInsert: { _id: unitPriceOffer.id }
|
|
671
|
+
},
|
|
672
|
+
upsert: true
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
if (bulkWriteOps.length > 0) {
|
|
678
|
+
return this.aggregateOfferModel.bulkWrite(bulkWriteOps, { ordered: false });
|
|
679
|
+
}
|
|
680
|
+
}
|
|
585
681
|
}
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
unitPriceOffers.forEach((unitPriceOffer) => {
|
|
589
|
-
delete unitPriceOffer._id;
|
|
590
|
-
const $set = {
|
|
591
|
-
project: unitPriceOffer.project,
|
|
592
|
-
typeOf: factory.offerType.AggregateOffer,
|
|
593
|
-
offers: [unitPriceOffer]
|
|
594
|
-
};
|
|
595
|
-
bulkWriteOps.push({
|
|
596
|
-
updateOne: {
|
|
597
|
-
filter: {
|
|
598
|
-
'project.id': { $eq: unitPriceOffer.project.id },
|
|
599
|
-
_id: { $eq: unitPriceOffer.id }
|
|
600
|
-
},
|
|
601
|
-
update: {
|
|
602
|
-
$set,
|
|
603
|
-
$setOnInsert: { _id: unitPriceOffer.id }
|
|
604
|
-
},
|
|
605
|
-
upsert: true
|
|
606
|
-
}
|
|
607
|
-
});
|
|
608
|
-
});
|
|
682
|
+
else if (params.typeOf === factory.offerType.AggregateOffer) {
|
|
683
|
+
// no op
|
|
609
684
|
}
|
|
610
|
-
|
|
611
|
-
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* オファー同期専用のタスク保管
|
|
689
|
+
*/
|
|
690
|
+
saveSyncTask(params) {
|
|
691
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
692
|
+
const syncAggregateOfferTask = {
|
|
693
|
+
project: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
694
|
+
name: factory.taskName.SyncAggregateOffer,
|
|
695
|
+
status: factory.taskStatus.Ready,
|
|
696
|
+
runsAt: new Date(),
|
|
697
|
+
remainingNumberOfTries: 3,
|
|
698
|
+
numberOfTried: 0,
|
|
699
|
+
executionResults: [],
|
|
700
|
+
data: {
|
|
701
|
+
project: { id: params.project.id },
|
|
702
|
+
id: params.id,
|
|
703
|
+
identifier: params.identifier,
|
|
704
|
+
isDeleted: params.isDeleted,
|
|
705
|
+
typeOf: params.typeOf
|
|
706
|
+
}
|
|
707
|
+
};
|
|
708
|
+
const taskAttributes = [syncAggregateOfferTask];
|
|
709
|
+
const result = yield this.taskModel.insertMany(taskAttributes, { ordered: false, rawResult: true });
|
|
710
|
+
if (result.insertedCount !== taskAttributes.length) {
|
|
711
|
+
throw new factory.errors.ServiceUnavailable('all tasks not saved');
|
|
612
712
|
}
|
|
713
|
+
const savedTasks = Object.values(result.insertedIds)
|
|
714
|
+
.map((objectId) => {
|
|
715
|
+
return { id: objectId.toHexString() };
|
|
716
|
+
});
|
|
717
|
+
savedTasks.forEach((savedTask) => {
|
|
718
|
+
task_2.taskEventEmitter.emitTaskStatusChanged({
|
|
719
|
+
id: savedTask.id,
|
|
720
|
+
status: factory.taskStatus.Ready
|
|
721
|
+
});
|
|
722
|
+
});
|
|
723
|
+
return savedTasks;
|
|
613
724
|
});
|
|
614
725
|
}
|
|
615
726
|
}
|
|
@@ -43,24 +43,6 @@ function importFromCOA(params) {
|
|
|
43
43
|
return { attributes: offer, upsert: true };
|
|
44
44
|
});
|
|
45
45
|
yield repos.offer.saveManyByIdentifier(saveParams);
|
|
46
|
-
// 同期タスク作成(2023-09-03~)
|
|
47
|
-
if (saveParams.length > 0) {
|
|
48
|
-
const syncAggregateOfferTask = {
|
|
49
|
-
project: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
50
|
-
name: factory.taskName.SyncAggregateOffer,
|
|
51
|
-
status: factory.taskStatus.Ready,
|
|
52
|
-
runsAt: new Date(),
|
|
53
|
-
remainingNumberOfTries: 3,
|
|
54
|
-
numberOfTried: 0,
|
|
55
|
-
executionResults: [],
|
|
56
|
-
data: {
|
|
57
|
-
project: { id: params.project.id },
|
|
58
|
-
identifier: { $in: saveParams.map((savingOffer) => savingOffer.attributes.identifier) },
|
|
59
|
-
typeOf: factory.offerType.Offer
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
yield repos.task.saveMany([syncAggregateOfferTask], { emitImmediately: true });
|
|
63
|
-
}
|
|
64
46
|
}
|
|
65
47
|
catch (error) {
|
|
66
48
|
let throwsError = true;
|
|
@@ -26,17 +26,17 @@ export type IExternalOrder = Pick<factory.order.IOrder, 'project' | 'typeOf' | '
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function createOnOrderSentTasksByTransaction(params: {
|
|
28
28
|
potentialActions?: factory.action.transfer.send.order.IPotentialActions;
|
|
29
|
-
}): (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/createEvent").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/
|
|
29
|
+
}): (import("@chevre/factory/lib/task/syncAggregateOffer").IAttributes | 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/createEvent").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/syncScreeningRooms").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)[];
|
|
30
30
|
/**
|
|
31
31
|
* 注文返品後のアクション
|
|
32
32
|
*/
|
|
33
33
|
export declare function createOnOrderReturnedTasksByTransaction(params: {
|
|
34
34
|
potentialActions?: factory.action.transfer.returnAction.order.IPotentialActions;
|
|
35
|
-
}): (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/createEvent").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/
|
|
35
|
+
}): (import("@chevre/factory/lib/task/syncAggregateOffer").IAttributes | 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/createEvent").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/syncScreeningRooms").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)[];
|
|
36
36
|
/**
|
|
37
37
|
* 注文中止時のアクション
|
|
38
38
|
*/
|
|
39
39
|
export declare function createOnOrderCancelledTasksByTransaction(params: {
|
|
40
40
|
transaction?: factory.transaction.placeOrder.ITransaction;
|
|
41
|
-
}): (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/createEvent").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/
|
|
41
|
+
}): (import("@chevre/factory/lib/task/syncAggregateOffer").IAttributes | 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/createEvent").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/syncScreeningRooms").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)[];
|
|
42
42
|
export {};
|
|
@@ -27,7 +27,7 @@ function cleanUpDatabaseByProject(params) {
|
|
|
27
27
|
yield repos.categoryCode.deleteByProject({ project: { id: params.id } });
|
|
28
28
|
yield repos.creativeWork.deleteByProject({ project: { id: params.id } });
|
|
29
29
|
yield repos.event.deleteByProject({ project: { id: params.id } });
|
|
30
|
-
|
|
30
|
+
// await repos.offer.deleteByProject({ project: { id: params.id } });
|
|
31
31
|
yield repos.offerCatalog.deleteByProject({ project: { id: params.id } });
|
|
32
32
|
yield repos.place.deleteByProject({ project: { id: params.id } });
|
|
33
33
|
yield repos.priceSpecification.deleteByProject({ project: { id: params.id } });
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.329.0-alpha.
|
|
12
|
+
"@chevre/factory": "4.329.0-alpha.6",
|
|
13
13
|
"@cinerino/sdk": "3.166.0-alpha.5",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.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.8.0-alpha.
|
|
120
|
+
"version": "21.8.0-alpha.29"
|
|
121
121
|
}
|