@aristid/leav-types 1.4.0-0d67062f → 1.4.0-36f123f9

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.
@@ -3,6 +3,7 @@ export declare let coreMode: string;
3
3
  export declare namespace server {
4
4
  let host: string;
5
5
  let port: number;
6
+ let keepAliveTimeout: number;
6
7
  let publicUrl: string;
7
8
  let basePath: string;
8
9
  let allowIntrospection: boolean;
@@ -214,6 +215,11 @@ export declare namespace elasticSearch {
214
215
  export let indexPrefix: string;
215
216
  let url_2: string;
216
217
  export { url_2 as url };
218
+ export let ilmPolicyName: string;
219
+ export let templateName: string;
220
+ }
221
+ export declare namespace logsCollector {
222
+ let queue: string;
217
223
  }
218
224
  export declare let pluginsPath: string | any[];
219
225
  export { _export as export, _import as import };
@@ -30,6 +30,7 @@ export interface IConfig {
30
30
  dbProfiler: IDbProfilerConfig;
31
31
  instanceId: string;
32
32
  elasticSearch: IElasticSearchConfig;
33
+ logsCollector: ILogsCollector;
33
34
  pluginsPath: string[];
34
35
  bugsnag: IBugsnag;
35
36
  matomo: IMatomo;
@@ -41,11 +42,13 @@ export declare enum CoreMode {
41
42
  INDEXATION_MANAGER = "indexationManager",
42
43
  TASKS_MANAGER_MASTER = "tasksManager:master",
43
44
  TASKS_MANAGER_WORKER = "tasksManager:worker",
45
+ LOGS_COLLECTOR = "logsCollector",
44
46
  CLI = "cli"
45
47
  }
46
48
  export interface IServer {
47
49
  host: string;
48
50
  port: number;
51
+ keepAliveTimeout: number;
49
52
  publicUrl: string;
50
53
  basePath: string;
51
54
  allowIntrospection: boolean;
@@ -225,6 +228,8 @@ export interface IDbProfilerConfig {
225
228
  export interface IElasticSearchConfig {
226
229
  indexPrefix: string;
227
230
  url: string;
231
+ ilmPolicyName: string;
232
+ templateName: string;
228
233
  }
229
234
  export interface IBugsnag {
230
235
  enable: boolean;
@@ -238,3 +243,6 @@ export interface IMatomo {
238
243
  url?: string;
239
244
  siteId?: string;
240
245
  }
246
+ export interface ILogsCollector {
247
+ queue: string;
248
+ }
@@ -0,0 +1,2 @@
1
+ import { type IDbEvent, type IDbPayload } from '@leav/utils';
2
+ export type WritableMessage = Omit<IDbEvent, 'payload' | 'emitter'> & IDbPayload;
@@ -4,6 +4,7 @@ export declare enum ErrorTypes {
4
4
  INTERNAL_ERROR = "INTERNAL_ERROR"
5
5
  }
6
6
  export declare enum Errors {
7
+ ATTRIBUTE_USED_BY_LIBRARY = "ATTRIBUTE_USED_BY_LIBRARY",
7
8
  ATTRIBUTE_USED_IN_METADATA = "ATTRIBUTE_USED_IN_METADATA",
8
9
  CANNOT_SAVE_METADATA = "CANNOT_SAVE_METADATA",
9
10
  DUPLICATE_DIRECTORY_NAMES = "DUPLICATE_DIRECTORY_NAMES",
@@ -10,6 +10,7 @@ export { default as globalSettings } from './globalSettingsApp';
10
10
  export { default as subscriptionsHelper } from './helpers/subscriptions';
11
11
  export { default as import } from './importApp';
12
12
  export { default as indexationManager } from './indexationManagerApp';
13
+ export { default as logsCollector } from './logsCollectorApp';
13
14
  export { default as library } from './libraryApp/libraryApp';
14
15
  export { default as log } from './logApp';
15
16
  export { default as permission } from './permissionApp/permissionApp';
@@ -0,0 +1,9 @@
1
+ import { type ILogsCollectorDomain } from 'domain/logsCollector/logsCollectorDomain';
2
+ export interface ILogsCollectorApp {
3
+ init(): Promise<void>;
4
+ }
5
+ interface IDeps {
6
+ 'core.domain.logsCollector': ILogsCollectorDomain;
7
+ }
8
+ export default function ({ 'core.domain.logsCollector': logsCollector }: IDeps): ILogsCollectorApp;
9
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from './logsCollectorDomain';
@@ -0,0 +1,16 @@
1
+ import { type IAmqpService } from '@leav/message-broker';
2
+ import { type ILogger } from '@leav/logger';
3
+ import type * as Config from '_types/config';
4
+ import { type IIndexationService } from '../../infra/indexation/indexationService';
5
+ import { type IElasticSearchService } from '../../infra/elasticSearch/elasticSearchService';
6
+ export interface ILogsCollectorDomain {
7
+ init(): Promise<void>;
8
+ }
9
+ export interface ILogsCollectorDomainDeps {
10
+ config: Config.IConfig;
11
+ 'core.infra.amqpService': IAmqpService;
12
+ 'core.infra.indexation.indexationService': IIndexationService;
13
+ 'core.utils.logger': ILogger;
14
+ 'core.infra.elasticSearch.service': IElasticSearchService;
15
+ }
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;
@@ -26,6 +26,7 @@ import { type DeleteRecordHelper } from './helpers/deleteRecord';
26
26
  import { type CreateRecordHelper } from './helpers/createRecord';
27
27
  import { type IElementAncestorsHelper } from 'domain/tree/helpers/elementAncestors';
28
28
  import { type ILogger } from '@leav/logger';
29
+ export declare const ATTRIBUTE_ACTIVE = "active";
29
30
  export interface IRecordDomain {
30
31
  /**
31
32
  * Create empty record
@@ -1,6 +1,6 @@
1
1
  import { Client, type estypes } from '@elastic/elasticsearch';
2
2
  import { type IConfig } from '_types/config';
3
- import { type IQueryInfos } from '_types/queryInfos';
3
+ import { type Log } from '@leav/utils';
4
4
  export interface IElasticsearchServiceSearchResponse<T> {
5
5
  total: number;
6
6
  hits: T[];
@@ -17,11 +17,12 @@ interface IElasticsearchServiceSearchParams {
17
17
  }
18
18
  export interface IElasticSearchService {
19
19
  client: Client;
20
- search: <T>(params: IElasticsearchServiceSearchParams, ctx: IQueryInfos) => Promise<IElasticsearchServiceSearchResponse<T>>;
20
+ search: <T>(params: IElasticsearchServiceSearchParams) => Promise<IElasticsearchServiceSearchResponse<T>>;
21
+ writeData: (indexName: string, data: Log) => Promise<void>;
21
22
  }
22
- interface IDeps {
23
+ export interface IElasticSearchServiceDeps {
23
24
  'core.infra.elasticSearch.client'?: Client;
24
25
  config?: IConfig;
25
26
  }
26
- export default function ({ config }: IDeps): IElasticSearchService;
27
+ export default function ({ config }: IElasticSearchServiceDeps): IElasticSearchService;
27
28
  export {};
@@ -1,5 +1,6 @@
1
1
  export { default as cli } from './cli';
2
2
  export { default as filesManager } from './filesManager';
3
3
  export { default as indexationManager } from './indexationManager';
4
+ export { default as logsCollector } from './logsCollector';
4
5
  export { default as tasksManager } from './tasksManager';
5
6
  export { default as server } from './server';
@@ -0,0 +1,9 @@
1
+ import { type ILogsCollectorApp } from 'app/core/logsCollectorApp';
2
+ export interface ILogsCollectorInterface {
3
+ init(): Promise<void>;
4
+ }
5
+ interface IDeps {
6
+ 'core.app.core.logsCollector': ILogsCollectorApp;
7
+ }
8
+ export default function ({ 'core.app.core.logsCollector': logsCollector }: IDeps): ILogsCollectorInterface;
9
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.4.0-0d67062f",
3
+ "version": "1.4.0-36f123f9",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",