@aristid/leav-types 1.4.1-248b9e2b → 1.4.1-31443cb4

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.
@@ -77,6 +77,12 @@ export declare namespace mailer {
77
77
  }
78
78
  export { auth_1 as auth };
79
79
  }
80
+ export declare namespace actions {
81
+ namespace excel {
82
+ let useNewHyperformula: boolean;
83
+ let debug: boolean;
84
+ }
85
+ }
80
86
  export declare namespace bugsnag {
81
87
  let enable_1: boolean;
82
88
  export { enable_1 as enable };
@@ -180,7 +186,7 @@ export declare namespace indexationManager {
180
186
  }
181
187
  export { queues_3 as queues };
182
188
  }
183
- export declare let debug: boolean;
189
+ declare let debug_1: boolean;
184
190
  export declare let defaultUserId: string;
185
191
  export declare namespace _export {
186
192
  let directory_1: string;
@@ -236,4 +242,4 @@ export declare namespace logsCollector {
236
242
  let queue: string;
237
243
  }
238
244
  export declare let pluginsPath: string[];
239
- export { _export as export, _import as import };
245
+ export { debug_1 as debug, _export as export, _import as import };
@@ -14,3 +14,10 @@ export namespace dbProfiler {
14
14
  export namespace bugsnag {
15
15
  let releaseStage: string;
16
16
  }
17
+ export namespace actions {
18
+ namespace excel {
19
+ export let useNewHyperformula: boolean;
20
+ let debug_1: boolean;
21
+ export { debug_1 as debug };
22
+ }
23
+ }
@@ -5,13 +5,21 @@ import type FormData from 'form-data';
5
5
  import { type ActionsListConfig } from '_types/actionsList';
6
6
  import { type ITreeElement } from '_types/tree';
7
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>;
8
13
  export declare function getGraphQLUrl(): Promise<string>;
9
14
  export declare class E2EGraphQLError extends Error {
10
15
  readonly response: AxiosResponse;
11
16
  constructor(message: string, response: AxiosResponse);
12
17
  }
13
- export declare function makeGraphQlCall(query: string | FormData): Promise<any>;
14
- export declare function gqlSaveLibrary(id: string, label: string, additionalAttributes?: string[]): Promise<any>;
18
+ export interface IMakeGraphQlCallOptions {
19
+ user?: IE2EUser;
20
+ }
21
+ export declare function makeGraphQlCall(query: string | FormData, options?: IMakeGraphQlCallOptions): Promise<any>;
22
+ export declare function gqlSaveLibrary(id: string, label: string, additionalAttributes?: string[], settings?: string): Promise<any>;
15
23
  export declare function gqlSaveApplication(id: string, label: string, endpoint: string): Promise<any>;
16
24
  export declare function gqlSaveAttribute(params: {
17
25
  id: string;
@@ -48,10 +56,13 @@ export declare function gqlSaveVersionProfile(profileId: string, label: string,
48
56
  * Convert object to JSON, escaping quotes to be able to use it in a graphql query
49
57
  **/
50
58
  export declare function toCleanJSON(obj: {}): string;
51
- export declare function makeWebSocketGraphQlCall(): Promise<GraphqlWsClient>;
59
+ export declare function makeWebSocketGraphQlCall(options?: {
60
+ user: IE2EUser;
61
+ }): Promise<GraphqlWsClient>;
52
62
  export declare function waitGraphqlWebSocketMessage<T>(client: GraphqlWsClient, query: string, variables: Record<string, any>, acceptMessage: (msg: T) => boolean, { timeoutMs }: {
53
63
  timeoutMs: any;
54
64
  }): Promise<T>;
55
65
  export declare function waitWebSocketMessage<T>(webSocket: WebSocket, acceptMessage: (msg: T) => boolean, { timeoutMs }: {
56
66
  timeoutMs: any;
57
67
  }): Promise<T>;
68
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { type ILibraryRepo } from 'infra/library/libraryRepo';
2
2
  import { type IRecordRepo } from 'infra/record/recordRepo';
3
3
  import { type ITreeRepo } from 'infra/tree/treeRepo';
4
- export declare const getCoreDep: <T>(path: any) => T;
5
4
  export declare const getLibraryRepo: () => ILibraryRepo;
6
5
  export declare const getRecordRepo: () => IRecordRepo;
7
6
  export declare const getTreeRepo: () => ITreeRepo;
7
+ export * from '../integrationTestUtils';
@@ -0,0 +1,7 @@
1
+ import { type AwilixContainer } from 'awilix';
2
+ export interface IGlobalThis {
3
+ coreContainer: AwilixContainer;
4
+ taskManagerMasterTimer: NodeJS.Timeout;
5
+ }
6
+ export declare const getCoreContainer: () => AwilixContainer;
7
+ export declare const getCoreDep: <T>(path: any) => T;
@@ -25,6 +25,7 @@ export interface IConfig {
25
25
  plugins: IKeyValue<IKeyValue<any>>;
26
26
  preview: IPreview;
27
27
  applications: IApplicationsConfig;
28
+ actions: IActions;
28
29
  files: IFilesConfig;
29
30
  dbProfiler: IDbProfilerConfig;
30
31
  instanceId: string;
@@ -62,6 +63,19 @@ export interface IServer {
62
63
  email: string;
63
64
  };
64
65
  }
66
+ export interface IActions {
67
+ excel: {
68
+ /**
69
+ * Replace deprecated hot-formula-parser npm module by new hyperformula npm module
70
+ * Formulas should be compatible
71
+ */
72
+ useNewHyperformula: boolean;
73
+ /**
74
+ * Add debug log for each calculation with formula and result or error
75
+ */
76
+ debug: boolean;
77
+ };
78
+ }
65
79
  export interface IDb {
66
80
  url: string;
67
81
  name: string;
@@ -17,7 +17,6 @@ export declare enum Errors {
17
17
  ENCRYPT_ERROR = "ENCRYPT_ERROR",
18
18
  ERROR = "ERROR",
19
19
  EXCEL_CALCULATION_ERROR = "EXCEL_CALCULATION_ERROR",
20
- FILE_ERROR = "FILE_ERROR",
21
20
  FILE_NOT_FOUND = "FILE_NOT_FOUND",
22
21
  FORBIDDEN_FILES = "FORBIDDEN_FILES",
23
22
  FORBIDDEN_ID = "FORBIDDEN_ID",
@@ -8,7 +8,7 @@ import { type ITasksManagerDomain } from '../../domain/tasksManager/tasksManager
8
8
  import { TaskStatus } from '../../_types/tasksManager';
9
9
  import { type IGraphqlAppModule } from 'app/graphql/graphqlApp';
10
10
  export interface ITasksManagerApp extends IGraphqlAppModule {
11
- initMaster(): Promise<NodeJS.Timer>;
11
+ initMaster(): Promise<NodeJS.Timeout>;
12
12
  initWorker(): Promise<void>;
13
13
  }
14
14
  interface IDeps {
@@ -1,11 +1,13 @@
1
+ import { type ILogger } from '@leav/logger';
1
2
  import { type ICalculationVariable } from 'domain/helpers/calculationVariable';
2
- import { type IUtils } from 'utils/utils';
3
3
  import { type IActionsListFunction } from '../../_types/actionsList';
4
+ import { type IConfig } from '_types/config';
4
5
  interface IDeps {
5
- 'core.domain.helpers.calculationVariable'?: ICalculationVariable;
6
- 'core.utils'?: IUtils;
6
+ 'core.domain.helpers.calculationVariable': ICalculationVariable;
7
+ config: IConfig;
8
+ 'core.utils.logger': ILogger;
7
9
  }
8
- export default function ({ 'core.domain.helpers.calculationVariable': calculationVariable }?: IDeps): IActionsListFunction<{
10
+ export default function ({ 'core.domain.helpers.calculationVariable': calculationVariable, 'core.utils.logger': logger, config }: IDeps): IActionsListFunction<{
9
11
  Formula: true;
10
12
  Description: true;
11
13
  }>;
@@ -38,7 +38,7 @@ interface IGetTasksParams extends IGetCoreEntitiesParams {
38
38
  };
39
39
  }
40
40
  export interface ITasksManagerDomain {
41
- initMaster(): Promise<NodeJS.Timer>;
41
+ initMaster(): Promise<NodeJS.Timeout>;
42
42
  initWorker(): Promise<void>;
43
43
  getTasks({ params, ctx }: {
44
44
  params: IGetTasksParams;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.4.1-248b9e2b",
3
+ "version": "1.4.1-31443cb4",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",