@chevre/domain 22.2.0-alpha.8 → 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 +4 -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
|
@@ -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 = Omit<factory.task.ITask<factory.taskName>, 'id'>;
|
|
4
|
+
type IModel = Model<IDocType>;
|
|
5
|
+
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
6
|
+
type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>;
|
|
2
7
|
declare const modelName = "Task";
|
|
3
8
|
declare const indexes: [d: IndexDefinition, o: IndexOptions][];
|
|
4
|
-
declare function createSchema():
|
|
5
|
-
export {
|
|
9
|
+
declare function createSchema(): ISchema;
|
|
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,9 @@
|
|
|
1
|
-
import { IndexDefinition, IndexOptions, Schema } from 'mongoose';
|
|
1
|
+
import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
|
|
2
|
+
type IDocType = any;
|
|
3
|
+
type IModel = Model<IDocType>;
|
|
4
|
+
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
5
|
+
type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>;
|
|
2
6
|
declare const modelName = "Telemetry";
|
|
3
|
-
declare function createSchema():
|
|
7
|
+
declare function createSchema(): ISchema;
|
|
4
8
|
declare const indexes: [d: IndexDefinition, o: IndexOptions][];
|
|
5
|
-
export {
|
|
9
|
+
export { createSchema, IModel, indexes, modelName };
|
|
@@ -1,8 +1,9 @@
|
|
|
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
|
+
// import * as factory from '../../../factory';
|
|
6
7
|
const settings_1 = require("../../../settings");
|
|
7
8
|
const modelName = 'Telemetry';
|
|
8
9
|
exports.modelName = modelName;
|
|
@@ -1,5 +1,28 @@
|
|
|
1
|
-
import { IndexDefinition, IndexOptions, Schema } from 'mongoose';
|
|
1
|
+
import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
|
|
2
|
+
import * as factory from '../../../factory';
|
|
3
|
+
export interface ITicketIssuedBy {
|
|
4
|
+
id: string;
|
|
5
|
+
typeOf: factory.organizationType.Corporation | factory.organizationType.Project;
|
|
6
|
+
}
|
|
7
|
+
export interface ITicket {
|
|
8
|
+
/**
|
|
9
|
+
* チケットID(jti)
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
project: {
|
|
13
|
+
id: string;
|
|
14
|
+
typeOf: factory.organizationType.Project;
|
|
15
|
+
};
|
|
16
|
+
typeOf: 'Ticket';
|
|
17
|
+
ticketToken: string;
|
|
18
|
+
dateIssued: Date;
|
|
19
|
+
issuedBy: ITicketIssuedBy;
|
|
20
|
+
}
|
|
21
|
+
type IDocType = Omit<ITicket, 'id'>;
|
|
22
|
+
type IModel = Model<IDocType>;
|
|
23
|
+
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
24
|
+
type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>;
|
|
2
25
|
declare const modelName = "Ticket";
|
|
3
26
|
declare const indexes: [d: IndexDefinition, o: IndexOptions][];
|
|
4
|
-
declare function createSchema():
|
|
5
|
-
export {
|
|
27
|
+
declare function createSchema(): ISchema;
|
|
28
|
+
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.transaction.ITransaction<factory.transactionType>;
|
|
4
|
+
type IModel = Model<IDocType>;
|
|
5
|
+
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
6
|
+
type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>;
|
|
2
7
|
declare const modelName = "Transaction";
|
|
3
8
|
declare const indexes: [d: IndexDefinition, o: IndexOptions][];
|
|
4
|
-
declare function createSchema():
|
|
5
|
-
export {
|
|
9
|
+
declare function createSchema(): ISchema;
|
|
10
|
+
export { createSchema, IModel, indexes, modelName };
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
-
const factory = require("../../../factory");
|
|
6
5
|
const writeConcern_1 = require("../writeConcern");
|
|
6
|
+
const factory = require("../../../factory");
|
|
7
7
|
const settings_1 = require("../../../settings");
|
|
8
8
|
const modelName = 'Transaction';
|
|
9
9
|
exports.modelName = modelName;
|
|
@@ -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 = Omit<factory.trip.ITrip<factory.tripType>, 'id'>;
|
|
4
|
+
type IModel = Model<IDocType>;
|
|
5
|
+
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
6
|
+
type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>;
|
|
2
7
|
declare const modelName = "Trip";
|
|
3
|
-
declare function createSchema(): Schema;
|
|
4
8
|
declare const indexes: [d: IndexDefinition, o: IndexOptions][];
|
|
5
|
-
|
|
9
|
+
declare function createSchema(): ISchema;
|
|
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");
|
|
@@ -39,6 +39,8 @@ const schemaOptions = {
|
|
|
39
39
|
versionKey: false
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
+
const indexes = [];
|
|
43
|
+
exports.indexes = indexes;
|
|
42
44
|
/**
|
|
43
45
|
* トリップスキーマ
|
|
44
46
|
*/
|
|
@@ -50,5 +52,3 @@ function createSchema() {
|
|
|
50
52
|
return schema;
|
|
51
53
|
}
|
|
52
54
|
exports.createSchema = createSchema;
|
|
53
|
-
const indexes = [];
|
|
54
|
-
exports.indexes = indexes;
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import type { BulkWriteResult } from 'mongodb';
|
|
26
|
-
import { AnyExpression, Connection, PipelineStage } from 'mongoose';
|
|
26
|
+
import { AnyExpression, Connection, Document, PipelineStage } from 'mongoose';
|
|
27
27
|
import * as factory from '../factory';
|
|
28
|
+
import { IDocType as IAggregateOfferDocType } from './mongoose/schemas/aggregateOffer';
|
|
28
29
|
type IMatchStage = PipelineStage.Match;
|
|
29
30
|
type KeyOfUnitPriceOffer = keyof Omit<factory.unitPriceOffer.IUnitPriceOffer, 'id'>;
|
|
30
31
|
type IProjection = {
|
|
@@ -216,7 +217,11 @@ export declare class OfferRepo {
|
|
|
216
217
|
};
|
|
217
218
|
};
|
|
218
219
|
}): Promise<import("mongodb").UpdateResult | undefined>;
|
|
219
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<
|
|
220
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<Document<unknown, {}, IAggregateOfferDocType> & Omit<IAggregateOfferDocType & Required<{
|
|
221
|
+
_id: string;
|
|
222
|
+
}>, never>, import("mongoose").QueryOptions<Document<unknown, {}, IAggregateOfferDocType> & Omit<IAggregateOfferDocType & Required<{
|
|
223
|
+
_id: string;
|
|
224
|
+
}>, never>>>;
|
|
220
225
|
addAvailableAtOrFrom(params: {
|
|
221
226
|
id: string;
|
|
222
227
|
identifier: string;
|
|
@@ -225,7 +230,9 @@ export declare class OfferRepo {
|
|
|
225
230
|
id: string;
|
|
226
231
|
};
|
|
227
232
|
};
|
|
228
|
-
}): Promise<
|
|
233
|
+
}): Promise<(Document<unknown, {}, IAggregateOfferDocType> & Omit<IAggregateOfferDocType & Required<{
|
|
234
|
+
_id: string;
|
|
235
|
+
}>, never>) | null>;
|
|
229
236
|
deleteAvailableAtOrFrom(params: {
|
|
230
237
|
id: string;
|
|
231
238
|
offers: {
|
|
@@ -233,7 +240,9 @@ export declare class OfferRepo {
|
|
|
233
240
|
id: string;
|
|
234
241
|
};
|
|
235
242
|
};
|
|
236
|
-
}): Promise<
|
|
243
|
+
}): Promise<(Document<unknown, {}, IAggregateOfferDocType> & Omit<IAggregateOfferDocType & Required<{
|
|
244
|
+
_id: string;
|
|
245
|
+
}>, never>) | null>;
|
|
237
246
|
/**
|
|
238
247
|
* サブカタログから集計オファーIDリストを検索する
|
|
239
248
|
*/
|
|
@@ -23,8 +23,9 @@
|
|
|
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 } from 'mongoose';
|
|
26
|
+
import type { Connection, Document } from 'mongoose';
|
|
27
27
|
import * as factory from '../factory';
|
|
28
|
+
import { IDocType } from './mongoose/schemas/offerCatalog';
|
|
28
29
|
export type IAggregatedOfferCatalog = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered' | 'additionalProperty'> & {
|
|
29
30
|
numberOfItems?: number;
|
|
30
31
|
itemListElementTypeOf: factory.offerType.Offer | 'OfferCatalog';
|
|
@@ -136,5 +137,17 @@ export declare class OfferCatalogRepo {
|
|
|
136
137
|
id: string;
|
|
137
138
|
};
|
|
138
139
|
}): Promise<void>;
|
|
139
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<
|
|
140
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<Document<unknown, {}, IDocType> & Omit<factory.offerCatalog.IOfferCatalog & {
|
|
141
|
+
_id: string;
|
|
142
|
+
alternateName?: any;
|
|
143
|
+
dateSynced?: Date | undefined;
|
|
144
|
+
} & Required<{
|
|
145
|
+
_id: string;
|
|
146
|
+
}>, never>, import("mongoose").QueryOptions<Document<unknown, {}, IDocType> & Omit<factory.offerCatalog.IOfferCatalog & {
|
|
147
|
+
_id: string;
|
|
148
|
+
alternateName?: any;
|
|
149
|
+
dateSynced?: Date | undefined;
|
|
150
|
+
} & Required<{
|
|
151
|
+
_id: string;
|
|
152
|
+
}>, never>>>;
|
|
140
153
|
}
|
|
@@ -160,7 +160,19 @@ export declare class OrderRepo {
|
|
|
160
160
|
}): Promise<(IOrderWithoutAcceptedOffers & {
|
|
161
161
|
id: string;
|
|
162
162
|
})[]>;
|
|
163
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<
|
|
163
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, Omit<factory.order.IOrder, "id"> & {
|
|
164
|
+
acceptedOffers?: factory.order.IAcceptedOffer<factory.order.IItemOffered>[] | undefined;
|
|
165
|
+
}> & Omit<Omit<factory.order.IOrder, "id"> & {
|
|
166
|
+
acceptedOffers?: factory.order.IAcceptedOffer<factory.order.IItemOffered>[] | undefined;
|
|
167
|
+
} & {
|
|
168
|
+
_id: import("mongoose").Types.ObjectId;
|
|
169
|
+
}, never>, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, Omit<factory.order.IOrder, "id"> & {
|
|
170
|
+
acceptedOffers?: factory.order.IAcceptedOffer<factory.order.IItemOffered>[] | undefined;
|
|
171
|
+
}> & Omit<Omit<factory.order.IOrder, "id"> & {
|
|
172
|
+
acceptedOffers?: factory.order.IAcceptedOffer<factory.order.IItemOffered>[] | undefined;
|
|
173
|
+
} & {
|
|
174
|
+
_id: import("mongoose").Types.ObjectId;
|
|
175
|
+
}, never>>>;
|
|
164
176
|
unsetUnnecessaryFields(params: {
|
|
165
177
|
filter: FilterQuery<factory.order.IOrder>;
|
|
166
178
|
$unset: any;
|
|
@@ -46,7 +46,7 @@ export declare class OwnershipInfoRepo {
|
|
|
46
46
|
/**
|
|
47
47
|
* 所有権を検索する
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
projectFields(params: factory.ownershipInfo.ISearchConditions, inclusion?: (keyof IOwnershipInfoWithId)[]): Promise<IOwnershipInfoWithId[]>;
|
|
50
50
|
/**
|
|
51
51
|
* 識別子から所有期限を変更する
|
|
52
52
|
* 存在しない場合undefinedを返す
|
|
@@ -57,7 +57,7 @@ export declare class OwnershipInfoRepo {
|
|
|
57
57
|
};
|
|
58
58
|
identifier: string;
|
|
59
59
|
ownedThrough: Date;
|
|
60
|
-
}): Promise<IOwnershipInfoWithId | undefined>;
|
|
60
|
+
}): Promise<Pick<IOwnershipInfoWithId, 'id' | 'identifier'> | undefined>;
|
|
61
61
|
/**
|
|
62
62
|
* 所有者の所有権を全て削除する
|
|
63
63
|
*/
|
|
@@ -97,7 +97,19 @@ export declare class OwnershipInfoRepo {
|
|
|
97
97
|
$lt: Date;
|
|
98
98
|
};
|
|
99
99
|
}): Promise<void>;
|
|
100
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<
|
|
100
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood> & {
|
|
101
|
+
_id: string;
|
|
102
|
+
}> & Omit<factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood> & {
|
|
103
|
+
_id: string;
|
|
104
|
+
} & Required<{
|
|
105
|
+
_id: string;
|
|
106
|
+
}>, never>, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood> & {
|
|
107
|
+
_id: string;
|
|
108
|
+
}> & Omit<factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood> & {
|
|
109
|
+
_id: string;
|
|
110
|
+
} & Required<{
|
|
111
|
+
_id: string;
|
|
112
|
+
}>, never>>>;
|
|
101
113
|
/**
|
|
102
114
|
* 所有者を追加する
|
|
103
115
|
*/
|
|
@@ -270,7 +270,6 @@ class OwnershipInfoRepo {
|
|
|
270
270
|
throw new factory.errors.NotFound(this.ownershipInfoModel.modelName);
|
|
271
271
|
}
|
|
272
272
|
return { id: doc.id };
|
|
273
|
-
// return <IOwnershipInfo>doc.toObject();
|
|
274
273
|
});
|
|
275
274
|
}
|
|
276
275
|
projectFieldsById(params, inclusion) {
|
|
@@ -300,17 +299,34 @@ class OwnershipInfoRepo {
|
|
|
300
299
|
throw new factory.errors.NotFound(this.ownershipInfoModel.modelName);
|
|
301
300
|
}
|
|
302
301
|
return doc;
|
|
303
|
-
// return doc.toObject();
|
|
304
302
|
});
|
|
305
303
|
}
|
|
306
304
|
/**
|
|
307
305
|
* 所有権を検索する
|
|
308
306
|
*/
|
|
309
|
-
|
|
307
|
+
projectFields(params, inclusion) {
|
|
310
308
|
var _a;
|
|
311
309
|
return __awaiter(this, void 0, void 0, function* () {
|
|
312
310
|
const conditions = OwnershipInfoRepo.CREATE_MONGO_CONDITIONS(params);
|
|
313
|
-
|
|
311
|
+
let projection = {
|
|
312
|
+
_id: 0,
|
|
313
|
+
id: { $toString: '$_id' },
|
|
314
|
+
project: 1,
|
|
315
|
+
typeOf: 1,
|
|
316
|
+
identifier: 1,
|
|
317
|
+
ownedBy: 1,
|
|
318
|
+
acquiredFrom: 1,
|
|
319
|
+
ownedFrom: 1,
|
|
320
|
+
ownedThrough: 1,
|
|
321
|
+
typeOfGood: 1
|
|
322
|
+
};
|
|
323
|
+
const positiveProjectionFields = (Array.isArray(inclusion))
|
|
324
|
+
? inclusion.filter((key) => key !== 'id' && String(key) !== '_id')
|
|
325
|
+
: undefined;
|
|
326
|
+
if (Array.isArray(positiveProjectionFields)) {
|
|
327
|
+
projection = Object.assign({ _id: 0, id: { $toString: '$_id' } }, Object.fromEntries(positiveProjectionFields.map((key) => ([key, 1]))));
|
|
328
|
+
}
|
|
329
|
+
const query = this.ownershipInfoModel.find((conditions.length > 0) ? { $and: conditions } : {}, projection);
|
|
314
330
|
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
315
331
|
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
316
332
|
query.limit(params.limit)
|
|
@@ -322,8 +338,8 @@ class OwnershipInfoRepo {
|
|
|
322
338
|
query.sort({ ownedFrom: params.sort.ownedFrom });
|
|
323
339
|
}
|
|
324
340
|
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
325
|
-
.
|
|
326
|
-
.
|
|
341
|
+
.lean() // lean(2024-08-19~)
|
|
342
|
+
.exec();
|
|
327
343
|
});
|
|
328
344
|
}
|
|
329
345
|
/**
|
|
@@ -335,8 +351,15 @@ class OwnershipInfoRepo {
|
|
|
335
351
|
return this.ownershipInfoModel.findOneAndUpdate({
|
|
336
352
|
'project.id': { $eq: params.project.id },
|
|
337
353
|
identifier: { $eq: String(params.identifier) }
|
|
338
|
-
}, { ownedThrough: params.ownedThrough }, {
|
|
339
|
-
|
|
354
|
+
}, { ownedThrough: params.ownedThrough }, {
|
|
355
|
+
new: true,
|
|
356
|
+
projection: {
|
|
357
|
+
_id: 0,
|
|
358
|
+
id: { $toString: '$_id' },
|
|
359
|
+
identifier: 1
|
|
360
|
+
}
|
|
361
|
+
})
|
|
362
|
+
.lean()
|
|
340
363
|
.exec()
|
|
341
364
|
.then((doc) => {
|
|
342
365
|
// 存在しない場合も正常にハンドルする
|
|
@@ -344,7 +367,7 @@ class OwnershipInfoRepo {
|
|
|
344
367
|
return;
|
|
345
368
|
}
|
|
346
369
|
else {
|
|
347
|
-
return doc
|
|
370
|
+
return doc;
|
|
348
371
|
}
|
|
349
372
|
});
|
|
350
373
|
});
|
|
@@ -431,7 +454,10 @@ class OwnershipInfoRepo {
|
|
|
431
454
|
};
|
|
432
455
|
}
|
|
433
456
|
if (newOwner !== undefined) {
|
|
434
|
-
const doc = yield this.ownershipInfoModel.findOneAndUpdate({ _id: { $eq: params.id } }, { $addToSet: { ownedBy: newOwner } }, {
|
|
457
|
+
const doc = yield this.ownershipInfoModel.findOneAndUpdate({ _id: { $eq: params.id } }, { $addToSet: { ownedBy: newOwner } }, {
|
|
458
|
+
new: true,
|
|
459
|
+
projection: { _id: 1 }
|
|
460
|
+
})
|
|
435
461
|
.exec();
|
|
436
462
|
if (doc === null) {
|
|
437
463
|
throw new factory.errors.NotFound(this.ownershipInfoModel.modelName);
|
|
@@ -447,7 +473,10 @@ class OwnershipInfoRepo {
|
|
|
447
473
|
if (typeof params.ownedBy.id !== 'string' || params.ownedBy.id.length === 0) {
|
|
448
474
|
throw new factory.errors.ArgumentNull('ownedBy.id');
|
|
449
475
|
}
|
|
450
|
-
const doc = yield this.ownershipInfoModel.findOneAndUpdate({ _id: { $eq: params.id } }, { $pull: { ownedBy: { id: params.ownedBy.id } } }, {
|
|
476
|
+
const doc = yield this.ownershipInfoModel.findOneAndUpdate({ _id: { $eq: params.id } }, { $pull: { ownedBy: { id: params.ownedBy.id } } }, {
|
|
477
|
+
new: true,
|
|
478
|
+
projection: { _id: 1 }
|
|
479
|
+
})
|
|
451
480
|
.exec();
|
|
452
481
|
if (doc === null) {
|
|
453
482
|
throw new factory.errors.NotFound(this.ownershipInfoModel.modelName);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Connection, FilterQuery } from 'mongoose';
|
|
2
2
|
import * as factory from '../factory';
|
|
3
3
|
type IUnsetKey = keyof Pick<factory.service.paymentService.IService, 'additionalProperty' | 'availableChannel' | 'serviceOutput' | 'serviceType'>;
|
|
4
|
-
type IKeyOfProjection4paymentService = keyof factory.service.paymentService.IService
|
|
4
|
+
type IKeyOfProjection4paymentService = keyof factory.service.paymentService.IService;
|
|
5
5
|
/**
|
|
6
6
|
* 決済サービス検索条件
|
|
7
7
|
*/
|
|
@@ -37,7 +37,7 @@ export declare class PaymentServiceRepo {
|
|
|
37
37
|
/**
|
|
38
38
|
* 決済サービスを検索する
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
projectFields(conditions: ISearchConditions4paymentService, inclusion: IKeyOfProjection4paymentService[], exclusion: IKeyOfProjection4paymentService[]): Promise<(factory.service.paymentService.IService & {
|
|
41
41
|
id: string;
|
|
42
42
|
})[]>;
|
|
43
43
|
deletePaymentServiceById(params: {
|