@hahnpro/ai-sdk 0.6.0 → 0.7.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/fesm2022/hahnpro-ai-sdk.mjs +855 -269
- package/fesm2022/hahnpro-ai-sdk.mjs.map +1 -1
- package/index.d.ts +1493 -6
- package/package.json +16 -15
- package/lib/ai/ai.module.d.ts +0 -9
- package/lib/ai/chat-dialog/chat-dialog.component.d.ts +0 -27
- package/lib/ai/chat.service.d.ts +0 -79
- package/lib/ai/context-overlay/context-overlay.component.d.ts +0 -24
- package/lib/ai/context.service.d.ts +0 -27
- package/lib/ai/message-context/message-context.component.d.ts +0 -18
- package/lib/ai/message-input/message-input.component.d.ts +0 -17
- package/lib/ai/preview/preview.component.d.ts +0 -27
- package/lib/ai/providers.d.ts +0 -6
- package/lib/ai/thread/thread.component.d.ts +0 -20
- package/lib/ai/transloco.module.d.ts +0 -1218
- package/lib/ai/utils.d.ts +0 -1
- package/lib/ai/websocket.service.d.ts +0 -19
- package/lib/core/api.service.d.ts +0 -63
- package/lib/core/icons/icon.component.d.ts +0 -8
- package/lib/core/icons/index.d.ts +0 -1
- package/lib/core/markdown.provider.d.ts +0 -6
- package/lib/core/owner-resolver.service.d.ts +0 -24
- package/lib/core/pipes/bytes.pipe.d.ts +0 -7
- package/lib/core/pipes/color-level.pipe.d.ts +0 -10
- package/lib/core/pipes/date-ago.pipe.d.ts +0 -7
- package/lib/core/pipes/index.d.ts +0 -1
- package/lib/core/pipes/pipes.module.d.ts +0 -10
- package/lib/core/utils/i18n.d.ts +0 -2
- package/lib/core/utils/index.d.ts +0 -3
- package/lib/core/utils/mimetype.d.ts +0 -2
package/lib/ai/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function untruncateJson(json: string): string;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { Socket } from 'socket.io-client';
|
|
3
|
-
import { ApiService } from '../core/api.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class WebsocketService {
|
|
6
|
-
private socket;
|
|
7
|
-
subscribersCounter: Record<string, number>;
|
|
8
|
-
eventObservables$: Record<string, Observable<any>>;
|
|
9
|
-
constructor(apiService: ApiService);
|
|
10
|
-
emitToAi(threadId: string, message: string, context?: {
|
|
11
|
-
timeZone?: string;
|
|
12
|
-
}, toolCallId?: string, result?: any): Socket;
|
|
13
|
-
emitToolCallResult(threadId: string, toolCallId: string, result: any): Socket;
|
|
14
|
-
abortAi(threadId: string): Socket;
|
|
15
|
-
subscribeToThread(threadId: string): Observable<any>;
|
|
16
|
-
private fromEvent;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WebsocketService, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<WebsocketService>;
|
|
19
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { AiAssistant, Asset, Content, Event, Message, Paginated, RequestParameter, SpeechToken, Thread, ThreadPopulated } from '@hahnpro/hpc-api';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class ApiService {
|
|
4
|
-
private _baseUrl;
|
|
5
|
-
private apiPath;
|
|
6
|
-
private realm;
|
|
7
|
-
private httpClient;
|
|
8
|
-
get baseUrl(): string;
|
|
9
|
-
get apiUrl(): string;
|
|
10
|
-
get user(): User | null;
|
|
11
|
-
init(clientId: string, clientSecret: string, baseUrl?: string, realm?: string): Promise<void>;
|
|
12
|
-
getAccessToken(): Promise<string>;
|
|
13
|
-
createThread(assistantId: string, isEphemeral?: boolean): Promise<ThreadPopulated>;
|
|
14
|
-
getThread(threadId: string): Promise<ThreadPopulated>;
|
|
15
|
-
getThreadMessages(threadId: string): Promise<Paginated<Message[]>>;
|
|
16
|
-
deleteThread(threadId: string): Promise<Thread>;
|
|
17
|
-
getAssistants(): Promise<AiAssistant[]>;
|
|
18
|
-
getSpeechToken(): Promise<SpeechToken>;
|
|
19
|
-
getAssets(params?: RequestParameter): Promise<Paginated<Asset[]>>;
|
|
20
|
-
getContents(params?: RequestParameter): Promise<Paginated<Content[]>>;
|
|
21
|
-
getEvents(params?: RequestParameter): Promise<Paginated<Event[]>>;
|
|
22
|
-
downloadContent(id: string, type?: FileType): Promise<Blob>;
|
|
23
|
-
loadUsersAsPermissions(): Promise<Permission[]>;
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ApiService, never>;
|
|
25
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ApiService>;
|
|
26
|
-
}
|
|
27
|
-
export type TokenOption = {
|
|
28
|
-
token?: string;
|
|
29
|
-
};
|
|
30
|
-
export type Config = TokenOption & {
|
|
31
|
-
headers?: Record<string, string>;
|
|
32
|
-
params?: any;
|
|
33
|
-
};
|
|
34
|
-
export declare class HttpClient {
|
|
35
|
-
private config;
|
|
36
|
-
private token;
|
|
37
|
-
private expiresAt;
|
|
38
|
-
private _user;
|
|
39
|
-
init(serverUrl: string, clientId: string, clientSecret: string): Promise<void>;
|
|
40
|
-
delete: <T>(url: string, config?: Config) => Promise<T>;
|
|
41
|
-
get: <T>(url: string, config?: Config) => Promise<T>;
|
|
42
|
-
post: <T>(url: string, data: any, config?: Config) => Promise<T>;
|
|
43
|
-
put: <T>(url: string, data: any, config?: Config) => Promise<T>;
|
|
44
|
-
get user(): User | null;
|
|
45
|
-
protected request: <T>(method: Method, url: string, config?: Config, data?: BodyInit | null | undefined) => Promise<T>;
|
|
46
|
-
getAccessToken(): Promise<string>;
|
|
47
|
-
private resolveUser;
|
|
48
|
-
}
|
|
49
|
-
export type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
50
|
-
export type FileType = 'original' | 'preview-sm' | 'preview-md' | 'preview-lg' | 'preview-xl';
|
|
51
|
-
export interface Permission {
|
|
52
|
-
label: string;
|
|
53
|
-
value: string;
|
|
54
|
-
}
|
|
55
|
-
export interface User {
|
|
56
|
-
id: string;
|
|
57
|
-
username: string;
|
|
58
|
-
activeOrg?: {
|
|
59
|
-
id: string;
|
|
60
|
-
name: string;
|
|
61
|
-
};
|
|
62
|
-
roles: string[];
|
|
63
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class IconComponent {
|
|
3
|
-
name: string;
|
|
4
|
-
size: number | string;
|
|
5
|
-
label?: string;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<IconComponent, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "ai-icon", never, { "name": { "alias": "name"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, never, true, never>;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { IconComponent } from './icon.component';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
/**
|
|
3
|
-
* Service to resolve owner names based on their IDs. It utilizes caching to minimize
|
|
4
|
-
* redundant requests and leverages authentication and user services to fetch owner details.
|
|
5
|
-
*/
|
|
6
|
-
export declare class OwnerResolverService {
|
|
7
|
-
private readonly cache;
|
|
8
|
-
private readonly apiService;
|
|
9
|
-
/**
|
|
10
|
-
* Resolves the owner name for a given ID.
|
|
11
|
-
*/
|
|
12
|
-
resolveOwner(id: string): Promise<string>;
|
|
13
|
-
/**
|
|
14
|
-
* Resolves owner names for a list of IDs.
|
|
15
|
-
*/
|
|
16
|
-
resolveOwners(ids: string | string[]): Promise<Record<string, string>>;
|
|
17
|
-
/**
|
|
18
|
-
* Attempts to resolve the owner name from the authentication service.
|
|
19
|
-
*/
|
|
20
|
-
private resolveFromAuth;
|
|
21
|
-
private fetchIds;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OwnerResolverService, never>;
|
|
23
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OwnerResolverService>;
|
|
24
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class BytesPipe implements PipeTransform {
|
|
4
|
-
transform(input: any): any;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BytesPipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<BytesPipe, "bytes", false>;
|
|
7
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { NGXLogger } from 'ngx-logger';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ColorLevelPipe implements PipeTransform {
|
|
5
|
-
private readonly logger;
|
|
6
|
-
constructor(logger: NGXLogger);
|
|
7
|
-
transform(level: string, type?: 'svg' | 'bg' | 'text'): string;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ColorLevelPipe, never>;
|
|
9
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<ColorLevelPipe, "colorLevel", false>;
|
|
10
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class DateAgoPipe implements PipeTransform {
|
|
4
|
-
transform(value: string): string;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateAgoPipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<DateAgoPipe, "dateAgo", false>;
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './pipes.module';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./bytes.pipe";
|
|
3
|
-
import * as i2 from "./color-level.pipe";
|
|
4
|
-
import * as i3 from "./date-ago.pipe";
|
|
5
|
-
import * as i4 from "@angular/common";
|
|
6
|
-
export declare class UiPipesModule {
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<UiPipesModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<UiPipesModule, [typeof i1.BytesPipe, typeof i2.ColorLevelPipe, typeof i3.DateAgoPipe], [typeof i4.CommonModule], [typeof i1.BytesPipe, typeof i2.ColorLevelPipe, typeof i3.DateAgoPipe]>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<UiPipesModule>;
|
|
10
|
-
}
|
package/lib/core/utils/i18n.d.ts
DELETED