@chevre/domain 24.0.0-alpha.47 → 24.0.0-alpha.49
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/factory/reservation/createMongoConditions.d.ts +1 -1
- package/lib/chevre/repo/factory/reservation/createMongoConditions.js +2 -2
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +1 -1
- package/lib/chevre/repo/reservation.d.ts +13 -8
- package/lib/chevre/repo/reservation.js +1 -1
- package/lib/chevre/service/assetTransaction/cancelReservation/factory.d.ts +2 -2
- package/lib/chevre/service/assetTransaction/cancelReservation/start.d.ts +2 -2
- package/lib/chevre/service/assetTransaction/reserve/confirm/factory.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.d.ts +2 -2
- package/lib/chevre/service/assetTransaction/reserve/start/factory/createStartParams.js +1 -9
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +1 -1
- package/lib/chevre/service/offer/event/authorize/factory.js +18 -18
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +21 -37
- package/lib/chevre/service/reserve/cancelReservation.d.ts +1 -1
- package/lib/chevre/service/reserve/cancelReservation.js +12 -8
- package/lib/chevre/service/reserve/confirmReservation.js +9 -5
- package/lib/chevre/service/reserve/factory.d.ts +2 -2
- package/lib/chevre/service/reserve/findByCode.d.ts +1 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +5 -2
- package/lib/chevre/service/reserve/searchByOrder.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { FilterQuery } from 'mongoose';
|
|
2
2
|
import * as factory from '../../../factory';
|
|
3
|
-
export declare function CREATE_MONGO_CONDITIONS(params: factory.reservation.ISearchConditions
|
|
3
|
+
export declare function CREATE_MONGO_CONDITIONS(params: factory.reservation.eventReservation.ISearchConditions): FilterQuery<import("@chevre/factory/lib/reservation/event").IReservation>[];
|
|
@@ -407,8 +407,8 @@ function CREATE_MONGO_CONDITIONS(params) {
|
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
break;
|
|
410
|
-
case factory.reservationType.ReservationPackage:
|
|
411
|
-
|
|
410
|
+
// case factory.reservationType.ReservationPackage:
|
|
411
|
+
// break;
|
|
412
412
|
default:
|
|
413
413
|
}
|
|
414
414
|
/* istanbul ignore else */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
|
|
2
2
|
import { IVirtuals } from '../virtuals';
|
|
3
3
|
import * as factory from '../../../factory';
|
|
4
|
-
type IDocType = (Omit<factory.reservation.IReservation
|
|
4
|
+
type IDocType = (Omit<factory.reservation.eventReservation.IReservation, 'id'>) & {
|
|
5
5
|
_id: string;
|
|
6
6
|
bookingAgent?: any;
|
|
7
7
|
previousReservationStatus?: factory.reservationStatusType;
|
|
@@ -7,16 +7,21 @@ export interface IUpdatePartiallyParams {
|
|
|
7
7
|
}
|
|
8
8
|
export type ICancelResult = UpdateWriteOpResult;
|
|
9
9
|
export type ICheckedInResult = UpdateWriteOpResult;
|
|
10
|
-
export type ICreatingReservation
|
|
10
|
+
export type ICreatingReservation = Omit<factory.reservation.eventReservation.IReservation, 'id' | 'price' | 'reservedTicket'> & {
|
|
11
11
|
_id: string;
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* priceは廃止予定だが、互換性維持対応としてひとまず型を強制的に合わせる
|
|
14
|
+
*/
|
|
15
|
+
price?: factory.reservation.eventReservation.IPrice;
|
|
16
|
+
reservedTicket: factory.assetTransaction.reserve.ISubReservationReservedTicket;
|
|
17
|
+
};
|
|
13
18
|
/**
|
|
14
19
|
* 廃止予定の予約属性
|
|
15
20
|
*/
|
|
16
21
|
export type IDeprecatedField = 'price' | 'underName';
|
|
17
22
|
export type IKeyOfProjection = Exclude<keyof factory.reservation.eventReservation.IReservation, IDeprecatedField> | 'reservedTicket.dateUsed' | 'reservationFor.id' | 'reservationFor.typeOf';
|
|
18
|
-
export type IAttendedReservation = Pick<factory.reservation.IReservation
|
|
19
|
-
reservationFor: Pick<factory.reservation.IReservationFor
|
|
23
|
+
export type IAttendedReservation = Pick<factory.reservation.eventReservation.IReservation, 'id' | 'typeOf' | 'project' | 'modifiedTime'> & {
|
|
24
|
+
reservationFor: Pick<factory.reservation.eventReservation.IReservationFor, 'id' | 'typeOf'>;
|
|
20
25
|
reservedTicket: Pick<factory.reservation.eventReservation.IReservedTicket, 'dateUsed'>;
|
|
21
26
|
};
|
|
22
27
|
export type IReservationAsFindResult = Omit<factory.reservation.eventReservation.IReservation, IDeprecatedField> & {
|
|
@@ -38,7 +43,7 @@ export declare class ReservationRepo {
|
|
|
38
43
|
/**
|
|
39
44
|
* 汎用予約カウント
|
|
40
45
|
*/
|
|
41
|
-
count
|
|
46
|
+
count(params: factory.reservation.eventReservation.ISearchConditions): Promise<number>;
|
|
42
47
|
/**
|
|
43
48
|
* 予約検索
|
|
44
49
|
*/
|
|
@@ -57,13 +62,13 @@ export declare class ReservationRepo {
|
|
|
57
62
|
issuedThrough: factory.assetTransaction.reserve.IIssuedThrough;
|
|
58
63
|
reservationFor: factory.assetTransaction.reserve.IReservationFor;
|
|
59
64
|
reservationNumber: string;
|
|
60
|
-
underName?: factory.reservation.IUnderName
|
|
61
|
-
broker?: factory.reservation.IBroker
|
|
65
|
+
underName?: factory.reservation.IUnderName;
|
|
66
|
+
broker?: factory.reservation.IBroker;
|
|
62
67
|
}): Promise<BulkWriteResult | undefined>;
|
|
63
68
|
/**
|
|
64
69
|
* 予約取消
|
|
65
70
|
*/
|
|
66
|
-
cancelById
|
|
71
|
+
cancelById(params: {
|
|
67
72
|
id: string;
|
|
68
73
|
previousReservationStatus?: factory.reservationStatusType;
|
|
69
74
|
modifiedTime: Date;
|
|
@@ -140,7 +140,7 @@ class ReservationRepo {
|
|
|
140
140
|
switch (subReservation.typeOf) {
|
|
141
141
|
case factory.reservationType.EventReservation:
|
|
142
142
|
setOnInsert = {
|
|
143
|
-
...subReservation,
|
|
143
|
+
...subReservation,
|
|
144
144
|
_id: subReservation.id,
|
|
145
145
|
bookingTime: params.bookingTime,
|
|
146
146
|
checkedIn: false,
|
|
@@ -9,8 +9,8 @@ export declare function createStartParams(params: {
|
|
|
9
9
|
project: factory.assetTransaction.IProject;
|
|
10
10
|
transactionNumber: string;
|
|
11
11
|
transaction?: factory.assetTransaction.ITransaction<factory.assetTransactionType.Reserve>;
|
|
12
|
-
reservations?: (Pick<factory.reservation.IReservation
|
|
13
|
-
reservationFor: Pick<factory.reservation.IReservationFor
|
|
12
|
+
reservations?: (Pick<factory.reservation.eventReservation.IReservation, 'id' | 'issuedThrough' | 'typeOf' | 'reservationNumber'> & {
|
|
13
|
+
reservationFor: Pick<factory.reservation.eventReservation.IReservationFor, 'id' | 'typeOf'>;
|
|
14
14
|
})[];
|
|
15
15
|
}): factory.assetTransaction.IStartParams<factory.assetTransactionType.CancelReservation>;
|
|
16
16
|
export declare function createPotentialActions(params: {
|
|
@@ -18,8 +18,8 @@ export declare function validateStartParams(params: IStartParams): (repos: {
|
|
|
18
18
|
assetTransaction: AssetTransactionRepo;
|
|
19
19
|
}) => Promise<{
|
|
20
20
|
reserveTransaction: import("@chevre/factory/lib/assetTransaction/reserve").ITransaction | undefined;
|
|
21
|
-
reservations: (Pick<import("@chevre/factory/lib/reservation/event").IReservation, "id" | "typeOf" | "
|
|
22
|
-
reservationFor: Pick<factory.reservation.IReservationFor
|
|
21
|
+
reservations: (Pick<import("@chevre/factory/lib/reservation/event").IReservation, "id" | "typeOf" | "reservationNumber" | "issuedThrough"> & {
|
|
22
|
+
reservationFor: Pick<factory.reservation.eventReservation.IReservationFor, "id" | "typeOf">;
|
|
23
23
|
})[] | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
/**
|
|
@@ -3,6 +3,6 @@ declare function createPotentialActions(params: {
|
|
|
3
3
|
order?: Pick<factory.order.IOrder, 'orderNumber' | 'customer' | 'typeOf'>;
|
|
4
4
|
}): {
|
|
5
5
|
potentialActions: factory.assetTransaction.reserve.IPotentialActions;
|
|
6
|
-
underName?: factory.reservation.IUnderName
|
|
6
|
+
underName?: factory.reservation.IUnderName;
|
|
7
7
|
};
|
|
8
8
|
export { createPotentialActions };
|
|
@@ -46,8 +46,8 @@ declare function createReservation(params: {
|
|
|
46
46
|
ticketOffer: factory.product.ITicketOffer;
|
|
47
47
|
seatPriceComponent: factory.place.seat.IPriceComponent[];
|
|
48
48
|
acceptedAddOns: IAcceptedAddOn[];
|
|
49
|
-
subReservation?: factory.reservation.ISubReservation
|
|
50
|
-
programMembershipUsed?: factory.reservation.IProgramMembershipUsed
|
|
49
|
+
subReservation?: factory.reservation.eventReservation.ISubReservation[];
|
|
50
|
+
programMembershipUsed?: factory.reservation.IProgramMembershipUsed;
|
|
51
51
|
availableOffer: factory.unitPriceOffer.IUnitPriceOffer;
|
|
52
52
|
appliesToMovieTicket?: factory.assetTransaction.reserve.IAcceptedAppliesToMovieTicket;
|
|
53
53
|
validateAppliesToMovieTicket: boolean;
|
|
@@ -25,7 +25,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.createStartParams = createStartParams;
|
|
27
27
|
const factory = __importStar(require("../../../../../factory"));
|
|
28
|
-
const USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL = process.env.USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL === '1';
|
|
29
28
|
function createStartParams(params) {
|
|
30
29
|
const { reservationNumber, acceptedOffers4transactionObject, objectSubReservations, agent, expires, project, instrument } = params;
|
|
31
30
|
const provider = {
|
|
@@ -126,12 +125,6 @@ function createIssuedThrough(params) {
|
|
|
126
125
|
typeOf: 'CategoryCode'
|
|
127
126
|
}
|
|
128
127
|
: undefined;
|
|
129
|
-
const availableChannel = eventOffers.itemOffered.availableChannel;
|
|
130
|
-
// itemOffered.availableChannel: optional(20226-03-24~)
|
|
131
|
-
// if (availableChannel === undefined) {
|
|
132
|
-
// // availableChannelは必ず存在するはず
|
|
133
|
-
// throw new factory.errors.NotFound('reservationFor.offers.availableChannel');
|
|
134
|
-
// }
|
|
135
128
|
if (typeof eventOffers.itemOffered.id !== 'string') {
|
|
136
129
|
// availableChannelは必ず存在するはず
|
|
137
130
|
throw new factory.errors.NotFound('reservationFor.offers.itemOffered.id');
|
|
@@ -142,8 +135,7 @@ function createIssuedThrough(params) {
|
|
|
142
135
|
// 興行IDを追加(2022-09-08~)
|
|
143
136
|
id: eventOffers.itemOffered.id,
|
|
144
137
|
// issuedThrough.serviceTypeを連携
|
|
145
|
-
...(typeof serviceTypeOfIssuedThrough?.typeOf === 'string') ? { serviceType: serviceTypeOfIssuedThrough } : undefined
|
|
146
|
-
...(USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL) && { availableChannel }
|
|
138
|
+
...(typeof serviceTypeOfIssuedThrough?.typeOf === 'string') ? { serviceType: serviceTypeOfIssuedThrough } : undefined
|
|
147
139
|
};
|
|
148
140
|
return {
|
|
149
141
|
issuedThrough
|
|
@@ -8,7 +8,7 @@ declare function createReserveTransactionStartParams(params: {
|
|
|
8
8
|
event: {
|
|
9
9
|
id: string;
|
|
10
10
|
};
|
|
11
|
-
broker?: factory.reservation.IBroker
|
|
11
|
+
broker?: factory.reservation.IBroker;
|
|
12
12
|
transaction: Pick<factory.transaction.ITransaction<factory.transactionType.PlaceOrder>, 'expires' | 'seller'>;
|
|
13
13
|
transactionNumber: string;
|
|
14
14
|
}): factory.assetTransaction.reserve.IStartParamsWithoutDetail;
|
|
@@ -357,6 +357,23 @@ function createReservation(params) {
|
|
|
357
357
|
? { duration: event.superEvent.workPerformed.duration }
|
|
358
358
|
: undefined
|
|
359
359
|
};
|
|
360
|
+
const superEvent = {
|
|
361
|
+
typeOf: event.superEvent.typeOf,
|
|
362
|
+
id: event.superEvent.id,
|
|
363
|
+
location: event.superEvent.location,
|
|
364
|
+
name: event.superEvent.name,
|
|
365
|
+
soundFormat: event.superEvent.soundFormat,
|
|
366
|
+
workPerformed,
|
|
367
|
+
...(typeof event.superEvent.duration === 'string') ? { duration: event.superEvent.duration } : undefined,
|
|
368
|
+
...(event.superEvent.headline !== undefined) ? { headline: event.superEvent.headline } : undefined
|
|
369
|
+
// videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
|
|
370
|
+
// ...(USE_DEPRECATED_VIDEO_FORMAT)
|
|
371
|
+
// ? {
|
|
372
|
+
// // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
373
|
+
// videoFormat: (<any>event.superEvent).videoFormat
|
|
374
|
+
// }
|
|
375
|
+
// : undefined
|
|
376
|
+
};
|
|
360
377
|
const reservationFor = {
|
|
361
378
|
typeOf: event.typeOf,
|
|
362
379
|
id: event.id,
|
|
@@ -368,24 +385,7 @@ function createReservation(params) {
|
|
|
368
385
|
.toDate(),
|
|
369
386
|
startDate: (0, moment_1.default)(event.startDate)
|
|
370
387
|
.toDate(),
|
|
371
|
-
|
|
372
|
-
superEvent: {
|
|
373
|
-
typeOf: event.superEvent.typeOf,
|
|
374
|
-
id: event.superEvent.id,
|
|
375
|
-
location: event.superEvent.location,
|
|
376
|
-
name: event.superEvent.name,
|
|
377
|
-
soundFormat: event.superEvent.soundFormat,
|
|
378
|
-
workPerformed,
|
|
379
|
-
...(typeof event.superEvent.duration === 'string') ? { duration: event.superEvent.duration } : undefined,
|
|
380
|
-
...(event.superEvent.headline !== undefined) ? { headline: event.superEvent.headline } : undefined
|
|
381
|
-
// videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
|
|
382
|
-
// ...(USE_DEPRECATED_VIDEO_FORMAT)
|
|
383
|
-
// ? {
|
|
384
|
-
// // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
385
|
-
// videoFormat: (<any>event.superEvent).videoFormat
|
|
386
|
-
// }
|
|
387
|
-
// : undefined
|
|
388
|
-
}
|
|
388
|
+
superEvent
|
|
389
389
|
};
|
|
390
390
|
if (params.issuedThrough.typeOf !== factory.product.ProductType.EventService) {
|
|
391
391
|
throw new factory.errors.Argument('issuedThrough', `issuedThrough.typeOf must be ${factory.product.ProductType.EventService}`);
|
|
@@ -32,7 +32,7 @@ declare function processStartReserve4chevre(params: {
|
|
|
32
32
|
identifier?: string;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
broker?: factory.reservation.IBroker
|
|
35
|
+
broker?: factory.reservation.IBroker;
|
|
36
36
|
transactionNumber: string;
|
|
37
37
|
transaction: Pick<factory.transaction.ITransaction<factory.transactionType.PlaceOrder>, 'agent' | 'expires' | 'id' | 'project' | 'seller' | 'typeOf'>;
|
|
38
38
|
availableAtOrFrom: {
|
|
@@ -22,7 +22,7 @@ export declare function offers2resultPrice(offers: IAcceptedOffer4COA[]): {
|
|
|
22
22
|
price: number;
|
|
23
23
|
eligibleMonetaryAmount: never[];
|
|
24
24
|
};
|
|
25
|
-
type IResultAcceptedOffer = factory.order.IAcceptedOffer<factory.order.
|
|
25
|
+
type IResultAcceptedOffer = factory.order.IAcceptedOffer<factory.order.ICOAEventReservation>;
|
|
26
26
|
/**
|
|
27
27
|
* COA仮予約結果から注文アイテムを生成する
|
|
28
28
|
*/
|
|
@@ -32,7 +32,6 @@ exports.responseBody2acceptedOffers4result = responseBody2acceptedOffers4result;
|
|
|
32
32
|
const moment_1 = __importDefault(require("moment"));
|
|
33
33
|
const util = __importStar(require("util"));
|
|
34
34
|
const factory = __importStar(require("../../../../factory"));
|
|
35
|
-
const USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL = process.env.USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL === '1';
|
|
36
35
|
function createAuthorizeSeatReservationActionAttributes(params) {
|
|
37
36
|
const transaction = params.transaction;
|
|
38
37
|
// 最適化(2022-06-07~)
|
|
@@ -135,6 +134,25 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
135
134
|
? { id: event.superEvent.workPerformed.id }
|
|
136
135
|
: undefined // redefine(2025-01-03~)
|
|
137
136
|
};
|
|
137
|
+
const superEvent = {
|
|
138
|
+
typeOf: event.superEvent.typeOf,
|
|
139
|
+
id: event.superEvent.id,
|
|
140
|
+
identifier: event.superEvent.identifier,
|
|
141
|
+
name: event.superEvent.name,
|
|
142
|
+
alternativeHeadline: event.superEvent.alternativeHeadline,
|
|
143
|
+
location: event.superEvent.location,
|
|
144
|
+
soundFormat: event.superEvent.soundFormat,
|
|
145
|
+
workPerformed: workPerformed,
|
|
146
|
+
duration: event.superEvent.duration,
|
|
147
|
+
coaInfo: event.superEvent.coaInfo
|
|
148
|
+
// videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
|
|
149
|
+
// ...(USE_DEPRECATED_VIDEO_FORMAT)
|
|
150
|
+
// ? {
|
|
151
|
+
// // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
152
|
+
// videoFormat: (<any>event.superEvent).videoFormat
|
|
153
|
+
// }
|
|
154
|
+
// : undefined
|
|
155
|
+
};
|
|
138
156
|
const reservationFor = {
|
|
139
157
|
typeOf: event.typeOf,
|
|
140
158
|
coaInfo: event.coaInfo,
|
|
@@ -155,25 +173,7 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
155
173
|
name: event.name,
|
|
156
174
|
startDate: (0, moment_1.default)(event.startDate)
|
|
157
175
|
.toDate(),
|
|
158
|
-
superEvent
|
|
159
|
-
typeOf: event.superEvent.typeOf,
|
|
160
|
-
id: event.superEvent.id,
|
|
161
|
-
identifier: event.superEvent.identifier,
|
|
162
|
-
name: event.superEvent.name,
|
|
163
|
-
alternativeHeadline: event.superEvent.alternativeHeadline,
|
|
164
|
-
location: event.superEvent.location,
|
|
165
|
-
soundFormat: event.superEvent.soundFormat,
|
|
166
|
-
workPerformed: workPerformed,
|
|
167
|
-
duration: event.superEvent.duration,
|
|
168
|
-
coaInfo: event.superEvent.coaInfo
|
|
169
|
-
// videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
|
|
170
|
-
// ...(USE_DEPRECATED_VIDEO_FORMAT)
|
|
171
|
-
// ? {
|
|
172
|
-
// // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
|
|
173
|
-
// videoFormat: (<any>event.superEvent).videoFormat
|
|
174
|
-
// }
|
|
175
|
-
// : undefined
|
|
176
|
-
},
|
|
176
|
+
superEvent,
|
|
177
177
|
id: event.id
|
|
178
178
|
};
|
|
179
179
|
const ticketNumber = util.format('%s:%s:%s', reservationFor.id, tmpReserve.seatSection, tmpReserve.seatNum);
|
|
@@ -205,24 +205,8 @@ function responseBody2acceptedOffers4result(params) {
|
|
|
205
205
|
const additionalProperty = requestedOffer.itemOffered?.serviceOutput?.additionalProperty;
|
|
206
206
|
const additionalTicketText = requestedOffer.itemOffered?.serviceOutput?.additionalTicketText;
|
|
207
207
|
const issuedThrough = {
|
|
208
|
-
typeOf: factory.product.ProductType.EventService
|
|
208
|
+
typeOf: factory.product.ProductType.EventService
|
|
209
209
|
// id: '', // discontinue(2025-01-02~)
|
|
210
|
-
...(USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL) && {
|
|
211
|
-
availableChannel: {
|
|
212
|
-
typeOf: 'ServiceChannel',
|
|
213
|
-
serviceLocation: {
|
|
214
|
-
typeOf: reservationFor.location.typeOf,
|
|
215
|
-
branchCode: reservationFor.location.branchCode,
|
|
216
|
-
name: reservationFor.location.name,
|
|
217
|
-
containedInPlace: {
|
|
218
|
-
typeOf: reservationFor.superEvent.location.typeOf,
|
|
219
|
-
id: reservationFor.superEvent.location.id,
|
|
220
|
-
branchCode: reservationFor.superEvent.location.branchCode,
|
|
221
|
-
name: reservationFor.superEvent.location.name
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
210
|
};
|
|
227
211
|
const reservation = {
|
|
228
212
|
typeOf: factory.reservationType.EventReservation,
|
|
@@ -36,7 +36,7 @@ declare function processUnlockOfferRateLimit(params: {
|
|
|
36
36
|
};
|
|
37
37
|
reservation: {
|
|
38
38
|
reservationNumber: string;
|
|
39
|
-
reservedTicket: factory.
|
|
39
|
+
reservedTicket: Pick<factory.assetTransaction.reserve.ISubReservationReservedTicket, 'ticketType'>;
|
|
40
40
|
};
|
|
41
41
|
reservationFor: factory.assetTransaction.reserve.IReservationFor;
|
|
42
42
|
}): (repos: {
|
|
@@ -276,14 +276,18 @@ function cancelReservation(actionAttributesList) {
|
|
|
276
276
|
expectedHolder
|
|
277
277
|
})(repos);
|
|
278
278
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
279
|
+
const subReservationByTransaction = reserveTransaction?.object.subReservation?.find((s) => s.id === reservation.id);
|
|
280
|
+
if (subReservationByTransaction !== undefined) {
|
|
281
|
+
await processUnlockOfferRateLimit({
|
|
282
|
+
project: { id: reservation.project.id },
|
|
283
|
+
reservation: {
|
|
284
|
+
reservationNumber: reservation.reservationNumber,
|
|
285
|
+
// reservedTicket: reservation.reservedTicket
|
|
286
|
+
reservedTicket: subReservationByTransaction.reservedTicket
|
|
287
|
+
},
|
|
288
|
+
reservationFor: reservation.reservationFor
|
|
289
|
+
})(repos);
|
|
290
|
+
}
|
|
287
291
|
// 予約をキャンセル状態に変更する
|
|
288
292
|
await repos.reservation.cancelById({
|
|
289
293
|
id: reservation.id,
|
|
@@ -65,17 +65,21 @@ function confirmReservation(params) {
|
|
|
65
65
|
// price,underName,ticketTypeは予約取引から補完する(2026-03-25~)
|
|
66
66
|
confirmedReservations = rawReservations.map((rawReservation) => {
|
|
67
67
|
const subReservationByTransaction = reserveTransaction.object.subReservation?.find((s) => s.id === rawReservation.id);
|
|
68
|
-
|
|
68
|
+
// 予約取引内にsubReservationは必ず存在するはず
|
|
69
|
+
if (subReservationByTransaction === undefined) {
|
|
70
|
+
throw new factory.errors.NotFound('reserveTransaction.object.subReservation');
|
|
71
|
+
}
|
|
72
|
+
const priceByTransaction = subReservationByTransaction.price;
|
|
69
73
|
const underNameByTransaction = reserveTransaction.object.underName;
|
|
70
|
-
const ticketTypeByTransaction = subReservationByTransaction
|
|
74
|
+
const ticketTypeByTransaction = subReservationByTransaction.reservedTicket.ticketType;
|
|
71
75
|
// console.log('creating confirmedReservation...', rawReservation, priceByTransaction, underNameByTransaction, ticketTypeByTransaction);
|
|
72
76
|
return {
|
|
73
77
|
...rawReservation,
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
price: priceByTransaction,
|
|
79
|
+
underName: underNameByTransaction,
|
|
76
80
|
reservedTicket: {
|
|
77
81
|
...rawReservation.reservedTicket,
|
|
78
|
-
|
|
82
|
+
ticketType: ticketTypeByTransaction
|
|
79
83
|
}
|
|
80
84
|
};
|
|
81
85
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
export declare function optimizeUnderName4inform(params: {
|
|
3
|
-
underName: factory.reservation.IUnderName
|
|
3
|
+
underName: factory.reservation.IUnderName;
|
|
4
4
|
}): factory.notification.reservation.IMaskedUnderName;
|
|
5
5
|
export type IPotentialInformReservationAction = factory.task.triggerWebhook.IPotentialInformReservationAction;
|
|
6
6
|
export declare const NUM_TRY_INFORM_RESERVATION = 10;
|
|
@@ -8,7 +8,7 @@ export declare function createMoneyTransferActions(params: {
|
|
|
8
8
|
acceptedOffer?: factory.assetTransaction.reserve.IAcceptedOffer4object;
|
|
9
9
|
reservation: Pick<factory.assetTransaction.reserve.IObjectSubReservation, 'reservedTicket'>;
|
|
10
10
|
transaction: factory.assetTransaction.ITransaction<factory.assetTransactionType.Reserve>;
|
|
11
|
-
underName?: factory.reservation.IUnderName
|
|
11
|
+
underName?: factory.reservation.IUnderName;
|
|
12
12
|
}): import("@chevre/factory/lib/action/transfer/moneyTransfer").IAttributes[];
|
|
13
13
|
export interface IPotentialCancelAction extends factory.action.cancel.reservation.IAttributes {
|
|
14
14
|
purpose: {
|
|
@@ -3,8 +3,7 @@ import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
|
3
3
|
import type { AuthorizationRepo } from '../../repo/authorization';
|
|
4
4
|
import type { OrderRepo } from '../../repo/order';
|
|
5
5
|
import type { ReservationRepo } from '../../repo/reservation';
|
|
6
|
-
type
|
|
7
|
-
type IReservationResult = Pick<factory.reservation.IReservation<AvailableReservationType>, 'id' | 'additionalTicketText' | 'checkedIn' | 'reservationStatus'> & {
|
|
6
|
+
type IReservationResult = Pick<factory.reservation.eventReservation.IReservation, 'id' | 'additionalTicketText' | 'checkedIn' | 'reservationStatus'> & {
|
|
8
7
|
reservedTicket: {
|
|
9
8
|
ticketType: Pick<factory.reservation.eventReservation.ITicketType, 'identifier'> & {
|
|
10
9
|
name: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as factory from '../../../factory';
|
|
5
5
|
import type { SettingRepo } from '../../../repo/setting';
|
|
6
6
|
import type { TaskRepo } from '../../../repo/task';
|
|
7
|
-
export type ICanceledEventReservation = Pick<factory.reservation.IReservation
|
|
7
|
+
export type ICanceledEventReservation = Pick<factory.reservation.eventReservation.IReservation, 'project' | 'id' | 'typeOf' | 'modifiedTime' | 'reservationNumber'>;
|
|
8
8
|
export declare function onReservationCanceled(
|
|
9
9
|
/**
|
|
10
10
|
* ステータス変更された予約リスト
|
|
@@ -5,9 +5,12 @@ import * as factory from '../../../factory';
|
|
|
5
5
|
import { AuthorizationRepo } from '../../../repo/authorization';
|
|
6
6
|
import type { SettingRepo } from '../../../repo/setting';
|
|
7
7
|
import type { TaskRepo } from '../../../repo/task';
|
|
8
|
-
export type IConfirmedReservation = Omit<factory.reservation.eventReservation.IReservation, 'price' | 'underName'> & {
|
|
8
|
+
export type IConfirmedReservation = Omit<factory.reservation.eventReservation.IReservation, 'price' | 'underName' | 'reservedTicket'> & {
|
|
9
9
|
price?: factory.reservation.eventReservation.IPrice;
|
|
10
|
-
underName?: factory.reservation.IUnderName
|
|
10
|
+
underName?: factory.reservation.IUnderName;
|
|
11
|
+
reservedTicket: Omit<factory.assetTransaction.reserve.ISubReservationReservedTicket, 'ticketType'> & {
|
|
12
|
+
ticketType: factory.reservation.eventReservation.ITicketType;
|
|
13
|
+
};
|
|
11
14
|
};
|
|
12
15
|
/**
|
|
13
16
|
* 予約確定後のアクション
|
|
@@ -3,7 +3,7 @@ import * as factory from '../../factory';
|
|
|
3
3
|
import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
4
4
|
import type { OrderRepo } from '../../repo/order';
|
|
5
5
|
import type { ReservationRepo } from '../../repo/reservation';
|
|
6
|
-
type IReservationResult = Pick<factory.reservation.IReservation
|
|
6
|
+
type IReservationResult = Pick<factory.reservation.eventReservation.IReservation, 'id' | 'additionalTicketText' | 'reservationStatus'>;
|
|
7
7
|
declare function searchByOrder(params: {
|
|
8
8
|
limit: number;
|
|
9
9
|
page: number;
|
package/package.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.600.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.600.0",
|
|
14
|
-
"@chevre/factory": "6.
|
|
15
|
-
"@cinerino/sdk": "13.3.
|
|
14
|
+
"@chevre/factory": "6.1.0",
|
|
15
|
+
"@cinerino/sdk": "13.3.1",
|
|
16
16
|
"@motionpicture/coa-service": "9.6.0",
|
|
17
17
|
"@motionpicture/gmo-service": "5.4.0-alpha.1",
|
|
18
18
|
"@sendgrid/client": "8.1.4",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"postversion": "git push origin --tags",
|
|
100
100
|
"prepublishOnly": "npm run clean && npm run build"
|
|
101
101
|
},
|
|
102
|
-
"version": "24.0.0-alpha.
|
|
102
|
+
"version": "24.0.0-alpha.49"
|
|
103
103
|
}
|