@hahnpro/hpc-api 3.6.1 → 3.6.3
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/asset.interface.d.ts +3 -3
- package/dist/flow-function.interface.d.ts +2 -2
- package/dist/flow.interface.d.ts +1 -1
- package/dist/mock/api.mock.d.ts +22 -22
- package/dist/mock/flow-modules.mock.service.d.ts +1 -1
- package/dist/schema.interface.d.ts +3 -3
- package/dist/sidriveiq.interface.d.ts +2 -2
- package/dist/storage.interface.d.ts +2 -2
- package/dist/timeseries.interface.d.ts +1 -1
- package/package.json +6 -6
|
@@ -17,7 +17,7 @@ export interface AssetType {
|
|
|
17
17
|
revision?: number;
|
|
18
18
|
deletedAt?: string;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type AssetTypeRevision = AssetType & {
|
|
21
21
|
originalId: string;
|
|
22
22
|
};
|
|
23
23
|
export interface Asset {
|
|
@@ -41,7 +41,7 @@ export interface Asset {
|
|
|
41
41
|
revision?: number;
|
|
42
42
|
deletedAt?: string;
|
|
43
43
|
}
|
|
44
|
-
export
|
|
44
|
+
export type AssetRevision = Asset & {
|
|
45
45
|
originalId: string;
|
|
46
46
|
};
|
|
47
47
|
export interface Attachment {
|
|
@@ -67,6 +67,6 @@ export interface Action {
|
|
|
67
67
|
author?: string;
|
|
68
68
|
revision?: number;
|
|
69
69
|
}
|
|
70
|
-
export
|
|
70
|
+
export type ActionRevision = Action & {
|
|
71
71
|
originalId: string;
|
|
72
72
|
};
|
|
@@ -17,7 +17,7 @@ export interface FlowFunctionDto {
|
|
|
17
17
|
updatedAt?: string;
|
|
18
18
|
revision?: string;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type FlowFunctionRevision = FlowFunctionDto & {
|
|
21
21
|
id: string;
|
|
22
22
|
originalId: string;
|
|
23
23
|
};
|
|
@@ -34,7 +34,7 @@ interface Schema {
|
|
|
34
34
|
layout?: any[];
|
|
35
35
|
data?: any;
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
type SchemaPropertyType = 'array' | 'boolean' | 'number' | 'string';
|
|
38
38
|
interface SchemaProperty {
|
|
39
39
|
type: SchemaPropertyType;
|
|
40
40
|
title?: string;
|
package/dist/flow.interface.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface FlowDto extends Resource {
|
|
|
7
7
|
dashboard?: DashboardItem[];
|
|
8
8
|
propertiesSchema?: JsonSchemaForm;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type FlowRevision = FlowDto & {
|
|
11
11
|
originalId: string;
|
|
12
12
|
};
|
|
13
13
|
export interface DashboardItem {
|
package/dist/mock/api.mock.d.ts
CHANGED
|
@@ -76,39 +76,39 @@ export declare class MockAPI implements API {
|
|
|
76
76
|
vault?: VaultSecretInit[];
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
export
|
|
79
|
+
export type Identity<T> = {
|
|
80
80
|
[P in keyof T]: T[P];
|
|
81
81
|
};
|
|
82
|
-
export
|
|
83
|
-
export
|
|
82
|
+
export type AtLeast<T, K extends keyof T> = Identity<Partial<T> & Pick<T, K>>;
|
|
83
|
+
export type Replace<T, K extends keyof T, TReplace> = Identity<Pick<T, Exclude<keyof T, K>> & {
|
|
84
84
|
[P in K]: TReplace;
|
|
85
85
|
}>;
|
|
86
|
-
export
|
|
87
|
-
export
|
|
88
|
-
export
|
|
89
|
-
export
|
|
86
|
+
export type AssetInit = Replace<AtLeast<Asset, 'id' | 'name' | 'type'>, 'type', AssetTypeInit | string>;
|
|
87
|
+
export type AssetRevisionInit = Replace<AtLeast<AssetRevision, 'id' | 'name' | 'type' | 'originalId'>, 'type', AssetTypeInit | string>;
|
|
88
|
+
export type AssetTypeInit = AtLeast<AssetType, 'id' | 'name'>;
|
|
89
|
+
export type ContentInit = Identity<AtLeast<Content, 'id' | 'filename'> & {
|
|
90
90
|
filePath?: string;
|
|
91
91
|
data?: any;
|
|
92
92
|
}>;
|
|
93
|
-
export
|
|
94
|
-
export
|
|
95
|
-
export
|
|
93
|
+
export type EndpointInit = AtLeast<Endpoint, 'name'>;
|
|
94
|
+
export type SecretInit = AtLeast<Secret, 'name' | 'key'>;
|
|
95
|
+
export type TimeSeriesInit = Identity<AtLeast<TimeSeries, 'id' | 'name'> & {
|
|
96
96
|
values: TimeSeriesValue[];
|
|
97
97
|
}>;
|
|
98
|
-
export
|
|
99
|
-
export
|
|
100
|
-
export
|
|
101
|
-
export
|
|
102
|
-
export
|
|
103
|
-
export
|
|
104
|
-
export
|
|
105
|
-
export
|
|
106
|
-
export
|
|
98
|
+
export type TaskInit = AtLeast<Task, 'name' | 'assignedTo'>;
|
|
99
|
+
export type EventInit = AtLeast<Event, 'name'>;
|
|
100
|
+
export type FlowInit = AtLeast<FlowDto, 'id'>;
|
|
101
|
+
export type FlowRevisionInit = AtLeast<FlowRevision, 'id' | 'originalId'>;
|
|
102
|
+
export type FlowDeploymentInit = AtLeast<FlowDeployment, 'id' | 'flow'>;
|
|
103
|
+
export type FlowFunctionInit = AtLeast<FlowFunctionDto, 'fqn'>;
|
|
104
|
+
export type FlowFunctionRevisionInit = AtLeast<FlowFunctionRevision, 'fqn' | 'id' | 'originalId'>;
|
|
105
|
+
export type FlowModuleInit = Replace<AtLeast<FlowModule, 'name'>, 'artifacts', ArtifactInit[]>;
|
|
106
|
+
export type ArtifactInit = AtLeast<Artifact & {
|
|
107
107
|
path: string;
|
|
108
108
|
}, 'filename' | 'path'>;
|
|
109
|
-
export
|
|
110
|
-
export
|
|
111
|
-
export
|
|
109
|
+
export type FlowDiagramInit = AtLeast<FlowDiagram, 'id' | 'flow'>;
|
|
110
|
+
export type LabelInit = AtLeast<Label, 'id' | 'name'>;
|
|
111
|
+
export type VaultSecretInit = AtLeast<VaultSecret, 'name' | 'secret'>;
|
|
112
112
|
export interface UserInit {
|
|
113
113
|
roles: string[];
|
|
114
114
|
}
|
|
@@ -4,7 +4,7 @@ import { FlowModuleService } from '../flow-module.service';
|
|
|
4
4
|
import { Artifact } from '../storage.interface';
|
|
5
5
|
import { Replace } from './api.mock';
|
|
6
6
|
import FormData from 'form-data';
|
|
7
|
-
|
|
7
|
+
type ExtendedFlowModule = Replace<FlowModule, 'artifacts', Array<Artifact & {
|
|
8
8
|
path: string;
|
|
9
9
|
}>>;
|
|
10
10
|
export declare class FlowModulesMockService extends DataMockService<ExtendedFlowModule> implements FlowModuleService {
|
|
@@ -2,11 +2,11 @@ export interface JsonSchemaForm {
|
|
|
2
2
|
schema: JsonSchema;
|
|
3
3
|
layout: Record<string, any> | Record<string, any>[];
|
|
4
4
|
}
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type JsonSchemaTypeName = 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null';
|
|
6
|
+
export type JsonSchemaType = string | number | boolean | {
|
|
7
7
|
[key: string]: JsonSchemaType;
|
|
8
8
|
} | JsonSchemaArray | null;
|
|
9
|
-
export
|
|
9
|
+
export type JsonSchemaArray = Array<JsonSchemaType>;
|
|
10
10
|
export interface JsonSchema {
|
|
11
11
|
default?: JsonSchemaType;
|
|
12
12
|
description?: string;
|
|
@@ -45,8 +45,8 @@ export interface Property {
|
|
|
45
45
|
data_type: string;
|
|
46
46
|
is_mandatory: boolean;
|
|
47
47
|
}
|
|
48
|
-
export
|
|
49
|
-
export
|
|
48
|
+
export type RefType = 'Unknown' | 'Asset' | 'AssetType' | 'Container' | 'ContainerType' | 'Action' | 'AssetReport' | 'ReportType';
|
|
49
|
+
export type Severity = 'Info' | 'Warning' | 'Error' | 'All';
|
|
50
50
|
export interface Subset {
|
|
51
51
|
id: string;
|
|
52
52
|
name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type FileType = 'original' | 'preview-sm' | 'preview-md' | 'preview-lg' | 'preview-xl';
|
|
2
|
+
export type StorageProvider = 's3' | 'mongo';
|
|
3
3
|
export interface Storage {
|
|
4
4
|
id: string;
|
|
5
5
|
filename: string;
|
|
@@ -37,4 +37,4 @@ export interface TimeSeriesBucket {
|
|
|
37
37
|
meta: any;
|
|
38
38
|
final: boolean;
|
|
39
39
|
}
|
|
40
|
-
export
|
|
40
|
+
export type TS_GROUPS = 'none' | '10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '3h' | '6h' | '12h' | '1d' | '7d';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hahnpro/hpc-api",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.3",
|
|
4
4
|
"description": "Module for easy access to the HahnPRO API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"axios": "~
|
|
27
|
+
"axios": "~1.2.0",
|
|
28
28
|
"eventsource": "^2.0.2",
|
|
29
29
|
"form-data": "^4.0.0",
|
|
30
|
-
"jose": "^4.
|
|
30
|
+
"jose": "^4.11.1",
|
|
31
31
|
"jwt-decode": "^3.1.2",
|
|
32
32
|
"p-queue": "^6.6.2",
|
|
33
|
-
"ts-mixer": "^6.0.
|
|
34
|
-
"uuid": "^
|
|
33
|
+
"ts-mixer": "^6.0.2",
|
|
34
|
+
"uuid": "^9.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/eventsource": "^1.1.
|
|
37
|
+
"@types/eventsource": "^1.1.10",
|
|
38
38
|
"axios-mock-adapter": "^1.21.2"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|