@aristid/leav-types 1.4.1-148fd69b → 1.4.1-1d576f18

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.
@@ -18,6 +18,7 @@ export declare namespace server {
18
18
  let email_1: string;
19
19
  export { email_1 as email };
20
20
  }
21
+ let enableTracer: boolean;
21
22
  }
22
23
  export declare namespace db {
23
24
  let url: string;
@@ -1,7 +1,7 @@
1
1
  import WebSocket from 'ws';
2
2
  import { type Client as GraphqlWsClient } from 'graphql-ws';
3
3
  import { type AxiosResponse } from 'axios';
4
- import type FormData from 'form-data';
4
+ import 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';
@@ -19,6 +19,7 @@ export interface IMakeGraphQlCallOptions {
19
19
  user?: IE2EUser;
20
20
  }
21
21
  export declare function makeGraphQlCall(query: string | FormData, options?: IMakeGraphQlCallOptions): Promise<any>;
22
+ export declare function importFileGraphQlCall(query: string, filePath: string, sheets?: any): Promise<any>;
22
23
  export declare function gqlSaveLibrary(id: string, label: string, additionalAttributes?: string[], settings?: string): Promise<any>;
23
24
  export declare function gqlSaveApplication(id: string, label: string, endpoint: string): Promise<any>;
24
25
  export declare function gqlSaveAttribute(params: {
@@ -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[];
@@ -62,6 +62,7 @@ export interface IServer {
62
62
  systemUser: {
63
63
  email: string;
64
64
  };
65
+ enableTracer: boolean;
65
66
  }
66
67
  export interface IActions {
67
68
  excel: {
@@ -1,4 +1,5 @@
1
1
  import { type INotificationContent } from './notification';
2
+ import { type ITask } from './tasksManager';
2
3
  export declare enum TriggerNames {
3
4
  APPLICATION_EVENT = "APPLICATION_EVENT",
4
5
  UPLOAD_FILE = "UPLOAD_FILE",
@@ -14,3 +15,6 @@ export interface IPubSubNotificationData {
14
15
  };
15
16
  recipientUserIds: string[];
16
17
  }
18
+ export interface IPubSubTaskData {
19
+ task: ITask;
20
+ }
@@ -33,4 +33,5 @@ export interface IRecordsQueryVariables {
33
33
  pagination?: IRecordsQueryPagination;
34
34
  retrieveInactive?: boolean;
35
35
  searchQuery?: string;
36
+ ignoreAccessRecordByDefaultPermission?: boolean;
36
37
  }
@@ -13,6 +13,7 @@ export interface IFindRecordParams {
13
13
  retrieveInactive?: boolean;
14
14
  fulltextSearch?: string;
15
15
  ignorePermissions?: boolean;
16
+ ignoreAccessRecordByDefaultPermission?: boolean;
16
17
  }
17
18
  export interface ICreateRecordParams {
18
19
  library: string;
@@ -20,6 +20,12 @@ export interface IGetAccessPermissionsValue {
20
20
  attribute: IAttribute;
21
21
  permissions: INodeIdsByPermissions;
22
22
  }
23
- export type IGetAccessPermissions = (groupsIds: string[][], library: string, existingFiltersOnTreeIds: string[], deps: IAccessPermissionFilterDeps, ctx: IQueryInfos) => Promise<IGetAccessPermissionsValue[]>;
23
+ export type IGetAccessPermissions = (params: {
24
+ groupsIds: string[][];
25
+ library: string;
26
+ existingFiltersOnTreeIds: string[];
27
+ deps: IAccessPermissionFilterDeps;
28
+ ignoreAccessRecordByDefaultPermission?: boolean;
29
+ }, ctx: IQueryInfos) => Promise<IGetAccessPermissionsValue[]>;
24
30
  declare const getAccessPermissionsFilters: IGetAccessPermissions;
25
31
  export default getAccessPermissionsFilters;
@@ -0,0 +1,38 @@
1
+ import { type ILibraryRepo } from 'infra/library/libraryRepo';
2
+ import { type IDbService } from '../dbService';
3
+ import { type IQueryInfos } from '_types/queryInfos';
4
+ import { type IAttributeForRepo, type IAttributeRepo } from 'infra/attribute/attributeRepo';
5
+ import { type ITree } from '_types/tree';
6
+ import { type Override } from '@leav/utils';
7
+ import { type ILibraryDbEvent } from '_types/library';
8
+ export type MigrationLibraryToCreate = Override<ILibraryDbEvent, {
9
+ attributes: string[];
10
+ fullTextAttributes: string[];
11
+ }> & {
12
+ _key: string;
13
+ };
14
+ export declare const commonAttributeData: {
15
+ system: boolean;
16
+ required: boolean;
17
+ multiple_values: boolean;
18
+ versions_conf: {
19
+ versionable: boolean;
20
+ };
21
+ readonly: boolean;
22
+ actions_list: {
23
+ getValue: any[];
24
+ saveValue: {
25
+ id: string;
26
+ name: string;
27
+ is_system: boolean;
28
+ }[];
29
+ deleteValue: any[];
30
+ };
31
+ };
32
+ export declare const createLibraries: (libraries: MigrationLibraryToCreate[], dbService: IDbService, libraryRepo: ILibraryRepo, ctx: IQueryInfos) => Promise<void>;
33
+ export declare const createAttributes: (attributes: IAttributeForRepo[], attributeRepo: IAttributeRepo, ctx: IQueryInfos) => Promise<void>;
34
+ export declare const linkLibraryAttributes: (attributeRepo: IAttributeRepo, libraryRepo: ILibraryRepo, libraryId: string, attributes: IAttributeForRepo[], ctx: IQueryInfos) => Promise<void>;
35
+ export type MigrationTreeToCreate = ITree & {
36
+ _key: string;
37
+ };
38
+ export declare const createTrees: (trees: MigrationTreeToCreate[], dbService: IDbService, ctx: IQueryInfos) => Promise<void>;
@@ -1,9 +1,2 @@
1
- import { type Override } from '@leav/utils';
2
- import { type ILibrary } from '../../../../_types/library';
3
- export type MigrationLibraryToCreate = Override<ILibrary, {
4
- attributes: string[];
5
- fullTextAttributes: string[];
6
- }> & {
7
- _key: string;
8
- };
1
+ import { type MigrationLibraryToCreate } from 'infra/db/helpers/libraryUtils';
9
2
  export declare const systemLibraries: MigrationLibraryToCreate[];
@@ -0,0 +1,4 @@
1
+ import { type MigrationLibraryToCreate } from 'infra/db/helpers/libraryUtils';
2
+ import { type IAttributeForRepo } from 'infra/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 'infra/db/helpers/libraryUtils';
2
+ import { type IAttributeForRepo } from 'infra/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 'infra/db/helpers/libraryUtils';
2
+ import { type IAttributeForRepo } from 'infra/attribute/attributeRepo';
3
+ export declare const threadsAttributes: IAttributeForRepo[];
4
+ export declare const threadLibrary: MigrationLibraryToCreate;
@@ -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;
@@ -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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.4.1-148fd69b",
3
+ "version": "1.4.1-1d576f18",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",