@chevre/domain 24.0.0-alpha.83 → 24.0.0-alpha.85
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/aggregateOffer.js +0 -16
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.js +0 -18
- package/lib/chevre/repo/offer/unitPriceInCatalog.js +0 -2
- package/lib/chevre/repo/product.js +0 -3
- package/lib/chevre/repo/transaction.d.ts +4 -4
- package/lib/chevre/repository.d.ts +0 -30
- package/lib/chevre/repository.js +2 -68
- package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.d.ts +0 -2
- package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +3 -102
- package/lib/chevre/service/assetTransaction/reserve/start.d.ts +0 -2
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.js +1 -31
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +0 -2
- package/lib/chevre/service/offer/event/authorize.d.ts +0 -2
- package/lib/chevre/service/offer/factory.js +1 -4
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +1 -5
- package/lib/chevre/service/task/deletePerson.js +0 -2
- package/lib/chevre/service/task/onResourceDeleted.js +0 -3
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +4 -4
- package/lib/chevre/service.d.ts +0 -12
- package/lib/chevre/service.js +1 -35
- package/package.json +2 -2
- package/lib/chevre/factory/availableProductTypes.d.ts +0 -1
- package/lib/chevre/factory/availableProductTypes.js +0 -8
- package/lib/chevre/repo/account.d.ts +0 -129
- package/lib/chevre/repo/account.js +0 -391
- package/lib/chevre/repo/accountTransaction.d.ts +0 -65
- package/lib/chevre/repo/accountTransaction.js +0 -277
- package/lib/chevre/repo/advanceBookingRequirement.d.ts +0 -35
- package/lib/chevre/repo/advanceBookingRequirement.js +0 -108
- package/lib/chevre/repo/mongoose/schemas/account.d.ts +0 -11
- package/lib/chevre/repo/mongoose/schemas/account.js +0 -118
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +0 -11
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +0 -149
- package/lib/chevre/repo/mongoose/schemas/advanceBookingRequirement.d.ts +0 -11
- package/lib/chevre/repo/mongoose/schemas/advanceBookingRequirement.js +0 -84
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +0 -11
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +0 -144
- package/lib/chevre/repo/permit.d.ts +0 -42
- package/lib/chevre/repo/permit.js +0 -77
- package/lib/chevre/repo/serviceOutput.d.ts +0 -36
- package/lib/chevre/repo/serviceOutput.js +0 -167
- package/lib/chevre/repo/serviceOutputIdentifier.d.ts +0 -18
- package/lib/chevre/repo/serviceOutputIdentifier.js +0 -74
- package/lib/chevre/service/account.d.ts +0 -59
- package/lib/chevre/service/account.js +0 -108
- package/lib/chevre/service/accountTransaction/deposit.d.ts +0 -14
- package/lib/chevre/service/accountTransaction/deposit.js +0 -57
- package/lib/chevre/service/accountTransaction/factory.d.ts +0 -10
- package/lib/chevre/service/accountTransaction/factory.js +0 -101
- package/lib/chevre/service/accountTransaction/transfer.d.ts +0 -14
- package/lib/chevre/service/accountTransaction/transfer.js +0 -87
- package/lib/chevre/service/accountTransaction/withdraw.d.ts +0 -14
- package/lib/chevre/service/accountTransaction/withdraw.js +0 -68
- package/lib/chevre/service/accountTransaction.d.ts +0 -20
- package/lib/chevre/service/accountTransaction.js +0 -81
- package/lib/chevre/service/permit.d.ts +0 -45
- package/lib/chevre/service/permit.js +0 -158
- package/lib/chevre/service/product.d.ts +0 -9
- package/lib/chevre/service/product.js +0 -77
- package/lib/chevre/service/task/registerService.d.ts +0 -6
- package/lib/chevre/service/task/registerService.js +0 -22
|
@@ -110,17 +110,6 @@ class AggregateOfferRepo {
|
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
// const eligibleMonetaryAmountCurrencyEq = params.eligibleMonetaryAmount?.currency?.$eq;
|
|
114
|
-
// if (typeof eligibleMonetaryAmountCurrencyEq === 'string') {
|
|
115
|
-
// matchStages.push({
|
|
116
|
-
// $match: {
|
|
117
|
-
// 'offers.eligibleMonetaryAmount.currency': {
|
|
118
|
-
// $exists: true,
|
|
119
|
-
// $eq: eligibleMonetaryAmountCurrencyEq
|
|
120
|
-
// }
|
|
121
|
-
// }
|
|
122
|
-
// });
|
|
123
|
-
// }
|
|
124
113
|
const eligibleSeatingTypeCodeValueEq = params.eligibleSeatingType?.codeValue?.$eq;
|
|
125
114
|
if (typeof eligibleSeatingTypeCodeValueEq === 'string') {
|
|
126
115
|
matchStages.push({
|
|
@@ -378,11 +367,6 @@ class AggregateOfferRepo {
|
|
|
378
367
|
}
|
|
379
368
|
});
|
|
380
369
|
}
|
|
381
|
-
// add advanceBookingRequirement.id.$eq(2025-04-08~)
|
|
382
|
-
const advanceBookingRequirementIdEq = params.advanceBookingRequirement?.id?.$eq;
|
|
383
|
-
if (typeof advanceBookingRequirementIdEq === 'string') {
|
|
384
|
-
matchStages.push({ $match: { 'offers.advanceBookingRequirement.id': { $exists: true, $eq: advanceBookingRequirementIdEq } } });
|
|
385
|
-
}
|
|
386
370
|
return matchStages;
|
|
387
371
|
}
|
|
388
372
|
static CREATE_AGGREGATE_OFFERS_PROJECTION(params) {
|
|
@@ -199,15 +199,6 @@ const indexes = [
|
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
],
|
|
202
|
-
[
|
|
203
|
-
{ 'offers.eligibleMonetaryAmount.currency': 1 },
|
|
204
|
-
{
|
|
205
|
-
name: 'searchByOffersEligibleMonetaryAmountCurrency-v2',
|
|
206
|
-
partialFilterExpression: {
|
|
207
|
-
'offers.eligibleMonetaryAmount.currency': { $exists: true }
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
],
|
|
211
202
|
[
|
|
212
203
|
{ 'offers.eligibleSeatingType.codeValue': 1 },
|
|
213
204
|
{
|
|
@@ -271,15 +262,6 @@ const indexes = [
|
|
|
271
262
|
}
|
|
272
263
|
}
|
|
273
264
|
],
|
|
274
|
-
[
|
|
275
|
-
{ 'offers.advanceBookingRequirement.id': 1 },
|
|
276
|
-
{
|
|
277
|
-
name: 'advanceBookingRequirementId',
|
|
278
|
-
partialFilterExpression: {
|
|
279
|
-
'offers.advanceBookingRequirement.id': { $exists: true }
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
]
|
|
283
265
|
];
|
|
284
266
|
exports.indexes = indexes;
|
|
285
267
|
/**
|
|
@@ -38,7 +38,6 @@ class OfferRepo {
|
|
|
38
38
|
color: '$offers.color',
|
|
39
39
|
acceptedPaymentMethod: '$offers.acceptedPaymentMethod',
|
|
40
40
|
additionalProperty: '$offers.additionalProperty',
|
|
41
|
-
advanceBookingRequirement: '$offers.advanceBookingRequirement',
|
|
42
41
|
alternateName: '$offers.alternateName',
|
|
43
42
|
addOn: '$offers.addOn',
|
|
44
43
|
availability: '$offers.availability',
|
|
@@ -50,7 +49,6 @@ class OfferRepo {
|
|
|
50
49
|
eligibleCustomerType: '$offers.eligibleCustomerType',
|
|
51
50
|
eligibleDuration: '$offers.eligibleDuration',
|
|
52
51
|
eligibleMembershipType: '$offers.eligibleMembershipType',
|
|
53
|
-
// eligibleMonetaryAmount: '$offers.eligibleMonetaryAmount', // discontinue(2026-04-19~)
|
|
54
52
|
eligibleQuantity: '$offers.eligibleQuantity',
|
|
55
53
|
eligibleRegion: '$offers.eligibleRegion',
|
|
56
54
|
eligibleSeatingType: '$offers.eligibleSeatingType',
|
|
@@ -219,10 +219,7 @@ class ProductRepo {
|
|
|
219
219
|
const { id, productID, project, typeOf, offers, ...setFields } = params.$set; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
220
220
|
switch (typeOf) {
|
|
221
221
|
case factory_1.factory.product.ProductType.EventService:
|
|
222
|
-
case factory_1.factory.product.ProductType.MembershipService:
|
|
223
|
-
case factory_1.factory.product.ProductType.PaymentCard:
|
|
224
222
|
case factory_1.factory.product.ProductType.Product:
|
|
225
|
-
case factory_1.factory.product.ProductType.Transportation:
|
|
226
223
|
doc = await this.productModel.findOneAndUpdate({
|
|
227
224
|
_id: { $eq: params.id },
|
|
228
225
|
typeOf: { $eq: typeOf }
|
|
@@ -136,10 +136,10 @@ export declare class TransactionRepo {
|
|
|
136
136
|
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
137
137
|
startDate: Date;
|
|
138
138
|
endDate?: Date | undefined;
|
|
139
|
-
status: factory.transactionStatusType;
|
|
140
139
|
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
141
140
|
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
142
141
|
potentialActions?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IPotentialActions | undefined;
|
|
142
|
+
status: factory.transactionStatusType;
|
|
143
143
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
144
144
|
} & {
|
|
145
145
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -155,10 +155,10 @@ export declare class TransactionRepo {
|
|
|
155
155
|
result?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IResult | undefined;
|
|
156
156
|
startDate: Date;
|
|
157
157
|
endDate?: Date | undefined;
|
|
158
|
-
status: factory.transactionStatusType;
|
|
159
158
|
agent: import("@chevre/factory/lib/chevre/transaction").IAgent;
|
|
160
159
|
potentialActions?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IPotentialActions | undefined;
|
|
161
160
|
recipient?: undefined;
|
|
161
|
+
status: factory.transactionStatusType;
|
|
162
162
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
163
163
|
} & {
|
|
164
164
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -174,10 +174,10 @@ export declare class TransactionRepo {
|
|
|
174
174
|
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
175
175
|
startDate: Date;
|
|
176
176
|
endDate?: Date | undefined;
|
|
177
|
-
status: factory.transactionStatusType;
|
|
178
177
|
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
179
178
|
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
180
179
|
potentialActions?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IPotentialActions | undefined;
|
|
180
|
+
status: factory.transactionStatusType;
|
|
181
181
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
182
182
|
} & {
|
|
183
183
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -193,10 +193,10 @@ export declare class TransactionRepo {
|
|
|
193
193
|
result?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IResult | undefined;
|
|
194
194
|
startDate: Date;
|
|
195
195
|
endDate?: Date | undefined;
|
|
196
|
-
status: factory.transactionStatusType;
|
|
197
196
|
agent: import("@chevre/factory/lib/chevre/transaction").IAgent;
|
|
198
197
|
potentialActions?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IPotentialActions | undefined;
|
|
199
198
|
recipient?: undefined;
|
|
199
|
+
status: factory.transactionStatusType;
|
|
200
200
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
201
201
|
} & {
|
|
202
202
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
* リポジトリ
|
|
3
3
|
*/
|
|
4
4
|
import type { AcceptedOfferRepo } from './repo/acceptedOffer';
|
|
5
|
-
import type { AccountRepo } from './repo/account';
|
|
6
5
|
import type { AccountingReportRepo } from './repo/accountingReport';
|
|
7
6
|
import type { AccountTitleRepo } from './repo/accountTitle';
|
|
8
|
-
import type { AccountTransactionRepo } from './repo/accountTransaction';
|
|
9
7
|
import type { ActionRepo } from './repo/action';
|
|
10
8
|
import type { AcceptCOAOfferActionRepo } from './repo/action/acceptCOAOffer';
|
|
11
9
|
import type { AcceptPayActionRepo } from './repo/action/acceptPay';
|
|
@@ -18,7 +16,6 @@ import type { CheckThingActionRepo } from './repo/action/checkThing';
|
|
|
18
16
|
import type { PayActionRepo } from './repo/action/pay';
|
|
19
17
|
import type { RefundActionRepo } from './repo/action/refund';
|
|
20
18
|
import type { AdditionalPropertyRepo } from './repo/additionalProperty';
|
|
21
|
-
import type { AdvanceBookingRequirementRepo } from './repo/advanceBookingRequirement';
|
|
22
19
|
import type { AggregateActionRepo } from './repo/aggregateAction';
|
|
23
20
|
import type { AggregateOfferRepo } from './repo/aggregateOffer';
|
|
24
21
|
import type { AggregateOrderRepo } from './repo/aggregateOrder';
|
|
@@ -59,7 +56,6 @@ import type { PaymentServiceRepo } from './repo/paymentService';
|
|
|
59
56
|
import type { PaymentServiceChannelRepo } from './repo/paymentServiceChannel';
|
|
60
57
|
import type { PaymentServiceProviderRepo } from './repo/paymentServiceProvider';
|
|
61
58
|
import type { PendingReservationRepo } from './repo/pendingReservation';
|
|
62
|
-
import type { PermitRepo } from './repo/permit';
|
|
63
59
|
import type { EntranceGateRepo } from './repo/place/entranceGate';
|
|
64
60
|
import type { HasPOSRepo } from './repo/place/hasPOS';
|
|
65
61
|
import type { MovieTheaterRepo } from './repo/place/movieTheater';
|
|
@@ -83,8 +79,6 @@ import type { SellerMakesOfferRepo } from './repo/sellerMakesOffer';
|
|
|
83
79
|
import type { SellerPaymentAcceptedRepo } from './repo/sellerPaymentAccepted';
|
|
84
80
|
import type { SellerReturnPolicyRepo } from './repo/sellerReturnPolicy';
|
|
85
81
|
import type { ServiceAvailableHourRepo } from './repo/service/availableHour';
|
|
86
|
-
import type { ServiceOutputRepo } from './repo/serviceOutput';
|
|
87
|
-
import type { ServiceOutputIdentifierRepo } from './repo/serviceOutputIdentifier';
|
|
88
82
|
import type { SettingRepo } from './repo/setting';
|
|
89
83
|
import type { JWTSettingRepo } from './repo/setting/jwt';
|
|
90
84
|
import type { StockHolderRepo } from './repo/stockHolder';
|
|
@@ -103,10 +97,6 @@ export type AcceptedOffer = AcceptedOfferRepo;
|
|
|
103
97
|
export declare namespace AcceptedOffer {
|
|
104
98
|
function createInstance(...params: ConstructorParameters<typeof AcceptedOfferRepo>): Promise<AcceptedOfferRepo>;
|
|
105
99
|
}
|
|
106
|
-
export type Account = AccountRepo;
|
|
107
|
-
export declare namespace Account {
|
|
108
|
-
function createInstance(...params: ConstructorParameters<typeof AccountRepo>): Promise<AccountRepo>;
|
|
109
|
-
}
|
|
110
100
|
export type AccountingReport = AccountingReportRepo;
|
|
111
101
|
export declare namespace AccountingReport {
|
|
112
102
|
function createInstance(...params: ConstructorParameters<typeof AccountingReportRepo>): Promise<AccountingReportRepo>;
|
|
@@ -115,10 +105,6 @@ export type AccountTitle = AccountTitleRepo;
|
|
|
115
105
|
export declare namespace AccountTitle {
|
|
116
106
|
function createInstance(...params: ConstructorParameters<typeof AccountTitleRepo>): Promise<AccountTitleRepo>;
|
|
117
107
|
}
|
|
118
|
-
export type AccountTransaction = AccountTransactionRepo;
|
|
119
|
-
export declare namespace AccountTransaction {
|
|
120
|
-
function createInstance(...params: ConstructorParameters<typeof AccountTransactionRepo>): Promise<AccountTransactionRepo>;
|
|
121
|
-
}
|
|
122
108
|
export type Action = ActionRepo;
|
|
123
109
|
export declare namespace Action {
|
|
124
110
|
function createInstance(...params: ConstructorParameters<typeof ActionRepo>): Promise<ActionRepo>;
|
|
@@ -169,10 +155,6 @@ export type AdditionalProperty = AdditionalPropertyRepo;
|
|
|
169
155
|
export declare namespace AdditionalProperty {
|
|
170
156
|
function createInstance(...params: ConstructorParameters<typeof AdditionalPropertyRepo>): Promise<AdditionalPropertyRepo>;
|
|
171
157
|
}
|
|
172
|
-
export type AdvanceBookingRequirement = AdvanceBookingRequirementRepo;
|
|
173
|
-
export declare namespace AdvanceBookingRequirement {
|
|
174
|
-
function createInstance(...params: ConstructorParameters<typeof AdvanceBookingRequirementRepo>): Promise<AdvanceBookingRequirementRepo>;
|
|
175
|
-
}
|
|
176
158
|
export type AggregateAction = AggregateActionRepo;
|
|
177
159
|
export declare namespace AggregateAction {
|
|
178
160
|
function createInstance(...params: ConstructorParameters<typeof AggregateActionRepo>): Promise<AggregateActionRepo>;
|
|
@@ -347,10 +329,6 @@ export type Person = PersonRepo;
|
|
|
347
329
|
export declare namespace Person {
|
|
348
330
|
function createInstance(...params: ConstructorParameters<typeof PersonRepo>): Promise<PersonRepo>;
|
|
349
331
|
}
|
|
350
|
-
export type Permit = PermitRepo;
|
|
351
|
-
export declare namespace Permit {
|
|
352
|
-
function createInstance(...params: ConstructorParameters<typeof PermitRepo>): Promise<PermitRepo>;
|
|
353
|
-
}
|
|
354
332
|
export declare namespace place {
|
|
355
333
|
type EntranceGate = EntranceGateRepo;
|
|
356
334
|
/**
|
|
@@ -459,14 +437,6 @@ export type ServiceAvailableHour = ServiceAvailableHourRepo;
|
|
|
459
437
|
export declare namespace ServiceAvailableHour {
|
|
460
438
|
function createInstance(...params: ConstructorParameters<typeof ServiceAvailableHourRepo>): Promise<ServiceAvailableHourRepo>;
|
|
461
439
|
}
|
|
462
|
-
export type ServiceOutput = ServiceOutputRepo;
|
|
463
|
-
export declare namespace ServiceOutput {
|
|
464
|
-
function createInstance(...params: ConstructorParameters<typeof ServiceOutputRepo>): Promise<ServiceOutputRepo>;
|
|
465
|
-
}
|
|
466
|
-
export type ServiceOutputIdentifier = ServiceOutputIdentifierRepo;
|
|
467
|
-
export declare namespace ServiceOutputIdentifier {
|
|
468
|
-
function createInstance(...params: ConstructorParameters<typeof ServiceOutputIdentifierRepo>): Promise<ServiceOutputIdentifierRepo>;
|
|
469
|
-
}
|
|
470
440
|
export type Setting = SettingRepo;
|
|
471
441
|
export declare namespace Setting {
|
|
472
442
|
function createInstance(...params: ConstructorParameters<typeof SettingRepo>): Promise<SettingRepo>;
|
package/lib/chevre/repository.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaymentServiceProvider = exports.PaymentServiceChannel = exports.PaymentService = exports.Passport = exports.OwnershipInfo = exports.OrderNumber = exports.OrderInTransaction = exports.Order = exports.Offer = exports.OfferItemCondition = exports.OfferCatalogItem = exports.OfferCatalog = exports.NoteAboutOrder = exports.Note = exports.MovieTicketType = exports.Message = exports.MerchantReturnPolicy = exports.MemberProgram = exports.Member = exports.Issuer = exports.IdentityProvider = exports.Identity = exports.EventSeries = exports.EventSellerMakesOffer = exports.EventOffer = exports.Event = exports.EmailMessage = exports.CustomerType = exports.Customer = exports.Credentials = exports.CreativeWork = exports.ConfirmationNumber = exports.Authorization = exports.CategoryCode = exports.assetTransaction = exports.AssetTransaction = exports.Aggregation = exports.AggregateReservation = exports.AggregateOrder = exports.AggregateOffer = exports.AggregateAction = exports.
|
|
4
|
-
exports.WebSite = exports.rateLimit = exports.TransactionProcess = exports.TransactionNumber = exports.transaction = exports.Transaction = exports.Ticket = exports.Task = exports.StockHolder = exports.setting = exports.Setting = exports.
|
|
3
|
+
exports.place = exports.Person = exports.PendingReservation = exports.PaymentServiceProvider = exports.PaymentServiceChannel = exports.PaymentService = exports.Passport = exports.OwnershipInfo = exports.OrderNumber = exports.OrderInTransaction = exports.Order = exports.Offer = exports.OfferItemCondition = exports.OfferCatalogItem = exports.OfferCatalog = exports.NoteAboutOrder = exports.Note = exports.MovieTicketType = exports.Message = exports.MerchantReturnPolicy = exports.MemberProgram = exports.Member = exports.Issuer = exports.IdentityProvider = exports.Identity = exports.EventSeries = exports.EventSellerMakesOffer = exports.EventOffer = exports.Event = exports.EmailMessage = exports.CustomerType = exports.Customer = exports.Credentials = exports.CreativeWork = exports.ConfirmationNumber = exports.Authorization = exports.CategoryCode = exports.assetTransaction = exports.AssetTransaction = exports.Aggregation = exports.AggregateReservation = exports.AggregateOrder = exports.AggregateOffer = exports.AggregateAction = exports.AdditionalProperty = exports.action = exports.Action = exports.AccountTitle = exports.AccountingReport = exports.AcceptedOffer = void 0;
|
|
4
|
+
exports.WebSite = exports.rateLimit = exports.TransactionProcess = exports.TransactionNumber = exports.transaction = exports.Transaction = exports.Ticket = exports.Task = exports.StockHolder = exports.setting = exports.Setting = exports.ServiceAvailableHour = exports.SellerReturnPolicy = exports.SellerPaymentAccepted = exports.SellerMakesOffer = exports.Seller = exports.Schedule = exports.Role = exports.ReserveInterface = exports.Reservation = exports.ProjectMakesOffer = exports.Project = exports.ProductModel = exports.ProductHasOfferCatalog = exports.Product = exports.PriceSpecification = exports.PotentialAction = void 0;
|
|
5
5
|
var AcceptedOffer;
|
|
6
6
|
(function (AcceptedOffer) {
|
|
7
7
|
let repo;
|
|
@@ -13,17 +13,6 @@ var AcceptedOffer;
|
|
|
13
13
|
}
|
|
14
14
|
AcceptedOffer.createInstance = createInstance;
|
|
15
15
|
})(AcceptedOffer || (exports.AcceptedOffer = AcceptedOffer = {}));
|
|
16
|
-
var Account;
|
|
17
|
-
(function (Account) {
|
|
18
|
-
let repo;
|
|
19
|
-
async function createInstance(...params) {
|
|
20
|
-
if (repo === undefined) {
|
|
21
|
-
repo = (await import('./repo/account.js')).AccountRepo;
|
|
22
|
-
}
|
|
23
|
-
return new repo(...params);
|
|
24
|
-
}
|
|
25
|
-
Account.createInstance = createInstance;
|
|
26
|
-
})(Account || (exports.Account = Account = {}));
|
|
27
16
|
var AccountingReport;
|
|
28
17
|
(function (AccountingReport) {
|
|
29
18
|
let repo;
|
|
@@ -46,17 +35,6 @@ var AccountTitle;
|
|
|
46
35
|
}
|
|
47
36
|
AccountTitle.createInstance = createInstance;
|
|
48
37
|
})(AccountTitle || (exports.AccountTitle = AccountTitle = {}));
|
|
49
|
-
var AccountTransaction;
|
|
50
|
-
(function (AccountTransaction) {
|
|
51
|
-
let repo;
|
|
52
|
-
async function createInstance(...params) {
|
|
53
|
-
if (repo === undefined) {
|
|
54
|
-
repo = (await import('./repo/accountTransaction.js')).AccountTransactionRepo;
|
|
55
|
-
}
|
|
56
|
-
return new repo(...params);
|
|
57
|
-
}
|
|
58
|
-
AccountTransaction.createInstance = createInstance;
|
|
59
|
-
})(AccountTransaction || (exports.AccountTransaction = AccountTransaction = {}));
|
|
60
38
|
var Action;
|
|
61
39
|
(function (Action) {
|
|
62
40
|
let repo;
|
|
@@ -192,17 +170,6 @@ var AdditionalProperty;
|
|
|
192
170
|
}
|
|
193
171
|
AdditionalProperty.createInstance = createInstance;
|
|
194
172
|
})(AdditionalProperty || (exports.AdditionalProperty = AdditionalProperty = {}));
|
|
195
|
-
var AdvanceBookingRequirement;
|
|
196
|
-
(function (AdvanceBookingRequirement) {
|
|
197
|
-
let repo;
|
|
198
|
-
async function createInstance(...params) {
|
|
199
|
-
if (repo === undefined) {
|
|
200
|
-
repo = (await import('./repo/advanceBookingRequirement.js')).AdvanceBookingRequirementRepo;
|
|
201
|
-
}
|
|
202
|
-
return new repo(...params);
|
|
203
|
-
}
|
|
204
|
-
AdvanceBookingRequirement.createInstance = createInstance;
|
|
205
|
-
})(AdvanceBookingRequirement || (exports.AdvanceBookingRequirement = AdvanceBookingRequirement = {}));
|
|
206
173
|
var AggregateAction;
|
|
207
174
|
(function (AggregateAction) {
|
|
208
175
|
let repo;
|
|
@@ -679,17 +646,6 @@ var Person;
|
|
|
679
646
|
}
|
|
680
647
|
Person.createInstance = createInstance;
|
|
681
648
|
})(Person || (exports.Person = Person = {}));
|
|
682
|
-
var Permit;
|
|
683
|
-
(function (Permit) {
|
|
684
|
-
let repo;
|
|
685
|
-
async function createInstance(...params) {
|
|
686
|
-
if (repo === undefined) {
|
|
687
|
-
repo = (await import('./repo/permit.js')).PermitRepo;
|
|
688
|
-
}
|
|
689
|
-
return new repo(...params);
|
|
690
|
-
}
|
|
691
|
-
Permit.createInstance = createInstance;
|
|
692
|
-
})(Permit || (exports.Permit = Permit = {}));
|
|
693
649
|
var place;
|
|
694
650
|
(function (place) {
|
|
695
651
|
/**
|
|
@@ -953,28 +909,6 @@ var ServiceAvailableHour;
|
|
|
953
909
|
}
|
|
954
910
|
ServiceAvailableHour.createInstance = createInstance;
|
|
955
911
|
})(ServiceAvailableHour || (exports.ServiceAvailableHour = ServiceAvailableHour = {}));
|
|
956
|
-
var ServiceOutput;
|
|
957
|
-
(function (ServiceOutput) {
|
|
958
|
-
let repo;
|
|
959
|
-
async function createInstance(...params) {
|
|
960
|
-
if (repo === undefined) {
|
|
961
|
-
repo = (await import('./repo/serviceOutput.js')).ServiceOutputRepo;
|
|
962
|
-
}
|
|
963
|
-
return new repo(...params);
|
|
964
|
-
}
|
|
965
|
-
ServiceOutput.createInstance = createInstance;
|
|
966
|
-
})(ServiceOutput || (exports.ServiceOutput = ServiceOutput = {}));
|
|
967
|
-
var ServiceOutputIdentifier;
|
|
968
|
-
(function (ServiceOutputIdentifier) {
|
|
969
|
-
let repo;
|
|
970
|
-
async function createInstance(...params) {
|
|
971
|
-
if (repo === undefined) {
|
|
972
|
-
repo = (await import('./repo/serviceOutputIdentifier.js')).ServiceOutputIdentifierRepo;
|
|
973
|
-
}
|
|
974
|
-
return new repo(...params);
|
|
975
|
-
}
|
|
976
|
-
ServiceOutputIdentifier.createInstance = createInstance;
|
|
977
|
-
})(ServiceOutputIdentifier || (exports.ServiceOutputIdentifier = ServiceOutputIdentifier = {}));
|
|
978
912
|
var Setting;
|
|
979
913
|
(function (Setting) {
|
|
980
914
|
let repo;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { factory } from '../../../../factory';
|
|
2
|
-
import type { AdvanceBookingRequirementRepo } from '../../../../repo/advanceBookingRequirement';
|
|
3
2
|
import type { IMinimizedIndividualEvent } from '../../../../repo/event';
|
|
4
3
|
import type { OfferRepo } from '../../../../repo/offer/unitPriceInCatalog';
|
|
5
4
|
import type { OfferCatalogRepo } from '../../../../repo/offerCatalog';
|
|
@@ -19,7 +18,6 @@ declare function createSubReservations(params: {
|
|
|
19
18
|
};
|
|
20
19
|
validateAppliesToMovieTicket: boolean;
|
|
21
20
|
}): (repos: {
|
|
22
|
-
advanceBookingRequirement: AdvanceBookingRequirementRepo;
|
|
23
21
|
offer: OfferRepo;
|
|
24
22
|
offerCatalog: OfferCatalogRepo;
|
|
25
23
|
paymentService: PaymentServiceRepo;
|
|
@@ -32,18 +32,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
36
|
exports.createSubReservations = createSubReservations;
|
|
40
|
-
const debug_1 = __importDefault(require("debug"));
|
|
41
|
-
const moment_1 = __importDefault(require("moment"));
|
|
42
37
|
const factory_1 = require("../../../../factory");
|
|
43
|
-
// import * as OfferService from '../../../offer';
|
|
44
38
|
const ProductOfferService = __importStar(require("../../../offer/product"));
|
|
45
39
|
const createReservation_1 = require("./factory/createReservation");
|
|
46
|
-
const debug = (0, debug_1.default)('chevre-domain:service:assetTransaction:reserve');
|
|
47
40
|
function createSubReservations(params) {
|
|
48
41
|
return async (repos) => {
|
|
49
42
|
// 予約番号
|
|
@@ -56,14 +49,7 @@ function createSubReservations(params) {
|
|
|
56
49
|
const eventOffers = params.event.offers;
|
|
57
50
|
const reservedSeatsOnly = eventOffers?.itemOffered.serviceOutput?.reservedTicket?.ticketedSeat !== undefined;
|
|
58
51
|
// オファーIDごとにオファー適用条件を確認(興行オファー承認アクションから処理を移行)(2024-07-03~)
|
|
59
|
-
validateQuantityRequirement({ acceptedOffers: params.acceptedOffers, ticketOffers: params.ticketOffers
|
|
60
|
-
// 事前予約要件参照
|
|
61
|
-
let advanceBookingRequirements = [];
|
|
62
|
-
const advanceBookingRequirementIds = [...new Set(params.availableOffers.reduce((a, b) => (typeof b.advanceBookingRequirement?.id === 'string') ? [...a, b.advanceBookingRequirement.id] : a, []))];
|
|
63
|
-
if (advanceBookingRequirementIds.length > 0) {
|
|
64
|
-
advanceBookingRequirements = await repos.advanceBookingRequirement.projectFields({ id: { $in: advanceBookingRequirementIds } }, ['identifier', 'maxValue', 'minValue', 'unitCode', 'valueReference']);
|
|
65
|
-
debug('createSubReservations:', advanceBookingRequirements.length, 'advanceBookingRequirements found', JSON.stringify(advanceBookingRequirements));
|
|
66
|
-
}
|
|
52
|
+
validateQuantityRequirement({ acceptedOffers: params.acceptedOffers, ticketOffers: params.ticketOffers });
|
|
67
53
|
const reservations = [];
|
|
68
54
|
let reservationIndex = -1;
|
|
69
55
|
for (const acceptedOffer of params.acceptedOffers) {
|
|
@@ -77,13 +63,6 @@ function createSubReservations(params) {
|
|
|
77
63
|
if (ticketType === undefined) {
|
|
78
64
|
throw new factory_1.factory.errors.NotFound(ticketOffer.typeOf);
|
|
79
65
|
}
|
|
80
|
-
// 事前予約要件検証(2023-08-10~)
|
|
81
|
-
validateAdvanceBookingRequirement({
|
|
82
|
-
advanceBookingRequirements,
|
|
83
|
-
unitPriceOffer: ticketType,
|
|
84
|
-
now: params.now,
|
|
85
|
-
reservationFor: params.event
|
|
86
|
-
});
|
|
87
66
|
const programMembershipUsed = await validateProgramMembershipUsed({
|
|
88
67
|
acceptedOffer,
|
|
89
68
|
availableOffer: ticketType,
|
|
@@ -271,11 +250,10 @@ function searchAvailableAddOns(params) {
|
|
|
271
250
|
};
|
|
272
251
|
}
|
|
273
252
|
function validateQuantityRequirement(params) {
|
|
274
|
-
const { acceptedOffers, ticketOffers
|
|
253
|
+
const { acceptedOffers, ticketOffers } = params;
|
|
275
254
|
const offerIds = (Array.isArray(acceptedOffers))
|
|
276
255
|
? [...new Set(params.acceptedOffers.map(({ id }) => id))]
|
|
277
256
|
: [];
|
|
278
|
-
debug('validating quantity requirement... reservationNumber:', reservationNumber, offerIds);
|
|
279
257
|
// オファーIDごとにオファー適用条件を確認
|
|
280
258
|
offerIds.forEach((offerId) => {
|
|
281
259
|
const numAcceptedOffersByOfferId = params.acceptedOffers.filter(({ id }) => id === offerId).length;
|
|
@@ -295,83 +273,24 @@ function validateQuantityRequirement(params) {
|
|
|
295
273
|
referenceQuantityValue = unitPriceSpecReferenceQuantityValue;
|
|
296
274
|
}
|
|
297
275
|
// アイテム数が適用単位要件を満たしていなければエラー
|
|
298
|
-
debug('validating referenceQuantity... reservationNumber:', reservationNumber, offerId, 'numAcceptedOffersByOfferId:', numAcceptedOffersByOfferId, 'referenceQuantityValue:', referenceQuantityValue);
|
|
299
276
|
if (numAcceptedOffersByOfferId % referenceQuantityValue !== 0) {
|
|
300
277
|
throw new factory_1.factory.errors.Argument('acceptedOffers', `Offer ${offerId} requires reference quantity value ${referenceQuantityValue}`);
|
|
301
278
|
}
|
|
302
279
|
// 適用数量要件を満たしていなければエラー
|
|
303
280
|
const maxValue = unitPriceSpec.eligibleQuantity?.maxValue;
|
|
304
281
|
if (typeof maxValue === 'number') {
|
|
305
|
-
debug('validating eligibleQuantity.maxValue... reservationNumber:', reservationNumber, offerId, 'numAcceptedOffersByOfferId:', numAcceptedOffersByOfferId, 'maxValue:', maxValue);
|
|
306
282
|
if (numAcceptedOffersByOfferId > maxValue) {
|
|
307
283
|
throw new factory_1.factory.errors.Argument('acceptedOffers', `Number of offer:${offerId} must be less than or equal to ${maxValue}`);
|
|
308
284
|
}
|
|
309
285
|
}
|
|
310
286
|
const minValue = unitPriceSpec.eligibleQuantity?.minValue;
|
|
311
287
|
if (typeof minValue === 'number') {
|
|
312
|
-
debug('validating eligibleQuantity.minValue... reservationNumber:', reservationNumber, offerId, 'numAcceptedOffersByOfferId:', numAcceptedOffersByOfferId, 'minValue:', minValue);
|
|
313
288
|
if (numAcceptedOffersByOfferId < minValue) {
|
|
314
289
|
throw new factory_1.factory.errors.Argument('acceptedOffers', `Number of offer:${offerId} must be more than or equal to ${minValue}`);
|
|
315
290
|
}
|
|
316
291
|
}
|
|
317
292
|
});
|
|
318
293
|
}
|
|
319
|
-
/**
|
|
320
|
-
* 事前予約要件を検証する
|
|
321
|
-
*/
|
|
322
|
-
function validateAdvanceBookingRequirement(params) {
|
|
323
|
-
let requirementSatisfied = true;
|
|
324
|
-
// reimplement using advanceBookingRequirementRepo(2025-04-08~)
|
|
325
|
-
const advanceBookingRequirementId = params.unitPriceOffer.advanceBookingRequirement?.id;
|
|
326
|
-
if (typeof advanceBookingRequirementId === 'string') {
|
|
327
|
-
const advanceBookingRequirement = params.advanceBookingRequirements.find(({ id }) => id === advanceBookingRequirementId);
|
|
328
|
-
if (advanceBookingRequirement === undefined) {
|
|
329
|
-
throw new factory_1.factory.errors.NotFound('advanceBookingRequirement');
|
|
330
|
-
}
|
|
331
|
-
const advanceBookingRequirementMaxValue = advanceBookingRequirement.maxValue;
|
|
332
|
-
const advanceBookingRequirementMinValue = advanceBookingRequirement.minValue;
|
|
333
|
-
const advanceBookingRequirementUnitCode = advanceBookingRequirement.unitCode;
|
|
334
|
-
const valueReferenceOpens = advanceBookingRequirement.valueReference?.opens;
|
|
335
|
-
let usageDate = (0, moment_1.default)(params.reservationFor.startDate, true);
|
|
336
|
-
if (typeof valueReferenceOpens === 'string') {
|
|
337
|
-
// support valueReference(2025-04-10~)
|
|
338
|
-
const opensOffset = valueReferenceOpens.slice(8); // format: HH:mm:ssZ
|
|
339
|
-
debug('opensOffset:', opensOffset);
|
|
340
|
-
usageDate = usageDate.utcOffset(opensOffset);
|
|
341
|
-
usageDate = (0, moment_1.default)(`${usageDate.format('YYYY-MM-DD')}T${valueReferenceOpens}`, true);
|
|
342
|
-
}
|
|
343
|
-
debug('usageDate:', usageDate);
|
|
344
|
-
if (typeof advanceBookingRequirementMaxValue === 'number' && typeof advanceBookingRequirementUnitCode === 'string') {
|
|
345
|
-
if (advanceBookingRequirementMaxValue < 0) {
|
|
346
|
-
throw new factory_1.factory.errors.NotImplemented('negative value as advanceBookingRequirement.maxValue not implemented');
|
|
347
|
-
}
|
|
348
|
-
if (advanceBookingRequirementUnitCode !== factory_1.factory.unitCode.Day) {
|
|
349
|
-
throw new factory_1.factory.errors.NotImplemented(`only ${factory_1.factory.unitCode.Day} implemented`);
|
|
350
|
-
}
|
|
351
|
-
const usageDateMustBeBefore = (0, moment_1.default)(params.now)
|
|
352
|
-
.add(advanceBookingRequirementMaxValue, 'days');
|
|
353
|
-
if (!usageDate.isSameOrBefore(usageDateMustBeBefore)) {
|
|
354
|
-
requirementSatisfied = false;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
if (typeof advanceBookingRequirementMinValue === 'number' && typeof advanceBookingRequirementUnitCode === 'string') {
|
|
358
|
-
if (advanceBookingRequirementMinValue < 0) {
|
|
359
|
-
throw new factory_1.factory.errors.NotImplemented('negative value as advanceBookingRequirement.minValue not implemented');
|
|
360
|
-
}
|
|
361
|
-
if (advanceBookingRequirementUnitCode !== factory_1.factory.unitCode.Day) {
|
|
362
|
-
throw new factory_1.factory.errors.NotImplemented(`only ${factory_1.factory.unitCode.Day} implemented`);
|
|
363
|
-
}
|
|
364
|
-
const usageDateMustBeAfter = (0, moment_1.default)(params.now)
|
|
365
|
-
.add(advanceBookingRequirementMinValue, 'days');
|
|
366
|
-
if (!usageDate.isSameOrAfter(usageDateMustBeAfter)) {
|
|
367
|
-
requirementSatisfied = false;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
if (!requirementSatisfied) {
|
|
372
|
-
throw new factory_1.factory.errors.Argument('acceptedOffer.id', 'advanceBookingRequirement not satisfied');
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
294
|
function validateProgramMembershipUsed(params) {
|
|
376
295
|
return async (repos) => {
|
|
377
296
|
// const now = new Date();
|
|
@@ -387,25 +306,7 @@ function validateProgramMembershipUsed(params) {
|
|
|
387
306
|
const issuedThroughTypeOf = requestedProgramMembershipUsed?.issuedThrough?.typeOf;
|
|
388
307
|
if (typeof programMembershipUsedIdentifier === 'string') {
|
|
389
308
|
let permitIssuedThrough;
|
|
390
|
-
|
|
391
|
-
if (issuedThroughTypeOf === factory_1.factory.product.ProductType.MembershipService) {
|
|
392
|
-
const issuedThroughId = requestedProgramMembershipUsed?.issuedThrough?.id;
|
|
393
|
-
if (typeof issuedThroughId !== 'string' || issuedThroughId === '') {
|
|
394
|
-
throw new factory_1.factory.errors.ArgumentNull('acceptedOffer.itemOffered.serviceOutput.programMembershipUsed.issuedThrough.id');
|
|
395
|
-
}
|
|
396
|
-
permitIssuedThrough = (await repos.product.projectFields({
|
|
397
|
-
limit: 1,
|
|
398
|
-
page: 1,
|
|
399
|
-
id: { $eq: issuedThroughId },
|
|
400
|
-
typeOf: { $eq: factory_1.factory.product.ProductType.MembershipService }
|
|
401
|
-
}, ['typeOf', 'project', 'serviceType', 'serviceOutput']
|
|
402
|
-
// []
|
|
403
|
-
)).shift();
|
|
404
|
-
if (permitIssuedThrough === undefined) {
|
|
405
|
-
throw new factory_1.factory.errors.NotFound(factory_1.factory.product.ProductType.MembershipService);
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
else if (issuedThroughTypeOf === factory_1.factory.service.paymentService.PaymentServiceType.CreditCard) {
|
|
309
|
+
if (issuedThroughTypeOf === factory_1.factory.service.paymentService.PaymentServiceType.CreditCard) {
|
|
409
310
|
const issuedThroughId = requestedProgramMembershipUsed?.issuedThrough?.id;
|
|
410
311
|
if (typeof issuedThroughId !== 'string' || issuedThroughId === '') {
|
|
411
312
|
throw new factory_1.factory.errors.ArgumentNull('acceptedOffer.itemOffered.serviceOutput.programMembershipUsed.issuedThrough.id');
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
2
|
import { Settings } from '../../../settings';
|
|
3
|
-
import type { AdvanceBookingRequirementRepo } from '../../../repo/advanceBookingRequirement';
|
|
4
3
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
5
4
|
import type { AuthorizationRepo } from '../../../repo/authorization';
|
|
6
5
|
import type { EventRepo } from '../../../repo/event';
|
|
@@ -23,7 +22,6 @@ import type { StockHolderRepo } from '../../../repo/stockHolder';
|
|
|
23
22
|
import type { TaskRepo } from '../../../repo/task';
|
|
24
23
|
import type { TicketRepo } from '../../../repo/ticket';
|
|
25
24
|
interface IStartOperationRepos {
|
|
26
|
-
advanceBookingRequirement: AdvanceBookingRequirementRepo;
|
|
27
25
|
authorization: AuthorizationRepo;
|
|
28
26
|
stockHolder: StockHolderRepo;
|
|
29
27
|
event: EventRepo;
|
|
@@ -39,37 +39,7 @@ function requestedProgramMembershipUsed2permit(params) {
|
|
|
39
39
|
}
|
|
40
40
|
const permitOwnershipInfo = object;
|
|
41
41
|
const ownedGoodType = permitOwnershipInfo.typeOfGood?.typeOf;
|
|
42
|
-
if (ownedGoodType === factory_1.factory.
|
|
43
|
-
// discontinue(2025-11-14~)
|
|
44
|
-
throw new factory_1.factory.errors.Argument('programMembershipUsed', `ownershipInfo.typeOfGood.typeOf: ${ownedGoodType} discontinued`);
|
|
45
|
-
// const issuedThroughTypeOf = permitOwnershipInfo.typeOfGood.issuedThrough?.typeOf;
|
|
46
|
-
// if (issuedThroughTypeOf === factory.service.paymentService.PaymentServiceType.FaceToFace) {
|
|
47
|
-
// programMembershipUsedAsPermit = {
|
|
48
|
-
// identifier: permitOwnershipInfo.typeOfGood.identifier,
|
|
49
|
-
// issuedThrough: { typeOf: issuedThroughTypeOf },
|
|
50
|
-
// typeOf: factory.permit.PermitType.Permit
|
|
51
|
-
// };
|
|
52
|
-
// } else if (issuedThroughTypeOf === factory.product.ProductType.MembershipService
|
|
53
|
-
// || issuedThroughTypeOf === factory.service.paymentService.PaymentServiceType.CreditCard) {
|
|
54
|
-
// if (typeof permitOwnershipInfo.typeOfGood.issuedThrough?.id !== 'string') {
|
|
55
|
-
// throw new factory.errors.Argument(
|
|
56
|
-
// 'programMembershipUsed',
|
|
57
|
-
// 'ownershipInfo.typeOfGood.issuedThrough.id undefined'
|
|
58
|
-
// );
|
|
59
|
-
// }
|
|
60
|
-
// programMembershipUsedAsPermit = {
|
|
61
|
-
// identifier: permitOwnershipInfo.typeOfGood.identifier,
|
|
62
|
-
// issuedThrough: { id: permitOwnershipInfo.typeOfGood.issuedThrough.id, typeOf: issuedThroughTypeOf },
|
|
63
|
-
// typeOf: factory.permit.PermitType.Permit
|
|
64
|
-
// };
|
|
65
|
-
// } else {
|
|
66
|
-
// throw new factory.errors.Argument(
|
|
67
|
-
// 'programMembershipUsed',
|
|
68
|
-
// `invalid issuedThrough.typeOf: ${issuedThroughTypeOf}`
|
|
69
|
-
// );
|
|
70
|
-
// }
|
|
71
|
-
}
|
|
72
|
-
else if (ownedGoodType === factory_1.factory.service.paymentService.PaymentServiceType.FaceToFace) {
|
|
42
|
+
if (ownedGoodType === factory_1.factory.service.paymentService.PaymentServiceType.FaceToFace) {
|
|
73
43
|
const paymentMethodId = permitOwnershipInfo.typeOfGood.serviceOutput.paymentMethodId;
|
|
74
44
|
if (typeof paymentMethodId !== 'string' || paymentMethodId === '') {
|
|
75
45
|
throw new factory_1.factory.errors.Argument('programMembershipUsed', 'paymentMethodId required');
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../../factory';
|
|
2
2
|
import { Settings } from '../../../../settings';
|
|
3
|
-
import type { AdvanceBookingRequirementRepo } from '../../../../repo/advanceBookingRequirement';
|
|
4
3
|
import type { AssetTransactionRepo } from '../../../../repo/assetTransaction';
|
|
5
4
|
import type { AuthorizationRepo } from '../../../../repo/authorization';
|
|
6
5
|
import type { EventRepo, IMinimizedIndividualEvent } from '../../../../repo/event';
|
|
@@ -49,7 +48,6 @@ declare function processStartReserve4chevre(params: {
|
|
|
49
48
|
*/
|
|
50
49
|
maxReservationGracePeriodInDays: number;
|
|
51
50
|
}): (repos: {
|
|
52
|
-
advanceBookingRequirement: AdvanceBookingRequirementRepo;
|
|
53
51
|
authorization: AuthorizationRepo;
|
|
54
52
|
stockHolder: StockHolderRepo;
|
|
55
53
|
event: EventRepo;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
2
|
import { Settings } from '../../../settings';
|
|
3
3
|
import type { AuthorizeOfferActionRepo } from '../../../repo/action/authorizeOffer';
|
|
4
|
-
import type { AdvanceBookingRequirementRepo } from '../../../repo/advanceBookingRequirement';
|
|
5
4
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
6
5
|
import type { AuthorizationRepo } from '../../../repo/authorization';
|
|
7
6
|
import type { EventRepo } from '../../../repo/event';
|
|
@@ -30,7 +29,6 @@ import type { TransactionNumberRepo } from '../../../repo/transactionNumber';
|
|
|
30
29
|
interface IAuthorizeRepos {
|
|
31
30
|
action?: never;
|
|
32
31
|
authorizeOfferAction: AuthorizeOfferActionRepo;
|
|
33
|
-
advanceBookingRequirement: AdvanceBookingRequirementRepo;
|
|
34
32
|
assetTransaction: AssetTransactionRepo;
|
|
35
33
|
authorization: AuthorizationRepo;
|
|
36
34
|
event: EventRepo;
|
|
@@ -122,14 +122,11 @@ function createCompoundPriceSpec4event(params) {
|
|
|
122
122
|
priceComponent
|
|
123
123
|
};
|
|
124
124
|
// 必要な属性のみに限定(2023-02-24~)
|
|
125
|
-
const { acceptedPaymentMethod, name, description, alternateName, color, typeOf, id, availability, category, eligibleMembershipType, eligibleSeatingType,
|
|
126
|
-
// eligibleMonetaryAmount, // discontinue(2026-04-19~)
|
|
127
|
-
eligibleSubReservation, priceCurrency, validFrom, validThrough, validRateLimit, additionalProperty, identifier, itemOffered, offerIndex, parentOffer } = params.offer;
|
|
125
|
+
const { acceptedPaymentMethod, name, description, alternateName, color, typeOf, id, availability, category, eligibleMembershipType, eligibleSeatingType, eligibleSubReservation, priceCurrency, validFrom, validThrough, validRateLimit, additionalProperty, identifier, itemOffered, offerIndex, parentOffer } = params.offer;
|
|
128
126
|
return {
|
|
129
127
|
name, description, alternateName, color, typeOf, id,
|
|
130
128
|
category,
|
|
131
129
|
eligibleMembershipType, eligibleSeatingType,
|
|
132
|
-
// eligibleMonetaryAmount, // discontinue(2026-04-19~)
|
|
133
130
|
eligibleSubReservation,
|
|
134
131
|
priceCurrency,
|
|
135
132
|
validFrom, validThrough, validRateLimit, additionalProperty,
|