@erdoai/types 0.1.7 → 0.1.8

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/dist/index.d.cts CHANGED
@@ -38,10 +38,8 @@ interface ResultOutput {
38
38
  interface ContentItem {
39
39
  id?: string;
40
40
  content_type: ContentType | string;
41
- ui_content_type?: UIContentType | {
42
- Valid: boolean;
43
- String: string;
44
- };
41
+ /** UI content type (e.g., 'markdown', 'chart'). Simple string - normalized by useThread. */
42
+ ui_content_type?: UIContentType;
45
43
  content: unknown;
46
44
  data?: unknown;
47
45
  chartConfig?: unknown;
@@ -142,6 +140,7 @@ interface ErdoClient {
142
140
  createThread?(params?: CreateThreadParams): Promise<Thread>;
143
141
  listThreads?(): Promise<ListThreadsResponse>;
144
142
  getThread?(threadId: string): Promise<Thread>;
143
+ getThreadMessages?(threadId: string): Promise<ListThreadMessagesResponse>;
145
144
  sendMessage?(threadId: string, params: SendMessageParams): AsyncGenerator<SSEEvent, void, unknown>;
146
145
  sendMessageAndWait?(threadId: string, params: SendMessageParams): Promise<SSEEvent[]>;
147
146
  }
@@ -235,5 +234,31 @@ interface SendMessageParams {
235
234
  /** Optional bot key to use (must be in token scope) */
236
235
  botKey?: string;
237
236
  }
237
+ /** A message content item from the thread API */
238
+ interface ThreadMessageContent {
239
+ id: string;
240
+ content_type: string;
241
+ ui_content_type?: {
242
+ Valid: boolean;
243
+ String: string;
244
+ } | string;
245
+ content: unknown;
246
+ user_visibility?: string;
247
+ bot_visibility?: string;
248
+ created_at?: string;
249
+ }
250
+ /** A message with its contents from the thread API */
251
+ interface ThreadMessage {
252
+ id: string;
253
+ thread_id: string;
254
+ role: 'user' | 'assistant';
255
+ created_at: string;
256
+ updated_at: string;
257
+ contents: ThreadMessageContent[];
258
+ }
259
+ /** Response from listing thread messages */
260
+ interface ListThreadMessagesResponse {
261
+ messages: ThreadMessage[];
262
+ }
238
263
 
239
- export type { AxisConfig, BotInvocationInfo, ChartConfig, ChartContent, ChartSeriesConfig, ChartType, CodeExecOutputItem, ContentItem, ContentType, CreateThreadParams, CreateTokenParams, ErdoClient, ErdoClientConfig, InvocationMode, InvocationStatus, InvokeParams, InvokeResult, ListThreadsResponse, LogEntry, LogLevel, Message, MessageContent, Result, ResultOutput, SSEEvent, SSEEventMetadata, SendMessageParams, SeriesConfig, StepInfo, Thread, TokenResponse, ToolGroup, ToolInvocation, ToolResult, UIContentType, WebParseOutput, WebSearchOutput, WebSearchResult };
264
+ export type { AxisConfig, BotInvocationInfo, ChartConfig, ChartContent, ChartSeriesConfig, ChartType, CodeExecOutputItem, ContentItem, ContentType, CreateThreadParams, CreateTokenParams, ErdoClient, ErdoClientConfig, InvocationMode, InvocationStatus, InvokeParams, InvokeResult, ListThreadMessagesResponse, ListThreadsResponse, LogEntry, LogLevel, Message, MessageContent, Result, ResultOutput, SSEEvent, SSEEventMetadata, SendMessageParams, SeriesConfig, StepInfo, Thread, ThreadMessage, ThreadMessageContent, TokenResponse, ToolGroup, ToolInvocation, ToolResult, UIContentType, WebParseOutput, WebSearchOutput, WebSearchResult };
package/dist/index.d.ts CHANGED
@@ -38,10 +38,8 @@ interface ResultOutput {
38
38
  interface ContentItem {
39
39
  id?: string;
40
40
  content_type: ContentType | string;
41
- ui_content_type?: UIContentType | {
42
- Valid: boolean;
43
- String: string;
44
- };
41
+ /** UI content type (e.g., 'markdown', 'chart'). Simple string - normalized by useThread. */
42
+ ui_content_type?: UIContentType;
45
43
  content: unknown;
46
44
  data?: unknown;
47
45
  chartConfig?: unknown;
@@ -142,6 +140,7 @@ interface ErdoClient {
142
140
  createThread?(params?: CreateThreadParams): Promise<Thread>;
143
141
  listThreads?(): Promise<ListThreadsResponse>;
144
142
  getThread?(threadId: string): Promise<Thread>;
143
+ getThreadMessages?(threadId: string): Promise<ListThreadMessagesResponse>;
145
144
  sendMessage?(threadId: string, params: SendMessageParams): AsyncGenerator<SSEEvent, void, unknown>;
146
145
  sendMessageAndWait?(threadId: string, params: SendMessageParams): Promise<SSEEvent[]>;
147
146
  }
@@ -235,5 +234,31 @@ interface SendMessageParams {
235
234
  /** Optional bot key to use (must be in token scope) */
236
235
  botKey?: string;
237
236
  }
237
+ /** A message content item from the thread API */
238
+ interface ThreadMessageContent {
239
+ id: string;
240
+ content_type: string;
241
+ ui_content_type?: {
242
+ Valid: boolean;
243
+ String: string;
244
+ } | string;
245
+ content: unknown;
246
+ user_visibility?: string;
247
+ bot_visibility?: string;
248
+ created_at?: string;
249
+ }
250
+ /** A message with its contents from the thread API */
251
+ interface ThreadMessage {
252
+ id: string;
253
+ thread_id: string;
254
+ role: 'user' | 'assistant';
255
+ created_at: string;
256
+ updated_at: string;
257
+ contents: ThreadMessageContent[];
258
+ }
259
+ /** Response from listing thread messages */
260
+ interface ListThreadMessagesResponse {
261
+ messages: ThreadMessage[];
262
+ }
238
263
 
239
- export type { AxisConfig, BotInvocationInfo, ChartConfig, ChartContent, ChartSeriesConfig, ChartType, CodeExecOutputItem, ContentItem, ContentType, CreateThreadParams, CreateTokenParams, ErdoClient, ErdoClientConfig, InvocationMode, InvocationStatus, InvokeParams, InvokeResult, ListThreadsResponse, LogEntry, LogLevel, Message, MessageContent, Result, ResultOutput, SSEEvent, SSEEventMetadata, SendMessageParams, SeriesConfig, StepInfo, Thread, TokenResponse, ToolGroup, ToolInvocation, ToolResult, UIContentType, WebParseOutput, WebSearchOutput, WebSearchResult };
264
+ export type { AxisConfig, BotInvocationInfo, ChartConfig, ChartContent, ChartSeriesConfig, ChartType, CodeExecOutputItem, ContentItem, ContentType, CreateThreadParams, CreateTokenParams, ErdoClient, ErdoClientConfig, InvocationMode, InvocationStatus, InvokeParams, InvokeResult, ListThreadMessagesResponse, ListThreadsResponse, LogEntry, LogLevel, Message, MessageContent, Result, ResultOutput, SSEEvent, SSEEventMetadata, SendMessageParams, SeriesConfig, StepInfo, Thread, ThreadMessage, ThreadMessageContent, TokenResponse, ToolGroup, ToolInvocation, ToolResult, UIContentType, WebParseOutput, WebSearchOutput, WebSearchResult };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/types",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Erdo SDK shared types",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,6 +22,7 @@
22
22
  },
23
23
  "scripts": {
24
24
  "build": "tsup",
25
+ "build:check": "tsup --outDir dist-check",
25
26
  "dev": "tsup --watch",
26
27
  "typecheck": "tsc --noEmit"
27
28
  },