@aristid/leav-types 1.4.1-6abd3445 → 1.4.1-77512f1e

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.
@@ -169,8 +169,7 @@ export declare namespace eventsManager {
169
169
  }
170
170
  export { routingKeys_2 as routingKeys };
171
171
  export namespace queues_2 {
172
- let pubsub_events_1: string;
173
- export { pubsub_events_1 as pubsub_events };
172
+ let pubsub_events_prefix: string;
174
173
  }
175
174
  export { queues_2 as queues };
176
175
  }
@@ -26,24 +26,29 @@ export namespace filesManager {
26
26
  }
27
27
  }
28
28
  export namespace eventsManager {
29
- namespace routingKeys {
29
+ export namespace routingKeys {
30
30
  let data_events: string;
31
+ let pubsub_events: string;
31
32
  }
33
+ export namespace queues_1 {
34
+ let pubsub_events_prefix: string;
35
+ }
36
+ export { queues_1 as queues };
32
37
  }
33
38
  export namespace indexationManager {
34
- export namespace queues_1 {
39
+ export namespace queues_2 {
35
40
  let events_1: string;
36
41
  export { events_1 as events };
37
42
  }
38
- export { queues_1 as queues };
43
+ export { queues_2 as queues };
39
44
  }
40
45
  export namespace tasksManager {
41
46
  export let checkingInterval: number;
42
- export namespace queues_2 {
47
+ export namespace queues_3 {
43
48
  let execOrders: string;
44
49
  let cancelOrders: string;
45
50
  }
46
- export { queues_2 as queues };
51
+ export { queues_3 as queues };
47
52
  export namespace routingKeys_1 {
48
53
  let execOrders_1: string;
49
54
  export { execOrders_1 as execOrders };
@@ -1,4 +1,5 @@
1
- import type WebSocket from 'ws';
1
+ import WebSocket from 'ws';
2
+ import { type Client as GraphqlWsClient } from 'graphql-ws';
2
3
  import type FormData from 'form-data';
3
4
  import { type ActionsListConfig } from '_types/actionsList';
4
5
  import { type ITreeElement } from '_types/tree';
@@ -42,6 +43,10 @@ export declare function gqlSaveVersionProfile(profileId: string, label: string,
42
43
  * Convert object to JSON, escaping quotes to be able to use it in a graphql query
43
44
  **/
44
45
  export declare function toCleanJSON(obj: {}): string;
46
+ export declare function makeWebSocketGraphQlCall(): Promise<GraphqlWsClient>;
47
+ export declare function waitGraphqlWebSocketMessage<T>(client: GraphqlWsClient, query: string, variables: Record<string, any>, acceptMessage: (msg: T) => boolean, { timeoutMs }: {
48
+ timeoutMs: any;
49
+ }): Promise<T>;
45
50
  export declare function waitWebSocketMessage<T>(webSocket: WebSocket, acceptMessage: (msg: T) => boolean, { timeoutMs }: {
46
51
  timeoutMs: any;
47
52
  }): Promise<T>;
@@ -158,7 +158,7 @@ export interface IEventsManager {
158
158
  pubsub_events: string;
159
159
  };
160
160
  queues: {
161
- pubsub_events: string;
161
+ pubsub_events_prefix: string;
162
162
  };
163
163
  }
164
164
  export interface IIndexationManager {
@@ -1,8 +1,16 @@
1
+ import { type INotificationContent } from './notification';
1
2
  export declare enum TriggerNames {
2
3
  APPLICATION_EVENT = "APPLICATION_EVENT",
3
4
  UPLOAD_FILE = "UPLOAD_FILE",
4
5
  INDEXATION = "INDEXATION",
5
6
  TASK = "TASK",
6
7
  TREE_EVENT = "TREE_EVENT",
7
- RECORD_UPDATE = "RECORD_UPDATE"
8
+ RECORD_UPDATE = "RECORD_UPDATE",
9
+ NOTIFICATION = "NOTIFICATION"
10
+ }
11
+ export interface IPubSubNotificationData {
12
+ notification: INotificationContent & {
13
+ date: number;
14
+ };
15
+ recipientUserIds: string[];
8
16
  }
@@ -17,6 +17,7 @@ export { default as permission } from './permissionApp/permissionApp';
17
17
  export { default as plugins } from './pluginsApp';
18
18
  export { default as record } from './recordApp/recordApp';
19
19
  export { default as tasksManager } from './tasksManagerApp';
20
+ export { default as notification } from './notificationApp';
20
21
  export { default as tree } from './treeApp/treeApp';
21
22
  export { default as userData } from './userDataApp';
22
23
  export { default as value } from './valueApp';
@@ -0,0 +1,10 @@
1
+ import { type IGraphqlAppModule } from 'app/graphql/graphqlApp';
2
+ import { type IEventsManagerDomain } from 'domain/eventsManager/eventsManagerDomain';
3
+ import { type IUtils } from 'utils/utils';
4
+ export type INotificationApp = IGraphqlAppModule;
5
+ interface IDeps {
6
+ 'core.utils'?: IUtils;
7
+ 'core.domain.eventsManager'?: IEventsManagerDomain;
8
+ }
9
+ export default function ({ 'core.domain.eventsManager': eventsManager }: IDeps): INotificationApp;
10
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.4.1-6abd3445",
3
+ "version": "1.4.1-77512f1e",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",