@chevre/domain 25.2.0-alpha.43 → 25.2.0-alpha.44
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/eventEmitter/task.d.ts +2 -1
- package/lib/chevre/repo/aggregateOffer.d.ts +1 -1
- package/lib/chevre/repo/aggregateOffer.js +8 -8
- package/lib/chevre/repo/concurrentLock.d.ts +3 -1
- package/lib/chevre/repo/credentials.d.ts +2 -1
- package/lib/chevre/repo/passport.d.ts +2 -1
- package/lib/chevre/repo/priceSpecification.d.ts +4 -4
- package/lib/chevre/repo/rateLimit/offer.d.ts +3 -1
- package/lib/chevre/repo/transactionProcess.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
import type { Connection } from 'mongoose';
|
|
3
|
-
import type {
|
|
3
|
+
import type { createClient } from 'redis';
|
|
4
4
|
import { factory } from '../factory';
|
|
5
5
|
interface IExecuteSettings {
|
|
6
6
|
/**
|
|
@@ -60,6 +60,7 @@ type IChangedTask = IReadyTask | IRunningTask | IRunningTaskByName | IExecutedTa
|
|
|
60
60
|
type IOperationExecute<T> = (settings: IExecuteSettings) => Promise<T>;
|
|
61
61
|
type INextFunction = (task: IExecutedTask) => IOperationExecute<void>;
|
|
62
62
|
type IOnTaskStatusChangedListener = (task: IChangedTask, next?: INextFunction) => void;
|
|
63
|
+
type RedisClientType = ReturnType<typeof createClient>;
|
|
63
64
|
/**
|
|
64
65
|
* タスクイベントエミッター
|
|
65
66
|
*/
|
|
@@ -12,7 +12,7 @@ export declare class AggregateOfferRepo {
|
|
|
12
12
|
constructor(connection: Connection);
|
|
13
13
|
static CREATE_MATCH_STAGE(params: Omit<factory.unitPriceOffer.ISearchConditions, 'limit' | 'page' | 'sort'>): IMatchStage[];
|
|
14
14
|
static CREATE_AGGREGATE_OFFERS_PROJECTION(params: IProjection): Record<string, AnyExpression>;
|
|
15
|
-
findAggregateOffers(params: factory.unitPriceOffer.ISearchConditions, projection?: IProjection): Promise<factory.aggregateOffer.IAggregateOffer[]>;
|
|
15
|
+
findAggregateOffers(params: factory.unitPriceOffer.ISearchConditions, projection?: IProjection): Promise<Pick<factory.aggregateOffer.IAggregateOffer, 'id' | 'offers' | 'typeOf'>[]>;
|
|
16
16
|
pushIncludedInDataCatalog(params: {
|
|
17
17
|
project: {
|
|
18
18
|
id: string;
|
|
@@ -374,11 +374,11 @@ class AggregateOfferRepo {
|
|
|
374
374
|
_id: 0,
|
|
375
375
|
id: '$_id',
|
|
376
376
|
typeOf: '$typeOf',
|
|
377
|
-
project: '$project',
|
|
378
377
|
offers: [{ $first: '$offers' }],
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
378
|
+
// project: '$project', // discontinue(2026-07-24~)
|
|
379
|
+
// highPrice: { $max: '$offers.priceSpecification.price' }, // offers.length:1に限定につき廃止(2026-07-24~)
|
|
380
|
+
// lowPrice: { $min: '$offers.priceSpecification.price' }, // offers.length:1に限定につき廃止(2026-07-24~)
|
|
381
|
+
// offerCount: { $size: '$offers' } // offers.length:1に限定につき廃止(2026-07-24~)
|
|
382
382
|
};
|
|
383
383
|
const positiveProjectionFields = Object.keys(params)
|
|
384
384
|
.filter((key) => params[key] !== 0);
|
|
@@ -389,10 +389,10 @@ class AggregateOfferRepo {
|
|
|
389
389
|
_id: 0,
|
|
390
390
|
id: '$_id',
|
|
391
391
|
typeOf: '$typeOf',
|
|
392
|
-
project: '$project',
|
|
393
|
-
highPrice: { $max: '$offers.priceSpecification.price' },
|
|
394
|
-
lowPrice: { $min: '$offers.priceSpecification.price' },
|
|
395
|
-
offerCount: { $size: '$offers' }
|
|
392
|
+
// project: '$project', // discontinue(2026-07-24~)
|
|
393
|
+
// highPrice: { $max: '$offers.priceSpecification.price' }, // offers.length:1に限定につき廃止(2026-07-24~)
|
|
394
|
+
// lowPrice: { $min: '$offers.priceSpecification.price' }, // offers.length:1に限定につき廃止(2026-07-24~)
|
|
395
|
+
// offerCount: { $size: '$offers' } // offers.length:1に限定につき廃止(2026-07-24~)
|
|
396
396
|
};
|
|
397
397
|
const offersProjection = {};
|
|
398
398
|
positiveProjectionFields.forEach((field) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { createClient } from 'redis';
|
|
2
2
|
import { AbstractConcurrentLockRepo, ILockParams, IUnlockParams } from './concurrentLockAbstract';
|
|
3
|
+
type RedisClientType = ReturnType<typeof createClient>;
|
|
3
4
|
/**
|
|
4
5
|
* 同時実行ロックリポジトリ
|
|
5
6
|
*/
|
|
@@ -12,3 +13,4 @@ export declare class ConcurrentLockRepo implements AbstractConcurrentLockRepo {
|
|
|
12
13
|
lock(params: ILockParams): Promise<void>;
|
|
13
14
|
unlock(params: IUnlockParams): Promise<void>;
|
|
14
15
|
}
|
|
16
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { COA } from '@motionpicture/coa-service';
|
|
2
|
-
import type {
|
|
2
|
+
import type { createClient } from 'redis';
|
|
3
3
|
interface IOptions {
|
|
4
4
|
scope: string;
|
|
5
5
|
expireInSeconds: number;
|
|
6
6
|
}
|
|
7
|
+
type RedisClientType = ReturnType<typeof createClient>;
|
|
7
8
|
/**
|
|
8
9
|
* 認証情報リポジトリ
|
|
9
10
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JwtPayload } from 'jsonwebtoken';
|
|
2
|
-
import type {
|
|
2
|
+
import type { createClient } from 'redis';
|
|
3
3
|
import { factory } from '../factory';
|
|
4
4
|
import { IPassportValidator } from '../factory/transaction';
|
|
5
5
|
export type IVerifiedPassport = factory.waiter.passport.IPassport & {
|
|
@@ -20,6 +20,7 @@ interface IOptions {
|
|
|
20
20
|
secret: string;
|
|
21
21
|
passportValidator?: IPassportValidator;
|
|
22
22
|
}
|
|
23
|
+
type RedisClientType = ReturnType<typeof createClient>;
|
|
23
24
|
/**
|
|
24
25
|
* 取引許可証リポジトリ
|
|
25
26
|
*/
|
|
@@ -37,8 +37,8 @@ export declare class PriceSpecificationRepo {
|
|
|
37
37
|
};
|
|
38
38
|
}): Promise<void>;
|
|
39
39
|
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
|
|
40
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
41
40
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
41
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
42
42
|
price: number;
|
|
43
43
|
priceCurrency: factory.priceCurrency;
|
|
44
44
|
typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
|
|
@@ -53,8 +53,8 @@ export declare class PriceSpecificationRepo {
|
|
|
53
53
|
} & {
|
|
54
54
|
__v: number;
|
|
55
55
|
}) | ({
|
|
56
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
57
56
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
57
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
58
58
|
price: number;
|
|
59
59
|
priceCurrency: factory.priceCurrency;
|
|
60
60
|
typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
|
|
@@ -70,8 +70,8 @@ export declare class PriceSpecificationRepo {
|
|
|
70
70
|
} & {
|
|
71
71
|
__v: number;
|
|
72
72
|
})), import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
|
|
73
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
74
73
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
74
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
75
75
|
price: number;
|
|
76
76
|
priceCurrency: factory.priceCurrency;
|
|
77
77
|
typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
|
|
@@ -86,8 +86,8 @@ export declare class PriceSpecificationRepo {
|
|
|
86
86
|
} & {
|
|
87
87
|
__v: number;
|
|
88
88
|
}) | ({
|
|
89
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
90
89
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
90
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
91
91
|
price: number;
|
|
92
92
|
priceCurrency: factory.priceCurrency;
|
|
93
93
|
typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { createClient } from 'redis';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
|
+
type RedisClientType = ReturnType<typeof createClient>;
|
|
3
4
|
/**
|
|
4
5
|
* レート制限キーインターフェース
|
|
5
6
|
*/
|
|
@@ -34,3 +35,4 @@ export declare class OfferRateLimitRepo {
|
|
|
34
35
|
unlock(params: IRateLimitKey): Promise<void>;
|
|
35
36
|
getHolder(ratelimitKey: IRateLimitKey): Promise<string | null>;
|
|
36
37
|
}
|
|
38
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { createClient } from 'redis';
|
|
2
2
|
import { factory } from '../factory';
|
|
3
3
|
interface IProcessKey {
|
|
4
4
|
typeOf: factory.transactionType;
|
|
@@ -13,6 +13,7 @@ interface IProcessKey {
|
|
|
13
13
|
interface IOptions {
|
|
14
14
|
lockExpiresInSeconds: number;
|
|
15
15
|
}
|
|
16
|
+
type RedisClientType = ReturnType<typeof createClient>;
|
|
16
17
|
/**
|
|
17
18
|
* 取引プロセスリポジトリ
|
|
18
19
|
*/
|
package/package.json
CHANGED