@hahnpro/hpc-api 2026.7.10 → 2026.8.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/CHANGELOG.md +9 -0
- package/package.json +4 -4
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/lib/crm.constants.d.ts +31 -0
- package/src/lib/crm.constants.js +52 -0
- package/src/lib/interfaces/ai.interface.d.ts +10 -14
- package/src/lib/interfaces/ai.interface.js +7 -11
- package/src/lib/interfaces/flange-skill-control.interface.d.ts +22 -1
- package/src/lib/interfaces/flange-skill-control.interface.js +1 -0
- package/src/lib/interfaces/index.d.ts +7 -7
- package/src/lib/interfaces/index.js +3 -2
- package/src/lib/interfaces/type-guards.js +1 -1
- package/src/lib/interfaces/vault.interface.d.ts +1 -0
- package/src/lib/mock/asset.mock.service.d.ts +2 -2
- package/src/lib/mock/event.mock.service.js +6 -1
- package/src/lib/mock/flange-skill-control.mock.service.d.ts +2 -1
- package/src/lib/mock/flange-skill-control.mock.service.js +3 -0
- package/src/lib/mock/timeseries.mock.service.js +13 -1
- package/src/lib/mock/vault.mock.service.d.ts +1 -0
- package/src/lib/mock/vault.mock.service.js +4 -0
- package/src/lib/services/asset.service.d.ts +2 -2
- package/src/lib/services/flange-skill-control.service.d.ts +2 -1
- package/src/lib/services/flange-skill-control.service.js +3 -0
- package/src/lib/services/vault.service.d.ts +1 -0
- package/src/lib/services/vault.service.js +3 -0
- package/src/lib/utils.d.ts +2 -1
- package/src/lib/utils.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @hahnpro/hpc-api
|
|
2
2
|
|
|
3
|
+
# 2026.7.9
|
|
4
|
+
|
|
5
|
+
- Added `AttachmentHandlingMode.DISABLED` to disable attachment handling for individual AI messages
|
|
6
|
+
- Added and exported `ATTACHMENT_CAPABLE_AGENT_IDS` and `agentSupportsAttachments` for centralized agent attachment capabilities
|
|
7
|
+
- Added `LOAD_USER_MESSAGE_ATTACHMENT_REFERENCES`, `LOAD_ATTACHMENT_ANALYSIS`, and `SEARCH_IN_ATTACHMENTS` tool names for on-demand attachment loading
|
|
8
|
+
- Changed `MessageAttachment` to require `id` and replaced the extracted `text` field with `mimetype`
|
|
9
|
+
- Implemented `EventMockService.getLastEventByAssetAndGroups` to return the latest event cause for each requested group
|
|
10
|
+
- Implemented `TimeseriesMockService.getMostRecentTimeSeriesValueByAssetAndTimeSeriesName` to return the latest value for each requested time series
|
|
11
|
+
|
|
3
12
|
# 2026.7.6
|
|
4
13
|
|
|
5
14
|
- Changed the HPC-API `getAttachments`-endpoint for assets to be able to use it with pagination
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hahnpro/hpc-api",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.8.1",
|
|
4
4
|
"description": "Module for easy access to the HahnPRO Cloud API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@microsoft/fetch-event-source": "2.0.1",
|
|
12
|
-
"axios": "1.
|
|
13
|
-
"eventsource": "
|
|
14
|
-
"jose": "6.2.
|
|
12
|
+
"axios": "1.19.0",
|
|
13
|
+
"eventsource": "5.1.0",
|
|
14
|
+
"jose": "6.2.9",
|
|
15
15
|
"jwt-decode": "4.0.0",
|
|
16
16
|
"p-queue": "9.3.3",
|
|
17
17
|
"rxjs": "7.8.2",
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./lib/api"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./lib/constants"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./lib/crm.constants"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./lib/interfaces"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./lib/mock"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./lib/services"), exports);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const CRM_ASSET_TYPES: {
|
|
2
|
+
readonly company: {
|
|
3
|
+
readonly id: "69cd1e34310cf709b7936192";
|
|
4
|
+
readonly name: "com.hahnpro.crm.company";
|
|
5
|
+
};
|
|
6
|
+
readonly contact: {
|
|
7
|
+
readonly id: "69cd1e2945c122feacf773d0";
|
|
8
|
+
readonly name: "com.hahnpro.crm.contact";
|
|
9
|
+
};
|
|
10
|
+
readonly touchpoint: {
|
|
11
|
+
readonly id: "69cd1e14f29d28046e87e2cf";
|
|
12
|
+
readonly name: "com.hahnpro.crm.touchpoint";
|
|
13
|
+
};
|
|
14
|
+
readonly deal: {
|
|
15
|
+
readonly id: "945cd9485677bd5992195316";
|
|
16
|
+
readonly name: "com.hahnpro.crm.deal";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const CRM_ASSET_TYPE_IDS: {
|
|
20
|
+
readonly company: "69cd1e34310cf709b7936192";
|
|
21
|
+
readonly contact: "69cd1e2945c122feacf773d0";
|
|
22
|
+
readonly touchpoint: "69cd1e14f29d28046e87e2cf";
|
|
23
|
+
readonly deal: "945cd9485677bd5992195316";
|
|
24
|
+
};
|
|
25
|
+
export declare const CRM_ASSET_TYPE_NAMES: {
|
|
26
|
+
readonly company: "com.hahnpro.crm.company";
|
|
27
|
+
readonly contact: "com.hahnpro.crm.contact";
|
|
28
|
+
readonly touchpoint: "com.hahnpro.crm.touchpoint";
|
|
29
|
+
readonly deal: "com.hahnpro.crm.deal";
|
|
30
|
+
};
|
|
31
|
+
export declare const PUBLIC_EMAIL_PROVIDERS: readonly ["gmail.com", "googlemail.com", "t-online.de", "yahoo.com", "yahoo.de", "outlook.com", "hotmail.com", "live.com", "web.de", "gmx.de", "gmx.net", "gmx.ch", "freenet.de", "arcor.de", "aol.com", "icloud.com", "me.com"];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PUBLIC_EMAIL_PROVIDERS = exports.CRM_ASSET_TYPE_NAMES = exports.CRM_ASSET_TYPE_IDS = exports.CRM_ASSET_TYPES = void 0;
|
|
4
|
+
exports.CRM_ASSET_TYPES = {
|
|
5
|
+
company: {
|
|
6
|
+
id: '69cd1e34310cf709b7936192',
|
|
7
|
+
name: 'com.hahnpro.crm.company',
|
|
8
|
+
},
|
|
9
|
+
contact: {
|
|
10
|
+
id: '69cd1e2945c122feacf773d0',
|
|
11
|
+
name: 'com.hahnpro.crm.contact',
|
|
12
|
+
},
|
|
13
|
+
touchpoint: {
|
|
14
|
+
id: '69cd1e14f29d28046e87e2cf',
|
|
15
|
+
name: 'com.hahnpro.crm.touchpoint',
|
|
16
|
+
},
|
|
17
|
+
deal: {
|
|
18
|
+
id: '945cd9485677bd5992195316',
|
|
19
|
+
name: 'com.hahnpro.crm.deal',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
exports.CRM_ASSET_TYPE_IDS = {
|
|
23
|
+
company: exports.CRM_ASSET_TYPES.company.id,
|
|
24
|
+
contact: exports.CRM_ASSET_TYPES.contact.id,
|
|
25
|
+
touchpoint: exports.CRM_ASSET_TYPES.touchpoint.id,
|
|
26
|
+
deal: exports.CRM_ASSET_TYPES.deal.id,
|
|
27
|
+
};
|
|
28
|
+
exports.CRM_ASSET_TYPE_NAMES = {
|
|
29
|
+
company: exports.CRM_ASSET_TYPES.company.name,
|
|
30
|
+
contact: exports.CRM_ASSET_TYPES.contact.name,
|
|
31
|
+
touchpoint: exports.CRM_ASSET_TYPES.touchpoint.name,
|
|
32
|
+
deal: exports.CRM_ASSET_TYPES.deal.name,
|
|
33
|
+
};
|
|
34
|
+
exports.PUBLIC_EMAIL_PROVIDERS = [
|
|
35
|
+
'gmail.com',
|
|
36
|
+
'googlemail.com',
|
|
37
|
+
't-online.de',
|
|
38
|
+
'yahoo.com',
|
|
39
|
+
'yahoo.de',
|
|
40
|
+
'outlook.com',
|
|
41
|
+
'hotmail.com',
|
|
42
|
+
'live.com',
|
|
43
|
+
'web.de',
|
|
44
|
+
'gmx.de',
|
|
45
|
+
'gmx.net',
|
|
46
|
+
'gmx.ch',
|
|
47
|
+
'freenet.de',
|
|
48
|
+
'arcor.de',
|
|
49
|
+
'aol.com',
|
|
50
|
+
'icloud.com',
|
|
51
|
+
'me.com',
|
|
52
|
+
];
|
|
@@ -48,6 +48,7 @@ export declare enum ToolType {
|
|
|
48
48
|
BUILT_IN_ACTION = "built_in-action"
|
|
49
49
|
}
|
|
50
50
|
export declare enum AttachmentHandlingMode {
|
|
51
|
+
DISABLED = "disabled",
|
|
51
52
|
USE_ANALYSIS_IN_CHAT = "useAnalysisInChat",
|
|
52
53
|
DONT_USE_ANALYSIS_IN_CHAT = "dontUseAnalysisInChat"
|
|
53
54
|
}
|
|
@@ -66,9 +67,6 @@ export declare enum AgentId {
|
|
|
66
67
|
ASSET_MULTI_IDENTIFIER = "asset-multi-identifier-agent",
|
|
67
68
|
ASSET_WEB = "asset-web-agent",
|
|
68
69
|
LOGBOOK = "logbook-agent",
|
|
69
|
-
TECHNICAL_PROPOSAL = "technical-proposal-agent",
|
|
70
|
-
DRYER_SELECTION = "dryer-selection-agent",
|
|
71
|
-
RFD_BASIC_CALCULATION = "rfd-basic-calculation-agent",
|
|
72
70
|
MESSAGE = "message-agent",
|
|
73
71
|
STATUS = "status-agent",
|
|
74
72
|
REPORT = "report-agent",
|
|
@@ -79,6 +77,7 @@ export declare enum AgentId {
|
|
|
79
77
|
AXALTA_MESSAGE = "axalta-message-agent",
|
|
80
78
|
TRIAGE = "triage-agent"
|
|
81
79
|
}
|
|
80
|
+
export declare const ATTACHMENT_CAPABLE_AGENT_IDS: AgentId[];
|
|
82
81
|
export declare enum ToolName {
|
|
83
82
|
SWITCH_ASSISTANT = "switchAssistant",
|
|
84
83
|
FIND_TASKS_BY_ASSET = "findTasksByAsset",
|
|
@@ -104,28 +103,26 @@ export declare enum ToolName {
|
|
|
104
103
|
UPDATE_TASK_LOGBOOK_ENTRY = "updateTaskLogbookEntry",
|
|
105
104
|
SEARCH_FOR_DOCUMENTS = "searchForDocuments",
|
|
106
105
|
SEARCH_FOR_DOCUMENTS_BY_LABEL = "searchForDocumentsByLabel",
|
|
107
|
-
USE_DRYER_SELECTION_TOOL = "useDryerSelectionTool",
|
|
108
|
-
USE_RFD_BASIC_CALCULATION_TOOL = "useRfdBasicCalculationTool",
|
|
109
106
|
ADD_TASK_LOGBOOK_ENTRY = "addTaskLogbookEntry",
|
|
107
|
+
LOAD_USER_MESSAGE_ATTACHMENT_REFERENCES = "loadUserMessageAttachmentReferences",
|
|
108
|
+
SEARCH_IN_ATTACHMENTS = "searchInAttachments",
|
|
109
|
+
LOAD_ATTACHMENT_ANALYSIS = "loadAttachmentAnalysis",
|
|
110
110
|
WEB_SEARCH = "web_search",
|
|
111
111
|
USE_SKILL = "useSkill",
|
|
112
|
-
READ_SKILL_FILE = "readSkillFile"
|
|
112
|
+
READ_SKILL_FILE = "readSkillFile",
|
|
113
|
+
RUN_SKILL_SCRIPT = "runSkillScript"
|
|
113
114
|
}
|
|
114
115
|
export declare enum ReturnToReferrerTool {
|
|
115
116
|
ASSET_IDENTIFIER = "returnToReferrer_asset-identifier-agent",
|
|
116
117
|
ASSET_MULTI_IDENTIFIER = "returnToReferrer_asset-multi-identifier-agent",
|
|
117
118
|
AXALTA_ASSET_IDENTIFIER = "returnToReferrer_axalta-asset-identifier-agent",
|
|
118
|
-
LOGBOOK = "returnToReferrer_logbook-agent"
|
|
119
|
-
DRYER_SELECTION = "returnToReferrer_dryer-selection-agent",
|
|
120
|
-
RFD_BASIC_CALCULATION = "returnToReferrer_rfd-basic-calculation-agent"
|
|
119
|
+
LOGBOOK = "returnToReferrer_logbook-agent"
|
|
121
120
|
}
|
|
122
121
|
export declare enum HandOffTool {
|
|
123
122
|
ASSET_IDENTIFIER = "handoff_to_asset-identifier-agent",
|
|
124
123
|
ASSET_MULTI_IDENTIFIER = "handoff_to_asset-multi-identifier-agent",
|
|
125
124
|
AXALTA_ASSET_IDENTIFIER = "handoff_to_axalta-asset-identifier-agent",
|
|
126
125
|
LOGBOOK = "handoff_to_logbook-agent",
|
|
127
|
-
DRYER_SELECTION = "handoff_to_dryer-selection-agent",
|
|
128
|
-
RFD_BASIC_CALCULATION = "handoff_to_rfd-basic-calculation-agent",
|
|
129
126
|
DEEP_RESEARCH = "handoff_to_deep-research-agent",
|
|
130
127
|
RESEARCH_GOAL_CLARIFIER = "handoff_to_research-goal-clarifier-agent",
|
|
131
128
|
RESEARCH_INSTRUCTION_BUILDER = "handoff_to_research-instruction-builder-agent",
|
|
@@ -134,7 +131,6 @@ export declare enum HandOffTool {
|
|
|
134
131
|
export declare enum AiAssistantId {
|
|
135
132
|
ASSET = "asset-assistant",
|
|
136
133
|
ASSET_WEB = "asset-web-assistant",
|
|
137
|
-
TECHNICAL_PROPOSAL = "technical-proposal-assistant",
|
|
138
134
|
INCIDENT = "incident-assistant",
|
|
139
135
|
REPORT = "report-assistant",
|
|
140
136
|
AXALTA_INCIDENT = "axalta-incident-assistant"
|
|
@@ -171,9 +167,9 @@ export interface ResourceSelectionRejected {
|
|
|
171
167
|
message: string;
|
|
172
168
|
}
|
|
173
169
|
export interface MessageAttachment {
|
|
174
|
-
id
|
|
170
|
+
id: string;
|
|
175
171
|
filename: string;
|
|
176
|
-
|
|
172
|
+
mimetype: string;
|
|
177
173
|
}
|
|
178
174
|
interface AssistantLabels {
|
|
179
175
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OneShotTaskId = exports.AiAssistantId = exports.HandOffTool = exports.ReturnToReferrerTool = exports.ToolName = exports.AgentId = exports.ReferenceType = exports.AttachmentHandlingMode = exports.ToolType = exports.ErrorMessageType = exports.Role = exports.AvailableLanguages = exports.FinishReason = exports.ToolMessageStatus = exports.AssistantMessageStatus = void 0;
|
|
3
|
+
exports.OneShotTaskId = exports.AiAssistantId = exports.HandOffTool = exports.ReturnToReferrerTool = exports.ToolName = exports.ATTACHMENT_CAPABLE_AGENT_IDS = exports.AgentId = exports.ReferenceType = exports.AttachmentHandlingMode = exports.ToolType = exports.ErrorMessageType = exports.Role = exports.AvailableLanguages = exports.FinishReason = exports.ToolMessageStatus = exports.AssistantMessageStatus = void 0;
|
|
4
4
|
var AssistantMessageStatus;
|
|
5
5
|
(function (AssistantMessageStatus) {
|
|
6
6
|
AssistantMessageStatus["ABORTING"] = "aborting";
|
|
@@ -56,6 +56,7 @@ var ToolType;
|
|
|
56
56
|
})(ToolType || (exports.ToolType = ToolType = {}));
|
|
57
57
|
var AttachmentHandlingMode;
|
|
58
58
|
(function (AttachmentHandlingMode) {
|
|
59
|
+
AttachmentHandlingMode["DISABLED"] = "disabled";
|
|
59
60
|
AttachmentHandlingMode["USE_ANALYSIS_IN_CHAT"] = "useAnalysisInChat";
|
|
60
61
|
AttachmentHandlingMode["DONT_USE_ANALYSIS_IN_CHAT"] = "dontUseAnalysisInChat";
|
|
61
62
|
})(AttachmentHandlingMode || (exports.AttachmentHandlingMode = AttachmentHandlingMode = {}));
|
|
@@ -76,9 +77,6 @@ var AgentId;
|
|
|
76
77
|
AgentId["ASSET_MULTI_IDENTIFIER"] = "asset-multi-identifier-agent";
|
|
77
78
|
AgentId["ASSET_WEB"] = "asset-web-agent";
|
|
78
79
|
AgentId["LOGBOOK"] = "logbook-agent";
|
|
79
|
-
AgentId["TECHNICAL_PROPOSAL"] = "technical-proposal-agent";
|
|
80
|
-
AgentId["DRYER_SELECTION"] = "dryer-selection-agent";
|
|
81
|
-
AgentId["RFD_BASIC_CALCULATION"] = "rfd-basic-calculation-agent";
|
|
82
80
|
AgentId["MESSAGE"] = "message-agent";
|
|
83
81
|
AgentId["STATUS"] = "status-agent";
|
|
84
82
|
AgentId["REPORT"] = "report-agent";
|
|
@@ -89,6 +87,7 @@ var AgentId;
|
|
|
89
87
|
AgentId["AXALTA_MESSAGE"] = "axalta-message-agent";
|
|
90
88
|
AgentId["TRIAGE"] = "triage-agent";
|
|
91
89
|
})(AgentId || (exports.AgentId = AgentId = {}));
|
|
90
|
+
exports.ATTACHMENT_CAPABLE_AGENT_IDS = [AgentId.ASSET, AgentId.ASSET_WEB, AgentId.REPORT, AgentId.MESSAGE];
|
|
92
91
|
var ToolName;
|
|
93
92
|
(function (ToolName) {
|
|
94
93
|
ToolName["SWITCH_ASSISTANT"] = "switchAssistant";
|
|
@@ -115,12 +114,14 @@ var ToolName;
|
|
|
115
114
|
ToolName["UPDATE_TASK_LOGBOOK_ENTRY"] = "updateTaskLogbookEntry";
|
|
116
115
|
ToolName["SEARCH_FOR_DOCUMENTS"] = "searchForDocuments";
|
|
117
116
|
ToolName["SEARCH_FOR_DOCUMENTS_BY_LABEL"] = "searchForDocumentsByLabel";
|
|
118
|
-
ToolName["USE_DRYER_SELECTION_TOOL"] = "useDryerSelectionTool";
|
|
119
|
-
ToolName["USE_RFD_BASIC_CALCULATION_TOOL"] = "useRfdBasicCalculationTool";
|
|
120
117
|
ToolName["ADD_TASK_LOGBOOK_ENTRY"] = "addTaskLogbookEntry";
|
|
118
|
+
ToolName["LOAD_USER_MESSAGE_ATTACHMENT_REFERENCES"] = "loadUserMessageAttachmentReferences";
|
|
119
|
+
ToolName["SEARCH_IN_ATTACHMENTS"] = "searchInAttachments";
|
|
120
|
+
ToolName["LOAD_ATTACHMENT_ANALYSIS"] = "loadAttachmentAnalysis";
|
|
121
121
|
ToolName["WEB_SEARCH"] = "web_search";
|
|
122
122
|
ToolName["USE_SKILL"] = "useSkill";
|
|
123
123
|
ToolName["READ_SKILL_FILE"] = "readSkillFile";
|
|
124
|
+
ToolName["RUN_SKILL_SCRIPT"] = "runSkillScript";
|
|
124
125
|
})(ToolName || (exports.ToolName = ToolName = {}));
|
|
125
126
|
var ReturnToReferrerTool;
|
|
126
127
|
(function (ReturnToReferrerTool) {
|
|
@@ -128,8 +129,6 @@ var ReturnToReferrerTool;
|
|
|
128
129
|
ReturnToReferrerTool["ASSET_MULTI_IDENTIFIER"] = "returnToReferrer_asset-multi-identifier-agent";
|
|
129
130
|
ReturnToReferrerTool["AXALTA_ASSET_IDENTIFIER"] = "returnToReferrer_axalta-asset-identifier-agent";
|
|
130
131
|
ReturnToReferrerTool["LOGBOOK"] = "returnToReferrer_logbook-agent";
|
|
131
|
-
ReturnToReferrerTool["DRYER_SELECTION"] = "returnToReferrer_dryer-selection-agent";
|
|
132
|
-
ReturnToReferrerTool["RFD_BASIC_CALCULATION"] = "returnToReferrer_rfd-basic-calculation-agent";
|
|
133
132
|
})(ReturnToReferrerTool || (exports.ReturnToReferrerTool = ReturnToReferrerTool = {}));
|
|
134
133
|
var HandOffTool;
|
|
135
134
|
(function (HandOffTool) {
|
|
@@ -137,8 +136,6 @@ var HandOffTool;
|
|
|
137
136
|
HandOffTool["ASSET_MULTI_IDENTIFIER"] = "handoff_to_asset-multi-identifier-agent";
|
|
138
137
|
HandOffTool["AXALTA_ASSET_IDENTIFIER"] = "handoff_to_axalta-asset-identifier-agent";
|
|
139
138
|
HandOffTool["LOGBOOK"] = "handoff_to_logbook-agent";
|
|
140
|
-
HandOffTool["DRYER_SELECTION"] = "handoff_to_dryer-selection-agent";
|
|
141
|
-
HandOffTool["RFD_BASIC_CALCULATION"] = "handoff_to_rfd-basic-calculation-agent";
|
|
142
139
|
HandOffTool["DEEP_RESEARCH"] = "handoff_to_deep-research-agent";
|
|
143
140
|
HandOffTool["RESEARCH_GOAL_CLARIFIER"] = "handoff_to_research-goal-clarifier-agent";
|
|
144
141
|
HandOffTool["RESEARCH_INSTRUCTION_BUILDER"] = "handoff_to_research-instruction-builder-agent";
|
|
@@ -148,7 +145,6 @@ var AiAssistantId;
|
|
|
148
145
|
(function (AiAssistantId) {
|
|
149
146
|
AiAssistantId["ASSET"] = "asset-assistant";
|
|
150
147
|
AiAssistantId["ASSET_WEB"] = "asset-web-assistant";
|
|
151
|
-
AiAssistantId["TECHNICAL_PROPOSAL"] = "technical-proposal-assistant";
|
|
152
148
|
AiAssistantId["INCIDENT"] = "incident-assistant";
|
|
153
149
|
AiAssistantId["REPORT"] = "report-assistant";
|
|
154
150
|
AiAssistantId["AXALTA_INCIDENT"] = "axalta-incident-assistant";
|
|
@@ -6,7 +6,8 @@ export declare enum APPLICATION_AREA {
|
|
|
6
6
|
export declare enum TimeSlotStatus {
|
|
7
7
|
IN_CONFIGURATION = "in_configuration",
|
|
8
8
|
DIAL_IN_STARTED = "dial_in_started",
|
|
9
|
-
STARTED_FOR_EXAMINATION = "started_for_examination"
|
|
9
|
+
STARTED_FOR_EXAMINATION = "started_for_examination",
|
|
10
|
+
FINISHED = "finished"
|
|
10
11
|
}
|
|
11
12
|
export interface WorkStation {
|
|
12
13
|
/**
|
|
@@ -52,6 +53,22 @@ export interface ReviewScore {
|
|
|
52
53
|
max_inclusive: number;
|
|
53
54
|
description: string;
|
|
54
55
|
}
|
|
56
|
+
export interface SendExaminationResultsOfStartedTimeSlotViaEmail {
|
|
57
|
+
emails: string[];
|
|
58
|
+
startedExaminationTimeSlotId: string;
|
|
59
|
+
emailSubject: string;
|
|
60
|
+
emailBody: string;
|
|
61
|
+
}
|
|
62
|
+
export type SendExaminationResultsOfStartedTimeSlotViaEmailSkippedReason = 'no_examination_results' | 'no_pdf_attachments';
|
|
63
|
+
export interface SendExaminationResultsOfStartedTimeSlotViaEmailResult {
|
|
64
|
+
sent: boolean;
|
|
65
|
+
skippedReason?: SendExaminationResultsOfStartedTimeSlotViaEmailSkippedReason;
|
|
66
|
+
}
|
|
67
|
+
export interface ExaminationEmailConfig {
|
|
68
|
+
emails: string[];
|
|
69
|
+
subject: string;
|
|
70
|
+
body: string;
|
|
71
|
+
}
|
|
55
72
|
export interface Examination {
|
|
56
73
|
/**
|
|
57
74
|
* The Asset ids of the Stahl-Wille-Wrenches that are part of this examination.
|
|
@@ -78,4 +95,8 @@ export interface Examination {
|
|
|
78
95
|
* The review scores for this examination. The review scores are used to determine the final score of an examinee based on the points they achieved in the examination.
|
|
79
96
|
*/
|
|
80
97
|
review_scores: ReviewScore[];
|
|
98
|
+
/**
|
|
99
|
+
* E-mail defaults used when sending examination result attachments.
|
|
100
|
+
*/
|
|
101
|
+
email_config?: ExaminationEmailConfig;
|
|
81
102
|
}
|
|
@@ -12,4 +12,5 @@ var TimeSlotStatus;
|
|
|
12
12
|
TimeSlotStatus["IN_CONFIGURATION"] = "in_configuration";
|
|
13
13
|
TimeSlotStatus["DIAL_IN_STARTED"] = "dial_in_started";
|
|
14
14
|
TimeSlotStatus["STARTED_FOR_EXAMINATION"] = "started_for_examination";
|
|
15
|
+
TimeSlotStatus["FINISHED"] = "finished";
|
|
15
16
|
})(TimeSlotStatus || (exports.TimeSlotStatus = TimeSlotStatus = {}));
|
|
@@ -6,14 +6,14 @@ export type { Audit } from './audit.interface';
|
|
|
6
6
|
export type { Author } from './author.interface';
|
|
7
7
|
export type { AzureBillingEvent, AzureBillingResult, Billing, BillingEvent, BillingResource, BillingSubscription, BillingValues, OnceBilledResources, RegularlyBilledResources, } from './billing.interface';
|
|
8
8
|
export type { Content, ContentAnalysis, ContentChange, ContentSearchResult, IndexingStatusData, ReindexStatusSsePayload, } from './content.interface';
|
|
9
|
-
export type { CrmContactMergeOverrides, CrmDuplicateEntityType, CrmDuplicateGroup, CrmDuplicateGroupStatus, CrmDuplicateMember, CrmDuplicateReasonCode, CrmEmailMerge, CrmGetContactDuplicatesResponse, CrmGetDuplicatesQuery, CrmGetDuplicatesResponse,
|
|
9
|
+
export type { CompanyCandidate, ContactCandidate, CrmContactMergeOverrides, CrmDuplicateEntityType, CrmDuplicateGroup, CrmDuplicateGroupStatus, CrmDuplicateMember, CrmDuplicateReasonCode, CrmEmailMerge, CrmGetContactDuplicatesResponse, CrmGetDuplicatesQuery, CrmGetDuplicatesResponse, CrmImportContactDuplicateDetails, CrmImportContactDuplicateMemberDetails, CrmImportDuplicateDecision, CrmImportDuplicateEntityType, CrmImportDuplicateGroup, CrmImportDuplicateMember, CrmImportDuplicateReasonCode, CrmImportJsonRequest, CrmImportParser, CrmImportResponse, CrmMergeContactDuplicatesRequest, CrmMergeContactDuplicatesResponse, ImportResult, ImportResultStats, MatchResult, MeetingReport, ReportActivity, ReportParticipant, ReportSummary, TouchpointCandidate, } from './crm.interface';
|
|
10
10
|
export type { DataInterface, Filter, Paginated, RequestParameter } from './data.interface';
|
|
11
|
-
export type { DataspaceAllowedResourceType,
|
|
11
|
+
export type { DataspaceAllowedResourceType, DataspaceWorkflowResult, DataspaceWorkflowStatus, ShareInDataspaceDto, } from './dataspace.interface';
|
|
12
12
|
export type { EdgeDeviceRequestResponse, EdgeDeviceResult, WebIOData } from './edge-device.interface';
|
|
13
13
|
export type { AdditionalNotificationData, Endpoint, EndpointConfig, EndpointLog, NotificationEndpoint, NotificationEndpointLog, NotificationLogType, NotificationPayload, SearchEndpointResult, } from './endpoint.interface';
|
|
14
14
|
export type { CreateEventDto, Event, EventCountByAsset } from './event.interface';
|
|
15
|
-
export type { BookedExaminee, Examination, ReviewScore, TimeSlot, WorkStation } from './flange-skill-control.interface';
|
|
16
|
-
export type { FlowConnection, FlowDeploymentMetrics, FlowDeploymentStatistic, FlowElement, FlowLog, FlowModel,
|
|
15
|
+
export type { BookedExaminee, Examination, ExaminationEmailConfig, ReviewScore, SendExaminationResultsOfStartedTimeSlotViaEmail, SendExaminationResultsOfStartedTimeSlotViaEmailResult, SendExaminationResultsOfStartedTimeSlotViaEmailSkippedReason, TimeSlot, WorkStation, } from './flange-skill-control.interface';
|
|
16
|
+
export type { FlowConnection, FlowDeploymentMetrics, FlowDeploymentStatistic, FlowElement, FlowLog, FlowModel, Metrics, NatsFlowTriggerData, NatsFlowTriggerState, NatsFlowTriggerStatus, Stats, StatsValues, } from './flow-deployment.interface';
|
|
17
17
|
export type { BillingEventsData, DeploymentId, DeploymentTriggerResponse, Executor, ExecutorEnvironment, ExecutorEventType, ExecutorId, ExecutorStats, WorkerId, } from './flow-executor.interface';
|
|
18
18
|
export type { DataDescription, FlowFunction, FlowFunctionDto, FlowFunctionRevision, SearchFlowTypeResult, Stream, } from './flow-function.interface';
|
|
19
19
|
export type { FlowModule, FlowModuleArtifact } from './flow-module.interface';
|
|
@@ -22,6 +22,8 @@ export type { Config, Issuer, TokenOption } from './http.interface';
|
|
|
22
22
|
export type { InvitationRepresentation } from './invitation-representation.interface';
|
|
23
23
|
export type { KeycloakProfile } from './keycloak-profile.interface';
|
|
24
24
|
export type { CreateLabelDto, Label, LabelColor, UpdateLabelDto } from './label.interface';
|
|
25
|
+
export { LogbookEntrySource } from './logbook.interface';
|
|
26
|
+
export type { LogbookEntry, LogbookEntryDto } from './logbook.interface';
|
|
25
27
|
export type { MeteredQuantity, MeteringDimension, Plan, PlanComponents, RecurrentBillingTerm, SourceOffer, Subscription, SubscriptionInfo, Term, } from './marketplace.interface';
|
|
26
28
|
export type { NotificationRule, StatusRule, TagRule } from './notification-rule.interface';
|
|
27
29
|
export type { Notification, NotificationType } from './notification.interface';
|
|
@@ -38,14 +40,12 @@ export type { SearchMatchReason, SearchMatchReasonContentPart, SearchOptions, Se
|
|
|
38
40
|
export type { Secret } from './secret.interface';
|
|
39
41
|
export type { ServerSentEvent } from './sse.interface';
|
|
40
42
|
export type { Artifact, FileType, Storage, StorageProvider } from './storage.interface';
|
|
41
|
-
export { LogbookEntrySource } from './logbook.interface';
|
|
42
|
-
export type { LogbookEntry, LogbookEntryDto } from './logbook.interface';
|
|
43
43
|
export type { Assignee, Task } from './task.interface';
|
|
44
44
|
export type { Retention, SearchTimeSeriesResult, SelectedField, TimeSeries, TimeSeriesBucket, TimeseriesChange, TimeSeriesCondition, TimeseriesSubject, TimeSeriesValue, TS_GROUPS, } from './timeseries.interface';
|
|
45
45
|
export type { Translation, TranslationData } from './translation.interface';
|
|
46
46
|
export type { Application, Consent, Permission, TableSetting, TableSettingProfile, UserSettings } from './user-settings.interface';
|
|
47
47
|
export type { KVSecretVersion, VaultSecret } from './vault.interface';
|
|
48
|
-
export { AgentId, AiAssistantId, AssistantMessageStatus, AttachmentHandlingMode, AvailableLanguages, ErrorMessageType, FinishReason, HandOffTool, OneShotTaskId, ReferenceType, ReturnToReferrerTool, Role, ToolMessageStatus, ToolName, ToolType, } from './ai.interface';
|
|
48
|
+
export { AgentId, AiAssistantId, AssistantMessageStatus, ATTACHMENT_CAPABLE_AGENT_IDS, AttachmentHandlingMode, AvailableLanguages, ErrorMessageType, FinishReason, HandOffTool, OneShotTaskId, ReferenceType, ReturnToReferrerTool, Role, ToolMessageStatus, ToolName, ToolType, } from './ai.interface';
|
|
49
49
|
export { AlertLevel, AlertStatus, AlertType, DEFAULT_DEADMAN_CONDITION, DEFAULT_RELATIVE_CONDITION, DEFAULT_THRESHOLD_CONDITION, } from './alert.interface';
|
|
50
50
|
export { ChangeAction } from './api.interface';
|
|
51
51
|
export { BillingResourceType } from './billing.interface';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.WebSocketMessageType = exports.SecretType = exports.isUserMessage = exports.isTask = exports.isStorage = exports.isOwner = exports.isLogbookEntry = exports.isEvent = exports.isContentAnalysis = exports.isContent = exports.isAuthor = exports.isAssignee = exports.isAsset = exports.TranslationEditData = exports.RETENTION_VALUES = exports.TaskStatus = exports.Priority = exports.INACTIVE_TASK_STATUSES = exports.buildTaskStatusFilter = exports.AssigneeType = exports.ACTIVE_TASK_STATUSES = exports.ResourceType = exports.resourceApiPathToTypeMap = exports.ResourceApiPath = exports.PermissionType = exports.isPopulated = exports.EventType = exports.CommandType = exports.arePopulated = exports.ObjectReferenceType = exports.OwnerType = exports.OrganizationMembersInviteOrAdd = exports.NotificationRuleStatus = exports.NatsStreams = exports.natsHpcPrefix = exports.natsFlowsPrefix = exports.NatsConsumers = void 0;
|
|
3
|
+
exports.LABEL_COLORS = exports.FlowDiagram = exports.Flow = exports.NATS_FLOW_TRIGGER_STATUSES = exports.FlowDeployment = exports.UNKOWN_STATES = exports.STOPPED_STATES = exports.RUNNING_STATES = exports.PROCESSING_STATES = exports.FlowDeploymentStatus = exports.ERROR_STATES = exports.TimeSlotStatus = exports.APPLICATION_AREA = exports.eventLevels = exports.EventLevelOverrideWrapper = exports.EventLevel = exports.NotificationEndpointType = exports.NotificationEndpointStatus = exports.NotificationEndpointSpamProtection = exports.DataspaceWorkflowType = exports.DataspaceAllowedResourceTypes = exports.instanceOfTimePeriod = exports.ReturnType = exports.IndexingStatus = exports.ContentAnalysisStatus = exports.BillingResourceType = exports.ChangeAction = exports.DEFAULT_THRESHOLD_CONDITION = exports.DEFAULT_RELATIVE_CONDITION = exports.DEFAULT_DEADMAN_CONDITION = exports.AlertType = exports.AlertStatus = exports.AlertLevel = exports.ToolType = exports.ToolName = exports.ToolMessageStatus = exports.Role = exports.ReturnToReferrerTool = exports.ReferenceType = exports.OneShotTaskId = exports.HandOffTool = exports.FinishReason = exports.ErrorMessageType = exports.AvailableLanguages = exports.AttachmentHandlingMode = exports.ATTACHMENT_CAPABLE_AGENT_IDS = exports.AssistantMessageStatus = exports.AiAssistantId = exports.AgentId = exports.LogbookEntrySource = void 0;
|
|
4
|
+
exports.WebSocketMessageType = exports.SecretType = exports.isUserMessage = exports.isTask = exports.isStorage = exports.isOwner = exports.isLogbookEntry = exports.isEvent = exports.isContentAnalysis = exports.isContent = exports.isAuthor = exports.isAssignee = exports.isAsset = exports.TranslationEditData = exports.RETENTION_VALUES = exports.TaskStatus = exports.Priority = exports.INACTIVE_TASK_STATUSES = exports.buildTaskStatusFilter = exports.AssigneeType = exports.ACTIVE_TASK_STATUSES = exports.ResourceType = exports.resourceApiPathToTypeMap = exports.ResourceApiPath = exports.PermissionType = exports.isPopulated = exports.EventType = exports.CommandType = exports.arePopulated = exports.ObjectReferenceType = exports.OwnerType = exports.OrganizationMembersInviteOrAdd = exports.NotificationRuleStatus = exports.NatsStreams = exports.natsHpcPrefix = exports.natsFlowsPrefix = exports.NatsConsumers = exports.SubscriptionType = void 0;
|
|
5
5
|
var logbook_interface_1 = require("./logbook.interface");
|
|
6
6
|
Object.defineProperty(exports, "LogbookEntrySource", { enumerable: true, get: function () { return logbook_interface_1.LogbookEntrySource; } });
|
|
7
7
|
var ai_interface_1 = require("./ai.interface");
|
|
8
8
|
Object.defineProperty(exports, "AgentId", { enumerable: true, get: function () { return ai_interface_1.AgentId; } });
|
|
9
9
|
Object.defineProperty(exports, "AiAssistantId", { enumerable: true, get: function () { return ai_interface_1.AiAssistantId; } });
|
|
10
10
|
Object.defineProperty(exports, "AssistantMessageStatus", { enumerable: true, get: function () { return ai_interface_1.AssistantMessageStatus; } });
|
|
11
|
+
Object.defineProperty(exports, "ATTACHMENT_CAPABLE_AGENT_IDS", { enumerable: true, get: function () { return ai_interface_1.ATTACHMENT_CAPABLE_AGENT_IDS; } });
|
|
11
12
|
Object.defineProperty(exports, "AttachmentHandlingMode", { enumerable: true, get: function () { return ai_interface_1.AttachmentHandlingMode; } });
|
|
12
13
|
Object.defineProperty(exports, "AvailableLanguages", { enumerable: true, get: function () { return ai_interface_1.AvailableLanguages; } });
|
|
13
14
|
Object.defineProperty(exports, "ErrorMessageType", { enumerable: true, get: function () { return ai_interface_1.ErrorMessageType; } });
|
|
@@ -36,7 +36,7 @@ const isStringArray = (value) => isArrayOf(value, isString);
|
|
|
36
36
|
const isOptionalStringArray = (value) => isOptionalArrayOf(value, isString);
|
|
37
37
|
const isOptionalUnknownArray = (value) => value === undefined || Array.isArray(value);
|
|
38
38
|
const hasOwn = (value, property) => Object.prototype.hasOwnProperty.call(value, property);
|
|
39
|
-
const isMessageAttachment = (value) => isRecord(value) &&
|
|
39
|
+
const isMessageAttachment = (value) => isRecord(value) && isString(value.id) && isString(value.filename) && isString(value.mimetype);
|
|
40
40
|
const isResourceReference = (value) => isRecord(value) && isString(value.id) && isEnumValue(resource_interface_1.ResourceType, value.resourceType) && isOptionalBoolean(value.dependent);
|
|
41
41
|
const isOneOf = (value, allowed) => allowed.includes(value);
|
|
42
42
|
const isEnumValue = (target, value) => Object.values(target).includes(value);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddToProperty, Asset, AssetRevision, Attachment, DeleteQuery, EventCause, EventLevelOverride, Filter, Paginated, RemoveFromProperty, RequestParameter,
|
|
1
|
+
import { AddToProperty, Asset, AssetRevision, Attachment, DeleteQuery, EventCause, EventLevelOverride, Filter, Paginated, RemoveFromProperty, RequestParameter, SearchResultItem, TokenOption } from '../interfaces';
|
|
2
2
|
import { AssetService } from '../services';
|
|
3
3
|
import { CrossPlatformFormData } from '../utils';
|
|
4
4
|
import type { MockAPI } from './api.mock';
|
|
@@ -40,6 +40,6 @@ export declare class AssetMockService extends BaseService implements AssetServic
|
|
|
40
40
|
}): Promise<void>;
|
|
41
41
|
search(query: string, params?: RequestParameter, options?: TokenOption & {
|
|
42
42
|
[key: string]: any;
|
|
43
|
-
}): Promise<
|
|
43
|
+
}): Promise<SearchResultItem[]>;
|
|
44
44
|
}
|
|
45
45
|
export {};
|
|
@@ -40,7 +40,12 @@ class EventMockService extends BaseService {
|
|
|
40
40
|
return Promise.resolve(this.data[this.data.length - 1]);
|
|
41
41
|
}
|
|
42
42
|
getLastEventByAssetAndGroups(assetId, groups) {
|
|
43
|
-
|
|
43
|
+
return Promise.resolve(Object.fromEntries(groups.map((group) => [
|
|
44
|
+
group,
|
|
45
|
+
this.data
|
|
46
|
+
.filter((event) => event.assetRef === assetId && event.group === group)
|
|
47
|
+
.sort((a, b) => new Date(b.createdAt ?? 0).valueOf() - new Date(a.createdAt ?? 0).valueOf())[0]?.cause ?? '',
|
|
48
|
+
])));
|
|
44
49
|
}
|
|
45
50
|
countEventsByGroup(group, assetId) {
|
|
46
51
|
return Promise.resolve(this.data.filter((event) => event.group === group && (!assetId || event.assetRef === assetId)).length);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { APPLICATION_AREA, Asset } from '../interfaces';
|
|
1
|
+
import { APPLICATION_AREA, Asset, SendExaminationResultsOfStartedTimeSlotViaEmail, SendExaminationResultsOfStartedTimeSlotViaEmailResult } from '../interfaces';
|
|
2
2
|
import { APIBaseMock } from './api-base.mock';
|
|
3
3
|
export declare class FlangeSkillControlMockService extends APIBaseMock<Asset> {
|
|
4
4
|
bookTimeSlotForAnExamineeForExamination(examinationId: string, examineeId: string, applicationArea: APPLICATION_AREA, timeSlotId: string): Promise<Asset>;
|
|
5
|
+
sendExaminationResultsOfStartedTimeSlotsViaEmail(dto: SendExaminationResultsOfStartedTimeSlotViaEmail): Promise<SendExaminationResultsOfStartedTimeSlotViaEmailResult>;
|
|
5
6
|
cancelBookedTimeSlotForAnExamineeForExamination(examinationId: string, examineeId: string, timeSlotId: string): Promise<Asset>;
|
|
6
7
|
}
|
|
@@ -6,6 +6,9 @@ class FlangeSkillControlMockService extends api_base_mock_1.APIBaseMock {
|
|
|
6
6
|
async bookTimeSlotForAnExamineeForExamination(examinationId, examineeId, applicationArea, timeSlotId) {
|
|
7
7
|
throw new Error('Method not implemented.');
|
|
8
8
|
}
|
|
9
|
+
async sendExaminationResultsOfStartedTimeSlotsViaEmail(dto) {
|
|
10
|
+
throw new Error('Method not implemented.');
|
|
11
|
+
}
|
|
9
12
|
async cancelBookedTimeSlotForAnExamineeForExamination(examinationId, examineeId, timeSlotId) {
|
|
10
13
|
throw new Error('Method not implemented.');
|
|
11
14
|
}
|
|
@@ -137,7 +137,19 @@ class TimeseriesMockService extends BaseService {
|
|
|
137
137
|
return ts.data.filter((v) => v.timestamp < to && v.timestamp > from);
|
|
138
138
|
}
|
|
139
139
|
getMostRecentTimeSeriesValueByAssetAndTimeSeriesName(assetId, timeSeriesNames) {
|
|
140
|
-
|
|
140
|
+
const result = Object.fromEntries(timeSeriesNames.map((name) => [name, '']));
|
|
141
|
+
for (const timeSeries of this.data) {
|
|
142
|
+
if (timeSeries.assetRef !== assetId || !timeSeriesNames.includes(timeSeries.name)) {
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
const mostRecentValue = [...(timeSeries.data ?? [])].sort((a, b) => b.timestamp - a.timestamp)[0];
|
|
146
|
+
if (!mostRecentValue) {
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
const metric = timeSeries.metrics?.[0];
|
|
150
|
+
result[timeSeries.name] = metric ? (mostRecentValue[metric] ?? '') : (mostRecentValue.value ?? '');
|
|
151
|
+
}
|
|
152
|
+
return Promise.resolve(result);
|
|
141
153
|
}
|
|
142
154
|
}
|
|
143
155
|
exports.TimeseriesMockService = TimeseriesMockService;
|
|
@@ -4,4 +4,5 @@ import { DataMockService } from './data.mock.service';
|
|
|
4
4
|
export declare class VaultMockService extends DataMockService<VaultSecret> implements VaultService {
|
|
5
5
|
constructor(secrets: VaultSecret[]);
|
|
6
6
|
getSecret(name: string, version?: number): Promise<string>;
|
|
7
|
+
refreshOAuth2Token(name: string): Promise<VaultSecret>;
|
|
7
8
|
}
|
|
@@ -14,5 +14,9 @@ class VaultMockService extends data_mock_service_1.DataMockService {
|
|
|
14
14
|
}
|
|
15
15
|
return Promise.resolve(vaultSecret.secret);
|
|
16
16
|
}
|
|
17
|
+
refreshOAuth2Token(name) {
|
|
18
|
+
const vaultSecret = this.data.find((v) => v.name === name);
|
|
19
|
+
return Promise.resolve(vaultSecret);
|
|
20
|
+
}
|
|
17
21
|
}
|
|
18
22
|
exports.VaultMockService = VaultMockService;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddToProperty, Asset, AssetRevision, Attachment, DeleteAssetQuery, EventCause, EventLevelOverride, Filter, Paginated, RemoveFromProperty, RequestParameter,
|
|
1
|
+
import { AddToProperty, Asset, AssetRevision, Attachment, DeleteAssetQuery, EventCause, EventLevelOverride, Filter, Paginated, RemoveFromProperty, RequestParameter, SearchResultItem, TokenOption } from '../interfaces';
|
|
2
2
|
import { CrossPlatformFormData } from '../utils';
|
|
3
3
|
import { DataService } from './data.service';
|
|
4
4
|
import { HttpClientService } from './http-client.service';
|
|
@@ -33,6 +33,6 @@ export declare class AssetService extends BaseService {
|
|
|
33
33
|
}): Promise<void>;
|
|
34
34
|
search(query: string, params?: RequestParameter, options?: TokenOption & {
|
|
35
35
|
[key: string]: any;
|
|
36
|
-
}): Promise<
|
|
36
|
+
}): Promise<SearchResultItem[]>;
|
|
37
37
|
}
|
|
38
38
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { APIBase } from '../api-base';
|
|
2
|
-
import { APPLICATION_AREA, Asset } from '../interfaces';
|
|
2
|
+
import { APPLICATION_AREA, Asset, SendExaminationResultsOfStartedTimeSlotViaEmail, SendExaminationResultsOfStartedTimeSlotViaEmailResult, TokenOption } from '../interfaces';
|
|
3
3
|
import { HttpClientService } from './http-client.service';
|
|
4
4
|
export declare class FlangeSkillControlService extends APIBase {
|
|
5
5
|
constructor(httpClient: HttpClientService);
|
|
6
6
|
bookTimeSlotForAnExamineeForExamination(examinationId: string, examineeId: string, applicationArea: APPLICATION_AREA, timeSlotId: string): Promise<Asset>;
|
|
7
|
+
sendExaminationResultsOfStartedTimeSlotsViaEmail(dto: SendExaminationResultsOfStartedTimeSlotViaEmail, options?: TokenOption): Promise<SendExaminationResultsOfStartedTimeSlotViaEmailResult>;
|
|
7
8
|
cancelBookedTimeSlotForAnExamineeForExamination(examinationId: string, examineeId: string, timeSlotId: string): Promise<Asset>;
|
|
8
9
|
}
|
|
@@ -14,6 +14,9 @@ class FlangeSkillControlService extends api_base_1.APIBase {
|
|
|
14
14
|
timeSlotId,
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
+
async sendExaminationResultsOfStartedTimeSlotsViaEmail(dto, options = {}) {
|
|
18
|
+
return this.httpClient.post(`${this.basePath}/send-examination-results-of-started-time-slot-via-email`, dto, options);
|
|
19
|
+
}
|
|
17
20
|
async cancelBookedTimeSlotForAnExamineeForExamination(examinationId, examineeId, timeSlotId) {
|
|
18
21
|
return this.httpClient.put(`${this.basePath}/cancel-booked-time-slot`, {
|
|
19
22
|
examinationId,
|
|
@@ -4,4 +4,5 @@ import { HttpClientService } from './http-client.service';
|
|
|
4
4
|
export declare class VaultService extends DataService<VaultSecret> {
|
|
5
5
|
constructor(httpClient: HttpClientService);
|
|
6
6
|
getSecret(name: string, version?: number, options?: TokenOption): Promise<string>;
|
|
7
|
+
refreshOAuth2Token(name: string, options?: TokenOption): Promise<VaultSecret>;
|
|
7
8
|
}
|
|
@@ -10,5 +10,8 @@ class VaultService extends data_service_1.DataService {
|
|
|
10
10
|
const params = version ? { version } : {};
|
|
11
11
|
return this.httpClient.get(`${this.basePath}/${name}/secret`, { params, ...options });
|
|
12
12
|
}
|
|
13
|
+
refreshOAuth2Token(name, options = {}) {
|
|
14
|
+
return this.httpClient.post(`${this.basePath}/${name}/oauth2/refresh`, {}, options);
|
|
15
|
+
}
|
|
13
16
|
}
|
|
14
17
|
exports.VaultService = VaultService;
|
package/src/lib/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Filter } from './interfaces';
|
|
1
|
+
import { AgentId, Filter } from './interfaces';
|
|
2
2
|
export type CrossPlatformFormData = FormData | {
|
|
3
3
|
getHeaders(): Record<string, string>;
|
|
4
4
|
};
|
|
@@ -11,3 +11,4 @@ export type CrossPlatformFormData = FormData | {
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function getFormDataHeaders(form: CrossPlatformFormData): Record<string, string>;
|
|
13
13
|
export declare function getFilterString(filter: Filter): string;
|
|
14
|
+
export declare function agentSupportsAttachments(agent?: AgentId | null): boolean;
|
package/src/lib/utils.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFormDataHeaders = getFormDataHeaders;
|
|
4
4
|
exports.getFilterString = getFilterString;
|
|
5
|
+
exports.agentSupportsAttachments = agentSupportsAttachments;
|
|
5
6
|
// cross-platform FormData type that works in both node and browser
|
|
6
7
|
const interfaces_1 = require("./interfaces");
|
|
7
8
|
/**
|
|
@@ -37,3 +38,6 @@ function getFilterString(filter) {
|
|
|
37
38
|
}
|
|
38
39
|
return filters.join(';');
|
|
39
40
|
}
|
|
41
|
+
function agentSupportsAttachments(agent) {
|
|
42
|
+
return agent != null && interfaces_1.ATTACHMENT_CAPABLE_AGENT_IDS.includes(agent);
|
|
43
|
+
}
|