@hahnpro/hpc-api 2025.3.9 → 2025.4.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.
- package/CHANGELOG.md +9 -0
- package/package.json +3 -1
- package/src/index.d.ts +2 -16
- package/src/index.js +2 -15
- package/src/lib/api-base.d.ts +3 -3
- package/src/lib/api.d.ts +6 -20
- package/src/lib/api.js +18 -32
- package/src/lib/interfaces/ai.interface.d.ts +1 -1
- package/src/lib/{alert.interface.d.ts → interfaces/alert.interface.d.ts} +1 -1
- package/src/lib/interfaces/asset.interface.d.ts +1 -2
- package/src/lib/{content.interface.d.ts → interfaces/content.interface.d.ts} +1 -2
- package/src/lib/{data.interface.d.ts → interfaces/data.interface.d.ts} +4 -4
- package/src/lib/interfaces/event.interface.d.ts +1 -1
- package/src/lib/{flow-deployment.interface.d.ts → interfaces/flow-deployment.interface.d.ts} +1 -3
- package/src/lib/{flow-module.interface.d.ts → interfaces/flow-module.interface.d.ts} +1 -1
- package/src/lib/{flow.interface.d.ts → interfaces/flow.interface.d.ts} +1 -3
- package/src/lib/interfaces/http.interface.d.ts +13 -0
- package/src/lib/interfaces/index.d.ts +29 -7
- package/src/lib/interfaces/index.js +11 -0
- package/src/lib/interfaces/invitation-representation.interface.d.ts +48 -0
- package/src/lib/interfaces/keycloak-profile.interface.d.ts +12 -0
- package/src/lib/interfaces/label.interface.d.ts +1 -1
- package/src/lib/{notification-rule.interface.d.ts → interfaces/notification-rule.interface.d.ts} +1 -1
- package/src/lib/interfaces/organization-role-representation.interface.d.ts +37 -0
- package/src/lib/interfaces/organization.interface.d.ts +74 -0
- package/src/lib/interfaces/organizations-resources.interface.d.ts +9 -0
- package/src/lib/interfaces/secret.interface.js +2 -0
- package/src/lib/interfaces/storage.interface.js +2 -0
- package/src/lib/{task.interface.d.ts → interfaces/task.interface.d.ts} +11 -8
- package/src/lib/interfaces/task.interface.js +2 -0
- package/src/lib/interfaces/user-settings.interface.js +2 -0
- package/src/lib/interfaces/vault.interface.js +2 -0
- package/src/lib/mock/ai.mock.service.d.ts +5 -8
- package/src/lib/mock/ai.mock.service.js +5 -2
- package/src/lib/mock/alert.mock.service.d.ts +6 -0
- package/src/lib/mock/alert.mock.service.js +11 -0
- package/src/lib/mock/api-base.mock.d.ts +5 -3
- package/src/lib/mock/api-base.mock.js +8 -2
- package/src/lib/mock/api.mock.d.ts +16 -47
- package/src/lib/mock/api.mock.js +28 -38
- package/src/lib/mock/asset.mock.service.d.ts +6 -12
- package/src/lib/mock/asset.mock.service.js +3 -5
- package/src/lib/mock/assetTypes.mock.service.d.ts +4 -7
- package/src/lib/mock/assetTypes.mock.service.js +3 -5
- package/src/lib/mock/content.mock.service.d.ts +4 -7
- package/src/lib/mock/content.mock.service.js +10 -12
- package/src/lib/mock/data.mock.service.d.ts +10 -13
- package/src/lib/mock/data.mock.service.js +21 -36
- package/src/lib/mock/endpoint.mock.service.d.ts +3 -3
- package/src/lib/mock/endpoint.mock.service.js +2 -2
- package/src/lib/mock/event.mock.service.d.ts +1 -1
- package/src/lib/mock/event.mock.service.js +2 -2
- package/src/lib/mock/flow-deployment.mock.service.d.ts +3 -7
- package/src/lib/mock/flow-deployment.mock.service.js +14 -6
- package/src/lib/mock/flow-functions.mock.service.d.ts +4 -5
- package/src/lib/mock/flow-functions.mock.service.js +2 -2
- package/src/lib/mock/flow-modules.mock.service.d.ts +3 -5
- package/src/lib/mock/flow-modules.mock.service.js +2 -2
- package/src/lib/mock/flow.mock.service.d.ts +5 -9
- package/src/lib/mock/flow.mock.service.js +3 -5
- package/src/lib/mock/{http.mock.service.d.ts → http-client.mock.service.d.ts} +3 -2
- package/src/lib/mock/{http.mock.service.js → http-client.mock.service.js} +4 -4
- package/src/lib/mock/index.d.ts +28 -12
- package/src/lib/mock/index.js +57 -12
- package/src/lib/mock/label.mock.service.d.ts +2 -2
- package/src/lib/mock/label.mock.service.js +2 -2
- package/src/lib/mock/notification-rules.mock.service.d.ts +5 -0
- package/src/lib/mock/notification-rules.mock.service.js +11 -0
- package/src/lib/mock/notification.mock.service.d.ts +3 -3
- package/src/lib/mock/notification.mock.service.js +2 -2
- package/src/lib/mock/organizations-administration.mock.service.d.ts +17 -0
- package/src/lib/mock/organizations-administration.mock.service.js +93 -0
- package/src/lib/mock/organizations-resources.mock.service.d.ts +12 -0
- package/src/lib/mock/organizations-resources.mock.service.js +24 -0
- package/src/lib/mock/organizations.mock.service.d.ts +29 -0
- package/src/lib/mock/organizations.mock.service.js +90 -0
- package/src/lib/mock/search.mock.service.d.ts +3 -4
- package/src/lib/mock/search.mock.service.js +2 -2
- package/src/lib/mock/secret.mock.service.d.ts +4 -7
- package/src/lib/mock/secret.mock.service.js +3 -5
- package/src/lib/mock/task.mock.service.d.ts +8 -12
- package/src/lib/mock/task.mock.service.js +4 -6
- package/src/lib/mock/timeseries.mock.service.d.ts +5 -8
- package/src/lib/mock/timeseries.mock.service.js +3 -5
- package/src/lib/mock/trash.mock.service.d.ts +6 -8
- package/src/lib/mock/trash.mock.service.js +3 -4
- package/src/lib/mock/user.mock.service.d.ts +1 -1
- package/src/lib/mock/user.mock.service.js +2 -2
- package/src/lib/mock/utils/index.d.ts +1 -0
- package/src/lib/mock/utils/index.js +5 -0
- package/src/lib/mock/utils/sort-data.function.d.ts +1 -0
- package/src/lib/mock/utils/sort-data.function.js +17 -0
- package/src/lib/mock/vault.mock.service.d.ts +3 -3
- package/src/lib/mock/vault.mock.service.js +2 -2
- package/src/lib/services/ai.service.d.ts +4 -5
- package/src/lib/services/alert.service.d.ts +5 -0
- package/src/lib/{alert.service.js → services/alert.service.js} +2 -2
- package/src/lib/services/asset.service.d.ts +6 -10
- package/src/lib/services/asset.service.js +3 -4
- package/src/lib/services/assettypes.service.d.ts +4 -7
- package/src/lib/services/assettypes.service.js +2 -3
- package/src/lib/{content.service.d.ts → services/content.service.d.ts} +5 -7
- package/src/lib/{content.service.js → services/content.service.js} +11 -12
- package/src/lib/{data.service.d.ts → services/data.service.d.ts} +4 -6
- package/src/lib/{data.service.js → services/data.service.js} +3 -21
- package/src/lib/{endpoint.service.d.ts → services/endpoint.service.d.ts} +3 -4
- package/src/lib/{endpoint.service.js → services/endpoint.service.js} +2 -2
- package/src/lib/services/event.service.d.ts +3 -4
- package/src/lib/services/event.service.js +2 -2
- package/src/lib/{flow-deployment.service.d.ts → services/flow-deployment.service.d.ts} +4 -7
- package/src/lib/{flow-deployment.service.js → services/flow-deployment.service.js} +3 -4
- package/src/lib/{flow-function.service.d.ts → services/flow-function.service.d.ts} +4 -6
- package/src/lib/{flow-function.service.js → services/flow-function.service.js} +2 -2
- package/src/lib/{flow-module.service.d.ts → services/flow-module.service.d.ts} +4 -5
- package/src/lib/{flow-module.service.js → services/flow-module.service.js} +3 -3
- package/src/lib/{flow.service.d.ts → services/flow.service.d.ts} +6 -10
- package/src/lib/{flow.service.js → services/flow.service.js} +3 -4
- package/src/lib/{http.service.d.ts → services/http-client.service.d.ts} +8 -16
- package/src/lib/{http.service.js → services/http-client.service.js} +42 -6
- package/src/lib/services/index.d.ts +20 -0
- package/src/lib/services/index.js +41 -1
- package/src/lib/services/label.service.d.ts +3 -4
- package/src/lib/services/label.service.js +2 -2
- package/src/lib/services/notification-rule.service.d.ts +5 -0
- package/src/lib/{notification-rule.service.js → services/notification-rule.service.js} +2 -2
- package/src/lib/services/notification.service.d.ts +5 -0
- package/src/lib/{notification.service.js → services/notification.service.js} +2 -2
- package/src/lib/services/organizations-administration.service.d.ts +56 -0
- package/src/lib/services/organizations-administration.service.js +84 -0
- package/src/lib/services/organizations-resources.service.d.ts +35 -0
- package/src/lib/services/organizations-resources.service.js +61 -0
- package/src/lib/services/organizations.service.d.ts +167 -0
- package/src/lib/services/organizations.service.js +216 -0
- package/src/lib/{proxy.service.d.ts → services/proxy.service.d.ts} +3 -2
- package/src/lib/services/search.service.d.ts +3 -3
- package/src/lib/services/secret.service.d.ts +11 -0
- package/src/lib/{secret.service.js → services/secret.service.js} +3 -4
- package/src/lib/{task.service.d.ts → services/task.service.d.ts} +8 -11
- package/src/lib/{task.service.js → services/task.service.js} +3 -4
- package/src/lib/services/timeseries.service.d.ts +4 -7
- package/src/lib/services/timeseries.service.js +2 -3
- package/src/lib/{trash.service.d.ts → services/trash.service.d.ts} +3 -3
- package/src/lib/{trash.service.js → services/trash.service.js} +1 -1
- package/src/lib/{user.service.d.ts → services/user.service.d.ts} +3 -3
- package/src/lib/services/vault.service.d.ts +6 -0
- package/src/lib/{vault.service.js → services/vault.service.js} +2 -2
- package/src/lib/utils.d.ts +2 -0
- package/src/lib/utils.js +21 -0
- package/src/lib/alert.service.d.ts +0 -6
- package/src/lib/mock/organization.mock.service.d.ts +0 -10
- package/src/lib/mock/organization.mock.service.js +0 -44
- package/src/lib/notification-rule.service.d.ts +0 -6
- package/src/lib/notification.service.d.ts +0 -6
- package/src/lib/organization.interface.d.ts +0 -36
- package/src/lib/organization.service.d.ts +0 -10
- package/src/lib/organization.service.js +0 -22
- package/src/lib/secret.service.d.ts +0 -13
- package/src/lib/vault.service.d.ts +0 -7
- /package/src/lib/{alert.interface.js → interfaces/alert.interface.js} +0 -0
- /package/src/lib/{content.interface.js → interfaces/content.interface.js} +0 -0
- /package/src/lib/{data.interface.js → interfaces/data.interface.js} +0 -0
- /package/src/lib/{endpoint.interface.d.ts → interfaces/endpoint.interface.d.ts} +0 -0
- /package/src/lib/{endpoint.interface.js → interfaces/endpoint.interface.js} +0 -0
- /package/src/lib/{flow-deployment.interface.js → interfaces/flow-deployment.interface.js} +0 -0
- /package/src/lib/{flow-function.interface.d.ts → interfaces/flow-function.interface.d.ts} +0 -0
- /package/src/lib/{flow-function.interface.js → interfaces/flow-function.interface.js} +0 -0
- /package/src/lib/{flow-module.interface.js → interfaces/flow-module.interface.js} +0 -0
- /package/src/lib/{flow.interface.js → interfaces/flow.interface.js} +0 -0
- /package/src/lib/{notification-rule.interface.js → interfaces/http.interface.js} +0 -0
- /package/src/lib/{notification.interface.js → interfaces/invitation-representation.interface.js} +0 -0
- /package/src/lib/{organization.interface.js → interfaces/keycloak-profile.interface.js} +0 -0
- /package/src/lib/{schema.interface.js → interfaces/notification-rule.interface.js} +0 -0
- /package/src/lib/{notification.interface.d.ts → interfaces/notification.interface.d.ts} +0 -0
- /package/src/lib/{secret.interface.js → interfaces/notification.interface.js} +0 -0
- /package/src/lib/{storage.interface.js → interfaces/organization-role-representation.interface.js} +0 -0
- /package/src/lib/{task.interface.js → interfaces/organization.interface.js} +0 -0
- /package/src/lib/{user-settings.interface.js → interfaces/organizations-resources.interface.js} +0 -0
- /package/src/lib/{schema.interface.d.ts → interfaces/schema.interface.d.ts} +0 -0
- /package/src/lib/{vault.interface.js → interfaces/schema.interface.js} +0 -0
- /package/src/lib/{secret.interface.d.ts → interfaces/secret.interface.d.ts} +0 -0
- /package/src/lib/{storage.interface.d.ts → interfaces/storage.interface.d.ts} +0 -0
- /package/src/lib/{user-settings.interface.d.ts → interfaces/user-settings.interface.d.ts} +0 -0
- /package/src/lib/{vault.interface.d.ts → interfaces/vault.interface.d.ts} +0 -0
- /package/src/lib/{Queue.d.ts → queue.d.ts} +0 -0
- /package/src/lib/{Queue.js → queue.js} +0 -0
- /package/src/lib/{proxy.service.js → services/proxy.service.js} +0 -0
- /package/src/lib/{user.service.js → services/user.service.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @hahnpro/hpc-api
|
|
2
2
|
|
|
3
|
+
## 2025.4.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- Restructured the whole package
|
|
8
|
+
- Moved many interfaces to prevent duplication and to make them accessible for other packages
|
|
9
|
+
- Added an organization administration API service to manage organizations administration and separate it from the normal organization calls.
|
|
10
|
+
- Fixed an issue where the organization resources API sse observables did not use the correct base url.
|
|
11
|
+
|
|
3
12
|
## 2025.3.9
|
|
4
13
|
|
|
5
14
|
- Updated Content Interface and Task Interface, Added `addElementToProperty` and `removeElementToProperty` mehtods to Asset API service
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hahnpro/hpc-api",
|
|
3
|
-
"version": "2025.
|
|
3
|
+
"version": "2025.4.0",
|
|
4
4
|
"description": "Module for easy access to the HahnPRO Cloud API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
"url": "https://hahnpro.com"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
+
"@microsoft/fetch-event-source": "2.0.1",
|
|
11
12
|
"axios": "1.12.2",
|
|
12
13
|
"eventsource": "4.0.0",
|
|
13
14
|
"jose": "5.10.0",
|
|
14
15
|
"jwt-decode": "4.0.0",
|
|
15
16
|
"p-queue": "6.6.2",
|
|
17
|
+
"rxjs": "7.8.2",
|
|
16
18
|
"ts-mixer": "6.0.4",
|
|
17
19
|
"tslib": "2.8.1"
|
|
18
20
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
|
+
export * from './lib/interfaces';
|
|
2
|
+
export * from './lib/services';
|
|
1
3
|
export * from './lib/api';
|
|
2
|
-
export type * from './lib/interfaces';
|
|
3
|
-
export * from './lib/content.interface';
|
|
4
|
-
export * from './lib/data.interface';
|
|
5
|
-
export * from './lib/data.service';
|
|
6
|
-
export * from './lib/endpoint.interface';
|
|
7
|
-
export * from './lib/flow.interface';
|
|
8
|
-
export * from './lib/flow-deployment.interface';
|
|
9
|
-
export * from './lib/flow-function.interface';
|
|
10
|
-
export * from './lib/http.service';
|
|
11
4
|
export * from './lib/mock';
|
|
12
|
-
export * from './lib/notification.interface';
|
|
13
|
-
export * from './lib/organization.interface';
|
|
14
|
-
export * from './lib/schema.interface';
|
|
15
|
-
export * from './lib/secret.interface';
|
|
16
|
-
export * from './lib/task.interface';
|
|
17
|
-
export * from './lib/vault.interface';
|
|
18
|
-
export * from './lib/task.service';
|
|
19
5
|
export * from './lib/utils';
|
package/src/index.js
CHANGED
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./lib/interfaces"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./lib/services"), exports);
|
|
4
6
|
tslib_1.__exportStar(require("./lib/api"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./lib/content.interface"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./lib/data.interface"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./lib/data.service"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./lib/endpoint.interface"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./lib/flow.interface"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./lib/flow-deployment.interface"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./lib/flow-function.interface"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./lib/http.service"), exports);
|
|
13
7
|
tslib_1.__exportStar(require("./lib/mock"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./lib/notification.interface"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./lib/organization.interface"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./lib/schema.interface"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./lib/secret.interface"), exports);
|
|
18
|
-
tslib_1.__exportStar(require("./lib/task.interface"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("./lib/vault.interface"), exports);
|
|
20
|
-
tslib_1.__exportStar(require("./lib/task.service"), exports);
|
|
21
8
|
tslib_1.__exportStar(require("./lib/utils"), exports);
|
package/src/lib/api-base.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HttpClientService } from './services';
|
|
2
2
|
export declare class APIBase {
|
|
3
|
-
protected readonly httpClient:
|
|
3
|
+
protected readonly httpClient: HttpClientService;
|
|
4
4
|
protected readonly basePath: string;
|
|
5
|
-
constructor(httpClient:
|
|
5
|
+
constructor(httpClient: HttpClientService, basePath: string);
|
|
6
6
|
}
|
package/src/lib/api.d.ts
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
import { AlertService } from './
|
|
2
|
-
import { ContentService } from './content.service';
|
|
3
|
-
import { EndpointService } from './endpoint.service';
|
|
4
|
-
import { FlowDeploymentService } from './flow-deployment.service';
|
|
5
|
-
import { FlowFunctionService } from './flow-function.service';
|
|
6
|
-
import { FlowModuleService } from './flow-module.service';
|
|
7
|
-
import { FlowService } from './flow.service';
|
|
8
|
-
import { HttpClient } from './http.service';
|
|
9
|
-
import { NotificationRuleService } from './notification-rule.service';
|
|
10
|
-
import { NotificationService } from './notification.service';
|
|
11
|
-
import { OrganizationService } from './organization.service';
|
|
12
|
-
import { ProxyService } from './proxy.service';
|
|
13
|
-
import { SecretService } from './secret.service';
|
|
14
|
-
import { AiService, AssetService, AssetTypesService, EventService, LabelService, SearchService, TimeSeriesService } from './services';
|
|
15
|
-
import { TaskService } from './task.service';
|
|
16
|
-
import { UserService } from './user.service';
|
|
17
|
-
import { VaultService } from './vault.service';
|
|
1
|
+
import { AiService, AlertService, AssetService, AssetTypesService, ContentService, EndpointService, EventService, FlowDeploymentService, FlowFunctionService, FlowModuleService, FlowService, HttpClientService, LabelService, NotificationRuleService, NotificationService, OrganizationsAdministrationService, OrganizationsResourcesService, OrganizationsService, ProxyService, SearchService, SecretService, TaskService, TimeSeriesService, UserService, VaultService } from './services';
|
|
18
2
|
export declare class API {
|
|
19
|
-
readonly httpClient?:
|
|
3
|
+
readonly httpClient?: HttpClientService;
|
|
20
4
|
ai: AiService;
|
|
21
5
|
alerts: AlertService;
|
|
22
6
|
assets: AssetService;
|
|
@@ -29,7 +13,9 @@ export declare class API {
|
|
|
29
13
|
flowFunctions: FlowFunctionService;
|
|
30
14
|
flowModules: FlowModuleService;
|
|
31
15
|
labels: LabelService;
|
|
32
|
-
organizations:
|
|
16
|
+
organizations: OrganizationsService;
|
|
17
|
+
organizationsAdministration: OrganizationsAdministrationService;
|
|
18
|
+
organizationsResources: OrganizationsResourcesService;
|
|
33
19
|
proxy: ProxyService;
|
|
34
20
|
search: SearchService;
|
|
35
21
|
secrets: SecretService;
|
|
@@ -39,7 +25,7 @@ export declare class API {
|
|
|
39
25
|
vault: VaultService;
|
|
40
26
|
notifications: NotificationService;
|
|
41
27
|
notificationRules: NotificationRuleService;
|
|
42
|
-
constructor(httpClient?:
|
|
28
|
+
constructor(httpClient?: HttpClientService, context?: {
|
|
43
29
|
tokenSubject?: string;
|
|
44
30
|
});
|
|
45
31
|
}
|
package/src/lib/api.js
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.API = void 0;
|
|
4
|
-
const alert_service_1 = require("./alert.service");
|
|
5
|
-
const content_service_1 = require("./content.service");
|
|
6
|
-
const endpoint_service_1 = require("./endpoint.service");
|
|
7
|
-
const flow_deployment_service_1 = require("./flow-deployment.service");
|
|
8
|
-
const flow_function_service_1 = require("./flow-function.service");
|
|
9
|
-
const flow_module_service_1 = require("./flow-module.service");
|
|
10
|
-
const flow_service_1 = require("./flow.service");
|
|
11
|
-
const http_service_1 = require("./http.service");
|
|
12
|
-
const notification_rule_service_1 = require("./notification-rule.service");
|
|
13
|
-
const notification_service_1 = require("./notification.service");
|
|
14
|
-
const organization_service_1 = require("./organization.service");
|
|
15
|
-
const proxy_service_1 = require("./proxy.service");
|
|
16
|
-
const secret_service_1 = require("./secret.service");
|
|
17
4
|
const services_1 = require("./services");
|
|
18
|
-
const task_service_1 = require("./task.service");
|
|
19
|
-
const user_service_1 = require("./user.service");
|
|
20
|
-
const vault_service_1 = require("./vault.service");
|
|
21
5
|
class API {
|
|
22
6
|
constructor(httpClient, context) {
|
|
23
7
|
this.httpClient = httpClient;
|
|
@@ -39,30 +23,32 @@ class API {
|
|
|
39
23
|
if (!secret) {
|
|
40
24
|
throw new Error('"API_BASE_URL", "API_USER", "AUTH_REALM" and "AUTH_SECRET" environment variables must be set');
|
|
41
25
|
}
|
|
42
|
-
this.httpClient = new
|
|
26
|
+
this.httpClient = new services_1.HttpClientService(apiUrl, authUrl, realm, client, secret, context?.tokenSubject);
|
|
43
27
|
}
|
|
44
28
|
this.ai = new services_1.AiService(this.httpClient);
|
|
45
|
-
this.alerts = new
|
|
29
|
+
this.alerts = new services_1.AlertService(this.httpClient);
|
|
46
30
|
this.assets = new services_1.AssetService(this.httpClient);
|
|
47
31
|
this.assetTypes = new services_1.AssetTypesService(this.httpClient);
|
|
48
|
-
this.contents = new
|
|
49
|
-
this.endpoints = new
|
|
32
|
+
this.contents = new services_1.ContentService(this.httpClient);
|
|
33
|
+
this.endpoints = new services_1.EndpointService(this.httpClient);
|
|
50
34
|
this.events = new services_1.EventService(this.httpClient);
|
|
51
|
-
this.flows = new
|
|
52
|
-
this.flowDeployments = new
|
|
53
|
-
this.flowFunctions = new
|
|
54
|
-
this.flowModules = new
|
|
35
|
+
this.flows = new services_1.FlowService(this.httpClient);
|
|
36
|
+
this.flowDeployments = new services_1.FlowDeploymentService(this.httpClient);
|
|
37
|
+
this.flowFunctions = new services_1.FlowFunctionService(this.httpClient);
|
|
38
|
+
this.flowModules = new services_1.FlowModuleService(this.httpClient);
|
|
55
39
|
this.labels = new services_1.LabelService(this.httpClient);
|
|
56
|
-
this.organizations = new
|
|
57
|
-
this.
|
|
40
|
+
this.organizations = new services_1.OrganizationsService(this.httpClient);
|
|
41
|
+
this.organizationsAdministration = new services_1.OrganizationsAdministrationService(this.httpClient);
|
|
42
|
+
this.organizationsResources = new services_1.OrganizationsResourcesService(this.httpClient);
|
|
43
|
+
this.proxy = new services_1.ProxyService(this.httpClient);
|
|
58
44
|
this.search = new services_1.SearchService(this.httpClient);
|
|
59
|
-
this.secrets = new
|
|
60
|
-
this.tasks = new
|
|
45
|
+
this.secrets = new services_1.SecretService(this.httpClient);
|
|
46
|
+
this.tasks = new services_1.TaskService(this.httpClient);
|
|
61
47
|
this.timeSeries = new services_1.TimeSeriesService(this.httpClient);
|
|
62
|
-
this.users = new
|
|
63
|
-
this.vault = new
|
|
64
|
-
this.notifications = new
|
|
65
|
-
this.notificationRules = new
|
|
48
|
+
this.users = new services_1.UserService(this.httpClient);
|
|
49
|
+
this.vault = new services_1.VaultService(this.httpClient);
|
|
50
|
+
this.notifications = new services_1.NotificationService(this.httpClient);
|
|
51
|
+
this.notificationRules = new services_1.NotificationRuleService(this.httpClient);
|
|
66
52
|
}
|
|
67
53
|
}
|
|
68
54
|
exports.API = API;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TokenOption } from '
|
|
1
|
+
import { TokenOption } from '.';
|
|
2
2
|
export interface Paginated<T> {
|
|
3
|
-
docs: T;
|
|
3
|
+
docs: T[];
|
|
4
4
|
total: number;
|
|
5
5
|
limit: number;
|
|
6
6
|
page?: number;
|
|
@@ -29,8 +29,8 @@ export interface DataInterface<T> {
|
|
|
29
29
|
getOne(id: string, options?: TokenOption & {
|
|
30
30
|
[key: string]: any;
|
|
31
31
|
}): Promise<T>;
|
|
32
|
-
getMany(params?: RequestParameter, options?: TokenOption): Promise<Paginated<T
|
|
33
|
-
getManyFiltered(filter: Filter, params?: RequestParameter, options?: TokenOption): Promise<Paginated<T
|
|
32
|
+
getMany(params?: RequestParameter, options?: TokenOption): Promise<Paginated<T>>;
|
|
33
|
+
getManyFiltered(filter: Filter, params?: RequestParameter, options?: TokenOption): Promise<Paginated<T>>;
|
|
34
34
|
updateOne(id: string, dto: any, options?: TokenOption & {
|
|
35
35
|
[key: string]: any;
|
|
36
36
|
}): Promise<T>;
|
package/src/lib/{flow-deployment.interface.d.ts → interfaces/flow-deployment.interface.d.ts}
RENAMED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { FlowDiagram, FlowDto } from '
|
|
2
|
-
import { Resource } from './interfaces';
|
|
3
|
-
import { Storage } from './storage.interface';
|
|
1
|
+
import { FlowDiagram, FlowDto, Resource, Storage } from '.';
|
|
4
2
|
export interface FlowDeployment extends Resource {
|
|
5
3
|
flow: string | FlowDto;
|
|
6
4
|
diagram: string | FlowDiagram;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { FlowDeployment } from '
|
|
2
|
-
import { Resource } from './interfaces';
|
|
3
|
-
import { JsonSchemaForm } from './schema.interface';
|
|
1
|
+
import { FlowDeployment, JsonSchemaForm, Resource } from '.';
|
|
4
2
|
export interface FlowDto extends Resource {
|
|
5
3
|
diagram: string | FlowDiagram;
|
|
6
4
|
deployments?: string[] | FlowDeployment[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
export type TokenOption = {
|
|
3
|
+
token?: string;
|
|
4
|
+
};
|
|
5
|
+
export type Config = TokenOption & AxiosRequestConfig;
|
|
6
|
+
export interface Issuer {
|
|
7
|
+
issuer: string;
|
|
8
|
+
token_endpoint: string;
|
|
9
|
+
grant_types_supported: string[];
|
|
10
|
+
token_endpoint_auth_methods_supported: string[];
|
|
11
|
+
token_endpoint_auth_signing_alg?: string;
|
|
12
|
+
token_endpoint_auth_signing_alg_values_supported: string[];
|
|
13
|
+
}
|
|
@@ -1,7 +1,29 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
1
|
+
export { AiAssistant, AssistantMessage, Message, SpeechToken, SystemMessage, Thread, ThreadPopulated, ToolMessage, UserMessage, } from './ai.interface';
|
|
2
|
+
export { Alert, AlertCondition, AlertLevel, AlertType, TimeSeriesReference } from './alert.interface';
|
|
3
|
+
export { Asset, AssetTypeRevision, AssetRevision, AssetType, Attachment, EventCause, EventLevelOverride, Template, RemoveFromProperty, AddToProperty, } from './asset.interface';
|
|
4
|
+
export { ReturnType, Content, ContentAnalysis } from './content.interface';
|
|
5
|
+
export { Filter, Paginated, RequestParameter, DataInterface, instanceOfTimePeriod } from './data.interface';
|
|
6
|
+
export { Endpoint, EndpointLog, NotificationPayload } from './endpoint.interface';
|
|
7
|
+
export { Event, EventLevel, CreateEventDto } from './event.interface';
|
|
8
|
+
export { FlowDto, FlowDiagram, FlowRevision, DashboardItem } from './flow.interface';
|
|
9
|
+
export { FlowDeployment, FlowDeploymentMetrics, FlowLog, FlowDeploymentStatistic, FlowModel, FlowModelElement, Metrics, FlowConnection, Stats, StatsValues, } from './flow-deployment.interface';
|
|
10
|
+
export { FlowFunctionDto, FlowFunctionRevision } from './flow-function.interface';
|
|
11
|
+
export { FlowModule } from './flow-module.interface';
|
|
12
|
+
export { TokenOption, Issuer, Config } from './http.interface';
|
|
13
|
+
export { InvitationRepresentation } from './invitation-representation.interface';
|
|
14
|
+
export { KeycloakProfile } from './keycloak-profile.interface';
|
|
15
|
+
export { Label, CreateLabelDto, UpdateLabelDto } from './label.interface';
|
|
16
|
+
export { NotificationType, Notification } from './notification.interface';
|
|
17
|
+
export { TagRule, NotificationRule, StatusRule } from './notification-rule.interface';
|
|
18
|
+
export { Organization, OrganizationCreateDto, OrganizationData, OrganizationDataKind, OrganizationDomain, OrganizationName, OrganizationRolesAdjustment, OrganizationSearchQuery, SubscriptionType, UserWithOrgRoles, } from './organization.interface';
|
|
19
|
+
export { OrganizationRoleRepresentation } from './organization-role-representation.interface';
|
|
20
|
+
export { OrganizationResourcesProgress, OrganizationResourcesProgressDto, OrganizationResourcesProgressErrorDto, } from './organizations-resources.interface';
|
|
21
|
+
export { Author, Owner, OwnerType, Resource, ResourceReference } from './resource.interface';
|
|
22
|
+
export { JsonSchema, JsonSchemaArray, JsonSchemaForm, JsonSchemaType, JsonSchemaTypeName } from './schema.interface';
|
|
23
|
+
export { SearchOptions, SearchResult, SearchSortOption, SortableField } from './search.interface';
|
|
24
|
+
export { Secret } from './secret.interface';
|
|
25
|
+
export { FileType, Artifact, Storage, StorageProvider } from './storage.interface';
|
|
26
|
+
export { Task, LogbookEntry, LogbookEntryDto } from './task.interface';
|
|
27
|
+
export { TimeSeries, TimeSeriesBucket, TimeSeriesCondition, TimeSeriesValue, TS_GROUPS } from './timeseries.interface';
|
|
28
|
+
export { Permission, Application, TableSetting, TableSettingProfile, UserSettings } from './user-settings.interface';
|
|
29
|
+
export { VaultSecret } from './vault.interface';
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OwnerType = exports.instanceOfTimePeriod = exports.ContentAnalysis = exports.ReturnType = exports.AlertType = exports.AlertLevel = void 0;
|
|
4
|
+
var alert_interface_1 = require("./alert.interface");
|
|
5
|
+
Object.defineProperty(exports, "AlertLevel", { enumerable: true, get: function () { return alert_interface_1.AlertLevel; } });
|
|
6
|
+
Object.defineProperty(exports, "AlertType", { enumerable: true, get: function () { return alert_interface_1.AlertType; } });
|
|
7
|
+
var content_interface_1 = require("./content.interface");
|
|
8
|
+
Object.defineProperty(exports, "ReturnType", { enumerable: true, get: function () { return content_interface_1.ReturnType; } });
|
|
9
|
+
Object.defineProperty(exports, "ContentAnalysis", { enumerable: true, get: function () { return content_interface_1.ContentAnalysis; } });
|
|
10
|
+
var data_interface_1 = require("./data.interface");
|
|
11
|
+
Object.defineProperty(exports, "instanceOfTimePeriod", { enumerable: true, get: function () { return data_interface_1.instanceOfTimePeriod; } });
|
|
12
|
+
var resource_interface_1 = require("./resource.interface");
|
|
13
|
+
Object.defineProperty(exports, "OwnerType", { enumerable: true, get: function () { return resource_interface_1.OwnerType; } });
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase Two Admin REST API
|
|
3
|
+
* This is a REST API reference for the Phase Two Keycloak custom resources. These are extensions to the standard [Keycloak Admin REST API](https://www.keycloak.org/docs-api/17.0/rest-api/index.html). ### Base URI format Paths specified in the documentation are relative to the the base URI. - Format: `https://<host>:<port>/auth/realms` - Example: `https://app.phasetwo.io/auth/realms` ### Authentication Authentication is achieved by using the `Authentication: Bearer <token>` header in all requests. This is either the access token received from a normal authentication, or by a request directly to the OpenID Connect token endpoint. It is recommended that you use a Keycloak Admin Client, such as [this one for Javascript](https://github.com/keycloak/keycloak-nodejs-admin-client), as they take care of authentication, getting an access token, and refreshing it when it expires. #### Client credentials grant example ``` POST /auth/realms/test-realm/protocol/openid-connect/token Host: app.phasetwo.io Accept: application/json Content-type: application/x-www-form-urlencoded grant_type=client_credentials&client_id=admin-cli&client_secret=fd649804-3a74-4d69-acaa-8f065c6b7da1 ``` #### Password grant example ``` POST /auth/realms/test-realm/protocol/openid-connect/token Host: app.phasetwo.io Accept: application/json Content-type: application/x-www-form-urlencoded grant_type=password&username=uname@foo.com&password=pwd123AZY&client_id=admin-cli ``` ### SDKs Modern API libraries are available for several common languages. These are available as open source at the links below, or you can choose to generate your own using our [OpenAPI spec file](https://raw.githubusercontent.com/p2-inc/phasetwo-docs/master/openapi.yaml). | Language | Library | | --- | --- | | Java (and other JVM langs) | https://github.com/p2-inc/phasetwo-java | | JavaScript/TypeScript | https://github.com/p2-inc/phasetwo-js | | Python | https://github.com/p2-inc/phasetwo-python |
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface InvitationRepresentation
|
|
16
|
+
*/
|
|
17
|
+
export interface InvitationRepresentation {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof InvitationRepresentation
|
|
22
|
+
*/
|
|
23
|
+
id?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof InvitationRepresentation
|
|
28
|
+
*/
|
|
29
|
+
email?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof InvitationRepresentation
|
|
34
|
+
*/
|
|
35
|
+
inviterId?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof InvitationRepresentation
|
|
40
|
+
*/
|
|
41
|
+
organizationId?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Array<string>}
|
|
45
|
+
* @memberof InvitationRepresentation
|
|
46
|
+
*/
|
|
47
|
+
roles?: Array<string>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface KeycloakProfile {
|
|
2
|
+
id?: string;
|
|
3
|
+
username?: string;
|
|
4
|
+
email?: string;
|
|
5
|
+
firstName?: string;
|
|
6
|
+
lastName?: string;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
emailVerified?: boolean;
|
|
9
|
+
totp?: boolean;
|
|
10
|
+
createdTimestamp?: number;
|
|
11
|
+
attributes?: Record<string, unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* COPIED FROM:
|
|
3
|
+
* Phase Two Admin REST API
|
|
4
|
+
* This is a REST API reference for the Phase Two Keycloak custom resources. These are extensions to the standard [Keycloak Admin REST API](https://www.keycloak.org/docs-api/17.0/rest-api/index.html). ### Base URI format Paths specified in the documentation are relative to the the base URI. - Format: `https://<host>:<port>/auth/realms` - Example: `https://app.phasetwo.io/auth/realms` ### Authentication Authentication is achieved by using the `Authentication: Bearer <token>` header in all requests. This is either the access token received from a normal authentication, or by a request directly to the OpenID Connect token endpoint. It is recommended that you use a Keycloak Admin Client, such as [this one for Javascript](https://github.com/keycloak/keycloak-nodejs-admin-client), as they take care of authentication, getting an access token, and refreshing it when it expires. #### Client credentials grant example ``` POST /auth/realms/test-realm/protocol/openid-connect/token Host: app.phasetwo.io Accept: application/json Content-type: application/x-www-form-urlencoded grant_type=client_credentials&client_id=admin-cli&client_secret=fd649804-3a74-4d69-acaa-8f065c6b7da1 ``` #### Password grant example ``` POST /auth/realms/test-realm/protocol/openid-connect/token Host: app.phasetwo.io Accept: application/json Content-type: application/x-www-form-urlencoded grant_type=password&username=uname@foo.com&password=pwd123AZY&client_id=admin-cli ``` ### SDKs Modern API libraries are available for several common languages. These are available as open source at the links below, or you can choose to generate your own using our [OpenAPI spec file](https://raw.githubusercontent.com/p2-inc/phasetwo-docs/master/openapi.yaml). | Language | Library | | --- | --- | | Java (and other JVM langs) | https://github.com/p2-inc/phasetwo-java | | JavaScript/TypeScript | https://github.com/p2-inc/phasetwo-js | | Python | https://github.com/p2-inc/phasetwo-python |
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: v1
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface OrganizationRoleRepresentation
|
|
17
|
+
*/
|
|
18
|
+
export interface OrganizationRoleRepresentation {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof OrganizationRoleRepresentation
|
|
23
|
+
*/
|
|
24
|
+
id?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof OrganizationRoleRepresentation
|
|
29
|
+
*/
|
|
30
|
+
name?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof OrganizationRoleRepresentation
|
|
35
|
+
*/
|
|
36
|
+
description?: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Author, InvitationRepresentation, KeycloakProfile, OrganizationRoleRepresentation } from '.';
|
|
2
|
+
export interface Organization {
|
|
3
|
+
id?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
realm?: string;
|
|
7
|
+
domains?: string[];
|
|
8
|
+
logo?: string;
|
|
9
|
+
addressLine?: string;
|
|
10
|
+
zipCode?: string;
|
|
11
|
+
city?: string;
|
|
12
|
+
phoneNumber?: string;
|
|
13
|
+
website?: string;
|
|
14
|
+
vat?: string;
|
|
15
|
+
certificates?: string[];
|
|
16
|
+
services?: string[];
|
|
17
|
+
subscriptionId?: string;
|
|
18
|
+
previousSubscriptions?: string[];
|
|
19
|
+
assetId?: string;
|
|
20
|
+
verified?: boolean;
|
|
21
|
+
deletionRequested?: boolean;
|
|
22
|
+
createdAt?: Date | string;
|
|
23
|
+
updatedAt?: Date | string;
|
|
24
|
+
createdBy?: Author;
|
|
25
|
+
updatedBy?: Author;
|
|
26
|
+
}
|
|
27
|
+
export interface OrganizationCreateDto {
|
|
28
|
+
name: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
domains?: string[];
|
|
31
|
+
logo?: string;
|
|
32
|
+
addressLine?: string;
|
|
33
|
+
zipCode?: string;
|
|
34
|
+
city?: string;
|
|
35
|
+
phoneNumber?: string;
|
|
36
|
+
vat?: string;
|
|
37
|
+
assetId?: string;
|
|
38
|
+
certificates?: string[];
|
|
39
|
+
services?: string[];
|
|
40
|
+
subscriptionId?: string;
|
|
41
|
+
previousSubscriptions?: string[];
|
|
42
|
+
deletionRequested?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface OrganizationData {
|
|
45
|
+
members: KeycloakProfile[];
|
|
46
|
+
invitations: InvitationRepresentation[];
|
|
47
|
+
roles: OrganizationRoleRepresentation[];
|
|
48
|
+
userRoles: OrganizationRoleRepresentation[];
|
|
49
|
+
domains: OrganizationDomain[];
|
|
50
|
+
}
|
|
51
|
+
export type OrganizationDataKind = 'members' | 'invitations' | 'roles' | 'domains' | 'userRoles';
|
|
52
|
+
export interface OrganizationDomain {
|
|
53
|
+
domainName: string;
|
|
54
|
+
recordKey?: string;
|
|
55
|
+
recordValue?: string;
|
|
56
|
+
verified: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface OrganizationName {
|
|
59
|
+
id: string;
|
|
60
|
+
name?: string;
|
|
61
|
+
isDeleted?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface OrganizationRolesAdjustment {
|
|
64
|
+
grantRoles?: string[];
|
|
65
|
+
revokeRoles?: string[];
|
|
66
|
+
}
|
|
67
|
+
export interface OrganizationSearchQuery {
|
|
68
|
+
name?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface UserWithOrgRoles {
|
|
71
|
+
username: string;
|
|
72
|
+
orgRoles: string[];
|
|
73
|
+
}
|
|
74
|
+
export type SubscriptionType = 'dev' | 'free' | 'inactive' | 'pro';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type OrganizationResourcesProgress = OrganizationResourcesProgressDto | OrganizationResourcesProgressErrorDto;
|
|
2
|
+
export interface OrganizationResourcesProgressDto {
|
|
3
|
+
step: string;
|
|
4
|
+
stepNumber: number;
|
|
5
|
+
maxSteps: number;
|
|
6
|
+
}
|
|
7
|
+
export interface OrganizationResourcesProgressErrorDto {
|
|
8
|
+
message: string;
|
|
9
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Author } from '
|
|
1
|
+
import { Author } from '.';
|
|
2
2
|
export interface Task {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
@@ -21,24 +21,26 @@ export interface Task {
|
|
|
21
21
|
createdAt?: string;
|
|
22
22
|
updatedAt?: string;
|
|
23
23
|
deletedAt?: string;
|
|
24
|
+
logbookSchema?: string;
|
|
24
25
|
}
|
|
25
26
|
export interface LogbookEntry {
|
|
26
|
-
id
|
|
27
|
+
id?: string;
|
|
27
28
|
taskId: string;
|
|
28
|
-
date:
|
|
29
|
+
date: Date;
|
|
29
30
|
duration: number;
|
|
30
|
-
materials
|
|
31
|
+
materials?: {
|
|
31
32
|
name: string;
|
|
32
33
|
quantity: number;
|
|
33
34
|
}[];
|
|
34
35
|
comment?: string;
|
|
35
36
|
source: 'manual' | 'voice' | 'automatic';
|
|
36
|
-
createdBy
|
|
37
|
-
createdAt
|
|
38
|
-
updatedAt
|
|
37
|
+
createdBy?: Author;
|
|
38
|
+
createdAt?: string;
|
|
39
|
+
updatedAt?: string;
|
|
40
|
+
data?: Record<string, unknown>;
|
|
39
41
|
}
|
|
40
42
|
export interface LogbookEntryDto {
|
|
41
|
-
date:
|
|
43
|
+
date: Date;
|
|
42
44
|
duration: number;
|
|
43
45
|
materials: {
|
|
44
46
|
name: string;
|
|
@@ -48,4 +50,5 @@ export interface LogbookEntryDto {
|
|
|
48
50
|
source?: 'manual' | 'voice' | 'automatic';
|
|
49
51
|
taskId: string;
|
|
50
52
|
createdBy?: Author;
|
|
53
|
+
data?: Record<string, unknown>;
|
|
51
54
|
}
|