@chevre/domain 26.0.0-alpha.24 → 26.0.0-alpha.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chevre/repo/acceptedOffer.d.ts +0 -7
- package/lib/chevre/repo/acceptedOffer.js +27 -27
- package/lib/chevre/repo/adminAssetTransaction.d.ts +132 -0
- package/lib/chevre/repo/adminAssetTransaction.js +504 -0
- package/lib/chevre/repo/aggregateAssetTransaction.d.ts +43 -0
- package/lib/chevre/repo/aggregateAssetTransaction.js +166 -0
- package/lib/chevre/repo/assetTransaction.d.ts +10 -235
- package/lib/chevre/repo/assetTransaction.js +48 -636
- package/lib/chevre/repo/ownershipInfo.d.ts +1 -35
- package/lib/chevre/repo/ownershipInfo.js +55 -161
- package/lib/chevre/repository.d.ts +10 -0
- package/lib/chevre/repository.js +24 -2
- package/lib/chevre/service/aggregation/system.d.ts +5 -5
- package/lib/chevre/service/aggregation/system.js +2 -2
- package/lib/chevre/service/assetTransaction/cancelReservation/start.js +10 -17
- package/lib/chevre/service/assetTransaction/refund.js +2 -2
- package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.js +1 -3
- package/lib/chevre/service/order/deleteOrder.js +0 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/isDeliverable.js +1 -49
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.js +2 -2
- package/lib/chevre/service/order/returnOrder.d.ts +0 -2
- package/lib/chevre/service/order/returnOrder.js +8 -40
- package/lib/chevre/service/order/sendOrder.d.ts +0 -2
- package/lib/chevre/service/order/sendOrder.js +41 -55
- package/lib/chevre/service/payment/any/processVoidPayTransaction.js +1 -1
- package/lib/chevre/service/reserve/cancelReservation.js +3 -3
- package/lib/chevre/service/reserve/checkInReservation.js +2 -2
- package/lib/chevre/service/reserve/confirmReservation.js +1 -1
- package/lib/chevre/service/reserve/useReservation.js +1 -1
- package/lib/chevre/service/task/onAuthorizationCreated.js +2 -2
- package/lib/chevre/service/task/returnOrder.js +2 -5
- package/lib/chevre/service/task/returnPayTransaction.js +2 -2
- package/lib/chevre/service/task/sendOrder.js +2 -2
- package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.js +2 -2
- package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.js +2 -2
- package/lib/chevre/service/transaction/placeOrder/confirm.js +1 -1
- package/lib/chevre/service/validation/validateOrder.js +2 -2
- package/package.json +2 -2
|
@@ -27,13 +27,6 @@ export declare class AcceptedOfferRepo extends AcceptedOfferInReserveRepo {
|
|
|
27
27
|
acceptedOffers: [IAcceptedOffer];
|
|
28
28
|
_id?: never;
|
|
29
29
|
})[]>;
|
|
30
|
-
aggreateOwnershipInfosByOrder(filter: {
|
|
31
|
-
orderNumber: {
|
|
32
|
-
$eq: string;
|
|
33
|
-
};
|
|
34
|
-
}): Promise<{
|
|
35
|
-
identifier: string;
|
|
36
|
-
}[]>;
|
|
37
30
|
/**
|
|
38
31
|
* 注文オファーを展開して検索する
|
|
39
32
|
* 注文番号指定で1注文ドキュメントから参照する想定
|
|
@@ -105,33 +105,33 @@ class AcceptedOfferRepo extends acceptedOfferInReserve_1.AcceptedOfferInReserveR
|
|
|
105
105
|
return orders;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
async aggreateOwnershipInfosByOrder(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
108
|
+
// public async aggreateOwnershipInfosByOrder(
|
|
109
|
+
// filter: {
|
|
110
|
+
// orderNumber: { $eq: string };
|
|
111
|
+
// }
|
|
112
|
+
// ): Promise<{ identifier: string }[]> {
|
|
113
|
+
// const aggregate = this.orderModel.aggregate<{ identifier: string }>([
|
|
114
|
+
// { $match: { orderNumber: { $eq: filter.orderNumber.$eq } } },
|
|
115
|
+
// { $match: { typeOf: { $eq: factory.order.OrderType.Order } } },
|
|
116
|
+
// {
|
|
117
|
+
// $unwind: {
|
|
118
|
+
// path: '$acceptedOffers',
|
|
119
|
+
// includeArrayIndex: 'acceptedOfferIndex'
|
|
120
|
+
// }
|
|
121
|
+
// },
|
|
122
|
+
// {
|
|
123
|
+
// $project: {
|
|
124
|
+
// _id: 0,
|
|
125
|
+
// identifier: {
|
|
126
|
+
// $concat: ['$customer.id', '-', '$acceptedOffers.itemOffered.typeOf', '-', '$orderNumber', '-', { $toString: '$acceptedOfferIndex' }]
|
|
127
|
+
// }
|
|
128
|
+
// }
|
|
129
|
+
// }
|
|
130
|
+
// ]);
|
|
131
|
+
// return aggregate
|
|
132
|
+
// .option({ maxTimeMS: MONGO_MAX_TIME_MS })
|
|
133
|
+
// .exec();
|
|
134
|
+
// }
|
|
135
135
|
/**
|
|
136
136
|
* 注文オファーを展開して検索する
|
|
137
137
|
* 注文番号指定で1注文ドキュメントから参照する想定
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { Connection, FilterQuery } from 'mongoose';
|
|
2
|
+
import { IDocType } from './mongoose/schemas/assetTransaction';
|
|
3
|
+
import { factory } from '../factory';
|
|
4
|
+
type AvailableAssetTransactionType = factory.assetTransactionType.CancelReservation | factory.assetTransactionType.Pay | factory.assetTransactionType.Refund | factory.assetTransactionType.Reserve;
|
|
5
|
+
/**
|
|
6
|
+
* 資産取引管理リポジトリ
|
|
7
|
+
*/
|
|
8
|
+
export declare class AdminAssetTransactionRepo {
|
|
9
|
+
private readonly transactionModel;
|
|
10
|
+
constructor(connection: Connection);
|
|
11
|
+
static CREATE_MONGO_CONDITIONS(params: factory.assetTransaction.ISearchConditions<factory.assetTransactionType>): FilterQuery<import("@chevre/factory/lib/chevre/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/reserve").ITransaction>[];
|
|
12
|
+
countPotentiallyExportTasks(params: {
|
|
13
|
+
endDate: {
|
|
14
|
+
$lt: Date;
|
|
15
|
+
};
|
|
16
|
+
limit?: number;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
count: number;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* tasksExportAction.actionStatusがActiveActionStatusのまま一定時間経過した取引について
|
|
22
|
+
* PotentialActionStatusに変更する
|
|
23
|
+
* 2025-03-10~
|
|
24
|
+
*/
|
|
25
|
+
reExportAction(params: {
|
|
26
|
+
startDate: {
|
|
27
|
+
$lt: Date;
|
|
28
|
+
};
|
|
29
|
+
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
30
|
+
/**
|
|
31
|
+
* add(2025-03-17~)
|
|
32
|
+
*/
|
|
33
|
+
countPotentiallyExpired(params: {
|
|
34
|
+
expires: {
|
|
35
|
+
$lt: Date;
|
|
36
|
+
};
|
|
37
|
+
limit?: number;
|
|
38
|
+
}): Promise<{
|
|
39
|
+
count: number;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* add(2025-03-12~)
|
|
43
|
+
*/
|
|
44
|
+
makeOneExpiredIfExists(params: {
|
|
45
|
+
expires: {
|
|
46
|
+
$lt: Date;
|
|
47
|
+
};
|
|
48
|
+
}): Promise<Pick<factory.assetTransaction.ITransaction<factory.assetTransactionType>, 'id' | 'typeOf'> | undefined>;
|
|
49
|
+
countAssetTransactions<T extends factory.assetTransactionType>(params: factory.assetTransaction.ISearchConditions<T>): Promise<{
|
|
50
|
+
count: number;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* 取引を検索する
|
|
54
|
+
*/
|
|
55
|
+
findAssetTransactions<T extends AvailableAssetTransactionType>(params: factory.assetTransaction.ISearchConditions<T>, inclusion?: string[], exclusion?: string[]): Promise<factory.assetTransaction.ITransaction<T>[]>;
|
|
56
|
+
/**
|
|
57
|
+
* 終了日時を一定期間過ぎたアクションを削除する
|
|
58
|
+
*/
|
|
59
|
+
deleteEndDatePassedCertainPeriod(params: {
|
|
60
|
+
$lt: Date;
|
|
61
|
+
}): Promise<import("mongodb").DeleteResult>;
|
|
62
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & ((import("@chevre/factory/lib/chevre/assetTransaction/cancelReservation").IAttributes & {
|
|
63
|
+
id: string;
|
|
64
|
+
} & {
|
|
65
|
+
seller?: any;
|
|
66
|
+
} & {
|
|
67
|
+
_id: import("mongoose").Types.ObjectId;
|
|
68
|
+
} & {
|
|
69
|
+
__v: number;
|
|
70
|
+
}) | (import("@chevre/factory/lib/chevre/assetTransaction/pay").IAttributes & {
|
|
71
|
+
id: string;
|
|
72
|
+
} & {
|
|
73
|
+
seller?: any;
|
|
74
|
+
} & {
|
|
75
|
+
_id: import("mongoose").Types.ObjectId;
|
|
76
|
+
} & {
|
|
77
|
+
__v: number;
|
|
78
|
+
}) | (import("@chevre/factory/lib/chevre/assetTransaction/refund").IAttributes & {
|
|
79
|
+
id: string;
|
|
80
|
+
} & {
|
|
81
|
+
seller?: any;
|
|
82
|
+
} & {
|
|
83
|
+
_id: import("mongoose").Types.ObjectId;
|
|
84
|
+
} & {
|
|
85
|
+
__v: number;
|
|
86
|
+
}) | (import("@chevre/factory/lib/chevre/assetTransaction/reserve").IAttributes & {
|
|
87
|
+
id: string;
|
|
88
|
+
} & {
|
|
89
|
+
seller?: any;
|
|
90
|
+
} & {
|
|
91
|
+
_id: import("mongoose").Types.ObjectId;
|
|
92
|
+
} & {
|
|
93
|
+
__v: number;
|
|
94
|
+
})), import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & ((import("@chevre/factory/lib/chevre/assetTransaction/cancelReservation").IAttributes & {
|
|
95
|
+
id: string;
|
|
96
|
+
} & {
|
|
97
|
+
seller?: any;
|
|
98
|
+
} & {
|
|
99
|
+
_id: import("mongoose").Types.ObjectId;
|
|
100
|
+
} & {
|
|
101
|
+
__v: number;
|
|
102
|
+
}) | (import("@chevre/factory/lib/chevre/assetTransaction/pay").IAttributes & {
|
|
103
|
+
id: string;
|
|
104
|
+
} & {
|
|
105
|
+
seller?: any;
|
|
106
|
+
} & {
|
|
107
|
+
_id: import("mongoose").Types.ObjectId;
|
|
108
|
+
} & {
|
|
109
|
+
__v: number;
|
|
110
|
+
}) | (import("@chevre/factory/lib/chevre/assetTransaction/refund").IAttributes & {
|
|
111
|
+
id: string;
|
|
112
|
+
} & {
|
|
113
|
+
seller?: any;
|
|
114
|
+
} & {
|
|
115
|
+
_id: import("mongoose").Types.ObjectId;
|
|
116
|
+
} & {
|
|
117
|
+
__v: number;
|
|
118
|
+
}) | (import("@chevre/factory/lib/chevre/assetTransaction/reserve").IAttributes & {
|
|
119
|
+
id: string;
|
|
120
|
+
} & {
|
|
121
|
+
seller?: any;
|
|
122
|
+
} & {
|
|
123
|
+
_id: import("mongoose").Types.ObjectId;
|
|
124
|
+
} & {
|
|
125
|
+
__v: number;
|
|
126
|
+
}))) | null>;
|
|
127
|
+
unsetUnnecessaryFields(params: {
|
|
128
|
+
filter: any;
|
|
129
|
+
$unset: any;
|
|
130
|
+
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
131
|
+
}
|
|
132
|
+
export {};
|