@chevre/domain 21.2.0-alpha.109 → 21.2.0-alpha.110
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/reservation.d.ts +9 -1
- package/lib/chevre/repo/reservation.js +25 -5
- package/lib/chevre/repo/seller.d.ts +1 -1
- package/lib/chevre/repo/seller.js +22 -2
- package/lib/chevre/service/assetTransaction/pay/account/validation.js +1 -1
- package/lib/chevre/service/assetTransaction/pay.js +1 -1
- package/lib/chevre/service/event.js +7 -1
- package/lib/chevre/service/offer.d.ts +5 -2
- package/lib/chevre/service/offer.js +12 -9
- package/lib/chevre/service/payment/creditCard.js +1 -1
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/factory.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/getCredentials.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/validation.js +1 -1
- package/lib/chevre/service/payment/movieTicket.js +2 -2
- package/lib/chevre/service/reserve/confirmReservation.js +19 -11
- package/lib/chevre/service/transaction/moneyTransfer/factory.d.ts +1 -1
- package/lib/chevre/service/transaction/moneyTransfer.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress.js +6 -4
- package/lib/chevre/service/transaction/returnOrder.js +3 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BulkWriteResult as BulkWriteOpResultObject } from 'mongodb';
|
|
1
2
|
import { Connection, UpdateWriteOpResult } from 'mongoose';
|
|
2
3
|
import * as factory from '../factory';
|
|
3
4
|
export interface IUpdatePartiallyParams {
|
|
@@ -38,13 +39,20 @@ export declare class MongoRepository {
|
|
|
38
39
|
broker?: factory.reservation.IBroker<factory.reservationType>;
|
|
39
40
|
issuedThrough?: factory.assetTransaction.reserve.IIssuedThrough;
|
|
40
41
|
}): Promise<void>;
|
|
41
|
-
|
|
42
|
+
confirmByIdIfNotExist__(params: {
|
|
42
43
|
reservation: factory.assetTransaction.reserve.IObjectSubReservation;
|
|
43
44
|
reservationFor: factory.assetTransaction.reserve.IReservationFor;
|
|
44
45
|
underName?: factory.reservation.IUnderName<factory.reservationType.EventReservation>;
|
|
45
46
|
broker?: factory.reservation.IBroker<factory.reservationType>;
|
|
46
47
|
issuedThrough?: factory.assetTransaction.reserve.IIssuedThrough;
|
|
47
48
|
}): Promise<void>;
|
|
49
|
+
confirmManyIfNotExist(params: {
|
|
50
|
+
subReservation: factory.assetTransaction.reserve.IObjectSubReservation[];
|
|
51
|
+
reservationFor: factory.assetTransaction.reserve.IReservationFor;
|
|
52
|
+
underName?: factory.reservation.IUnderName<factory.reservationType.EventReservation>;
|
|
53
|
+
broker?: factory.reservation.IBroker<factory.reservationType>;
|
|
54
|
+
issuedThrough?: factory.assetTransaction.reserve.IIssuedThrough;
|
|
55
|
+
}): Promise<BulkWriteOpResultObject | void>;
|
|
48
56
|
/**
|
|
49
57
|
* 予約取消
|
|
50
58
|
*/
|
|
@@ -10,11 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MongoRepository = void 0;
|
|
13
|
-
const createDebug = require("debug");
|
|
14
13
|
const reservation_1 = require("./mongoose/schemas/reservation");
|
|
15
14
|
const factory = require("../factory");
|
|
16
15
|
const settings_1 = require("../settings");
|
|
17
|
-
const debug = createDebug('chevre-domain:repo');
|
|
18
16
|
/**
|
|
19
17
|
* 予約リポジトリ
|
|
20
18
|
*/
|
|
@@ -915,15 +913,37 @@ class MongoRepository {
|
|
|
915
913
|
.exec();
|
|
916
914
|
});
|
|
917
915
|
}
|
|
918
|
-
|
|
916
|
+
confirmByIdIfNotExist__(params) {
|
|
919
917
|
var _a, _b;
|
|
920
918
|
return __awaiter(this, void 0, void 0, function* () {
|
|
921
|
-
|
|
919
|
+
yield this.reservationModel.findOneAndUpdate({ _id: { $eq: params.reservation.id } }, {
|
|
922
920
|
$setOnInsert: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, params.reservation), { _id: params.reservation.id, reservationFor: params.reservationFor, reservationStatus: factory.reservationStatusType.ReservationConfirmed, modifiedTime: new Date() }), (params.underName !== undefined) ? { underName: params.underName } : undefined), (typeof ((_a = params.broker) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? { broker: params.broker } : undefined), (typeof ((_b = params.issuedThrough) === null || _b === void 0 ? void 0 : _b.typeOf) === 'string') ? { issuedThrough: params.issuedThrough } : undefined)
|
|
923
921
|
}, { upsert: true, new: true })
|
|
924
922
|
.select({ _id: 1 })
|
|
925
923
|
.exec();
|
|
926
|
-
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
confirmManyIfNotExist(params) {
|
|
927
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
928
|
+
const modifiedTime = new Date();
|
|
929
|
+
const bulkWriteOps = [];
|
|
930
|
+
if (Array.isArray(params)) {
|
|
931
|
+
params.subReservation.forEach((subReservation) => {
|
|
932
|
+
var _a, _b;
|
|
933
|
+
bulkWriteOps.push({
|
|
934
|
+
updateOne: {
|
|
935
|
+
filter: { _id: { $eq: subReservation.id } },
|
|
936
|
+
update: {
|
|
937
|
+
$setOnInsert: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, subReservation), { _id: subReservation.id, reservationFor: params.reservationFor, reservationStatus: factory.reservationStatusType.ReservationConfirmed, modifiedTime }), (params.underName !== undefined) ? { underName: params.underName } : undefined), (typeof ((_a = params.broker) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? { broker: params.broker } : undefined), (typeof ((_b = params.issuedThrough) === null || _b === void 0 ? void 0 : _b.typeOf) === 'string') ? { issuedThrough: params.issuedThrough } : undefined)
|
|
938
|
+
},
|
|
939
|
+
upsert: true
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
if (bulkWriteOps.length > 0) {
|
|
945
|
+
return this.reservationModel.bulkWrite(bulkWriteOps, { ordered: false });
|
|
946
|
+
}
|
|
927
947
|
});
|
|
928
948
|
}
|
|
929
949
|
/**
|
|
@@ -124,9 +124,29 @@ class MongoRepository {
|
|
|
124
124
|
/**
|
|
125
125
|
* 特定販売者検索
|
|
126
126
|
*/
|
|
127
|
-
findById(conditions,
|
|
127
|
+
findById(conditions,
|
|
128
|
+
// projection?: any
|
|
129
|
+
inclusion, exclusion) {
|
|
128
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
|
|
131
|
+
let projection = {};
|
|
132
|
+
if (Array.isArray(inclusion) && inclusion.length > 0) {
|
|
133
|
+
inclusion.forEach((field) => {
|
|
134
|
+
projection[field] = 1;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
projection = {
|
|
139
|
+
__v: 0,
|
|
140
|
+
createdAt: 0,
|
|
141
|
+
updatedAt: 0
|
|
142
|
+
};
|
|
143
|
+
if (Array.isArray(exclusion) && exclusion.length > 0) {
|
|
144
|
+
exclusion.forEach((field) => {
|
|
145
|
+
projection[field] = 0;
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const doc = yield this.organizationModel.findOne({ _id: conditions.id }, projection)
|
|
130
150
|
.exec();
|
|
131
151
|
if (doc === null) {
|
|
132
152
|
throw new factory.errors.NotFound(this.organizationModel.modelName);
|
|
@@ -28,7 +28,7 @@ function validateAccount(params) {
|
|
|
28
28
|
if (typeof sellerId !== 'string') {
|
|
29
29
|
throw new factory.errors.ArgumentNull('recipient.id');
|
|
30
30
|
}
|
|
31
|
-
const seller = yield repos.seller.findById({ id: sellerId });
|
|
31
|
+
const seller = yield repos.seller.findById({ id: sellerId }, ['paymentAccepted'], []);
|
|
32
32
|
const paymentAccepted = (_d = seller.paymentAccepted) === null || _d === void 0 ? void 0 : _d.some((a) => a.paymentMethodType === paymentMethodType);
|
|
33
33
|
if (paymentAccepted !== true) {
|
|
34
34
|
throw new factory.errors.Argument('recipient', `payment not accepted`);
|
|
@@ -210,7 +210,7 @@ function validateSeller(params) {
|
|
|
210
210
|
if (typeof sellerId !== 'string') {
|
|
211
211
|
throw new factory.errors.ArgumentNull('recipient.id');
|
|
212
212
|
}
|
|
213
|
-
const seller = yield repos.seller.findById({ id: sellerId });
|
|
213
|
+
const seller = yield repos.seller.findById({ id: sellerId }, ['paymentAccepted'], []);
|
|
214
214
|
const paymentMethodType = (_b = params.object.paymentMethod) === null || _b === void 0 ? void 0 : _b.typeOf;
|
|
215
215
|
if (typeof paymentMethodType !== 'string') {
|
|
216
216
|
throw new factory.errors.ArgumentNull('object.paymentMethod.typeOf');
|
|
@@ -771,7 +771,13 @@ function updateEvent4ttts(params) {
|
|
|
771
771
|
}
|
|
772
772
|
// アクション完了
|
|
773
773
|
yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result: { id: event.id } });
|
|
774
|
-
yield (0, offer_1.onEventChanged)({
|
|
774
|
+
yield (0, offer_1.onEventChanged)({
|
|
775
|
+
id: [event.id],
|
|
776
|
+
project: { id: event.project.id },
|
|
777
|
+
typeOf: event.typeOf,
|
|
778
|
+
isNew: false,
|
|
779
|
+
useInform: true
|
|
780
|
+
})({
|
|
775
781
|
event: repos.event,
|
|
776
782
|
project: repos.project,
|
|
777
783
|
task: repos.task
|
|
@@ -47,12 +47,15 @@ export declare function searchEventSeatOffersWithPaging(params: {
|
|
|
47
47
|
stockHolder: StockHolderRepo;
|
|
48
48
|
place: PlaceRepo;
|
|
49
49
|
}) => Promise<factory.place.seat.IPlaceWithOffer[]>;
|
|
50
|
-
type IChangedEvent = factory.task.onEventChanged.IChangedEvent;
|
|
51
50
|
/**
|
|
52
51
|
* イベント変更時処理
|
|
53
52
|
*/
|
|
54
53
|
export declare function onEventChanged(params: {
|
|
55
|
-
|
|
54
|
+
id: string[];
|
|
55
|
+
typeOf: factory.eventType;
|
|
56
|
+
project: {
|
|
57
|
+
id: string;
|
|
58
|
+
};
|
|
56
59
|
isNew: boolean;
|
|
57
60
|
useInform?: boolean;
|
|
58
61
|
}): (repos: {
|
|
@@ -119,19 +119,20 @@ function searchEventSeatOffersWithPaging(params) {
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
exports.searchEventSeatOffersWithPaging = searchEventSeatOffersWithPaging;
|
|
122
|
+
// type IChangedEvent = factory.task.onEventChanged.IChangedEvent;
|
|
122
123
|
/**
|
|
123
124
|
* イベント変更時処理
|
|
124
125
|
*/
|
|
125
126
|
function onEventChanged(params) {
|
|
126
127
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
127
|
-
const changedEvents = (Array.isArray(params.event)) ? params.event : [params.event];
|
|
128
|
-
if (
|
|
128
|
+
// const changedEvents = (Array.isArray(params.event)) ? params.event : [params.event];
|
|
129
|
+
if (params.id.length > 0) {
|
|
129
130
|
// ScreeningEventであれば集計タスク
|
|
130
|
-
if (
|
|
131
|
+
if (params.typeOf === factory.eventType.ScreeningEvent) {
|
|
131
132
|
yield createAggregateScreeningEventIfNotExist({
|
|
132
|
-
project: { id:
|
|
133
|
-
reservationFor:
|
|
134
|
-
return { id
|
|
133
|
+
project: { id: params.project.id },
|
|
134
|
+
reservationFor: params.id.map((id) => {
|
|
135
|
+
return { id };
|
|
135
136
|
}),
|
|
136
137
|
// 新規作成の場合は強制的に集計
|
|
137
138
|
force: params.isNew
|
|
@@ -140,9 +141,9 @@ function onEventChanged(params) {
|
|
|
140
141
|
// 通知タスク作成(2023-06-08~)
|
|
141
142
|
if (params.useInform === true) {
|
|
142
143
|
yield createInformTasks({
|
|
143
|
-
project: { id:
|
|
144
|
-
ids:
|
|
145
|
-
typeOf:
|
|
144
|
+
project: { id: params.project.id },
|
|
145
|
+
ids: params.id,
|
|
146
|
+
typeOf: params.typeOf
|
|
146
147
|
})(repos);
|
|
147
148
|
}
|
|
148
149
|
}
|
|
@@ -218,6 +219,8 @@ function createInformTasks(params) {
|
|
|
218
219
|
const informUrl = String((_a = informEvent.recipient) === null || _a === void 0 ? void 0 : _a.url);
|
|
219
220
|
events4inform.forEach((event4inform) => {
|
|
220
221
|
var _a;
|
|
222
|
+
// _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
|
|
223
|
+
delete event4inform._id;
|
|
221
224
|
const informActionAttributes = {
|
|
222
225
|
agent: event4inform.project,
|
|
223
226
|
object: event4inform,
|
|
@@ -521,7 +521,7 @@ function processChangeTransaction(params) {
|
|
|
521
521
|
function getGMOInfoFromSeller(params) {
|
|
522
522
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
523
523
|
var _a, _b, _c, _d;
|
|
524
|
-
const seller = yield repos.seller.findById({ id: String(params.seller.id) });
|
|
524
|
+
const seller = yield repos.seller.findById({ id: String(params.seller.id) }, ['paymentAccepted', 'project'], []);
|
|
525
525
|
const paymentAccepted = (_a = seller.paymentAccepted) === null || _a === void 0 ? void 0 : _a.some((a) => a.paymentMethodType === params.paymentMethodType);
|
|
526
526
|
if (paymentAccepted !== true) {
|
|
527
527
|
throw new factory.errors.Argument('transaction', 'payment not accepted');
|
|
@@ -8,7 +8,7 @@ interface ICheckResult {
|
|
|
8
8
|
}
|
|
9
9
|
interface ICheckByIdentifierParams {
|
|
10
10
|
movieTickets: factory.action.check.paymentMethod.movieTicket.IMovieTicket[];
|
|
11
|
-
seller: factory.seller.ISeller
|
|
11
|
+
seller: Pick<factory.seller.ISeller, 'id' | 'project'>;
|
|
12
12
|
screeningEvent: IMinimizedIndividualEvent<factory.eventType.ScreeningEvent>;
|
|
13
13
|
paymentServiceId: string;
|
|
14
14
|
}
|
|
@@ -6,7 +6,7 @@ export declare function createSeatInfoSyncIn(params: {
|
|
|
6
6
|
movieTickets: factory.action.trade.pay.IMovieTicket[];
|
|
7
7
|
event: factory.event.screeningEvent.IEvent;
|
|
8
8
|
purpose: factory.action.trade.pay.IPurpose;
|
|
9
|
-
seller: factory.seller.ISeller
|
|
9
|
+
seller: Pick<factory.seller.ISeller, 'paymentAccepted'>;
|
|
10
10
|
credentials: {
|
|
11
11
|
kgygishCd: string;
|
|
12
12
|
stCd: string;
|
|
@@ -2,7 +2,7 @@ import { MongoRepository as ProductRepo } from '../../../repo/product';
|
|
|
2
2
|
import * as factory from '../../../factory';
|
|
3
3
|
declare function getCredentials(params: {
|
|
4
4
|
paymentMethodType: string;
|
|
5
|
-
seller: factory.seller.ISeller
|
|
5
|
+
seller: Pick<factory.seller.ISeller, 'id' | 'project'>;
|
|
6
6
|
paymentServiceId: string;
|
|
7
7
|
}): (repos: {
|
|
8
8
|
product: ProductRepo;
|
|
@@ -47,7 +47,7 @@ function validateMovieTicket(params, paymentServiceId, useCheckMovieTicketBefore
|
|
|
47
47
|
if (typeof sellerId !== 'string') {
|
|
48
48
|
throw new factory.errors.ArgumentNull('recipient.id');
|
|
49
49
|
}
|
|
50
|
-
const seller = yield repos.seller.findById({ id: sellerId });
|
|
50
|
+
const seller = yield repos.seller.findById({ id: sellerId }, ['paymentAccepted', 'project'], []);
|
|
51
51
|
const paymentAccepted = (_d = seller.paymentAccepted) === null || _d === void 0 ? void 0 : _d.some((a) => a.paymentMethodType === paymentMethodType);
|
|
52
52
|
if (paymentAccepted !== true) {
|
|
53
53
|
throw new factory.errors.Argument('recipient', 'payment not accepted');
|
|
@@ -58,7 +58,7 @@ function checkMovieTicket(params) {
|
|
|
58
58
|
id: eventIds[0]
|
|
59
59
|
});
|
|
60
60
|
// ショップ情報取得
|
|
61
|
-
const seller = yield repos.seller.findById({ id: (_e = params.object[0]) === null || _e === void 0 ? void 0 : _e.seller.id });
|
|
61
|
+
const seller = yield repos.seller.findById({ id: (_e = params.object[0]) === null || _e === void 0 ? void 0 : _e.seller.id }, ['paymentAccepted', 'project'], []);
|
|
62
62
|
const paymentAccepted = (_f = seller.paymentAccepted) === null || _f === void 0 ? void 0 : _f.some((a) => a.paymentMethodType === paymentMethodType);
|
|
63
63
|
if (paymentAccepted !== true) {
|
|
64
64
|
throw new factory.errors.Argument('transactionId', 'payment not accepted');
|
|
@@ -302,7 +302,7 @@ function payActionParams2seatInfoSyncIn(params) {
|
|
|
302
302
|
// イベント取得属性最適化(2023-01-23~)
|
|
303
303
|
// const event = await repos.event.findById<factory.eventType.ScreeningEvent>({ id: eventIds[0] });
|
|
304
304
|
const event = yield repos.event.findMinimizedIndividualEventById({ id: eventIds[0] });
|
|
305
|
-
const seller = yield repos.seller.findById({ id: String((_d = params.recipient) === null || _d === void 0 ? void 0 : _d.id) });
|
|
305
|
+
const seller = yield repos.seller.findById({ id: String((_d = params.recipient) === null || _d === void 0 ? void 0 : _d.id) }, ['paymentAccepted', 'project'], []);
|
|
306
306
|
// 全購入管理番号のMovieTicketをマージ
|
|
307
307
|
const movieTickets = params.object.reduce((a, b) => [...a, ...(Array.isArray(b.movieTickets)) ? b.movieTickets : []], []);
|
|
308
308
|
const sellerCredentials = yield (0, getCredentials_1.getCredentials)({ paymentMethodType, seller, paymentServiceId })(repos);
|
|
@@ -97,17 +97,25 @@ function reserveIfNotYet(params, options) {
|
|
|
97
97
|
if (reserveTransaction.object.disablePendingReservations === true) {
|
|
98
98
|
const reservationFor = reserveTransaction.object.reservationFor;
|
|
99
99
|
const subReservations = reserveTransaction.object.subReservation;
|
|
100
|
-
if (Array.isArray(subReservations)
|
|
101
|
-
|
|
102
|
-
yield
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
100
|
+
if (Array.isArray(subReservations) && typeof (reservationFor === null || reservationFor === void 0 ? void 0 : reservationFor.typeOf) === 'string') {
|
|
101
|
+
// confirmManyに変更(2023-06-13~)
|
|
102
|
+
const confirmManyIfNotExistResult = yield repos.reservation.confirmManyIfNotExist({
|
|
103
|
+
subReservation: subReservations,
|
|
104
|
+
reservationFor,
|
|
105
|
+
underName,
|
|
106
|
+
broker: reserveTransaction.object.broker,
|
|
107
|
+
issuedThrough: reserveTransaction.object.issuedThrough
|
|
108
|
+
});
|
|
109
|
+
debug('confirmManyIfNotExistResult:', confirmManyIfNotExistResult, 'reservationNumber:', reservationPackage.reservationNumber);
|
|
110
|
+
// await Promise.all(subReservations.map(async (subReservation) => {
|
|
111
|
+
// await repos.reservation.confirmByIdIfNotExist({
|
|
112
|
+
// reservation: subReservation,
|
|
113
|
+
// reservationFor,
|
|
114
|
+
// underName,
|
|
115
|
+
// broker: reserveTransaction.object.broker,
|
|
116
|
+
// issuedThrough: reserveTransaction.object.issuedThrough
|
|
117
|
+
// });
|
|
118
|
+
// }));
|
|
111
119
|
}
|
|
112
120
|
}
|
|
113
121
|
else {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
|
-
export declare function createStartParams(params: factory.transaction.moneyTransfer.IStartParamsWithoutDetail, passport: factory.waiter.passport.IPassport | undefined, seller: factory.seller.ISeller, amount: factory.monetaryAmount.IMonetaryAmount, fromLocation: factory.assetTransaction.moneyTransfer.IFromLocationBeforeStart, toLocation: factory.transaction.moneyTransfer.IToLocation, transactionNumber: string): factory.transaction.IStartParams<factory.transactionType.MoneyTransfer>;
|
|
2
|
+
export declare function createStartParams(params: factory.transaction.moneyTransfer.IStartParamsWithoutDetail, passport: factory.waiter.passport.IPassport | undefined, seller: Pick<factory.seller.ISeller, 'id' | 'name' | 'typeOf'>, amount: factory.monetaryAmount.IMonetaryAmount, fromLocation: factory.assetTransaction.moneyTransfer.IFromLocationBeforeStart, toLocation: factory.transaction.moneyTransfer.IToLocation, transactionNumber: string): factory.transaction.IStartParams<factory.transactionType.MoneyTransfer>;
|
|
@@ -28,7 +28,7 @@ const CodeService = require("../code");
|
|
|
28
28
|
*/
|
|
29
29
|
function start(params) {
|
|
30
30
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
const seller = yield repos.seller.findById({ id: params.seller.id });
|
|
31
|
+
const seller = yield repos.seller.findById({ id: params.seller.id }, ['name', 'typeOf'], []);
|
|
32
32
|
const passport = yield (0, validation_1.validateWaiterPassport)(params);
|
|
33
33
|
// 金額をfix
|
|
34
34
|
const amount = params.object.amount;
|
|
@@ -29,10 +29,12 @@ exports.POINT_AWARD_IDENTIFIER_NAME = 'pointAwardIdentifiers';
|
|
|
29
29
|
function start(params) {
|
|
30
30
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
31
31
|
var _a;
|
|
32
|
-
const seller = yield repos.seller.findById({ id: params.seller.id },
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
const seller = yield repos.seller.findById({ id: params.seller.id }, ['name', 'project', 'typeOf', 'makesOffer'], []
|
|
33
|
+
// {
|
|
34
|
+
// hasMerchantReturnPolicy: 0,
|
|
35
|
+
// paymentAccepted: 0
|
|
36
|
+
// }
|
|
37
|
+
);
|
|
36
38
|
let makesOfferFromClient;
|
|
37
39
|
// 販売者オファー検証(2022-10-14~)
|
|
38
40
|
if (params.validateSeller === true) {
|
|
@@ -29,7 +29,9 @@ function start(params) {
|
|
|
29
29
|
const now = new Date();
|
|
30
30
|
const { acceptedOffers, eventIds, offerIds, orders } = yield fixOrders(params)(repos);
|
|
31
31
|
// sellerはorderから自動取得
|
|
32
|
-
const seller = yield repos.seller.findById({ id: String(orders[0].seller.id) },
|
|
32
|
+
const seller = yield repos.seller.findById({ id: String(orders[0].seller.id) }, ['name', 'project', 'hasMerchantReturnPolicy', 'typeOf'], []
|
|
33
|
+
// { additionalProperty: 0, paymentAccepted: 0 }
|
|
34
|
+
);
|
|
33
35
|
yield validateOrder({ orders })(repos);
|
|
34
36
|
let offers = [];
|
|
35
37
|
if (offerIds.length > 0) {
|
package/package.json
CHANGED