@chevre/domain 24.0.0-alpha.27 → 24.0.0-alpha.29
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/errorHandler.js +1 -1
- package/lib/chevre/repo/accountTitle.d.ts +7 -3
- package/lib/chevre/repo/accountTransaction.js +1 -2
- package/lib/chevre/repo/action/acceptCOAOffer.js +0 -2
- package/lib/chevre/repo/action/actionProcess.d.ts +1 -1
- package/lib/chevre/repo/action/actionProcess.js +3 -3
- package/lib/chevre/repo/action.d.ts +8 -7
- package/lib/chevre/repo/action.js +0 -2
- package/lib/chevre/repo/aggregateAction.js +0 -1
- package/lib/chevre/repo/aggregateOffer.d.ts +7 -3
- package/lib/chevre/repo/assetTransaction.d.ts +46 -25
- package/lib/chevre/repo/categoryCode.d.ts +8 -3
- package/lib/chevre/repo/comment.d.ts +7 -3
- package/lib/chevre/repo/creativeWork.d.ts +8 -7
- package/lib/chevre/repo/customer.d.ts +8 -3
- package/lib/chevre/repo/event.d.ts +11 -23
- package/lib/chevre/repo/event.js +22 -23
- package/lib/chevre/repo/eventSeries.d.ts +10 -4
- package/lib/chevre/repo/identity.d.ts +12 -3
- package/lib/chevre/repo/identityProvider.d.ts +7 -18
- package/lib/chevre/repo/issuer.d.ts +8 -8
- package/lib/chevre/repo/member.d.ts +7 -3
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +7 -3
- package/lib/chevre/repo/message.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/account.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/actionRecipe.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/advanceBookingRequirement.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/aggregateOrder.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/aggregateReservation.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/civicStructure.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/comments.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/customer.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/customerType.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/eventOffer.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/eventSeries.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/identity.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/identityProvider.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/member/global.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/member.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/message.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/movieTicketTypes.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/note.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/paymentService.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/pendingReservation.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/pendingReservationAggregate.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/potentialAction.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +6 -3
- package/lib/chevre/repo/mongoose/schemas/product.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/productOffer.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/reserveInterface.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/role.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/schedule.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/seller.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/sellerReturnPolicy.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/service/availableHour.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +5 -4
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/telemetry.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/ticket.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +8 -4
- package/lib/chevre/repo/mongoose/schemas/transactionNumber.d.ts +3 -2
- package/lib/chevre/repo/mongoose/schemas/trip.d.ts +4 -3
- package/lib/chevre/repo/mongoose/schemas/webSite.d.ts +4 -3
- package/lib/chevre/repo/mongoose/virtuals.d.ts +3 -0
- package/lib/chevre/repo/mongoose/virtuals.js +2 -0
- package/lib/chevre/repo/movieTicketType.d.ts +2 -1
- package/lib/chevre/repo/offerCatalog.d.ts +8 -4
- package/lib/chevre/repo/order.d.ts +8 -7
- package/lib/chevre/repo/ownershipInfo.d.ts +8 -7
- package/lib/chevre/repo/paymentService.d.ts +0 -13
- package/lib/chevre/repo/paymentService.js +5 -5
- package/lib/chevre/repo/pendingReservation.js +0 -1
- package/lib/chevre/repo/place/movieTheater.d.ts +7 -3
- package/lib/chevre/repo/place/screeningRoom.d.ts +7 -3
- package/lib/chevre/repo/potentialAction.d.ts +7 -26
- package/lib/chevre/repo/priceSpecification.d.ts +51 -24
- package/lib/chevre/repo/priceSpecification.js +9 -13
- package/lib/chevre/repo/product.d.ts +8 -4
- package/lib/chevre/repo/project.d.ts +8 -11
- package/lib/chevre/repo/reservation.d.ts +14 -13
- package/lib/chevre/repo/reserveInterface.js +4 -4
- package/lib/chevre/repo/role.d.ts +39 -3
- package/lib/chevre/repo/schedule.js +1 -1
- package/lib/chevre/repo/seller.d.ts +7 -50
- package/lib/chevre/repo/task.d.ts +7 -67
- package/lib/chevre/repo/transaction.d.ts +104 -13
- package/package.json +3 -3
|
@@ -84,7 +84,7 @@ async function handleMongoError(error) {
|
|
|
84
84
|
// handle CastError(2025-10-27~)
|
|
85
85
|
// CastError: Cast to ObjectId failed for value "xxx" (type string) at path "_id" for model "xxxxxxxxxxxxx"
|
|
86
86
|
if (handledError instanceof mongooseError.CastError) {
|
|
87
|
-
handledError = new factory_1.errors.Argument(`${handledError.
|
|
87
|
+
handledError = new factory_1.errors.Argument(`${handledError.path}`, (handledError.reason instanceof Error) ? handledError.reason.message : handledError.message);
|
|
88
88
|
}
|
|
89
89
|
return handledError;
|
|
90
90
|
}
|
|
@@ -12,11 +12,15 @@ export declare class AccountTitleRepo {
|
|
|
12
12
|
id: string;
|
|
13
13
|
};
|
|
14
14
|
}): Promise<void>;
|
|
15
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, factory.accountTitle.IAccountTitle> & factory.accountTitle.IAccountTitle & {
|
|
15
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, factory.accountTitle.IAccountTitle, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.accountTitle.IAccountTitle & {
|
|
16
16
|
_id: import("mongoose").Types.ObjectId;
|
|
17
|
-
}
|
|
17
|
+
} & {
|
|
18
|
+
__v: number;
|
|
19
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<factory.accountTitle.IAccountTitle>, (import("mongoose").Document<unknown, {}, factory.accountTitle.IAccountTitle, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.accountTitle.IAccountTitle & {
|
|
18
20
|
_id: import("mongoose").Types.ObjectId;
|
|
19
|
-
}
|
|
21
|
+
} & {
|
|
22
|
+
__v: number;
|
|
23
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
|
|
20
24
|
unsetUnnecessaryFields(params: {
|
|
21
25
|
filter: any;
|
|
22
26
|
$unset: any;
|
|
@@ -267,8 +267,7 @@ class AccountTransactionRepo {
|
|
|
267
267
|
*/
|
|
268
268
|
async search(params) {
|
|
269
269
|
const conditions = AccountTransactionRepo.CREATE_MONGO_CONDITIONS(params);
|
|
270
|
-
const query = this.transactionModel.find((conditions.length > 0) ? { $and: conditions } : {}
|
|
271
|
-
.select({
|
|
270
|
+
const query = this.transactionModel.find((conditions.length > 0) ? { $and: conditions } : {}, {
|
|
272
271
|
__v: 0,
|
|
273
272
|
createdAt: 0,
|
|
274
273
|
updatedAt: 0
|
|
@@ -25,8 +25,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.AcceptCOAOfferActionRepo = void 0;
|
|
27
27
|
const factory = __importStar(require("../../factory"));
|
|
28
|
-
// import { MONGO_MAX_TIME_MS } from '../settings';
|
|
29
|
-
// import { createSchema, IModel as IActionModel, modelName } from './mongoose/schemas/action';
|
|
30
28
|
// import { createSchema as createRecipeSchema, IModel as IActionRecipeModel, modelName as recipeModelName } from './mongoose/schemas/actionRecipe';
|
|
31
29
|
const actionProcess_1 = require("./actionProcess");
|
|
32
30
|
/**
|
|
@@ -141,5 +141,5 @@ export declare class ActionProcessRepo<TAction extends IAction<factory.actionTyp
|
|
|
141
141
|
};
|
|
142
142
|
sort?: factory.action.ISortOrder;
|
|
143
143
|
}): Promise<TAction[]>;
|
|
144
|
-
protected upsertRecipe(savingRecipe: Pick<IRecipeAsDocument, 'project' | 'recipeCategory' | 'recipeFor' | 'step' | 'typeOf'>): Promise<
|
|
144
|
+
protected upsertRecipe(savingRecipe: Pick<IRecipeAsDocument, 'project' | 'recipeCategory' | 'recipeFor' | 'step' | 'typeOf'>): Promise<void>;
|
|
145
145
|
}
|
|
@@ -778,9 +778,9 @@ class ActionProcessRepo {
|
|
|
778
778
|
$setOnInsert: setOnInsert,
|
|
779
779
|
$set: setKeys
|
|
780
780
|
};
|
|
781
|
-
|
|
782
|
-
upsert: true
|
|
783
|
-
includeResultMetadata: true
|
|
781
|
+
await this.actionRecipeModel.updateOne(filter, update, {
|
|
782
|
+
upsert: true
|
|
783
|
+
// includeResultMetadata: true
|
|
784
784
|
})
|
|
785
785
|
.exec();
|
|
786
786
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FilterQuery, UpdateQuery } from 'mongoose';
|
|
2
2
|
import * as factory from '../factory';
|
|
3
|
+
import type { IDocType } from './mongoose/schemas/action';
|
|
3
4
|
import { IAction, IKeyOfProjection, ActionProcessRepo, ICancelActionAction, IActionRecipe } from './action/actionProcess';
|
|
4
5
|
export type IAction4transaction<T extends factory.actionType.AcceptAction | factory.actionType.AuthorizeAction> = T extends factory.actionType.AcceptAction ? factory.action.accept.coaOffer.IAction | factory.action.accept.pay.IAction : T extends factory.actionType.AuthorizeAction ? (factory.action.authorize.offer.eventService.IAction | factory.action.authorize.offer.moneyTransfer.IAction | factory.action.authorize.offer.product.IAction | factory.action.authorize.paymentMethod.any.IAction) : never;
|
|
5
6
|
export { ICancelActionAction };
|
|
@@ -101,19 +102,19 @@ export declare class ActionRepo extends ActionProcessRepo<IAction<StartableActio
|
|
|
101
102
|
}): Promise<{
|
|
102
103
|
deletedCount?: number;
|
|
103
104
|
} | null>;
|
|
104
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, Omit<import("@chevre/factory/lib/action").IAction<import("@chevre/factory/lib/action").IAttributes<factory.actionType, any, any>>, "id"> & {
|
|
105
|
-
identifier?: string;
|
|
106
|
-
}> & Omit<import("@chevre/factory/lib/action").IAction<import("@chevre/factory/lib/action").IAttributes<factory.actionType, any, any>>, "id"> & {
|
|
105
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<Omit<import("@chevre/factory/lib/action").IAction<import("@chevre/factory/lib/action").IAttributes<factory.actionType, any, any>>, "id"> & {
|
|
107
106
|
identifier?: string;
|
|
108
107
|
} & {
|
|
109
108
|
_id: import("mongoose").Types.ObjectId;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
}> & Omit<import("@chevre/factory/lib/action").IAction<import("@chevre/factory/lib/action").IAttributes<factory.actionType, any, any>>, "id"> & {
|
|
109
|
+
} & {
|
|
110
|
+
__v: number;
|
|
111
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<Omit<import("@chevre/factory/lib/action").IAction<import("@chevre/factory/lib/action").IAttributes<factory.actionType, any, any>>, "id"> & {
|
|
113
112
|
identifier?: string;
|
|
114
113
|
} & {
|
|
115
114
|
_id: import("mongoose").Types.ObjectId;
|
|
116
|
-
}
|
|
115
|
+
} & {
|
|
116
|
+
__v: number;
|
|
117
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
|
|
117
118
|
unsetUnnecessaryFields(params: {
|
|
118
119
|
filter: FilterQuery<factory.action.IAction<factory.action.IAttributes<factory.actionType, any, any>>>;
|
|
119
120
|
$unset: any;
|
|
@@ -29,8 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.ActionRepo = void 0;
|
|
30
30
|
const moment_1 = __importDefault(require("moment"));
|
|
31
31
|
const factory = __importStar(require("../factory"));
|
|
32
|
-
// import { MONGO_MAX_TIME_MS } from '../settings';
|
|
33
|
-
// import { createSchema, IModel as IActionModel, modelName } from './mongoose/schemas/action';
|
|
34
32
|
// import { createSchema as createRecipeSchema, IModel as IActionRecipeModel, modelName as recipeModelName } from './mongoose/schemas/actionRecipe';
|
|
35
33
|
const actionProcess_1 = require("./action/actionProcess");
|
|
36
34
|
/**
|
|
@@ -35,7 +35,6 @@ class AggregateActionRepo {
|
|
|
35
35
|
// private readonly actionRecipeModel: IActionRecipeModel;
|
|
36
36
|
constructor(connection) {
|
|
37
37
|
this.actionModel = connection.model(action_1.modelName, (0, action_1.createSchema)());
|
|
38
|
-
// this.actionRecipeModel = connection.model(recipeModelName, createRecipeSchema());
|
|
39
38
|
}
|
|
40
39
|
/**
|
|
41
40
|
* イベントと入場ゲート指定で予約使用アクションを集計する
|
|
@@ -59,11 +59,15 @@ export declare class AggregateOfferRepo {
|
|
|
59
59
|
};
|
|
60
60
|
id: string;
|
|
61
61
|
}): Promise<void>;
|
|
62
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<Document<unknown, {}, IAggregateOfferDocType> & IAggregateOfferDocType & Required<{
|
|
62
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<Document<unknown, {}, IAggregateOfferDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<IAggregateOfferDocType & Required<{
|
|
63
63
|
_id: string;
|
|
64
|
-
}
|
|
64
|
+
}> & {
|
|
65
|
+
__v: number;
|
|
66
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IAggregateOfferDocType>, (Document<unknown, {}, IAggregateOfferDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<IAggregateOfferDocType & Required<{
|
|
65
67
|
_id: string;
|
|
66
|
-
}
|
|
68
|
+
}> & {
|
|
69
|
+
__v: number;
|
|
70
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
|
|
67
71
|
unsetUnnecessaryFields(params: {
|
|
68
72
|
filter: FilterQuery<factory.aggregateOffer.IAggregateOffer>;
|
|
69
73
|
$unset: any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Connection, FilterQuery } from 'mongoose';
|
|
2
|
+
import { IDocType } from './mongoose/schemas/assetTransaction';
|
|
2
3
|
import * as factory from '../factory';
|
|
3
4
|
interface IAggregationByStatus {
|
|
4
5
|
transactionCount: number;
|
|
@@ -224,49 +225,49 @@ export declare class AssetTransactionRepo {
|
|
|
224
225
|
seller?: any;
|
|
225
226
|
} & {
|
|
226
227
|
_id: import("mongoose").Types.ObjectId;
|
|
227
|
-
} &
|
|
228
|
-
|
|
229
|
-
}
|
|
228
|
+
} & {
|
|
229
|
+
__v: number;
|
|
230
|
+
}) | (import("@chevre/factory/lib/assetTransaction/moneyTransfer").IAttributes & {
|
|
230
231
|
id: string;
|
|
231
232
|
} & {
|
|
232
233
|
seller?: any;
|
|
233
234
|
} & {
|
|
234
235
|
_id: import("mongoose").Types.ObjectId;
|
|
235
|
-
} &
|
|
236
|
-
|
|
237
|
-
}
|
|
236
|
+
} & {
|
|
237
|
+
__v: number;
|
|
238
|
+
}) | (import("@chevre/factory/lib/assetTransaction/pay").IAttributes & {
|
|
238
239
|
id: string;
|
|
239
240
|
} & {
|
|
240
241
|
seller?: any;
|
|
241
242
|
} & {
|
|
242
243
|
_id: import("mongoose").Types.ObjectId;
|
|
243
|
-
} &
|
|
244
|
-
|
|
245
|
-
}
|
|
244
|
+
} & {
|
|
245
|
+
__v: number;
|
|
246
|
+
}) | (import("@chevre/factory/lib/assetTransaction/refund").IAttributes & {
|
|
246
247
|
id: string;
|
|
247
248
|
} & {
|
|
248
249
|
seller?: any;
|
|
249
250
|
} & {
|
|
250
251
|
_id: import("mongoose").Types.ObjectId;
|
|
251
|
-
} &
|
|
252
|
-
|
|
253
|
-
}
|
|
252
|
+
} & {
|
|
253
|
+
__v: number;
|
|
254
|
+
}) | (import("@chevre/factory/lib/assetTransaction/registerService").IAttributes & {
|
|
254
255
|
id: string;
|
|
255
256
|
} & {
|
|
256
257
|
seller?: any;
|
|
257
258
|
} & {
|
|
258
259
|
_id: import("mongoose").Types.ObjectId;
|
|
259
|
-
} &
|
|
260
|
-
|
|
261
|
-
}
|
|
260
|
+
} & {
|
|
261
|
+
__v: number;
|
|
262
|
+
}) | (import("@chevre/factory/lib/assetTransaction/reserve").IAttributes & {
|
|
262
263
|
id: string;
|
|
263
264
|
} & {
|
|
264
265
|
seller?: any;
|
|
265
266
|
} & {
|
|
266
267
|
_id: import("mongoose").Types.ObjectId;
|
|
267
|
-
} &
|
|
268
|
-
|
|
269
|
-
}
|
|
268
|
+
} & {
|
|
269
|
+
__v: number;
|
|
270
|
+
})>;
|
|
270
271
|
/**
|
|
271
272
|
* 互換性維持対応専用
|
|
272
273
|
*/
|
|
@@ -284,83 +285,103 @@ export declare class AssetTransactionRepo {
|
|
|
284
285
|
findByIdAndDelete(params: {
|
|
285
286
|
id: string;
|
|
286
287
|
}): Promise<void>;
|
|
287
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {},
|
|
288
|
-
seller?: any;
|
|
289
|
-
}> & ((import("@chevre/factory/lib/assetTransaction/cancelReservation").IAttributes & {
|
|
288
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<(import("@chevre/factory/lib/assetTransaction/cancelReservation").IAttributes & {
|
|
290
289
|
id: string;
|
|
291
290
|
} & {
|
|
292
291
|
seller?: any;
|
|
293
292
|
} & {
|
|
294
293
|
_id: import("mongoose").Types.ObjectId;
|
|
294
|
+
} & {
|
|
295
|
+
__v: number;
|
|
295
296
|
}) | (import("@chevre/factory/lib/assetTransaction/moneyTransfer").IAttributes & {
|
|
296
297
|
id: string;
|
|
297
298
|
} & {
|
|
298
299
|
seller?: any;
|
|
299
300
|
} & {
|
|
300
301
|
_id: import("mongoose").Types.ObjectId;
|
|
302
|
+
} & {
|
|
303
|
+
__v: number;
|
|
301
304
|
}) | (import("@chevre/factory/lib/assetTransaction/pay").IAttributes & {
|
|
302
305
|
id: string;
|
|
303
306
|
} & {
|
|
304
307
|
seller?: any;
|
|
305
308
|
} & {
|
|
306
309
|
_id: import("mongoose").Types.ObjectId;
|
|
310
|
+
} & {
|
|
311
|
+
__v: number;
|
|
307
312
|
}) | (import("@chevre/factory/lib/assetTransaction/refund").IAttributes & {
|
|
308
313
|
id: string;
|
|
309
314
|
} & {
|
|
310
315
|
seller?: any;
|
|
311
316
|
} & {
|
|
312
317
|
_id: import("mongoose").Types.ObjectId;
|
|
318
|
+
} & {
|
|
319
|
+
__v: number;
|
|
313
320
|
}) | (import("@chevre/factory/lib/assetTransaction/registerService").IAttributes & {
|
|
314
321
|
id: string;
|
|
315
322
|
} & {
|
|
316
323
|
seller?: any;
|
|
317
324
|
} & {
|
|
318
325
|
_id: import("mongoose").Types.ObjectId;
|
|
326
|
+
} & {
|
|
327
|
+
__v: number;
|
|
319
328
|
}) | (import("@chevre/factory/lib/assetTransaction/reserve").IAttributes & {
|
|
320
329
|
id: string;
|
|
321
330
|
} & {
|
|
322
331
|
seller?: any;
|
|
323
332
|
} & {
|
|
324
333
|
_id: import("mongoose").Types.ObjectId;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
}> & ((import("@chevre/factory/lib/assetTransaction/cancelReservation").IAttributes & {
|
|
334
|
+
} & {
|
|
335
|
+
__v: number;
|
|
336
|
+
}), "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<(import("@chevre/factory/lib/assetTransaction/cancelReservation").IAttributes & {
|
|
328
337
|
id: string;
|
|
329
338
|
} & {
|
|
330
339
|
seller?: any;
|
|
331
340
|
} & {
|
|
332
341
|
_id: import("mongoose").Types.ObjectId;
|
|
342
|
+
} & {
|
|
343
|
+
__v: number;
|
|
333
344
|
}) | (import("@chevre/factory/lib/assetTransaction/moneyTransfer").IAttributes & {
|
|
334
345
|
id: string;
|
|
335
346
|
} & {
|
|
336
347
|
seller?: any;
|
|
337
348
|
} & {
|
|
338
349
|
_id: import("mongoose").Types.ObjectId;
|
|
350
|
+
} & {
|
|
351
|
+
__v: number;
|
|
339
352
|
}) | (import("@chevre/factory/lib/assetTransaction/pay").IAttributes & {
|
|
340
353
|
id: string;
|
|
341
354
|
} & {
|
|
342
355
|
seller?: any;
|
|
343
356
|
} & {
|
|
344
357
|
_id: import("mongoose").Types.ObjectId;
|
|
358
|
+
} & {
|
|
359
|
+
__v: number;
|
|
345
360
|
}) | (import("@chevre/factory/lib/assetTransaction/refund").IAttributes & {
|
|
346
361
|
id: string;
|
|
347
362
|
} & {
|
|
348
363
|
seller?: any;
|
|
349
364
|
} & {
|
|
350
365
|
_id: import("mongoose").Types.ObjectId;
|
|
366
|
+
} & {
|
|
367
|
+
__v: number;
|
|
351
368
|
}) | (import("@chevre/factory/lib/assetTransaction/registerService").IAttributes & {
|
|
352
369
|
id: string;
|
|
353
370
|
} & {
|
|
354
371
|
seller?: any;
|
|
355
372
|
} & {
|
|
356
373
|
_id: import("mongoose").Types.ObjectId;
|
|
374
|
+
} & {
|
|
375
|
+
__v: number;
|
|
357
376
|
}) | (import("@chevre/factory/lib/assetTransaction/reserve").IAttributes & {
|
|
358
377
|
id: string;
|
|
359
378
|
} & {
|
|
360
379
|
seller?: any;
|
|
361
380
|
} & {
|
|
362
381
|
_id: import("mongoose").Types.ObjectId;
|
|
363
|
-
}
|
|
382
|
+
} & {
|
|
383
|
+
__v: number;
|
|
384
|
+
}), "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
|
|
364
385
|
unsetUnnecessaryFields(params: {
|
|
365
386
|
filter: any;
|
|
366
387
|
$unset: any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AnyExpression, Connection, FilterQuery, Types } from 'mongoose';
|
|
2
|
+
import { IDocType } from './mongoose/schemas/categoryCode';
|
|
2
3
|
import * as factory from '../factory';
|
|
3
4
|
type IUnset = {
|
|
4
5
|
[key in keyof Pick<factory.categoryCode.ICategoryCode, 'additionalProperty' | 'color' | 'image'>]?: 1;
|
|
@@ -66,11 +67,15 @@ export declare class CategoryCodeRepo {
|
|
|
66
67
|
id: string;
|
|
67
68
|
};
|
|
68
69
|
}): Promise<void>;
|
|
69
|
-
getCursor(conditions: FilterQuery<factory.categoryCode.ICategoryCode>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {},
|
|
70
|
+
getCursor(conditions: FilterQuery<factory.categoryCode.ICategoryCode>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<IDocType & {
|
|
70
71
|
_id: Types.ObjectId;
|
|
71
|
-
}
|
|
72
|
+
} & {
|
|
73
|
+
__v: number;
|
|
74
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<IDocType & {
|
|
72
75
|
_id: Types.ObjectId;
|
|
73
|
-
}
|
|
76
|
+
} & {
|
|
77
|
+
__v: number;
|
|
78
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
|
|
74
79
|
unsetUnnecessaryFields(params: {
|
|
75
80
|
filter: FilterQuery<factory.categoryCode.ICategoryCode>;
|
|
76
81
|
$unset: any;
|
|
@@ -30,9 +30,13 @@ export declare class CommentRepo {
|
|
|
30
30
|
deleteById(params: {
|
|
31
31
|
id: string;
|
|
32
32
|
}): Promise<void>;
|
|
33
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/creativeWork/comment").IComment> & import("@chevre/factory/lib/creativeWork/comment").IComment & {
|
|
33
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/creativeWork/comment").IComment, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/creativeWork/comment").IComment & {
|
|
34
34
|
_id: import("mongoose").Types.ObjectId;
|
|
35
|
-
}
|
|
35
|
+
} & {
|
|
36
|
+
__v: number;
|
|
37
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<import("@chevre/factory/lib/creativeWork/comment").IComment>, (import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/creativeWork/comment").IComment, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/creativeWork/comment").IComment & {
|
|
36
38
|
_id: import("mongoose").Types.ObjectId;
|
|
37
|
-
}
|
|
39
|
+
} & {
|
|
40
|
+
__v: number;
|
|
41
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
|
|
38
42
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BulkWriteResult } from 'mongodb';
|
|
2
2
|
import { Connection, FilterQuery, Types } from 'mongoose';
|
|
3
3
|
import * as factory from '../factory';
|
|
4
|
+
import { IDocType } from './mongoose/schemas/creativeWork';
|
|
4
5
|
type IKeyOfProjection = keyof factory.creativeWork.movie.ICreativeWork;
|
|
5
6
|
/**
|
|
6
7
|
* コンテンツリポジトリ
|
|
@@ -48,19 +49,19 @@ export declare class CreativeWorkRepo {
|
|
|
48
49
|
id: string;
|
|
49
50
|
};
|
|
50
51
|
}): Promise<void>;
|
|
51
|
-
getCursor(conditions: FilterQuery<factory.creativeWork.movie.ICreativeWork>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/creativeWork/movie").ICreativeWork & {
|
|
52
|
-
description?: string;
|
|
53
|
-
}> & import("@chevre/factory/lib/creativeWork/movie").ICreativeWork & {
|
|
52
|
+
getCursor(conditions: FilterQuery<factory.creativeWork.movie.ICreativeWork>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<Omit<import("@chevre/factory/lib/creativeWork/movie").ICreativeWork, "id"> & {
|
|
54
53
|
description?: string;
|
|
55
54
|
} & {
|
|
56
55
|
_id: Types.ObjectId;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
}> & import("@chevre/factory/lib/creativeWork/movie").ICreativeWork & {
|
|
56
|
+
} & {
|
|
57
|
+
__v: number;
|
|
58
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<Omit<import("@chevre/factory/lib/creativeWork/movie").ICreativeWork, "id"> & {
|
|
60
59
|
description?: string;
|
|
61
60
|
} & {
|
|
62
61
|
_id: Types.ObjectId;
|
|
63
|
-
}
|
|
62
|
+
} & {
|
|
63
|
+
__v: number;
|
|
64
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
|
|
64
65
|
unsetUnnecessaryFields(params: {
|
|
65
66
|
filter: FilterQuery<factory.creativeWork.movie.ICreativeWork>;
|
|
66
67
|
$unset: any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Connection, FilterQuery } from 'mongoose';
|
|
2
|
+
import { IDocType } from './mongoose/schemas/customer';
|
|
2
3
|
import * as factory from '../factory';
|
|
3
4
|
type IUnset = {
|
|
4
5
|
[key in keyof Pick<factory.customer.ICustomer, 'telephone' | 'url'>]?: 1;
|
|
@@ -27,11 +28,15 @@ export declare class CustomerRepo {
|
|
|
27
28
|
deleteById(params: {
|
|
28
29
|
id: string;
|
|
29
30
|
}): Promise<void>;
|
|
30
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {},
|
|
31
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<IDocType & {
|
|
31
32
|
_id: import("mongoose").Types.ObjectId;
|
|
32
|
-
}
|
|
33
|
+
} & {
|
|
34
|
+
__v: number;
|
|
35
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<IDocType & {
|
|
33
36
|
_id: import("mongoose").Types.ObjectId;
|
|
34
|
-
}
|
|
37
|
+
} & {
|
|
38
|
+
__v: number;
|
|
39
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
|
|
35
40
|
unsetUnnecessaryFields(params: {
|
|
36
41
|
filter: any;
|
|
37
42
|
$unset: any;
|
|
@@ -124,17 +124,6 @@ export declare class EventRepo {
|
|
|
124
124
|
* イベントを検索する(inclusion projection)
|
|
125
125
|
*/
|
|
126
126
|
projectEventFields(params: ISearchConditions, inclusion: IKeyOfProjection[]): Promise<Omit<factory.event.screeningEvent.IEvent, 'aggregateOffer'>[]>;
|
|
127
|
-
findByAdditionalProperty(params: {
|
|
128
|
-
project: {
|
|
129
|
-
id: string;
|
|
130
|
-
};
|
|
131
|
-
additionalProperty: factory.propertyValue.IPropertyValue<string>;
|
|
132
|
-
}): Promise<(import("mongoose").FlattenMaps<import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
|
|
133
|
-
_id: string;
|
|
134
|
-
aggregateOffer?: factory.event.screeningEvent.IAggregateOffer;
|
|
135
|
-
}> & Required<{
|
|
136
|
-
_id: string;
|
|
137
|
-
}>)[]>;
|
|
138
127
|
/**
|
|
139
128
|
* apiで公開属性を検索する(2024-10-13~)
|
|
140
129
|
*/
|
|
@@ -302,28 +291,27 @@ export declare class EventRepo {
|
|
|
302
291
|
getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
|
|
303
292
|
_id: string;
|
|
304
293
|
aggregateOffer?: factory.event.screeningEvent.IAggregateOffer;
|
|
305
|
-
}> & import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
|
|
294
|
+
}, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
|
|
306
295
|
_id: string;
|
|
307
296
|
aggregateOffer?: factory.event.screeningEvent.IAggregateOffer;
|
|
308
297
|
} & Required<{
|
|
309
298
|
_id: string;
|
|
310
|
-
}
|
|
299
|
+
}> & {
|
|
300
|
+
__v: number;
|
|
301
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
|
|
311
302
|
_id: string;
|
|
312
303
|
aggregateOffer?: factory.event.screeningEvent.IAggregateOffer;
|
|
313
|
-
}
|
|
304
|
+
}>, (import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
|
|
305
|
+
_id: string;
|
|
306
|
+
aggregateOffer?: factory.event.screeningEvent.IAggregateOffer;
|
|
307
|
+
}, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
|
|
314
308
|
_id: string;
|
|
315
309
|
aggregateOffer?: factory.event.screeningEvent.IAggregateOffer;
|
|
316
310
|
} & Required<{
|
|
317
311
|
_id: string;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
offers: {
|
|
322
|
-
seller: {
|
|
323
|
-
makesOffer: factory.event.screeningEvent.ISellerMakesOffer;
|
|
324
|
-
};
|
|
325
|
-
};
|
|
326
|
-
}): Promise<void>;
|
|
312
|
+
}> & {
|
|
313
|
+
__v: number;
|
|
314
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
|
|
327
315
|
unsetUnnecessaryFields(params: {
|
|
328
316
|
filter: FilterQuery<factory.event.screeningEvent.IEvent>;
|
|
329
317
|
$unset: IUnset;
|
package/lib/chevre/repo/event.js
CHANGED
|
@@ -566,20 +566,6 @@ class EventRepo {
|
|
|
566
566
|
.lean() // lean(2024-08-01~)
|
|
567
567
|
.exec();
|
|
568
568
|
}
|
|
569
|
-
async findByAdditionalProperty(params) {
|
|
570
|
-
const query = this.eventModel.find({
|
|
571
|
-
'project.id': { $eq: params.project.id },
|
|
572
|
-
additionalProperty: { $eq: params.additionalProperty }
|
|
573
|
-
}, { _id: 1 });
|
|
574
|
-
// if (typeof params.limit === 'number' && params.limit > 0) {
|
|
575
|
-
// const page: number = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
576
|
-
// query.limit(params.limit)
|
|
577
|
-
// .skip(params.limit * (page - 1));
|
|
578
|
-
// }
|
|
579
|
-
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
580
|
-
.lean()
|
|
581
|
-
.exec();
|
|
582
|
-
}
|
|
583
569
|
/**
|
|
584
570
|
* apiで公開属性を検索する(2024-10-13~)
|
|
585
571
|
*/
|
|
@@ -720,7 +706,9 @@ class EventRepo {
|
|
|
720
706
|
return this.eventModel.updateOne({
|
|
721
707
|
_id: { $eq: params.id },
|
|
722
708
|
'project.id': { $eq: params.project.id }
|
|
723
|
-
}, { $set: { eventStatus: factory.eventStatusType.EventCancelled } }, {
|
|
709
|
+
}, { $set: { eventStatus: factory.eventStatusType.EventCancelled } }, {
|
|
710
|
+
// includeResultMetadata: true
|
|
711
|
+
})
|
|
724
712
|
.exec();
|
|
725
713
|
}
|
|
726
714
|
/**
|
|
@@ -829,14 +817,25 @@ class EventRepo {
|
|
|
829
817
|
.sort({ startDate: factory.sortType.Descending })
|
|
830
818
|
.cursor();
|
|
831
819
|
}
|
|
832
|
-
async addAvailableAtOrFrom(params
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
}
|
|
820
|
+
// public async addAvailableAtOrFrom(params: {
|
|
821
|
+
// id: string;
|
|
822
|
+
// offers: {
|
|
823
|
+
// seller: {
|
|
824
|
+
// makesOffer: factory.event.screeningEvent.ISellerMakesOffer;
|
|
825
|
+
// };
|
|
826
|
+
// };
|
|
827
|
+
// }): Promise<void> {
|
|
828
|
+
// await this.eventModel.updateOne(
|
|
829
|
+
// { _id: { $eq: params.id } },
|
|
830
|
+
// {
|
|
831
|
+
// $push: {
|
|
832
|
+
// 'offers.seller.makesOffer': params.offers.seller.makesOffer
|
|
833
|
+
// }
|
|
834
|
+
// },
|
|
835
|
+
// { includeResultMetadata: true }
|
|
836
|
+
// )
|
|
837
|
+
// .exec();
|
|
838
|
+
// }
|
|
840
839
|
async unsetUnnecessaryFields(params) {
|
|
841
840
|
return this.eventModel.updateMany(params.filter, { $unset: params.$unset }, { timestamps: false })
|
|
842
841
|
.exec();
|
|
@@ -88,17 +88,23 @@ export declare class EventSeriesRepo {
|
|
|
88
88
|
}>;
|
|
89
89
|
getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, factory.eventSeries.IAttributes & {
|
|
90
90
|
_id: string;
|
|
91
|
-
}> & factory.eventSeries.IAttributes & {
|
|
91
|
+
}, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.eventSeries.IAttributes & {
|
|
92
92
|
_id: string;
|
|
93
93
|
} & Required<{
|
|
94
94
|
_id: string;
|
|
95
|
-
}
|
|
95
|
+
}> & {
|
|
96
|
+
__v: number;
|
|
97
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<factory.eventSeries.IAttributes & {
|
|
96
98
|
_id: string;
|
|
97
|
-
}
|
|
99
|
+
}>, (import("mongoose").Document<unknown, {}, factory.eventSeries.IAttributes & {
|
|
100
|
+
_id: string;
|
|
101
|
+
}, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.eventSeries.IAttributes & {
|
|
98
102
|
_id: string;
|
|
99
103
|
} & Required<{
|
|
100
104
|
_id: string;
|
|
101
|
-
}
|
|
105
|
+
}> & {
|
|
106
|
+
__v: number;
|
|
107
|
+
}, "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
|
|
102
108
|
unsetUnnecessaryFields(params: {
|
|
103
109
|
filter: FilterQuery<factory.eventSeries.IEvent>;
|
|
104
110
|
$unset: IUnset;
|