@aristid/leav-types 1.10.0-282895df → 1.10.0-418b43b1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/core/config/default.d.ts +19 -1
- package/apps/core/src/_types/config.d.ts +18 -2
- package/apps/core/src/app/core/logApp.d.ts +7 -1
- package/apps/core/src/app/core/recordApp/_types.d.ts +0 -1
- package/apps/core/src/domain/record/_types.d.ts +0 -1
- package/apps/core/src/domain/record/helpers/findRecords.d.ts +1 -3
- package/apps/core/src/domain/record/helpers/getAccessPermissionFilters.d.ts +0 -2
- package/apps/core/src/infra/cache/cacheService.d.ts +3 -1
- package/apps/core/src/infra/record/recordRepo.d.ts +3 -1
- package/apps/core/src/infra/tree/treeRepo.d.ts +3 -1
- package/package.json +1 -1
|
@@ -32,6 +32,25 @@ export declare namespace dataLoaders {
|
|
|
32
32
|
namespace getValues {
|
|
33
33
|
let enableCache: boolean;
|
|
34
34
|
let useBatch: boolean;
|
|
35
|
+
let maxBatchSize: number;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
namespace recordRepo {
|
|
39
|
+
namespace getRecord {
|
|
40
|
+
let maxBatchSize_1: number;
|
|
41
|
+
export { maxBatchSize_1 as maxBatchSize };
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
namespace treeRepo {
|
|
45
|
+
namespace getRecordByNodeId {
|
|
46
|
+
let maxBatchSize_2: number;
|
|
47
|
+
export { maxBatchSize_2 as maxBatchSize };
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
namespace cacheService {
|
|
51
|
+
namespace ramCache {
|
|
52
|
+
let maxBatchSize_3: number;
|
|
53
|
+
export { maxBatchSize_3 as maxBatchSize };
|
|
35
54
|
}
|
|
36
55
|
}
|
|
37
56
|
}
|
|
@@ -133,7 +152,6 @@ export declare namespace permissions {
|
|
|
133
152
|
}
|
|
134
153
|
let enableCache_1: boolean;
|
|
135
154
|
export { enableCache_1 as enableCache };
|
|
136
|
-
export let enableAccessRecordByDefaultBackendFilter: boolean;
|
|
137
155
|
}
|
|
138
156
|
export declare namespace amqp {
|
|
139
157
|
namespace connOpt {
|
|
@@ -166,7 +166,6 @@ export interface IPermissions {
|
|
|
166
166
|
everybody: IPermissionsByTypesAndActions;
|
|
167
167
|
adminGroup: IPermissionsByTypesAndActions;
|
|
168
168
|
enableCache: boolean;
|
|
169
|
-
enableAccessRecordByDefaultBackendFilter: boolean;
|
|
170
169
|
}
|
|
171
170
|
export interface IAmqp {
|
|
172
171
|
connOpt: Options.Connect;
|
|
@@ -240,6 +239,14 @@ export interface IImport {
|
|
|
240
239
|
*/
|
|
241
240
|
delayTaskExecMs: number;
|
|
242
241
|
}
|
|
242
|
+
interface ICommonDataLoaderConfig {
|
|
243
|
+
/**
|
|
244
|
+
* Split batch in multiple batch if number of keys to load is superior to this value.
|
|
245
|
+
* Too low value can cause performance issue, to many arangodb or redis requeste, too high value can cause memory, performance and availability issue.
|
|
246
|
+
* Adjust according to your use case and data size
|
|
247
|
+
*/
|
|
248
|
+
maxBatchSize?: number;
|
|
249
|
+
}
|
|
243
250
|
/**
|
|
244
251
|
* Data loaders configuration for performances
|
|
245
252
|
*/
|
|
@@ -261,7 +268,16 @@ export interface IDataLoaders {
|
|
|
261
268
|
* Temporary, to be removed in future
|
|
262
269
|
*/
|
|
263
270
|
useBatch: boolean;
|
|
264
|
-
};
|
|
271
|
+
} & ICommonDataLoaderConfig;
|
|
272
|
+
};
|
|
273
|
+
recordRepo: {
|
|
274
|
+
getRecord: ICommonDataLoaderConfig;
|
|
275
|
+
};
|
|
276
|
+
treeRepo: {
|
|
277
|
+
getRecordByNodeId: ICommonDataLoaderConfig;
|
|
278
|
+
};
|
|
279
|
+
cacheService: {
|
|
280
|
+
ramCache: ICommonDataLoaderConfig;
|
|
265
281
|
};
|
|
266
282
|
}
|
|
267
283
|
export interface IDiskCache {
|
|
@@ -8,6 +8,9 @@ import { type IVersionProfileDomain } from 'domain/versionProfile/versionProfile
|
|
|
8
8
|
import { type IAppModule } from '_types/shared';
|
|
9
9
|
import { type IGraphqlAppModule } from 'app/graphql/graphqlApp';
|
|
10
10
|
import { type IFormatLogValueHelper } from 'domain/value/helpers/formatLogValue';
|
|
11
|
+
import { type i18n } from 'i18next';
|
|
12
|
+
import { type IRecordDomain } from 'domain/record/recordDomain';
|
|
13
|
+
import { type IConfig } from '_types/config';
|
|
11
14
|
export type ICoreLogApp = IAppModule & IGraphqlAppModule;
|
|
12
15
|
interface IDeps {
|
|
13
16
|
'core.domain.log': ILogDomain;
|
|
@@ -18,6 +21,9 @@ interface IDeps {
|
|
|
18
21
|
'core.domain.value.helpers.formatLogValue': IFormatLogValueHelper;
|
|
19
22
|
'core.domain.versionProfile': IVersionProfileDomain;
|
|
20
23
|
'core.domain.application': IApplicationDomain;
|
|
24
|
+
'core.domain.record': IRecordDomain;
|
|
25
|
+
translator: i18n;
|
|
26
|
+
config: IConfig;
|
|
21
27
|
}
|
|
22
|
-
export default function ({ 'core.domain.log': logDomain, 'core.domain.eventsManager': eventsManagerDomain, 'core.domain.library': libraryDomain, 'core.domain.attribute': attributeDomain, 'core.domain.tree': treeDomain, 'core.domain.value.helpers.formatLogValue': formatLogValue, 'core.domain.versionProfile': versionProfileDomain, 'core.domain.application': applicationDomain, }: IDeps): ICoreLogApp;
|
|
28
|
+
export default function ({ 'core.domain.log': logDomain, 'core.domain.eventsManager': eventsManagerDomain, 'core.domain.library': libraryDomain, 'core.domain.attribute': attributeDomain, 'core.domain.tree': treeDomain, 'core.domain.value.helpers.formatLogValue': formatLogValue, 'core.domain.versionProfile': versionProfileDomain, 'core.domain.application': applicationDomain, 'core.domain.record': recordDomain, translator, config, }: IDeps): ICoreLogApp;
|
|
23
29
|
export {};
|
|
@@ -13,7 +13,6 @@ import { type ITreeRepo } from '../../../infra/tree/treeRepo';
|
|
|
13
13
|
import { type GetCoreEntityByIdFunc } from '../../helpers/getCoreEntityById';
|
|
14
14
|
import { type IElementAncestorsHelper } from '../../tree/helpers/elementAncestors';
|
|
15
15
|
import { type IDefaultPermissionHelper } from '../../permission/helpers/defaultPermission';
|
|
16
|
-
import { type IConfig } from '_types/config';
|
|
17
16
|
/**
|
|
18
17
|
* Search records
|
|
19
18
|
* Filters to apply on records selection
|
|
@@ -35,6 +34,5 @@ export interface IFindRecordsHelperDeps {
|
|
|
35
34
|
'core.domain.tree.helpers.elementAncestors': IElementAncestorsHelper;
|
|
36
35
|
'core.domain.permission.helpers.defaultPermission': IDefaultPermissionHelper;
|
|
37
36
|
'core.infra.permission': IPermissionRepo;
|
|
38
|
-
config: IConfig;
|
|
39
37
|
}
|
|
40
|
-
export default function ({ 'core.domain.helpers.validate': validateHelper, 'core.domain.attribute': attributeDomain, 'core.domain.permission.helpers.defaultPermission': defaultPermHelper, 'core.infra.library': libraryRepo, 'core.domain.permission.library': libraryPermissionDomain, 'core.infra.record': recordRepo, 'core.domain.helpers.getCoreEntityById': getCoreEntityById, 'core.infra.tree': treeRepo, 'core.domain.tree.helpers.elementAncestors': elementAncestorsHelper, 'core.infra.permission': permissionRepo, 'core.utils': utils,
|
|
38
|
+
export default function ({ 'core.domain.helpers.validate': validateHelper, 'core.domain.attribute': attributeDomain, 'core.domain.permission.helpers.defaultPermission': defaultPermHelper, 'core.infra.library': libraryRepo, 'core.domain.permission.library': libraryPermissionDomain, 'core.infra.record': recordRepo, 'core.domain.helpers.getCoreEntityById': getCoreEntityById, 'core.infra.tree': treeRepo, 'core.domain.tree.helpers.elementAncestors': elementAncestorsHelper, 'core.infra.permission': permissionRepo, 'core.utils': utils, }: IFindRecordsHelperDeps): FindRecordsHelper;
|
|
@@ -23,9 +23,7 @@ export interface IGetAccessPermissionsValue {
|
|
|
23
23
|
export type IGetAccessPermissions = (params: {
|
|
24
24
|
groupsIds: string[][];
|
|
25
25
|
library: string;
|
|
26
|
-
existingFiltersOnTreeIds: string[];
|
|
27
26
|
deps: IAccessPermissionFilterDeps;
|
|
28
|
-
ignoreAccessRecordByDefaultPermission?: boolean;
|
|
29
27
|
}, ctx: IQueryInfos) => Promise<IGetAccessPermissionsValue[]>;
|
|
30
28
|
declare const getAccessPermissionsFilters: IGetAccessPermissions;
|
|
31
29
|
export default getAccessPermissionsFilters;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type IQueryInfos } from '_types/queryInfos';
|
|
2
|
+
import { type IConfig } from '_types/config';
|
|
2
3
|
import { type IRedis } from './redis';
|
|
3
4
|
export interface IMemoizeParams<T> {
|
|
4
5
|
key: string;
|
|
@@ -25,10 +26,11 @@ export interface ICacheService {
|
|
|
25
26
|
interface ICacheServiceDeps {
|
|
26
27
|
'core.infra.redis': IRedis;
|
|
27
28
|
'core.infra.cache.diskService': ICacheService;
|
|
29
|
+
config: IConfig;
|
|
28
30
|
}
|
|
29
31
|
export declare enum ECacheType {
|
|
30
32
|
DISK = "DISK",
|
|
31
33
|
RAM = "RAM"
|
|
32
34
|
}
|
|
33
|
-
export default function ({ 'core.infra.redis': redis, 'core.infra.cache.diskService': diskService, }: ICacheServiceDeps): ICachesService;
|
|
35
|
+
export default function ({ 'core.infra.redis': redis, 'core.infra.cache.diskService': diskService, config, }: ICacheServiceDeps): ICachesService;
|
|
34
36
|
export {};
|
|
@@ -2,6 +2,7 @@ import { type GeneratedAqlQuery } from 'arangojs/aql';
|
|
|
2
2
|
import { type GetConditionPart } from 'infra/attributeTypes/helpers/getConditionPart';
|
|
3
3
|
import { type GetSearchQuery } from 'infra/indexation/helpers/getSearchQuery';
|
|
4
4
|
import { type IQueryInfos } from '_types/queryInfos';
|
|
5
|
+
import { type IConfig } from '_types/config';
|
|
5
6
|
import { type ICursorPaginationParams, type IListWithCursor, type IPaginationParams } from '../../_types/list';
|
|
6
7
|
import { type IRecord, type IRecordFilterOption, type IRecordSort } from '../../_types/record';
|
|
7
8
|
import { type IAttributeRepo } from '../attribute/attributeRepo';
|
|
@@ -66,5 +67,6 @@ export interface IRecordRepoDeps {
|
|
|
66
67
|
'core.infra.record.helpers.getSearchVariableName': GetSearchVariableName;
|
|
67
68
|
'core.infra.record.helpers.filterTypes': IFilterTypesHelper;
|
|
68
69
|
'core.infra.indexation.helpers.getSearchQuery': GetSearchQuery;
|
|
70
|
+
config?: IConfig;
|
|
69
71
|
}
|
|
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;
|
|
72
|
+
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, config, }: IRecordRepoDeps): IRecordRepo;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type IList, type IPaginationParams } from '_types/list';
|
|
2
2
|
import { type IQueryInfos } from '_types/queryInfos';
|
|
3
3
|
import { type IRecord } from '_types/record';
|
|
4
|
+
import { type IConfig } from '_types/config';
|
|
4
5
|
import { type IGetCoreTreesParams, type ITree, type ITreeElement, type ITreeNode, type ITreeNodeLight, type TreePath } from '_types/tree';
|
|
5
6
|
import { type IDbService } from '../db/dbService';
|
|
6
7
|
import { type IDbUtils } from '../db/dbUtils';
|
|
@@ -165,5 +166,6 @@ export declare const TO_RECORD_PROP_NAME = "toRecord";
|
|
|
165
166
|
export interface ITreeRepoDeps {
|
|
166
167
|
'core.infra.db.dbService': IDbService;
|
|
167
168
|
'core.infra.db.dbUtils': IDbUtils;
|
|
169
|
+
config: IConfig;
|
|
168
170
|
}
|
|
169
|
-
export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, }: ITreeRepoDeps): ITreeRepo;
|
|
171
|
+
export default function ({ 'core.infra.db.dbService': dbService, 'core.infra.db.dbUtils': dbUtils, config, }: ITreeRepoDeps): ITreeRepo;
|