@chevre/domain 22.2.0-alpha.21 → 22.2.0-alpha.23
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/migrateDeleteTransactionTasks.ts +1 -1
- package/example/src/chevre/projectFields.ts +6 -7
- package/example/src/chevre/{projectEventFieldsById.ts → projectFieldsById.ts} +6 -11
- package/example/src/chevre/searchTransactions.ts +1 -1
- package/example/src/chevre/unsetUnnecessaryFields.ts +2 -15
- 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 +55 -3
- 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 +4 -0
- package/lib/chevre/repo/categoryCode.js +6 -0
- 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 +12 -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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +13 -1
- 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 +6 -1
- package/lib/chevre/repo/productModel.d.ts +1 -22
- package/lib/chevre/repo/project.d.ts +21 -1
- package/lib/chevre/repo/project.js +2 -2
- 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 +54 -2
- 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 +2 -19
- package/lib/chevre/repo/transaction.d.ts +30 -14
- package/lib/chevre/repo/transaction.js +106 -77
- package/lib/chevre/service/assetTransaction/cancelReservation.d.ts +1 -1
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -3
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +3 -2
- package/lib/chevre/service/offer/event/authorize.d.ts +1 -1
- package/lib/chevre/service/offer/event/authorize.js +1 -1
- 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/factory.d.ts +3 -3
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +4 -2
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +1 -1
- 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.js +2 -2
- 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 +1 -1
- package/lib/chevre/service/order/returnOrder.js +1 -1
- package/lib/chevre/service/payment/any.js +5 -5
- package/lib/chevre/service/payment.d.ts +1 -1
- package/lib/chevre/service/report/telemetry.js +2 -2
- package/lib/chevre/service/task/onResourceUpdated.js +14 -2
- 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 +3 -3
- 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.js +1 -1
- package/lib/chevre/service/transaction/returnOrder.js +2 -2
- package/lib/chevre/service/transaction.js +1 -1
- package/package.json +3 -3
- 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/lib/chevre/repo/role.js
CHANGED
|
@@ -9,13 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.RoleRepo =
|
|
13
|
-
const role_1 = require("./mongoose/schemas/role");
|
|
12
|
+
exports.RoleRepo = void 0;
|
|
14
13
|
const settings_1 = require("../settings");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
const role_1 = require("./mongoose/schemas/role");
|
|
15
|
+
const AVAILABLE_PROJECT_FIELDS = [
|
|
16
|
+
'typeOf',
|
|
17
|
+
'permissions',
|
|
18
|
+
'roleName'
|
|
19
|
+
];
|
|
19
20
|
/**
|
|
20
21
|
* IAMロールリポジトリ
|
|
21
22
|
*/
|
|
@@ -39,10 +40,19 @@ class RoleRepo {
|
|
|
39
40
|
}
|
|
40
41
|
return andConditions;
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
+
projectFields(params) {
|
|
43
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
45
|
const conditions = RoleRepo.CREATE_MONGO_CONDITIONS(params);
|
|
45
|
-
const
|
|
46
|
+
const positiveProjectionFields = AVAILABLE_PROJECT_FIELDS;
|
|
47
|
+
// if (Array.isArray(inclusion) && inclusion.length > 0) {
|
|
48
|
+
// positiveProjectionFields = inclusion.filter((key) => AVAILABLE_PROJECT_FIELDS.includes(key));
|
|
49
|
+
// } else {
|
|
50
|
+
// if (Array.isArray(exclusion) && exclusion.length > 0) {
|
|
51
|
+
// positiveProjectionFields = positiveProjectionFields.filter((key) => !exclusion.includes(key));
|
|
52
|
+
// }
|
|
53
|
+
// }
|
|
54
|
+
const projection = Object.assign({ _id: 0 }, Object.fromEntries(positiveProjectionFields.map((key) => ([key, 1]))));
|
|
55
|
+
const query = this.roleModel.find((conditions.length > 0) ? { $and: conditions } : {}, projection);
|
|
46
56
|
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
47
57
|
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
48
58
|
query.limit(params.limit)
|
|
@@ -56,8 +66,8 @@ class RoleRepo {
|
|
|
56
66
|
// const explainResult = await (<any>query).explain();
|
|
57
67
|
// console.log(explainResult[0].executionStats.allPlansExecution.map((e: any) => e.executionStages.inputStage));
|
|
58
68
|
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
59
|
-
.
|
|
60
|
-
.
|
|
69
|
+
.lean() // 2024-08-23~
|
|
70
|
+
.exec();
|
|
61
71
|
});
|
|
62
72
|
}
|
|
63
73
|
aggregatePermissions(params) {
|
|
@@ -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 { AnyExpression, Connection, FilterQuery, QueryOptions } from 'mongoose';
|
|
25
|
+
import { AnyExpression, Connection, FilterQuery, QueryOptions, Types } from 'mongoose';
|
|
26
26
|
import * as factory from '../factory';
|
|
27
27
|
export type ISellerWithId = Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'hasMerchantReturnPolicy' | 'id' | 'makesOffer' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'> & {
|
|
28
28
|
id: string;
|
|
@@ -97,7 +97,59 @@ export declare class SellerRepo {
|
|
|
97
97
|
id: string;
|
|
98
98
|
makesOffer: factory.seller.IMakesOffer;
|
|
99
99
|
}): Promise<void>;
|
|
100
|
-
getCursor(conditions: FilterQuery<factory.seller.ISeller>, projection: any): import("mongoose").Cursor<
|
|
100
|
+
getCursor(conditions: FilterQuery<factory.seller.ISeller>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, {
|
|
101
|
+
url?: string | undefined;
|
|
102
|
+
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
103
|
+
name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
|
|
104
|
+
typeOf: factory.organizationType.Corporation;
|
|
105
|
+
additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
|
|
106
|
+
location?: import("@chevre/factory/lib/place").IPlace | undefined;
|
|
107
|
+
telephone?: string | undefined;
|
|
108
|
+
hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
|
|
109
|
+
branchCode: string;
|
|
110
|
+
makesOffer?: factory.seller.IMakesOffer[] | undefined;
|
|
111
|
+
paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
|
|
112
|
+
}> & Omit<{
|
|
113
|
+
url?: string | undefined;
|
|
114
|
+
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
115
|
+
name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
|
|
116
|
+
typeOf: factory.organizationType.Corporation;
|
|
117
|
+
additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
|
|
118
|
+
location?: import("@chevre/factory/lib/place").IPlace | undefined;
|
|
119
|
+
telephone?: string | undefined;
|
|
120
|
+
hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
|
|
121
|
+
branchCode: string;
|
|
122
|
+
makesOffer?: factory.seller.IMakesOffer[] | undefined;
|
|
123
|
+
paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
|
|
124
|
+
} & {
|
|
125
|
+
_id: Types.ObjectId;
|
|
126
|
+
}, never>, QueryOptions<import("mongoose").Document<unknown, {}, {
|
|
127
|
+
url?: string | undefined;
|
|
128
|
+
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
129
|
+
name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
|
|
130
|
+
typeOf: factory.organizationType.Corporation;
|
|
131
|
+
additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
|
|
132
|
+
location?: import("@chevre/factory/lib/place").IPlace | undefined;
|
|
133
|
+
telephone?: string | undefined;
|
|
134
|
+
hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
|
|
135
|
+
branchCode: string;
|
|
136
|
+
makesOffer?: factory.seller.IMakesOffer[] | undefined;
|
|
137
|
+
paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
|
|
138
|
+
}> & Omit<{
|
|
139
|
+
url?: string | undefined;
|
|
140
|
+
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
141
|
+
name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
|
|
142
|
+
typeOf: factory.organizationType.Corporation;
|
|
143
|
+
additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
|
|
144
|
+
location?: import("@chevre/factory/lib/place").IPlace | undefined;
|
|
145
|
+
telephone?: string | undefined;
|
|
146
|
+
hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
|
|
147
|
+
branchCode: string;
|
|
148
|
+
makesOffer?: factory.seller.IMakesOffer[] | undefined;
|
|
149
|
+
paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
|
|
150
|
+
} & {
|
|
151
|
+
_id: Types.ObjectId;
|
|
152
|
+
}, never>>>;
|
|
101
153
|
unsetUnnecessaryFields(params: {
|
|
102
154
|
filter: any;
|
|
103
155
|
$unset: any;
|
|
@@ -22,8 +22,9 @@
|
|
|
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,
|
|
25
|
+
import type { Connection, UpdateWriteOpResult } from 'mongoose';
|
|
26
26
|
import * as factory from '../factory';
|
|
27
|
+
import { IModel } from './mongoose/schemas/task';
|
|
27
28
|
interface IAggregationByStatus {
|
|
28
29
|
taskCount: number;
|
|
29
30
|
avgLatency: number;
|
|
@@ -55,7 +56,7 @@ type IProjection = {
|
|
|
55
56
|
* タスクリポジトリ
|
|
56
57
|
*/
|
|
57
58
|
export declare class TaskRepo {
|
|
58
|
-
readonly taskModel:
|
|
59
|
+
readonly taskModel: IModel;
|
|
59
60
|
constructor(connection: Connection);
|
|
60
61
|
static CREATE_MONGO_CONDITIONS(params: factory.task.ISearchConditions): any[];
|
|
61
62
|
saveOne(savingTask: factory.task.IAttributes<factory.taskName>, options: IOptionOnCreate): Promise<{
|
|
@@ -191,7 +192,67 @@ export declare class TaskRepo {
|
|
|
191
192
|
$nin?: factory.taskName[];
|
|
192
193
|
};
|
|
193
194
|
}): Promise<number>;
|
|
194
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<
|
|
195
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, {
|
|
196
|
+
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
197
|
+
identifier?: string | undefined;
|
|
198
|
+
name: factory.taskName;
|
|
199
|
+
expires?: Date | undefined;
|
|
200
|
+
data: any;
|
|
201
|
+
status: factory.taskStatus;
|
|
202
|
+
runsAt: Date;
|
|
203
|
+
remainingNumberOfTries: number;
|
|
204
|
+
lastTriedAt?: Date | undefined;
|
|
205
|
+
numberOfTried: number;
|
|
206
|
+
executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
|
|
207
|
+
executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
|
|
208
|
+
dateAborted?: Date | undefined;
|
|
209
|
+
}> & Omit<{
|
|
210
|
+
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
211
|
+
identifier?: string | undefined;
|
|
212
|
+
name: factory.taskName;
|
|
213
|
+
expires?: Date | undefined;
|
|
214
|
+
data: any;
|
|
215
|
+
status: factory.taskStatus;
|
|
216
|
+
runsAt: Date;
|
|
217
|
+
remainingNumberOfTries: number;
|
|
218
|
+
lastTriedAt?: Date | undefined;
|
|
219
|
+
numberOfTried: number;
|
|
220
|
+
executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
|
|
221
|
+
executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
|
|
222
|
+
dateAborted?: Date | undefined;
|
|
223
|
+
} & {
|
|
224
|
+
_id: import("mongoose").Types.ObjectId;
|
|
225
|
+
}, never>, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, {
|
|
226
|
+
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
227
|
+
identifier?: string | undefined;
|
|
228
|
+
name: factory.taskName;
|
|
229
|
+
expires?: Date | undefined;
|
|
230
|
+
data: any;
|
|
231
|
+
status: factory.taskStatus;
|
|
232
|
+
runsAt: Date;
|
|
233
|
+
remainingNumberOfTries: number;
|
|
234
|
+
lastTriedAt?: Date | undefined;
|
|
235
|
+
numberOfTried: number;
|
|
236
|
+
executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
|
|
237
|
+
executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
|
|
238
|
+
dateAborted?: Date | undefined;
|
|
239
|
+
}> & Omit<{
|
|
240
|
+
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
241
|
+
identifier?: string | undefined;
|
|
242
|
+
name: factory.taskName;
|
|
243
|
+
expires?: Date | undefined;
|
|
244
|
+
data: any;
|
|
245
|
+
status: factory.taskStatus;
|
|
246
|
+
runsAt: Date;
|
|
247
|
+
remainingNumberOfTries: number;
|
|
248
|
+
lastTriedAt?: Date | undefined;
|
|
249
|
+
numberOfTried: number;
|
|
250
|
+
executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
|
|
251
|
+
executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
|
|
252
|
+
dateAborted?: Date | undefined;
|
|
253
|
+
} & {
|
|
254
|
+
_id: import("mongoose").Types.ObjectId;
|
|
255
|
+
}, never>>>;
|
|
195
256
|
unsetUnnecessaryFields(params: {
|
|
196
257
|
filter: any;
|
|
197
258
|
$unset: any;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { Connection
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import { IModel } from './mongoose/schemas/telemetry';
|
|
2
3
|
/**
|
|
3
4
|
* 測定リポジトリ
|
|
4
5
|
*/
|
|
5
6
|
export declare class TelemetryRepo {
|
|
6
|
-
readonly telemetryModel:
|
|
7
|
+
readonly telemetryModel: IModel;
|
|
7
8
|
constructor(connection: Connection);
|
|
8
9
|
}
|
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
import type { Connection, FilterQuery } from 'mongoose';
|
|
2
2
|
import * as factory from '../factory';
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
}
|
|
3
|
+
import { ITicket, ITicketIssuedBy } from './mongoose/schemas/ticket';
|
|
4
|
+
export { ITicket };
|
|
21
5
|
type IIssueParams = Pick<ITicket, 'ticketToken'> & {
|
|
22
6
|
project: {
|
|
23
7
|
id: string;
|
|
@@ -56,4 +40,3 @@ export declare class TicketRepo {
|
|
|
56
40
|
issueByTicketToken(params: IIssueParams): Promise<Pick<ITicket, 'id'>>;
|
|
57
41
|
projectFields(params: ISearchConditions, inclusion: IKeyOfProjection[]): Promise<ITicket[]>;
|
|
58
42
|
}
|
|
59
|
-
export {};
|
|
@@ -52,7 +52,7 @@ export type IStartedTransaction = Pick<factory.transaction.ITransaction<factory.
|
|
|
52
52
|
export declare class TransactionRepo {
|
|
53
53
|
private readonly transactionModel;
|
|
54
54
|
constructor(connection: Connection);
|
|
55
|
-
static CREATE_MONGO_CONDITIONS(params: factory.transaction.ISearchConditions<factory.transactionType>): FilterQuery<import("@chevre/factory/lib/assetTransaction/
|
|
55
|
+
static CREATE_MONGO_CONDITIONS(params: factory.transaction.ISearchConditions<factory.transactionType>): 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
56
|
/**
|
|
57
57
|
* 取引を開始する
|
|
58
58
|
*/
|
|
@@ -60,14 +60,14 @@ export declare class TransactionRepo {
|
|
|
60
60
|
/**
|
|
61
61
|
* 特定取引検索
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
projectFieldsById<T extends factory.transactionType>(params: {
|
|
64
64
|
typeOf: T;
|
|
65
65
|
id: string;
|
|
66
66
|
}, inclusion: IKeyOfProjection<T>[]): Promise<factory.transaction.ITransaction<T>>;
|
|
67
67
|
/**
|
|
68
68
|
* 進行中の取引を取得する
|
|
69
69
|
*/
|
|
70
|
-
|
|
70
|
+
projectFieldsInProgressById<T extends factory.transactionType>(params: {
|
|
71
71
|
typeOf: T;
|
|
72
72
|
id: string;
|
|
73
73
|
}, inclusion: IKeyOfProjection<T>[]): Promise<ITransactionInProgress<T>>;
|
|
@@ -158,7 +158,7 @@ export declare class TransactionRepo {
|
|
|
158
158
|
status: {
|
|
159
159
|
$in: factory.transactionStatusType[];
|
|
160
160
|
};
|
|
161
|
-
}): Promise<Pick<import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction, "
|
|
161
|
+
}): Promise<Pick<import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction, "id" | "typeOf" | "status">[]>;
|
|
162
162
|
/**
|
|
163
163
|
* set task status exported by transaction id
|
|
164
164
|
* IDでタスクをエクスポート済に変更する
|
|
@@ -185,7 +185,7 @@ export declare class TransactionRepo {
|
|
|
185
185
|
/**
|
|
186
186
|
* 取引を検索する
|
|
187
187
|
*/
|
|
188
|
-
|
|
188
|
+
projectFields<T extends factory.transactionType, F extends IKeyOfProjection<T>>(params: factory.transaction.ISearchConditions<T> & {
|
|
189
189
|
inclusion: F[];
|
|
190
190
|
}): Promise<(Pick<factory.transaction.ITransaction<T>, F> & {
|
|
191
191
|
id: string;
|
|
@@ -201,14 +201,6 @@ export declare class TransactionRepo {
|
|
|
201
201
|
};
|
|
202
202
|
};
|
|
203
203
|
}): Promise<void>;
|
|
204
|
-
findByIdAndUpdate4migrate(params: {
|
|
205
|
-
id: string;
|
|
206
|
-
update: {
|
|
207
|
-
$set?: {
|
|
208
|
-
'object.paymentMethods'?: factory.transaction.placeOrder.IPaymentMethodByPaymentUrl;
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
}): Promise<void>;
|
|
212
204
|
saveOrderNumberIfNotExist(params: {
|
|
213
205
|
id: string;
|
|
214
206
|
orderNumber: string;
|
|
@@ -237,7 +229,31 @@ export declare class TransactionRepo {
|
|
|
237
229
|
$lt: Date;
|
|
238
230
|
};
|
|
239
231
|
}): Promise<import("mongodb").DeleteResult>;
|
|
240
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<
|
|
232
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction> & Omit<(import("@chevre/factory/lib/transaction/moneyTransfer").IAttributes & {
|
|
233
|
+
id: string;
|
|
234
|
+
} & {
|
|
235
|
+
_id: import("mongoose").Types.ObjectId;
|
|
236
|
+
}) | (import("@chevre/factory/lib/transaction/placeOrder").IAttributes & {
|
|
237
|
+
id: string;
|
|
238
|
+
} & {
|
|
239
|
+
_id: import("mongoose").Types.ObjectId;
|
|
240
|
+
}) | (import("@chevre/factory/lib/transaction/returnOrder").IAttributes & {
|
|
241
|
+
id: string;
|
|
242
|
+
} & {
|
|
243
|
+
_id: import("mongoose").Types.ObjectId;
|
|
244
|
+
}), never>, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction> & Omit<(import("@chevre/factory/lib/transaction/moneyTransfer").IAttributes & {
|
|
245
|
+
id: string;
|
|
246
|
+
} & {
|
|
247
|
+
_id: import("mongoose").Types.ObjectId;
|
|
248
|
+
}) | (import("@chevre/factory/lib/transaction/placeOrder").IAttributes & {
|
|
249
|
+
id: string;
|
|
250
|
+
} & {
|
|
251
|
+
_id: import("mongoose").Types.ObjectId;
|
|
252
|
+
}) | (import("@chevre/factory/lib/transaction/returnOrder").IAttributes & {
|
|
253
|
+
id: string;
|
|
254
|
+
} & {
|
|
255
|
+
_id: import("mongoose").Types.ObjectId;
|
|
256
|
+
}), never>>>;
|
|
241
257
|
aggregatePlaceOrder(params: {
|
|
242
258
|
project?: {
|
|
243
259
|
id?: {
|