@hahnpro/flow-sdk 4.16.0 → 4.19.1
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/dist/FlowApplication.d.ts +2 -2
- package/dist/FlowApplication.js +2 -2
- package/dist/FlowElement.d.ts +2 -1
- package/dist/FlowElement.js +14 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +12 -16
- package/dist/api/Queue.d.ts +0 -15
- package/dist/api/Queue.js +0 -27
- package/dist/api/api.d.ts +0 -62
- package/dist/api/api.js +0 -52
- package/dist/api/asset.interface.d.ts +0 -54
- package/dist/api/asset.interface.js +0 -2
- package/dist/api/asset.service.d.ts +0 -10
- package/dist/api/asset.service.js +0 -21
- package/dist/api/assettypes.service.d.ts +0 -6
- package/dist/api/assettypes.service.js +0 -10
- package/dist/api/content.interface.d.ts +0 -35
- package/dist/api/content.interface.js +0 -12
- package/dist/api/content.service.d.ts +0 -17
- package/dist/api/content.service.js +0 -39
- package/dist/api/data.interface.d.ts +0 -29
- package/dist/api/data.interface.js +0 -2
- package/dist/api/data.service.d.ts +0 -15
- package/dist/api/data.service.js +0 -49
- package/dist/api/endpoint.interface.d.ts +0 -22
- package/dist/api/endpoint.interface.js +0 -2
- package/dist/api/endpoint.service.d.ts +0 -8
- package/dist/api/endpoint.service.js +0 -17
- package/dist/api/events.interface.d.ts +0 -16
- package/dist/api/events.interface.js +0 -2
- package/dist/api/events.service.d.ts +0 -7
- package/dist/api/events.service.js +0 -13
- package/dist/api/http.service.d.ts +0 -26
- package/dist/api/http.service.js +0 -74
- package/dist/api/index.d.ts +0 -12
- package/dist/api/index.js +0 -16
- package/dist/api/mock/api.mock.d.ts +0 -158
- package/dist/api/mock/api.mock.js +0 -111
- package/dist/api/mock/asset.mock.service.d.ts +0 -12
- package/dist/api/mock/asset.mock.service.js +0 -21
- package/dist/api/mock/assetTypes.mock.service.d.ts +0 -6
- package/dist/api/mock/assetTypes.mock.service.js +0 -11
- package/dist/api/mock/content.mock.service.d.ts +0 -18
- package/dist/api/mock/content.mock.service.js +0 -64
- package/dist/api/mock/data.mock.service.d.ts +0 -13
- package/dist/api/mock/data.mock.service.js +0 -52
- package/dist/api/mock/endpoint.mock.service.d.ts +0 -15
- package/dist/api/mock/endpoint.mock.service.js +0 -24
- package/dist/api/mock/events.mock.service.d.ts +0 -7
- package/dist/api/mock/events.mock.service.js +0 -14
- package/dist/api/mock/index.d.ts +0 -9
- package/dist/api/mock/index.js +0 -12
- package/dist/api/mock/secret.mock.service.d.ts +0 -6
- package/dist/api/mock/secret.mock.service.js +0 -11
- package/dist/api/mock/task.mock.service.d.ts +0 -7
- package/dist/api/mock/task.mock.service.js +0 -15
- package/dist/api/mock/timeseries.mock.service.d.ts +0 -19
- package/dist/api/mock/timeseries.mock.service.js +0 -69
- package/dist/api/mock/user.mock.service.d.ts +0 -7
- package/dist/api/mock/user.mock.service.js +0 -14
- package/dist/api/proxy.service.d.ts +0 -11
- package/dist/api/proxy.service.js +0 -17
- package/dist/api/secret.interface.d.ts +0 -7
- package/dist/api/secret.interface.js +0 -2
- package/dist/api/secret.service.d.ts +0 -6
- package/dist/api/secret.service.js +0 -10
- package/dist/api/sidriveiq.interface.d.ts +0 -104
- package/dist/api/sidriveiq.interface.js +0 -2
- package/dist/api/sidriveiq.service.d.ts +0 -97
- package/dist/api/sidriveiq.service.js +0 -97
- package/dist/api/task.interface.d.ts +0 -22
- package/dist/api/task.interface.js +0 -2
- package/dist/api/task.service.d.ts +0 -7
- package/dist/api/task.service.js +0 -13
- package/dist/api/timeseries.interface.d.ts +0 -39
- package/dist/api/timeseries.interface.js +0 -2
- package/dist/api/timeseries.service.d.ts +0 -17
- package/dist/api/timeseries.service.js +0 -38
- package/dist/api/user.service.d.ts +0 -6
- package/dist/api/user.service.js +0 -21
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface Task {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
desc?: string;
|
|
5
|
-
tags?: string[];
|
|
6
|
-
author?: string;
|
|
7
|
-
readPermissions: string[];
|
|
8
|
-
readWritePermissions: string[];
|
|
9
|
-
assetRef?: string;
|
|
10
|
-
eventRef?: string;
|
|
11
|
-
expiryDate?: Date;
|
|
12
|
-
parent?: string;
|
|
13
|
-
subTasks?: string[];
|
|
14
|
-
assignedTo: string[];
|
|
15
|
-
status?: string;
|
|
16
|
-
acceptedBy?: string;
|
|
17
|
-
rejectReason?: string;
|
|
18
|
-
statusHistoryLog?: string[];
|
|
19
|
-
weight?: number;
|
|
20
|
-
createdAt?: string;
|
|
21
|
-
updatedAt?: string;
|
|
22
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DataService } from './data.service';
|
|
2
|
-
import { HttpClient } from './http.service';
|
|
3
|
-
import { Task } from './task.interface';
|
|
4
|
-
export declare class TaskService extends DataService<Task> {
|
|
5
|
-
constructor(httpClient: HttpClient);
|
|
6
|
-
createTaskAttachedToAsset(dto: any): Promise<Task>;
|
|
7
|
-
}
|
package/dist/api/task.service.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TaskService = void 0;
|
|
4
|
-
const data_service_1 = require("./data.service");
|
|
5
|
-
class TaskService extends data_service_1.DataService {
|
|
6
|
-
constructor(httpClient) {
|
|
7
|
-
super(httpClient, process.env.DEBUG_TSK_URL || 'api/tasks');
|
|
8
|
-
}
|
|
9
|
-
createTaskAttachedToAsset(dto) {
|
|
10
|
-
return this.httpClient.post(this.basePath, dto);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.TaskService = TaskService;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export interface TimeSeries {
|
|
2
|
-
id?: string;
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
readPermissions: string[];
|
|
6
|
-
readWritePermissions: string[];
|
|
7
|
-
assetRef?: string;
|
|
8
|
-
assetRef$name?: string;
|
|
9
|
-
assetTsId?: string;
|
|
10
|
-
minDate: Date;
|
|
11
|
-
metrics?: string[];
|
|
12
|
-
maxBucketTimeRange: number;
|
|
13
|
-
tsRef?: [string];
|
|
14
|
-
autoDelData: Date;
|
|
15
|
-
autoDelBucket: Date;
|
|
16
|
-
}
|
|
17
|
-
export interface TimeSeriesCondition {
|
|
18
|
-
operator: string;
|
|
19
|
-
values: number[];
|
|
20
|
-
}
|
|
21
|
-
export interface TimeSeriesValue {
|
|
22
|
-
timestamp: number;
|
|
23
|
-
value: number | string | any;
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
}
|
|
26
|
-
export interface TimeSeriesBucket {
|
|
27
|
-
id?: string;
|
|
28
|
-
ts: TimeSeries;
|
|
29
|
-
prev: TimeSeriesBucket;
|
|
30
|
-
next: TimeSeriesBucket;
|
|
31
|
-
prevHash: string;
|
|
32
|
-
from: Date;
|
|
33
|
-
to: Date;
|
|
34
|
-
bucketSize: number;
|
|
35
|
-
data: TimeSeriesValue[];
|
|
36
|
-
meta: any;
|
|
37
|
-
final: boolean;
|
|
38
|
-
}
|
|
39
|
-
export declare type TS_GROUPS = 'none' | '10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '3h' | '6h' | '12h' | '1d' | '7d';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Paginated } from './data.interface';
|
|
2
|
-
import { DataService } from './data.service';
|
|
3
|
-
import { HttpClient } from './http.service';
|
|
4
|
-
import { TS_GROUPS, TimeSeries, TimeSeriesValue } from './timeseries.interface';
|
|
5
|
-
export declare class TimeSeriesService extends DataService<TimeSeries> {
|
|
6
|
-
constructor(httpClient: HttpClient);
|
|
7
|
-
addValue(id: string, value: {
|
|
8
|
-
[values: string]: any;
|
|
9
|
-
}): Promise<void>;
|
|
10
|
-
addAssetTimeSeriesValues(assetId: string, name: string, readPermissions: string[], readWritePermissions: string[], values: {
|
|
11
|
-
[timestamp: string]: any;
|
|
12
|
-
}): Promise<TimeSeries>;
|
|
13
|
-
getMostRecentValue(id: string, before: Date): Promise<TimeSeriesValue>;
|
|
14
|
-
getValues(id: string, from: number, limit?: number, group?: TS_GROUPS): Promise<TimeSeriesValue[]>;
|
|
15
|
-
getValuesOfPeriod(id: string, from: number, to: number, group?: TS_GROUPS): Promise<TimeSeriesValue[]>;
|
|
16
|
-
getManyByAsset(assetId: string, names?: string[]): Promise<Paginated<TimeSeries[]>>;
|
|
17
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimeSeriesService = void 0;
|
|
4
|
-
const data_service_1 = require("./data.service");
|
|
5
|
-
class TimeSeriesService extends data_service_1.DataService {
|
|
6
|
-
constructor(httpClient) {
|
|
7
|
-
super(httpClient, process.env.DEBUG_TSM_URL || 'api/tsm');
|
|
8
|
-
}
|
|
9
|
-
addValue(id, value) {
|
|
10
|
-
return this.httpClient.post(`${this.basePath}/${id}`, value);
|
|
11
|
-
}
|
|
12
|
-
addAssetTimeSeriesValues(assetId, name, readPermissions, readWritePermissions, values) {
|
|
13
|
-
const dto = {
|
|
14
|
-
name,
|
|
15
|
-
readPermissions,
|
|
16
|
-
readWritePermissions,
|
|
17
|
-
values,
|
|
18
|
-
};
|
|
19
|
-
return this.httpClient.post(`${this.basePath}/assets/${assetId}`, dto);
|
|
20
|
-
}
|
|
21
|
-
getMostRecentValue(id, before) {
|
|
22
|
-
const params = before ? { before: before.toISOString() } : {};
|
|
23
|
-
return this.httpClient.get(`${this.basePath}/${id}/recent`, { params });
|
|
24
|
-
}
|
|
25
|
-
getValues(id, from, limit, group) {
|
|
26
|
-
const params = { limit, group };
|
|
27
|
-
return this.httpClient.get(`${this.basePath}/${id}/${from}`, { params });
|
|
28
|
-
}
|
|
29
|
-
getValuesOfPeriod(id, from, to, group) {
|
|
30
|
-
const params = { group };
|
|
31
|
-
return this.httpClient.get(`${this.basePath}/${id}/${from}/${to}`, { params });
|
|
32
|
-
}
|
|
33
|
-
getManyByAsset(assetId, names) {
|
|
34
|
-
const params = Array.isArray(names) ? { names: names.join() } : {};
|
|
35
|
-
return this.httpClient.get(`${this.basePath}/asset/${assetId}`, { params });
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.TimeSeriesService = TimeSeriesService;
|
package/dist/api/user.service.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserService = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jwt_decode_1 = (0, tslib_1.__importDefault)(require("jwt-decode"));
|
|
6
|
-
class UserService {
|
|
7
|
-
constructor(httpClient) {
|
|
8
|
-
this.httpClient = httpClient;
|
|
9
|
-
}
|
|
10
|
-
async getCurrentUserRoles() {
|
|
11
|
-
try {
|
|
12
|
-
const token = await this.httpClient.getAccessToken();
|
|
13
|
-
const decode = (0, jwt_decode_1.default)(token);
|
|
14
|
-
return decode.realm_access.roles;
|
|
15
|
-
}
|
|
16
|
-
catch (err) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.UserService = UserService;
|