@chevre/domain 22.2.0-alpha.9 → 22.2.0
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/createProject.ts +19 -0
- package/example/src/chevre/findValidAuthorization.ts +1 -2
- package/example/src/chevre/migrateDeleteTransactionTasks.ts +1 -1
- package/example/src/chevre/{migrateMovieTheaterAdditionalProperties.ts → migrateRoomAdditionalProperties.ts} +17 -17
- package/example/src/chevre/migrateRoomSectionAdditionalProperties.ts +119 -0
- package/example/src/chevre/playAroundTicket.ts +3 -2
- package/example/src/chevre/processAction.ts +3 -1
- package/example/src/chevre/projectFields.ts +42 -0
- package/example/src/chevre/{projectEventFieldsById.ts → projectFieldsById.ts} +7 -12
- package/example/src/chevre/searchActionsByPurpose.ts +38 -0
- package/example/src/chevre/searchProjects.ts +9 -4
- package/example/src/chevre/searchSellersByAggregate.ts +3 -3
- package/example/src/chevre/searchTransactions.ts +1 -1
- package/example/src/chevre/unsetUnnecessaryFields.ts +2 -41
- package/lib/chevre/repo/accountTitle.d.ts +9 -3
- package/lib/chevre/repo/accountingReport.d.ts +2 -15
- package/lib/chevre/repo/action.d.ts +110 -47
- package/lib/chevre/repo/action.js +170 -133
- package/lib/chevre/repo/aggregateReservation.d.ts +1 -14
- package/lib/chevre/repo/assetTransaction.d.ts +134 -7
- package/lib/chevre/repo/assetTransaction.js +2 -2
- package/lib/chevre/repo/categoryCode.d.ts +14 -2
- package/lib/chevre/repo/categoryCode.js +47 -19
- package/lib/chevre/repo/comment.d.ts +5 -1
- package/lib/chevre/repo/creativeWork.d.ts +14 -2
- package/lib/chevre/repo/customer.d.ts +5 -1
- package/lib/chevre/repo/customerType.d.ts +1 -1
- package/lib/chevre/repo/event.d.ts +49 -2
- package/lib/chevre/repo/member.d.ts +5 -1
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +22 -2
- package/lib/chevre/repo/message.d.ts +1 -15
- package/lib/chevre/repo/mongoose/schemas/account.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/account.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/accountTitle.js +2 -2
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +22 -3
- package/lib/chevre/repo/mongoose/schemas/accountingReport.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/action.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/actionRecipe.d.ts +14 -3
- package/lib/chevre/repo/mongoose/schemas/actionRecipe.js +2 -5
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.js +12 -12
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +11 -3
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/aggregateReservation.d.ts +22 -3
- package/lib/chevre/repo/mongoose/schemas/aggregateReservation.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +7 -3
- package/lib/chevre/repo/mongoose/schemas/aggregation.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +10 -3
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/authorization.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/categoryCode.js +22 -24
- package/lib/chevre/repo/mongoose/schemas/comments.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/comments.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +10 -3
- package/lib/chevre/repo/mongoose/schemas/creativeWork.js +2 -2
- package/lib/chevre/repo/mongoose/schemas/customer.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/customer.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/customerType.d.ts +9 -3
- package/lib/chevre/repo/mongoose/schemas/customerType.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/emailMessages.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +19 -3
- package/lib/chevre/repo/mongoose/schemas/event.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/member.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/member.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/message.d.ts +23 -3
- package/lib/chevre/repo/mongoose/schemas/message.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/note.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/note.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +12 -3
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +12 -3
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +10 -3
- package/lib/chevre/repo/mongoose/schemas/order.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +10 -3
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/paymentService.d.ts +10 -3
- package/lib/chevre/repo/mongoose/schemas/paymentService.js +13 -4
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +16 -3
- package/lib/chevre/repo/mongoose/schemas/place.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +11 -3
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/product.d.ts +12 -3
- package/lib/chevre/repo/mongoose/schemas/product.js +6 -13
- package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +30 -3
- package/lib/chevre/repo/mongoose/schemas/productModel.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +12 -3
- package/lib/chevre/repo/mongoose/schemas/project.js +3 -3
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +12 -3
- package/lib/chevre/repo/mongoose/schemas/reservation.js +5 -5
- package/lib/chevre/repo/mongoose/schemas/role.d.ts +9 -3
- package/lib/chevre/repo/mongoose/schemas/role.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/seller.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/seller.js +22 -24
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/task.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/telemetry.d.ts +7 -3
- package/lib/chevre/repo/mongoose/schemas/telemetry.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/ticket.d.ts +26 -3
- package/lib/chevre/repo/mongoose/schemas/ticket.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/transaction.js +2 -2
- package/lib/chevre/repo/mongoose/schemas/trip.d.ts +8 -3
- package/lib/chevre/repo/mongoose/schemas/trip.js +3 -3
- package/lib/chevre/repo/offer.d.ts +13 -4
- package/lib/chevre/repo/offerCatalog.d.ts +15 -2
- package/lib/chevre/repo/order.d.ts +13 -1
- package/lib/chevre/repo/ownershipInfo.d.ts +15 -3
- package/lib/chevre/repo/ownershipInfo.js +40 -11
- package/lib/chevre/repo/paymentService.d.ts +2 -2
- package/lib/chevre/repo/paymentService.js +108 -58
- package/lib/chevre/repo/paymentServiceProvider.d.ts +1 -10
- package/lib/chevre/repo/place/movieTheater.d.ts +54 -2
- package/lib/chevre/repo/priceSpecification.d.ts +42 -1
- package/lib/chevre/repo/product.d.ts +8 -3
- package/lib/chevre/repo/product.js +67 -33
- package/lib/chevre/repo/productModel.d.ts +1 -22
- package/lib/chevre/repo/project.d.ts +25 -5
- package/lib/chevre/repo/project.js +69 -28
- package/lib/chevre/repo/reservation.d.ts +35 -3
- package/lib/chevre/repo/reservation.js +1 -1
- package/lib/chevre/repo/role.d.ts +2 -9
- package/lib/chevre/repo/role.js +20 -10
- package/lib/chevre/repo/seller.d.ts +64 -14
- package/lib/chevre/repo/seller.js +61 -27
- package/lib/chevre/repo/task.d.ts +64 -3
- package/lib/chevre/repo/telemetry.d.ts +3 -2
- package/lib/chevre/repo/ticket.d.ts +4 -20
- package/lib/chevre/repo/ticket.js +23 -10
- package/lib/chevre/repo/transaction.d.ts +30 -14
- package/lib/chevre/repo/transaction.js +106 -77
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +1 -1
- package/lib/chevre/service/aggregation/event/findEventOffers.js +1 -1
- package/lib/chevre/service/aggregation/project.js +1 -1
- package/lib/chevre/service/assetTransaction/cancelReservation.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/cancelReservation.js +2 -2
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/factory.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay.js +3 -3
- package/lib/chevre/service/assetTransaction/refund/factory.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/refund.js +3 -3
- package/lib/chevre/service/assetTransaction/registerService.js +4 -6
- package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +9 -11
- package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.js +1 -1
- package/lib/chevre/service/assetTransaction/reserve/start.js +1 -3
- package/lib/chevre/service/code.d.ts +0 -4
- package/lib/chevre/service/code.js +22 -18
- package/lib/chevre/service/event.js +4 -4
- package/lib/chevre/service/moneyTransfer.js +3 -5
- package/lib/chevre/service/notification.js +2 -2
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -3
- package/lib/chevre/service/offer/event/authorize/factory.js +16 -2
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.js +2 -2
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +3 -2
- package/lib/chevre/service/offer/event/authorize.d.ts +4 -2
- package/lib/chevre/service/offer/event/authorize.js +3 -2
- package/lib/chevre/service/offer/event/importFromCOA.js +2 -2
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +4 -12
- package/lib/chevre/service/offer/event/voidTransaction.js +2 -2
- package/lib/chevre/service/offer/event/voidTransactionByActionId.js +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/authorize.d.ts +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/authorize.js +41 -4
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/factory.d.ts +3 -3
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +3 -3
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +7 -3
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +10 -5
- package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.d.ts +3 -1
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.d.ts +3 -1
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +14 -6
- package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +8 -5
- package/lib/chevre/service/offer/eventServiceByCOA/validateAcceptedOffers.d.ts +1 -1
- package/lib/chevre/service/offer/moneyTransfer/authorize.js +1 -1
- package/lib/chevre/service/offer/moneyTransfer/voidTransaction.js +1 -1
- package/lib/chevre/service/offer/product/searchProductOffers.js +1 -3
- package/lib/chevre/service/offer/product.d.ts +4 -2
- package/lib/chevre/service/offer/product.js +12 -12
- package/lib/chevre/service/order/findPlaceOrderTransaction.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +3 -3
- package/lib/chevre/service/order/placeOrder.js +1 -1
- package/lib/chevre/service/order/returnOrder.js +1 -1
- package/lib/chevre/service/payment/any/factory.d.ts +1 -1
- package/lib/chevre/service/payment/any/onPaid.d.ts +1 -1
- package/lib/chevre/service/payment/any/onRefund.d.ts +1 -1
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.d.ts +1 -4
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +21 -26
- package/lib/chevre/service/payment/any.d.ts +3 -1
- package/lib/chevre/service/payment/any.js +21 -13
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +1 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard3ds.js +1 -1
- package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +1 -2
- package/lib/chevre/service/payment/creditCard/payCreditCard.js +12 -5
- package/lib/chevre/service/payment/creditCard/refundCreditCard.js +13 -3
- package/lib/chevre/service/payment/creditCard/voidTransaction.js +1 -1
- package/lib/chevre/service/payment/faceToFace.d.ts +2 -2
- package/lib/chevre/service/payment/faceToFace.js +28 -10
- package/lib/chevre/service/payment/movieTicket/authorize.d.ts +0 -1
- package/lib/chevre/service/payment/movieTicket/authorize.js +8 -3
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +1 -2
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +12 -4
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +15 -4
- package/lib/chevre/service/payment/movieTicket/validation.js +1 -1
- package/lib/chevre/service/payment/paymentCard.d.ts +2 -2
- package/lib/chevre/service/payment/paymentCard.js +29 -16
- package/lib/chevre/service/payment.d.ts +1 -1
- package/lib/chevre/service/report/telemetry.js +2 -2
- package/lib/chevre/service/reserve/cancelReservation.js +1 -1
- package/lib/chevre/service/reserve/confirmReservation.js +1 -1
- package/lib/chevre/service/task/onAuthorizationCreated.js +20 -16
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +2 -2
- package/lib/chevre/service/task/onResourceUpdated/syncCategoryCode.js +1 -1
- package/lib/chevre/service/task/onResourceUpdated.js +16 -4
- package/lib/chevre/service/task/publishPaymentUrl.js +4 -0
- package/lib/chevre/service/task/returnPayTransaction.js +1 -1
- package/lib/chevre/service/transaction/deleteTransaction.js +2 -2
- package/lib/chevre/service/transaction/moneyTransfer.js +4 -4
- package/lib/chevre/service/transaction/placeOrder/confirm.js +1 -1
- package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +1 -1
- package/lib/chevre/service/transaction/placeOrder/start/validateStartRequest.d.ts +2 -2
- package/lib/chevre/service/transaction/placeOrder/start/validateStartRequest.js +1 -1
- package/lib/chevre/service/transaction/placeOrder/start.js +1 -1
- package/lib/chevre/service/transaction/returnOrder/preStart.d.ts +2 -2
- package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -1
- package/lib/chevre/service/transaction/returnOrder.js +2 -2
- package/lib/chevre/service/transaction.js +1 -1
- package/package.json +4 -4
- package/example/src/chevre/findTransactionById.ts +0 -23
- package/example/src/chevre/findTransactionInProgressById.ts +0 -23
- package/example/src/chevre/migrateTransactionObjectPaymentMethods.ts +0 -154
- package/example/src/chevre/projectReservationFields.ts +0 -31
- package/example/src/chevre/searchActions.ts +0 -40
- package/example/src/chevre/searchProducts.ts +0 -28
|
@@ -46,13 +46,14 @@ export interface IAggregateReserve {
|
|
|
46
46
|
statuses: IStatus[];
|
|
47
47
|
}
|
|
48
48
|
type IKeyOfProjection<T extends factory.assetTransactionType> = keyof Pick<factory.assetTransaction.ITransaction<factory.assetTransactionType>, 'agent' | 'endDate' | 'expires' | 'project' | 'startDate' | 'status' | 'typeOf' | 'transactionNumber'> | Exclude<keyof factory.assetTransaction.ITransaction<T>, 'id'>;
|
|
49
|
+
type AvailableAssetTransactionType = factory.assetTransactionType.CancelReservation | factory.assetTransactionType.MoneyTransfer | factory.assetTransactionType.Pay | factory.assetTransactionType.Refund | factory.assetTransactionType.RegisterService | factory.assetTransactionType.Reserve;
|
|
49
50
|
/**
|
|
50
51
|
* 資産取引リポジトリ
|
|
51
52
|
*/
|
|
52
53
|
export declare class AssetTransactionRepo {
|
|
53
54
|
private readonly transactionModel;
|
|
54
55
|
constructor(connection: Connection);
|
|
55
|
-
static CREATE_MONGO_CONDITIONS(params: factory.assetTransaction.ISearchConditions<factory.assetTransactionType>): FilterQuery<import("@chevre/factory/lib/assetTransaction/
|
|
56
|
+
static CREATE_MONGO_CONDITIONS(params: factory.assetTransaction.ISearchConditions<factory.assetTransactionType>): FilterQuery<import("@chevre/factory/lib/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/assetTransaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/assetTransaction/registerService").ITransaction | import("@chevre/factory/lib/assetTransaction/reserve").ITransaction>[];
|
|
56
57
|
/**
|
|
57
58
|
* 取引を開始する
|
|
58
59
|
*/
|
|
@@ -91,11 +92,13 @@ export declare class AssetTransactionRepo {
|
|
|
91
92
|
/**
|
|
92
93
|
* 取引を開始&確定
|
|
93
94
|
*/
|
|
94
|
-
startAndConfirm<T extends
|
|
95
|
+
startAndConfirm<T extends AvailableAssetTransactionType>(params: factory.assetTransaction.IStartParams<T> & {
|
|
95
96
|
id: string;
|
|
96
97
|
result: factory.assetTransaction.IResult<T>;
|
|
97
98
|
potentialActions: factory.assetTransaction.IPotentialActions<T>;
|
|
98
|
-
}): Promise<
|
|
99
|
+
}): Promise<{
|
|
100
|
+
id: string;
|
|
101
|
+
}>;
|
|
99
102
|
/**
|
|
100
103
|
* タスク未エクスポートの取引をひとつ取得してエクスポートを開始する
|
|
101
104
|
*/
|
|
@@ -123,7 +126,7 @@ export declare class AssetTransactionRepo {
|
|
|
123
126
|
status: {
|
|
124
127
|
$in: factory.transactionStatusType[];
|
|
125
128
|
};
|
|
126
|
-
}): Promise<Pick<import("@chevre/factory/lib/assetTransaction/
|
|
129
|
+
}): Promise<Pick<import("@chevre/factory/lib/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/assetTransaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/assetTransaction/registerService").ITransaction | import("@chevre/factory/lib/assetTransaction/reserve").ITransaction, "id" | "typeOf" | "status">[]>;
|
|
127
130
|
/**
|
|
128
131
|
* set task status exported by transaction id
|
|
129
132
|
* IDでタスクをエクスポート済に変更する
|
|
@@ -153,7 +156,7 @@ export declare class AssetTransactionRepo {
|
|
|
153
156
|
/**
|
|
154
157
|
* 取引を検索する
|
|
155
158
|
*/
|
|
156
|
-
search<T extends
|
|
159
|
+
search<T extends AvailableAssetTransactionType>(params: factory.assetTransaction.ISearchConditions<T>, inclusion?: string[], exclusion?: string[]): Promise<factory.assetTransaction.ITransaction<T>[]>;
|
|
157
160
|
/**
|
|
158
161
|
* 取引番号指定で削除する
|
|
159
162
|
*/
|
|
@@ -197,7 +200,55 @@ export declare class AssetTransactionRepo {
|
|
|
197
200
|
object: {
|
|
198
201
|
reservationNumber: string;
|
|
199
202
|
};
|
|
200
|
-
}): Promise<
|
|
203
|
+
}): Promise<(import("@chevre/factory/lib/assetTransaction/cancelReservation").IAttributes & {
|
|
204
|
+
id: string;
|
|
205
|
+
} & {
|
|
206
|
+
seller?: any;
|
|
207
|
+
} & {
|
|
208
|
+
_id: import("mongoose").Types.ObjectId;
|
|
209
|
+
} & Required<{
|
|
210
|
+
_id: import("mongoose").Types.ObjectId;
|
|
211
|
+
}>) | (import("@chevre/factory/lib/assetTransaction/moneyTransfer").IAttributes & {
|
|
212
|
+
id: string;
|
|
213
|
+
} & {
|
|
214
|
+
seller?: any;
|
|
215
|
+
} & {
|
|
216
|
+
_id: import("mongoose").Types.ObjectId;
|
|
217
|
+
} & Required<{
|
|
218
|
+
_id: import("mongoose").Types.ObjectId;
|
|
219
|
+
}>) | (import("@chevre/factory/lib/assetTransaction/pay").IAttributes & {
|
|
220
|
+
id: string;
|
|
221
|
+
} & {
|
|
222
|
+
seller?: any;
|
|
223
|
+
} & {
|
|
224
|
+
_id: import("mongoose").Types.ObjectId;
|
|
225
|
+
} & Required<{
|
|
226
|
+
_id: import("mongoose").Types.ObjectId;
|
|
227
|
+
}>) | (import("@chevre/factory/lib/assetTransaction/refund").IAttributes & {
|
|
228
|
+
id: string;
|
|
229
|
+
} & {
|
|
230
|
+
seller?: any;
|
|
231
|
+
} & {
|
|
232
|
+
_id: import("mongoose").Types.ObjectId;
|
|
233
|
+
} & Required<{
|
|
234
|
+
_id: import("mongoose").Types.ObjectId;
|
|
235
|
+
}>) | (import("@chevre/factory/lib/assetTransaction/registerService").IAttributes & {
|
|
236
|
+
id: string;
|
|
237
|
+
} & {
|
|
238
|
+
seller?: any;
|
|
239
|
+
} & {
|
|
240
|
+
_id: import("mongoose").Types.ObjectId;
|
|
241
|
+
} & Required<{
|
|
242
|
+
_id: import("mongoose").Types.ObjectId;
|
|
243
|
+
}>) | (import("@chevre/factory/lib/assetTransaction/reserve").IAttributes & {
|
|
244
|
+
id: string;
|
|
245
|
+
} & {
|
|
246
|
+
seller?: any;
|
|
247
|
+
} & {
|
|
248
|
+
_id: import("mongoose").Types.ObjectId;
|
|
249
|
+
} & Required<{
|
|
250
|
+
_id: import("mongoose").Types.ObjectId;
|
|
251
|
+
}>)>;
|
|
201
252
|
/**
|
|
202
253
|
* 互換性維持対応専用
|
|
203
254
|
*/
|
|
@@ -215,7 +266,83 @@ export declare class AssetTransactionRepo {
|
|
|
215
266
|
findByIdAndDelete(params: {
|
|
216
267
|
id: string;
|
|
217
268
|
}): Promise<void>;
|
|
218
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<
|
|
269
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, (import("@chevre/factory/lib/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/assetTransaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/assetTransaction/registerService").ITransaction | import("@chevre/factory/lib/assetTransaction/reserve").ITransaction) & {
|
|
270
|
+
seller?: any;
|
|
271
|
+
}> & Omit<(import("@chevre/factory/lib/assetTransaction/cancelReservation").IAttributes & {
|
|
272
|
+
id: string;
|
|
273
|
+
} & {
|
|
274
|
+
seller?: any;
|
|
275
|
+
} & {
|
|
276
|
+
_id: import("mongoose").Types.ObjectId;
|
|
277
|
+
}) | (import("@chevre/factory/lib/assetTransaction/moneyTransfer").IAttributes & {
|
|
278
|
+
id: string;
|
|
279
|
+
} & {
|
|
280
|
+
seller?: any;
|
|
281
|
+
} & {
|
|
282
|
+
_id: import("mongoose").Types.ObjectId;
|
|
283
|
+
}) | (import("@chevre/factory/lib/assetTransaction/pay").IAttributes & {
|
|
284
|
+
id: string;
|
|
285
|
+
} & {
|
|
286
|
+
seller?: any;
|
|
287
|
+
} & {
|
|
288
|
+
_id: import("mongoose").Types.ObjectId;
|
|
289
|
+
}) | (import("@chevre/factory/lib/assetTransaction/refund").IAttributes & {
|
|
290
|
+
id: string;
|
|
291
|
+
} & {
|
|
292
|
+
seller?: any;
|
|
293
|
+
} & {
|
|
294
|
+
_id: import("mongoose").Types.ObjectId;
|
|
295
|
+
}) | (import("@chevre/factory/lib/assetTransaction/registerService").IAttributes & {
|
|
296
|
+
id: string;
|
|
297
|
+
} & {
|
|
298
|
+
seller?: any;
|
|
299
|
+
} & {
|
|
300
|
+
_id: import("mongoose").Types.ObjectId;
|
|
301
|
+
}) | (import("@chevre/factory/lib/assetTransaction/reserve").IAttributes & {
|
|
302
|
+
id: string;
|
|
303
|
+
} & {
|
|
304
|
+
seller?: any;
|
|
305
|
+
} & {
|
|
306
|
+
_id: import("mongoose").Types.ObjectId;
|
|
307
|
+
}), never>, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, (import("@chevre/factory/lib/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/assetTransaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/assetTransaction/registerService").ITransaction | import("@chevre/factory/lib/assetTransaction/reserve").ITransaction) & {
|
|
308
|
+
seller?: any;
|
|
309
|
+
}> & Omit<(import("@chevre/factory/lib/assetTransaction/cancelReservation").IAttributes & {
|
|
310
|
+
id: string;
|
|
311
|
+
} & {
|
|
312
|
+
seller?: any;
|
|
313
|
+
} & {
|
|
314
|
+
_id: import("mongoose").Types.ObjectId;
|
|
315
|
+
}) | (import("@chevre/factory/lib/assetTransaction/moneyTransfer").IAttributes & {
|
|
316
|
+
id: string;
|
|
317
|
+
} & {
|
|
318
|
+
seller?: any;
|
|
319
|
+
} & {
|
|
320
|
+
_id: import("mongoose").Types.ObjectId;
|
|
321
|
+
}) | (import("@chevre/factory/lib/assetTransaction/pay").IAttributes & {
|
|
322
|
+
id: string;
|
|
323
|
+
} & {
|
|
324
|
+
seller?: any;
|
|
325
|
+
} & {
|
|
326
|
+
_id: import("mongoose").Types.ObjectId;
|
|
327
|
+
}) | (import("@chevre/factory/lib/assetTransaction/refund").IAttributes & {
|
|
328
|
+
id: string;
|
|
329
|
+
} & {
|
|
330
|
+
seller?: any;
|
|
331
|
+
} & {
|
|
332
|
+
_id: import("mongoose").Types.ObjectId;
|
|
333
|
+
}) | (import("@chevre/factory/lib/assetTransaction/registerService").IAttributes & {
|
|
334
|
+
id: string;
|
|
335
|
+
} & {
|
|
336
|
+
seller?: any;
|
|
337
|
+
} & {
|
|
338
|
+
_id: import("mongoose").Types.ObjectId;
|
|
339
|
+
}) | (import("@chevre/factory/lib/assetTransaction/reserve").IAttributes & {
|
|
340
|
+
id: string;
|
|
341
|
+
} & {
|
|
342
|
+
seller?: any;
|
|
343
|
+
} & {
|
|
344
|
+
_id: import("mongoose").Types.ObjectId;
|
|
345
|
+
}), never>>>;
|
|
219
346
|
unsetUnnecessaryFields(params: {
|
|
220
347
|
filter: any;
|
|
221
348
|
$unset: any;
|
|
@@ -439,7 +439,7 @@ class AssetTransactionRepo {
|
|
|
439
439
|
startAndConfirm(params) {
|
|
440
440
|
return __awaiter(this, void 0, void 0, function* () {
|
|
441
441
|
const startDate = new Date();
|
|
442
|
-
|
|
442
|
+
yield this.transactionModel.create(Object.assign(Object.assign({}, params), { _id: params.id, typeOf: params.typeOf, startDate, status: factory.transactionStatusType.Confirmed, tasksExportAction: {
|
|
443
443
|
actionStatus: factory.actionStatusType.PotentialActionStatus
|
|
444
444
|
},
|
|
445
445
|
// tasksExportationStatus: factory.transactionTasksExportationStatus.Unexported, // discontinue(2024-06-20~)
|
|
@@ -450,7 +450,7 @@ class AssetTransactionRepo {
|
|
|
450
450
|
typeOf: params.typeOf,
|
|
451
451
|
status: factory.transactionStatusType.Confirmed
|
|
452
452
|
});
|
|
453
|
-
return
|
|
453
|
+
return { id: params.id };
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
456
|
/**
|
|
@@ -45,7 +45,15 @@ export declare class CategoryCodeRepo {
|
|
|
45
45
|
/**
|
|
46
46
|
* 検索
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
projectFields(params: factory.categoryCode.ISearchConditions,
|
|
49
|
+
/**
|
|
50
|
+
* 空の場合無効
|
|
51
|
+
*/
|
|
52
|
+
inclusion: IKeyOfProjection[],
|
|
53
|
+
/**
|
|
54
|
+
* 空の場合無効
|
|
55
|
+
*/
|
|
56
|
+
exclusion: IKeyOfProjection[]): Promise<(factory.categoryCode.ICategoryCode & {
|
|
49
57
|
id: string;
|
|
50
58
|
})[]>;
|
|
51
59
|
save(params: {
|
|
@@ -53,7 +61,7 @@ export declare class CategoryCodeRepo {
|
|
|
53
61
|
attributes: factory.categoryCode.ICategoryCode & {
|
|
54
62
|
$unset?: IUnset;
|
|
55
63
|
};
|
|
56
|
-
}): Promise<
|
|
64
|
+
}): Promise<{
|
|
57
65
|
id: string;
|
|
58
66
|
}>;
|
|
59
67
|
saveManyByCodeValue(params: {
|
|
@@ -75,5 +83,9 @@ export declare class CategoryCodeRepo {
|
|
|
75
83
|
};
|
|
76
84
|
}): Promise<void>;
|
|
77
85
|
getCursor(conditions: FilterQuery<factory.categoryCode.ICategoryCode>, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
86
|
+
unsetUnnecessaryFields(params: {
|
|
87
|
+
filter: FilterQuery<factory.categoryCode.ICategoryCode>;
|
|
88
|
+
$unset: any;
|
|
89
|
+
}): Promise<import("mongodb").UpdateResult>;
|
|
78
90
|
}
|
|
79
91
|
export {};
|
|
@@ -25,6 +25,9 @@ const mongoose_1 = require("mongoose");
|
|
|
25
25
|
const categoryCode_1 = require("./mongoose/schemas/categoryCode");
|
|
26
26
|
const factory = require("../factory");
|
|
27
27
|
const settings_1 = require("../settings");
|
|
28
|
+
const AVAILABLE_PROJECT_FIELDS = [
|
|
29
|
+
'additionalProperty', 'codeValue', 'color', 'image', 'inCodeSet', 'name', 'paymentMethod', 'project', 'typeOf'
|
|
30
|
+
];
|
|
28
31
|
/**
|
|
29
32
|
* 区分リポジトリ
|
|
30
33
|
*/
|
|
@@ -208,27 +211,43 @@ class CategoryCodeRepo {
|
|
|
208
211
|
/**
|
|
209
212
|
* 検索
|
|
210
213
|
*/
|
|
211
|
-
|
|
214
|
+
projectFields(params,
|
|
215
|
+
/**
|
|
216
|
+
* 空の場合無効
|
|
217
|
+
*/
|
|
218
|
+
inclusion,
|
|
219
|
+
/**
|
|
220
|
+
* 空の場合無効
|
|
221
|
+
*/
|
|
222
|
+
exclusion) {
|
|
212
223
|
return __awaiter(this, void 0, void 0, function* () {
|
|
213
224
|
const conditions = CategoryCodeRepo.CREATE_MONGO_CONDITIONS(params);
|
|
214
|
-
let
|
|
225
|
+
let positiveProjectionFields = AVAILABLE_PROJECT_FIELDS;
|
|
215
226
|
if (Array.isArray(inclusion) && inclusion.length > 0) {
|
|
216
|
-
inclusion.
|
|
217
|
-
projection[field] = 1;
|
|
218
|
-
});
|
|
227
|
+
positiveProjectionFields = inclusion.filter((key) => AVAILABLE_PROJECT_FIELDS.includes(key));
|
|
219
228
|
}
|
|
220
229
|
else {
|
|
221
|
-
projection = {
|
|
222
|
-
__v: 0,
|
|
223
|
-
createdAt: 0,
|
|
224
|
-
updatedAt: 0
|
|
225
|
-
};
|
|
226
230
|
if (Array.isArray(exclusion) && exclusion.length > 0) {
|
|
227
|
-
|
|
228
|
-
projection[field] = 0;
|
|
229
|
-
});
|
|
231
|
+
positiveProjectionFields = positiveProjectionFields.filter((key) => !exclusion.includes(key));
|
|
230
232
|
}
|
|
231
233
|
}
|
|
234
|
+
const projection = Object.assign({ _id: 0, id: { $toString: '$_id' } }, Object.fromEntries(positiveProjectionFields.map((key) => ([key, 1]))));
|
|
235
|
+
// if (Array.isArray(inclusion) && inclusion.length > 0) {
|
|
236
|
+
// inclusion.forEach((field) => {
|
|
237
|
+
// projection[field] = 1;
|
|
238
|
+
// });
|
|
239
|
+
// } else {
|
|
240
|
+
// projection = {
|
|
241
|
+
// __v: 0,
|
|
242
|
+
// createdAt: 0,
|
|
243
|
+
// updatedAt: 0
|
|
244
|
+
// };
|
|
245
|
+
// if (Array.isArray(exclusion) && exclusion.length > 0) {
|
|
246
|
+
// exclusion.forEach((field) => {
|
|
247
|
+
// projection[field] = 0;
|
|
248
|
+
// });
|
|
249
|
+
// }
|
|
250
|
+
// }
|
|
232
251
|
const query = this.categoryCodeModel.find((conditions.length > 0) ? { $and: conditions } : {}, projection);
|
|
233
252
|
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
234
253
|
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
@@ -241,27 +260,30 @@ class CategoryCodeRepo {
|
|
|
241
260
|
query.sort(params.sort);
|
|
242
261
|
}
|
|
243
262
|
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
244
|
-
.
|
|
245
|
-
.
|
|
263
|
+
.lean() // 2024-08-19~
|
|
264
|
+
.exec();
|
|
246
265
|
});
|
|
247
266
|
}
|
|
248
267
|
save(params) {
|
|
249
268
|
return __awaiter(this, void 0, void 0, function* () {
|
|
269
|
+
let savedId;
|
|
250
270
|
let doc;
|
|
251
271
|
if (typeof params.id !== 'string') {
|
|
252
272
|
const _a = params.attributes, { id, $unset } = _a, creatingDoc = __rest(_a, ["id", "$unset"]);
|
|
253
|
-
doc = yield this.categoryCodeModel.create(creatingDoc);
|
|
273
|
+
doc = (yield this.categoryCodeModel.create(creatingDoc));
|
|
274
|
+
savedId = doc.id;
|
|
254
275
|
}
|
|
255
276
|
else {
|
|
256
277
|
// 上書き禁止属性を除外(2022-08-24~)
|
|
257
278
|
const _b = params.attributes, { id, codeValue, inCodeSet, project, typeOf, $unset } = _b, updateFields = __rest(_b, ["id", "codeValue", "inCodeSet", "project", "typeOf", "$unset"]);
|
|
258
|
-
doc = yield this.categoryCodeModel.findOneAndUpdate({ _id: { $eq: params.id } }, Object.assign({ $set: updateFields }, ($unset !== undefined) ? { $unset } : undefined), { upsert: false, new: true })
|
|
279
|
+
doc = yield this.categoryCodeModel.findOneAndUpdate({ _id: { $eq: params.id } }, Object.assign({ $set: updateFields }, ($unset !== undefined) ? { $unset } : undefined), { upsert: false, new: true, projection: { _id: 1 } })
|
|
259
280
|
.exec();
|
|
281
|
+
savedId = params.id;
|
|
260
282
|
}
|
|
261
283
|
if (doc === null) {
|
|
262
284
|
throw new factory.errors.NotFound(this.categoryCodeModel.modelName);
|
|
263
285
|
}
|
|
264
|
-
return
|
|
286
|
+
return { id: savedId };
|
|
265
287
|
});
|
|
266
288
|
}
|
|
267
289
|
saveManyByCodeValue(params) {
|
|
@@ -302,7 +324,7 @@ class CategoryCodeRepo {
|
|
|
302
324
|
*/
|
|
303
325
|
deleteById(params) {
|
|
304
326
|
return __awaiter(this, void 0, void 0, function* () {
|
|
305
|
-
yield this.categoryCodeModel.findOneAndRemove({ _id: params.id })
|
|
327
|
+
yield this.categoryCodeModel.findOneAndRemove({ _id: { $eq: params.id } }, { projection: { _id: 1 } })
|
|
306
328
|
.exec();
|
|
307
329
|
});
|
|
308
330
|
}
|
|
@@ -322,5 +344,11 @@ class CategoryCodeRepo {
|
|
|
322
344
|
.sort({ codeValue: factory.sortType.Ascending })
|
|
323
345
|
.cursor();
|
|
324
346
|
}
|
|
347
|
+
unsetUnnecessaryFields(params) {
|
|
348
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
349
|
+
return this.categoryCodeModel.updateMany(params.filter, { $unset: params.$unset }, { timestamps: false })
|
|
350
|
+
.exec();
|
|
351
|
+
});
|
|
352
|
+
}
|
|
325
353
|
}
|
|
326
354
|
exports.CategoryCodeRepo = CategoryCodeRepo;
|
|
@@ -54,5 +54,9 @@ export declare class CommentRepo {
|
|
|
54
54
|
deleteById(params: {
|
|
55
55
|
id: string;
|
|
56
56
|
}): Promise<void>;
|
|
57
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<
|
|
57
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/creativeWork/comment").IComment> & Omit<import("@chevre/factory/lib/creativeWork/comment").IComment & {
|
|
58
|
+
_id: import("mongoose").Types.ObjectId;
|
|
59
|
+
}, never>, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/creativeWork/comment").IComment> & Omit<import("@chevre/factory/lib/creativeWork/comment").IComment & {
|
|
60
|
+
_id: import("mongoose").Types.ObjectId;
|
|
61
|
+
}, never>>>;
|
|
58
62
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import type { BulkWriteResult } from 'mongodb';
|
|
26
|
-
import { Connection, FilterQuery } from 'mongoose';
|
|
26
|
+
import { Connection, Document, FilterQuery, Types } from 'mongoose';
|
|
27
27
|
import * as factory from '../factory';
|
|
28
28
|
type IKeyOfProjection = keyof factory.creativeWork.movie.ICreativeWork | '_id';
|
|
29
29
|
/**
|
|
@@ -72,7 +72,19 @@ export declare class CreativeWorkRepo {
|
|
|
72
72
|
id: string;
|
|
73
73
|
};
|
|
74
74
|
}): Promise<void>;
|
|
75
|
-
getCursor(conditions: FilterQuery<factory.creativeWork.movie.ICreativeWork>, projection: any): import("mongoose").Cursor<
|
|
75
|
+
getCursor(conditions: FilterQuery<factory.creativeWork.movie.ICreativeWork>, projection: any): import("mongoose").Cursor<Document<unknown, {}, import("@chevre/factory/lib/creativeWork/movie").ICreativeWork & {
|
|
76
|
+
description?: string | undefined;
|
|
77
|
+
}> & Omit<import("@chevre/factory/lib/creativeWork/movie").ICreativeWork & {
|
|
78
|
+
description?: string | undefined;
|
|
79
|
+
} & {
|
|
80
|
+
_id: Types.ObjectId;
|
|
81
|
+
}, never>, import("mongoose").QueryOptions<Document<unknown, {}, import("@chevre/factory/lib/creativeWork/movie").ICreativeWork & {
|
|
82
|
+
description?: string | undefined;
|
|
83
|
+
}> & Omit<import("@chevre/factory/lib/creativeWork/movie").ICreativeWork & {
|
|
84
|
+
description?: string | undefined;
|
|
85
|
+
} & {
|
|
86
|
+
_id: Types.ObjectId;
|
|
87
|
+
}, never>>>;
|
|
76
88
|
unsetUnnecessaryFields(params: {
|
|
77
89
|
filter: FilterQuery<factory.creativeWork.movie.ICreativeWork>;
|
|
78
90
|
$unset: any;
|
|
@@ -45,6 +45,10 @@ export declare class CustomerRepo {
|
|
|
45
45
|
deleteById(params: {
|
|
46
46
|
id: string;
|
|
47
47
|
}): Promise<void>;
|
|
48
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<
|
|
48
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, factory.customer.ICustomer> & Omit<factory.customer.ICustomer & {
|
|
49
|
+
_id: import("mongoose").Types.ObjectId;
|
|
50
|
+
}, never>, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, factory.customer.ICustomer> & Omit<factory.customer.ICustomer & {
|
|
51
|
+
_id: import("mongoose").Types.ObjectId;
|
|
52
|
+
}, never>>>;
|
|
49
53
|
}
|
|
50
54
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BulkWriteResult } from 'mongodb';
|
|
2
2
|
import { Connection, FilterQuery } from 'mongoose';
|
|
3
|
+
import { ICustomerType } from './mongoose/schemas/customerType';
|
|
3
4
|
import * as factory from '../factory';
|
|
4
|
-
type ICustomerType = Pick<factory.categoryCode.ICategoryCode, 'codeValue' | 'id' | 'name' | 'typeOf'>;
|
|
5
5
|
type IKeyOfProjection = keyof ICustomerType | '_id';
|
|
6
6
|
/**
|
|
7
7
|
* カスタマータイプリポジトリ
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import type { BulkWriteResult } from 'mongodb';
|
|
26
|
-
import type { Connection, FilterQuery } from 'mongoose';
|
|
26
|
+
import type { Connection, Document, FilterQuery } from 'mongoose';
|
|
27
27
|
import * as factory from '../factory';
|
|
28
28
|
import * as EventFactory from '../factory/event';
|
|
29
|
+
import { IDocType } from './mongoose/schemas/event';
|
|
29
30
|
export interface IAttributes4patchUpdate<T extends factory.eventType> {
|
|
30
31
|
typeOf: T;
|
|
31
32
|
eventStatus?: factory.eventStatusType;
|
|
@@ -336,7 +337,53 @@ export declare class EventRepo {
|
|
|
336
337
|
validationErrors: import("mongoose").Error[];
|
|
337
338
|
} | undefined;
|
|
338
339
|
}>;
|
|
339
|
-
getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<
|
|
340
|
+
getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<Document<unknown, {}, IDocType> & Omit<(import("@chevre/factory/lib/event/anyEvent").IAttributes & {
|
|
341
|
+
_id: string;
|
|
342
|
+
} & Required<{
|
|
343
|
+
/**
|
|
344
|
+
* イベントリポジトリ
|
|
345
|
+
*/
|
|
346
|
+
_id: string;
|
|
347
|
+
}>) | (import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
|
|
348
|
+
_id: string;
|
|
349
|
+
alternateName?: any;
|
|
350
|
+
aggregateOffer?: import("@chevre/factory/lib/event/anyEvent").IAggregateOffer | undefined;
|
|
351
|
+
} & Required<{
|
|
352
|
+
/**
|
|
353
|
+
* イベントリポジトリ
|
|
354
|
+
*/
|
|
355
|
+
_id: string;
|
|
356
|
+
}>) | (import("@chevre/factory/lib/event/screeningEventSeries").IAttributes & {
|
|
357
|
+
_id: string;
|
|
358
|
+
} & Required<{
|
|
359
|
+
/**
|
|
360
|
+
* イベントリポジトリ
|
|
361
|
+
*/
|
|
362
|
+
_id: string;
|
|
363
|
+
}>), never>, import("mongoose").QueryOptions<Document<unknown, {}, IDocType> & Omit<(import("@chevre/factory/lib/event/anyEvent").IAttributes & {
|
|
364
|
+
_id: string;
|
|
365
|
+
} & Required<{
|
|
366
|
+
/**
|
|
367
|
+
* イベントリポジトリ
|
|
368
|
+
*/
|
|
369
|
+
_id: string;
|
|
370
|
+
}>) | (import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
|
|
371
|
+
_id: string;
|
|
372
|
+
alternateName?: any;
|
|
373
|
+
aggregateOffer?: import("@chevre/factory/lib/event/anyEvent").IAggregateOffer | undefined;
|
|
374
|
+
} & Required<{
|
|
375
|
+
/**
|
|
376
|
+
* イベントリポジトリ
|
|
377
|
+
*/
|
|
378
|
+
_id: string;
|
|
379
|
+
}>) | (import("@chevre/factory/lib/event/screeningEventSeries").IAttributes & {
|
|
380
|
+
_id: string;
|
|
381
|
+
} & Required<{
|
|
382
|
+
/**
|
|
383
|
+
* イベントリポジトリ
|
|
384
|
+
*/
|
|
385
|
+
_id: string;
|
|
386
|
+
}>), never>>>;
|
|
340
387
|
addAvailableAtOrFrom(params: {
|
|
341
388
|
id: string;
|
|
342
389
|
offers: {
|
|
@@ -153,7 +153,11 @@ export declare class MemberRepo {
|
|
|
153
153
|
id: string;
|
|
154
154
|
};
|
|
155
155
|
}): Promise<string[]>;
|
|
156
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<
|
|
156
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, factory.iam.IMember> & Omit<factory.iam.IMember & {
|
|
157
|
+
_id: import("mongoose").Types.ObjectId;
|
|
158
|
+
}, never>, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, factory.iam.IMember> & Omit<factory.iam.IMember & {
|
|
159
|
+
_id: import("mongoose").Types.ObjectId;
|
|
160
|
+
}, never>>>;
|
|
157
161
|
unsetUnnecessaryFields(params: {
|
|
158
162
|
filter: any;
|
|
159
163
|
$unset: any;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
import type { Connection } from 'mongoose';
|
|
25
|
+
import type { Connection, Document } from 'mongoose';
|
|
26
26
|
import * as factory from '../factory';
|
|
27
27
|
/**
|
|
28
28
|
* 返品ポリシーリポジトリ
|
|
@@ -44,5 +44,25 @@ export declare class MerchantReturnPolicyRepo {
|
|
|
44
44
|
id: string;
|
|
45
45
|
};
|
|
46
46
|
}): Promise<void>;
|
|
47
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<
|
|
47
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<Document<unknown, {}, factory.unitPriceOffer.IOfferMerchantReturnPolicy> & Omit<Pick<factory.merchantReturnPolicy.IMerchantReturnPolicy, "typeOf" | "customerRemorseReturnFees" | "customerRemorseReturnFeesMovieTicket"> & {
|
|
48
|
+
customerRemorseReturnFees: factory.merchantReturnPolicy.ReturnFeesEnumeration;
|
|
49
|
+
customerRemorseReturnFeesMovieTicket: factory.merchantReturnPolicy.ICustomerRemorseReturnFeesMovieTicket;
|
|
50
|
+
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
51
|
+
additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
|
|
52
|
+
id?: string | undefined;
|
|
53
|
+
identifier: string;
|
|
54
|
+
name?: import("@chevre/factory/lib/multilingualString").IMultilingualString | undefined;
|
|
55
|
+
} & {
|
|
56
|
+
_id: import("mongoose").Types.ObjectId;
|
|
57
|
+
}, never>, import("mongoose").QueryOptions<Document<unknown, {}, factory.unitPriceOffer.IOfferMerchantReturnPolicy> & Omit<Pick<factory.merchantReturnPolicy.IMerchantReturnPolicy, "typeOf" | "customerRemorseReturnFees" | "customerRemorseReturnFeesMovieTicket"> & {
|
|
58
|
+
customerRemorseReturnFees: factory.merchantReturnPolicy.ReturnFeesEnumeration;
|
|
59
|
+
customerRemorseReturnFeesMovieTicket: factory.merchantReturnPolicy.ICustomerRemorseReturnFeesMovieTicket;
|
|
60
|
+
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
61
|
+
additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
|
|
62
|
+
id?: string | undefined;
|
|
63
|
+
identifier: string;
|
|
64
|
+
name?: import("@chevre/factory/lib/multilingualString").IMultilingualString | undefined;
|
|
65
|
+
} & {
|
|
66
|
+
_id: import("mongoose").Types.ObjectId;
|
|
67
|
+
}, never>>>;
|
|
48
68
|
}
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import type { BulkWriteResult } from 'mongodb';
|
|
2
2
|
import type { Connection } from 'mongoose';
|
|
3
|
+
import { IEmailMessage } from './mongoose/schemas/message';
|
|
3
4
|
import * as factory from '../factory';
|
|
4
|
-
type IEmailMessage = factory.creativeWork.message.email.ICreativeWork & {
|
|
5
|
-
datePublished: Date;
|
|
6
|
-
mainEntity: Pick<factory.order.ISimpleOrder, 'orderNumber' | 'typeOf'>;
|
|
7
|
-
project: {
|
|
8
|
-
id: string;
|
|
9
|
-
typeOf: factory.organizationType.Project;
|
|
10
|
-
};
|
|
11
|
-
provider: {
|
|
12
|
-
/**
|
|
13
|
-
* 販売者ID
|
|
14
|
-
*/
|
|
15
|
-
id: string;
|
|
16
|
-
typeOf: factory.organizationType.Corporation;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
5
|
type IFindByIdentifierResult = Pick<IEmailMessage, 'about' | 'identifier' | 'name' | 'sender' | 'text' | 'toRecipient' | 'typeOf'>;
|
|
20
6
|
interface ISearchConditions {
|
|
21
7
|
limit?: number;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { IndexDefinition, IndexOptions, Schema } from 'mongoose';
|
|
1
|
+
import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
|
|
2
|
+
import * as factory from '../../../factory';
|
|
3
|
+
type IDocType = factory.account.IAccount;
|
|
4
|
+
type IModel = Model<IDocType>;
|
|
5
|
+
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
6
|
+
type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>;
|
|
2
7
|
declare const modelName = "Account";
|
|
3
|
-
declare function createSchema():
|
|
8
|
+
declare function createSchema(): ISchema;
|
|
4
9
|
declare const indexes: [d: IndexDefinition, o: IndexOptions][];
|
|
5
|
-
export {
|
|
10
|
+
export { createSchema, IModel, indexes, modelName };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.modelName = exports.indexes = exports.createSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const writeConcern_1 = require("../writeConcern");
|
|
6
6
|
const settings_1 = require("../../../settings");
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { IndexDefinition, IndexOptions, Schema } from 'mongoose';
|
|
1
|
+
import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
|
|
2
|
+
import * as factory from '../../../factory';
|
|
3
|
+
type IDocType = factory.accountTitle.IAccountTitle;
|
|
4
|
+
type IModel = Model<IDocType>;
|
|
5
|
+
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
6
|
+
type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>;
|
|
2
7
|
declare const modelName = "AccountTitle";
|
|
3
|
-
declare function createSchema():
|
|
8
|
+
declare function createSchema(): ISchema;
|
|
4
9
|
declare const indexes: [d: IndexDefinition, o: IndexOptions][];
|
|
5
|
-
export {
|
|
10
|
+
export { createSchema, IModel, indexes, modelName };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.modelName = exports.indexes = exports.createSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const writeConcern_1 = require("../writeConcern");
|
|
6
6
|
const settings_1 = require("../../../settings");
|
|
@@ -13,7 +13,7 @@ const schemaDefinition = {
|
|
|
13
13
|
required: true
|
|
14
14
|
},
|
|
15
15
|
codeValue: String,
|
|
16
|
-
alternateName: String,
|
|
16
|
+
// alternateName: String,
|
|
17
17
|
name: String,
|
|
18
18
|
description: String,
|
|
19
19
|
inCodeSet: mongoose_1.SchemaTypes.Mixed,
|