@data-fair/lib-node 2.8.1 → 2.8.2

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/events-queue.d.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  import { type Event } from '@data-fair/lib-common-types/event/index.js';
2
2
  import { type Notification } from '@data-fair/lib-common-types/notification/index.js';
3
3
  import { SessionState } from '@data-fair/lib-common-types/session/index.js';
4
- type EventsQueueOptions = {
4
+ export type EventsQueueOptions = {
5
5
  eventsUrl: string;
6
6
  eventsSecret: string;
7
7
  inactive?: boolean;
8
8
  };
9
+ export type PushEvent = Omit<Event, 'date'>;
10
+ export type PushNotification = Omit<Notification, 'date'>;
9
11
  export declare class EventsQueue {
10
12
  _options: EventsQueueOptions | undefined;
11
13
  eventsQueue: Event[];
@@ -17,8 +19,8 @@ export declare class EventsQueue {
17
19
  stop: () => Promise<void>;
18
20
  loop(): Promise<void>;
19
21
  drain(): Promise<void>;
20
- pushEvent(event: Omit<Event, 'date'>, sessionState?: SessionState): void;
21
- pushNotification(notification: Omit<Notification, 'date'>): void;
22
+ pushEvent(event: PushEvent, sessionState?: SessionState): void;
23
+ pushNotification(notification: PushNotification): void;
22
24
  }
23
25
  declare const eventsQueue: EventsQueue;
24
26
  export default eventsQueue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-node",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Small nodejs related utility functions for the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [