@hahnpro/ai-sdk 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/hahnpro-ai-sdk.mjs +21 -31
- package/fesm2022/hahnpro-ai-sdk.mjs.map +1 -1
- package/lib/ai/chat-dialog/chat-dialog.component.d.ts +12 -31
- package/lib/ai/context.service.d.ts +1 -1
- package/lib/ai/transloco.module.d.ts +2 -0
- package/lib/core/api.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,45 +4,26 @@ import { MatIconRegistry } from '@angular/material/icon';
|
|
|
4
4
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
5
5
|
import { ChatService } from '../chat.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
+
interface AssetData {
|
|
8
|
+
id?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
externalKey?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ChatDialogData {
|
|
13
|
+
asset: AssetData;
|
|
14
|
+
}
|
|
7
15
|
export declare class AiChatDialogComponent implements OnInit {
|
|
8
|
-
data:
|
|
16
|
+
data: ChatDialogData;
|
|
9
17
|
private readonly matDialogRef;
|
|
10
18
|
readonly chatService: ChatService;
|
|
11
|
-
readonly
|
|
12
|
-
readonly type: 'asset' | 'help' | 'report' | 'incident';
|
|
19
|
+
readonly type: 'asset' | 'ext-asset';
|
|
13
20
|
private readonly asset;
|
|
14
|
-
private readonly event;
|
|
15
|
-
private readonly task;
|
|
16
21
|
private readonly logger;
|
|
17
22
|
private readonly translocoService;
|
|
18
|
-
constructor(data:
|
|
23
|
+
constructor(data: ChatDialogData, matDialogRef: MatDialogRef<AiChatDialogComponent>, matIconRegistry: MatIconRegistry, domSanitizer: DomSanitizer);
|
|
19
24
|
ngOnInit(): void;
|
|
20
25
|
close(message?: string): void;
|
|
21
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<AiChatDialogComponent, never>;
|
|
22
27
|
static ɵcmp: i0.ɵɵComponentDeclaration<AiChatDialogComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
23
28
|
}
|
|
24
|
-
export
|
|
25
|
-
name: string;
|
|
26
|
-
description?: string;
|
|
27
|
-
priority: string;
|
|
28
|
-
tags?: string[];
|
|
29
|
-
author?: string;
|
|
30
|
-
readPermissions: string[];
|
|
31
|
-
readWritePermissions: string[];
|
|
32
|
-
assetRef?: string;
|
|
33
|
-
assetRef$name?: string;
|
|
34
|
-
eventRef?: string;
|
|
35
|
-
eventRef$name?: string;
|
|
36
|
-
schedule?: string;
|
|
37
|
-
expiryDate?: Date;
|
|
38
|
-
parent?: string;
|
|
39
|
-
parent$name?: string;
|
|
40
|
-
subTasks?: string[];
|
|
41
|
-
assignedTo: string[];
|
|
42
|
-
status?: string;
|
|
43
|
-
acceptedBy?: string;
|
|
44
|
-
reason?: string;
|
|
45
|
-
statusHistoryLog?: string[];
|
|
46
|
-
createdAt?: string;
|
|
47
|
-
updatedAt?: string;
|
|
48
|
-
}
|
|
29
|
+
export {};
|
|
@@ -6,7 +6,7 @@ export interface Status {
|
|
|
6
6
|
isLoading?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare class ContextService {
|
|
9
|
-
cache: Map<string,
|
|
9
|
+
cache: Map<string, Content | Asset | Event>;
|
|
10
10
|
status: Map<string, Status>;
|
|
11
11
|
private readonly apiService;
|
|
12
12
|
private readonly ownerResolver;
|
|
@@ -96,6 +96,7 @@ export declare const translations: {
|
|
|
96
96
|
};
|
|
97
97
|
prompts: {
|
|
98
98
|
asset: string;
|
|
99
|
+
'ext-asset': string;
|
|
99
100
|
help: string;
|
|
100
101
|
incident: string;
|
|
101
102
|
report: string;
|
|
@@ -702,6 +703,7 @@ export declare const translations: {
|
|
|
702
703
|
};
|
|
703
704
|
prompts: {
|
|
704
705
|
asset: string;
|
|
706
|
+
'ext-asset': string;
|
|
705
707
|
help: string;
|
|
706
708
|
incident: string;
|
|
707
709
|
report: string;
|
|
@@ -8,7 +8,7 @@ export declare class ApiService {
|
|
|
8
8
|
get baseUrl(): string;
|
|
9
9
|
get apiUrl(): string;
|
|
10
10
|
get user(): User | null;
|
|
11
|
-
init(clientId: string, clientSecret: string): Promise<void>;
|
|
11
|
+
init(clientId: string, clientSecret: string, baseUrl?: string, realm?: string): Promise<void>;
|
|
12
12
|
getAccessToken(): Promise<string>;
|
|
13
13
|
createThread(assistantId: string, isEphemeral?: boolean): Promise<ThreadPopulated>;
|
|
14
14
|
getThread(threadId: string): Promise<ThreadPopulated>;
|