@hahnpro/flow-sdk 4.16.0 → 4.17.0

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.
@@ -9,6 +9,9 @@ export interface Endpoint {
9
9
  authToken: string;
10
10
  recipients?: string[];
11
11
  };
12
+ notificationCheck: number;
13
+ notificationCount: number;
14
+ notificationPause: number;
12
15
  readPermissions: string[];
13
16
  readWritePermissions: string[];
14
17
  }
@@ -3,6 +3,6 @@ import { DataService } from './data.service';
3
3
  import { Endpoint, EndpointLog } from './endpoint.interface';
4
4
  export declare class EndpointService extends DataService<Endpoint> {
5
5
  constructor(httpClient: HttpClient);
6
- sendNotification(endpointId: string, subject: string, message: string, group: string, eventLink?: string): Promise<void>;
6
+ sendNotification(endpointId: string, subject: string, message: string, group: string, eventLink?: string, assetLink?: string): Promise<void>;
7
7
  readLastLogByGroup(endpointId: string, group: string): Promise<EndpointLog>;
8
8
  }
@@ -6,8 +6,8 @@ class EndpointService extends data_service_1.DataService {
6
6
  constructor(httpClient) {
7
7
  super(httpClient, process.env.DEBUG_ENDPOINT_URL || 'api/notification/endpoints');
8
8
  }
9
- sendNotification(endpointId, subject, message, group, eventLink) {
10
- const body = Object.assign({ subject, message, group }, (eventLink && { eventLink }));
9
+ sendNotification(endpointId, subject, message, group, eventLink, assetLink) {
10
+ const body = Object.assign(Object.assign({ subject, message, group }, (eventLink && { eventLink })), (assetLink && { assetLink }));
11
11
  return this.httpClient.post(`${this.basePath}/${endpointId}`, body);
12
12
  }
13
13
  readLastLogByGroup(endpointId, group) {
@@ -101,6 +101,9 @@ export interface EndpointInit {
101
101
  authToken: string;
102
102
  recipients?: string[];
103
103
  };
104
+ notificationCheck?: number;
105
+ notificationCount?: number;
106
+ notificationPause?: number;
104
107
  readPermissions?: string[];
105
108
  readWritePermissions?: string[];
106
109
  }
@@ -58,6 +58,9 @@ class MockAPI {
58
58
  description: value.description,
59
59
  status: value.status,
60
60
  config: value.config,
61
+ notificationCheck: value.notificationCheck,
62
+ notificationCount: value.notificationCount,
63
+ notificationPause: value.notificationPause,
61
64
  readPermissions: [],
62
65
  readWritePermissions: [],
63
66
  }));
@@ -3,7 +3,7 @@ import { EndpointService } from '../endpoint.service';
3
3
  import { DataMockService } from './data.mock.service';
4
4
  export declare class EndpointMockService extends DataMockService<Endpoint> implements EndpointService {
5
5
  constructor(endpoints: Endpoint[]);
6
- sendNotification(endpointId: string, subject: string, message: string, group: string, eventLink?: string): Promise<void>;
6
+ sendNotification(endpointId: string, subject: string, message: string, group: string, eventLink?: string, assetLink?: string): Promise<void>;
7
7
  readLastLogByGroup(endpointId: string, group: string): Promise<{
8
8
  id: string;
9
9
  endpoint: string;
@@ -7,7 +7,7 @@ class EndpointMockService extends data_mock_service_1.DataMockService {
7
7
  super();
8
8
  this.data = endpoints;
9
9
  }
10
- sendNotification(endpointId, subject, message, group, eventLink) {
10
+ sendNotification(endpointId, subject, message, group, eventLink, assetLink) {
11
11
  return Promise.resolve();
12
12
  }
13
13
  readLastLogByGroup(endpointId, group) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/flow-sdk",
3
- "version": "4.16.0",
3
+ "version": "4.17.0",
4
4
  "description": "SDK for building Flow Modules",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -38,17 +38,17 @@
38
38
  "p-queue": "^6.6.2",
39
39
  "python-shell": "^3.0.0",
40
40
  "reflect-metadata": "^0.1.13",
41
- "rxjs": "^7.3.1",
41
+ "rxjs": "^7.4.0",
42
42
  "string-interp": "^0.3.6",
43
43
  "uuid": "^8.3.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@golevelup/nestjs-rabbitmq": "^1.17.1",
46
+ "@golevelup/nestjs-rabbitmq": "^1.18.0",
47
47
  "@types/amqp-connection-manager": "^2.0.12",
48
48
  "@types/amqplib": "^0.8.2",
49
49
  "@types/jest": "^27.0.2",
50
50
  "@types/lodash": "^4.14.175",
51
- "@types/node": "^14.17.20",
51
+ "@types/node": "^14.17.21",
52
52
  "axios-mock-adapter": "^1.20.0",
53
53
  "jest": "^27.2.4",
54
54
  "typescript": "^4.4.3"