@aristid/leav-types 1.4.1-9e3f8604 → 1.4.1-9f01cb80

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 (165) hide show
  1. package/apps/core/config/default.d.ts +37 -16
  2. package/apps/core/config/development.d.ts +7 -4
  3. package/apps/core/config/test.d.ts +43 -9
  4. package/apps/core/src/__tests__/e2e/api/e2eUtils.d.ts +29 -3
  5. package/apps/core/src/__tests__/e2e/api/export/export.test.d.ts +1 -0
  6. package/apps/core/src/__tests__/e2e/api/import/import.test.d.ts +1 -0
  7. package/apps/core/src/__tests__/e2e/api/mailpitUtils.d.ts +21 -0
  8. package/apps/core/src/__tests__/integration/domain/taskManagerDomain.test.d.ts +1 -0
  9. package/apps/core/src/__tests__/integration/infra/integrationTestRepoUtils.d.ts +1 -1
  10. package/apps/core/src/__tests__/integration/integrationTestUtils.d.ts +7 -0
  11. package/apps/core/src/_constants/attributes.d.ts +2 -1
  12. package/apps/core/src/_types/config.d.ts +41 -7
  13. package/apps/core/src/_types/errors.d.ts +1 -1
  14. package/apps/core/src/_types/eventsManager.d.ts +13 -1
  15. package/apps/core/src/_types/forms.d.ts +2 -2
  16. package/apps/core/src/_types/notification.d.ts +51 -0
  17. package/apps/core/src/_types/userData.d.ts +10 -0
  18. package/apps/core/src/app/application/applicationApp.d.ts +1 -1
  19. package/apps/core/src/app/auth/authApp.d.ts +3 -3
  20. package/apps/core/src/app/core/apiKeyApp/apiKeyApp.d.ts +1 -1
  21. package/apps/core/src/app/core/coreApp.d.ts +1 -1
  22. package/apps/core/src/app/core/eventsManagerApp.d.ts +1 -1
  23. package/apps/core/src/app/core/filesManagerApp.d.ts +1 -1
  24. package/apps/core/src/app/core/formApp/formApp.d.ts +1 -1
  25. package/apps/core/src/app/core/globalSettingsApp.d.ts +1 -1
  26. package/apps/core/src/app/core/importApp.d.ts +1 -1
  27. package/apps/core/src/app/core/index.d.ts +1 -0
  28. package/apps/core/src/app/core/libraryApp/libraryApp.d.ts +1 -1
  29. package/apps/core/src/app/core/logApp.d.ts +1 -1
  30. package/apps/core/src/app/core/notificationApp.d.ts +10 -0
  31. package/apps/core/src/app/core/permissionApp/permissionApp.d.ts +1 -1
  32. package/apps/core/src/app/core/recordApp/_types.d.ts +1 -0
  33. package/apps/core/src/app/core/recordApp/recordApp.d.ts +1 -1
  34. package/apps/core/src/app/core/tasksManagerApp.d.ts +2 -2
  35. package/apps/core/src/app/core/treeApp/treeApp.d.ts +1 -1
  36. package/apps/core/src/app/core/valueApp.d.ts +1 -1
  37. package/apps/core/src/app/core/versionProfileApp/versionProfileApp.d.ts +1 -1
  38. package/apps/core/src/app/core/viewApp.d.ts +1 -1
  39. package/apps/core/src/app/endpoint/endpointApp.d.ts +1 -1
  40. package/apps/core/src/app/graphql/graphqlApp.d.ts +1 -1
  41. package/apps/core/src/domain/actions/excelCalculationAction.d.ts +6 -4
  42. package/apps/core/src/domain/actions/inheritanceCalculationAction.d.ts +1 -1
  43. package/apps/core/src/domain/apiKey/apiKeyDomain.d.ts +1 -1
  44. package/apps/core/src/domain/application/applicationDomain.d.ts +1 -1
  45. package/apps/core/src/domain/attribute/attributeDomain.d.ts +1 -1
  46. package/apps/core/src/domain/attribute/helpers/ifLibraryJoinLinkAttribute.d.ts +1 -1
  47. package/apps/core/src/domain/eventsManager/eventsManagerDomain.d.ts +1 -1
  48. package/apps/core/src/domain/export/exportDomain.d.ts +6 -2
  49. package/apps/core/src/domain/export/exportProfileDomain.d.ts +23 -0
  50. package/apps/core/src/domain/export/exportProfileDomain.spec.d.ts +1 -0
  51. package/apps/core/src/domain/export/index.d.ts +1 -0
  52. package/apps/core/src/domain/filesManager/filesManagerDomain.d.ts +1 -1
  53. package/apps/core/src/domain/filesManager/helpers/handlePreview.d.ts +1 -1
  54. package/apps/core/src/domain/filesManager/helpers/messagesHandler/messagesHandler.d.ts +1 -1
  55. package/apps/core/src/domain/form/formDomain.d.ts +1 -1
  56. package/apps/core/src/domain/form/helpers/mustIncludeElement.d.ts +1 -1
  57. package/apps/core/src/domain/globalSettings/globalSettingsDomain.d.ts +1 -1
  58. package/apps/core/src/domain/helpers/calculationsVariableFunctions/index.d.ts +1 -1
  59. package/apps/core/src/domain/helpers/getCoreEntityById.d.ts +1 -1
  60. package/apps/core/src/domain/helpers/updateRecordLastModif.d.ts +1 -1
  61. package/apps/core/src/domain/helpers/updateTaskProgress.d.ts +1 -1
  62. package/apps/core/src/domain/helpers/validate.d.ts +1 -1
  63. package/apps/core/src/domain/import/importDomain.d.ts +1 -1
  64. package/apps/core/src/domain/indexationManager/indexationManagerDomain.d.ts +1 -1
  65. package/apps/core/src/domain/library/helpers/deleteAssociatedValues.d.ts +1 -1
  66. package/apps/core/src/domain/library/helpers/runPreDelete.d.ts +1 -1
  67. package/apps/core/src/domain/library/libraryDomain.d.ts +1 -1
  68. package/apps/core/src/domain/log/logDomain.d.ts +1 -1
  69. package/apps/core/src/domain/logsCollector/logsCollectorDomain.d.ts +3 -3
  70. package/apps/core/src/domain/notification/channels/emailChannel.d.ts +12 -0
  71. package/apps/core/src/domain/notification/channels/webSocketChannel.d.ts +6 -0
  72. package/apps/core/src/domain/notification/index.d.ts +3 -0
  73. package/apps/core/src/domain/notification/notificationDomain.d.ts +12 -0
  74. package/apps/core/src/domain/permission/_types.d.ts +8 -19
  75. package/apps/core/src/domain/permission/adminPermissionDomain.d.ts +1 -1
  76. package/apps/core/src/domain/permission/applicationPermissionDomain.d.ts +1 -1
  77. package/apps/core/src/domain/permission/helpers/defaultPermission.d.ts +6 -1
  78. package/apps/core/src/domain/permission/helpers/getPermissionCachePatternKey.d.ts +1 -1
  79. package/apps/core/src/domain/permission/helpers/globalPermission.d.ts +4 -10
  80. package/apps/core/src/domain/permission/helpers/permissionByUserGroups.d.ts +2 -1
  81. package/apps/core/src/domain/permission/helpers/recordInCreationBypass.d.ts +1 -1
  82. package/apps/core/src/domain/permission/helpers/simplePermission.d.ts +1 -1
  83. package/apps/core/src/domain/permission/libraryPermissionDomain.d.ts +1 -1
  84. package/apps/core/src/domain/permission/permissionDomain.d.ts +2 -2
  85. package/apps/core/src/domain/permission/treeLibraryPermissionDomain.d.ts +1 -1
  86. package/apps/core/src/domain/permission/treePermissionDomain.d.ts +1 -1
  87. package/apps/core/src/domain/record/_types.d.ts +1 -0
  88. package/apps/core/src/domain/record/helpers/createRecord.d.ts +1 -1
  89. package/apps/core/src/domain/record/helpers/deleteRecord.d.ts +1 -1
  90. package/apps/core/src/domain/record/helpers/getAccessPermissionFilters.d.ts +7 -1
  91. package/apps/core/src/domain/record/recordDomain.d.ts +3 -3
  92. package/apps/core/src/domain/tasksManager/tasksManagerDomain.d.ts +2 -2
  93. package/apps/core/src/domain/tree/helpers/elementAncestors.d.ts +1 -1
  94. package/apps/core/src/domain/tree/helpers/getDefaultElement.d.ts +1 -1
  95. package/apps/core/src/domain/tree/treeDomain.d.ts +1 -1
  96. package/apps/core/src/domain/user/userDomain.d.ts +5 -2
  97. package/apps/core/src/domain/value/helpers/formatLogValue.d.ts +1 -1
  98. package/apps/core/src/domain/value/valueDomain.d.ts +3 -8
  99. package/apps/core/src/domain/versionProfile/versionProfileDomain.d.ts +1 -1
  100. package/apps/core/src/domain/view/viewDomain.d.ts +1 -1
  101. package/apps/core/src/infra/apiKey/apiKeyRepo.d.ts +1 -1
  102. package/apps/core/src/infra/application/applicationRepo.d.ts +1 -1
  103. package/apps/core/src/infra/attribute/attributeRepo.d.ts +1 -1
  104. package/apps/core/src/infra/attributeTypes/attributeAdvancedLinkRepo.d.ts +1 -1
  105. package/apps/core/src/infra/attributeTypes/attributeAdvancedRepo.d.ts +1 -1
  106. package/apps/core/src/infra/attributeTypes/attributeSimpleLinkRepo.d.ts +1 -1
  107. package/apps/core/src/infra/attributeTypes/attributeSimpleRepo.d.ts +1 -1
  108. package/apps/core/src/infra/attributeTypes/attributeTreeRepo.d.ts +1 -1
  109. package/apps/core/src/infra/attributeTypes/attributeTypesRepo.d.ts +10 -10
  110. package/apps/core/src/infra/cache/cacheService.d.ts +4 -3
  111. package/apps/core/src/infra/cache/index.d.ts +1 -2
  112. package/apps/core/src/infra/cache/ramService.d.ts +1 -7
  113. package/apps/core/src/infra/cache/redis.d.ts +5 -1
  114. package/apps/core/src/infra/db/dbUtils.d.ts +1 -1
  115. package/apps/core/src/infra/db/helpers/libraryUtils.d.ts +38 -0
  116. package/apps/core/src/infra/db/migrations/000-init/index.d.ts +1 -1
  117. package/apps/core/src/infra/db/migrations/000-init/systemLibraries.d.ts +1 -8
  118. package/apps/core/src/infra/db/migrations/002-previewsSettings.d.ts +1 -1
  119. package/apps/core/src/infra/db/migrations/003-filesMetadata.d.ts +1 -1
  120. package/apps/core/src/infra/db/migrations/007-updateHexColor.d.ts +1 -1
  121. package/apps/core/src/infra/db/migrations/013-threads/comments.d.ts +4 -0
  122. package/apps/core/src/infra/db/migrations/013-threads/constants.d.ts +10 -0
  123. package/apps/core/src/infra/db/migrations/013-threads/index.d.ts +11 -0
  124. package/apps/core/src/infra/db/migrations/013-threads/statuses.d.ts +5 -0
  125. package/apps/core/src/infra/db/migrations/013-threads/threads.d.ts +4 -0
  126. package/apps/core/src/infra/{elasticSearch/elasticSearchService.d.ts → elasticsearch/elasticsearchService.d.ts} +4 -4
  127. package/apps/core/src/infra/elasticsearch/index.d.ts +1 -0
  128. package/apps/core/src/infra/filesManager/filesManagerRepo.d.ts +1 -1
  129. package/apps/core/src/infra/form/formRepo.d.ts +1 -1
  130. package/apps/core/src/infra/indexation/indexationService.d.ts +1 -1
  131. package/apps/core/src/infra/library/libraryRepo.d.ts +2 -2
  132. package/apps/core/src/infra/log/logRepo.d.ts +3 -3
  133. package/apps/core/src/infra/mailer/mailerService.d.ts +1 -1
  134. package/apps/core/src/infra/oidc/oidcClientService.d.ts +3 -3
  135. package/apps/core/src/infra/permission/permissionRepo.d.ts +3 -3
  136. package/apps/core/src/infra/record/helpers/getClassifyingFiltersVariableQueryPart.d.ts +1 -1
  137. package/apps/core/src/infra/record/helpers/getSearchVariableName.d.ts +1 -1
  138. package/apps/core/src/infra/record/helpers/getSearchVariablesQueryPart.d.ts +1 -1
  139. package/apps/core/src/infra/record/recordRepo.d.ts +3 -3
  140. package/apps/core/src/infra/session/index.d.ts +1 -0
  141. package/apps/core/src/infra/session/sessionRepo.d.ts +8 -0
  142. package/apps/core/src/infra/task/taskRepo.d.ts +1 -1
  143. package/apps/core/src/infra/tree/treeRepo.d.ts +1 -1
  144. package/apps/core/src/infra/value/valueRepo.d.ts +7 -7
  145. package/apps/core/src/infra/versionProfile/versionProfileRepo.d.ts +1 -1
  146. package/apps/core/src/infra/view/viewRepo.d.ts +1 -1
  147. package/apps/core/src/interface/helpers/handleGraphqlError.d.ts +1 -1
  148. package/apps/core/src/interface/plugins/apolloTracerPlugin.d.ts +5 -0
  149. package/apps/core/src/interface/server.d.ts +1 -1
  150. package/apps/core/src/interface/tasksManager.d.ts +1 -1
  151. package/apps/core/src/utils/helpers/getExcelData.d.ts +3 -0
  152. package/apps/core/src/utils/helpers/getFileDataBuffer.d.ts +2 -0
  153. package/libs/config-manager/src/envTo.d.ts +4 -0
  154. package/libs/logger/src/LoggerCallStack.d.ts +14 -0
  155. package/libs/logger/src/catchErrorFormatter.d.ts +2 -0
  156. package/libs/logger/src/config.d.ts +32 -3
  157. package/libs/logger/src/locationInfoFormatter.d.ts +2 -0
  158. package/libs/logger/src/logger.d.ts +21 -2
  159. package/libs/message-broker/src/amqpService.d.ts +2 -2
  160. package/libs/message-broker/src/types/amqp.d.ts +1 -1
  161. package/package.json +1 -1
  162. package/apps/core/src/__tests__/e2e/api/import/import.test-draft.d.ts +0 -0
  163. package/apps/core/src/infra/elasticSearch/index.d.ts +0 -1
  164. package/libs/logger/src/locationInfoFormatters.d.ts +0 -10
  165. /package/apps/core/src/infra/{elasticSearch/elasticSearchClient.d.ts → elasticsearch/elasticsearchClient.d.ts} +0 -0
@@ -11,5 +11,5 @@ interface IDeps {
11
11
  'core.infra.db.dbUtils'?: IDbUtils;
12
12
  'core.utils'?: IUtils;
13
13
  }
14
- export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.attribute': attributeRepo, 'core.infra.library': libraryRepo, 'core.infra.db.dbUtils': dbUtils, 'core.utils': utils }?: IDeps): IMigration;
14
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.attribute': attributeRepo, 'core.infra.library': libraryRepo, 'core.infra.db.dbUtils': dbUtils, 'core.utils': utils, }?: IDeps): IMigration;
15
15
  export {};
@@ -7,5 +7,5 @@ interface IDeps {
7
7
  'core.infra.library'?: ILibraryRepo;
8
8
  'core.infra.db.dbService'?: IDbService;
9
9
  }
10
- export default function ({ 'core.infra.attribute': attributeRepo, 'core.infra.library': libraryRepo, 'core.infra.db.dbService': dbService }?: IDeps): IMigration;
10
+ export default function ({ 'core.infra.attribute': attributeRepo, 'core.infra.library': libraryRepo, 'core.infra.db.dbService': dbService, }?: IDeps): IMigration;
11
11
  export {};
@@ -5,5 +5,5 @@ interface IDeps {
5
5
  'core.infra.db.dbService'?: IDbService;
6
6
  'core.infra.attribute'?: IAttributeRepo;
7
7
  }
8
- export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.attribute': attributeRepo }?: IDeps): IMigration;
8
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.attribute': attributeRepo, }?: IDeps): IMigration;
9
9
  export {};
@@ -0,0 +1,4 @@
1
+ import { type MigrationLibraryToCreate } from '../../helpers/libraryUtils';
2
+ import { type IAttributeForRepo } from '../../../attribute/attributeRepo';
3
+ export declare const commentAttributes: IAttributeForRepo[];
4
+ export declare const commentLibrary: MigrationLibraryToCreate;
@@ -0,0 +1,10 @@
1
+ export declare const THREADS_LIBRARY_ID = "discussion_threads";
2
+ export declare const COMMENTS_LIBRARY_ID = "discussion_comments";
3
+ export declare const STATUSES_LIBRARY_ID = "statuses";
4
+ export declare const THREAD_STATUSES_TREE_ID = "discussion_thread_statuses_tree";
5
+ export declare const COMMENT_CONTENT_ATTRIBUTE_ID = "discussion_comments_text";
6
+ export declare const COMMENT_THREAD_ATTRIBUTE_ID = "discussion_comments_thread";
7
+ export declare const THREAD_STATUS_ATTRIBUTE_ID = "discussion_threads_status";
8
+ export declare const THREAD_COMMENTS_ATTRIBUTE_ID = "discussion_threads_comments";
9
+ export declare const STATUSES_LABEL_ATTRIBUTE_ID = "statuses_label";
10
+ export declare const STATUSES_COLOR_ATTRIBUTE_ID = "statuses_color";
@@ -0,0 +1,11 @@
1
+ import { type IMigration } from '../../../../_types/migration';
2
+ import { type IDbService } from '../../dbService';
3
+ import { type ILibraryRepo } from '../../../library/libraryRepo';
4
+ import { type IAttributeRepo } from '../../../attribute/attributeRepo';
5
+ interface IDeps {
6
+ 'core.infra.db.dbService': IDbService;
7
+ 'core.infra.library': ILibraryRepo;
8
+ 'core.infra.attribute': IAttributeRepo;
9
+ }
10
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.library': libraryRepo, 'core.infra.attribute': attributeRepo, }: IDeps): IMigration;
11
+ export {};
@@ -0,0 +1,5 @@
1
+ import { type MigrationLibraryToCreate, type MigrationTreeToCreate } from '../../helpers/libraryUtils';
2
+ import { type IAttributeForRepo } from '../../../attribute/attributeRepo';
3
+ export declare const statusesAttributes: IAttributeForRepo[];
4
+ export declare const statusesLibrary: MigrationLibraryToCreate;
5
+ export declare const threadStatusTree: MigrationTreeToCreate;
@@ -0,0 +1,4 @@
1
+ import { type MigrationLibraryToCreate } from '../../helpers/libraryUtils';
2
+ import { type IAttributeForRepo } from '../../../attribute/attributeRepo';
3
+ export declare const threadsAttributes: IAttributeForRepo[];
4
+ export declare const threadLibrary: MigrationLibraryToCreate;
@@ -15,14 +15,14 @@ interface IElasticsearchServiceSearchParams {
15
15
  };
16
16
  query?: estypes.QueryDslQueryContainer;
17
17
  }
18
- export interface IElasticSearchService {
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 IElasticSearchServiceDeps {
24
- 'core.infra.elasticSearch.client'?: Client;
23
+ export interface IElasticsearchServiceDeps {
24
+ 'core.infra.elasticsearch.client'?: Client;
25
25
  config?: IConfig;
26
26
  }
27
- export default function ({ config }: IElasticSearchServiceDeps): IElasticSearchService;
27
+ export default function ({ config }: IElasticsearchServiceDeps): IElasticsearchService;
28
28
  export {};
@@ -0,0 +1 @@
1
+ export { default as service } from './elasticsearchService';
@@ -19,5 +19,5 @@ export interface IFilesManagerRepo {
19
19
  }, retrieveInactive: boolean, ctx: IQueryInfos): Promise<IRecord | null>;
20
20
  getParentRecord(fullParentPath: string, library: string, ctx: IQueryInfos): Promise<IRecord | null>;
21
21
  }
22
- export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, 'core.utils.logger': logger }: IDeps): IFilesManagerRepo;
22
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, 'core.utils.logger': logger, }: IDeps): IFilesManagerRepo;
23
23
  export {};
@@ -30,5 +30,5 @@ interface IDeps {
30
30
  'core.infra.db.dbService'?: IDbService;
31
31
  'core.infra.db.dbUtils'?: IDbUtils;
32
32
  }
33
- export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils }?: IDeps): IFormRepo;
33
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, }?: IDeps): IFormRepo;
34
34
  export {};
@@ -23,5 +23,5 @@ export declare const CORE_INDEX_INPUT_ANALYZER = "core_index_input";
23
23
  export declare const CORE_INDEX_ANALYZER = "core_index";
24
24
  export declare const CORE_INDEX_VIEW = "core_index";
25
25
  export declare const CORE_INDEX_FIELD = "core_index";
26
- export default function ({ config, 'core.infra.db.dbService': dbService, 'core.infra.record': recordRepo, 'core.infra.indexation.helpers.getSearchQuery': getSearchQuery }: IDeps): IIndexationService;
26
+ export default function ({ config, 'core.infra.db.dbService': dbService, 'core.infra.record': recordRepo, 'core.infra.indexation.helpers.getSearchQuery': getSearchQuery, }: IDeps): IIndexationService;
27
27
  export {};
@@ -71,7 +71,7 @@ export interface ILibraryRepo {
71
71
  * fullTextAttributes Array of full text attributes IDs
72
72
  *
73
73
  */
74
- saveLibraryFullTextAttributes({ libId, fullTextAttributes, ctx }: {
74
+ saveLibraryFullTextAttributes({ libId, fullTextAttributes, ctx, }: {
75
75
  libId: string;
76
76
  fullTextAttributes: string[];
77
77
  ctx: IQueryInfos;
@@ -83,5 +83,5 @@ interface IDeps {
83
83
  'core.infra.db.dbUtils'?: IDbUtils;
84
84
  'core.infra.attribute'?: IAttributeRepo;
85
85
  }
86
- export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, 'core.infra.attribute': attributeRepo }?: IDeps): ILibraryRepo;
86
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, 'core.infra.attribute': attributeRepo, }?: IDeps): ILibraryRepo;
87
87
  export {};
@@ -1,4 +1,4 @@
1
- import { type IElasticSearchService } from 'infra/elasticSearch/elasticSearchService';
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.elasticSearch.service'?: IElasticSearchService;
13
+ 'core.infra.elasticsearch.service'?: IElasticsearchService;
14
14
  config?: IConfig;
15
15
  }
16
- export default function ({ 'core.infra.elasticSearch.service': esService, config }: IDeps): ILogRepo;
16
+ export default function ({ 'core.infra.elasticsearch.service': esService, config }: IDeps): ILogRepo;
17
17
  export {};
@@ -22,5 +22,5 @@ interface ISendMailParams {
22
22
  path?: string;
23
23
  }>;
24
24
  }
25
- export default function ({ config, 'core.domain.globalSettings': globalSettingsDomain, 'core.infra.mailer': mailer }: IDeps): IMailerService;
25
+ export default function ({ config, 'core.domain.globalSettings': globalSettingsDomain, 'core.infra.mailer': mailer, }: IDeps): IMailerService;
26
26
  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 {};
@@ -7,14 +7,14 @@ export interface IPermissionRepo {
7
7
  permData: IPermission;
8
8
  ctx: IQueryInfos;
9
9
  }): Promise<IPermission>;
10
- getPermissions({ type, applyTo, usersGroupNodeId, permissionTreeTarget, ctx }: {
10
+ getPermissions({ type, applyTo, usersGroupNodeId, permissionTreeTarget, ctx, }: {
11
11
  type: PermissionTypes;
12
12
  applyTo: string;
13
13
  usersGroupNodeId: string | null;
14
14
  permissionTreeTarget?: IPermissionsTreeTarget;
15
15
  ctx: IQueryInfos;
16
16
  }): Promise<IPermission | null>;
17
- getAllPermissionsForTree({ type, applyTo, actionKey, treeId, groupsIds, ctx }: {
17
+ getAllPermissionsForTree({ type, applyTo, actionKey, treeId, groupsIds, ctx, }: {
18
18
  type: PermissionTypes;
19
19
  applyTo: string;
20
20
  actionKey: PermissionsActions;
@@ -31,5 +31,5 @@ interface IDeps {
31
31
  'core.infra.db.dbService'?: IDbService;
32
32
  'core.infra.db.dbUtils'?: IDbUtils;
33
33
  }
34
- export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils }?: IDeps): IPermissionRepo;
34
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, }?: IDeps): IPermissionRepo;
35
35
  export {};
@@ -7,5 +7,5 @@ interface IDeps {
7
7
  'core.infra.record.helpers.filterTypes'?: IFilterTypesHelper;
8
8
  }
9
9
  export type GetClassifyingFiltersVariableQueryPart = (filter: IRecordFilterOption) => GeneratedAqlQuery;
10
- export default function ({ 'core.infra.record.helpers.filterTypes': filterTypesHelper, 'core.infra.db.dbService': dbService }: IDeps): GetClassifyingFiltersVariableQueryPart;
10
+ export default function ({ 'core.infra.record.helpers.filterTypes': filterTypesHelper, 'core.infra.db.dbService': dbService, }: IDeps): GetClassifyingFiltersVariableQueryPart;
11
11
  export {};
@@ -4,5 +4,5 @@ interface IDeps {
4
4
  'core.infra.record.helpers.filterTypes'?: IFilterTypesHelper;
5
5
  }
6
6
  export type GetSearchVariableName = (filter: IRecordFilterOption) => string | undefined;
7
- export default function ({ 'core.infra.record.helpers.filterTypes': filterTypesHelper }: IDeps): GetSearchVariableName;
7
+ export default function ({ 'core.infra.record.helpers.filterTypes': filterTypesHelper, }: IDeps): GetSearchVariableName;
8
8
  export {};
@@ -11,5 +11,5 @@ interface IDeps {
11
11
  'core.infra.record.helpers.filterTypes'?: IFilterTypesHelper;
12
12
  }
13
13
  export type GetSearchVariablesQueryPart = (filters: IRecordFilterOption[]) => GeneratedAqlQuery[];
14
- export default function ({ 'core.infra.attributeTypes': attributeTypes, 'core.infra.record.helpers.getClassifyingFiltersVariableQueryPart': getClassifyingFiltersVariableQueryPart, 'core.infra.record.helpers.getSearchVariableName': getSearchVariableName, 'core.infra.record.helpers.filterTypes': filterTypesHelper }: IDeps): GetSearchVariablesQueryPart;
14
+ export default function ({ 'core.infra.attributeTypes': attributeTypes, 'core.infra.record.helpers.getClassifyingFiltersVariableQueryPart': getClassifyingFiltersVariableQueryPart, 'core.infra.record.helpers.getSearchVariableName': getSearchVariableName, 'core.infra.record.helpers.filterTypes': filterTypesHelper, }: IDeps): GetSearchVariablesQueryPart;
15
15
  export {};
@@ -17,12 +17,12 @@ export interface IFindRequestResult {
17
17
  queryPart: GeneratedAqlQuery;
18
18
  }
19
19
  export interface IRecordRepo {
20
- createRecord({ libraryId, recordData, ctx }: {
20
+ createRecord({ libraryId, recordData, ctx, }: {
21
21
  libraryId: string;
22
22
  recordData: IRecord;
23
23
  ctx: IQueryInfos;
24
24
  }): Promise<IRecord>;
25
- updateRecord({ libraryId, recordData, ctx }: {
25
+ updateRecord({ libraryId, recordData, ctx, }: {
26
26
  libraryId: string;
27
27
  recordData: IRecord;
28
28
  ctx: IQueryInfos;
@@ -67,4 +67,4 @@ export interface IRecordRepoDeps {
67
67
  'core.infra.record.helpers.filterTypes': IFilterTypesHelper;
68
68
  'core.infra.indexation.helpers.getSearchQuery': GetSearchQuery;
69
69
  }
70
- export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, 'core.infra.attributeTypes': attributeTypesRepo, 'core.infra.attributeTypes.helpers.getConditionPart': getConditionPart, 'core.infra.record.helpers.getSearchVariablesQueryPart': getSearchVariablesQueryPart, 'core.infra.record.helpers.getSearchVariableName': getSearchVariableName, 'core.infra.record.helpers.filterTypes': filterTypesHelper, 'core.infra.indexation.helpers.getSearchQuery': getSearchQuery, 'core.infra.attribute': attributeRepo }: IRecordRepoDeps): IRecordRepo;
70
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, 'core.infra.attributeTypes': attributeTypesRepo, 'core.infra.attributeTypes.helpers.getConditionPart': getConditionPart, 'core.infra.record.helpers.getSearchVariablesQueryPart': getSearchVariablesQueryPart, 'core.infra.record.helpers.getSearchVariableName': getSearchVariableName, 'core.infra.record.helpers.filterTypes': filterTypesHelper, 'core.infra.indexation.helpers.getSearchQuery': getSearchQuery, 'core.infra.attribute': attributeRepo, }: IRecordRepoDeps): IRecordRepo;
@@ -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 {};
@@ -26,5 +26,5 @@ interface IDeps {
26
26
  'core.infra.db.dbService'?: IDbService;
27
27
  'core.utils'?: IUtils;
28
28
  }
29
- export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, 'core.utils': utils }?: IDeps): ITaskRepo;
29
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, 'core.utils': utils, }?: IDeps): ITaskRepo;
30
30
  export {};
@@ -166,4 +166,4 @@ export interface ITreeRepoDeps {
166
166
  'core.infra.db.dbService': IDbService;
167
167
  'core.infra.db.dbUtils': IDbUtils;
168
168
  }
169
- export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils }: ITreeRepoDeps): ITreeRepo;
169
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, }: ITreeRepoDeps): ITreeRepo;
@@ -8,7 +8,7 @@ export declare const VALUES_LINKS_COLLECTION = "core_edge_values_links";
8
8
  export declare const VALUES_COLLECTION = "core_values";
9
9
  export declare const EMPTY_VALUE = "__empty_value__";
10
10
  export interface IValueRepo {
11
- createValue({ library, recordId, attribute, value, ctx }: {
11
+ createValue({ library, recordId, attribute, value, ctx, }: {
12
12
  library: string;
13
13
  recordId: string;
14
14
  attribute: IAttributeWithRevLink;
@@ -18,7 +18,7 @@ export interface IValueRepo {
18
18
  /**
19
19
  * Update an existing value. Field "id" is expected on the value
20
20
  */
21
- updateValue({ library, recordId, attribute, value, ctx }: {
21
+ updateValue({ library, recordId, attribute, value, ctx, }: {
22
22
  library: string;
23
23
  recordId: string;
24
24
  attribute: IAttributeWithRevLink;
@@ -28,7 +28,7 @@ export interface IValueRepo {
28
28
  /**
29
29
  * Delete an existing value. Field "id" is expected on the value
30
30
  */
31
- deleteValue({ library, recordId, attribute, value, ctx }: {
31
+ deleteValue({ library, recordId, attribute, value, ctx, }: {
32
32
  library: string;
33
33
  recordId: string;
34
34
  attribute: IAttributeWithRevLink;
@@ -39,7 +39,7 @@ export interface IValueRepo {
39
39
  * Check if a value is unique expeted for the given record
40
40
  * if recordId is null, it will check for the whole library
41
41
  */
42
- isValueUsed({ library, excludedRecordId, attribute, value, ctx }: {
42
+ isValueUsed({ library, excludedRecordId, attribute, value, ctx, }: {
43
43
  library: string;
44
44
  excludedRecordId?: string;
45
45
  attribute: IAttribute;
@@ -51,7 +51,7 @@ export interface IValueRepo {
51
51
  *
52
52
  * @return Array<{}> Return an empty array if no value found
53
53
  */
54
- getValues({ library, recordId, attribute, forceGetAllValues, options, ctx }: {
54
+ getValues({ library, recordId, attribute, forceGetAllValues, options, ctx, }: {
55
55
  library: string;
56
56
  recordId: string;
57
57
  attribute: IAttributeWithRevLink;
@@ -64,7 +64,7 @@ export interface IValueRepo {
64
64
  *
65
65
  * @return {} Return null if no value found
66
66
  */
67
- getValueById({ library, recordId, attribute, valueId, ctx }: {
67
+ getValueById({ library, recordId, attribute, valueId, ctx, }: {
68
68
  library: string;
69
69
  recordId: string;
70
70
  attribute: IAttribute;
@@ -86,5 +86,5 @@ interface IDeps {
86
86
  'core.infra.attributeTypes': IAttributeTypesRepo;
87
87
  'core.infra.db.dbService': IDbService;
88
88
  }
89
- export default function ({ config, 'core.infra.attributeTypes': attributeTypesRepo, 'core.infra.db.dbService': dbService }: IDeps): IValueRepo;
89
+ export default function ({ config, 'core.infra.attributeTypes': attributeTypesRepo, 'core.infra.db.dbService': dbService, }: IDeps): IValueRepo;
90
90
  export {};
@@ -31,5 +31,5 @@ interface IDeps {
31
31
  'core.infra.db.dbUtils'?: IDbUtils;
32
32
  'core.infra.db.dbService'?: IDbService;
33
33
  }
34
- export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils }?: IDeps): IVersionProfileRepo;
34
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, }?: IDeps): IVersionProfileRepo;
35
35
  export {};
@@ -1,2 +1,2 @@
1
1
  import { type IViewRepo, type IViewRepoDeps } from './_types';
2
- export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils }: IViewRepoDeps): IViewRepo;
2
+ export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, }: IViewRepoDeps): IViewRepo;
@@ -9,5 +9,5 @@ interface IDeps {
9
9
  'core.utils': IUtils;
10
10
  'core.utils.logger'?: ILogger;
11
11
  }
12
- export default function ({ config, 'core.utils': utils, 'core.utils.logger': logger }: IDeps): HandleGraphqlErrorFunc;
12
+ export default function ({ config, 'core.utils': utils, 'core.utils.logger': logger, }: IDeps): HandleGraphqlErrorFunc;
13
13
  export {};
@@ -0,0 +1,5 @@
1
+ import { type ApolloServerPlugin } from '@apollo/server';
2
+ /**
3
+ * Apollo Server plugin for measuring GraphQL operation and resolver performance.
4
+ */
5
+ export declare const apolloTracerPlugin: ApolloServerPlugin;
@@ -33,5 +33,5 @@ interface IDeps {
33
33
  'core.utils'?: IUtils;
34
34
  'core.depsManager'?: AwilixContainer;
35
35
  }
36
- export default function ({ config: config, 'core.interface.helpers.handleGraphqlError': handleGraphqlError, 'core.app.graphql': graphqlApp, 'core.app.auth': authApp, 'core.app.application': applicationApp, 'core.app.core': coreApp, 'core.app.helpers.validateRequestToken': validateRequestToken, 'core.app.helpers.initQueryContext': initQueryContext, 'core.utils.logger': logger, 'core.utils': utils, 'core.depsManager': depsManager }?: IDeps): IServer;
36
+ export default function ({ config: config, 'core.interface.helpers.handleGraphqlError': handleGraphqlError, 'core.app.graphql': graphqlApp, 'core.app.auth': authApp, 'core.app.application': applicationApp, 'core.app.core': coreApp, 'core.app.helpers.validateRequestToken': validateRequestToken, 'core.app.helpers.initQueryContext': initQueryContext, 'core.utils.logger': logger, 'core.utils': utils, 'core.depsManager': depsManager, }?: IDeps): IServer;
37
37
  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 {
@@ -0,0 +1,3 @@
1
+ import ExcelJS from 'exceljs';
2
+ declare const _default: (buffer: ExcelJS.Buffer) => Promise<string[][][]>;
3
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: (filepath: string) => Promise<Buffer>;
2
+ export default _default;
@@ -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[];
@@ -0,0 +1,14 @@
1
+ interface ICallerInfo {
2
+ path: string;
3
+ line: string;
4
+ col: string;
5
+ }
6
+ export declare class LoggerCallStack {
7
+ private callerLineIndexInStack;
8
+ getCallStackTrace(): string | null;
9
+ getLocationInfo(): ICallerInfo | null;
10
+ private getStackLines;
11
+ private detectCallLineIndexInStack;
12
+ private callStackTraceLongEnough;
13
+ }
14
+ export {};
@@ -0,0 +1,2 @@
1
+ import winston from 'winston';
2
+ export declare function catchErrorFormatter(onErrorLog?: (message: string, meta: any, getCallStackTrace: () => string) => void): winston.Logform.FormatWrap | null;
@@ -3,7 +3,7 @@ export interface ILoggerConfig {
3
3
  * Log level (error, warn, info, log, verbose, debug, silly)
4
4
  * @default info
5
5
  */
6
- level: string;
6
+ level?: string;
7
7
  /**
8
8
  * If true, disable all logging
9
9
  * Default: true if TS_JEST=1 (tests), false otherwise
@@ -18,7 +18,36 @@ export interface ILoggerConfig {
18
18
  * Default: false (plain text)
19
19
  */
20
20
  useJsonFormat?: boolean;
21
- onErrorLog?: (message: string, meta: any) => void;
21
+ /**
22
+ * If true, add timestamp to each log line, ISO format
23
+ */
24
+ addTimestamp?: boolean;
25
+ /**
26
+ * If true, add file and line number of the code that called the logger function (error, warn, info, debug, etc.)
27
+ */
28
+ addLocationInfo?: boolean;
29
+ /**
30
+ * Add those metadata to all logs
31
+ */
32
+ additionalMeta?: {
33
+ /**
34
+ * any string to identify the application those logs came from
35
+ */
36
+ app?: string;
37
+ /**
38
+ * any string to identify each client those logs came from
39
+ */
40
+ client?: string;
41
+ /**
42
+ * environment, like production, development, test, integration
43
+ */
44
+ env?: string;
45
+ /**
46
+ * application version, maybe semver format
47
+ */
48
+ version?: string;
49
+ };
50
+ onErrorLog?: (message: string, meta: any, getCallStackTrace: () => string) => void;
22
51
  }
23
52
  export declare function envToBool(value: string, defaultValue?: boolean): boolean;
24
- export declare const defaultLoggerConfig: ILoggerConfig;
53
+ export declare const defaultLoggerConfig: ILoggerConfig & Required<Omit<ILoggerConfig, 'onErrorLog'>>;
@@ -0,0 +1,2 @@
1
+ import winston from 'winston';
2
+ export declare const addLocationInfoInLog: winston.Logform.FormatWrap;
@@ -1,5 +1,24 @@
1
- import winston from 'winston';
2
1
  import { type ILoggerConfig } from './config';
3
- export type ILogger = Pick<typeof winston, 'error' | 'warn' | 'info' | 'log' | 'verbose' | 'debug' | 'silly'>;
2
+ type MetaWithoutLoggerProperties = {
3
+ [key: string]: unknown;
4
+ } & {
5
+ message?: never;
6
+ level?: never;
7
+ timestamp?: never;
8
+ location?: never;
9
+ env?: never;
10
+ app?: never;
11
+ client?: never;
12
+ version?: never;
13
+ };
14
+ export interface ILogger {
15
+ error(message: string, ...meta: MetaWithoutLoggerProperties[]): void;
16
+ warn(message: string, ...meta: MetaWithoutLoggerProperties[]): void;
17
+ info(message: string, ...meta: MetaWithoutLoggerProperties[]): void;
18
+ verbose(message: string, ...meta: MetaWithoutLoggerProperties[]): void;
19
+ debug(message: string, ...meta: MetaWithoutLoggerProperties[]): void;
20
+ silly(message: string, ...meta: MetaWithoutLoggerProperties[]): void;
21
+ }
4
22
  export declare function configureLogger(config: ILoggerConfig): void;
5
23
  export declare const logger: ILogger;
24
+ export {};
@@ -1,5 +1,5 @@
1
1
  import * as amqp from 'amqplib';
2
- import { type IAmqp, type onMessageFunc } from './types/amqp';
2
+ import { type IAmqp, type OnMessageFunc } from './types/amqp';
3
3
  export interface IAmqpService {
4
4
  publisher: {
5
5
  connection: amqp.ChannelModel;
@@ -10,7 +10,7 @@ export interface IAmqpService {
10
10
  channel: amqp.ConfirmChannel;
11
11
  };
12
12
  publish(exchange: string, routingKey: string, msg: string, priority?: number): Promise<void>;
13
- consume(queue: string, routingKey: string, onMessage: onMessageFunc, consumerTag?: string): Promise<amqp.Replies.Consume>;
13
+ consume(queue: string, routingKey: string, onMessage: OnMessageFunc, consumerTag?: string): Promise<amqp.Replies.Consume>;
14
14
  close(): Promise<void>;
15
15
  }
16
16
  interface IDeps {
@@ -12,4 +12,4 @@ export interface IAmqpConn {
12
12
  export interface IMessageBody {
13
13
  [key: string]: any;
14
14
  }
15
- export type onMessageFunc = (msg: amqp.ConsumeMessage) => Promise<void>;
15
+ export type OnMessageFunc = (msg: amqp.ConsumeMessage) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.4.1-9e3f8604",
3
+ "version": "1.4.1-9f01cb80",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",
@@ -1 +0,0 @@
1
- export { default as service } from './elasticSearchService';
@@ -1,10 +0,0 @@
1
- import winston from 'winston';
2
- interface ICallerInfo {
3
- path: string;
4
- line: string;
5
- col: string;
6
- }
7
- export declare function getLocationInfo(): ICallerInfo | null;
8
- export declare const addLocationInfoInLog: winston.Logform.FormatWrap;
9
- export declare const mergeLocationInfoInLog: winston.Logform.FormatWrap;
10
- export {};