@aristid/leav-types 1.4.1 → 1.5.0-36efa9cc

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 (177) hide show
  1. package/apps/core/config/default.d.ts +43 -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 +31 -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 +29 -0
  8. package/apps/core/src/__tests__/e2e/api/permissions/extendedLibraryPermissions.test.d.ts +1 -0
  9. package/apps/core/src/__tests__/integration/domain/tasksManagerDomain.test.d.ts +1 -0
  10. package/apps/core/src/__tests__/integration/infra/integrationTestRepoUtils.d.ts +1 -1
  11. package/apps/core/src/__tests__/integration/integrationTestUtils.d.ts +7 -0
  12. package/apps/core/src/_constants/attributes.d.ts +2 -1
  13. package/apps/core/src/_types/config.d.ts +49 -7
  14. package/apps/core/src/_types/elasticSearch.d.ts +2 -0
  15. package/apps/core/src/_types/errors.d.ts +2 -1
  16. package/apps/core/src/_types/eventsManager.d.ts +13 -1
  17. package/apps/core/src/_types/forms.d.ts +2 -2
  18. package/apps/core/src/_types/notification.d.ts +51 -0
  19. package/apps/core/src/_types/userData.d.ts +10 -0
  20. package/apps/core/src/app/application/applicationApp.d.ts +1 -1
  21. package/apps/core/src/app/auth/authApp.d.ts +5 -3
  22. package/apps/core/src/app/core/apiKeyApp/apiKeyApp.d.ts +1 -1
  23. package/apps/core/src/app/core/coreApp.d.ts +1 -1
  24. package/apps/core/src/app/core/eventsManagerApp.d.ts +1 -1
  25. package/apps/core/src/app/core/filesManagerApp.d.ts +1 -1
  26. package/apps/core/src/app/core/formApp/formApp.d.ts +1 -1
  27. package/apps/core/src/app/core/globalSettingsApp.d.ts +1 -1
  28. package/apps/core/src/app/core/importApp.d.ts +1 -1
  29. package/apps/core/src/app/core/index.d.ts +2 -0
  30. package/apps/core/src/app/core/libraryApp/libraryApp.d.ts +1 -1
  31. package/apps/core/src/app/core/logApp.d.ts +1 -1
  32. package/apps/core/src/app/core/logsCollectorApp.d.ts +9 -0
  33. package/apps/core/src/app/core/notificationApp.d.ts +10 -0
  34. package/apps/core/src/app/core/permissionApp/permissionApp.d.ts +1 -1
  35. package/apps/core/src/app/core/recordApp/_types.d.ts +1 -0
  36. package/apps/core/src/app/core/recordApp/recordApp.d.ts +1 -1
  37. package/apps/core/src/app/core/tasksManagerApp.d.ts +2 -2
  38. package/apps/core/src/app/core/treeApp/treeApp.d.ts +1 -1
  39. package/apps/core/src/app/core/valueApp.d.ts +1 -1
  40. package/apps/core/src/app/core/versionProfileApp/versionProfileApp.d.ts +1 -1
  41. package/apps/core/src/app/core/viewApp.d.ts +1 -1
  42. package/apps/core/src/app/endpoint/endpointApp.d.ts +1 -1
  43. package/apps/core/src/app/graphql/graphqlApp.d.ts +1 -1
  44. package/apps/core/src/domain/actions/excelCalculationAction.d.ts +6 -4
  45. package/apps/core/src/domain/actions/index.d.ts +1 -0
  46. package/apps/core/src/domain/actions/inheritanceCalculationAction.d.ts +1 -1
  47. package/apps/core/src/domain/actions/toLowercaseAction.d.ts +2 -0
  48. package/apps/core/src/domain/actions/toLowercaseAction.spec.d.ts +1 -0
  49. package/apps/core/src/domain/apiKey/apiKeyDomain.d.ts +1 -1
  50. package/apps/core/src/domain/application/applicationDomain.d.ts +1 -1
  51. package/apps/core/src/domain/attribute/attributeDomain.d.ts +1 -1
  52. package/apps/core/src/domain/attribute/helpers/ifLibraryJoinLinkAttribute.d.ts +1 -1
  53. package/apps/core/src/domain/eventsManager/eventsManagerDomain.d.ts +1 -1
  54. package/apps/core/src/domain/export/exportDomain.d.ts +6 -2
  55. package/apps/core/src/domain/export/exportProfileDomain.d.ts +23 -0
  56. package/apps/core/src/domain/export/exportProfileDomain.spec.d.ts +1 -0
  57. package/apps/core/src/domain/export/index.d.ts +1 -0
  58. package/apps/core/src/domain/filesManager/filesManagerDomain.d.ts +1 -1
  59. package/apps/core/src/domain/filesManager/helpers/handlePreview.d.ts +1 -1
  60. package/apps/core/src/domain/filesManager/helpers/messagesHandler/messagesHandler.d.ts +1 -1
  61. package/apps/core/src/domain/form/formDomain.d.ts +1 -1
  62. package/apps/core/src/domain/form/helpers/mustIncludeElement.d.ts +1 -1
  63. package/apps/core/src/domain/globalSettings/globalSettingsDomain.d.ts +1 -1
  64. package/apps/core/src/domain/helpers/calculationsVariableFunctions/index.d.ts +1 -1
  65. package/apps/core/src/domain/helpers/getCoreEntityById.d.ts +1 -1
  66. package/apps/core/src/domain/helpers/updateRecordLastModif.d.ts +1 -1
  67. package/apps/core/src/domain/helpers/updateTaskProgress.d.ts +1 -1
  68. package/apps/core/src/domain/helpers/validate.d.ts +1 -1
  69. package/apps/core/src/domain/import/importDomain.d.ts +1 -1
  70. package/apps/core/src/domain/indexationManager/indexationManagerDomain.d.ts +1 -1
  71. package/apps/core/src/domain/library/helpers/deleteAssociatedValues.d.ts +1 -1
  72. package/apps/core/src/domain/library/helpers/runPreDelete.d.ts +1 -1
  73. package/apps/core/src/domain/library/libraryDomain.d.ts +1 -1
  74. package/apps/core/src/domain/log/logDomain.d.ts +1 -1
  75. package/apps/core/src/domain/logsCollector/index.d.ts +1 -0
  76. package/apps/core/src/domain/logsCollector/logsCollectorDomain.d.ts +16 -0
  77. package/apps/core/src/domain/notification/channels/emailChannel.d.ts +12 -0
  78. package/apps/core/src/domain/notification/channels/webSocketChannel.d.ts +6 -0
  79. package/apps/core/src/domain/notification/index.d.ts +3 -0
  80. package/apps/core/src/domain/notification/notificationDomain.d.ts +12 -0
  81. package/apps/core/src/domain/permission/_types.d.ts +8 -19
  82. package/apps/core/src/domain/permission/adminPermissionDomain.d.ts +1 -1
  83. package/apps/core/src/domain/permission/applicationPermissionDomain.d.ts +1 -1
  84. package/apps/core/src/domain/permission/helpers/defaultPermission.d.ts +6 -1
  85. package/apps/core/src/domain/permission/helpers/getPermissionCachePatternKey.d.ts +1 -1
  86. package/apps/core/src/domain/permission/helpers/globalPermission.d.ts +4 -10
  87. package/apps/core/src/domain/permission/helpers/index.d.ts +1 -1
  88. package/apps/core/src/domain/permission/helpers/permissionByUserGroups.d.ts +2 -1
  89. package/apps/core/src/domain/permission/helpers/recordInCreationBypass.d.ts +8 -3
  90. package/apps/core/src/domain/permission/helpers/simplePermission.d.ts +1 -1
  91. package/apps/core/src/domain/permission/libraryPermissionDomain.d.ts +1 -1
  92. package/apps/core/src/domain/permission/permissionDomain.d.ts +2 -2
  93. package/apps/core/src/domain/permission/recordAttributePermissionDomain.d.ts +2 -2
  94. package/apps/core/src/domain/permission/recordPermissionDomain.d.ts +2 -2
  95. package/apps/core/src/domain/permission/treeLibraryPermissionDomain.d.ts +1 -1
  96. package/apps/core/src/domain/permission/treePermissionDomain.d.ts +1 -1
  97. package/apps/core/src/domain/record/_types.d.ts +1 -0
  98. package/apps/core/src/domain/record/helpers/createRecord.d.ts +1 -1
  99. package/apps/core/src/domain/record/helpers/deleteRecord.d.ts +1 -1
  100. package/apps/core/src/domain/record/helpers/getAccessPermissionFilters.d.ts +12 -5
  101. package/apps/core/src/domain/record/recordDomain.d.ts +4 -3
  102. package/apps/core/src/domain/tasksManager/tasksManagerDomain.d.ts +2 -2
  103. package/apps/core/src/domain/tree/helpers/elementAncestors.d.ts +1 -1
  104. package/apps/core/src/domain/tree/helpers/getDefaultElement.d.ts +1 -1
  105. package/apps/core/src/domain/tree/treeDomain.d.ts +1 -1
  106. package/apps/core/src/domain/user/userDomain.d.ts +5 -2
  107. package/apps/core/src/domain/value/helpers/formatLogValue.d.ts +1 -1
  108. package/apps/core/src/domain/value/valueDomain.d.ts +5 -8
  109. package/apps/core/src/domain/versionProfile/versionProfileDomain.d.ts +1 -1
  110. package/apps/core/src/domain/view/viewDomain.d.ts +1 -1
  111. package/apps/core/src/errors/LeavError.d.ts +1 -1
  112. package/apps/core/src/infra/apiKey/apiKeyRepo.d.ts +1 -1
  113. package/apps/core/src/infra/application/applicationRepo.d.ts +1 -1
  114. package/apps/core/src/infra/attribute/attributeRepo.d.ts +1 -1
  115. package/apps/core/src/infra/attributeTypes/attributeAdvancedLinkRepo.d.ts +1 -1
  116. package/apps/core/src/infra/attributeTypes/attributeAdvancedRepo.d.ts +1 -1
  117. package/apps/core/src/infra/attributeTypes/attributeSimpleLinkRepo.d.ts +1 -1
  118. package/apps/core/src/infra/attributeTypes/attributeSimpleRepo.d.ts +1 -1
  119. package/apps/core/src/infra/attributeTypes/attributeTreeRepo.d.ts +1 -1
  120. package/apps/core/src/infra/attributeTypes/attributeTypesRepo.d.ts +10 -10
  121. package/apps/core/src/infra/cache/cacheService.d.ts +4 -3
  122. package/apps/core/src/infra/cache/index.d.ts +1 -2
  123. package/apps/core/src/infra/cache/ramService.d.ts +1 -7
  124. package/apps/core/src/infra/cache/redis.d.ts +5 -1
  125. package/apps/core/src/infra/db/dbUtils.d.ts +1 -1
  126. package/apps/core/src/infra/db/helpers/libraryUtils.d.ts +38 -0
  127. package/apps/core/src/infra/db/migrations/000-init/index.d.ts +1 -1
  128. package/apps/core/src/infra/db/migrations/000-init/systemLibraries.d.ts +1 -8
  129. package/apps/core/src/infra/db/migrations/002-previewsSettings.d.ts +1 -1
  130. package/apps/core/src/infra/db/migrations/003-filesMetadata.d.ts +1 -1
  131. package/apps/core/src/infra/db/migrations/007-updateHexColor.d.ts +1 -1
  132. package/apps/core/src/infra/db/migrations/013-threads/comments.d.ts +4 -0
  133. package/apps/core/src/infra/db/migrations/013-threads/constants.d.ts +10 -0
  134. package/apps/core/src/infra/db/migrations/013-threads/index.d.ts +11 -0
  135. package/apps/core/src/infra/db/migrations/013-threads/statuses.d.ts +5 -0
  136. package/apps/core/src/infra/db/migrations/013-threads/threads.d.ts +4 -0
  137. package/apps/core/src/infra/{elasticSearch/elasticSearchService.d.ts → elasticsearch/elasticsearchService.d.ts} +7 -6
  138. package/apps/core/src/infra/elasticsearch/index.d.ts +1 -0
  139. package/apps/core/src/infra/filesManager/filesManagerRepo.d.ts +1 -1
  140. package/apps/core/src/infra/form/formRepo.d.ts +1 -1
  141. package/apps/core/src/infra/indexation/indexationService.d.ts +1 -1
  142. package/apps/core/src/infra/library/libraryRepo.d.ts +2 -2
  143. package/apps/core/src/infra/log/logRepo.d.ts +3 -3
  144. package/apps/core/src/infra/mailer/mailerService.d.ts +1 -1
  145. package/apps/core/src/infra/oidc/oidcClientService.d.ts +3 -3
  146. package/apps/core/src/infra/permission/permissionRepo.d.ts +3 -3
  147. package/apps/core/src/infra/record/helpers/getClassifyingFiltersVariableQueryPart.d.ts +1 -1
  148. package/apps/core/src/infra/record/helpers/getSearchVariableName.d.ts +1 -1
  149. package/apps/core/src/infra/record/helpers/getSearchVariablesQueryPart.d.ts +1 -1
  150. package/apps/core/src/infra/record/recordRepo.d.ts +3 -3
  151. package/apps/core/src/infra/session/index.d.ts +1 -0
  152. package/apps/core/src/infra/session/sessionRepo.d.ts +8 -0
  153. package/apps/core/src/infra/task/taskRepo.d.ts +1 -1
  154. package/apps/core/src/infra/tree/treeRepo.d.ts +1 -1
  155. package/apps/core/src/infra/value/valueRepo.d.ts +7 -7
  156. package/apps/core/src/infra/versionProfile/versionProfileRepo.d.ts +1 -1
  157. package/apps/core/src/infra/view/viewRepo.d.ts +1 -1
  158. package/apps/core/src/interface/helpers/handleGraphqlError.d.ts +1 -1
  159. package/apps/core/src/interface/index.d.ts +1 -0
  160. package/apps/core/src/interface/logsCollector.d.ts +9 -0
  161. package/apps/core/src/interface/plugins/apolloTracerPlugin.d.ts +5 -0
  162. package/apps/core/src/interface/server.d.ts +1 -1
  163. package/apps/core/src/interface/tasksManager.d.ts +1 -1
  164. package/apps/core/src/utils/helpers/getExcelData.d.ts +3 -0
  165. package/apps/core/src/utils/helpers/getFileDataBuffer.d.ts +2 -0
  166. package/libs/config-manager/src/envTo.d.ts +4 -0
  167. package/libs/logger/src/LoggerCallStack.d.ts +14 -0
  168. package/libs/logger/src/catchErrorFormatter.d.ts +2 -0
  169. package/libs/logger/src/config.d.ts +32 -3
  170. package/libs/logger/src/locationInfoFormatter.d.ts +2 -0
  171. package/libs/logger/src/logger.d.ts +21 -2
  172. package/libs/message-broker/src/amqpService.d.ts +2 -2
  173. package/libs/message-broker/src/types/amqp.d.ts +1 -1
  174. package/package.json +2 -2
  175. package/apps/core/src/__tests__/e2e/api/import/import.test-draft.d.ts +0 -0
  176. package/apps/core/src/infra/elasticSearch/index.d.ts +0 -1
  177. /package/apps/core/src/infra/{elasticSearch/elasticSearchClient.d.ts → elasticsearch/elasticsearchClient.d.ts} +0 -0
@@ -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;
@@ -17,6 +18,7 @@ export declare namespace server {
17
18
  let email_1: string;
18
19
  export { email_1 as email };
19
20
  }
21
+ let enableTracer: boolean;
20
22
  }
21
23
  export declare namespace db {
22
24
  let url: string;
@@ -62,6 +64,13 @@ export declare namespace mailer {
62
64
  export { port_1 as port };
63
65
  let secure_1: boolean;
64
66
  export { secure_1 as secure };
67
+ export let requireTLS: boolean;
68
+ export namespace from {
69
+ let name_1: string;
70
+ export { name_1 as name };
71
+ let email_2: string;
72
+ export { email_2 as email };
73
+ }
65
74
  export namespace auth_1 {
66
75
  export let user: string;
67
76
  let password_1: string;
@@ -69,6 +78,12 @@ export declare namespace mailer {
69
78
  }
70
79
  export { auth_1 as auth };
71
80
  }
81
+ export declare namespace actions {
82
+ namespace excel {
83
+ let useNewHyperformula: boolean;
84
+ let debug: boolean;
85
+ }
86
+ }
72
87
  export declare namespace bugsnag {
73
88
  let enable_1: boolean;
74
89
  export { enable_1 as enable };
@@ -85,16 +100,10 @@ export declare namespace matomo {
85
100
  export let siteId: string;
86
101
  }
87
102
  export declare namespace lang {
88
- export let available: string | string[];
103
+ export let available: string[];
89
104
  let _default: string;
90
105
  export { _default as default };
91
106
  }
92
- export declare namespace logs {
93
- let level: string;
94
- let transport: string;
95
- let destinationFile: string;
96
- let useJsonFormat: boolean;
97
- }
98
107
  export declare namespace permissions {
99
108
  let _default_1: boolean;
100
109
  export { _default_1 as default };
@@ -120,7 +129,8 @@ export declare namespace redis {
120
129
  export { host_2 as host };
121
130
  let port_3: string;
122
131
  export { port_3 as port };
123
- export let database: number;
132
+ export let cacheDatabase: number;
133
+ export let sessionDatabase: number;
124
134
  }
125
135
  export declare namespace filesManager {
126
136
  namespace queues {
@@ -166,8 +176,7 @@ export declare namespace eventsManager {
166
176
  }
167
177
  export { routingKeys_2 as routingKeys };
168
178
  export namespace queues_2 {
169
- let pubsub_events_1: string;
170
- export { pubsub_events_1 as pubsub_events };
179
+ let pubsub_events_prefix: string;
171
180
  }
172
181
  export { queues_2 as queues };
173
182
  }
@@ -178,7 +187,7 @@ export declare namespace indexationManager {
178
187
  }
179
188
  export { queues_3 as queues };
180
189
  }
181
- export declare let debug: boolean;
190
+ declare let debug_1: boolean;
182
191
  export declare let defaultUserId: string;
183
192
  export declare namespace _export {
184
193
  let directory_1: string;
@@ -199,6 +208,19 @@ export declare namespace preview {
199
208
  let directory_3: string;
200
209
  export { directory_3 as directory };
201
210
  }
211
+ export declare namespace notification {
212
+ let enable_3: boolean;
213
+ export { enable_3 as enable };
214
+ export namespace email_3 {
215
+ let enable_4: boolean;
216
+ export { enable_4 as enable };
217
+ }
218
+ export { email_3 as email };
219
+ export namespace webSocket {
220
+ let enable_5: boolean;
221
+ export { enable_5 as enable };
222
+ }
223
+ }
202
224
  export declare namespace applications {
203
225
  let rootFolder: string;
204
226
  }
@@ -207,13 +229,18 @@ export declare namespace files {
207
229
  let originalsPathPrefix: string;
208
230
  }
209
231
  export declare namespace dbProfiler {
210
- let enable_3: boolean;
211
- export { enable_3 as enable };
232
+ let enable_6: boolean;
233
+ export { enable_6 as enable };
212
234
  }
213
- export declare namespace elasticSearch {
235
+ export declare namespace elasticsearch {
214
236
  export let indexPrefix: string;
215
237
  let url_2: string;
216
238
  export { url_2 as url };
239
+ export let ilmPolicyName: string;
240
+ export let templateName: string;
241
+ }
242
+ export declare namespace logsCollector {
243
+ let queue: string;
217
244
  }
218
- export declare let pluginsPath: string | any[];
219
- export { _export as export, _import as import };
245
+ export declare let pluginsPath: string[];
246
+ export { debug_1 as debug, _export as export, _import as import };
@@ -1,10 +1,6 @@
1
1
  export namespace server {
2
2
  let allowIntrospection: boolean;
3
3
  }
4
- export namespace logs {
5
- let level: string;
6
- let transport: string;
7
- }
8
4
  export namespace auth {
9
5
  let refreshTokenExpiration: string;
10
6
  namespace cookie {
@@ -18,3 +14,10 @@ export namespace dbProfiler {
18
14
  export namespace bugsnag {
19
15
  let releaseStage: string;
20
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
+ }
@@ -6,6 +6,10 @@ export namespace server {
6
6
  let password: string;
7
7
  let email: string;
8
8
  }
9
+ namespace systemUser {
10
+ let email_1: string;
11
+ export { email_1 as email };
12
+ }
9
13
  let allowIntrospection: boolean;
10
14
  }
11
15
  export namespace db {
@@ -22,33 +26,63 @@ export namespace filesManager {
22
26
  }
23
27
  }
24
28
  export namespace eventsManager {
25
- namespace routingKeys {
29
+ export namespace routingKeys {
26
30
  let data_events: string;
31
+ let pubsub_events: string;
32
+ }
33
+ export namespace queues_1 {
34
+ let pubsub_events_prefix: string;
27
35
  }
36
+ export { queues_1 as queues };
28
37
  }
29
38
  export namespace indexationManager {
30
- export namespace queues_1 {
39
+ export namespace queues_2 {
31
40
  let events_1: string;
32
41
  export { events_1 as events };
33
42
  }
34
- export { queues_1 as queues };
43
+ export { queues_2 as queues };
35
44
  }
36
45
  export namespace tasksManager {
37
- export namespace queues_2 {
38
- let orders: string;
46
+ export let checkingInterval: number;
47
+ export namespace queues_3 {
48
+ let execOrders: string;
49
+ let cancelOrders: string;
39
50
  }
40
- export { queues_2 as queues };
51
+ export { queues_3 as queues };
41
52
  export namespace routingKeys_1 {
42
- let orders_1: string;
43
- export { orders_1 as orders };
53
+ let execOrders_1: string;
54
+ export { execOrders_1 as execOrders };
55
+ let cancelOrders_1: string;
56
+ export { cancelOrders_1 as cancelOrders };
44
57
  }
45
58
  export { routingKeys_1 as routingKeys };
46
59
  }
47
60
  export namespace logs {
48
61
  let transport: string;
49
62
  }
63
+ export namespace notification {
64
+ export let enable: boolean;
65
+ export namespace email_2 {
66
+ let enable_1: boolean;
67
+ export { enable_1 as enable };
68
+ }
69
+ export { email_2 as email };
70
+ export namespace webSocket {
71
+ let enable_2: boolean;
72
+ export { enable_2 as enable };
73
+ }
74
+ }
75
+ export namespace mailer {
76
+ namespace from {
77
+ let name_1: string;
78
+ export { name_1 as name };
79
+ let email_3: string;
80
+ export { email_3 as email };
81
+ }
82
+ }
50
83
  export let debug: boolean;
51
84
  export namespace redis {
52
- let database: number;
85
+ let cacheDatabase: number;
86
+ let sessionDatabase: number;
53
87
  }
54
88
  export let pluginsPath: string[];
@@ -1,10 +1,27 @@
1
- import type FormData from 'form-data';
1
+ import WebSocket from 'ws';
2
+ import { type Client as GraphqlWsClient } from 'graphql-ws';
3
+ import { type AxiosResponse } from 'axios';
4
+ import FormData from 'form-data';
2
5
  import { type ActionsListConfig } from '_types/actionsList';
3
6
  import { type ITreeElement } from '_types/tree';
4
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>;
5
13
  export declare function getGraphQLUrl(): Promise<string>;
6
- export declare function makeGraphQlCall(query: string | FormData, throwOnErrors?: boolean): Promise<any>;
7
- export declare function gqlSaveLibrary(id: string, label: string, additionalAttributes?: string[]): 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
+ skipLogErrors?: boolean;
21
+ }
22
+ export declare function makeGraphQlCall(query: string | FormData, options?: IMakeGraphQlCallOptions): Promise<any>;
23
+ export declare function importFileGraphQlCall(query: string, filePath: string, sheets?: any): Promise<any>;
24
+ export declare function gqlSaveLibrary(id: string, label: string, additionalAttributes?: string[], settings?: string): Promise<any>;
8
25
  export declare function gqlSaveApplication(id: string, label: string, endpoint: string): Promise<any>;
9
26
  export declare function gqlSaveAttribute(params: {
10
27
  id: string;
@@ -19,6 +36,7 @@ export declare function gqlSaveAttribute(params: {
19
36
  linkedTree?: string;
20
37
  multipleValues?: boolean;
21
38
  reverseLink?: string;
39
+ unique?: boolean;
22
40
  actionsList?: ActionsListConfig;
23
41
  required?: boolean;
24
42
  }): Promise<any>;
@@ -41,3 +59,13 @@ export declare function gqlSaveVersionProfile(profileId: string, label: string,
41
59
  * Convert object to JSON, escaping quotes to be able to use it in a graphql query
42
60
  **/
43
61
  export declare function toCleanJSON(obj: {}): string;
62
+ export declare function makeWebSocketGraphQlCall(options?: {
63
+ user: IE2EUser;
64
+ }): Promise<GraphqlWsClient>;
65
+ export declare function waitGraphqlWebSocketMessage<T>(client: GraphqlWsClient, query: string, variables: Record<string, any>, acceptMessage: (msg: T) => boolean, { timeoutMs }: {
66
+ timeoutMs: any;
67
+ }): Promise<T>;
68
+ export declare function waitWebSocketMessage<T>(webSocket: WebSocket, acceptMessage: (msg: T) => boolean, { timeoutMs }: {
69
+ timeoutMs: any;
70
+ }): Promise<T>;
71
+ export {};
@@ -0,0 +1,29 @@
1
+ interface IMailpitMsgLight {
2
+ From: {
3
+ Name: string;
4
+ Address: string;
5
+ };
6
+ ID: string;
7
+ MessageID: string;
8
+ Read: boolean;
9
+ Size: number;
10
+ Subject: string;
11
+ To: Array<{
12
+ Name: string;
13
+ Address: string;
14
+ }>;
15
+ }
16
+ interface IMailpitMsgFull extends IMailpitMsgLight {
17
+ HTML: string;
18
+ Text: string;
19
+ }
20
+ interface IMailpitSearchResult {
21
+ messages: IMailpitMsgLight[];
22
+ total: number;
23
+ unread: number;
24
+ }
25
+ export declare function waitMailpitMessage(acceptMessage: (msg: IMailpitMsgLight) => boolean): Promise<IMailpitMsgFull>;
26
+ export declare function deleteMailpitMessagesBySearch(search: string): Promise<void>;
27
+ export declare function searchMailpitMessages(search: string): Promise<IMailpitSearchResult>;
28
+ export declare function waitForMailpitSearchMessage(search: string, timeoutMs?: number, intervalMs?: number): Promise<IMailpitMsgLight[]>;
29
+ 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;
@@ -1 +1,2 @@
1
- export declare const baseAttributes: string[];
1
+ export declare const DISCUSSION_THREADS_ATTRIBUTE_ID = "discussion_threads";
2
+ export declare const BASE_ATTRIBUTES: string[];
@@ -1,4 +1,3 @@
1
- import { type ILoggerConfig } from '@leav/logger';
2
1
  import { type Options } from 'amqplib';
3
2
  import { type IKeyValue } from './shared';
4
3
  export interface IConfig {
@@ -10,7 +9,6 @@ export interface IConfig {
10
9
  auth: IAuth;
11
10
  mailer: IMailer;
12
11
  lang: ILang;
13
- logs: ILogs;
14
12
  permissions: IPermissions;
15
13
  amqp: IAmqp;
16
14
  redis: IRedis;
@@ -18,6 +16,7 @@ export interface IConfig {
18
16
  indexationManager: IIndexationManager;
19
17
  tasksManager: ITasksManager;
20
18
  eventsManager: IEventsManager;
19
+ notification: INotificationConfig;
21
20
  debug?: boolean;
22
21
  env?: string;
23
22
  defaultUserId: string;
@@ -26,10 +25,12 @@ export interface IConfig {
26
25
  plugins: IKeyValue<IKeyValue<any>>;
27
26
  preview: IPreview;
28
27
  applications: IApplicationsConfig;
28
+ actions: IActions;
29
29
  files: IFilesConfig;
30
30
  dbProfiler: IDbProfilerConfig;
31
31
  instanceId: string;
32
- elasticSearch: IElasticSearchConfig;
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;
@@ -59,6 +62,20 @@ export interface IServer {
59
62
  systemUser: {
60
63
  email: string;
61
64
  };
65
+ enableTracer: boolean;
66
+ }
67
+ export interface IActions {
68
+ excel: {
69
+ /**
70
+ * Replace deprecated hot-formula-parser npm module by new hyperformula npm module
71
+ * Formulas should be compatible
72
+ */
73
+ useNewHyperformula: boolean;
74
+ /**
75
+ * Add debug log for each calculation with formula and result or error
76
+ */
77
+ debug: boolean;
78
+ };
62
79
  }
63
80
  export interface IDb {
64
81
  url: string;
@@ -96,7 +113,18 @@ export interface IAuth {
96
113
  export interface IMailer {
97
114
  host: string;
98
115
  port: number;
116
+ /**
117
+ * If true, use SSL/TLS connection (usually port 465). If false, use STARTTLS (usually port 587)
118
+ */
99
119
  secure: boolean;
120
+ /**
121
+ * If true, require TLS for the connection (STARTTLS). Only used if secure is false
122
+ */
123
+ requireTLS: boolean;
124
+ from: {
125
+ name: string;
126
+ email: string;
127
+ };
100
128
  auth: {
101
129
  user: string;
102
130
  password: string;
@@ -106,7 +134,6 @@ export interface ILang {
106
134
  available: string[];
107
135
  default: string;
108
136
  }
109
- export type ILogs = ILoggerConfig;
110
137
  export interface IPermissions {
111
138
  default: boolean;
112
139
  enableCache: boolean;
@@ -120,7 +147,8 @@ export interface IAmqp {
120
147
  export interface IRedis {
121
148
  host: string;
122
149
  port: number;
123
- database: number;
150
+ cacheDatabase: number;
151
+ sessionDatabase: number;
124
152
  }
125
153
  export interface IFilesManager {
126
154
  queues: {
@@ -145,7 +173,7 @@ export interface IEventsManager {
145
173
  pubsub_events: string;
146
174
  };
147
175
  queues: {
148
- pubsub_events: string;
176
+ pubsub_events_prefix: string;
149
177
  };
150
178
  }
151
179
  export interface IIndexationManager {
@@ -222,9 +250,20 @@ export interface IFilesConfig {
222
250
  export interface IDbProfilerConfig {
223
251
  enable: boolean;
224
252
  }
225
- export interface IElasticSearchConfig {
253
+ export interface INotificationConfig {
254
+ enable: boolean;
255
+ email: {
256
+ enable: boolean;
257
+ };
258
+ webSocket: {
259
+ enable: boolean;
260
+ };
261
+ }
262
+ export interface IElasticsearchConfig {
226
263
  indexPrefix: string;
227
264
  url: string;
265
+ ilmPolicyName: string;
266
+ templateName: string;
228
267
  }
229
268
  export interface IBugsnag {
230
269
  enable: boolean;
@@ -238,3 +277,6 @@ export interface IMatomo {
238
277
  url?: string;
239
278
  siteId?: string;
240
279
  }
280
+ export interface ILogsCollector {
281
+ queue: string;
282
+ }
@@ -0,0 +1,2 @@
1
+ import { type IDbEvent, type IDbPayload } from '@leav/utils';
2
+ export type WritableMessage = Omit<IDbEvent, 'payload' | 'emitter'> & IDbPayload;
@@ -1,9 +1,11 @@
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 {
8
+ ATTRIBUTE_USED_BY_LIBRARY = "ATTRIBUTE_USED_BY_LIBRARY",
7
9
  ATTRIBUTE_USED_IN_METADATA = "ATTRIBUTE_USED_IN_METADATA",
8
10
  CANNOT_SAVE_METADATA = "CANNOT_SAVE_METADATA",
9
11
  DUPLICATE_DIRECTORY_NAMES = "DUPLICATE_DIRECTORY_NAMES",
@@ -15,7 +17,6 @@ export declare enum Errors {
15
17
  ENCRYPT_ERROR = "ENCRYPT_ERROR",
16
18
  ERROR = "ERROR",
17
19
  EXCEL_CALCULATION_ERROR = "EXCEL_CALCULATION_ERROR",
18
- FILE_ERROR = "FILE_ERROR",
19
20
  FILE_NOT_FOUND = "FILE_NOT_FOUND",
20
21
  FORBIDDEN_FILES = "FORBIDDEN_FILES",
21
22
  FORBIDDEN_ID = "FORBIDDEN_ID",
@@ -1,8 +1,20 @@
1
+ import { type INotificationContent } from './notification';
2
+ import { type ITask } from './tasksManager';
1
3
  export declare enum TriggerNames {
2
4
  APPLICATION_EVENT = "APPLICATION_EVENT",
3
5
  UPLOAD_FILE = "UPLOAD_FILE",
4
6
  INDEXATION = "INDEXATION",
5
7
  TASK = "TASK",
6
8
  TREE_EVENT = "TREE_EVENT",
7
- RECORD_UPDATE = "RECORD_UPDATE"
9
+ RECORD_UPDATE = "RECORD_UPDATE",
10
+ NOTIFICATION = "NOTIFICATION"
11
+ }
12
+ export interface IPubSubNotificationData {
13
+ notification: INotificationContent & {
14
+ date: number;
15
+ };
16
+ recipientUserIds: string[];
17
+ }
18
+ export interface IPubSubTaskData {
19
+ task: ITask;
8
20
  }
@@ -22,8 +22,8 @@ export interface IRecordForm {
22
22
  sidePanel: IFormSidePanel;
23
23
  }
24
24
  export declare enum FormElementTypes {
25
- field = "field",
26
- layout = "layout"
25
+ FIELD = "field",
26
+ LAYOUT = "layout"
27
27
  }
28
28
  export type IFormStrict = Required<IForm>;
29
29
  export interface IFormElementsDependency {
@@ -0,0 +1,51 @@
1
+ import { type IQueryInfos } from './queryInfos';
2
+ export interface INotification {
3
+ /**
4
+ * Timestamp of the notification creation in milliseconds since epoch
5
+ */
6
+ date: number;
7
+ /**
8
+ * User ID of the notification recipient
9
+ */
10
+ recipientUserId: string;
11
+ content: INotificationContent;
12
+ }
13
+ export interface INotificationContent {
14
+ level: 'info' | 'warning';
15
+ title: string;
16
+ message: string;
17
+ relatedEntities?: Array<{
18
+ url: string;
19
+ label: string;
20
+ }>;
21
+ attachments?: Array<{
22
+ url: string;
23
+ label: string;
24
+ }>;
25
+ }
26
+ export interface ICreateNotification {
27
+ emitterUserId: string;
28
+ /**
29
+ * Recipients of the notification, need at least one userId or groupId
30
+ */
31
+ recipients: {
32
+ userIds: string[];
33
+ /**
34
+ * No implementation yet
35
+ */
36
+ groupIds: string[];
37
+ };
38
+ /**
39
+ * Priority of the notification, may change which channel is used to send it (no yet implemented)
40
+ */
41
+ priority: 'urgent' | 'normal';
42
+ content: INotificationContent;
43
+ }
44
+ export declare enum NotificationChannels {
45
+ EMAIL = "email",
46
+ WEB_SOCKET = "web_socket"
47
+ }
48
+ export interface INotificationChannel {
49
+ type: NotificationChannels;
50
+ sendNotifications(notifications: INotification[], ctx: IQueryInfos): Promise<void>;
51
+ }
@@ -2,3 +2,13 @@ export interface IUserData {
2
2
  global: boolean;
3
3
  data: any;
4
4
  }
5
+ /**
6
+ * Same idea as IRecordIdentity but for users
7
+ */
8
+ export interface IUserIdentity {
9
+ id: string;
10
+ /**
11
+ * @throw if user have no email
12
+ */
13
+ getEmail: () => Promise<string>;
14
+ }
@@ -28,4 +28,4 @@ export interface IApplicationAppDeps {
28
28
  'core.utils': IUtils;
29
29
  config: IConfig;
30
30
  }
31
- export default function ({ 'core.app.graphql': graphqlApp, 'core.app.auth': authApp, 'core.app.helpers.initQueryContext': initQueryContext, 'core.app.helpers.validateRequestToken': validateRequestToken, 'core.app.core.subscriptionsHelper': subscriptionsHelper, 'core.domain.application': applicationDomain, 'core.domain.permission': permissionDomain, 'core.domain.record': recordDomain, 'core.domain.eventsManager': eventsManagerDomain, 'core.domain.globalSettings': globalSettings, 'core.utils.logger': logger, 'core.utils': utils, config }: IApplicationAppDeps): IApplicationApp;
31
+ export default function ({ 'core.app.graphql': graphqlApp, 'core.app.auth': authApp, 'core.app.helpers.initQueryContext': initQueryContext, 'core.app.helpers.validateRequestToken': validateRequestToken, 'core.app.core.subscriptionsHelper': subscriptionsHelper, 'core.domain.application': applicationDomain, 'core.domain.permission': permissionDomain, 'core.domain.record': recordDomain, 'core.domain.eventsManager': eventsManagerDomain, 'core.domain.globalSettings': globalSettings, 'core.utils.logger': logger, 'core.utils': utils, config, }: IApplicationAppDeps): IApplicationApp;
@@ -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';
@@ -15,6 +14,8 @@ import { type IncomingHttpHeaders } from 'http';
15
14
  import { type IRecordRepo } from '../../infra/record/recordRepo';
16
15
  import { type IGraphqlAppModule } from 'app/graphql/graphqlApp';
17
16
  import { type IServerRouteAppModule } from 'interface/server';
17
+ import { type GetSystemQueryContext } from 'utils/helpers/getSystemQueryContext';
18
+ import { type ISessionRepo } from '../../infra/session/sessionRepo';
18
19
  export interface IAuthApp extends IGraphqlAppModule, IServerRouteAppModule {
19
20
  validateRequestToken(params: {
20
21
  apiKey?: string;
@@ -29,11 +30,12 @@ export interface IAuthAppDeps {
29
30
  'core.infra.record': IRecordRepo;
30
31
  'core.domain.apiKey': IApiKeyDomain;
31
32
  'core.domain.user': IUserDomain;
32
- 'core.infra.cache.cacheService': ICachesService;
33
33
  'core.utils.logger': ILogger;
34
34
  'core.infra.oidc.oidcClientService': IOIDCClientService;
35
35
  'core.app.helpers.initQueryContext': InitQueryContextFunc;
36
36
  'core.app.helpers.convertOIDCIdentifier': IConvertOIDCIdentifier;
37
+ 'core.utils.getSystemQueryContext': GetSystemQueryContext;
37
38
  config: IConfig;
39
+ 'core.infra.session': ISessionRepo;
38
40
  }
39
- 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, 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;
@@ -6,5 +6,5 @@ interface IDeps {
6
6
  'core.domain.apiKey': IApiKeyDomain;
7
7
  'core.domain.record': IRecordDomain;
8
8
  }
9
- export default function ({ 'core.domain.apiKey': apiKeyDomain, 'core.domain.record': recordDomain }: IDeps): ICoreVersionProfileApp;
9
+ export default function ({ 'core.domain.apiKey': apiKeyDomain, 'core.domain.record': recordDomain, }: IDeps): ICoreVersionProfileApp;
10
10
  export {};