@aristid/leav-types 1.4.1-9e3f8604 → 1.4.1-ca7c8baf
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/apps/core/config/default.d.ts +1 -1
- package/apps/core/src/_types/config.d.ts +2 -2
- package/apps/core/src/domain/logsCollector/logsCollectorDomain.d.ts +3 -3
- package/apps/core/src/infra/{elasticSearch/elasticSearchService.d.ts → elasticsearch/elasticsearchService.d.ts} +4 -4
- package/apps/core/src/infra/elasticsearch/index.d.ts +1 -0
- package/apps/core/src/infra/log/logRepo.d.ts +3 -3
- package/package.json +1 -1
- package/apps/core/src/infra/elasticSearch/index.d.ts +0 -1
- /package/apps/core/src/infra/{elasticSearch/elasticSearchClient.d.ts → elasticsearch/elasticsearchClient.d.ts} +0 -0
|
@@ -211,7 +211,7 @@ export declare namespace dbProfiler {
|
|
|
211
211
|
let enable_3: boolean;
|
|
212
212
|
export { enable_3 as enable };
|
|
213
213
|
}
|
|
214
|
-
export declare namespace
|
|
214
|
+
export declare namespace elasticsearch {
|
|
215
215
|
export let indexPrefix: string;
|
|
216
216
|
let url_2: string;
|
|
217
217
|
export { url_2 as url };
|
|
@@ -29,7 +29,7 @@ export interface IConfig {
|
|
|
29
29
|
files: IFilesConfig;
|
|
30
30
|
dbProfiler: IDbProfilerConfig;
|
|
31
31
|
instanceId: string;
|
|
32
|
-
|
|
32
|
+
elasticsearch: IElasticsearchConfig;
|
|
33
33
|
logsCollector: ILogsCollector;
|
|
34
34
|
pluginsPath: string[];
|
|
35
35
|
bugsnag: IBugsnag;
|
|
@@ -225,7 +225,7 @@ export interface IFilesConfig {
|
|
|
225
225
|
export interface IDbProfilerConfig {
|
|
226
226
|
enable: boolean;
|
|
227
227
|
}
|
|
228
|
-
export interface
|
|
228
|
+
export interface IElasticsearchConfig {
|
|
229
229
|
indexPrefix: string;
|
|
230
230
|
url: string;
|
|
231
231
|
ilmPolicyName: string;
|
|
@@ -2,7 +2,7 @@ import { type IAmqpService } from '@leav/message-broker';
|
|
|
2
2
|
import { type ILogger } from '@leav/logger';
|
|
3
3
|
import type * as Config from '_types/config';
|
|
4
4
|
import { type IIndexationService } from '../../infra/indexation/indexationService';
|
|
5
|
-
import { type
|
|
5
|
+
import { type IElasticsearchService } from '../../infra/elasticsearch/elasticsearchService';
|
|
6
6
|
export interface ILogsCollectorDomain {
|
|
7
7
|
init(): Promise<void>;
|
|
8
8
|
}
|
|
@@ -11,6 +11,6 @@ export interface ILogsCollectorDomainDeps {
|
|
|
11
11
|
'core.infra.amqpService': IAmqpService;
|
|
12
12
|
'core.infra.indexation.indexationService': IIndexationService;
|
|
13
13
|
'core.utils.logger': ILogger;
|
|
14
|
-
'core.infra.
|
|
14
|
+
'core.infra.elasticsearch.service': IElasticsearchService;
|
|
15
15
|
}
|
|
16
|
-
export default function ({ config, 'core.infra.amqpService': amqpService, 'core.infra.indexation.indexationService': indexationService, 'core.utils.logger': logger, 'core.infra.
|
|
16
|
+
export default function ({ config, 'core.infra.amqpService': amqpService, 'core.infra.indexation.indexationService': indexationService, 'core.utils.logger': logger, 'core.infra.elasticsearch.service': esService }: ILogsCollectorDomainDeps): ILogsCollectorDomain;
|
|
@@ -15,14 +15,14 @@ interface IElasticsearchServiceSearchParams {
|
|
|
15
15
|
};
|
|
16
16
|
query?: estypes.QueryDslQueryContainer;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
18
|
+
export interface IElasticsearchService {
|
|
19
19
|
client: Client;
|
|
20
20
|
search: <T>(params: IElasticsearchServiceSearchParams) => Promise<IElasticsearchServiceSearchResponse<T>>;
|
|
21
21
|
writeData: (indexName: string, data: Log) => Promise<void>;
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
24
|
-
'core.infra.
|
|
23
|
+
export interface IElasticsearchServiceDeps {
|
|
24
|
+
'core.infra.elasticsearch.client'?: Client;
|
|
25
25
|
config?: IConfig;
|
|
26
26
|
}
|
|
27
|
-
export default function ({ config }:
|
|
27
|
+
export default function ({ config }: IElasticsearchServiceDeps): IElasticsearchService;
|
|
28
28
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as service } from './elasticsearchService';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IElasticsearchService } from 'infra/elasticsearch/elasticsearchService';
|
|
2
2
|
import { type IConfig } from '_types/config';
|
|
3
3
|
import { type ILogFilters, type ILogPagination, type ILogResponse, type ILogSort } from '_types/log';
|
|
4
4
|
import { type IQueryInfos } from '_types/queryInfos';
|
|
@@ -10,8 +10,8 @@ export interface ILogRepo {
|
|
|
10
10
|
}, ctx: IQueryInfos): Promise<ILogResponse>;
|
|
11
11
|
}
|
|
12
12
|
interface IDeps {
|
|
13
|
-
'core.infra.
|
|
13
|
+
'core.infra.elasticsearch.service'?: IElasticsearchService;
|
|
14
14
|
config?: IConfig;
|
|
15
15
|
}
|
|
16
|
-
export default function ({ 'core.infra.
|
|
16
|
+
export default function ({ 'core.infra.elasticsearch.service': esService, config }: IDeps): ILogRepo;
|
|
17
17
|
export {};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as service } from './elasticSearchService';
|
|
File without changes
|