@hahnpro/hpc-api 2026.2.5 → 2026.2.6
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 +5 -0
- package/package.json +1 -1
- package/src/lib/interfaces/ai.interface.d.ts +4 -0
- package/src/lib/interfaces/index.d.ts +2 -2
- package/src/lib/interfaces/reference.interface.d.ts +6 -1
- package/src/lib/interfaces/reference.interface.js +5 -0
- package/src/lib/interfaces/search.interface.d.ts +11 -1
- package/src/lib/mock/search.mock.service.d.ts +2 -2
- package/src/lib/mock/search.mock.service.js +1 -1
- package/src/lib/services/search.service.d.ts +2 -2
- package/src/lib/services/search.service.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# @hahnpro/hpc-api
|
|
2
2
|
|
|
3
|
+
# 2026.2.6
|
|
4
|
+
- Updated Search-Interface: SearchResult -> SearchMatchReason -> SearchMatchReasonContentPart
|
|
5
|
+
- Updated search-service search method
|
|
6
|
+
- Update AI-Interface: added ResourceSelectionRejected interface
|
|
7
|
+
|
|
3
8
|
# 2026.2.5
|
|
4
9
|
|
|
5
10
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AiAssistant, AssetResourceSelectionOption, AssistantMessage, DocumentResourceSelectionOption, GenericResourceSelectionOption, LogbookEntryResourceSelectionOption, Message, ResourceSelectionOption, SpeechToken, SystemMessage, Thread, ThreadPopulated, ToolMessage, UserMessage, } from './ai.interface';
|
|
1
|
+
export type { AiAssistant, AssetResourceSelectionOption, AssistantMessage, DocumentResourceSelectionOption, GenericResourceSelectionOption, LogbookEntryResourceSelectionOption, Message, ResourceSelectionOption, ResourceSelectionRejected, SpeechToken, SystemMessage, Thread, ThreadPopulated, ToolMessage, UserMessage, } from './ai.interface';
|
|
2
2
|
export type { Alert, AlertCondition, TimeSeriesReference } from './alert.interface';
|
|
3
3
|
export type { Api } from './api.interface';
|
|
4
4
|
export type { AddToProperty, Asset, AssetRevision, AssetType, AssetTypeRevision, Attachment, EventCause, EventLevelOverride, RemoveFromProperty, Template, } from './asset.interface';
|
|
@@ -26,7 +26,7 @@ export type { DeleteAssetQuery, DeleteAssetTypeQuery, DeleteQuery } from './quer
|
|
|
26
26
|
export type { CreateReferenceDto, ObjectReference, ReferencesQuery } from './reference.interface';
|
|
27
27
|
export type { ConnectedResources, ConnectedResourceType, OrgResourcePermission, Resource, ResourceReference, SharedResources, } from './resource.interface';
|
|
28
28
|
export type { JsonSchema, JsonSchemaArray, JsonSchemaForm, JsonSchemaType, JsonSchemaTypeName } from './schema.interface';
|
|
29
|
-
export type { SearchOptions, SearchResult, SearchSortOption, SortableField } from './search.interface';
|
|
29
|
+
export type { SearchMatchReason, SearchMatchReasonContentPart, SearchOptions, SearchResult, SearchSortOption, SortableField, } from './search.interface';
|
|
30
30
|
export type { Secret } from './secret.interface';
|
|
31
31
|
export type { ServerSentEvent } from './sse.interface';
|
|
32
32
|
export type { Artifact, FileType, Storage, StorageProvider } from './storage.interface';
|
|
@@ -12,7 +12,12 @@ export declare enum ObjectReferenceType {
|
|
|
12
12
|
* Marks an Object as updated by an AI-Thread.
|
|
13
13
|
* Object is linked to the AI-Thread's ID.'
|
|
14
14
|
*/
|
|
15
|
-
UPDATED_BY_THREAD = "updated_by_thread"
|
|
15
|
+
UPDATED_BY_THREAD = "updated_by_thread",
|
|
16
|
+
/**
|
|
17
|
+
* Marks an Object as being part of the 'Weber Engineering Flange Skill Check Application' to link examinees to an
|
|
18
|
+
* examination, in which they participate.
|
|
19
|
+
*/
|
|
20
|
+
FLANGE_SKILL_CHECK_APPLICATION_EXAMINATION_EXAMINEE = "flange_skill_check_application_examination_examinee"
|
|
16
21
|
}
|
|
17
22
|
export interface ObjectReference {
|
|
18
23
|
id: number;
|
|
@@ -17,4 +17,9 @@ var ObjectReferenceType;
|
|
|
17
17
|
* Object is linked to the AI-Thread's ID.'
|
|
18
18
|
*/
|
|
19
19
|
ObjectReferenceType["UPDATED_BY_THREAD"] = "updated_by_thread";
|
|
20
|
+
/**
|
|
21
|
+
* Marks an Object as being part of the 'Weber Engineering Flange Skill Check Application' to link examinees to an
|
|
22
|
+
* examination, in which they participate.
|
|
23
|
+
*/
|
|
24
|
+
ObjectReferenceType["FLANGE_SKILL_CHECK_APPLICATION_EXAMINATION_EXAMINEE"] = "flange_skill_check_application_examination_examinee";
|
|
20
25
|
})(ObjectReferenceType || (exports.ObjectReferenceType = ObjectReferenceType = {}));
|
|
@@ -14,10 +14,20 @@ export interface SearchSortOption<T> {
|
|
|
14
14
|
field: SortableField<T>;
|
|
15
15
|
order: 'asc' | 'desc';
|
|
16
16
|
}
|
|
17
|
+
export interface SearchMatchReason {
|
|
18
|
+
field: string;
|
|
19
|
+
content: SearchMatchReasonContentPart[];
|
|
20
|
+
}
|
|
21
|
+
export interface SearchMatchReasonContentPart {
|
|
22
|
+
text: string;
|
|
23
|
+
isHighlighted: boolean;
|
|
24
|
+
}
|
|
17
25
|
export interface SearchResult<T extends {
|
|
18
26
|
id?: string;
|
|
19
27
|
} = any, K extends keyof T & string = keyof T & string> {
|
|
20
|
-
docs: Pick<T, K | 'id'>
|
|
28
|
+
docs: (Pick<T, K | 'id'> & {
|
|
29
|
+
matchReason?: SearchMatchReason[];
|
|
30
|
+
})[];
|
|
21
31
|
limit: number;
|
|
22
32
|
offset: number;
|
|
23
33
|
total: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { APIBaseMock } from '.';
|
|
2
|
-
import type { SearchOptions, SearchResult, TokenOption } from '../interfaces';
|
|
2
|
+
import type { ResourceType, SearchOptions, SearchResult, TokenOption } from '../interfaces';
|
|
3
3
|
import { SearchService } from '../services';
|
|
4
4
|
export declare class SearchMockService extends APIBaseMock<never> implements SearchService {
|
|
5
5
|
search<T extends {
|
|
6
6
|
id?: string;
|
|
7
|
-
}, K extends keyof T & string = keyof T & string>(
|
|
7
|
+
}, K extends keyof T & string = keyof T & string>(options: SearchOptions<T, K>, targetResourceTypes?: ResourceType[], tokenOption?: TokenOption): Promise<SearchResult<T, K>>;
|
|
8
8
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SearchMockService = void 0;
|
|
4
4
|
const _1 = require(".");
|
|
5
5
|
class SearchMockService extends _1.APIBaseMock {
|
|
6
|
-
search(
|
|
6
|
+
search(options, targetResourceTypes = [], tokenOption = {}) {
|
|
7
7
|
throw new Error('Method not implemented.');
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HttpClientService } from '.';
|
|
2
2
|
import { APIBase } from '../api-base';
|
|
3
|
-
import type { SearchOptions, SearchResult, TokenOption } from '../interfaces';
|
|
3
|
+
import type { ResourceType, SearchOptions, SearchResult, TokenOption } from '../interfaces';
|
|
4
4
|
export declare class SearchService extends APIBase {
|
|
5
5
|
constructor(httpClient: HttpClientService);
|
|
6
6
|
search<T extends {
|
|
7
7
|
id?: string;
|
|
8
|
-
}, K extends keyof T & string = keyof T & string>(
|
|
8
|
+
}, K extends keyof T & string = keyof T & string>(options: SearchOptions<T, K>, targetResourceTypes?: ResourceType[], tokenOption?: TokenOption): Promise<SearchResult<T, K>>;
|
|
9
9
|
}
|
|
@@ -6,8 +6,8 @@ class SearchService extends api_base_1.APIBase {
|
|
|
6
6
|
constructor(httpClient) {
|
|
7
7
|
super(httpClient, '/search');
|
|
8
8
|
}
|
|
9
|
-
search(
|
|
10
|
-
return this.httpClient.post(this.basePath,
|
|
9
|
+
search(options, targetResourceTypes = [], tokenOption = {}) {
|
|
10
|
+
return this.httpClient.post(this.basePath, { options, targetResourceTypes }, tokenOption);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
exports.SearchService = SearchService;
|