@chevre/domain 21.18.0-alpha.8 → 21.18.0
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/aggreateOwnershipInfosByOrder.ts +24 -0
- package/example/src/chevre/migratePaymentServicesToNewCollection.ts +21 -0
- package/example/src/chevre/offerCatalog2offerCatalogItem.ts +4 -0
- package/example/src/chevre/searchOffers.ts +41 -37
- package/example/src/chevre/searchOrderAcceptedOffers.ts +11 -11
- package/example/src/chevre/searchOrders.ts +11 -0
- package/example/src/chevre/searchProducts.ts +28 -0
- package/example/src/chevre/searchReservationsByOrder.ts +30 -0
- package/example/src/chevre/searchTransactions.ts +41 -0
- package/example/src/chevre/unsetUnnecessaryFields.ts +12 -6
- package/example/src/chevre/upsertMoviesByIdentifier.ts +5 -4
- package/example/src/chevre/upsertOfferCatalogsByIdentifier.ts +46 -0
- package/example/src/chevre/upsertOffersByIdentifier.ts +94 -0
- package/example/src/chevre/upsertScreeningEventSeriesByVersion.ts +104 -0
- package/lib/chevre/credentials.d.ts +0 -3
- package/lib/chevre/credentials.js +4 -3
- package/lib/chevre/repo/acceptedOffer.d.ts +31 -14
- package/lib/chevre/repo/acceptedOffer.js +56 -102
- package/lib/chevre/repo/creativeWork.d.ts +12 -2
- package/lib/chevre/repo/creativeWork.js +39 -25
- package/lib/chevre/repo/event.d.ts +15 -0
- package/lib/chevre/repo/event.js +66 -0
- package/lib/chevre/repo/mongoose/schemas/paymentService.d.ts +5 -0
- package/lib/chevre/repo/mongoose/schemas/paymentService.js +146 -0
- package/lib/chevre/repo/offer.d.ts +14 -5
- package/lib/chevre/repo/offer.js +94 -19
- package/lib/chevre/repo/offerCatalog.d.ts +18 -1
- package/lib/chevre/repo/offerCatalog.js +51 -39
- package/lib/chevre/repo/order.d.ts +14 -10
- package/lib/chevre/repo/order.js +20 -14
- package/lib/chevre/repo/paymentService.d.ts +62 -0
- package/lib/chevre/repo/paymentService.js +339 -0
- package/lib/chevre/repo/paymentServiceProvider.d.ts +27 -4
- package/lib/chevre/repo/paymentServiceProvider.js +85 -12
- package/lib/chevre/repo/place.js +14 -10
- package/lib/chevre/repo/product.d.ts +37 -24
- package/lib/chevre/repo/product.js +60 -150
- package/lib/chevre/repo/transaction.d.ts +5 -4
- package/lib/chevre/repository.d.ts +5 -7
- package/lib/chevre/repository.js +14 -17
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +10 -1
- package/lib/chevre/service/aggregation/event/findEventOffers.js +10 -1
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/potentialActions.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/potentialActions.js +3 -3
- package/lib/chevre/service/assetTransaction/pay.d.ts +7 -6
- package/lib/chevre/service/assetTransaction/pay.js +44 -36
- package/lib/chevre/service/assetTransaction/refund/factory.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/refund/factory.js +0 -5
- package/lib/chevre/service/assetTransaction/refund.d.ts +2 -0
- package/lib/chevre/service/assetTransaction/refund.js +16 -4
- package/lib/chevre/service/assetTransaction/registerService.js +18 -2
- package/lib/chevre/service/assetTransaction/reserve/factory/price.js +1 -1
- package/lib/chevre/service/assetTransaction/reserve.d.ts +6 -0
- package/lib/chevre/service/assetTransaction/reserve.js +32 -2
- package/lib/chevre/service/delivery/factory.d.ts +3 -1
- package/lib/chevre/service/delivery/factory.js +4 -2
- package/lib/chevre/service/delivery.d.ts +1 -2
- package/lib/chevre/service/delivery.js +1 -3
- package/lib/chevre/service/event.js +1 -1
- package/lib/chevre/service/moneyTransfer.js +11 -1
- package/lib/chevre/service/offer/event/authorize.d.ts +4 -0
- package/lib/chevre/service/offer/event/factory.d.ts +1 -1
- package/lib/chevre/service/offer/event/factory.js +4 -2
- package/lib/chevre/service/offer/event/processStartReserve4chevre.d.ts +4 -0
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +40 -5
- package/lib/chevre/service/offer/product/factory.js +1 -1
- package/lib/chevre/service/offer/product/searchProductOffers.js +10 -1
- package/lib/chevre/service/offer/product.d.ts +4 -15
- package/lib/chevre/service/offer/product.js +85 -57
- package/lib/chevre/service/order/confirmPayTransaction.d.ts +0 -2
- package/lib/chevre/service/order/confirmPayTransaction.js +0 -1
- package/lib/chevre/service/order/createAccountingReportIfNotExist.d.ts +3 -1
- package/lib/chevre/service/order/createAccountingReportIfNotExist.js +4 -1
- package/lib/chevre/service/order/deleteOrder.d.ts +2 -0
- package/lib/chevre/service/order/deleteOrder.js +15 -4
- package/lib/chevre/service/order/findPlaceOrderTransaction.d.ts +3 -1
- package/lib/chevre/service/order/findPlaceOrderTransaction.js +1 -2
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +3 -3
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +14 -7
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled.d.ts +2 -4
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled.js +0 -1
- package/lib/chevre/service/order/onOrderStatusChanged/{factory.d.ts → onOrderDelivered/factory.d.ts} +6 -24
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered/factory.js +111 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.d.ts +12 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +64 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.d.ts +10 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.js +103 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.d.ts +23 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.js +180 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +14 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +214 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +2 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.d.ts +4 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +3 -3
- package/lib/chevre/service/order/onOrderStatusChanged.d.ts +7 -15
- package/lib/chevre/service/order/onOrderStatusChanged.js +7 -317
- package/lib/chevre/service/order/onOrderUpdated/factory.d.ts +6 -0
- package/lib/chevre/service/order/onOrderUpdated/factory.js +45 -0
- package/lib/chevre/service/order/onOrderUpdated.js +1 -1
- package/lib/chevre/service/order/payOrder.d.ts +2 -2
- package/lib/chevre/service/order/placeOrder.d.ts +2 -3
- package/lib/chevre/service/order/placeOrder.js +64 -23
- package/lib/chevre/service/order/returnOrder.js +31 -10
- package/lib/chevre/service/order/sendOrder.d.ts +2 -2
- package/lib/chevre/service/order/sendOrder.js +17 -5
- package/lib/chevre/service/order.d.ts +2 -2
- package/lib/chevre/service/order.js +2 -2
- package/lib/chevre/service/payment/any.d.ts +5 -4
- package/lib/chevre/service/payment/any.js +1 -1
- package/lib/chevre/service/payment/creditCard.d.ts +5 -5
- package/lib/chevre/service/payment/creditCard.js +4 -4
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +5 -3
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.js +3 -3
- package/lib/chevre/service/payment/movieTicket/getCredentials.d.ts +14 -5
- package/lib/chevre/service/payment/movieTicket/getCredentials.js +26 -9
- package/lib/chevre/service/payment/movieTicket/validation.d.ts +4 -2
- package/lib/chevre/service/payment/movieTicket.d.ts +11 -7
- package/lib/chevre/service/payment/movieTicket.js +4 -5
- package/lib/chevre/service/payment/paymentCard.js +9 -2
- package/lib/chevre/service/payment.d.ts +4 -0
- package/lib/chevre/service/reserve/searchByOrder.d.ts +21 -0
- package/lib/chevre/service/reserve/searchByOrder.js +113 -0
- package/lib/chevre/service/reserve/verifyToken4reservation.js +0 -11
- package/lib/chevre/service/reserve.d.ts +2 -1
- package/lib/chevre/service/reserve.js +3 -1
- package/lib/chevre/service/task/confirmPayTransaction.js +0 -2
- package/lib/chevre/service/task/deleteTransaction.js +2 -0
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +5 -6
- package/lib/chevre/service/task/onAuthorizationCreated.js +0 -19
- package/lib/chevre/service/task/onOrderPaymentCompleted.js +5 -6
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +3 -6
- package/lib/chevre/service/task/onResourceUpdated.js +1 -1
- package/lib/chevre/service/task/pay.js +2 -1
- package/lib/chevre/service/task/placeOrder.js +10 -17
- package/lib/chevre/service/task/refund.js +2 -1
- package/lib/chevre/service/task/returnPayTransaction.js +3 -2
- package/lib/chevre/service/task/sendOrder.js +10 -17
- package/lib/chevre/service/task/voidPayTransaction.js +2 -3
- package/lib/chevre/service/task/voidPayment.js +2 -0
- package/lib/chevre/service/task/voidRegisterServiceTransaction.js +3 -7
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +2 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.d.ts +0 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +0 -86
- package/lib/chevre/service/transaction/placeOrderInProgress/result.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.d.ts +1 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.d.ts +1 -0
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.js +3 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions.d.ts +1 -0
- package/lib/chevre/service/transaction/returnOrder/potentialActions.js +1 -1
- package/lib/chevre/service/transaction/returnOrder.d.ts +1 -0
- package/lib/chevre/service/transaction/returnOrder.js +64 -58
- package/lib/chevre/settings.d.ts +2 -0
- package/lib/chevre/settings.js +3 -1
- package/package.json +3 -3
- package/example/src/chevre/transaction/findPaymentCardPermit.ts +0 -29
- package/lib/chevre/repo/action/registerServiceInProgress.d.ts +0 -29
- package/lib/chevre/repo/action/registerServiceInProgress.js +0 -58
- package/lib/chevre/service/order/onOrderStatusChanged/factory.js +0 -360
- package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.d.ts +0 -26
- package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.js +0 -65
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Connection } from 'mongoose';
|
|
2
2
|
import * as factory from '../factory';
|
|
3
3
|
type IProjection4searchWithUnwoundAcceptedOffers = {
|
|
4
|
-
[key in keyof
|
|
4
|
+
[key in keyof factory.order.IOrder]?: 1;
|
|
5
5
|
} & {
|
|
6
6
|
_id?: 0 | 1;
|
|
7
7
|
};
|
|
@@ -16,10 +16,38 @@ export declare class MongoRepository {
|
|
|
16
16
|
* オファー展開の注文検索
|
|
17
17
|
*/
|
|
18
18
|
searchWithUnwoundAcceptedOffers(params: factory.order.ISearchConditions, projection?: IProjection4searchWithUnwoundAcceptedOffers): Promise<factory.order.IOrder[]>;
|
|
19
|
+
aggreateOwnershipInfosByOrder(filter: {
|
|
20
|
+
orderNumber: {
|
|
21
|
+
$eq: string;
|
|
22
|
+
};
|
|
23
|
+
}): Promise<{
|
|
24
|
+
identifier: string;
|
|
25
|
+
}[]>;
|
|
19
26
|
/**
|
|
20
|
-
*
|
|
27
|
+
* 注文オファーを展開して検索する
|
|
21
28
|
*/
|
|
22
|
-
|
|
29
|
+
searchAcceptedOffersByOrderNumber(filter: {
|
|
30
|
+
limit?: number;
|
|
31
|
+
page?: number;
|
|
32
|
+
orderNumber: {
|
|
33
|
+
$eq: string;
|
|
34
|
+
};
|
|
35
|
+
project: {
|
|
36
|
+
id: {
|
|
37
|
+
$eq: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* アイテムタイプで絞る場合
|
|
42
|
+
*/
|
|
43
|
+
acceptedOffers?: {
|
|
44
|
+
itemOffered?: {
|
|
45
|
+
typeOf?: {
|
|
46
|
+
$in?: string[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}, inclusion?: (keyof factory.order.IAcceptedOffer<factory.order.IItemOffered>)[]): Promise<factory.order.IAcceptedOffer<factory.order.IItemOffered>[]>;
|
|
23
51
|
/**
|
|
24
52
|
* 特定のフィールド値リストを検索する
|
|
25
53
|
*/
|
|
@@ -28,16 +56,5 @@ export declare class MongoRepository {
|
|
|
28
56
|
$in: string[];
|
|
29
57
|
};
|
|
30
58
|
}, field: IDistinctField): Promise<string[]>;
|
|
31
|
-
/**
|
|
32
|
-
* 注文に含まれるacceptedOffersを検索する
|
|
33
|
-
*/
|
|
34
|
-
searchAcceptedOffersByOrderNumbers(params: {
|
|
35
|
-
orderNumber: {
|
|
36
|
-
$in: string[];
|
|
37
|
-
};
|
|
38
|
-
}): Promise<{
|
|
39
|
-
id: string;
|
|
40
|
-
priceSpecification: factory.order.ITicketPriceSpecification;
|
|
41
|
-
}[]>;
|
|
42
59
|
}
|
|
43
60
|
export {};
|
|
@@ -51,25 +51,62 @@ class MongoRepository {
|
|
|
51
51
|
.exec();
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
+
aggreateOwnershipInfosByOrder(filter) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
const aggregate = this.orderModel.aggregate([
|
|
57
|
+
{
|
|
58
|
+
$unwind: {
|
|
59
|
+
path: '$acceptedOffers',
|
|
60
|
+
includeArrayIndex: 'acceptedOfferIndex'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{ $match: { orderNumber: { $eq: filter.orderNumber.$eq } } },
|
|
64
|
+
{
|
|
65
|
+
$project: {
|
|
66
|
+
_id: 0,
|
|
67
|
+
// acceptedOfferIndex: '$acceptedOfferIndex',
|
|
68
|
+
// itemOfferedTypeOf: '$acceptedOffers.itemOffered.typeOf',
|
|
69
|
+
// customerId: '$customer.id',
|
|
70
|
+
// orderNumber: '$orderNumber',
|
|
71
|
+
identifier: {
|
|
72
|
+
$concat: ['$customer.id', '-', '$acceptedOffers.itemOffered.typeOf', '-', '$orderNumber', '-', { $toString: '$acceptedOfferIndex' }]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]);
|
|
77
|
+
return aggregate
|
|
78
|
+
.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
79
|
+
.exec();
|
|
80
|
+
});
|
|
81
|
+
}
|
|
54
82
|
/**
|
|
55
|
-
*
|
|
83
|
+
* 注文オファーを展開して検索する
|
|
56
84
|
*/
|
|
57
|
-
|
|
58
|
-
var _a;
|
|
85
|
+
searchAcceptedOffersByOrderNumber(filter, inclusion) {
|
|
86
|
+
var _a, _b, _c;
|
|
59
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
88
|
+
const matchStages = [
|
|
89
|
+
{ $match: { 'project.id': { $eq: filter.project.id.$eq } } },
|
|
90
|
+
{ $match: { orderNumber: { $eq: filter.orderNumber.$eq } } }
|
|
91
|
+
];
|
|
92
|
+
const itemOfferedTypeOfIn = (_c = (_b = (_a = filter.acceptedOffers) === null || _a === void 0 ? void 0 : _a.itemOffered) === null || _b === void 0 ? void 0 : _b.typeOf) === null || _c === void 0 ? void 0 : _c.$in;
|
|
93
|
+
if (Array.isArray(itemOfferedTypeOfIn)) {
|
|
94
|
+
matchStages.push({
|
|
95
|
+
$match: { 'acceptedOffers.itemOffered.typeOf': { $exists: true, $in: itemOfferedTypeOfIn } }
|
|
96
|
+
});
|
|
68
97
|
}
|
|
69
|
-
aggregate.
|
|
70
|
-
|
|
71
|
-
aggregate.
|
|
72
|
-
|
|
98
|
+
const aggregate = this.orderModel.aggregate([
|
|
99
|
+
// if (typeof params.sort?.orderDate === 'number') {
|
|
100
|
+
// aggregate.sort({ orderDate: params.sort.orderDate });
|
|
101
|
+
// }
|
|
102
|
+
{
|
|
103
|
+
$unwind: {
|
|
104
|
+
path: '$acceptedOffers'
|
|
105
|
+
// includeArrayIndex: 'elementIndex'
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
...matchStages
|
|
109
|
+
]);
|
|
73
110
|
if (Array.isArray(inclusion) && inclusion.length > 0) {
|
|
74
111
|
const specifiedProjection = {
|
|
75
112
|
_id: 0
|
|
@@ -90,45 +127,16 @@ class MongoRepository {
|
|
|
90
127
|
name: '$acceptedOffers.name'
|
|
91
128
|
});
|
|
92
129
|
}
|
|
93
|
-
if (typeof
|
|
94
|
-
const page = (typeof
|
|
95
|
-
aggregate.limit(
|
|
96
|
-
.skip(
|
|
130
|
+
if (typeof filter.limit === 'number' && filter.limit > 0) {
|
|
131
|
+
const page = (typeof filter.page === 'number' && filter.page > 0) ? filter.page : 1;
|
|
132
|
+
aggregate.limit(filter.limit * page)
|
|
133
|
+
.skip(filter.limit * (page - 1));
|
|
97
134
|
}
|
|
98
135
|
return aggregate
|
|
99
136
|
.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
100
137
|
.exec();
|
|
101
138
|
});
|
|
102
139
|
}
|
|
103
|
-
// public async __searchAcceptedOfferIds(
|
|
104
|
-
// params: factory.order.ISearchConditions
|
|
105
|
-
// ): Promise<(string)[]> {
|
|
106
|
-
// const conditions = OrderRepo.CREATE_MONGO_CONDITIONS(params);
|
|
107
|
-
// const query = this.orderModel.find<Document<any, any, { acceptedOffers: { id: string }[] }>>(
|
|
108
|
-
// (conditions.length > 0) ? { $and: conditions } : {}
|
|
109
|
-
// )
|
|
110
|
-
// .select({
|
|
111
|
-
// 'acceptedOffers.id': 1
|
|
112
|
-
// });
|
|
113
|
-
// const orders = await query.setOptions({ maxTimeMS: MONGO_MAX_TIME_MS })
|
|
114
|
-
// .exec()
|
|
115
|
-
// .then((docs) => docs.map((doc) => {
|
|
116
|
-
// return doc.toObject();
|
|
117
|
-
// }));
|
|
118
|
-
// const offerIds = orders.reduce<string[]>(
|
|
119
|
-
// (a, b) => {
|
|
120
|
-
// const offerIdsByOrder = (Array.isArray(b.acceptedOffers))
|
|
121
|
-
// ? b.acceptedOffers.filter((offer) => typeof offer.id === 'string')
|
|
122
|
-
// .map((offer) => {
|
|
123
|
-
// return String(offer.id);
|
|
124
|
-
// })
|
|
125
|
-
// : [];
|
|
126
|
-
// return [...a, ...offerIdsByOrder];
|
|
127
|
-
// },
|
|
128
|
-
// []
|
|
129
|
-
// );
|
|
130
|
-
// return [...new Set(offerIds)];
|
|
131
|
-
// }
|
|
132
140
|
/**
|
|
133
141
|
* 特定のフィールド値リストを検索する
|
|
134
142
|
*/
|
|
@@ -146,59 +154,5 @@ class MongoRepository {
|
|
|
146
154
|
.exec();
|
|
147
155
|
});
|
|
148
156
|
}
|
|
149
|
-
// public async searchReservationNumbersByOrderNumbers(
|
|
150
|
-
// params: {
|
|
151
|
-
// orderNumber: { $in: string[] };
|
|
152
|
-
// }
|
|
153
|
-
// ): Promise<(string)[]> {
|
|
154
|
-
// if (!Array.isArray(params.orderNumber.$in) || params.orderNumber.$in.length === 0) {
|
|
155
|
-
// return [];
|
|
156
|
-
// }
|
|
157
|
-
// return this.orderModel.distinct(
|
|
158
|
-
// 'acceptedOffers.itemOffered.reservationNumber',
|
|
159
|
-
// {
|
|
160
|
-
// 'acceptedOffers.itemOffered.reservationNumber': { $exists: true },
|
|
161
|
-
// orderNumber: { $in: params.orderNumber.$in }
|
|
162
|
-
// })
|
|
163
|
-
// .setOptions({ maxTimeMS: MONGO_MAX_TIME_MS })
|
|
164
|
-
// .exec();
|
|
165
|
-
// }
|
|
166
|
-
// public async searchReservationForIdsByOrderNumbers(
|
|
167
|
-
// params: {
|
|
168
|
-
// orderNumber: { $in: string[] };
|
|
169
|
-
// }
|
|
170
|
-
// ): Promise<string[]> {
|
|
171
|
-
// if (!Array.isArray(params.orderNumber.$in) || params.orderNumber.$in.length === 0) {
|
|
172
|
-
// return [];
|
|
173
|
-
// }
|
|
174
|
-
// return this.orderModel.distinct(
|
|
175
|
-
// 'acceptedOffers.itemOffered.reservationFor.id',
|
|
176
|
-
// {
|
|
177
|
-
// 'acceptedOffers.itemOffered.reservationFor.id': { $exists: true },
|
|
178
|
-
// orderNumber: { $in: params.orderNumber.$in }
|
|
179
|
-
// })
|
|
180
|
-
// .setOptions({ maxTimeMS: MONGO_MAX_TIME_MS })
|
|
181
|
-
// .exec();
|
|
182
|
-
// }
|
|
183
|
-
/**
|
|
184
|
-
* 注文に含まれるacceptedOffersを検索する
|
|
185
|
-
*/
|
|
186
|
-
searchAcceptedOffersByOrderNumbers(params) {
|
|
187
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
-
if (!Array.isArray(params.orderNumber.$in) || params.orderNumber.$in.length === 0) {
|
|
189
|
-
return [];
|
|
190
|
-
}
|
|
191
|
-
const aggregate = this.orderModel.aggregate();
|
|
192
|
-
aggregate.unwind('$acceptedOffers');
|
|
193
|
-
aggregate.match({ orderNumber: { $in: params.orderNumber.$in } });
|
|
194
|
-
aggregate.project({
|
|
195
|
-
_id: 0,
|
|
196
|
-
id: '$acceptedOffers.id',
|
|
197
|
-
priceSpecification: '$acceptedOffers.priceSpecification'
|
|
198
|
-
});
|
|
199
|
-
return aggregate.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
200
|
-
.exec();
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
157
|
}
|
|
204
158
|
exports.MongoRepository = MongoRepository;
|
|
@@ -36,12 +36,22 @@ export declare class MongoRepository {
|
|
|
36
36
|
/**
|
|
37
37
|
* コンテンツを保管する
|
|
38
38
|
*/
|
|
39
|
-
saveMovie(params: factory.creativeWork.movie.ICreativeWork
|
|
39
|
+
saveMovie(params: factory.creativeWork.movie.ICreativeWork & {
|
|
40
|
+
/**
|
|
41
|
+
* ドキュメント作成時には無視される
|
|
42
|
+
*/
|
|
43
|
+
$unset?: {
|
|
44
|
+
[key in keyof factory.creativeWork.movie.ICreativeWork]?: 1;
|
|
45
|
+
};
|
|
46
|
+
}): Promise<any>;
|
|
40
47
|
/**
|
|
41
48
|
* コードをキーにして冪等作成
|
|
42
49
|
*/
|
|
43
50
|
upsertMoviesByIdentifier(params: {
|
|
44
|
-
|
|
51
|
+
$set: factory.creativeWork.movie.ICreativeWork;
|
|
52
|
+
$unset?: {
|
|
53
|
+
[key in keyof factory.creativeWork.movie.ICreativeWork]?: 1;
|
|
54
|
+
};
|
|
45
55
|
}[], options?: {
|
|
46
56
|
replace?: boolean;
|
|
47
57
|
}): Promise<{
|
|
@@ -121,12 +121,13 @@ class MongoRepository {
|
|
|
121
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
122
|
let doc;
|
|
123
123
|
if (params.id === '') {
|
|
124
|
-
|
|
124
|
+
const { $unset } = params, createParams = __rest(params, ["$unset"]);
|
|
125
|
+
doc = yield this.creativeWorkModel.create(createParams);
|
|
125
126
|
}
|
|
126
127
|
else {
|
|
127
|
-
// 上書き禁止属性を除外
|
|
128
|
-
const { id, identifier, project, typeOf } = params,
|
|
129
|
-
doc = yield this.creativeWorkModel.findOneAndUpdate({ _id: { $eq: params.id } },
|
|
128
|
+
// 上書き禁止属性を除外
|
|
129
|
+
const { id, identifier, project, typeOf, $unset } = params, setFields = __rest(params, ["id", "identifier", "project", "typeOf", "$unset"]);
|
|
130
|
+
doc = yield this.creativeWorkModel.findOneAndUpdate({ _id: { $eq: params.id } }, Object.assign({ $set: setFields }, ($unset !== undefined) ? { $unset } : undefined), { upsert: false, new: true })
|
|
130
131
|
.exec();
|
|
131
132
|
}
|
|
132
133
|
if (doc === null) {
|
|
@@ -143,42 +144,55 @@ class MongoRepository {
|
|
|
143
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
144
145
|
const bulkWriteOps = [];
|
|
145
146
|
if (Array.isArray(params)) {
|
|
146
|
-
|
|
147
|
+
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
148
|
+
params.forEach(({ $set, $unset }) => {
|
|
149
|
+
// リソースのユニークネスを保証するfilter
|
|
150
|
+
const filter = {
|
|
151
|
+
typeOf: $set.typeOf,
|
|
152
|
+
'project.id': { $eq: $set.project.id },
|
|
153
|
+
identifier: { $eq: $set.identifier }
|
|
154
|
+
};
|
|
147
155
|
if ((options === null || options === void 0 ? void 0 : options.replace) === true) {
|
|
148
|
-
|
|
149
|
-
|
|
156
|
+
// updateOneで再実装
|
|
157
|
+
// const replacement: WithoutId<factory.creativeWork.movie.ICreativeWork> = replaceFields;
|
|
158
|
+
// const replaceOne: ReplaceOneModel<factory.creativeWork.movie.ICreativeWork> = {
|
|
159
|
+
// filter,
|
|
160
|
+
// replacement,
|
|
161
|
+
// upsert: true
|
|
162
|
+
// };
|
|
163
|
+
// bulkWriteOps.push({ replaceOne });
|
|
164
|
+
const { id, identifier, project, typeOf } = $set, setFields = __rest($set, ["id", "identifier", "project", "typeOf"]);
|
|
165
|
+
if (typeof identifier !== 'string' || identifier.length === 0) {
|
|
150
166
|
throw new factory.errors.ArgumentNull('identifier');
|
|
151
167
|
}
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
168
|
+
const setOnInsert = {
|
|
169
|
+
typeOf,
|
|
170
|
+
project,
|
|
171
|
+
identifier
|
|
172
|
+
};
|
|
173
|
+
const updateFilter = Object.assign({ $setOnInsert: setOnInsert, $set: setFields }, ($unset !== undefined) ? { $unset } : undefined);
|
|
174
|
+
const updateOne = {
|
|
175
|
+
filter,
|
|
176
|
+
update: updateFilter,
|
|
160
177
|
upsert: true
|
|
161
178
|
};
|
|
162
|
-
bulkWriteOps.push({
|
|
179
|
+
bulkWriteOps.push({ updateOne });
|
|
163
180
|
}
|
|
164
181
|
else {
|
|
165
|
-
const
|
|
182
|
+
const { typeOf, project, identifier, duration, name, additionalProperty, contentRating, headline, distributor, thumbnailUrl, datePublished } = $set, setOnInsertFields = __rest($set, ["typeOf", "project", "identifier", "duration", "name", "additionalProperty", "contentRating", "headline", "distributor", "thumbnailUrl", "datePublished"]);
|
|
166
183
|
if (typeof identifier !== 'string' || identifier.length === 0) {
|
|
167
184
|
throw new factory.errors.ArgumentNull('identifier');
|
|
168
185
|
}
|
|
186
|
+
const setOnInsert = Object.assign(Object.assign({}, setOnInsertFields), { typeOf,
|
|
187
|
+
project,
|
|
188
|
+
identifier });
|
|
169
189
|
const updateFilter = {
|
|
170
|
-
$setOnInsert:
|
|
171
|
-
project,
|
|
172
|
-
identifier }),
|
|
190
|
+
$setOnInsert: setOnInsert,
|
|
173
191
|
// 変更可能な属性のみ上書き
|
|
174
192
|
$set: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (name !== undefined) ? { name } : undefined), (contentRating !== undefined) ? { contentRating } : undefined), (duration !== undefined) ? { duration } : undefined), (headline !== undefined) ? { headline } : undefined), (datePublished !== undefined) ? { datePublished } : undefined), (distributor !== undefined) ? { distributor } : undefined), (typeof thumbnailUrl === 'string') ? { thumbnailUrl } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty } : [])
|
|
175
193
|
};
|
|
176
194
|
const updateOne = {
|
|
177
|
-
filter
|
|
178
|
-
typeOf: typeOf,
|
|
179
|
-
'project.id': { $eq: project.id },
|
|
180
|
-
identifier: { $eq: identifier }
|
|
181
|
-
},
|
|
195
|
+
filter,
|
|
182
196
|
update: updateFilter,
|
|
183
197
|
upsert: true
|
|
184
198
|
};
|
|
@@ -119,6 +119,18 @@ export declare class MongoRepository {
|
|
|
119
119
|
createScreeningEventSeriesIfNotExistByWorkPerformed(params: {
|
|
120
120
|
attributes: factory.event.IAttributes<factory.eventType.ScreeningEventSeries>;
|
|
121
121
|
}[]): Promise<BulkWriteResult | void>;
|
|
122
|
+
/**
|
|
123
|
+
* コンテンツ+バージョンをキーにして冪等置換
|
|
124
|
+
*/
|
|
125
|
+
upsertScreeningEventSeriesByVersion(params: {
|
|
126
|
+
$set: factory.event.IAttributes<factory.eventType.ScreeningEventSeries>;
|
|
127
|
+
$unset?: IUnset<factory.eventType.ScreeningEventSeries>;
|
|
128
|
+
}[]): Promise<{
|
|
129
|
+
bulkWriteResult4insert: BulkWriteResult;
|
|
130
|
+
modifiedEvents: {
|
|
131
|
+
id: string;
|
|
132
|
+
}[];
|
|
133
|
+
} | void>;
|
|
122
134
|
/**
|
|
123
135
|
* イベント部分更新
|
|
124
136
|
*/
|
|
@@ -135,6 +147,9 @@ export declare class MongoRepository {
|
|
|
135
147
|
save<T extends factory.eventType>(params: {
|
|
136
148
|
id?: string;
|
|
137
149
|
attributes: factory.event.IAttributes<T>;
|
|
150
|
+
/**
|
|
151
|
+
* ドキュメント作成時には無視される
|
|
152
|
+
*/
|
|
138
153
|
$unset?: IUnset<T>;
|
|
139
154
|
upsert?: boolean;
|
|
140
155
|
}): Promise<factory.event.IEvent<T>>;
|
package/lib/chevre/repo/event.js
CHANGED
|
@@ -605,6 +605,72 @@ class MongoRepository {
|
|
|
605
605
|
}
|
|
606
606
|
});
|
|
607
607
|
}
|
|
608
|
+
/**
|
|
609
|
+
* コンテンツ+バージョンをキーにして冪等置換
|
|
610
|
+
*/
|
|
611
|
+
// tslint:disable-next-line:max-func-body-length
|
|
612
|
+
upsertScreeningEventSeriesByVersion(params
|
|
613
|
+
// options?: {
|
|
614
|
+
// }
|
|
615
|
+
) {
|
|
616
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
617
|
+
const uniqid = yield Promise.resolve().then(() => require('uniqid'));
|
|
618
|
+
const bulkWriteOps4insert = [];
|
|
619
|
+
// const bulkWriteOps: AnyBulkWriteOperation<factory.event.IAttributes<factory.eventType.ScreeningEventSeries>>[] = [];
|
|
620
|
+
const queryFilters = [];
|
|
621
|
+
if (Array.isArray(params)) {
|
|
622
|
+
params.forEach(({ $set, $unset }) => {
|
|
623
|
+
const version = $set.workPerformed.version;
|
|
624
|
+
if (typeof version !== 'string' || version.length === 0) {
|
|
625
|
+
throw new factory.errors.ArgumentNull('workPerformed.version');
|
|
626
|
+
}
|
|
627
|
+
// リソースのユニークネスを保証するfilter
|
|
628
|
+
const filter = {
|
|
629
|
+
typeOf: $set.typeOf,
|
|
630
|
+
'project.id': { $eq: $set.project.id },
|
|
631
|
+
'location.branchCode': { $exists: true, $eq: $set.location.branchCode },
|
|
632
|
+
'workPerformed.identifier': { $exists: true, $eq: $set.workPerformed.identifier },
|
|
633
|
+
'workPerformed.version': { $exists: true, $eq: version }
|
|
634
|
+
};
|
|
635
|
+
queryFilters.push({
|
|
636
|
+
typeOf: $set.typeOf,
|
|
637
|
+
'project.id': { $eq: $set.project.id },
|
|
638
|
+
'location.branchCode': { $exists: true, $eq: $set.location.branchCode },
|
|
639
|
+
'workPerformed.identifier': { $exists: true, $eq: $set.workPerformed.identifier },
|
|
640
|
+
'workPerformed.version': { $exists: true, $eq: version }
|
|
641
|
+
});
|
|
642
|
+
const { identifier, project, typeOf } = $set, setFields = __rest($set, ["identifier", "project", "typeOf"]);
|
|
643
|
+
const setOnInsert = {
|
|
644
|
+
project,
|
|
645
|
+
typeOf,
|
|
646
|
+
_id: uniqid()
|
|
647
|
+
};
|
|
648
|
+
const updateOne = {
|
|
649
|
+
filter,
|
|
650
|
+
update: Object.assign({ $setOnInsert: setOnInsert, $set: setFields }, ($unset !== undefined) ? { $unset } : undefined),
|
|
651
|
+
upsert: true
|
|
652
|
+
};
|
|
653
|
+
bulkWriteOps4insert.push({ updateOne });
|
|
654
|
+
// updateOneで再実装
|
|
655
|
+
// const replacement: WithoutId<factory.event.IAttributes<factory.eventType.ScreeningEventSeries>> = attributes;
|
|
656
|
+
// const replaceOne: ReplaceOneModel<factory.event.IAttributes<factory.eventType.ScreeningEventSeries>> = {
|
|
657
|
+
// filter,
|
|
658
|
+
// replacement,
|
|
659
|
+
// upsert: true
|
|
660
|
+
// };
|
|
661
|
+
// bulkWriteOps.push({ replaceOne });
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
if (bulkWriteOps4insert.length > 0) {
|
|
665
|
+
const bulkWriteResult4insert = yield this.eventModel.bulkWrite(bulkWriteOps4insert, { ordered: false });
|
|
666
|
+
// const bulkWriteResult = await this.eventModel.bulkWrite(bulkWriteOps, { ordered: false });
|
|
667
|
+
// modifiedの場合upsertedIdsに含まれないので、idを検索する
|
|
668
|
+
const modifiedEvents = yield this.eventModel.find({ $or: queryFilters }, { _id: 1 })
|
|
669
|
+
.exec();
|
|
670
|
+
return { bulkWriteResult4insert, modifiedEvents };
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
}
|
|
608
674
|
/**
|
|
609
675
|
* イベント部分更新
|
|
610
676
|
*/
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSchema = exports.indexes = exports.modelName = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const writeConcern_1 = require("../writeConcern");
|
|
6
|
+
const settings_1 = require("../../../settings");
|
|
7
|
+
const modelName = 'PaymentService';
|
|
8
|
+
exports.modelName = modelName;
|
|
9
|
+
const schemaDefinition = {
|
|
10
|
+
project: mongoose_1.SchemaTypes.Mixed,
|
|
11
|
+
typeOf: { type: String, required: true },
|
|
12
|
+
additionalProperty: [mongoose_1.SchemaTypes.Mixed],
|
|
13
|
+
availableChannel: mongoose_1.SchemaTypes.Mixed,
|
|
14
|
+
description: mongoose_1.SchemaTypes.Mixed,
|
|
15
|
+
name: mongoose_1.SchemaTypes.Mixed,
|
|
16
|
+
productID: { type: String, required: true },
|
|
17
|
+
provider: [mongoose_1.SchemaTypes.Mixed],
|
|
18
|
+
serviceOutput: mongoose_1.SchemaTypes.Mixed,
|
|
19
|
+
serviceType: mongoose_1.SchemaTypes.Mixed
|
|
20
|
+
};
|
|
21
|
+
const schemaOptions = {
|
|
22
|
+
autoIndex: settings_1.MONGO_AUTO_INDEX,
|
|
23
|
+
autoCreate: false,
|
|
24
|
+
collection: 'paymentServices',
|
|
25
|
+
id: true,
|
|
26
|
+
read: settings_1.MONGO_READ_PREFERENCE,
|
|
27
|
+
writeConcern: writeConcern_1.writeConcern,
|
|
28
|
+
strict: true,
|
|
29
|
+
strictQuery: false,
|
|
30
|
+
timestamps: {
|
|
31
|
+
createdAt: 'createdAt',
|
|
32
|
+
updatedAt: 'updatedAt'
|
|
33
|
+
},
|
|
34
|
+
toJSON: {
|
|
35
|
+
getters: false,
|
|
36
|
+
virtuals: false,
|
|
37
|
+
minimize: false,
|
|
38
|
+
versionKey: false
|
|
39
|
+
},
|
|
40
|
+
toObject: {
|
|
41
|
+
getters: false,
|
|
42
|
+
virtuals: true,
|
|
43
|
+
minimize: false,
|
|
44
|
+
versionKey: false
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const indexes = [
|
|
48
|
+
[
|
|
49
|
+
{ createdAt: 1 },
|
|
50
|
+
{ name: 'searchByCreatedAt' }
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
{ updatedAt: 1 },
|
|
54
|
+
{ name: 'searchByUpdatedAt' }
|
|
55
|
+
],
|
|
56
|
+
[
|
|
57
|
+
{ productID: 1 },
|
|
58
|
+
{
|
|
59
|
+
name: 'searchByProductID'
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
[
|
|
63
|
+
{ 'project.id': 1, productID: 1 },
|
|
64
|
+
{
|
|
65
|
+
name: 'uniqueProductID',
|
|
66
|
+
unique: true
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
{ 'serviceOutput.typeOf': 1, productID: 1 },
|
|
71
|
+
{
|
|
72
|
+
name: 'searchByServiceOutputTypeOf',
|
|
73
|
+
partialFilterExpression: {
|
|
74
|
+
'serviceOutput.typeOf': { $exists: true }
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
{ 'serviceOutput.amount.currency': 1, productID: 1 },
|
|
80
|
+
{
|
|
81
|
+
name: 'searchByServiceOutputAmountCurrency',
|
|
82
|
+
partialFilterExpression: {
|
|
83
|
+
'serviceOutput.amount.currency': { $exists: true }
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
{ 'serviceType.codeValue': 1, productID: 1 },
|
|
89
|
+
{
|
|
90
|
+
name: 'searchByServiceTypeCodeValue',
|
|
91
|
+
partialFilterExpression: {
|
|
92
|
+
'serviceType.codeValue': { $exists: true }
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
[
|
|
97
|
+
{ typeOf: 1, productID: 1 },
|
|
98
|
+
{
|
|
99
|
+
name: 'searchByTypeOf'
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
[
|
|
103
|
+
{ 'name.ja': 1, productID: 1 },
|
|
104
|
+
{
|
|
105
|
+
name: 'searchByNameJa',
|
|
106
|
+
partialFilterExpression: {
|
|
107
|
+
'name.ja': { $exists: true }
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
[
|
|
112
|
+
{ 'name.en': 1, productID: 1 },
|
|
113
|
+
{
|
|
114
|
+
name: 'searchByNameEn',
|
|
115
|
+
partialFilterExpression: {
|
|
116
|
+
'name.en': { $exists: true }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
[
|
|
121
|
+
{ 'provider.id': 1, productID: 1 },
|
|
122
|
+
{
|
|
123
|
+
name: 'searchByProviderId',
|
|
124
|
+
partialFilterExpression: {
|
|
125
|
+
'provider.id': { $exists: true }
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
];
|
|
130
|
+
exports.indexes = indexes;
|
|
131
|
+
/**
|
|
132
|
+
* 決済サービススキーマ
|
|
133
|
+
*/
|
|
134
|
+
let schema;
|
|
135
|
+
function createSchema() {
|
|
136
|
+
if (schema === undefined) {
|
|
137
|
+
schema = new mongoose_1.Schema(schemaDefinition, schemaOptions);
|
|
138
|
+
}
|
|
139
|
+
if (settings_1.MONGO_AUTO_INDEX) {
|
|
140
|
+
indexes.forEach((indexParams) => {
|
|
141
|
+
schema === null || schema === void 0 ? void 0 : schema.index(...indexParams);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
return schema;
|
|
145
|
+
}
|
|
146
|
+
exports.createSchema = createSchema;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { BulkWriteResult } from 'mongodb';
|
|
1
2
|
import { AnyExpression, Connection, PipelineStage } from 'mongoose';
|
|
2
3
|
import * as factory from '../factory';
|
|
3
4
|
type IMatchStage = PipelineStage.Match;
|
|
4
|
-
type KeyOfUnitPriceOffer = keyof factory.unitPriceOffer.IUnitPriceOffer
|
|
5
|
+
type KeyOfUnitPriceOffer = keyof Omit<factory.unitPriceOffer.IUnitPriceOffer, 'id'>;
|
|
5
6
|
type IProjection = {
|
|
6
7
|
[key in KeyOfUnitPriceOffer]?: 0 | 1;
|
|
7
8
|
};
|
|
@@ -151,14 +152,22 @@ export declare class MongoRepository {
|
|
|
151
152
|
}[]>;
|
|
152
153
|
count(params: Omit<factory.unitPriceOffer.ISearchConditions, 'limit' | 'page' | 'sort'>): Promise<number>;
|
|
153
154
|
search(params: factory.unitPriceOffer.ISearchConditions, projection?: IProjection): Promise<IUnitPriceOfferFromAggregateOffer[]>;
|
|
154
|
-
save(params: factory.unitPriceOffer.IUnitPriceOffer & {
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
save(params: factory.unitPriceOffer.IUnitPriceOffer & {}): Promise<factory.unitPriceOffer.IUnitPriceOffer>;
|
|
156
|
+
/**
|
|
157
|
+
* コードをキーにして冪等置換(2023-12-13~)
|
|
158
|
+
*/
|
|
159
|
+
upsertByIdentifier(params: Omit<factory.unitPriceOffer.IUnitPriceOffer, 'id'>[]): Promise<{
|
|
160
|
+
bulkWriteResult4insert: BulkWriteResult;
|
|
161
|
+
bulkWriteResult: BulkWriteResult;
|
|
162
|
+
modifiedOffers: {
|
|
163
|
+
id: string;
|
|
164
|
+
}[];
|
|
165
|
+
} | void>;
|
|
157
166
|
/**
|
|
158
167
|
* sskts専用オファー保管
|
|
159
168
|
*/
|
|
160
169
|
saveManyByIdentifier(params: {
|
|
161
|
-
attributes: factory.unitPriceOffer.IUnitPriceOffer
|
|
170
|
+
attributes: Omit<factory.unitPriceOffer.IUnitPriceOffer, 'id'>;
|
|
162
171
|
upsert?: boolean;
|
|
163
172
|
}[]): Promise<void>;
|
|
164
173
|
/**
|