@aristid/leav-types 1.6.0-bd0f27d9 → 1.6.0-c880e58e

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.
@@ -0,0 +1,3 @@
1
+ export declare enum FakePluginTaskType {
2
+ FAKE_TYPE = "FAKE_TYPE"
3
+ }
@@ -0,0 +1,6 @@
1
+ export interface IFakeDomain {
2
+ execWorker({ fromTask }: {
3
+ fromTask: string;
4
+ }): void;
5
+ }
6
+ export default function (): IFakeDomain;
@@ -0,0 +1 @@
1
+ export { default } from './fakeDomain';
@@ -2,10 +2,12 @@ import { type i18n } from 'i18next';
2
2
  import { type IPluginInitModule } from '_types/plugin';
3
3
  import { type IValueRepo } from '../../../../../infra/value/valueRepo';
4
4
  import { type IAttributeDomain } from '../../../../../domain/attribute/attributeDomain';
5
+ import { type ITasksManagerDomain } from 'domain/tasksManager/tasksManagerDomain';
5
6
  interface IDeps {
6
7
  translator: i18n;
7
8
  'core.infra.value': IValueRepo;
8
9
  'core.domain.attribute': IAttributeDomain;
10
+ 'core.domain.tasksManager': ITasksManagerDomain;
9
11
  }
10
- export default function ({ translator, 'core.infra.value': valueRepo, 'core.domain.attribute': attributeDomain, }: IDeps): IPluginInitModule;
12
+ export default function ({ translator, 'core.infra.value': valueRepo, 'core.domain.attribute': attributeDomain, 'core.domain.tasksManager': tasksManagerDomain, }: IDeps): IPluginInitModule;
11
13
  export {};
@@ -18,6 +18,7 @@ export interface IExtensionPointsFunctions extends IExtensionPoints {
18
18
  registerPermissionActions: (type: PermissionTypes, actions: string[], applyOn?: string[]) => void;
19
19
  registerEventActions: (actions: string[], prefix: string) => void;
20
20
  registerActions: (actions: IActionsListFunction[]) => void;
21
+ registerTaskTypes: (types: string[]) => void;
21
22
  /**
22
23
  * Method to register some Express routes inside LEAV Core.
23
24
  *
@@ -113,6 +113,7 @@ export interface ITreePermissionsDependentValuesConf {
113
113
  * IDs of attributes used for permissions
114
114
  */
115
115
  dependenciesTreeAttributes: string[];
116
+ allowByDefault: boolean;
116
117
  }
117
118
  export interface IPermissionsTreeTarget {
118
119
  /**
@@ -30,8 +30,7 @@ export interface ITaskOrder {
30
30
  payload: Payload;
31
31
  }
32
32
  export interface ITaskFunc {
33
- moduleName: string;
34
- subModuleName?: string;
33
+ path: string;
35
34
  name: string;
36
35
  args: {
37
36
  [key: string]: any;
@@ -67,7 +66,7 @@ export declare enum TaskType {
67
66
  SAVE_VALUE_BULK = "SAVE_VALUE_BULK"
68
67
  }
69
68
  export interface ITaskRole {
70
- type: TaskType;
69
+ type: TaskType | string;
71
70
  detail?: string;
72
71
  }
73
72
  export interface ITask {
@@ -7,9 +7,12 @@ import { type IPaginationParams, type ISortParams } from '_types/list';
7
7
  import { type ITasksManagerDomain } from '../../domain/tasksManager/tasksManagerDomain';
8
8
  import { TaskStatus } from '../../_types/tasksManager';
9
9
  import { type IGraphqlAppModule } from 'app/graphql/graphqlApp';
10
+ import { type IAdminPermissionDomain } from 'domain/permission/adminPermissionDomain';
11
+ import { type IExtensionPoints } from '_types/extensionPoints';
10
12
  export interface ITasksManagerApp extends IGraphqlAppModule {
11
13
  initMaster(): Promise<NodeJS.Timeout>;
12
14
  initWorker(): Promise<void>;
15
+ extensionPoints?: IExtensionPoints;
13
16
  }
14
17
  interface IDeps {
15
18
  'core.domain.tasksManager'?: ITasksManagerDomain;
@@ -18,6 +21,7 @@ interface IDeps {
18
21
  'core.utils'?: IUtils;
19
22
  'core.domain.record'?: IRecordDomain;
20
23
  'core.domain.eventsManager'?: IEventsManagerDomain;
24
+ 'core.domain.permission.admin'?: IAdminPermissionDomain;
21
25
  }
22
26
  export interface IGetTasksArgs {
23
27
  filters?: ICoreEntityFilterOptions & {
@@ -28,5 +32,5 @@ export interface IGetTasksArgs {
28
32
  pagination?: IPaginationParams;
29
33
  sort?: ISortParams;
30
34
  }
31
- export default function ({ 'core.domain.record': recordDomain, 'core.domain.tasksManager': tasksManagerDomain, 'core.domain.eventsManager': eventsManager, }: IDeps): ITasksManagerApp;
35
+ export default function ({ 'core.domain.record': recordDomain, 'core.domain.tasksManager': tasksManagerDomain, 'core.domain.eventsManager': eventsManager, 'core.domain.permission.admin': adminPermissionDomain, }: IDeps): ITasksManagerApp;
32
36
  export {};
@@ -4,7 +4,6 @@ import { type AttributeDependentValuesPermissionsActions, type IPermissionsDepen
4
4
  import { type IAttributeDomain } from '../attribute/attributeDomain';
5
5
  import { type IPermissionByUserGroupsHelper } from './helpers/permissionByUserGroups';
6
6
  import { type IElementAncestorsHelper } from 'domain/tree/helpers/elementAncestors';
7
- import { type IDefaultPermissionHelper } from './helpers/defaultPermission';
8
7
  import { type IConfig } from '_types/config';
9
8
  export interface IAttributeDependentValuesPermissionDomain {
10
9
  getAttributeDependentValuesPermission(params: {
@@ -26,7 +25,6 @@ export interface IAttributeDependentValuesPermissionDomain {
26
25
  }
27
26
  export interface IRecordAttributePermissionDomainDeps {
28
27
  'core.domain.permission.helpers.permissionByUserGroups': IPermissionByUserGroupsHelper;
29
- 'core.domain.permission.helpers.defaultPermission': IDefaultPermissionHelper;
30
28
  'core.domain.attribute': IAttributeDomain;
31
29
  'core.domain.tree.helpers.elementAncestors': IElementAncestorsHelper;
32
30
  'core.infra.value': IValueRepo;
@@ -56,6 +56,8 @@ export interface ITasksManagerDomain {
56
56
  createTask(task: ITaskCreatePayload, ctx: IQueryInfos): Promise<string>;
57
57
  cancelTask(task: ITaskCancelPayload, ctx: IQueryInfos): Promise<void>;
58
58
  deleteTasks(tasks: ITaskDeletePayload[], ctx: IQueryInfos): Promise<void>;
59
+ registerTaskTypes(types: string[]): void;
60
+ getTaskTypes(): string;
59
61
  }
60
62
  export interface ITasksManagerDomainDeps {
61
63
  config: Config.IConfig;
@@ -2,9 +2,10 @@ interface ICallerInfo {
2
2
  path: string;
3
3
  line: string;
4
4
  col: string;
5
+ matchStackIndex: number;
5
6
  }
6
7
  export declare class LoggerCallStack {
7
- private callerLineIndexInStack;
8
+ private callerLineSearchFromIndexInStack;
8
9
  getCallStackTrace(): string | null;
9
10
  getLocationInfo(): ICallerInfo | null;
10
11
  private getStackLines;
@@ -1,2 +1,2 @@
1
1
  import winston from 'winston';
2
- export declare const addLocationInfoInLog: winston.Logform.FormatWrap;
2
+ export declare const addLocationInfoInLog: (isLogLevelEnabled: (level: string) => boolean) => winston.Logform.FormatWrap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.6.0-bd0f27d9",
3
+ "version": "1.6.0-c880e58e",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",