@hahnpro/hpc-api 2026.7.5 → 2026.7.7
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/package.json +3 -3
- package/src/lib/api-base.d.ts +1 -1
- package/src/lib/interfaces/ai.interface.d.ts +27 -2
- package/src/lib/interfaces/ai.interface.js +5 -0
- package/src/lib/interfaces/alert.interface.d.ts +2 -1
- package/src/lib/interfaces/api.interface.d.ts +2 -1
- package/src/lib/interfaces/data.interface.d.ts +2 -1
- package/src/lib/interfaces/event.interface.d.ts +3 -1
- package/src/lib/interfaces/index.d.ts +1 -1
- package/src/lib/interfaces/label.interface.d.ts +2 -1
- package/src/lib/interfaces/notification-rule.interface.d.ts +2 -1
- package/src/lib/interfaces/organization.interface.d.ts +4 -1
- package/src/lib/interfaces/task.interface.d.ts +1 -1
- package/src/lib/mock/ai.mock.service.d.ts +9 -2
- package/src/lib/mock/ai.mock.service.js +20 -2
- package/src/lib/mock/alert.mock.service.d.ts +5 -4
- package/src/lib/mock/alert.mock.service.js +3 -8
- package/src/lib/mock/api.mock.d.ts +28 -1
- package/src/lib/mock/api.mock.js +56 -29
- package/src/lib/mock/asset.mock.service.d.ts +9 -4
- package/src/lib/mock/asset.mock.service.js +4 -8
- package/src/lib/mock/assetTypes.mock.service.d.ts +8 -4
- package/src/lib/mock/assetTypes.mock.service.js +4 -8
- package/src/lib/mock/content.mock.service.d.ts +8 -4
- package/src/lib/mock/content.mock.service.js +4 -8
- package/src/lib/mock/data.mock.service.d.ts +2 -2
- package/src/lib/mock/data.mock.service.js +6 -5
- package/src/lib/mock/dataspace.mock.service.d.ts +1 -1
- package/src/lib/mock/dataspace.mock.service.js +2 -2
- package/src/lib/mock/endpoint.mock.service.d.ts +4 -4
- package/src/lib/mock/endpoint.mock.service.js +2 -8
- package/src/lib/mock/event.mock.service.d.ts +4 -4
- package/src/lib/mock/event.mock.service.js +2 -8
- package/src/lib/mock/flange-skill-control.mock.service.d.ts +1 -1
- package/src/lib/mock/flange-skill-control.mock.service.js +2 -2
- package/src/lib/mock/flow-deployment.mock.service.d.ts +9 -4
- package/src/lib/mock/flow-deployment.mock.service.js +4 -8
- package/src/lib/mock/flow-functions.mock.service.d.ts +8 -4
- package/src/lib/mock/flow-functions.mock.service.js +4 -8
- package/src/lib/mock/flow-modules.mock.service.d.ts +30 -4
- package/src/lib/mock/flow-modules.mock.service.js +3 -8
- package/src/lib/mock/flow.mock.service.d.ts +8 -4
- package/src/lib/mock/flow.mock.service.js +4 -8
- package/src/lib/mock/label.mock.service.d.ts +1 -1
- package/src/lib/mock/label.mock.service.js +2 -2
- package/src/lib/mock/notification-rules.mock.service.d.ts +4 -4
- package/src/lib/mock/notification-rules.mock.service.js +2 -8
- package/src/lib/mock/notification.mock.service.d.ts +1 -1
- package/src/lib/mock/notification.mock.service.js +2 -2
- package/src/lib/mock/object-reference.mock.service.d.ts +1 -1
- package/src/lib/mock/object-reference.mock.service.js +2 -2
- package/src/lib/mock/organizations-administration.mock.service.d.ts +2 -1
- package/src/lib/mock/organizations-administration.mock.service.js +2 -2
- package/src/lib/mock/organizations-resources.mock.service.d.ts +1 -1
- package/src/lib/mock/organizations-resources.mock.service.js +2 -2
- package/src/lib/mock/organizations.mock.service.d.ts +1 -1
- package/src/lib/mock/organizations.mock.service.js +2 -2
- package/src/lib/mock/search.mock.service.d.ts +1 -1
- package/src/lib/mock/search.mock.service.js +2 -2
- package/src/lib/mock/share.mock.service.d.ts +2 -2
- package/src/lib/mock/share.mock.service.js +4 -4
- package/src/lib/mock/task.mock.service.d.ts +8 -4
- package/src/lib/mock/task.mock.service.js +4 -8
- package/src/lib/mock/timeseries.mock.service.d.ts +22 -8
- package/src/lib/mock/timeseries.mock.service.js +4 -7
- package/src/lib/mock/trash.mock.service.d.ts +2 -2
- package/src/lib/mock/trash.mock.service.js +4 -4
- package/src/lib/mock/user.mock.service.d.ts +1 -1
- package/src/lib/mock/vault.mock.service.d.ts +1 -1
- package/src/lib/mock/vault.mock.service.js +2 -2
- package/src/lib/queue.d.ts +7 -2
- package/src/lib/queue.js +13 -1
- package/src/lib/services/ai.service.d.ts +9 -2
- package/src/lib/services/ai.service.js +21 -0
- package/src/lib/services/alert.service.d.ts +4 -4
- package/src/lib/services/alert.service.js +2 -8
- package/src/lib/services/asset.service.d.ts +9 -5
- package/src/lib/services/asset.service.js +4 -9
- package/src/lib/services/assettypes.service.d.ts +6 -4
- package/src/lib/services/assettypes.service.js +2 -8
- package/src/lib/services/content.service.d.ts +9 -5
- package/src/lib/services/content.service.js +4 -9
- package/src/lib/services/endpoint.service.d.ts +6 -5
- package/src/lib/services/endpoint.service.js +3 -9
- package/src/lib/services/event.service.d.ts +6 -5
- package/src/lib/services/event.service.js +3 -9
- package/src/lib/services/flow-deployment.service.d.ts +9 -5
- package/src/lib/services/flow-deployment.service.js +4 -9
- package/src/lib/services/flow-function.service.d.ts +9 -5
- package/src/lib/services/flow-function.service.js +4 -9
- package/src/lib/services/flow-module.service.d.ts +6 -5
- package/src/lib/services/flow-module.service.js +3 -9
- package/src/lib/services/flow.service.d.ts +9 -5
- package/src/lib/services/flow.service.js +4 -9
- package/src/lib/services/label.service.d.ts +2 -1
- package/src/lib/services/label.service.js +2 -2
- package/src/lib/services/notification-rule.service.d.ts +6 -5
- package/src/lib/services/notification-rule.service.js +3 -9
- package/src/lib/services/notification.service.d.ts +2 -1
- package/src/lib/services/notification.service.js +2 -2
- package/src/lib/services/organizations-administration.service.d.ts +1 -1
- package/src/lib/services/organizations-resources.service.d.ts +1 -1
- package/src/lib/services/organizations.service.d.ts +1 -1
- package/src/lib/services/proxy.service.d.ts +1 -1
- package/src/lib/services/search.service.d.ts +1 -1
- package/src/lib/services/task.service.d.ts +9 -5
- package/src/lib/services/task.service.js +4 -9
- package/src/lib/services/timeseries.service.d.ts +9 -5
- package/src/lib/services/timeseries.service.js +4 -9
- package/src/lib/services/user.service.d.ts +1 -1
- package/src/lib/services/vault.service.d.ts +2 -1
- package/src/lib/services/vault.service.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hahnpro/hpc-api",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.7",
|
|
4
4
|
"description": "Module for easy access to the HahnPRO Cloud API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"@microsoft/fetch-event-source": "2.0.1",
|
|
12
12
|
"axios": "1.18.1",
|
|
13
13
|
"eventsource": "4.1.0",
|
|
14
|
-
"jose": "
|
|
14
|
+
"jose": "6.2.4",
|
|
15
15
|
"jwt-decode": "4.0.0",
|
|
16
|
-
"p-queue": "
|
|
16
|
+
"p-queue": "9.3.3",
|
|
17
17
|
"rxjs": "7.8.2",
|
|
18
18
|
"ts-mixer": "6.0.4",
|
|
19
19
|
"tslib": "2.8.1"
|
package/src/lib/api-base.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Author } from './author.interface';
|
|
2
|
+
import { Owner } from './owner.interface';
|
|
3
|
+
import type { Storage } from './storage.interface';
|
|
2
4
|
export declare enum AssistantMessageStatus {
|
|
3
5
|
ABORTING = "aborting",
|
|
4
6
|
PENDING = "pending",
|
|
@@ -63,6 +65,7 @@ export declare enum AgentId {
|
|
|
63
65
|
ASSET_IDENTIFIER = "asset-identifier-agent",
|
|
64
66
|
ASSET_MULTI_IDENTIFIER = "asset-multi-identifier-agent",
|
|
65
67
|
ASSET_WEB = "asset-web-agent",
|
|
68
|
+
LOGBOOK = "logbook-agent",
|
|
66
69
|
TECHNICAL_PROPOSAL = "technical-proposal-agent",
|
|
67
70
|
DRYER_SELECTION = "dryer-selection-agent",
|
|
68
71
|
RFD_BASIC_CALCULATION = "rfd-basic-calculation-agent",
|
|
@@ -104,12 +107,15 @@ export declare enum ToolName {
|
|
|
104
107
|
USE_DRYER_SELECTION_TOOL = "useDryerSelectionTool",
|
|
105
108
|
USE_RFD_BASIC_CALCULATION_TOOL = "useRfdBasicCalculationTool",
|
|
106
109
|
ADD_TASK_LOGBOOK_ENTRY = "addTaskLogbookEntry",
|
|
107
|
-
WEB_SEARCH = "web_search"
|
|
110
|
+
WEB_SEARCH = "web_search",
|
|
111
|
+
USE_SKILL = "useSkill",
|
|
112
|
+
READ_SKILL_FILE = "readSkillFile"
|
|
108
113
|
}
|
|
109
114
|
export declare enum ReturnToReferrerTool {
|
|
110
115
|
ASSET_IDENTIFIER = "returnToReferrer_asset-identifier-agent",
|
|
111
116
|
ASSET_MULTI_IDENTIFIER = "returnToReferrer_asset-multi-identifier-agent",
|
|
112
117
|
AXALTA_ASSET_IDENTIFIER = "returnToReferrer_axalta-asset-identifier-agent",
|
|
118
|
+
LOGBOOK = "returnToReferrer_logbook-agent",
|
|
113
119
|
DRYER_SELECTION = "returnToReferrer_dryer-selection-agent",
|
|
114
120
|
RFD_BASIC_CALCULATION = "returnToReferrer_rfd-basic-calculation-agent"
|
|
115
121
|
}
|
|
@@ -117,6 +123,7 @@ export declare enum HandOffTool {
|
|
|
117
123
|
ASSET_IDENTIFIER = "handoff_to_asset-identifier-agent",
|
|
118
124
|
ASSET_MULTI_IDENTIFIER = "handoff_to_asset-multi-identifier-agent",
|
|
119
125
|
AXALTA_ASSET_IDENTIFIER = "handoff_to_axalta-asset-identifier-agent",
|
|
126
|
+
LOGBOOK = "handoff_to_logbook-agent",
|
|
120
127
|
DRYER_SELECTION = "handoff_to_dryer-selection-agent",
|
|
121
128
|
RFD_BASIC_CALCULATION = "handoff_to_rfd-basic-calculation-agent",
|
|
122
129
|
DEEP_RESEARCH = "handoff_to_deep-research-agent",
|
|
@@ -141,6 +148,24 @@ export interface AiAssistant {
|
|
|
141
148
|
icon?: string;
|
|
142
149
|
readPermissions?: string[];
|
|
143
150
|
}
|
|
151
|
+
export interface AiSkill {
|
|
152
|
+
id: string;
|
|
153
|
+
name: string;
|
|
154
|
+
description: string;
|
|
155
|
+
instructions: string;
|
|
156
|
+
enabled: boolean;
|
|
157
|
+
license?: string;
|
|
158
|
+
compatibility?: string;
|
|
159
|
+
metadata?: Record<string, string>;
|
|
160
|
+
allowedTools?: string;
|
|
161
|
+
files?: Storage[];
|
|
162
|
+
owner: Owner;
|
|
163
|
+
createdAt?: string;
|
|
164
|
+
createdBy?: Author;
|
|
165
|
+
updatedAt?: string;
|
|
166
|
+
updatedBy?: Author;
|
|
167
|
+
}
|
|
168
|
+
export type AiSkillSummary = Omit<AiSkill, 'instructions'>;
|
|
144
169
|
export interface ResourceSelectionRejected {
|
|
145
170
|
rejected: true;
|
|
146
171
|
message: string;
|
|
@@ -75,6 +75,7 @@ var AgentId;
|
|
|
75
75
|
AgentId["ASSET_IDENTIFIER"] = "asset-identifier-agent";
|
|
76
76
|
AgentId["ASSET_MULTI_IDENTIFIER"] = "asset-multi-identifier-agent";
|
|
77
77
|
AgentId["ASSET_WEB"] = "asset-web-agent";
|
|
78
|
+
AgentId["LOGBOOK"] = "logbook-agent";
|
|
78
79
|
AgentId["TECHNICAL_PROPOSAL"] = "technical-proposal-agent";
|
|
79
80
|
AgentId["DRYER_SELECTION"] = "dryer-selection-agent";
|
|
80
81
|
AgentId["RFD_BASIC_CALCULATION"] = "rfd-basic-calculation-agent";
|
|
@@ -118,12 +119,15 @@ var ToolName;
|
|
|
118
119
|
ToolName["USE_RFD_BASIC_CALCULATION_TOOL"] = "useRfdBasicCalculationTool";
|
|
119
120
|
ToolName["ADD_TASK_LOGBOOK_ENTRY"] = "addTaskLogbookEntry";
|
|
120
121
|
ToolName["WEB_SEARCH"] = "web_search";
|
|
122
|
+
ToolName["USE_SKILL"] = "useSkill";
|
|
123
|
+
ToolName["READ_SKILL_FILE"] = "readSkillFile";
|
|
121
124
|
})(ToolName || (exports.ToolName = ToolName = {}));
|
|
122
125
|
var ReturnToReferrerTool;
|
|
123
126
|
(function (ReturnToReferrerTool) {
|
|
124
127
|
ReturnToReferrerTool["ASSET_IDENTIFIER"] = "returnToReferrer_asset-identifier-agent";
|
|
125
128
|
ReturnToReferrerTool["ASSET_MULTI_IDENTIFIER"] = "returnToReferrer_asset-multi-identifier-agent";
|
|
126
129
|
ReturnToReferrerTool["AXALTA_ASSET_IDENTIFIER"] = "returnToReferrer_axalta-asset-identifier-agent";
|
|
130
|
+
ReturnToReferrerTool["LOGBOOK"] = "returnToReferrer_logbook-agent";
|
|
127
131
|
ReturnToReferrerTool["DRYER_SELECTION"] = "returnToReferrer_dryer-selection-agent";
|
|
128
132
|
ReturnToReferrerTool["RFD_BASIC_CALCULATION"] = "returnToReferrer_rfd-basic-calculation-agent";
|
|
129
133
|
})(ReturnToReferrerTool || (exports.ReturnToReferrerTool = ReturnToReferrerTool = {}));
|
|
@@ -132,6 +136,7 @@ var HandOffTool;
|
|
|
132
136
|
HandOffTool["ASSET_IDENTIFIER"] = "handoff_to_asset-identifier-agent";
|
|
133
137
|
HandOffTool["ASSET_MULTI_IDENTIFIER"] = "handoff_to_asset-multi-identifier-agent";
|
|
134
138
|
HandOffTool["AXALTA_ASSET_IDENTIFIER"] = "handoff_to_axalta-asset-identifier-agent";
|
|
139
|
+
HandOffTool["LOGBOOK"] = "handoff_to_logbook-agent";
|
|
135
140
|
HandOffTool["DRYER_SELECTION"] = "handoff_to_dryer-selection-agent";
|
|
136
141
|
HandOffTool["RFD_BASIC_CALCULATION"] = "handoff_to_rfd-basic-calculation-agent";
|
|
137
142
|
HandOffTool["DEEP_RESEARCH"] = "handoff_to_deep-research-agent";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { Author, Owner, Resource } from '.';
|
|
2
1
|
import type { EventLevelOverride } from './asset.interface';
|
|
2
|
+
import { Author } from './author.interface';
|
|
3
|
+
import { Owner } from './owner.interface';
|
|
4
|
+
import { Resource } from './resource.interface';
|
|
3
5
|
export interface Event extends Resource {
|
|
4
6
|
data?: Record<string, any>;
|
|
5
7
|
assetRef?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AiAssistant, AssetResourceSelectionOption, AssistantMessage, DocumentResourceSelectionOption, ErrorMessage, GenericResourceSelectionOption, LogbookEntryResourceSelectionOption, Message, MessageAttachment, OneShotTaskResult, ResourceSelectionOption, ResourceSelectionRejected, SpeechToken, SystemMessage, Thread, ThreadPopulated, ToolMessage, ToolNameType, UserMessage, } from './ai.interface';
|
|
1
|
+
export type { AiAssistant, AiSkill, AiSkillSummary, AssetResourceSelectionOption, AssistantMessage, DocumentResourceSelectionOption, ErrorMessage, GenericResourceSelectionOption, LogbookEntryResourceSelectionOption, Message, MessageAttachment, OneShotTaskResult, ResourceSelectionOption, ResourceSelectionRejected, SpeechToken, SystemMessage, Thread, ThreadPopulated, ToolMessage, ToolNameType, UserMessage, } from './ai.interface';
|
|
2
2
|
export type { Alert, AlertCondition, TimeSeriesReference, UpdatedField } from './alert.interface';
|
|
3
3
|
export type { Api, Change, ChangeSubject, ObjectIdLike } from './api.interface';
|
|
4
4
|
export type { AddToProperty, Asset, AssetChange, AssetRevision, AssetSubject, AssetTimeSeriesValue, AssetType, AssetTypeRevision, AssetTypeSearchResult, Attachment, EventCause, EventLevelOverride, RemoveFromProperty, Template, } from './asset.interface';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Author
|
|
1
|
+
import { Author } from './author.interface';
|
|
2
|
+
import { Owner } from './owner.interface';
|
|
2
3
|
export declare const LABEL_COLORS: readonly ["blue", "green", "indigo", "pink", "purple", "red", "teal", "yellow"];
|
|
3
4
|
export type LabelColor = (typeof LABEL_COLORS)[number];
|
|
4
5
|
export interface Label {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type { Api
|
|
1
|
+
import type { Api } from './api.interface';
|
|
2
|
+
import type { InvitationRepresentation } from './invitation-representation.interface';
|
|
3
|
+
import type { KeycloakProfile } from './keycloak-profile.interface';
|
|
4
|
+
import type { OrganizationRoleRepresentation } from './organization-role-representation.interface';
|
|
2
5
|
export interface Organization extends Api {
|
|
3
6
|
name: string;
|
|
4
7
|
description?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AiAssistant, Message, OneShotTaskId, OneShotTaskResult, Paginated, SpeechToken, Thread, ThreadPopulated, TokenOption } from '../interfaces';
|
|
1
|
+
import { AiAssistant, AiSkill, AiSkillSummary, Config, Message, OneShotTaskId, OneShotTaskResult, Paginated, SpeechToken, Thread, ThreadPopulated, TokenOption } from '../interfaces';
|
|
3
2
|
import { AiService } from '../services';
|
|
3
|
+
import type { CrossPlatformFormData } from '../utils';
|
|
4
|
+
import { APIBaseMock } from './api-base.mock';
|
|
4
5
|
export declare class AiMockService extends APIBaseMock<never> implements AiService {
|
|
5
6
|
constructor();
|
|
6
7
|
addMessage(message: string, threadId?: string, assistantId?: string): Promise<Message>;
|
|
@@ -9,6 +10,12 @@ export declare class AiMockService extends APIBaseMock<never> implements AiServi
|
|
|
9
10
|
getAssistant(assistantId: string): Promise<AiAssistant>;
|
|
10
11
|
getAssistants(options?: TokenOption): Promise<AiAssistant[]>;
|
|
11
12
|
getSpeechToken(): Promise<SpeechToken>;
|
|
13
|
+
getSkills(_options?: Config): Promise<AiSkillSummary[]>;
|
|
14
|
+
setSkillEnabled(_id: string, _enabled: boolean, _options?: Config): Promise<AiSkill>;
|
|
15
|
+
deleteSkill(_id: string, _options?: Config): Promise<AiSkill>;
|
|
16
|
+
exportSkill(_id: string, _options?: Config): Promise<Blob>;
|
|
17
|
+
importSkill(_form: CrossPlatformFormData, _options?: Config): Promise<AiSkill>;
|
|
18
|
+
replaceSkill(_id: string, _form: CrossPlatformFormData, _options?: Config): Promise<AiSkill>;
|
|
12
19
|
getThreadMessages(threadId: string): Promise<Paginated<Message>>;
|
|
13
20
|
getThread(threadId: string): Promise<ThreadPopulated>;
|
|
14
21
|
getLatestThread(): Promise<ThreadPopulated>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AiMockService = void 0;
|
|
4
|
-
const
|
|
5
|
-
class AiMockService extends
|
|
4
|
+
const api_base_mock_1 = require("./api-base.mock");
|
|
5
|
+
class AiMockService extends api_base_mock_1.APIBaseMock {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
}
|
|
@@ -24,6 +24,24 @@ class AiMockService extends _1.APIBaseMock {
|
|
|
24
24
|
getSpeechToken() {
|
|
25
25
|
throw new Error('Method not implemented.');
|
|
26
26
|
}
|
|
27
|
+
getSkills(_options = {}) {
|
|
28
|
+
return Promise.resolve([]);
|
|
29
|
+
}
|
|
30
|
+
setSkillEnabled(_id, _enabled, _options = {}) {
|
|
31
|
+
throw new Error('Method not implemented.');
|
|
32
|
+
}
|
|
33
|
+
deleteSkill(_id, _options = {}) {
|
|
34
|
+
throw new Error('Method not implemented.');
|
|
35
|
+
}
|
|
36
|
+
exportSkill(_id, _options = {}) {
|
|
37
|
+
throw new Error('Method not implemented.');
|
|
38
|
+
}
|
|
39
|
+
importSkill(_form, _options = {}) {
|
|
40
|
+
throw new Error('Method not implemented.');
|
|
41
|
+
}
|
|
42
|
+
replaceSkill(_id, _form, _options = {}) {
|
|
43
|
+
throw new Error('Method not implemented.');
|
|
44
|
+
}
|
|
27
45
|
getThreadMessages(threadId) {
|
|
28
46
|
throw new Error('Method not implemented.');
|
|
29
47
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { APIBaseMock, DataMockService } from '.';
|
|
2
1
|
import { Alert } from '../interfaces';
|
|
3
2
|
import { AlertService } from '../services';
|
|
3
|
+
import { DataMockService } from './data.mock.service';
|
|
4
4
|
import { ShareMockService } from './share.mock.service';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
declare const BaseService_base: import("ts-mixer/dist/types/types").Class<any[], DataMockService<Alert> & ShareMockService<Alert>, (abstract new (data?: Alert[]) => DataMockService<Alert>) & {
|
|
6
|
+
new (data?: Alert[]): ShareMockService<Alert>;
|
|
7
|
+
}>;
|
|
8
|
+
declare class BaseService extends BaseService_base {
|
|
8
9
|
}
|
|
9
10
|
export declare class AlertMockService extends BaseService implements AlertService {
|
|
10
11
|
constructor(alerts: Alert[]);
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AlertMockService = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const ts_mixer_1 = require("ts-mixer");
|
|
6
|
-
const
|
|
5
|
+
const data_mock_service_1 = require("./data.mock.service");
|
|
7
6
|
const share_mock_service_1 = require("./share.mock.service");
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
BaseService = tslib_1.__decorate([
|
|
11
|
-
(0, ts_mixer_1.mix)(_1.DataMockService, share_mock_service_1.ShareMockService)
|
|
12
|
-
], BaseService);
|
|
13
|
-
/* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */
|
|
7
|
+
class BaseService extends (0, ts_mixer_1.Mixin)((data_mock_service_1.DataMockService), (share_mock_service_1.ShareMockService)) {
|
|
8
|
+
}
|
|
14
9
|
class AlertMockService extends BaseService {
|
|
15
10
|
constructor(alerts) {
|
|
16
11
|
super();
|
|
@@ -1,6 +1,33 @@
|
|
|
1
|
-
import { AiMockService, AlertMockService, AssetMockService, AssetTypesMockService, ContentMockService, CrmMockService, DataspaceMockService, EndpointMockService, EventMockService, FlangeSkillControlMockService, FlowDeploymentMockService, FlowFunctionsMockService, FlowMockService, FlowModulesMockService, HttpClientMockService, LabelMockService, LogbookMockService, NotificationMockService, NotificationRulesMockService, ObjectReferenceMockService, OrganizationsAdministrationMockService, OrganizationsMockService, OrganizationsResourcesMockService, SearchMockService, TaskMockService, TimeseriesMockService, UserMockService, VaultMockService } from '.';
|
|
2
1
|
import { API } from '../api';
|
|
3
2
|
import { Artifact, Asset, AssetRevision, AssetType, Content, Endpoint, Event, FlowDeployment, FlowDiagram, FlowDto, FlowFunctionDto, FlowFunctionRevision, FlowModule, FlowRevision, Label, LogbookEntry, Notification, ObjectReference, Organization, Secret, Task, TimeSeries, TimeSeriesValue, VaultSecret } from '../interfaces';
|
|
3
|
+
import { AiMockService } from './ai.mock.service';
|
|
4
|
+
import { AlertMockService } from './alert.mock.service';
|
|
5
|
+
import { AssetMockService } from './asset.mock.service';
|
|
6
|
+
import { AssetTypesMockService } from './assetTypes.mock.service';
|
|
7
|
+
import { ContentMockService } from './content.mock.service';
|
|
8
|
+
import { CrmMockService } from './crm.mock.service';
|
|
9
|
+
import { DataspaceMockService } from './dataspace.mock.service';
|
|
10
|
+
import { EndpointMockService } from './endpoint.mock.service';
|
|
11
|
+
import { EventMockService } from './event.mock.service';
|
|
12
|
+
import { FlangeSkillControlMockService } from './flange-skill-control.mock.service';
|
|
13
|
+
import { FlowDeploymentMockService } from './flow-deployment.mock.service';
|
|
14
|
+
import { FlowFunctionsMockService } from './flow-functions.mock.service';
|
|
15
|
+
import { FlowModulesMockService } from './flow-modules.mock.service';
|
|
16
|
+
import { FlowMockService } from './flow.mock.service';
|
|
17
|
+
import { HttpClientMockService } from './http-client.mock.service';
|
|
18
|
+
import { LabelMockService } from './label.mock.service';
|
|
19
|
+
import { LogbookMockService } from './logbook.mock.service';
|
|
20
|
+
import { NotificationRulesMockService } from './notification-rules.mock.service';
|
|
21
|
+
import { NotificationMockService } from './notification.mock.service';
|
|
22
|
+
import { ObjectReferenceMockService } from './object-reference.mock.service';
|
|
23
|
+
import { OrganizationsAdministrationMockService } from './organizations-administration.mock.service';
|
|
24
|
+
import { OrganizationsResourcesMockService } from './organizations-resources.mock.service';
|
|
25
|
+
import { OrganizationsMockService } from './organizations.mock.service';
|
|
26
|
+
import { SearchMockService } from './search.mock.service';
|
|
27
|
+
import { TaskMockService } from './task.mock.service';
|
|
28
|
+
import { TimeseriesMockService } from './timeseries.mock.service';
|
|
29
|
+
import { UserMockService } from './user.mock.service';
|
|
30
|
+
import { VaultMockService } from './vault.mock.service';
|
|
4
31
|
export interface MockAPIInitData {
|
|
5
32
|
assets?: AssetInit[];
|
|
6
33
|
assetRevisions?: AssetRevisionInit[];
|
package/src/lib/mock/api.mock.js
CHANGED
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MockAPI = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
4
|
const interfaces_1 = require("../interfaces");
|
|
5
|
+
const ai_mock_service_1 = require("./ai.mock.service");
|
|
6
|
+
const alert_mock_service_1 = require("./alert.mock.service");
|
|
7
|
+
const asset_mock_service_1 = require("./asset.mock.service");
|
|
8
|
+
const assetTypes_mock_service_1 = require("./assetTypes.mock.service");
|
|
9
|
+
const content_mock_service_1 = require("./content.mock.service");
|
|
10
|
+
const crm_mock_service_1 = require("./crm.mock.service");
|
|
11
|
+
const dataspace_mock_service_1 = require("./dataspace.mock.service");
|
|
12
|
+
const endpoint_mock_service_1 = require("./endpoint.mock.service");
|
|
13
|
+
const event_mock_service_1 = require("./event.mock.service");
|
|
14
|
+
const flange_skill_control_mock_service_1 = require("./flange-skill-control.mock.service");
|
|
15
|
+
const flow_deployment_mock_service_1 = require("./flow-deployment.mock.service");
|
|
16
|
+
const flow_functions_mock_service_1 = require("./flow-functions.mock.service");
|
|
17
|
+
const flow_modules_mock_service_1 = require("./flow-modules.mock.service");
|
|
18
|
+
const flow_mock_service_1 = require("./flow.mock.service");
|
|
19
|
+
const http_client_mock_service_1 = require("./http-client.mock.service");
|
|
20
|
+
const label_mock_service_1 = require("./label.mock.service");
|
|
21
|
+
const logbook_mock_service_1 = require("./logbook.mock.service");
|
|
22
|
+
const notification_rules_mock_service_1 = require("./notification-rules.mock.service");
|
|
23
|
+
const notification_mock_service_1 = require("./notification.mock.service");
|
|
24
|
+
const object_reference_mock_service_1 = require("./object-reference.mock.service");
|
|
25
|
+
const organizations_administration_mock_service_1 = require("./organizations-administration.mock.service");
|
|
26
|
+
const organizations_resources_mock_service_1 = require("./organizations-resources.mock.service");
|
|
27
|
+
const organizations_mock_service_1 = require("./organizations.mock.service");
|
|
28
|
+
const search_mock_service_1 = require("./search.mock.service");
|
|
29
|
+
const task_mock_service_1 = require("./task.mock.service");
|
|
30
|
+
const timeseries_mock_service_1 = require("./timeseries.mock.service");
|
|
31
|
+
const user_mock_service_1 = require("./user.mock.service");
|
|
32
|
+
const vault_mock_service_1 = require("./vault.mock.service");
|
|
6
33
|
class MockAPI {
|
|
7
34
|
constructor(initData) {
|
|
8
35
|
this.proxy = null;
|
|
@@ -183,35 +210,35 @@ class MockAPI {
|
|
|
183
210
|
displayData: v.displayData ?? {},
|
|
184
211
|
tgtDeleted: v.tgtDeleted ?? false,
|
|
185
212
|
}));
|
|
186
|
-
this.ai = new
|
|
187
|
-
this.alerts = new
|
|
188
|
-
this.assets = new
|
|
189
|
-
this.assetTypes = new
|
|
190
|
-
this.contents = new
|
|
191
|
-
this.crm = new
|
|
192
|
-
this.dataspace = new
|
|
193
|
-
this.endpoints = new
|
|
194
|
-
this.events = new
|
|
195
|
-
this.flangeSkillControl = new
|
|
196
|
-
this.flows = new
|
|
197
|
-
this.flowDeployments = new
|
|
198
|
-
this.flowFunctions = new
|
|
199
|
-
this.flowModules = new
|
|
200
|
-
this.httpClient = new
|
|
201
|
-
this.labels = new
|
|
202
|
-
this.logbook = new
|
|
203
|
-
this.notificationRules = new
|
|
204
|
-
this.notifications = new
|
|
205
|
-
this.organizations = new
|
|
206
|
-
this.organizationsAdministration = new
|
|
207
|
-
this.organizationsResources = new
|
|
213
|
+
this.ai = new ai_mock_service_1.AiMockService();
|
|
214
|
+
this.alerts = new alert_mock_service_1.AlertMockService([]);
|
|
215
|
+
this.assets = new asset_mock_service_1.AssetMockService(this, assets1, assetRevisions1);
|
|
216
|
+
this.assetTypes = new assetTypes_mock_service_1.AssetTypesMockService(assetTypes, []);
|
|
217
|
+
this.contents = new content_mock_service_1.ContentMockService(contents1, contentData);
|
|
218
|
+
this.crm = new crm_mock_service_1.CrmMockService();
|
|
219
|
+
this.dataspace = new dataspace_mock_service_1.DataspaceMockService();
|
|
220
|
+
this.endpoints = new endpoint_mock_service_1.EndpointMockService(endpoint1);
|
|
221
|
+
this.events = new event_mock_service_1.EventMockService(events1);
|
|
222
|
+
this.flangeSkillControl = new flange_skill_control_mock_service_1.FlangeSkillControlMockService();
|
|
223
|
+
this.flows = new flow_mock_service_1.FlowMockService(flows1, diagrams1, flowRevisions1);
|
|
224
|
+
this.flowDeployments = new flow_deployment_mock_service_1.FlowDeploymentMockService(deployments1, this);
|
|
225
|
+
this.flowFunctions = new flow_functions_mock_service_1.FlowFunctionsMockService(functions1, functionRevisions1);
|
|
226
|
+
this.flowModules = new flow_modules_mock_service_1.FlowModulesMockService(modules1);
|
|
227
|
+
this.httpClient = new http_client_mock_service_1.HttpClientMockService();
|
|
228
|
+
this.labels = new label_mock_service_1.LabelMockService(labels1);
|
|
229
|
+
this.logbook = new logbook_mock_service_1.LogbookMockService(logbookEntries);
|
|
230
|
+
this.notificationRules = new notification_rules_mock_service_1.NotificationRulesMockService([]);
|
|
231
|
+
this.notifications = new notification_mock_service_1.NotificationMockService(notifications1);
|
|
232
|
+
this.organizations = new organizations_mock_service_1.OrganizationsMockService(organizations1);
|
|
233
|
+
this.organizationsAdministration = new organizations_administration_mock_service_1.OrganizationsAdministrationMockService(this.organizations);
|
|
234
|
+
this.organizationsResources = new organizations_resources_mock_service_1.OrganizationsResourcesMockService(resourceSetNames);
|
|
208
235
|
this.proxy = null;
|
|
209
|
-
this.objectReferences = new
|
|
210
|
-
this.search = new
|
|
211
|
-
this.tasks = new
|
|
212
|
-
this.timeSeries = new
|
|
213
|
-
this.users = new
|
|
214
|
-
this.vault = new
|
|
236
|
+
this.objectReferences = new object_reference_mock_service_1.ObjectReferenceMockService(objectReferences1);
|
|
237
|
+
this.search = new search_mock_service_1.SearchMockService();
|
|
238
|
+
this.tasks = new task_mock_service_1.TaskMockService(tasks1);
|
|
239
|
+
this.timeSeries = new timeseries_mock_service_1.TimeseriesMockService(timeSeries1, timeSeriesValues);
|
|
240
|
+
this.users = new user_mock_service_1.UserMockService(users);
|
|
241
|
+
this.vault = new vault_mock_service_1.VaultMockService(vaultSecrets1);
|
|
215
242
|
}
|
|
216
243
|
async getEverything() {
|
|
217
244
|
const results = {
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { APIBaseMock, DataMockService, MockAPI, TrashMockService } from '.';
|
|
2
1
|
import { AddToProperty, Asset, AssetRevision, Attachment, DeleteQuery, EventCause, EventLevelOverride, Filter, Paginated, RemoveFromProperty, RequestParameter, TokenOption, type SearchResult } from '../interfaces';
|
|
3
2
|
import { AssetService } from '../services';
|
|
4
3
|
import { CrossPlatformFormData } from '../utils';
|
|
4
|
+
import type { MockAPI } from './api.mock';
|
|
5
|
+
import { DataMockService } from './data.mock.service';
|
|
5
6
|
import { ShareMockService } from './share.mock.service';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import { TrashMockService } from './trash.mock.service';
|
|
8
|
+
declare const BaseService_base: import("ts-mixer/dist/types/types").Class<any[], DataMockService<Asset> & ShareMockService<Asset> & TrashMockService<Asset>, (abstract new (data?: Asset[]) => DataMockService<Asset>) & {
|
|
9
|
+
new (data?: Asset[]): ShareMockService<Asset>;
|
|
10
|
+
} & {
|
|
11
|
+
new (data?: Asset[]): TrashMockService<Asset>;
|
|
12
|
+
}>;
|
|
13
|
+
declare class BaseService extends BaseService_base {
|
|
9
14
|
}
|
|
10
15
|
export declare class AssetMockService extends BaseService implements AssetService {
|
|
11
16
|
private api;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AssetMockService = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const ts_mixer_1 = require("ts-mixer");
|
|
6
|
-
const
|
|
5
|
+
const data_mock_service_1 = require("./data.mock.service");
|
|
7
6
|
const share_mock_service_1 = require("./share.mock.service");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
(0, ts_mixer_1.mix)(_1.DataMockService, share_mock_service_1.ShareMockService, _1.TrashMockService)
|
|
12
|
-
], BaseService);
|
|
13
|
-
/* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */
|
|
7
|
+
const trash_mock_service_1 = require("./trash.mock.service");
|
|
8
|
+
class BaseService extends (0, ts_mixer_1.Mixin)((data_mock_service_1.DataMockService), (share_mock_service_1.ShareMockService), (trash_mock_service_1.TrashMockService)) {
|
|
9
|
+
}
|
|
14
10
|
class AssetMockService extends BaseService {
|
|
15
11
|
constructor(api, assets, revisions) {
|
|
16
12
|
super(assets);
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { APIBaseMock, DataMockService, TrashMockService } from '.';
|
|
2
1
|
import { AssetType, AssetTypeRevision, DeleteAssetTypeQuery, Paginated, RequestParameter, Template, TokenOption } from '../interfaces';
|
|
3
2
|
import { AssetTypesService } from '../services';
|
|
3
|
+
import { DataMockService } from './data.mock.service';
|
|
4
4
|
import { ShareMockService } from './share.mock.service';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { TrashMockService } from './trash.mock.service';
|
|
6
|
+
declare const BaseService_base: import("ts-mixer/dist/types/types").Class<any[], DataMockService<AssetType> & ShareMockService<AssetType> & TrashMockService<AssetType>, (abstract new (data?: AssetType[]) => DataMockService<AssetType>) & {
|
|
7
|
+
new (data?: AssetType[]): ShareMockService<AssetType>;
|
|
8
|
+
} & {
|
|
9
|
+
new (data?: AssetType[]): TrashMockService<AssetType>;
|
|
10
|
+
}>;
|
|
11
|
+
declare class BaseService extends BaseService_base {
|
|
8
12
|
}
|
|
9
13
|
export declare class AssetTypesMockService extends BaseService implements AssetTypesService {
|
|
10
14
|
private revisions;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AssetTypesMockService = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const ts_mixer_1 = require("ts-mixer");
|
|
6
|
-
const
|
|
5
|
+
const data_mock_service_1 = require("./data.mock.service");
|
|
7
6
|
const share_mock_service_1 = require("./share.mock.service");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
(0, ts_mixer_1.mix)(_1.DataMockService, share_mock_service_1.ShareMockService, _1.TrashMockService)
|
|
12
|
-
], BaseService);
|
|
13
|
-
/* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */
|
|
7
|
+
const trash_mock_service_1 = require("./trash.mock.service");
|
|
8
|
+
class BaseService extends (0, ts_mixer_1.Mixin)((data_mock_service_1.DataMockService), (share_mock_service_1.ShareMockService), (trash_mock_service_1.TrashMockService)) {
|
|
9
|
+
}
|
|
14
10
|
class AssetTypesMockService extends BaseService {
|
|
15
11
|
constructor(assetTypes, revisions) {
|
|
16
12
|
const defaultTyp = {
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { APIBaseMock, DataMockService, TrashMockService } from '.';
|
|
2
1
|
import { Content, DeleteQuery, Paginated, RequestParameter, ReturnType } from '../interfaces';
|
|
3
2
|
import { ContentService } from '../services';
|
|
4
3
|
import { CrossPlatformFormData } from '../utils';
|
|
4
|
+
import { DataMockService } from './data.mock.service';
|
|
5
5
|
import { ShareMockService } from './share.mock.service';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { TrashMockService } from './trash.mock.service';
|
|
7
|
+
declare const BaseService_base: import("ts-mixer/dist/types/types").Class<any[], DataMockService<Content> & ShareMockService<Content> & TrashMockService<Content>, (abstract new (data?: Content[]) => DataMockService<Content>) & {
|
|
8
|
+
new (data?: Content[]): ShareMockService<Content>;
|
|
9
|
+
} & {
|
|
10
|
+
new (data?: Content[]): TrashMockService<Content>;
|
|
11
|
+
}>;
|
|
12
|
+
declare class BaseService extends BaseService_base {
|
|
9
13
|
}
|
|
10
14
|
export declare class ContentMockService extends BaseService implements ContentService {
|
|
11
15
|
private contentData;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ContentMockService = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const ts_mixer_1 = require("ts-mixer");
|
|
6
|
-
const _1 = require(".");
|
|
7
5
|
const interfaces_1 = require("../interfaces");
|
|
6
|
+
const data_mock_service_1 = require("./data.mock.service");
|
|
8
7
|
const share_mock_service_1 = require("./share.mock.service");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
(0, ts_mixer_1.mix)(_1.DataMockService, share_mock_service_1.ShareMockService, _1.TrashMockService)
|
|
13
|
-
], BaseService);
|
|
14
|
-
/* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */
|
|
8
|
+
const trash_mock_service_1 = require("./trash.mock.service");
|
|
9
|
+
class BaseService extends (0, ts_mixer_1.Mixin)((data_mock_service_1.DataMockService), (share_mock_service_1.ShareMockService), (trash_mock_service_1.TrashMockService)) {
|
|
10
|
+
}
|
|
15
11
|
class ContentMockService extends BaseService {
|
|
16
12
|
constructor(contents, contentData) {
|
|
17
13
|
super(contents);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { APIBaseMock } from '.';
|
|
2
1
|
import { DataInterface, Filter, Paginated, RequestParameter } from '../interfaces';
|
|
2
|
+
import { APIBaseMock } from './api-base.mock';
|
|
3
3
|
export declare abstract class DataMockService<T> extends APIBaseMock<T> implements DataInterface<T> {
|
|
4
|
-
constructor();
|
|
4
|
+
constructor(data?: T[]);
|
|
5
5
|
addOne(dto: any): Promise<T>;
|
|
6
6
|
addMany(dto: any[]): Promise<T[]>;
|
|
7
7
|
getOne(id: string, options?: Record<string, any> & {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataMockService = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
4
|
const interfaces_1 = require("../interfaces");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const api_base_mock_1 = require("./api-base.mock");
|
|
6
|
+
const utils_1 = require("./utils");
|
|
7
|
+
class DataMockService extends api_base_mock_1.APIBaseMock {
|
|
8
|
+
constructor(data = []) {
|
|
9
|
+
super(data);
|
|
9
10
|
}
|
|
10
11
|
async addOne(dto) {
|
|
11
12
|
const dtoWithId = { id: globalThis.crypto.randomUUID(), ...dto };
|
|
@@ -24,7 +25,7 @@ class DataMockService extends _1.APIBaseMock {
|
|
|
24
25
|
async getMany(params) {
|
|
25
26
|
const data = this.data;
|
|
26
27
|
if (params?.sort) {
|
|
27
|
-
(0,
|
|
28
|
+
(0, utils_1.sortData)(data, params.sort);
|
|
28
29
|
}
|
|
29
30
|
const page = {
|
|
30
31
|
docs: data,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { APIBaseMock } from '.';
|
|
2
1
|
import { DataspaceAllowedResourceType, DataspaceWorkflowResult, ShareInDataspaceDto, TokenOption } from '../interfaces';
|
|
3
2
|
import { DataspaceService } from '../services';
|
|
3
|
+
import { APIBaseMock } from './api-base.mock';
|
|
4
4
|
export declare class DataspaceMockService extends APIBaseMock<DataspaceWorkflowResult> implements DataspaceService {
|
|
5
5
|
readonly shareInDataspaceCalls: ShareInDataspaceDto[];
|
|
6
6
|
readonly deleteFromDataspaceCalls: ShareInDataspaceDto[];
|