@chevre/domain 24.0.0-alpha.40 → 24.0.0-alpha.41
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/accountTitle.d.ts +3 -3
- package/lib/chevre/repo/action/pay.d.ts +9 -0
- package/lib/chevre/repo/action/pay.js +13 -0
- package/lib/chevre/repo/action/refund.d.ts +9 -0
- package/lib/chevre/repo/action/refund.js +13 -0
- package/lib/chevre/repo/action.d.ts +3 -3
- package/lib/chevre/repo/additionalProperty.js +2 -2
- package/lib/chevre/repo/advanceBookingRequirement.d.ts +1 -3
- package/lib/chevre/repo/advanceBookingRequirement.js +2 -2
- package/lib/chevre/repo/aggregateOffer.d.ts +5 -9
- package/lib/chevre/repo/aggregateOffer.js +3 -3
- package/lib/chevre/repo/assetTransaction.d.ts +3 -3
- package/lib/chevre/repo/assetTransaction.js +12 -6
- package/lib/chevre/repo/categoryCode.d.ts +4 -6
- package/lib/chevre/repo/categoryCode.js +2 -2
- package/lib/chevre/repo/comment.d.ts +3 -3
- package/lib/chevre/repo/creativeWork.d.ts +3 -3
- package/lib/chevre/repo/creativeWork.js +3 -3
- package/lib/chevre/repo/customer.d.ts +3 -3
- package/lib/chevre/repo/customer.js +2 -2
- package/lib/chevre/repo/emailMessage.js +1 -1
- package/lib/chevre/repo/event.d.ts +6 -6
- package/lib/chevre/repo/event.js +10 -4
- package/lib/chevre/repo/eventSeries.d.ts +6 -6
- package/lib/chevre/repo/eventSeries.js +2 -2
- package/lib/chevre/repo/identity.d.ts +4 -6
- package/lib/chevre/repo/identityProvider.d.ts +4 -6
- package/lib/chevre/repo/identityProvider.js +2 -2
- package/lib/chevre/repo/issuer.d.ts +3 -3
- package/lib/chevre/repo/issuer.js +3 -3
- package/lib/chevre/repo/member.d.ts +3 -3
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +3 -3
- package/lib/chevre/repo/merchantReturnPolicy.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/account.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/actionRecipe.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/advanceBookingRequirement.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/aggregateOrder.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/aggregateReservation.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/civicStructure.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/comments.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/customer.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/customerType.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/eventOffer.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/eventSeries.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/identity.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/identityProvider.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/member/global.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/member.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/message.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/movieTicketTypes.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/note.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/paymentService.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/pendingReservation.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/pendingReservationAggregate.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/potentialAction.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/product.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/productOffer.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/reserveInterface.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/role.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/schedule.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/seller.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/sellerReturnPolicy.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/service/availableHour.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/ticket.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/transactionNumber.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/trip.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/webSite.d.ts +2 -2
- package/lib/chevre/repo/movieTicketType.d.ts +1 -3
- package/lib/chevre/repo/movieTicketType.js +2 -2
- package/lib/chevre/repo/offer/offerInCatalogReadOnly.d.ts +1 -3
- package/lib/chevre/repo/offer/unitPriceInCatalog.d.ts +1 -3
- package/lib/chevre/repo/offerCatalog.d.ts +3 -3
- package/lib/chevre/repo/offerCatalog.js +5 -4
- package/lib/chevre/repo/offerCatalogItem.js +4 -4
- package/lib/chevre/repo/offerItemCondition.js +2 -2
- package/lib/chevre/repo/order.d.ts +3 -3
- package/lib/chevre/repo/ownershipInfo.d.ts +3 -3
- package/lib/chevre/repo/passport.js +1 -1
- package/lib/chevre/repo/paymentService.d.ts +1 -3
- package/lib/chevre/repo/paymentService.js +2 -2
- package/lib/chevre/repo/paymentServiceChannel.d.ts +1 -3
- package/lib/chevre/repo/paymentServiceChannel.js +2 -2
- package/lib/chevre/repo/person.js +2 -2
- package/lib/chevre/repo/place/busStop.js +1 -1
- package/lib/chevre/repo/place/movieTheater.d.ts +3 -3
- package/lib/chevre/repo/place/movieTheater.js +10 -4
- package/lib/chevre/repo/place/screeningRoom.d.ts +3 -3
- package/lib/chevre/repo/place/screeningRoom.js +2 -2
- package/lib/chevre/repo/place/seat.d.ts +2 -4
- package/lib/chevre/repo/potentialAction.d.ts +4 -6
- package/lib/chevre/repo/potentialAction.js +2 -2
- package/lib/chevre/repo/priceSpecification.d.ts +3 -3
- package/lib/chevre/repo/priceSpecification.js +2 -2
- package/lib/chevre/repo/product.d.ts +5 -9
- package/lib/chevre/repo/product.js +3 -3
- package/lib/chevre/repo/productModel.js +2 -2
- package/lib/chevre/repo/project.d.ts +3 -3
- package/lib/chevre/repo/rateLimit/offer.js +1 -1
- package/lib/chevre/repo/reservation.d.ts +4 -6
- package/lib/chevre/repo/seller.d.ts +5 -9
- package/lib/chevre/repo/seller.js +2 -2
- package/lib/chevre/repo/sellerReturnPolicy.d.ts +1 -3
- package/lib/chevre/repo/sellerReturnPolicy.js +2 -2
- package/lib/chevre/repo/task.d.ts +3 -3
- package/lib/chevre/repo/task.js +1 -1
- package/lib/chevre/repo/transaction.d.ts +3 -3
- package/lib/chevre/repo/transactionProcess.js +1 -1
- package/lib/chevre/repo/trip.d.ts +4 -12
- package/lib/chevre/repo/trip.js +3 -3
- package/lib/chevre/repo/webSite.d.ts +1 -3
- package/lib/chevre/repo/webSite.js +3 -2
- package/lib/chevre/repository.d.ts +10 -0
- package/lib/chevre/repository.js +22 -0
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +8 -5
- package/lib/chevre/service/assetTransaction/pay/confirm.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/exportTasksById.js +2 -1
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +2 -1
- package/lib/chevre/service/assetTransaction/pay/start/factory.js +2 -1
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +6 -0
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +6 -0
- package/lib/chevre/service/assetTransaction/pay/start.d.ts +6 -0
- package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +6 -3
- package/lib/chevre/service/delivery/factory.js +2 -1
- package/lib/chevre/service/event/saveScreeningEvents.js +2 -2
- package/lib/chevre/service/event.js +1 -1
- package/lib/chevre/service/notification/notifyByEmail.d.ts +1 -1
- package/lib/chevre/service/notification/triggerWebhook.js +1 -1
- package/lib/chevre/service/offer/event/authorize.js +2 -1
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +2 -1
- package/lib/chevre/service/offer/event/searchOffersByIds.js +2 -1
- package/lib/chevre/service/offer/event/voidTransaction.js +6 -3
- package/lib/chevre/service/offer/event/voidTransactionByActionId.js +2 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.js +2 -1
- package/lib/chevre/service/offer/product.js +1 -1
- package/lib/chevre/service/order/confirmPayTransaction.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +2 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +4 -2
- package/lib/chevre/service/payment/any/authorize.d.ts +6 -0
- package/lib/chevre/service/payment/any/findAcceptAction.js +2 -1
- package/lib/chevre/service/payment/any/findAuthorizeAction.js +2 -1
- package/lib/chevre/service/payment/any/findCheckAction.js +2 -1
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.js +2 -1
- package/lib/chevre/service/payment/any/onPayActionCompleted.d.ts +6 -2
- package/lib/chevre/service/payment/any/onPayActionCompleted.js +7 -2
- package/lib/chevre/service/payment/any/onPaymentStatusChanged.d.ts +10 -5
- package/lib/chevre/service/payment/any/onPaymentStatusChanged.js +21 -11
- package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.d.ts +12 -10
- package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.js +9 -6
- package/lib/chevre/service/payment/any/processVoidPayTransaction.js +2 -1
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +2 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +1 -1
- package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +6 -0
- package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +6 -0
- package/lib/chevre/service/payment/creditCard/refundCreditCard.js +1 -1
- package/lib/chevre/service/payment/faceToFace.d.ts +10 -0
- package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.js +2 -1
- package/lib/chevre/service/payment/factory.js +4 -2
- package/lib/chevre/service/payment/movieTicket/authorize.d.ts +6 -0
- package/lib/chevre/service/payment/movieTicket/authorize.js +1 -1
- package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.d.ts +12 -0
- package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.js +72 -0
- package/lib/chevre/service/payment/movieTicket/payMovieTicket/processSeatInfoSync.d.ts +8 -0
- package/lib/chevre/service/payment/movieTicket/payMovieTicket/processSeatInfoSync.js +29 -0
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +7 -1
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +4 -71
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +6 -0
- package/lib/chevre/service/payment/movieTicket/validation.d.ts +1 -2
- package/lib/chevre/service/payment/movieTicket/validation.js +37 -29
- package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +6 -0
- package/lib/chevre/service/payment/paymentCard.d.ts +10 -0
- package/lib/chevre/service/permit.js +4 -2
- package/lib/chevre/service/reserve/factory.d.ts +1 -1
- package/lib/chevre/service/reserve/findByCode.js +2 -1
- package/lib/chevre/service/reserve/searchByOrder.js +2 -1
- package/lib/chevre/service/reserve/verifyToken4reservation.js +2 -1
- package/lib/chevre/service/task/authorizePayment.js +6 -0
- package/lib/chevre/service/task/confirmReserveTransaction.js +4 -2
- package/lib/chevre/service/task/invalidatePaymentUrl.js +6 -0
- package/lib/chevre/service/task/onResourceUpdated.js +1 -1
- package/lib/chevre/service/task/pay.js +6 -0
- package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +6 -0
- package/lib/chevre/service/task/payment/payByTask.d.ts +6 -0
- package/lib/chevre/service/task/payment/payByTask.js +2 -1
- package/lib/chevre/service/task/payment/refundByTask.d.ts +6 -0
- package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +6 -0
- package/lib/chevre/service/task/refund.js +6 -0
- package/lib/chevre/service/task/returnReserveTransaction.js +2 -1
- package/lib/chevre/service/task/voidPayment.js +6 -0
- package/lib/chevre/service/transaction/deleteTransaction.js +4 -2
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +2 -1
- package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +2 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/preStart/getReturnPolicyByProject.js +5 -3
- package/lib/chevre/service/validation/validateOrder.js +4 -2
- package/package.json +1 -1
|
@@ -30,9 +30,7 @@ export declare class ReservationRepo {
|
|
|
30
30
|
* 予約検索
|
|
31
31
|
* migrate from search(2024-08-08~)
|
|
32
32
|
*/
|
|
33
|
-
projectFields<T extends factory.reservationType>(params: factory.reservation.ISearchConditions<T>, inclusion?:
|
|
34
|
-
[key in IKeyOfProjection]?: 1;
|
|
35
|
-
}): Promise<factory.reservation.IReservation<factory.reservationType.EventReservation>[]>;
|
|
33
|
+
projectFields<T extends factory.reservationType>(params: factory.reservation.ISearchConditions<T>, inclusion?: Partial<Record<IKeyOfProjection, 1>>): Promise<factory.reservation.IReservation<factory.reservationType.EventReservation>[]>;
|
|
36
34
|
projectFieldsById<T extends factory.reservationType>(params: {
|
|
37
35
|
id: string;
|
|
38
36
|
inclusion?: IKeyOfProjection[];
|
|
@@ -124,7 +122,7 @@ export declare class ReservationRepo {
|
|
|
124
122
|
$in: string[];
|
|
125
123
|
};
|
|
126
124
|
}): Promise<string[]>;
|
|
127
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown,
|
|
125
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/reservation/event").IReservation, "id"> & {
|
|
128
126
|
_id: string;
|
|
129
127
|
bookingAgent?: any;
|
|
130
128
|
previousReservationStatus?: factory.reservationStatusType;
|
|
@@ -132,7 +130,7 @@ export declare class ReservationRepo {
|
|
|
132
130
|
_id: string;
|
|
133
131
|
}> & {
|
|
134
132
|
__v: number;
|
|
135
|
-
},
|
|
133
|
+
}, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/reservation/event").IReservation, "id"> & {
|
|
136
134
|
_id: string;
|
|
137
135
|
bookingAgent?: any;
|
|
138
136
|
previousReservationStatus?: factory.reservationStatusType;
|
|
@@ -140,7 +138,7 @@ export declare class ReservationRepo {
|
|
|
140
138
|
_id: string;
|
|
141
139
|
}> & {
|
|
142
140
|
__v: number;
|
|
143
|
-
}
|
|
141
|
+
}) | null>;
|
|
144
142
|
unsetUnnecessaryFields(params: {
|
|
145
143
|
filter: any;
|
|
146
144
|
$unset: any;
|
|
@@ -6,9 +6,7 @@ export type ISellerWithId = Pick<factory.seller.ISeller, 'additionalProperty' |
|
|
|
6
6
|
};
|
|
7
7
|
type ISavingSeller = Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'hasMerchantReturnPolicy' | 'id' | 'makesOffer' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'>;
|
|
8
8
|
interface IUnset {
|
|
9
|
-
$unset?:
|
|
10
|
-
[key: string]: 1;
|
|
11
|
-
};
|
|
9
|
+
$unset?: Record<string, 1>;
|
|
12
10
|
}
|
|
13
11
|
type ISellerByAggregate = Pick<ISellerWithId, 'additionalProperty' | 'branchCode' | 'id' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'> & {
|
|
14
12
|
hasMerchantReturnPolicy?: Pick<factory.seller.IEachReturnPolicy, 'url'>[];
|
|
@@ -35,9 +33,7 @@ export declare class SellerRepo {
|
|
|
35
33
|
private readonly sellerModel;
|
|
36
34
|
constructor(connection: Connection);
|
|
37
35
|
static CREATE_MONGO_CONDITIONS(params: factory.seller.ISearchConditions & IMemberSearchConditions): FilterQuery<factory.seller.ISeller>[];
|
|
38
|
-
static CREATE_AGGREGATE_SELLERS_PROJECTION(exclusion: (keyof ISellerByAggregate)[]):
|
|
39
|
-
[field: string]: AnyExpression;
|
|
40
|
-
};
|
|
36
|
+
static CREATE_AGGREGATE_SELLERS_PROJECTION(exclusion: (keyof ISellerByAggregate)[]): Record<string, AnyExpression>;
|
|
41
37
|
/**
|
|
42
38
|
* 販売者を保管する
|
|
43
39
|
*/
|
|
@@ -76,15 +72,15 @@ export declare class SellerRepo {
|
|
|
76
72
|
id: string;
|
|
77
73
|
makesOffer: factory.seller.IMakesOffer;
|
|
78
74
|
}): Promise<void>;
|
|
79
|
-
getCursor(conditions: FilterQuery<factory.seller.ISeller>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown,
|
|
75
|
+
getCursor(conditions: FilterQuery<factory.seller.ISeller>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
|
|
80
76
|
_id: Types.ObjectId;
|
|
81
77
|
} & {
|
|
82
78
|
__v: number;
|
|
83
|
-
},
|
|
79
|
+
}, QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
|
|
84
80
|
_id: Types.ObjectId;
|
|
85
81
|
} & {
|
|
86
82
|
__v: number;
|
|
87
|
-
}
|
|
83
|
+
}) | null>;
|
|
88
84
|
unsetUnnecessaryFields(params: {
|
|
89
85
|
filter: any;
|
|
90
86
|
$unset: any;
|
|
@@ -219,7 +219,7 @@ class SellerRepo {
|
|
|
219
219
|
throw new factory.errors.ArgumentNull('id');
|
|
220
220
|
}
|
|
221
221
|
// 上書き禁止属性を除外(2022-08-24~)
|
|
222
|
-
const { id, branchCode, project, typeOf, $unset, ...updateFields } = params.attributes;
|
|
222
|
+
const { id, branchCode, project, typeOf, $unset, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
223
223
|
const filter = {
|
|
224
224
|
_id: { $eq: savingId },
|
|
225
225
|
'project.id': { $eq: project.id }
|
|
@@ -242,7 +242,7 @@ class SellerRepo {
|
|
|
242
242
|
savedId = savingId;
|
|
243
243
|
}
|
|
244
244
|
else {
|
|
245
|
-
const { id, $unset, ...createParams } = params.attributes;
|
|
245
|
+
const { id, $unset, ...createParams } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
246
246
|
// doc = await this.sellerModel.create<ISavingSeller>(createParams);
|
|
247
247
|
const result = await this.sellerModel.insertMany(createParams, { rawResult: true });
|
|
248
248
|
const insertedId = result.insertedIds?.[0]?.toHexString();
|
|
@@ -4,9 +4,7 @@ export type ISavingReturnPolicy = Pick<factory.sellerReturnPolicy.ISellerReturnP
|
|
|
4
4
|
id?: never;
|
|
5
5
|
};
|
|
6
6
|
interface IUnset {
|
|
7
|
-
$unset?:
|
|
8
|
-
[key: string]: 1;
|
|
9
|
-
};
|
|
7
|
+
$unset?: Record<string, 1>;
|
|
10
8
|
}
|
|
11
9
|
type ISellerReturnPolicyWithId = factory.sellerReturnPolicy.ISellerReturnPolicy & {
|
|
12
10
|
id: string;
|
|
@@ -92,7 +92,7 @@ class SellerReturnPolicyRepo {
|
|
|
92
92
|
if (savingId === '') {
|
|
93
93
|
throw new factory.errors.ArgumentNull('id');
|
|
94
94
|
}
|
|
95
|
-
const { id, identifier, project, typeOf, $unset, ...updateFields } = params.attributes;
|
|
95
|
+
const { id, identifier, project, typeOf, $unset, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
96
96
|
const filter = {
|
|
97
97
|
_id: { $eq: savingId },
|
|
98
98
|
'project.id': { $eq: project.id }
|
|
@@ -115,7 +115,7 @@ class SellerReturnPolicyRepo {
|
|
|
115
115
|
savedId = savingId;
|
|
116
116
|
}
|
|
117
117
|
else {
|
|
118
|
-
const { $unset, id, ...createParams } = params.attributes;
|
|
118
|
+
const { $unset, id, ...createParams } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
119
119
|
const result = await this.sellerReturnPolicyModel.insertMany(createParams, { rawResult: true });
|
|
120
120
|
const insertedId = result.insertedIds?.[0]?.toHexString();
|
|
121
121
|
if (typeof insertedId !== 'string') {
|
|
@@ -229,15 +229,15 @@ export declare class TaskRepo {
|
|
|
229
229
|
}): Promise<{
|
|
230
230
|
count: number;
|
|
231
231
|
}>;
|
|
232
|
-
getCursor(conditions: FilterQuery<factory.task.ITask<factory.taskName>>, projection: ProjectionType<factory.task.ITask<factory.taskName>>): import("mongoose").Cursor<import("mongoose").Document<unknown,
|
|
232
|
+
getCursor(conditions: FilterQuery<factory.task.ITask<factory.taskName>>, projection: ProjectionType<factory.task.ITask<factory.taskName>>): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
|
|
233
233
|
_id: import("mongoose").Types.ObjectId;
|
|
234
234
|
} & {
|
|
235
235
|
__v: number;
|
|
236
|
-
},
|
|
236
|
+
}, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
|
|
237
237
|
_id: import("mongoose").Types.ObjectId;
|
|
238
238
|
} & {
|
|
239
239
|
__v: number;
|
|
240
|
-
}
|
|
240
|
+
}) | null>;
|
|
241
241
|
unsetUnnecessaryFields(params: {
|
|
242
242
|
filter: FilterQuery<factory.task.ITask<factory.taskName>>;
|
|
243
243
|
$unset: AnyKeys<factory.task.ITask<factory.taskName>>;
|
package/lib/chevre/repo/task.js
CHANGED
|
@@ -190,7 +190,7 @@ class TaskRepo {
|
|
|
190
190
|
const emitImmediately = options?.emitImmediately === true;
|
|
191
191
|
if (taskAttributes.length > 0) {
|
|
192
192
|
// resolve uniqueness of identifier(2025-03-27~)
|
|
193
|
-
const creatingTasks = taskAttributes.map(({ identifier, ...creatingTask }) => creatingTask);
|
|
193
|
+
const creatingTasks = taskAttributes.map(({ identifier, ...creatingTask }) => creatingTask); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
194
194
|
const result = await this.taskModel.insertMany(creatingTasks, { ordered: false, rawResult: true });
|
|
195
195
|
if (result.insertedCount !== taskAttributes.length) {
|
|
196
196
|
throw new factory.errors.Internal('all tasks not saved');
|
|
@@ -126,7 +126,7 @@ export declare class TransactionRepo {
|
|
|
126
126
|
$lt: Date;
|
|
127
127
|
};
|
|
128
128
|
}): Promise<import("mongodb").DeleteResult>;
|
|
129
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown,
|
|
129
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
|
|
130
130
|
object: import("@chevre/factory/lib/transaction/placeOrder").IObject;
|
|
131
131
|
error?: any;
|
|
132
132
|
project: import("@chevre/factory/lib/transaction").IProject;
|
|
@@ -164,7 +164,7 @@ export declare class TransactionRepo {
|
|
|
164
164
|
_id: import("mongoose").Types.ObjectId;
|
|
165
165
|
} & {
|
|
166
166
|
__v: number;
|
|
167
|
-
})
|
|
167
|
+
})), import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
|
|
168
168
|
object: import("@chevre/factory/lib/transaction/placeOrder").IObject;
|
|
169
169
|
error?: any;
|
|
170
170
|
project: import("@chevre/factory/lib/transaction").IProject;
|
|
@@ -202,7 +202,7 @@ export declare class TransactionRepo {
|
|
|
202
202
|
_id: import("mongoose").Types.ObjectId;
|
|
203
203
|
} & {
|
|
204
204
|
__v: number;
|
|
205
|
-
})
|
|
205
|
+
}))) | null>;
|
|
206
206
|
aggregatePlaceOrder(params: {
|
|
207
207
|
project?: {
|
|
208
208
|
id?: {
|
|
@@ -64,7 +64,7 @@ class TransactionProcessRepo {
|
|
|
64
64
|
});
|
|
65
65
|
debug('locked,', params.id);
|
|
66
66
|
}
|
|
67
|
-
catch (
|
|
67
|
+
catch (_error) {
|
|
68
68
|
throw new factory.errors.AlreadyInUse(params.typeOf, [], 'Another transaction process in progress');
|
|
69
69
|
}
|
|
70
70
|
// const results = await this.redisClient.multi()
|
|
@@ -22,27 +22,19 @@ export declare class TripRepo {
|
|
|
22
22
|
save<T extends factory.tripType>(params: {
|
|
23
23
|
id?: string;
|
|
24
24
|
attributes: factory.trip.ITrip<T>;
|
|
25
|
-
$unset?:
|
|
26
|
-
[key: string]: number;
|
|
27
|
-
};
|
|
25
|
+
$unset?: Record<string, number>;
|
|
28
26
|
upsert?: boolean;
|
|
29
27
|
}): Promise<factory.trip.ITrip<T>>;
|
|
30
28
|
saveMany<T extends factory.tripType>(params: {
|
|
31
29
|
id?: string;
|
|
32
30
|
attributes: factory.trip.ITrip<T>;
|
|
33
|
-
$unset?:
|
|
34
|
-
[key: string]: number;
|
|
35
|
-
};
|
|
31
|
+
$unset?: Record<string, number>;
|
|
36
32
|
upsert?: boolean;
|
|
37
33
|
}[]): Promise<void>;
|
|
38
|
-
search<T extends factory.tripType>(params: ISearchConditions<T>, projection?:
|
|
39
|
-
[key: string]: number;
|
|
40
|
-
}): Promise<factory.trip.ITrip<T>[]>;
|
|
34
|
+
search<T extends factory.tripType>(params: ISearchConditions<T>, projection?: Record<string, number>): Promise<factory.trip.ITrip<T>[]>;
|
|
41
35
|
findById<T extends factory.tripType>(params: {
|
|
42
36
|
id: string;
|
|
43
|
-
}, projection?:
|
|
44
|
-
[key: string]: number;
|
|
45
|
-
}): Promise<factory.trip.ITrip<T>>;
|
|
37
|
+
}, projection?: Record<string, number>): Promise<factory.trip.ITrip<T>>;
|
|
46
38
|
deleteById(params: {
|
|
47
39
|
id: string;
|
|
48
40
|
}): Promise<void>;
|
package/lib/chevre/repo/trip.js
CHANGED
|
@@ -88,7 +88,7 @@ class TripRepo {
|
|
|
88
88
|
return docs.map((doc) => doc.toObject());
|
|
89
89
|
}
|
|
90
90
|
async updatePartiallyById(params) {
|
|
91
|
-
const { typeOf, ...updateFields } = params.attributes;
|
|
91
|
+
const { typeOf, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
92
92
|
const doc = await this.tripModel.findOneAndUpdate({
|
|
93
93
|
_id: params.id,
|
|
94
94
|
typeOf: params.attributes.typeOf
|
|
@@ -112,7 +112,7 @@ class TripRepo {
|
|
|
112
112
|
else {
|
|
113
113
|
const upsert = params.upsert === true;
|
|
114
114
|
// 上書き禁止属性を除外
|
|
115
|
-
const { identifier, project, typeOf, ...updateFields } = params.attributes;
|
|
115
|
+
const { identifier, project, typeOf, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
116
116
|
doc = await this.tripModel.findOneAndUpdate({
|
|
117
117
|
_id: params.id,
|
|
118
118
|
typeOf: params.attributes.typeOf
|
|
@@ -147,7 +147,7 @@ class TripRepo {
|
|
|
147
147
|
const upsert = p.upsert === true;
|
|
148
148
|
if (p.attributes.typeOf === factory.tripType.BusTrip) {
|
|
149
149
|
// 上書き禁止属性を除外
|
|
150
|
-
const { identifier, project, typeOf, ...updateFields } = p.attributes;
|
|
150
|
+
const { identifier, project, typeOf, ...updateFields } = p.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
151
151
|
bulkWriteOps.push({
|
|
152
152
|
updateOne: {
|
|
153
153
|
filter: {
|
|
@@ -7,9 +7,7 @@ export type ISavingWebSite = Pick<factory.creativeWork.certification.webSite.ICe
|
|
|
7
7
|
certificationIdentification?: never;
|
|
8
8
|
};
|
|
9
9
|
interface IUnset {
|
|
10
|
-
$unset?:
|
|
11
|
-
[key: string]: 1;
|
|
12
|
-
};
|
|
10
|
+
$unset?: Record<string, 1>;
|
|
13
11
|
}
|
|
14
12
|
type IWebSiteWithId = factory.creativeWork.certification.webSite.ICertification & {
|
|
15
13
|
id: string;
|
|
@@ -72,7 +72,8 @@ class WebSiteRepo {
|
|
|
72
72
|
if (savingId === '') {
|
|
73
73
|
throw new factory.errors.ArgumentNull('id');
|
|
74
74
|
}
|
|
75
|
-
const { id, datePublished, dateModified, about, project, certificationIdentification, $unset, ...updateFields
|
|
75
|
+
const { id, datePublished, dateModified, about, project, certificationIdentification, $unset, ...updateFields // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
76
|
+
} = params.attributes;
|
|
76
77
|
const filter = {
|
|
77
78
|
_id: { $eq: savingId },
|
|
78
79
|
'project.id': { $eq: project.id }
|
|
@@ -98,7 +99,7 @@ class WebSiteRepo {
|
|
|
98
99
|
savedId = savingId;
|
|
99
100
|
}
|
|
100
101
|
else {
|
|
101
|
-
const { $unset, id, dateModified, datePublished, auditDate, ...createParams } = params.attributes;
|
|
102
|
+
const { $unset, id, dateModified, datePublished, auditDate, ...createParams } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
102
103
|
const certificationIdentification = uuid.v4();
|
|
103
104
|
const creatingCertification = {
|
|
104
105
|
...createParams,
|
|
@@ -17,6 +17,8 @@ import type { AuthorizePaymentMethodActionRepo } from './repo/action/authorizePa
|
|
|
17
17
|
import type { AuthorizeTicketedObjectActionRepo } from './repo/action/authorizeTicketedObject';
|
|
18
18
|
import type { CheckMovieTicketActionRepo } from './repo/action/checkMovieTicket';
|
|
19
19
|
import type { CheckThingActionRepo } from './repo/action/checkThing';
|
|
20
|
+
import type { PayActionRepo } from './repo/action/pay';
|
|
21
|
+
import type { RefundActionRepo } from './repo/action/refund';
|
|
20
22
|
import type { AdditionalPropertyRepo } from './repo/additionalProperty';
|
|
21
23
|
import type { AdvanceBookingRequirementRepo } from './repo/advanceBookingRequirement';
|
|
22
24
|
import type { AggregateActionRepo } from './repo/aggregateAction';
|
|
@@ -168,6 +170,14 @@ export declare namespace action {
|
|
|
168
170
|
namespace CheckThing {
|
|
169
171
|
function createInstance(...params: ConstructorParameters<typeof CheckThingActionRepo>): Promise<CheckThingActionRepo>;
|
|
170
172
|
}
|
|
173
|
+
type Pay = PayActionRepo;
|
|
174
|
+
namespace Pay {
|
|
175
|
+
function createInstance(...params: ConstructorParameters<typeof PayActionRepo>): Promise<PayActionRepo>;
|
|
176
|
+
}
|
|
177
|
+
type Refund = RefundActionRepo;
|
|
178
|
+
namespace Refund {
|
|
179
|
+
function createInstance(...params: ConstructorParameters<typeof RefundActionRepo>): Promise<RefundActionRepo>;
|
|
180
|
+
}
|
|
171
181
|
}
|
|
172
182
|
export type AdditionalProperty = AdditionalPropertyRepo;
|
|
173
183
|
export declare namespace AdditionalProperty {
|
package/lib/chevre/repository.js
CHANGED
|
@@ -203,6 +203,28 @@ var action;
|
|
|
203
203
|
}
|
|
204
204
|
CheckThing.createInstance = createInstance;
|
|
205
205
|
})(CheckThing = action.CheckThing || (action.CheckThing = {}));
|
|
206
|
+
let Pay;
|
|
207
|
+
(function (Pay) {
|
|
208
|
+
let repo;
|
|
209
|
+
async function createInstance(...params) {
|
|
210
|
+
if (repo === undefined) {
|
|
211
|
+
repo = (await Promise.resolve().then(() => __importStar(require('./repo/action/pay')))).PayActionRepo;
|
|
212
|
+
}
|
|
213
|
+
return new repo(...params);
|
|
214
|
+
}
|
|
215
|
+
Pay.createInstance = createInstance;
|
|
216
|
+
})(Pay = action.Pay || (action.Pay = {}));
|
|
217
|
+
let Refund;
|
|
218
|
+
(function (Refund) {
|
|
219
|
+
let repo;
|
|
220
|
+
async function createInstance(...params) {
|
|
221
|
+
if (repo === undefined) {
|
|
222
|
+
repo = (await Promise.resolve().then(() => __importStar(require('./repo/action/refund')))).RefundActionRepo;
|
|
223
|
+
}
|
|
224
|
+
return new repo(...params);
|
|
225
|
+
}
|
|
226
|
+
Refund.createInstance = createInstance;
|
|
227
|
+
})(Refund = action.Refund || (action.Refund = {}));
|
|
206
228
|
})(action || (exports.action = action = {}));
|
|
207
229
|
var AdditionalProperty;
|
|
208
230
|
(function (AdditionalProperty) {
|
|
@@ -61,8 +61,8 @@ function start(params) {
|
|
|
61
61
|
throw new factory.errors.NotFound('Product');
|
|
62
62
|
}
|
|
63
63
|
// fromとtoをfix
|
|
64
|
-
const { fromLocation } = await fixFromLocation(params, product)(
|
|
65
|
-
const { toLocation } = await fixToLocation(params, product)(
|
|
64
|
+
const { fromLocation } = await fixFromLocation(params, product)({});
|
|
65
|
+
const { toLocation } = await fixToLocation(params, product)({});
|
|
66
66
|
const amount = fixMonetaryAmount(params, product);
|
|
67
67
|
// 自動発行廃止(2022-05-17~)
|
|
68
68
|
const transactionNumber = params.transactionNumber;
|
|
@@ -202,7 +202,7 @@ function fixFromLocation(params, product) {
|
|
|
202
202
|
const transactionType = params.object.pendingTransaction?.typeOf;
|
|
203
203
|
switch (transactionType) {
|
|
204
204
|
case factory.account.transactionType.Withdraw:
|
|
205
|
-
case factory.account.transactionType.Transfer:
|
|
205
|
+
case factory.account.transactionType.Transfer: {
|
|
206
206
|
const fromLocationObject = fromLocation;
|
|
207
207
|
// Permitの存在しない注文口座に対応する
|
|
208
208
|
const hasNoPermit = fromLocationObject.hasNoPermit === true;
|
|
@@ -237,6 +237,7 @@ function fixFromLocation(params, product) {
|
|
|
237
237
|
issuedThrough: { id: fromLocationObject.issuedThrough?.id }
|
|
238
238
|
};
|
|
239
239
|
break;
|
|
240
|
+
}
|
|
240
241
|
default:
|
|
241
242
|
// no op
|
|
242
243
|
}
|
|
@@ -264,7 +265,7 @@ function fixToLocation(params, product) {
|
|
|
264
265
|
const transactionType = params.object.pendingTransaction?.typeOf;
|
|
265
266
|
switch (transactionType) {
|
|
266
267
|
case factory.account.transactionType.Deposit:
|
|
267
|
-
case factory.account.transactionType.Transfer:
|
|
268
|
+
case factory.account.transactionType.Transfer: {
|
|
268
269
|
const toLocationObject = toLocation;
|
|
269
270
|
// Permitの存在しない注文口座に対応する
|
|
270
271
|
const hasNoPermit = toLocationObject.hasNoPermit === true;
|
|
@@ -299,6 +300,7 @@ function fixToLocation(params, product) {
|
|
|
299
300
|
issuedThrough: { id: toLocationObject.issuedThrough?.id }
|
|
300
301
|
};
|
|
301
302
|
break;
|
|
303
|
+
}
|
|
302
304
|
default:
|
|
303
305
|
// no op
|
|
304
306
|
}
|
|
@@ -408,7 +410,7 @@ function exportTasksById(params) {
|
|
|
408
410
|
}
|
|
409
411
|
break;
|
|
410
412
|
case factory.transactionStatusType.Canceled:
|
|
411
|
-
case factory.transactionStatusType.Expired:
|
|
413
|
+
case factory.transactionStatusType.Expired: {
|
|
412
414
|
const cancelMoneyTransferTaskAttributes = {
|
|
413
415
|
project: { typeOf: transaction.project.typeOf, id: transaction.project.id },
|
|
414
416
|
name: factory.taskName.CancelMoneyTransfer,
|
|
@@ -423,6 +425,7 @@ function exportTasksById(params) {
|
|
|
423
425
|
};
|
|
424
426
|
taskAttributes.push(cancelMoneyTransferTaskAttributes);
|
|
425
427
|
break;
|
|
428
|
+
}
|
|
426
429
|
default:
|
|
427
430
|
throw new factory.errors.NotImplemented(`Transaction status "${transaction.status}" not implemented.`);
|
|
428
431
|
}
|
|
@@ -94,7 +94,7 @@ function exportTasksById(params) {
|
|
|
94
94
|
data: onAssetTransactionStatusChangedTaskData
|
|
95
95
|
};
|
|
96
96
|
switch (transaction.status) {
|
|
97
|
-
case factory.transactionStatusType.Confirmed:
|
|
97
|
+
case factory.transactionStatusType.Confirmed: {
|
|
98
98
|
const payActions = potentialActions?.pay;
|
|
99
99
|
if (Array.isArray(payActions) && payActions.length > 0) {
|
|
100
100
|
const payTasks = payActions.map(({ object, purpose }) => {
|
|
@@ -113,6 +113,7 @@ function exportTasksById(params) {
|
|
|
113
113
|
taskAttributes.push(...payTasks);
|
|
114
114
|
}
|
|
115
115
|
break;
|
|
116
|
+
}
|
|
116
117
|
case factory.transactionStatusType.Canceled:
|
|
117
118
|
taskAttributes.push(voidPaymentTasks, onAssetTransactionStatusChangedTask);
|
|
118
119
|
break;
|
|
@@ -107,7 +107,7 @@ function publishPaymentUrl(params, options) {
|
|
|
107
107
|
let recipe;
|
|
108
108
|
try {
|
|
109
109
|
switch (paymentServiceType) {
|
|
110
|
-
case factory.service.paymentService.PaymentServiceType.CreditCard:
|
|
110
|
+
case factory.service.paymentService.PaymentServiceType.CreditCard: {
|
|
111
111
|
const authorizeResult = await CreditCardPayment.authorize({
|
|
112
112
|
...params,
|
|
113
113
|
id: '' // 決済URL発行プロセスにおいては決済取引IDは使用しないので空文字でok
|
|
@@ -141,6 +141,7 @@ function publishPaymentUrl(params, options) {
|
|
|
141
141
|
result
|
|
142
142
|
});
|
|
143
143
|
break;
|
|
144
|
+
}
|
|
144
145
|
default:
|
|
145
146
|
throw new factory.errors.NotImplemented(`Payment service '${paymentServiceType}' not implemented`);
|
|
146
147
|
}
|
|
@@ -83,7 +83,7 @@ function createStartParams(params, options) {
|
|
|
83
83
|
};
|
|
84
84
|
accountId = ''; // 強制的に空文字化(2024-06-14~)
|
|
85
85
|
break;
|
|
86
|
-
case factory.service.paymentService.PaymentServiceType.MovieTicket:
|
|
86
|
+
case factory.service.paymentService.PaymentServiceType.MovieTicket: {
|
|
87
87
|
const specifiedMovieTickets = params.object.paymentMethod?.movieTickets;
|
|
88
88
|
totalPaymentDue = {
|
|
89
89
|
typeOf: 'MonetaryAmount',
|
|
@@ -103,6 +103,7 @@ function createStartParams(params, options) {
|
|
|
103
103
|
? specifiedMovieTickets[0].identifier // 決済カードidentifierは1つのみ許可の前提
|
|
104
104
|
: '';
|
|
105
105
|
break;
|
|
106
|
+
}
|
|
106
107
|
default:
|
|
107
108
|
// no op
|
|
108
109
|
}
|
|
@@ -2,6 +2,8 @@ import * as factory from '../../../../factory';
|
|
|
2
2
|
import { Settings } from '../../../../settings';
|
|
3
3
|
import type { AccountingReportRepo } from '../../../../repo/accountingReport';
|
|
4
4
|
import type { ActionRepo } from '../../../../repo/action';
|
|
5
|
+
import type { PayActionRepo } from '../../../../repo/action/pay';
|
|
6
|
+
import type { RefundActionRepo } from '../../../../repo/action/refund';
|
|
5
7
|
import type { CheckMovieTicketActionRepo } from '../../../../repo/action/checkMovieTicket';
|
|
6
8
|
import type { AuthorizeInvoiceActionRepo } from '../../../../repo/action/authorizeInvoice';
|
|
7
9
|
import type { AssetTransactionRepo } from '../../../../repo/assetTransaction';
|
|
@@ -16,6 +18,10 @@ import { IPaymentAgencyTransaction } from '../../../payment/creditCard';
|
|
|
16
18
|
export interface IProcessAuthorizeOperationRepos {
|
|
17
19
|
accountingReport: AccountingReportRepo;
|
|
18
20
|
action: ActionRepo;
|
|
21
|
+
actions: {
|
|
22
|
+
pay: PayActionRepo;
|
|
23
|
+
refund: RefundActionRepo;
|
|
24
|
+
};
|
|
19
25
|
checkMovieTicketAction: CheckMovieTicketActionRepo;
|
|
20
26
|
authorizeInvoiceAction: AuthorizeInvoiceActionRepo;
|
|
21
27
|
credentials: CredentialsRepo;
|
|
@@ -2,6 +2,8 @@ import * as factory from '../../../../factory';
|
|
|
2
2
|
import { Settings } from '../../../../settings';
|
|
3
3
|
import type { AccountingReportRepo } from '../../../../repo/accountingReport';
|
|
4
4
|
import type { ActionRepo } from '../../../../repo/action';
|
|
5
|
+
import type { PayActionRepo } from '../../../../repo/action/pay';
|
|
6
|
+
import type { RefundActionRepo } from '../../../../repo/action/refund';
|
|
5
7
|
import type { CheckMovieTicketActionRepo } from '../../../../repo/action/checkMovieTicket';
|
|
6
8
|
import type { AssetTransactionRepo } from '../../../../repo/assetTransaction';
|
|
7
9
|
import type { CredentialsRepo } from '../../../../repo/credentials';
|
|
@@ -33,6 +35,10 @@ export declare function processAuthorizeMovieTicket(params: factory.assetTransac
|
|
|
33
35
|
}): (repos: {
|
|
34
36
|
accountingReport: AccountingReportRepo;
|
|
35
37
|
action: ActionRepo;
|
|
38
|
+
actions: {
|
|
39
|
+
pay: PayActionRepo;
|
|
40
|
+
refund: RefundActionRepo;
|
|
41
|
+
};
|
|
36
42
|
checkMovieTicketAction: CheckMovieTicketActionRepo;
|
|
37
43
|
credentials: CredentialsRepo;
|
|
38
44
|
event: EventRepo;
|
|
@@ -3,6 +3,8 @@ import { Settings } from '../../../settings';
|
|
|
3
3
|
import type { AcceptedPaymentMethodRepo } from '../../../repo/acceptedPaymentMethod';
|
|
4
4
|
import type { AccountingReportRepo } from '../../../repo/accountingReport';
|
|
5
5
|
import type { ActionRepo } from '../../../repo/action';
|
|
6
|
+
import type { PayActionRepo } from '../../../repo/action/pay';
|
|
7
|
+
import type { RefundActionRepo } from '../../../repo/action/refund';
|
|
6
8
|
import type { CheckMovieTicketActionRepo } from '../../../repo/action/checkMovieTicket';
|
|
7
9
|
import type { AuthorizeInvoiceActionRepo } from '../../../repo/action/authorizeInvoice';
|
|
8
10
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
@@ -20,6 +22,10 @@ export interface IStartOperationRepos {
|
|
|
20
22
|
acceptedPaymentMethod: AcceptedPaymentMethodRepo;
|
|
21
23
|
accountingReport: AccountingReportRepo;
|
|
22
24
|
action: ActionRepo;
|
|
25
|
+
actions: {
|
|
26
|
+
pay: PayActionRepo;
|
|
27
|
+
refund: RefundActionRepo;
|
|
28
|
+
};
|
|
23
29
|
checkMovieTicketAction: CheckMovieTicketActionRepo;
|
|
24
30
|
authorizeInvoiceAction: AuthorizeInvoiceActionRepo;
|
|
25
31
|
credentials: CredentialsRepo;
|
|
@@ -421,7 +421,7 @@ function validateProgramMembershipUsed(params) {
|
|
|
421
421
|
throw new factory.errors.Argument('acceptedOffer.itemOffered.serviceOutput.programMembershipUsed', `invalid issuedThrough.typeOf: ${issuedThroughTypeOf}`);
|
|
422
422
|
}
|
|
423
423
|
switch (permitIssuedThrough.typeOf) {
|
|
424
|
-
case factory.service.paymentService.PaymentServiceType.FaceToFace:
|
|
424
|
+
case factory.service.paymentService.PaymentServiceType.FaceToFace: {
|
|
425
425
|
// 適用メンバーシップ条件有のオファーであれば、問答無用に受け入れる
|
|
426
426
|
const eligibleMembershipType = params.availableOffer.eligibleMembershipType?.[0]?.codeValue;
|
|
427
427
|
if (typeof eligibleMembershipType === 'string') {
|
|
@@ -435,8 +435,9 @@ function validateProgramMembershipUsed(params) {
|
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
437
|
break;
|
|
438
|
+
}
|
|
438
439
|
// 発行サービスがCreditCardのケースに対応(2023-09-01~)
|
|
439
|
-
case factory.service.paymentService.PaymentServiceType.CreditCard:
|
|
440
|
+
case factory.service.paymentService.PaymentServiceType.CreditCard: {
|
|
440
441
|
// 決済サービスのserviceOutputにPermitが存在すれば、設定されたメンバーシップ区分のPermitをprogramMembershipUsedとして適用する
|
|
441
442
|
let issuedThroughServiceType;
|
|
442
443
|
if (Array.isArray(permitIssuedThrough.serviceOutput)) {
|
|
@@ -460,7 +461,8 @@ function validateProgramMembershipUsed(params) {
|
|
|
460
461
|
throw new factory.errors.Argument('acceptedOffer.itemOffered.serviceOutput.programMembershipUsed', 'issuedThrough has no serviceOutput as Permit');
|
|
461
462
|
}
|
|
462
463
|
break;
|
|
463
|
-
|
|
464
|
+
}
|
|
465
|
+
case factory.product.ProductType.MembershipService: {
|
|
464
466
|
// requestedProgramMembershipUsedの発行サービスIDから外部連携設定を取得する
|
|
465
467
|
const permitService = await createPermitService({ issuedThrough: { id: permitIssuedThrough.id } })(repos);
|
|
466
468
|
// メンバーシップの存在確認
|
|
@@ -492,6 +494,7 @@ function validateProgramMembershipUsed(params) {
|
|
|
492
494
|
};
|
|
493
495
|
}
|
|
494
496
|
break;
|
|
497
|
+
}
|
|
495
498
|
default:
|
|
496
499
|
throw new factory.errors.Argument('acceptedOffer.itemOffered.serviceOutput.programMembershipUsed', `${permitIssuedThrough.typeOf} not implemented`);
|
|
497
500
|
}
|
|
@@ -57,7 +57,7 @@ function createOwnershipInfosFromOrder(params) {
|
|
|
57
57
|
if (ownedBy.length > 0) {
|
|
58
58
|
const itemOfferedType = itemOffered.typeOf;
|
|
59
59
|
switch (itemOfferedType) {
|
|
60
|
-
case factory.reservationType.EventReservation:
|
|
60
|
+
case factory.reservationType.EventReservation: {
|
|
61
61
|
const excludeCOAReservation = acceptedOffer.offeredThrough?.identifier === factory.service.webAPI.Identifier.COA;
|
|
62
62
|
if (excludeCOAReservation) {
|
|
63
63
|
// bookingService:COAでは作成しない(2024-12-31~)
|
|
@@ -73,6 +73,7 @@ function createOwnershipInfosFromOrder(params) {
|
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
break;
|
|
76
|
+
}
|
|
76
77
|
case factory.permit.PermitType.Permit:
|
|
77
78
|
ownershipInfo = (0, factory_1.createProductOwnershipInfo)({
|
|
78
79
|
project: params.order.project,
|
|
@@ -50,7 +50,7 @@ function saveScreeningEvents(params, options) {
|
|
|
50
50
|
upsert: true
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
catch (
|
|
53
|
+
catch (_error) {
|
|
54
54
|
// no op
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -229,7 +229,7 @@ function createScreeningEventFromCOA(params) {
|
|
|
229
229
|
addDay4endDate += Math.floor(Number(timeEnd) / DAY);
|
|
230
230
|
timeEnd = `0000${Number(timeEnd) % DAY}`.slice(-4);
|
|
231
231
|
}
|
|
232
|
-
catch (
|
|
232
|
+
catch (_error) {
|
|
233
233
|
// no op
|
|
234
234
|
}
|
|
235
235
|
let endDate = (0, moment_timezone_1.default)(`${params.performanceFromCOA.dateJouei} ${timeEnd} +09:00`, 'YYYYMMDD HHmm Z')
|
|
@@ -3,7 +3,7 @@ declare function notifyByEmail(params: {
|
|
|
3
3
|
subject: string;
|
|
4
4
|
content: string;
|
|
5
5
|
logLevel: LineNotifyLogLevel;
|
|
6
|
-
}): (__:
|
|
6
|
+
}): (__: Record<string, never>, credentials: {
|
|
7
7
|
sendGrid: SendGridCredentials;
|
|
8
8
|
}) => Promise<{
|
|
9
9
|
result: import("@chevre/factory/lib/action/transfer/send/message/email").IResult;
|