@chevre/domain 23.1.0-alpha.3 → 23.1.0-alpha.30
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/acceptedPaymentMethodOffer/adminAcceptedPaymentMethodOffers.ts +68 -0
- package/example/src/chevre/actions/checkAcceptPayActions.ts +60 -0
- package/example/src/chevre/assetTransaction/checkPayTransactionsTicketToken.ts +67 -0
- package/example/src/chevre/assetTransaction/processReserve.ts +8 -3
- package/example/src/chevre/authorizeEventServiceOffer.ts +7 -5
- package/example/src/chevre/eventSeries/migrateEventSeriesUnacceptedPaymentMethod.ts +93 -0
- package/example/src/chevre/member/migrateMemberIdentifier.ts +99 -0
- package/example/src/chevre/project/unsetProjectSettings.ts +73 -0
- package/example/src/chevre/reIndex.ts +1 -2
- package/example/src/chevre/roles/{addAdminSellerEventIfNotExists.ts → addAdminSellerEventOfferIfNotExists.ts} +1 -1
- package/example/src/chevre/stockHolder/findSeatsBySection.ts +59 -0
- package/example/src/chevre/stockHolder/searchSeats.ts +2 -2
- package/lib/chevre/repo/acceptedPaymentMethod.d.ts +41 -0
- package/lib/chevre/repo/acceptedPaymentMethod.js +180 -0
- package/lib/chevre/repo/authorization.d.ts +3 -2
- package/lib/chevre/repo/authorization.js +13 -5
- package/lib/chevre/repo/event.d.ts +1 -35
- package/lib/chevre/repo/event.js +2 -102
- package/lib/chevre/repo/eventOffer.d.ts +1 -1
- package/lib/chevre/repo/eventOffer.js +16 -10
- package/lib/chevre/repo/member.d.ts +18 -1
- package/lib/chevre/repo/member.js +14 -8
- package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.d.ts +10 -0
- package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.js +97 -0
- package/lib/chevre/repo/mongoose/schemas/eventOffer.js +48 -35
- package/lib/chevre/repo/mongoose/schemas/member.js +10 -0
- package/lib/chevre/repo/place/seat.d.ts +24 -0
- package/lib/chevre/repo/place/seat.js +103 -21
- package/lib/chevre/repo/ticket.d.ts +7 -1
- package/lib/chevre/repo/ticket.js +14 -1
- package/lib/chevre/repository.d.ts +5 -0
- package/lib/chevre/repository.js +15 -2
- package/lib/chevre/service/assetTransaction/pay/factory.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/factory.js +8 -3
- package/lib/chevre/service/assetTransaction/pay/validateAcceptedPaymentMethodIfNeeded.d.ts +16 -0
- package/lib/chevre/service/assetTransaction/pay/validateAcceptedPaymentMethodIfNeeded.js +92 -0
- package/lib/chevre/service/assetTransaction/pay.d.ts +6 -1
- package/lib/chevre/service/assetTransaction/pay.js +6 -1
- package/lib/chevre/service/assetTransaction/reserve/start.d.ts +6 -0
- package/lib/chevre/service/assetTransaction/reserve/start.js +5 -1
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/fixExtendedEventOffer.d.ts +22 -0
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/fixExtendedEventOffer.js +63 -0
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateIssuedOfferIfExists.d.ts +7 -2
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateIssuedOfferIfExists.js +32 -32
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateMemberTierIfExists.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateMemberTierIfExists.js +10 -54
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/verifyTicketTokenAsNeeded.d.ts +23 -0
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/verifyTicketTokenAsNeeded.js +62 -0
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest.d.ts +36 -1
- package/lib/chevre/service/assetTransaction/reserve/validateStartRequest.js +23 -27
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +0 -3
- package/lib/chevre/service/offer/event/authorize/factory.js +4 -3
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.js +43 -26
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +4 -0
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.js +4 -4
- package/lib/chevre/service/offer/event/authorize.d.ts +3 -0
- package/lib/chevre/service/offer/event/authorize.js +10 -5
- package/lib/chevre/service/offer/event/issueEventOfferTicket.d.ts +48 -0
- package/lib/chevre/service/offer/event/issueEventOfferTicket.js +123 -0
- package/lib/chevre/service/offer/event.d.ts +2 -1
- package/lib/chevre/service/offer/event.js +3 -1
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +9 -0
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.js +22 -11
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +19 -2
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +87 -9
- package/lib/chevre/service/payment/any/factory.d.ts +20 -3
- package/lib/chevre/service/payment/any/factory.js +26 -6
- package/lib/chevre/service/payment/any/publishPaymentUrl/fixTransactionNumberOnPublishPaymentUrl.d.ts +4 -0
- package/lib/chevre/service/payment/any/publishPaymentUrl/fixTransactionNumberOnPublishPaymentUrl.js +15 -11
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.d.ts +6 -3
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +20 -28
- package/lib/chevre/service/payment/any.d.ts +5 -1
- package/lib/chevre/service/payment/any.js +22 -13
- package/lib/chevre/service/payment/factory.js +0 -5
- package/lib/chevre/service/payment/movieTicket/authorize.js +0 -5
- package/lib/chevre/service/task/authorizePayment.js +2 -0
- package/lib/chevre/service/task/publishPaymentUrl.js +4 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/publishCode.js +1 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.d.ts +9 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.js +2 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +8 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.js +45 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validatePrice.d.ts +3 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validatePrice.js +38 -0
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -8
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +5 -35
- package/package.json +3 -3
- package/example/src/chevre/checkReplaceActions.ts +0 -65
- package/example/src/chevre/upsertManyEventsByAdditionalProperty.ts +0 -193
- package/lib/chevre/service/code.d.ts +0 -8
- package/lib/chevre/service/code.js +0 -7
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
2
|
import { IMinimizedIndividualEvent } from '../../../factory/event';
|
|
3
|
+
import type { AuthorizationRepo } from '../../../repo/authorization';
|
|
3
4
|
import type { EventOfferRepo } from '../../../repo/eventOffer';
|
|
4
5
|
import type { IssuerRepo } from '../../../repo/issuer';
|
|
6
|
+
import type { MemberRepo } from '../../../repo/member';
|
|
5
7
|
import type { MemberProgramRepo } from '../../../repo/memberProgram';
|
|
6
8
|
import type { ProductOfferRepo } from '../../../repo/productOffer';
|
|
9
|
+
import type { TicketRepo } from '../../../repo/ticket';
|
|
7
10
|
declare function validateStartRequest(params: {
|
|
8
11
|
object: factory.assetTransaction.reserve.IObjectWithoutDetail;
|
|
12
|
+
instrument: factory.assetTransaction.reserve.IInstrument[];
|
|
9
13
|
event: Pick<IMinimizedIndividualEvent, 'offers' | 'id' | 'project' | 'identifier'>;
|
|
10
14
|
/**
|
|
11
15
|
* アプリケーションごとのオファーを検証するかどうか
|
|
@@ -20,9 +24,40 @@ declare function validateStartRequest(params: {
|
|
|
20
24
|
id?: string;
|
|
21
25
|
};
|
|
22
26
|
}): (repos: {
|
|
27
|
+
authorization: AuthorizationRepo;
|
|
23
28
|
eventOffer: EventOfferRepo;
|
|
24
29
|
issuer: IssuerRepo;
|
|
30
|
+
member: MemberRepo;
|
|
25
31
|
memberProgram: MemberProgramRepo;
|
|
26
32
|
productOffer: ProductOfferRepo;
|
|
33
|
+
ticket: TicketRepo;
|
|
27
34
|
}) => Promise<void>;
|
|
28
|
-
|
|
35
|
+
/**
|
|
36
|
+
* アプリケーションに対して有効なイベントオファーが存在するかどうかを検証する
|
|
37
|
+
*/
|
|
38
|
+
declare function validEventOfferByApplicationExists(params: {
|
|
39
|
+
event: Pick<IMinimizedIndividualEvent, 'offers' | 'id' | 'project' | 'identifier'>;
|
|
40
|
+
now: Date;
|
|
41
|
+
availableAt: {
|
|
42
|
+
/**
|
|
43
|
+
* 販売アプリケーションID
|
|
44
|
+
*/
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* オファー承認時のticketTokenから生成されたイベントオファー
|
|
49
|
+
*/
|
|
50
|
+
acceptedEventOffer?: factory.authorization.IOfferAsObject;
|
|
51
|
+
/**
|
|
52
|
+
* オファー承認時の予約数
|
|
53
|
+
* 0であれば特に何も検証されない
|
|
54
|
+
*/
|
|
55
|
+
numAcceptedOffers: number;
|
|
56
|
+
}): (repos: {
|
|
57
|
+
eventOffer: EventOfferRepo;
|
|
58
|
+
issuer: IssuerRepo;
|
|
59
|
+
member: MemberRepo;
|
|
60
|
+
memberProgram: MemberProgramRepo;
|
|
61
|
+
productOffer: ProductOfferRepo;
|
|
62
|
+
}) => Promise<void>;
|
|
63
|
+
export { validateStartRequest, validEventOfferByApplicationExists };
|
|
@@ -10,10 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.validateStartRequest = validateStartRequest;
|
|
13
|
+
exports.validEventOfferByApplicationExists = validEventOfferByApplicationExists;
|
|
13
14
|
const moment = require("moment");
|
|
14
15
|
const factory = require("../../../factory");
|
|
16
|
+
const fixExtendedEventOffer_1 = require("./validateStartRequest/fixExtendedEventOffer");
|
|
15
17
|
const validateIssuedOfferIfExists_1 = require("./validateStartRequest/validateIssuedOfferIfExists");
|
|
16
18
|
const validateMemberTierIfExists_1 = require("./validateStartRequest/validateMemberTierIfExists");
|
|
19
|
+
const verifyTicketTokenAsNeeded_1 = require("./validateStartRequest/verifyTicketTokenAsNeeded");
|
|
17
20
|
function validateStartRequest(params) {
|
|
18
21
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
19
22
|
var _a;
|
|
@@ -23,11 +26,20 @@ function validateStartRequest(params) {
|
|
|
23
26
|
if (typeof ((_a = params.store) === null || _a === void 0 ? void 0 : _a.id) !== 'string') {
|
|
24
27
|
throw new factory.errors.NotFound('store.id');
|
|
25
28
|
}
|
|
26
|
-
|
|
29
|
+
// ticketTokenから、acceptedEventOfferを生成(2025-11-18~)
|
|
30
|
+
const { acceptedEventOffer } = yield (0, verifyTicketTokenAsNeeded_1.verifyTicketTokenAsNeeded)({
|
|
27
31
|
event,
|
|
28
32
|
now,
|
|
29
33
|
availableAt: { id: params.store.id },
|
|
30
|
-
object: params.object
|
|
34
|
+
object: params.object,
|
|
35
|
+
instrument: params.instrument
|
|
36
|
+
})(repos);
|
|
37
|
+
yield validEventOfferByApplicationExists({
|
|
38
|
+
event,
|
|
39
|
+
now,
|
|
40
|
+
availableAt: { id: params.store.id },
|
|
41
|
+
acceptedEventOffer,
|
|
42
|
+
numAcceptedOffers: (Array.isArray(params.object.acceptedOffer)) ? params.object.acceptedOffer.length : 0
|
|
31
43
|
})(repos);
|
|
32
44
|
}
|
|
33
45
|
if (params.validateEvent === true) {
|
|
@@ -36,12 +48,11 @@ function validateStartRequest(params) {
|
|
|
36
48
|
});
|
|
37
49
|
}
|
|
38
50
|
/**
|
|
39
|
-
*
|
|
51
|
+
* アプリケーションに対して有効なイベントオファーが存在するかどうかを検証する
|
|
40
52
|
*/
|
|
41
|
-
function
|
|
53
|
+
function validEventOfferByApplicationExists(params) {
|
|
42
54
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
|
|
44
|
-
const { event, availableAt } = params;
|
|
55
|
+
const { event, availableAt, acceptedEventOffer, numAcceptedOffers } = params;
|
|
45
56
|
const acceptedDate = moment(params.now);
|
|
46
57
|
const eventOffers = event.offers;
|
|
47
58
|
// アプリケーションごとの設定を参照する(2022-11-19~)
|
|
@@ -70,29 +81,14 @@ function validateApplicationOffer(params) {
|
|
|
70
81
|
}
|
|
71
82
|
// support extensibleEventOffer(2025-11-11~)
|
|
72
83
|
if (eventOffers.typeOf === factory.offerType.AggregateOffer) {
|
|
73
|
-
|
|
74
|
-
const eventOfferIdentifierMustBe = (_b = (_a = params.object.reservationFor) === null || _a === void 0 ? void 0 : _a.offers) === null || _b === void 0 ? void 0 : _b.identifier;
|
|
75
|
-
if (typeof eventOfferIdentifierMustBe !== 'string' || eventOfferIdentifierMustBe === '') {
|
|
76
|
-
throw new factory.errors.ArgumentNull('reservationFor.offers.identifier');
|
|
77
|
-
}
|
|
78
|
-
const existingEventOffer = (yield repos.eventOffer.findEventOffers({
|
|
79
|
-
limit: 1,
|
|
80
|
-
page: 1,
|
|
81
|
-
project: { id: { $eq: event.project.id } }, // プロジェクト
|
|
82
|
-
validFrom: { $lte: acceptedDate.toDate() },
|
|
83
|
-
validThrough: { $gte: acceptedDate.toDate() },
|
|
84
|
-
itemOffered: { id: { $eq: event.id } }, // 対象イベント
|
|
85
|
-
identifier: { $eq: eventOfferIdentifierMustBe } // オファーコード
|
|
86
|
-
}, ['identifier', 'itemOffered', 'offeredBy', 'typeOf', 'validFrom', 'validThrough'])).shift();
|
|
87
|
-
if (existingEventOffer === undefined) {
|
|
88
|
-
throw new factory.errors.NotFound(`eventOffer: ${eventOfferIdentifierMustBe}`);
|
|
89
|
-
}
|
|
84
|
+
const existingEventOffer = yield (0, fixExtendedEventOffer_1.fixExtendedEventOffer)(params)(repos);
|
|
90
85
|
// 拡張可能なオファー設定の場合のみ、オファートークンを検証する(2025-11-11~)
|
|
91
86
|
yield (0, validateIssuedOfferIfExists_1.validateIssuedOfferIfExists)({
|
|
92
87
|
event,
|
|
93
88
|
now: params.now,
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
eventOffer: existingEventOffer,
|
|
90
|
+
acceptedEventOffer,
|
|
91
|
+
numAcceptedOffers
|
|
96
92
|
})(repos);
|
|
97
93
|
}
|
|
98
94
|
else {
|
|
@@ -101,8 +97,8 @@ function validateApplicationOffer(params) {
|
|
|
101
97
|
yield (0, validateMemberTierIfExists_1.validateMemberTierIfExists)({
|
|
102
98
|
event,
|
|
103
99
|
now: params.now,
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
makesOfferOnApplication,
|
|
101
|
+
acceptedEventOffer
|
|
106
102
|
})(repos);
|
|
107
103
|
}
|
|
108
104
|
});
|
|
@@ -7,9 +7,6 @@ declare function createReserveTransactionStartParams(params: {
|
|
|
7
7
|
acceptedOffers: factory.assetTransaction.reserve.IAcceptedTicketOfferWithoutDetail[];
|
|
8
8
|
event: {
|
|
9
9
|
id: string;
|
|
10
|
-
offers?: {
|
|
11
|
-
validForMemberTier?: factory.assetTransaction.reserve.ITokenizedMemberProgramTier;
|
|
12
|
-
};
|
|
13
10
|
};
|
|
14
11
|
broker?: factory.reservation.IBroker<factory.reservationType>;
|
|
15
12
|
transaction: Pick<factory.transaction.ITransaction<factory.transactionType.PlaceOrder>, 'expires' | 'seller'>;
|
|
@@ -8,7 +8,7 @@ exports.responseBody2acceptedOffers4result = responseBody2acceptedOffers4result;
|
|
|
8
8
|
const moment = require("moment");
|
|
9
9
|
const factory = require("../../../../factory");
|
|
10
10
|
function createReserveTransactionStartParams(params) {
|
|
11
|
-
var _a
|
|
11
|
+
var _a;
|
|
12
12
|
const { transaction, transactionNumber } = params;
|
|
13
13
|
const { seller } = transaction;
|
|
14
14
|
const acceptedTicketOffersWithoutDetail = (Array.isArray(params.acceptedOffers))
|
|
@@ -48,8 +48,9 @@ function createReserveTransactionStartParams(params) {
|
|
|
48
48
|
// }
|
|
49
49
|
// ]
|
|
50
50
|
};
|
|
51
|
-
const
|
|
52
|
-
|
|
51
|
+
const object = Object.assign({ acceptedOffer: acceptedTicketOffersWithoutDetail, reservationFor: {
|
|
52
|
+
id: params.event.id
|
|
53
|
+
} }, (params.broker !== undefined) ? { broker: params.broker } : undefined);
|
|
53
54
|
return {
|
|
54
55
|
project: { typeOf: factory.organizationType.Project, id: params.project.id },
|
|
55
56
|
typeOf: factory.assetTransactionType.Reserve,
|
|
@@ -17,7 +17,7 @@ const factory = require("../../../../../factory");
|
|
|
17
17
|
function requestedProgramMembershipUsed2permit(params) {
|
|
18
18
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
19
19
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
var _a, _b
|
|
20
|
+
var _a, _b;
|
|
21
21
|
let programMembershipUsedAsPermit;
|
|
22
22
|
const { programMembershipUsed, placeOrder } = params;
|
|
23
23
|
// discontinue token as fromLocation(ticketTokenへ移行するべき)(2024-12-18~)
|
|
@@ -27,7 +27,7 @@ function requestedProgramMembershipUsed2permit(params) {
|
|
|
27
27
|
else if ((programMembershipUsed === null || programMembershipUsed === void 0 ? void 0 : programMembershipUsed.typeOf) === 'Ticket') {
|
|
28
28
|
const { ticketToken } = programMembershipUsed;
|
|
29
29
|
if (typeof ticketToken === 'string') {
|
|
30
|
-
const ticket = (yield repos.ticket.
|
|
30
|
+
const ticket = (yield repos.ticket.findTickets({
|
|
31
31
|
limit: 1,
|
|
32
32
|
page: 1,
|
|
33
33
|
project: { id: { $eq: params.project.id } },
|
|
@@ -51,34 +51,51 @@ function requestedProgramMembershipUsed2permit(params) {
|
|
|
51
51
|
const permitOwnershipInfo = object;
|
|
52
52
|
const ownedGoodType = (_a = permitOwnershipInfo.typeOfGood) === null || _a === void 0 ? void 0 : _a.typeOf;
|
|
53
53
|
if (ownedGoodType === factory.permit.PermitType.Permit) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
54
|
+
// discontinue(2025-11-14~)
|
|
55
|
+
throw new factory.errors.Argument('programMembershipUsed', `ownershipInfo.typeOfGood.typeOf: ${ownedGoodType} discontinued`);
|
|
56
|
+
// const issuedThroughTypeOf = permitOwnershipInfo.typeOfGood.issuedThrough?.typeOf;
|
|
57
|
+
// if (issuedThroughTypeOf === factory.service.paymentService.PaymentServiceType.FaceToFace) {
|
|
58
|
+
// programMembershipUsedAsPermit = {
|
|
59
|
+
// identifier: permitOwnershipInfo.typeOfGood.identifier,
|
|
60
|
+
// issuedThrough: { typeOf: issuedThroughTypeOf },
|
|
61
|
+
// typeOf: factory.permit.PermitType.Permit
|
|
62
|
+
// };
|
|
63
|
+
// } else if (issuedThroughTypeOf === factory.product.ProductType.MembershipService
|
|
64
|
+
// || issuedThroughTypeOf === factory.service.paymentService.PaymentServiceType.CreditCard) {
|
|
65
|
+
// if (typeof permitOwnershipInfo.typeOfGood.issuedThrough?.id !== 'string') {
|
|
66
|
+
// throw new factory.errors.Argument(
|
|
67
|
+
// 'programMembershipUsed',
|
|
68
|
+
// 'ownershipInfo.typeOfGood.issuedThrough.id undefined'
|
|
69
|
+
// );
|
|
70
|
+
// }
|
|
71
|
+
// programMembershipUsedAsPermit = {
|
|
72
|
+
// identifier: permitOwnershipInfo.typeOfGood.identifier,
|
|
73
|
+
// issuedThrough: { id: permitOwnershipInfo.typeOfGood.issuedThrough.id, typeOf: issuedThroughTypeOf },
|
|
74
|
+
// typeOf: factory.permit.PermitType.Permit
|
|
75
|
+
// };
|
|
76
|
+
// } else {
|
|
77
|
+
// throw new factory.errors.Argument(
|
|
78
|
+
// 'programMembershipUsed',
|
|
79
|
+
// `invalid issuedThrough.typeOf: ${issuedThroughTypeOf}`
|
|
80
|
+
// );
|
|
81
|
+
// }
|
|
82
|
+
}
|
|
83
|
+
else if (ownedGoodType === factory.service.paymentService.PaymentServiceType.FaceToFace) {
|
|
84
|
+
const paymentMethodId = permitOwnershipInfo.typeOfGood.serviceOutput.paymentMethodId;
|
|
85
|
+
if (typeof paymentMethodId !== 'string' || paymentMethodId === '') {
|
|
86
|
+
throw new factory.errors.Argument('programMembershipUsed', 'paymentMethodId required');
|
|
75
87
|
}
|
|
88
|
+
programMembershipUsedAsPermit = {
|
|
89
|
+
identifier: paymentMethodId,
|
|
90
|
+
issuedThrough: { typeOf: ownedGoodType },
|
|
91
|
+
typeOf: factory.permit.PermitType.Permit
|
|
92
|
+
};
|
|
76
93
|
}
|
|
77
94
|
else if (ownedGoodType === factory.service.paymentService.PaymentServiceType.CreditCard) {
|
|
78
95
|
// CreditCard決済の場合、決済方法所有権を受け入れる(2025-11-11~)
|
|
79
|
-
const paymentServiceId = (
|
|
96
|
+
const paymentServiceId = (_b = permitOwnershipInfo.typeOfGood) === null || _b === void 0 ? void 0 : _b.id;
|
|
80
97
|
const paymentMethodId = permitOwnershipInfo.typeOfGood.serviceOutput.paymentMethodId;
|
|
81
|
-
if (typeof
|
|
98
|
+
if (typeof paymentServiceId !== 'string' || paymentServiceId === '') {
|
|
82
99
|
throw new factory.errors.Argument('programMembershipUsed', 'paymentServiceId required');
|
|
83
100
|
}
|
|
84
101
|
if (typeof paymentMethodId !== 'string' || paymentMethodId === '') {
|
|
@@ -91,7 +108,7 @@ function requestedProgramMembershipUsed2permit(params) {
|
|
|
91
108
|
};
|
|
92
109
|
}
|
|
93
110
|
else {
|
|
94
|
-
throw new factory.errors.Argument('programMembershipUsed',
|
|
111
|
+
throw new factory.errors.Argument('programMembershipUsed', `ownershipInfo.typeOfGood.typeOf: ${ownedGoodType} invalid`);
|
|
95
112
|
}
|
|
96
113
|
}
|
|
97
114
|
}
|
|
@@ -8,6 +8,7 @@ import type { EventRepo, IMinimizedIndividualEvent } from '../../../../repo/even
|
|
|
8
8
|
import type { EventOfferRepo } from '../../../../repo/eventOffer';
|
|
9
9
|
import { EventSeriesRepo } from '../../../../repo/eventSeries';
|
|
10
10
|
import type { IssuerRepo } from '../../../../repo/issuer';
|
|
11
|
+
import type { MemberRepo } from '../../../../repo/member';
|
|
11
12
|
import type { MemberProgramRepo } from '../../../../repo/memberProgram';
|
|
12
13
|
import type { OfferRepo } from '../../../../repo/offer/unitPriceInCatalog';
|
|
13
14
|
import type { OfferCatalogRepo } from '../../../../repo/offerCatalog';
|
|
@@ -29,6 +30,7 @@ declare function processStartReserve4chevre(params: {
|
|
|
29
30
|
event: Pick<IMinimizedIndividualEvent, 'id'> & {
|
|
30
31
|
offers?: {
|
|
31
32
|
validForMemberTier?: factory.assetTransaction.reserve.ITokenizedMemberProgramTier;
|
|
33
|
+
identifier?: string;
|
|
32
34
|
};
|
|
33
35
|
};
|
|
34
36
|
broker?: factory.reservation.IBroker<factory.reservationType>;
|
|
@@ -42,6 +44,7 @@ declare function processStartReserve4chevre(params: {
|
|
|
42
44
|
validateEventOfferPeriod: boolean;
|
|
43
45
|
validateEvent: boolean;
|
|
44
46
|
orderNumber: string;
|
|
47
|
+
instrument: factory.action.reserve.ITicketAsInstrument[];
|
|
45
48
|
}, options: {
|
|
46
49
|
/**
|
|
47
50
|
* 最大n日前から予約可能
|
|
@@ -56,6 +59,7 @@ declare function processStartReserve4chevre(params: {
|
|
|
56
59
|
eventOffer: EventOfferRepo;
|
|
57
60
|
eventSeries: EventSeriesRepo;
|
|
58
61
|
issuer: IssuerRepo;
|
|
62
|
+
member: MemberRepo;
|
|
59
63
|
memberProgram: MemberProgramRepo;
|
|
60
64
|
offer: OfferRepo;
|
|
61
65
|
offerCatalog: OfferCatalogRepo;
|
|
@@ -20,21 +20,21 @@ function processStartReserve4chevre(params, options) {
|
|
|
20
20
|
// jwt: JWTCredentials;
|
|
21
21
|
// }
|
|
22
22
|
) => __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
var _a, _b;
|
|
24
23
|
const { event, transaction, transactionNumber } = params;
|
|
25
24
|
let acceptedOffers4result = [];
|
|
26
25
|
// 予約取引開始
|
|
27
26
|
const startParams = (0, factory_1.createReserveTransactionStartParams)(Object.assign({ project: transaction.project,
|
|
28
27
|
// object: <IObjectWithDetail>action.object,
|
|
29
|
-
acceptedOffers: params.acceptedOffers, event:
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
acceptedOffers: params.acceptedOffers, event: {
|
|
29
|
+
id: event.id
|
|
30
|
+
}, transaction,
|
|
32
31
|
transactionNumber }, (params.broker !== undefined) ? { broker: params.broker } : undefined));
|
|
33
32
|
const startParamObject = yield validateObjectWithoutDetail(startParams, { id: params.transaction.id })(repos);
|
|
34
33
|
const startReserveTransactionResult = yield ReserveTransactionService.start(Object.assign(Object.assign({}, startParams), { object: startParamObject,
|
|
35
34
|
// discontinue preSearchedEvent(2024-07-17~)
|
|
36
35
|
// preSearchedEvent: event,
|
|
37
36
|
preSearchedTicketOffers: params.ticketOffers, preSearchedUnitPriceOffers: params.unitPriceOffers, availableAtOrFrom: { id: params.availableAtOrFrom.id }, validateEvent: params.validateEvent, validateEventOfferPeriod: params.validateEventOfferPeriod, validateAppliesToMovieTicket: true, instrument: [
|
|
37
|
+
...params.instrument, // support Ticket(2025-11-18~)
|
|
38
38
|
{ orderNumber: params.orderNumber, typeOf: factory.order.OrderType.Order },
|
|
39
39
|
{ id: transaction.id, typeOf: transaction.typeOf }
|
|
40
40
|
] }), options)(repos, settings);
|
|
@@ -8,6 +8,7 @@ import type { EventRepo } from '../../../repo/event';
|
|
|
8
8
|
import type { EventOfferRepo } from '../../../repo/eventOffer';
|
|
9
9
|
import { EventSeriesRepo } from '../../../repo/eventSeries';
|
|
10
10
|
import type { IssuerRepo } from '../../../repo/issuer';
|
|
11
|
+
import type { MemberRepo } from '../../../repo/member';
|
|
11
12
|
import type { MemberProgramRepo } from '../../../repo/memberProgram';
|
|
12
13
|
import type { OfferRepo } from '../../../repo/offer/unitPriceInCatalog';
|
|
13
14
|
import type { OfferCatalogRepo } from '../../../repo/offerCatalog';
|
|
@@ -36,6 +37,7 @@ interface IAuthorizeRepos {
|
|
|
36
37
|
eventOffer: EventOfferRepo;
|
|
37
38
|
eventSeries: EventSeriesRepo;
|
|
38
39
|
issuer: IssuerRepo;
|
|
40
|
+
member: MemberRepo;
|
|
39
41
|
memberProgram: MemberProgramRepo;
|
|
40
42
|
stockHolder: StockHolderRepo;
|
|
41
43
|
offer: OfferRepo;
|
|
@@ -78,6 +80,7 @@ declare function authorize(params: {
|
|
|
78
80
|
typeOf: factory.organizationType.Project;
|
|
79
81
|
};
|
|
80
82
|
object: IObjectWithoutDetail;
|
|
83
|
+
instrument: factory.action.reserve.ITicketAsInstrument[];
|
|
81
84
|
agent: {
|
|
82
85
|
id: string;
|
|
83
86
|
};
|
|
@@ -53,7 +53,7 @@ function authorize(params, options) {
|
|
|
53
53
|
const action = yield repos.action.start(actionAttributes);
|
|
54
54
|
try {
|
|
55
55
|
const processStartReserveResult = yield (0, processStartReserve4chevre_1.processStartReserve4chevre)(Object.assign({ acceptedOffers, event,
|
|
56
|
-
transactionNumber, transaction, availableAtOrFrom: { id: params.store.id }, ticketOffers, unitPriceOffers, validateEvent: params.validateEvent === true, validateEventOfferPeriod: params.validateEventOfferPeriod === true, orderNumber }, (typeof ((_a = params.object.broker) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? { broker: params.object.broker } : undefined), options)(repos, settings);
|
|
56
|
+
transactionNumber, transaction, availableAtOrFrom: { id: params.store.id }, ticketOffers, unitPriceOffers, validateEvent: params.validateEvent === true, validateEventOfferPeriod: params.validateEventOfferPeriod === true, orderNumber, instrument: params.instrument }, (typeof ((_a = params.object.broker) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? { broker: params.object.broker } : undefined), options)(repos, settings);
|
|
57
57
|
acceptedOffers4result = processStartReserveResult.acceptedOffers4result;
|
|
58
58
|
// add orderInTransaction(2024-01-15~)
|
|
59
59
|
if (!noOfferSpecified) {
|
|
@@ -82,7 +82,7 @@ function authorize(params, options) {
|
|
|
82
82
|
}
|
|
83
83
|
function validateCreateRequest(params) {
|
|
84
84
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
var _a, _b
|
|
85
|
+
var _a, _b;
|
|
86
86
|
const transaction = yield repos.transaction.projectFieldsInProgressById({
|
|
87
87
|
typeOf: factory.transactionType.PlaceOrder,
|
|
88
88
|
id: params.transaction.id
|
|
@@ -98,9 +98,14 @@ function validateCreateRequest(params) {
|
|
|
98
98
|
if (typeof ((_b = params.object.reservationFor) === null || _b === void 0 ? void 0 : _b.id) !== 'string' || params.object.reservationFor.id.length === 0) {
|
|
99
99
|
throw new factory.errors.ArgumentNull('object.reservationFor.id');
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
const event = {
|
|
102
|
+
id: params.object.reservationFor.id,
|
|
103
|
+
typeOf: factory.eventType.ScreeningEvent // ひとまずfix(2024-07-17~)
|
|
104
|
+
// offers: {
|
|
105
|
+
// ...(typeof validForMemberTier?.token === 'string') ? { validForMemberTier } : undefined,
|
|
106
|
+
// ...(typeof eventOfferIdentifier === 'string') ? { identifier: eventOfferIdentifier } : undefined
|
|
107
|
+
// }
|
|
108
|
+
};
|
|
104
109
|
return { transaction, event };
|
|
105
110
|
});
|
|
106
111
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as factory from '../../../factory';
|
|
2
|
+
import type { ActionRepo } from '../../../repo/action';
|
|
3
|
+
import type { AuthorizationRepo } from '../../../repo/authorization';
|
|
4
|
+
import type { EventRepo } from '../../../repo/event';
|
|
5
|
+
import type { EventOfferRepo } from '../../../repo/eventOffer';
|
|
6
|
+
import type { IssuerRepo } from '../../../repo/issuer';
|
|
7
|
+
import type { MemberRepo } from '../../../repo/member';
|
|
8
|
+
import type { MemberProgramRepo } from '../../../repo/memberProgram';
|
|
9
|
+
import type { ProductOfferRepo } from '../../../repo/productOffer';
|
|
10
|
+
import type { TicketRepo } from '../../../repo/ticket';
|
|
11
|
+
import type { TransactionRepo } from '../../../repo/transaction';
|
|
12
|
+
declare function issueEventOfferTicket(params: {
|
|
13
|
+
now: Date;
|
|
14
|
+
audience: Pick<factory.action.authorize.offer.eventService.IPurpose, 'id'>;
|
|
15
|
+
/**
|
|
16
|
+
* イベントID
|
|
17
|
+
*/
|
|
18
|
+
eventId: string;
|
|
19
|
+
/**
|
|
20
|
+
* 拡張イベントオファーID
|
|
21
|
+
*/
|
|
22
|
+
eventOfferId?: string;
|
|
23
|
+
ticketedOffer?: Pick<factory.authorization.IOfferAsObject, 'token' | 'validForMemberTier'>;
|
|
24
|
+
author: Pick<factory.authorization.IAuthor, 'id' | 'typeOf'>;
|
|
25
|
+
project: {
|
|
26
|
+
id: string;
|
|
27
|
+
};
|
|
28
|
+
instrument: {
|
|
29
|
+
/**
|
|
30
|
+
* アプリケーションID
|
|
31
|
+
*/
|
|
32
|
+
id: string;
|
|
33
|
+
};
|
|
34
|
+
}): (repos: {
|
|
35
|
+
action: ActionRepo;
|
|
36
|
+
authorization: AuthorizationRepo;
|
|
37
|
+
event: EventRepo;
|
|
38
|
+
eventOffer: EventOfferRepo;
|
|
39
|
+
issuer: IssuerRepo;
|
|
40
|
+
member: MemberRepo;
|
|
41
|
+
memberProgram: MemberProgramRepo;
|
|
42
|
+
productOffer: ProductOfferRepo;
|
|
43
|
+
ticket: TicketRepo;
|
|
44
|
+
transaction: TransactionRepo;
|
|
45
|
+
}) => Promise<{
|
|
46
|
+
ticketToken: string;
|
|
47
|
+
}>;
|
|
48
|
+
export { issueEventOfferTicket };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.issueEventOfferTicket = issueEventOfferTicket;
|
|
13
|
+
const moment = require("moment");
|
|
14
|
+
const factory = require("../../../factory");
|
|
15
|
+
const validateStartRequest_1 = require("../../assetTransaction/reserve/validateStartRequest");
|
|
16
|
+
function createOfferTicket(params) {
|
|
17
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
var _a;
|
|
19
|
+
const { audience, expiresInSeconds, issuedBy, object, validFrom, author, project, instrument } = params;
|
|
20
|
+
const actionAttributes = {
|
|
21
|
+
project: { id: project.id, typeOf: factory.organizationType.Project },
|
|
22
|
+
typeOf: factory.actionType.AuthorizeAction,
|
|
23
|
+
agent: author,
|
|
24
|
+
recipient: author,
|
|
25
|
+
object: [object],
|
|
26
|
+
instrument: {
|
|
27
|
+
typeOf: factory.creativeWorkType.WebApplication,
|
|
28
|
+
id: instrument.id
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const action = yield repos.action.start(actionAttributes);
|
|
32
|
+
let authorizations;
|
|
33
|
+
try {
|
|
34
|
+
authorizations = yield repos.authorization.issueAuthorization([{
|
|
35
|
+
project: { id: project.id, typeOf: factory.organizationType.Project },
|
|
36
|
+
object,
|
|
37
|
+
validFrom,
|
|
38
|
+
expiresInSeconds,
|
|
39
|
+
author,
|
|
40
|
+
issuedBy,
|
|
41
|
+
audience
|
|
42
|
+
}]);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
try {
|
|
46
|
+
yield repos.action.giveUp({ typeOf: action.typeOf, id: action.id, error });
|
|
47
|
+
}
|
|
48
|
+
catch (__) {
|
|
49
|
+
// 失敗したら仕方ない
|
|
50
|
+
}
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
const result = authorizations.map(({ code, typeOf }) => ({ code, typeOf }));
|
|
54
|
+
yield repos.action.completeWithVoid({ typeOf: action.typeOf, id: action.id, result: result });
|
|
55
|
+
const ticketToken = (_a = authorizations.shift()) === null || _a === void 0 ? void 0 : _a.code;
|
|
56
|
+
if (typeof ticketToken !== 'string') {
|
|
57
|
+
// 基本的にありえないフロー
|
|
58
|
+
throw new factory.errors.Internal('code not published by an unexpected reason');
|
|
59
|
+
}
|
|
60
|
+
// チケット作成
|
|
61
|
+
yield repos.ticket.issueByTicketToken({
|
|
62
|
+
project: { id: project.id },
|
|
63
|
+
ticketToken,
|
|
64
|
+
issuedBy
|
|
65
|
+
});
|
|
66
|
+
return { ticketToken };
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function issueEventOfferTicket(params) {
|
|
70
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
const { now, audience, eventId, eventOfferId, ticketedOffer, author, project, instrument } = params;
|
|
73
|
+
// 取引は存在するか
|
|
74
|
+
const transaction = yield repos.transaction.projectFieldsInProgressById({ typeOf: factory.transactionType.PlaceOrder, id: audience.id }, ['expires', 'typeOf', 'seller']);
|
|
75
|
+
// イベントは存在するか
|
|
76
|
+
const event = yield repos.event.projectEventFieldsById({ id: eventId }, ['project', 'offers', 'identifier']);
|
|
77
|
+
// 取引番号発行
|
|
78
|
+
// const { transactionNumber } = await transactionNumberRepo.publishByTimestamp({ startDate: now });
|
|
79
|
+
const { seller } = transaction;
|
|
80
|
+
// 承認作成
|
|
81
|
+
const issuedBy = Object.assign({ id: seller.id, typeOf: seller.typeOf }, (typeof seller.name.ja === 'string') ? { name: seller.name.ja } : undefined);
|
|
82
|
+
const validForMemberTierToken = (_a = ticketedOffer === null || ticketedOffer === void 0 ? void 0 : ticketedOffer.validForMemberTier) === null || _a === void 0 ? void 0 : _a.token;
|
|
83
|
+
const validForMemberProgramIdentifier = (_b = ticketedOffer === null || ticketedOffer === void 0 ? void 0 : ticketedOffer.validForMemberTier) === null || _b === void 0 ? void 0 : _b.isTierOf.identifier;
|
|
84
|
+
const authorizationObject = Object.assign(Object.assign(Object.assign({ typeOf: factory.offerType.Offer, itemOffered: {
|
|
85
|
+
typeOf: factory.product.ProductType.EventService,
|
|
86
|
+
serviceOutput: {
|
|
87
|
+
typeOf: factory.reservationType.ReservationPackage,
|
|
88
|
+
reservationFor: { id: eventId }
|
|
89
|
+
}
|
|
90
|
+
} }, (typeof eventOfferId === 'string' && eventOfferId !== '') ? { id: eventOfferId } : undefined), (typeof (ticketedOffer === null || ticketedOffer === void 0 ? void 0 : ticketedOffer.token) === 'string' && ticketedOffer.token !== '')
|
|
91
|
+
? { token: ticketedOffer.token }
|
|
92
|
+
: undefined), (typeof validForMemberTierToken === 'string' && validForMemberTierToken !== ''
|
|
93
|
+
&& typeof validForMemberProgramIdentifier === 'string' && validForMemberProgramIdentifier !== '')
|
|
94
|
+
? {
|
|
95
|
+
validForMemberTier: {
|
|
96
|
+
token: validForMemberTierToken,
|
|
97
|
+
isTierOf: { identifier: validForMemberProgramIdentifier }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
: undefined);
|
|
101
|
+
// validations(eventId,eventOfferIdentifier,offerToken...)
|
|
102
|
+
yield (0, validateStartRequest_1.validEventOfferByApplicationExists)({
|
|
103
|
+
event,
|
|
104
|
+
now,
|
|
105
|
+
availableAt: { id: instrument.id },
|
|
106
|
+
acceptedEventOffer: authorizationObject,
|
|
107
|
+
numAcceptedOffers: 0 // オファーチケット発行時は予約数を検証しないので0でok
|
|
108
|
+
})(repos);
|
|
109
|
+
const expiresInSeconds = moment(transaction.expires)
|
|
110
|
+
.diff(now, 'seconds');
|
|
111
|
+
const { ticketToken } = yield createOfferTicket({
|
|
112
|
+
object: authorizationObject,
|
|
113
|
+
validFrom: now,
|
|
114
|
+
expiresInSeconds,
|
|
115
|
+
issuedBy,
|
|
116
|
+
audience: { id: transaction.id, typeOf: transaction.typeOf },
|
|
117
|
+
author,
|
|
118
|
+
project,
|
|
119
|
+
instrument
|
|
120
|
+
})(repos);
|
|
121
|
+
return { ticketToken };
|
|
122
|
+
});
|
|
123
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { authorize } from './event/authorize';
|
|
2
2
|
import { importCategoryCodesFromCOA, importFromCOA } from './event/importFromCOA';
|
|
3
|
+
import { issueEventOfferTicket } from './event/issueEventOfferTicket';
|
|
3
4
|
import { searchEventTicketOffers } from './event/searchEventTicketOffers';
|
|
4
5
|
import { searchOfferAppliesToMovieTicket } from './event/searchOfferAppliesToMovieTicket';
|
|
5
6
|
import { searchOfferCatalogItemAvailability } from './event/searchOfferCatalogItemAvailability';
|
|
6
7
|
import { searchOfferCatalogItems } from './event/searchOfferCatalogItems';
|
|
7
8
|
import { voidTransaction } from './event/voidTransaction';
|
|
8
|
-
export { authorize, importCategoryCodesFromCOA, importFromCOA, voidTransaction, searchEventTicketOffers, searchOfferAppliesToMovieTicket, searchOfferCatalogItemAvailability, searchOfferCatalogItems };
|
|
9
|
+
export { authorize, importCategoryCodesFromCOA, importFromCOA, issueEventOfferTicket, voidTransaction, searchEventTicketOffers, searchOfferAppliesToMovieTicket, searchOfferCatalogItemAvailability, searchOfferCatalogItems };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.searchOfferCatalogItems = exports.searchOfferCatalogItemAvailability = exports.searchOfferAppliesToMovieTicket = exports.searchEventTicketOffers = exports.voidTransaction = exports.importFromCOA = exports.importCategoryCodesFromCOA = exports.authorize = void 0;
|
|
3
|
+
exports.searchOfferCatalogItems = exports.searchOfferCatalogItemAvailability = exports.searchOfferAppliesToMovieTicket = exports.searchEventTicketOffers = exports.voidTransaction = exports.issueEventOfferTicket = exports.importFromCOA = exports.importCategoryCodesFromCOA = exports.authorize = void 0;
|
|
4
4
|
const authorize_1 = require("./event/authorize");
|
|
5
5
|
Object.defineProperty(exports, "authorize", { enumerable: true, get: function () { return authorize_1.authorize; } });
|
|
6
6
|
const importFromCOA_1 = require("./event/importFromCOA");
|
|
7
7
|
Object.defineProperty(exports, "importCategoryCodesFromCOA", { enumerable: true, get: function () { return importFromCOA_1.importCategoryCodesFromCOA; } });
|
|
8
8
|
Object.defineProperty(exports, "importFromCOA", { enumerable: true, get: function () { return importFromCOA_1.importFromCOA; } });
|
|
9
|
+
const issueEventOfferTicket_1 = require("./event/issueEventOfferTicket");
|
|
10
|
+
Object.defineProperty(exports, "issueEventOfferTicket", { enumerable: true, get: function () { return issueEventOfferTicket_1.issueEventOfferTicket; } });
|
|
9
11
|
const searchEventTicketOffers_1 = require("./event/searchEventTicketOffers");
|
|
10
12
|
Object.defineProperty(exports, "searchEventTicketOffers", { enumerable: true, get: function () { return searchEventTicketOffers_1.searchEventTicketOffers; } });
|
|
11
13
|
const searchOfferAppliesToMovieTicket_1 = require("./event/searchOfferAppliesToMovieTicket");
|
|
@@ -5,6 +5,7 @@ import type { TicketRepo } from '../../../../repo/ticket';
|
|
|
5
5
|
import type { ITransactionInProgress, TransactionRepo } from '../../../../repo/transaction';
|
|
6
6
|
import type { TransactionNumberRepo } from '../../../../repo/transactionNumber';
|
|
7
7
|
import * as PayTransactionService from '../../../assetTransaction/pay';
|
|
8
|
+
import { IInvoiceByTicketToken } from '../factory';
|
|
8
9
|
interface IFixTransactionNumberRepos {
|
|
9
10
|
action: ActionRepo;
|
|
10
11
|
authorization: AuthorizationRepo;
|
|
@@ -27,6 +28,14 @@ declare function fixTransactionNumber(params: {
|
|
|
27
28
|
transactionNumber: string;
|
|
28
29
|
pendingPaymentAgencyTransaction?: PayTransactionService.IPaymentAgencyTransaction;
|
|
29
30
|
creditCard?: factory.action.authorize.paymentMethod.any.ICreditCard;
|
|
31
|
+
/**
|
|
32
|
+
* 承認時に指定のチケット、あるいは、決済採用時に指定のチケット
|
|
33
|
+
*/
|
|
34
|
+
invoiceByTicketToken?: IInvoiceByTicketToken;
|
|
35
|
+
/**
|
|
36
|
+
* 承認時に指定のチケット、あるいは、決済採用時に指定のチケット
|
|
37
|
+
*/
|
|
38
|
+
ticketToken?: string;
|
|
30
39
|
permitOrInvoice?: never;
|
|
31
40
|
id?: never;
|
|
32
41
|
} | {
|