@hahnpro/hpc-api 2025.2.12 → 2025.2.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/hpc-api",
3
- "version": "2025.2.12",
3
+ "version": "2025.2.13",
4
4
  "description": "Module for easy access to the HahnPRO Cloud API",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -8,8 +8,8 @@
8
8
  "url": "https://hahnpro.com"
9
9
  },
10
10
  "dependencies": {
11
- "axios": "1.8.4",
12
- "eventsource": "3.0.6",
11
+ "axios": "1.9.0",
12
+ "eventsource": "4.0.0",
13
13
  "form-data": "4.0.2",
14
14
  "jose": "5.10.0",
15
15
  "jwt-decode": "4.0.0",
@@ -15,11 +15,13 @@ interface AssistantLabels {
15
15
  }
16
16
  interface BaseMessage {
17
17
  id?: string;
18
+ responseId?: string;
18
19
  thread: string;
19
20
  createdAt?: string;
20
21
  updatedAt?: string;
21
22
  }
22
23
  export interface AssistantMessage extends BaseMessage {
24
+ responseId?: string;
23
25
  role: 'assistant';
24
26
  content?: string;
25
27
  agentStack?: string[];
@@ -1,16 +1,12 @@
1
1
  import { Author, Owner, Resource } from './resource.interface';
2
2
  export interface Event extends Resource {
3
- data?: {
4
- tsField: string;
5
- timestamp: string;
6
- value: number;
7
- };
3
+ data?: Record<string, any>;
8
4
  assetRef?: string;
9
5
  assetRef$name?: string;
10
6
  alertRef?: string;
11
7
  tsRef?: string;
12
8
  eventRef?: string;
13
- cause: string;
9
+ cause?: string;
14
10
  level: EventLevel;
15
11
  group?: string;
16
12
  owner?: Owner;
@@ -4,7 +4,7 @@ import { HttpClient, TokenOption } from '../http.service';
4
4
  import { AiAssistant, Message, SpeechToken, Thread, ThreadPopulated } from '../interfaces';
5
5
  export declare class AiService extends APIBase {
6
6
  constructor(httpClient: HttpClient);
7
- addMessage(message: string, threadId?: string, assistantId?: string): Promise<Message>;
7
+ addMessage(message: string, threadId?: string, assistantId?: string, context?: Record<string, unknown>): Promise<Message>;
8
8
  createThread(assistantId: string, isEphemeral?: boolean): Promise<ThreadPopulated>;
9
9
  getLatestAssistantThread(assistantId: string): Promise<ThreadPopulated>;
10
10
  listAssistantThreads(assistantId: string): Promise<ThreadPopulated[]>;
@@ -6,8 +6,8 @@ class AiService extends api_base_1.APIBase {
6
6
  constructor(httpClient) {
7
7
  super(httpClient, '/ai');
8
8
  }
9
- addMessage(message, threadId, assistantId) {
10
- return this.httpClient.post(`${this.basePath}/message`, { message, threadId, assistantId });
9
+ addMessage(message, threadId, assistantId, context) {
10
+ return this.httpClient.post(`${this.basePath}/message`, { message, threadId, assistantId, context });
11
11
  }
12
12
  createThread(assistantId, isEphemeral) {
13
13
  return this.httpClient.post(`${this.basePath}/threads`, { assistantId, isEphemeral });