@hahnpro/hpc-api 2026.8.0 → 2026.8.2
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 +4 -0
- package/package.json +3 -3
- 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 +1 -11
- package/src/lib/interfaces/ai.interface.js +0 -10
- 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 +2 -2
- package/src/lib/interfaces/label.interface.d.ts +3 -0
- package/src/lib/interfaces/vault.interface.d.ts +1 -0
- 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/label.mock.service.d.ts +1 -0
- package/src/lib/mock/label.mock.service.js +3 -0
- 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/flange-skill-control.service.d.ts +2 -1
- package/src/lib/services/flange-skill-control.service.js +3 -0
- package/src/lib/services/label.service.d.ts +1 -0
- package/src/lib/services/label.service.js +3 -0
- package/src/lib/services/vault.service.d.ts +1 -0
- package/src/lib/services/vault.service.js +3 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hahnpro/hpc-api",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.2",
|
|
4
4
|
"description": "Module for easy access to the HahnPRO Cloud API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@microsoft/fetch-event-source": "2.0.1",
|
|
12
12
|
"axios": "1.19.0",
|
|
13
|
-
"eventsource": "
|
|
14
|
-
"jose": "6.2.
|
|
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
|
+
];
|
|
@@ -67,9 +67,6 @@ export declare enum AgentId {
|
|
|
67
67
|
ASSET_MULTI_IDENTIFIER = "asset-multi-identifier-agent",
|
|
68
68
|
ASSET_WEB = "asset-web-agent",
|
|
69
69
|
LOGBOOK = "logbook-agent",
|
|
70
|
-
TECHNICAL_PROPOSAL = "technical-proposal-agent",
|
|
71
|
-
DRYER_SELECTION = "dryer-selection-agent",
|
|
72
|
-
RFD_BASIC_CALCULATION = "rfd-basic-calculation-agent",
|
|
73
70
|
MESSAGE = "message-agent",
|
|
74
71
|
STATUS = "status-agent",
|
|
75
72
|
REPORT = "report-agent",
|
|
@@ -106,8 +103,6 @@ export declare enum ToolName {
|
|
|
106
103
|
UPDATE_TASK_LOGBOOK_ENTRY = "updateTaskLogbookEntry",
|
|
107
104
|
SEARCH_FOR_DOCUMENTS = "searchForDocuments",
|
|
108
105
|
SEARCH_FOR_DOCUMENTS_BY_LABEL = "searchForDocumentsByLabel",
|
|
109
|
-
USE_DRYER_SELECTION_TOOL = "useDryerSelectionTool",
|
|
110
|
-
USE_RFD_BASIC_CALCULATION_TOOL = "useRfdBasicCalculationTool",
|
|
111
106
|
ADD_TASK_LOGBOOK_ENTRY = "addTaskLogbookEntry",
|
|
112
107
|
LOAD_USER_MESSAGE_ATTACHMENT_REFERENCES = "loadUserMessageAttachmentReferences",
|
|
113
108
|
SEARCH_IN_ATTACHMENTS = "searchInAttachments",
|
|
@@ -121,17 +116,13 @@ export declare enum ReturnToReferrerTool {
|
|
|
121
116
|
ASSET_IDENTIFIER = "returnToReferrer_asset-identifier-agent",
|
|
122
117
|
ASSET_MULTI_IDENTIFIER = "returnToReferrer_asset-multi-identifier-agent",
|
|
123
118
|
AXALTA_ASSET_IDENTIFIER = "returnToReferrer_axalta-asset-identifier-agent",
|
|
124
|
-
LOGBOOK = "returnToReferrer_logbook-agent"
|
|
125
|
-
DRYER_SELECTION = "returnToReferrer_dryer-selection-agent",
|
|
126
|
-
RFD_BASIC_CALCULATION = "returnToReferrer_rfd-basic-calculation-agent"
|
|
119
|
+
LOGBOOK = "returnToReferrer_logbook-agent"
|
|
127
120
|
}
|
|
128
121
|
export declare enum HandOffTool {
|
|
129
122
|
ASSET_IDENTIFIER = "handoff_to_asset-identifier-agent",
|
|
130
123
|
ASSET_MULTI_IDENTIFIER = "handoff_to_asset-multi-identifier-agent",
|
|
131
124
|
AXALTA_ASSET_IDENTIFIER = "handoff_to_axalta-asset-identifier-agent",
|
|
132
125
|
LOGBOOK = "handoff_to_logbook-agent",
|
|
133
|
-
DRYER_SELECTION = "handoff_to_dryer-selection-agent",
|
|
134
|
-
RFD_BASIC_CALCULATION = "handoff_to_rfd-basic-calculation-agent",
|
|
135
126
|
DEEP_RESEARCH = "handoff_to_deep-research-agent",
|
|
136
127
|
RESEARCH_GOAL_CLARIFIER = "handoff_to_research-goal-clarifier-agent",
|
|
137
128
|
RESEARCH_INSTRUCTION_BUILDER = "handoff_to_research-instruction-builder-agent",
|
|
@@ -140,7 +131,6 @@ export declare enum HandOffTool {
|
|
|
140
131
|
export declare enum AiAssistantId {
|
|
141
132
|
ASSET = "asset-assistant",
|
|
142
133
|
ASSET_WEB = "asset-web-assistant",
|
|
143
|
-
TECHNICAL_PROPOSAL = "technical-proposal-assistant",
|
|
144
134
|
INCIDENT = "incident-assistant",
|
|
145
135
|
REPORT = "report-assistant",
|
|
146
136
|
AXALTA_INCIDENT = "axalta-incident-assistant"
|
|
@@ -77,9 +77,6 @@ var AgentId;
|
|
|
77
77
|
AgentId["ASSET_MULTI_IDENTIFIER"] = "asset-multi-identifier-agent";
|
|
78
78
|
AgentId["ASSET_WEB"] = "asset-web-agent";
|
|
79
79
|
AgentId["LOGBOOK"] = "logbook-agent";
|
|
80
|
-
AgentId["TECHNICAL_PROPOSAL"] = "technical-proposal-agent";
|
|
81
|
-
AgentId["DRYER_SELECTION"] = "dryer-selection-agent";
|
|
82
|
-
AgentId["RFD_BASIC_CALCULATION"] = "rfd-basic-calculation-agent";
|
|
83
80
|
AgentId["MESSAGE"] = "message-agent";
|
|
84
81
|
AgentId["STATUS"] = "status-agent";
|
|
85
82
|
AgentId["REPORT"] = "report-agent";
|
|
@@ -117,8 +114,6 @@ var ToolName;
|
|
|
117
114
|
ToolName["UPDATE_TASK_LOGBOOK_ENTRY"] = "updateTaskLogbookEntry";
|
|
118
115
|
ToolName["SEARCH_FOR_DOCUMENTS"] = "searchForDocuments";
|
|
119
116
|
ToolName["SEARCH_FOR_DOCUMENTS_BY_LABEL"] = "searchForDocumentsByLabel";
|
|
120
|
-
ToolName["USE_DRYER_SELECTION_TOOL"] = "useDryerSelectionTool";
|
|
121
|
-
ToolName["USE_RFD_BASIC_CALCULATION_TOOL"] = "useRfdBasicCalculationTool";
|
|
122
117
|
ToolName["ADD_TASK_LOGBOOK_ENTRY"] = "addTaskLogbookEntry";
|
|
123
118
|
ToolName["LOAD_USER_MESSAGE_ATTACHMENT_REFERENCES"] = "loadUserMessageAttachmentReferences";
|
|
124
119
|
ToolName["SEARCH_IN_ATTACHMENTS"] = "searchInAttachments";
|
|
@@ -134,8 +129,6 @@ var ReturnToReferrerTool;
|
|
|
134
129
|
ReturnToReferrerTool["ASSET_MULTI_IDENTIFIER"] = "returnToReferrer_asset-multi-identifier-agent";
|
|
135
130
|
ReturnToReferrerTool["AXALTA_ASSET_IDENTIFIER"] = "returnToReferrer_axalta-asset-identifier-agent";
|
|
136
131
|
ReturnToReferrerTool["LOGBOOK"] = "returnToReferrer_logbook-agent";
|
|
137
|
-
ReturnToReferrerTool["DRYER_SELECTION"] = "returnToReferrer_dryer-selection-agent";
|
|
138
|
-
ReturnToReferrerTool["RFD_BASIC_CALCULATION"] = "returnToReferrer_rfd-basic-calculation-agent";
|
|
139
132
|
})(ReturnToReferrerTool || (exports.ReturnToReferrerTool = ReturnToReferrerTool = {}));
|
|
140
133
|
var HandOffTool;
|
|
141
134
|
(function (HandOffTool) {
|
|
@@ -143,8 +136,6 @@ var HandOffTool;
|
|
|
143
136
|
HandOffTool["ASSET_MULTI_IDENTIFIER"] = "handoff_to_asset-multi-identifier-agent";
|
|
144
137
|
HandOffTool["AXALTA_ASSET_IDENTIFIER"] = "handoff_to_axalta-asset-identifier-agent";
|
|
145
138
|
HandOffTool["LOGBOOK"] = "handoff_to_logbook-agent";
|
|
146
|
-
HandOffTool["DRYER_SELECTION"] = "handoff_to_dryer-selection-agent";
|
|
147
|
-
HandOffTool["RFD_BASIC_CALCULATION"] = "handoff_to_rfd-basic-calculation-agent";
|
|
148
139
|
HandOffTool["DEEP_RESEARCH"] = "handoff_to_deep-research-agent";
|
|
149
140
|
HandOffTool["RESEARCH_GOAL_CLARIFIER"] = "handoff_to_research-goal-clarifier-agent";
|
|
150
141
|
HandOffTool["RESEARCH_INSTRUCTION_BUILDER"] = "handoff_to_research-instruction-builder-agent";
|
|
@@ -154,7 +145,6 @@ var AiAssistantId;
|
|
|
154
145
|
(function (AiAssistantId) {
|
|
155
146
|
AiAssistantId["ASSET"] = "asset-assistant";
|
|
156
147
|
AiAssistantId["ASSET_WEB"] = "asset-web-assistant";
|
|
157
|
-
AiAssistantId["TECHNICAL_PROPOSAL"] = "technical-proposal-assistant";
|
|
158
148
|
AiAssistantId["INCIDENT"] = "incident-assistant";
|
|
159
149
|
AiAssistantId["REPORT"] = "report-assistant";
|
|
160
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 = {}));
|
|
@@ -12,7 +12,7 @@ export type { DataspaceAllowedResourceType, DataspaceWorkflowResult, DataspaceWo
|
|
|
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';
|
|
15
|
+
export type { BookedExaminee, Examination, ExaminationEmailConfig, ReviewScore, SendExaminationResultsOfStartedTimeSlotViaEmail, SendExaminationResultsOfStartedTimeSlotViaEmailResult, SendExaminationResultsOfStartedTimeSlotViaEmailSkippedReason, TimeSlot, WorkStation, } from './flange-skill-control.interface';
|
|
16
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';
|
|
@@ -21,7 +21,7 @@ export type { DashboardItem, FlowChange, FlowDeploymentDto, FlowDto, FlowPopulat
|
|
|
21
21
|
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
|
-
export type { CreateLabelDto, Label, LabelColor, UpdateLabelDto } from './label.interface';
|
|
24
|
+
export type { BulkLabelsDto, CreateLabelDto, Label, LabelColor, UpdateLabelDto } from './label.interface';
|
|
25
25
|
export { LogbookEntrySource } from './logbook.interface';
|
|
26
26
|
export type { LogbookEntry, LogbookEntryDto } from './logbook.interface';
|
|
27
27
|
export type { MeteredQuantity, MeteringDimension, Plan, PlanComponents, RecurrentBillingTerm, SourceOffer, Subscription, SubscriptionInfo, Term, } from './marketplace.interface';
|
|
@@ -17,3 +17,6 @@ export interface Label {
|
|
|
17
17
|
}
|
|
18
18
|
export type CreateLabelDto = Pick<Label, 'name' | 'description' | 'color' | 'readPermissions' | 'readWritePermissions'>;
|
|
19
19
|
export type UpdateLabelDto = Partial<CreateLabelDto>;
|
|
20
|
+
export interface BulkLabelsDto {
|
|
21
|
+
ids: string[];
|
|
22
|
+
}
|
|
@@ -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
|
}
|
|
@@ -5,5 +5,6 @@ export declare class LabelMockService extends DataMockService<Label> implements
|
|
|
5
5
|
constructor(labels: Label[]);
|
|
6
6
|
count(): Promise<number>;
|
|
7
7
|
getOneByName(name: string): Promise<Label>;
|
|
8
|
+
getManyByIds(ids: string[]): Promise<Label[]>;
|
|
8
9
|
search(query: SearchOptions<Label>, _: any): Promise<SearchResult<Label>>;
|
|
9
10
|
}
|
|
@@ -13,6 +13,9 @@ class LabelMockService extends data_mock_service_1.DataMockService {
|
|
|
13
13
|
getOneByName(name) {
|
|
14
14
|
return Promise.resolve(this.data.find((label) => label.name === name));
|
|
15
15
|
}
|
|
16
|
+
getManyByIds(ids) {
|
|
17
|
+
return Promise.resolve(this.data.filter((label) => ids.includes(label.id)));
|
|
18
|
+
}
|
|
16
19
|
search(query, _) {
|
|
17
20
|
const docs = this.data.filter((label) => label.name.includes(query.query));
|
|
18
21
|
return Promise.resolve({
|
|
@@ -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,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,
|
|
@@ -5,6 +5,7 @@ export declare class LabelService extends DataService<Label> {
|
|
|
5
5
|
constructor(httpClient: HttpClientService);
|
|
6
6
|
addMany(dtos: Label[], options?: TokenOption): Promise<Label[]>;
|
|
7
7
|
getOneByName(name: string, options?: TokenOption): Promise<Label>;
|
|
8
|
+
getManyByIds(ids: string[], options?: TokenOption): Promise<Label[]>;
|
|
8
9
|
count(options?: TokenOption): Promise<number>;
|
|
9
10
|
search<K extends keyof Label>(query: SearchOptions<Label, K>, tokenOption?: TokenOption): Promise<SearchResult<Label, K>>;
|
|
10
11
|
}
|
|
@@ -12,6 +12,9 @@ class LabelService extends data_service_1.DataService {
|
|
|
12
12
|
getOneByName(name, options = {}) {
|
|
13
13
|
return this.httpClient.get(`${this.basePath}/name/${name}`, options);
|
|
14
14
|
}
|
|
15
|
+
getManyByIds(ids, options = {}) {
|
|
16
|
+
return this.httpClient.post(`${this.basePath}/bulk`, { ids }, options);
|
|
17
|
+
}
|
|
15
18
|
count(options = {}) {
|
|
16
19
|
return this.httpClient.get(`${this.basePath}/count`, options);
|
|
17
20
|
}
|
|
@@ -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;
|