@aristid/leav-types 1.4.1-a44cd133 → 1.4.1-c4c4870f

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.
Files changed (31) hide show
  1. package/apps/core/config/default.d.ts +13 -7
  2. package/apps/core/config/development.d.ts +7 -0
  3. package/apps/core/config/test.d.ts +12 -6
  4. package/apps/core/src/__tests__/e2e/api/e2eUtils.d.ts +23 -2
  5. package/apps/core/src/__tests__/integration/domain/taskManagerDomain.test.d.ts +1 -0
  6. package/apps/core/src/__tests__/integration/infra/integrationTestRepoUtils.d.ts +1 -1
  7. package/apps/core/src/__tests__/integration/integrationTestUtils.d.ts +7 -0
  8. package/apps/core/src/_types/config.d.ts +17 -2
  9. package/apps/core/src/_types/errors.d.ts +1 -0
  10. package/apps/core/src/_types/eventsManager.d.ts +9 -1
  11. package/apps/core/src/app/auth/authApp.d.ts +3 -3
  12. package/apps/core/src/app/core/index.d.ts +1 -0
  13. package/apps/core/src/app/core/notificationApp.d.ts +10 -0
  14. package/apps/core/src/app/core/tasksManagerApp.d.ts +1 -1
  15. package/apps/core/src/domain/actions/excelCalculationAction.d.ts +6 -4
  16. package/apps/core/src/domain/export/exportDomain.d.ts +4 -1
  17. package/apps/core/src/domain/export/exportProfileDomain.d.ts +23 -0
  18. package/apps/core/src/domain/export/exportProfileDomain.spec.d.ts +1 -0
  19. package/apps/core/src/domain/export/index.d.ts +1 -0
  20. package/apps/core/src/domain/tasksManager/tasksManagerDomain.d.ts +1 -1
  21. package/apps/core/src/errors/CustomConfigError.d.ts +4 -0
  22. package/apps/core/src/infra/cache/cacheService.d.ts +4 -3
  23. package/apps/core/src/infra/cache/index.d.ts +1 -2
  24. package/apps/core/src/infra/cache/ramService.d.ts +1 -7
  25. package/apps/core/src/infra/cache/redis.d.ts +5 -1
  26. package/apps/core/src/infra/oidc/oidcClientService.d.ts +3 -3
  27. package/apps/core/src/infra/session/index.d.ts +1 -0
  28. package/apps/core/src/infra/session/sessionRepo.d.ts +8 -0
  29. package/apps/core/src/interface/tasksManager.d.ts +1 -1
  30. package/libs/config-manager/src/envTo.d.ts +4 -0
  31. package/package.json +1 -1
@@ -77,6 +77,12 @@ export declare namespace mailer {
77
77
  }
78
78
  export { auth_1 as auth };
79
79
  }
80
+ export declare namespace actions {
81
+ namespace excel {
82
+ let useNewHyperformula: boolean;
83
+ let debug: boolean;
84
+ }
85
+ }
80
86
  export declare namespace bugsnag {
81
87
  let enable_1: boolean;
82
88
  export { enable_1 as enable };
@@ -93,7 +99,7 @@ export declare namespace matomo {
93
99
  export let siteId: string;
94
100
  }
95
101
  export declare namespace lang {
96
- export let available: string | string[];
102
+ export let available: string[];
97
103
  let _default: string;
98
104
  export { _default as default };
99
105
  }
@@ -122,7 +128,8 @@ export declare namespace redis {
122
128
  export { host_2 as host };
123
129
  let port_3: string;
124
130
  export { port_3 as port };
125
- export let database: number;
131
+ export let cacheDatabase: number;
132
+ export let sessionDatabase: number;
126
133
  }
127
134
  export declare namespace filesManager {
128
135
  namespace queues {
@@ -168,8 +175,7 @@ export declare namespace eventsManager {
168
175
  }
169
176
  export { routingKeys_2 as routingKeys };
170
177
  export namespace queues_2 {
171
- let pubsub_events_1: string;
172
- export { pubsub_events_1 as pubsub_events };
178
+ let pubsub_events_prefix: string;
173
179
  }
174
180
  export { queues_2 as queues };
175
181
  }
@@ -180,7 +186,7 @@ export declare namespace indexationManager {
180
186
  }
181
187
  export { queues_3 as queues };
182
188
  }
183
- export declare let debug: boolean;
189
+ declare let debug_1: boolean;
184
190
  export declare let defaultUserId: string;
185
191
  export declare namespace _export {
186
192
  let directory_1: string;
@@ -235,5 +241,5 @@ export declare namespace elasticsearch {
235
241
  export declare namespace logsCollector {
236
242
  let queue: string;
237
243
  }
238
- export declare let pluginsPath: string | any[];
239
- export { _export as export, _import as import };
244
+ export declare let pluginsPath: string[];
245
+ export { debug_1 as debug, _export as export, _import as import };
@@ -14,3 +14,10 @@ export namespace dbProfiler {
14
14
  export namespace bugsnag {
15
15
  let releaseStage: string;
16
16
  }
17
+ export namespace actions {
18
+ namespace excel {
19
+ export let useNewHyperformula: boolean;
20
+ let debug_1: boolean;
21
+ export { debug_1 as debug };
22
+ }
23
+ }
@@ -26,24 +26,29 @@ export namespace filesManager {
26
26
  }
27
27
  }
28
28
  export namespace eventsManager {
29
- namespace routingKeys {
29
+ export namespace routingKeys {
30
30
  let data_events: string;
31
+ let pubsub_events: string;
31
32
  }
33
+ export namespace queues_1 {
34
+ let pubsub_events_prefix: string;
35
+ }
36
+ export { queues_1 as queues };
32
37
  }
33
38
  export namespace indexationManager {
34
- export namespace queues_1 {
39
+ export namespace queues_2 {
35
40
  let events_1: string;
36
41
  export { events_1 as events };
37
42
  }
38
- export { queues_1 as queues };
43
+ export { queues_2 as queues };
39
44
  }
40
45
  export namespace tasksManager {
41
46
  export let checkingInterval: number;
42
- export namespace queues_2 {
47
+ export namespace queues_3 {
43
48
  let execOrders: string;
44
49
  let cancelOrders: string;
45
50
  }
46
- export { queues_2 as queues };
51
+ export { queues_3 as queues };
47
52
  export namespace routingKeys_1 {
48
53
  let execOrders_1: string;
49
54
  export { execOrders_1 as execOrders };
@@ -77,6 +82,7 @@ export namespace mailer {
77
82
  }
78
83
  export let debug: boolean;
79
84
  export namespace redis {
80
- let database: number;
85
+ let cacheDatabase: number;
86
+ let sessionDatabase: number;
81
87
  }
82
88
  export let pluginsPath: string[];
@@ -1,10 +1,24 @@
1
- import type WebSocket from 'ws';
1
+ import WebSocket from 'ws';
2
+ import { type Client as GraphqlWsClient } from 'graphql-ws';
3
+ import { type AxiosResponse } from 'axios';
2
4
  import type FormData from 'form-data';
3
5
  import { type ActionsListConfig } from '_types/actionsList';
4
6
  import { type ITreeElement } from '_types/tree';
5
7
  import { AttributeFormats, type AttributeTypes, type IAttributeVersionsConf, type IEmbeddedAttribute } from '../../../_types/attribute';
8
+ interface IE2EUser {
9
+ getAuthToken: () => Promise<string>;
10
+ }
11
+ export declare const e2eAdminUser: () => IE2EUser;
12
+ export declare const e2eGuestUser: () => Promise<IE2EUser>;
6
13
  export declare function getGraphQLUrl(): Promise<string>;
7
- export declare function makeGraphQlCall(query: string | FormData, throwOnErrors?: boolean): Promise<any>;
14
+ export declare class E2EGraphQLError extends Error {
15
+ readonly response: AxiosResponse;
16
+ constructor(message: string, response: AxiosResponse);
17
+ }
18
+ export interface IMakeGraphQlCallOptions {
19
+ user?: IE2EUser;
20
+ }
21
+ export declare function makeGraphQlCall(query: string | FormData, options?: IMakeGraphQlCallOptions): Promise<any>;
8
22
  export declare function gqlSaveLibrary(id: string, label: string, additionalAttributes?: string[]): Promise<any>;
9
23
  export declare function gqlSaveApplication(id: string, label: string, endpoint: string): Promise<any>;
10
24
  export declare function gqlSaveAttribute(params: {
@@ -42,6 +56,13 @@ export declare function gqlSaveVersionProfile(profileId: string, label: string,
42
56
  * Convert object to JSON, escaping quotes to be able to use it in a graphql query
43
57
  **/
44
58
  export declare function toCleanJSON(obj: {}): string;
59
+ export declare function makeWebSocketGraphQlCall(options?: {
60
+ user: IE2EUser;
61
+ }): Promise<GraphqlWsClient>;
62
+ export declare function waitGraphqlWebSocketMessage<T>(client: GraphqlWsClient, query: string, variables: Record<string, any>, acceptMessage: (msg: T) => boolean, { timeoutMs }: {
63
+ timeoutMs: any;
64
+ }): Promise<T>;
45
65
  export declare function waitWebSocketMessage<T>(webSocket: WebSocket, acceptMessage: (msg: T) => boolean, { timeoutMs }: {
46
66
  timeoutMs: any;
47
67
  }): Promise<T>;
68
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { type ILibraryRepo } from 'infra/library/libraryRepo';
2
2
  import { type IRecordRepo } from 'infra/record/recordRepo';
3
3
  import { type ITreeRepo } from 'infra/tree/treeRepo';
4
- export declare const getCoreDep: <T>(path: any) => T;
5
4
  export declare const getLibraryRepo: () => ILibraryRepo;
6
5
  export declare const getRecordRepo: () => IRecordRepo;
7
6
  export declare const getTreeRepo: () => ITreeRepo;
7
+ export * from '../integrationTestUtils';
@@ -0,0 +1,7 @@
1
+ import { type AwilixContainer } from 'awilix';
2
+ export interface IGlobalThis {
3
+ coreContainer: AwilixContainer;
4
+ taskManagerMasterTimer: NodeJS.Timeout;
5
+ }
6
+ export declare const getCoreContainer: () => AwilixContainer;
7
+ export declare const getCoreDep: <T>(path: any) => T;
@@ -25,6 +25,7 @@ export interface IConfig {
25
25
  plugins: IKeyValue<IKeyValue<any>>;
26
26
  preview: IPreview;
27
27
  applications: IApplicationsConfig;
28
+ actions: IActions;
28
29
  files: IFilesConfig;
29
30
  dbProfiler: IDbProfilerConfig;
30
31
  instanceId: string;
@@ -62,6 +63,19 @@ export interface IServer {
62
63
  email: string;
63
64
  };
64
65
  }
66
+ export interface IActions {
67
+ excel: {
68
+ /**
69
+ * Replace deprecated hot-formula-parser npm module by new hyperformula npm module
70
+ * Formulas should be compatible
71
+ */
72
+ useNewHyperformula: boolean;
73
+ /**
74
+ * Add debug log for each calculation with formula and result or error
75
+ */
76
+ debug: boolean;
77
+ };
78
+ }
65
79
  export interface IDb {
66
80
  url: string;
67
81
  name: string;
@@ -132,7 +146,8 @@ export interface IAmqp {
132
146
  export interface IRedis {
133
147
  host: string;
134
148
  port: number;
135
- database: number;
149
+ cacheDatabase: number;
150
+ sessionDatabase: number;
136
151
  }
137
152
  export interface IFilesManager {
138
153
  queues: {
@@ -157,7 +172,7 @@ export interface IEventsManager {
157
172
  pubsub_events: string;
158
173
  };
159
174
  queues: {
160
- pubsub_events: string;
175
+ pubsub_events_prefix: string;
161
176
  };
162
177
  }
163
178
  export interface IIndexationManager {
@@ -1,6 +1,7 @@
1
1
  export declare enum ErrorTypes {
2
2
  VALIDATION_ERROR = "VALIDATION_ERROR",
3
3
  PERMISSION_ERROR = "PERMISSION_ERROR",
4
+ CUSTOM_CONFIG_ERROR = "CUSTOM_CONFIG_ERROR",
4
5
  INTERNAL_ERROR = "INTERNAL_ERROR"
5
6
  }
6
7
  export declare enum Errors {
@@ -1,8 +1,16 @@
1
+ import { type INotificationContent } from './notification';
1
2
  export declare enum TriggerNames {
2
3
  APPLICATION_EVENT = "APPLICATION_EVENT",
3
4
  UPLOAD_FILE = "UPLOAD_FILE",
4
5
  INDEXATION = "INDEXATION",
5
6
  TASK = "TASK",
6
7
  TREE_EVENT = "TREE_EVENT",
7
- RECORD_UPDATE = "RECORD_UPDATE"
8
+ RECORD_UPDATE = "RECORD_UPDATE",
9
+ NOTIFICATION = "NOTIFICATION"
10
+ }
11
+ export interface IPubSubNotificationData {
12
+ notification: INotificationContent & {
13
+ date: number;
14
+ };
15
+ recipientUserIds: string[];
8
16
  }
@@ -4,7 +4,6 @@ import { type IUserDomain } from 'domain/user/userDomain';
4
4
  import { type IValueDomain } from 'domain/value/valueDomain';
5
5
  import { type Response } from 'express';
6
6
  import { type IConfig } from '_types/config';
7
- import { type ICachesService } from '../../infra/cache/cacheService';
8
7
  import { type ITokenUserData } from '../../_types/auth';
9
8
  import { type IRequestWithContext } from '../../_types/express';
10
9
  import { type ILogger } from '@leav/logger';
@@ -16,6 +15,7 @@ import { type IRecordRepo } from '../../infra/record/recordRepo';
16
15
  import { type IGraphqlAppModule } from 'app/graphql/graphqlApp';
17
16
  import { type IServerRouteAppModule } from 'interface/server';
18
17
  import { type GetSystemQueryContext } from 'utils/helpers/getSystemQueryContext';
18
+ import { type ISessionRepo } from '../../infra/session/sessionRepo';
19
19
  export interface IAuthApp extends IGraphqlAppModule, IServerRouteAppModule {
20
20
  validateRequestToken(params: {
21
21
  apiKey?: string;
@@ -30,12 +30,12 @@ export interface IAuthAppDeps {
30
30
  'core.infra.record': IRecordRepo;
31
31
  'core.domain.apiKey': IApiKeyDomain;
32
32
  'core.domain.user': IUserDomain;
33
- 'core.infra.cache.cacheService': ICachesService;
34
33
  'core.utils.logger': ILogger;
35
34
  'core.infra.oidc.oidcClientService': IOIDCClientService;
36
35
  'core.app.helpers.initQueryContext': InitQueryContextFunc;
37
36
  'core.app.helpers.convertOIDCIdentifier': IConvertOIDCIdentifier;
38
37
  'core.utils.getSystemQueryContext': GetSystemQueryContext;
39
38
  config: IConfig;
39
+ 'core.infra.session': ISessionRepo;
40
40
  }
41
- export default function ({ 'core.domain.value': valueDomain, 'core.domain.record': recordDomain, 'core.infra.record': recordRepo, 'core.domain.apiKey': apiKeyDomain, 'core.domain.user': userDomain, 'core.utils.logger': logger, 'core.infra.cache.cacheService': cacheService, 'core.infra.oidc.oidcClientService': oidcClientService, 'core.app.helpers.initQueryContext': initQueryContext, 'core.app.helpers.convertOIDCIdentifier': convertOIDCIdentifier, 'core.utils.getSystemQueryContext': getSystemQueryContext, config }: IAuthAppDeps): IAuthApp;
41
+ export default function ({ 'core.domain.value': valueDomain, 'core.domain.record': recordDomain, 'core.infra.record': recordRepo, 'core.domain.apiKey': apiKeyDomain, 'core.domain.user': userDomain, 'core.utils.logger': logger, 'core.infra.oidc.oidcClientService': oidcClientService, 'core.app.helpers.initQueryContext': initQueryContext, 'core.app.helpers.convertOIDCIdentifier': convertOIDCIdentifier, 'core.utils.getSystemQueryContext': getSystemQueryContext, 'core.infra.session': sessionRepo, config }: IAuthAppDeps): IAuthApp;
@@ -17,6 +17,7 @@ export { default as permission } from './permissionApp/permissionApp';
17
17
  export { default as plugins } from './pluginsApp';
18
18
  export { default as record } from './recordApp/recordApp';
19
19
  export { default as tasksManager } from './tasksManagerApp';
20
+ export { default as notification } from './notificationApp';
20
21
  export { default as tree } from './treeApp/treeApp';
21
22
  export { default as userData } from './userDataApp';
22
23
  export { default as value } from './valueApp';
@@ -0,0 +1,10 @@
1
+ import { type IGraphqlAppModule } from 'app/graphql/graphqlApp';
2
+ import { type IEventsManagerDomain } from 'domain/eventsManager/eventsManagerDomain';
3
+ import { type IUtils } from 'utils/utils';
4
+ export type INotificationApp = IGraphqlAppModule;
5
+ interface IDeps {
6
+ 'core.utils'?: IUtils;
7
+ 'core.domain.eventsManager'?: IEventsManagerDomain;
8
+ }
9
+ export default function ({ 'core.domain.eventsManager': eventsManager }: IDeps): INotificationApp;
10
+ export {};
@@ -8,7 +8,7 @@ import { type ITasksManagerDomain } from '../../domain/tasksManager/tasksManager
8
8
  import { TaskStatus } from '../../_types/tasksManager';
9
9
  import { type IGraphqlAppModule } from 'app/graphql/graphqlApp';
10
10
  export interface ITasksManagerApp extends IGraphqlAppModule {
11
- initMaster(): Promise<NodeJS.Timer>;
11
+ initMaster(): Promise<NodeJS.Timeout>;
12
12
  initWorker(): Promise<void>;
13
13
  }
14
14
  interface IDeps {
@@ -1,11 +1,13 @@
1
+ import { type ILogger } from '@leav/logger';
1
2
  import { type ICalculationVariable } from 'domain/helpers/calculationVariable';
2
- import { type IUtils } from 'utils/utils';
3
3
  import { type IActionsListFunction } from '../../_types/actionsList';
4
+ import { type IConfig } from '_types/config';
4
5
  interface IDeps {
5
- 'core.domain.helpers.calculationVariable'?: ICalculationVariable;
6
- 'core.utils'?: IUtils;
6
+ 'core.domain.helpers.calculationVariable': ICalculationVariable;
7
+ config: IConfig;
8
+ 'core.utils.logger': ILogger;
7
9
  }
8
- export default function ({ 'core.domain.helpers.calculationVariable': calculationVariable }?: IDeps): IActionsListFunction<{
10
+ export default function ({ 'core.domain.helpers.calculationVariable': calculationVariable, 'core.utils.logger': logger, config }: IDeps): IActionsListFunction<{
9
11
  Formula: true;
10
12
  Description: true;
11
13
  }>;
@@ -12,8 +12,10 @@ import { type IRecordFilterLight } from '../../_types/record';
12
12
  import { type ITaskFuncParams } from '../../_types/tasksManager';
13
13
  import { type IValidateHelper } from '../helpers/validate';
14
14
  import { type INotificationDomain } from 'domain/notification/notificationDomain';
15
+ import { type IExportProfileDomain } from './exportProfileDomain';
15
16
  export interface IExportParams {
16
17
  library: string;
18
+ profile: string;
17
19
  attributes: string[];
18
20
  filters?: IRecordFilterLight[];
19
21
  ctx: IQueryInfos;
@@ -41,8 +43,9 @@ export interface IExportDomainDeps {
41
43
  'core.domain.helpers.updateTaskProgress': UpdateTaskProgress;
42
44
  'core.domain.eventsManager': IEventsManagerDomain;
43
45
  'core.domain.notification': INotificationDomain;
46
+ 'core.domain.export.exportProfile': IExportProfileDomain;
44
47
  'core.utils': IUtils;
45
48
  translator: i18n;
46
49
  config: Config.IConfig;
47
50
  }
48
- export default function ({ config, 'core.domain.record': recordDomain, 'core.domain.helpers.validate': validateHelper, 'core.domain.attribute': attributeDomain, 'core.domain.library': libraryDomain, 'core.domain.tasksManager': tasksManager, 'core.domain.helpers.updateTaskProgress': updateTaskProgress, 'core.domain.eventsManager': eventsManagerDomain, 'core.domain.notification': notificationDomain, 'core.utils': utils, translator }: IExportDomainDeps): IExportDomain;
51
+ export default function ({ config, 'core.domain.record': recordDomain, 'core.domain.helpers.validate': validateHelper, 'core.domain.attribute': attributeDomain, 'core.domain.library': libraryDomain, 'core.domain.tasksManager': tasksManager, 'core.domain.helpers.updateTaskProgress': updateTaskProgress, 'core.domain.eventsManager': eventsManagerDomain, 'core.domain.notification': notificationDomain, 'core.domain.export.exportProfile': exportProfileDomain, 'core.utils': utils, translator }: IExportDomainDeps): IExportDomain;
@@ -0,0 +1,23 @@
1
+ import { type ILibraryDomain } from '../library/libraryDomain';
2
+ import { type IQueryInfos } from '../../_types/queryInfos';
3
+ export interface IExportProfileConfig {
4
+ profileSelected: string;
5
+ profiles: Array<{
6
+ label: string;
7
+ columns: Array<{
8
+ columnLabel: string;
9
+ attribute: string;
10
+ }>;
11
+ }>;
12
+ }
13
+ export interface IExportColumn {
14
+ columnLabel: string;
15
+ attribute: string;
16
+ }
17
+ export interface IExportProfileDomain {
18
+ getColumnsFromProfileConfig(profile: string, library: string, ctx: IQueryInfos): Promise<IExportColumn[]>;
19
+ }
20
+ export interface IExportProfileDomainDeps {
21
+ 'core.domain.library': ILibraryDomain;
22
+ }
23
+ export default function ({ 'core.domain.library': libraryDomain }: IExportProfileDomainDeps): IExportProfileDomain;
@@ -1 +1,2 @@
1
1
  export { default } from './exportDomain';
2
+ export { default as exportProfile } from './exportProfileDomain';
@@ -38,7 +38,7 @@ interface IGetTasksParams extends IGetCoreEntitiesParams {
38
38
  };
39
39
  }
40
40
  export interface ITasksManagerDomain {
41
- initMaster(): Promise<NodeJS.Timer>;
41
+ initMaster(): Promise<NodeJS.Timeout>;
42
42
  initWorker(): Promise<void>;
43
43
  getTasks({ params, ctx }: {
44
44
  params: IGetTasksParams;
@@ -0,0 +1,4 @@
1
+ import LeavError from './LeavError';
2
+ export default class CustomConfigError<T> extends LeavError<T> {
3
+ constructor(message?: string);
4
+ }
@@ -1,4 +1,5 @@
1
1
  import { type IQueryInfos } from '_types/queryInfos';
2
+ import { type IRedis } from './redis';
2
3
  export interface IMemoizeParams<T> {
3
4
  key: string;
4
5
  func: () => Promise<T>;
@@ -21,13 +22,13 @@ export interface ICacheService {
21
22
  deleteData(keys: string[], path?: string): Promise<void>;
22
23
  deleteAll(path?: string): Promise<void>;
23
24
  }
24
- interface IDeps {
25
- 'core.infra.cache.ramService': ICacheService;
25
+ interface ICacheServiceDeps {
26
+ 'core.infra.redis': IRedis;
26
27
  'core.infra.cache.diskService': ICacheService;
27
28
  }
28
29
  export declare enum ECacheType {
29
30
  DISK = "DISK",
30
31
  RAM = "RAM"
31
32
  }
32
- export default function ({ 'core.infra.cache.ramService': ramService, 'core.infra.cache.diskService': diskService }: IDeps): ICachesService;
33
+ export default function ({ 'core.infra.redis': redis, 'core.infra.cache.diskService': diskService }: ICacheServiceDeps): ICachesService;
33
34
  export {};
@@ -1,4 +1,3 @@
1
1
  export { initRedis } from './redis';
2
- export { default as diskService } from './diskService';
3
- export { default as ramService } from './ramService';
4
2
  export { default as cacheService } from './cacheService';
3
+ export { default as diskService } from './diskService';
@@ -1,9 +1,3 @@
1
1
  import { type ICacheService } from './cacheService';
2
2
  import { type RedisClientType } from './redis';
3
- import { type IConfig } from '../../_types/config';
4
- interface IDeps {
5
- config?: IConfig;
6
- 'core.infra.redis'?: RedisClientType;
7
- }
8
- export default function ({ 'core.infra.redis': redis, config }: IDeps): ICacheService;
9
- export {};
3
+ export default function (redisClient: RedisClientType): ICacheService;
@@ -4,5 +4,9 @@ interface IDeps {
4
4
  config?: IConfig;
5
5
  }
6
6
  export type RedisClientType = ReturnType<typeof redis.createClient>;
7
- export declare function initRedis({ config }: IDeps): Promise<RedisClientType>;
7
+ export interface IRedis {
8
+ cache: RedisClientType;
9
+ session: RedisClientType;
10
+ }
11
+ export declare function initRedis({ config }: IDeps): Promise<IRedis>;
8
12
  export {};
@@ -1,7 +1,7 @@
1
1
  import { type OidcClient } from './oidcClient';
2
2
  import { TokenSet } from 'openid-client';
3
- import { type ICachesService } from '../cache/cacheService';
4
3
  import { type IConfig } from '../../_types/config';
4
+ import { type ISessionRepo } from '../session/sessionRepo';
5
5
  export interface IOIDCClientService {
6
6
  oidcClient?: OidcClient;
7
7
  getTokensFromCodes: (params: {
@@ -30,8 +30,8 @@ export interface IOIDCClientService {
30
30
  }
31
31
  interface IDeps {
32
32
  'core.infra.oidcClient'?: OidcClient;
33
- 'core.infra.cache.cacheService'?: ICachesService;
34
33
  config?: IConfig;
34
+ 'core.infra.session'?: ISessionRepo;
35
35
  }
36
- export default function ({ 'core.infra.oidcClient': oidcClient, 'core.infra.cache.cacheService': cacheService, config }?: IDeps): IOIDCClientService;
36
+ export default function ({ 'core.infra.oidcClient': oidcClient, 'core.infra.session': sessionRepo, config }?: IDeps): IOIDCClientService;
37
37
  export {};
@@ -0,0 +1 @@
1
+ export { default } from './sessionRepo';
@@ -0,0 +1,8 @@
1
+ import { type ICacheService } from '../cache/cacheService';
2
+ import { type IRedis } from '../cache/redis';
3
+ export type ISessionRepo = ICacheService;
4
+ interface ISessionRepoDeps {
5
+ 'core.infra.redis'?: IRedis;
6
+ }
7
+ export default function ({ 'core.infra.redis': redis }: ISessionRepoDeps): ISessionRepo;
8
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { type ITasksManagerApp } from 'app/core/tasksManagerApp';
2
2
  export interface ITasksManagerInterface {
3
- initMaster(): Promise<NodeJS.Timer>;
3
+ initMaster(): Promise<NodeJS.Timeout>;
4
4
  initWorker(): Promise<void>;
5
5
  }
6
6
  interface IDeps {
@@ -6,3 +6,7 @@ export declare function envToBool(value: string, defaultValue?: boolean): boolea
6
6
  * To convert process.env string to number
7
7
  */
8
8
  export declare function envToNumber(value: string, defaultValue?: number): number;
9
+ /**
10
+ * To convert process.env string to string array
11
+ */
12
+ export declare function envToStringArray(value: string, separator?: string, defaultValue?: string[]): string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.4.1-a44cd133",
3
+ "version": "1.4.1-c4c4870f",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",