@odin-ai/sdk 1.0.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.
Files changed (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +470 -0
  3. package/dist/BaseClient.d.ts +54 -0
  4. package/dist/BaseClient.d.ts.map +1 -0
  5. package/dist/ChatSDK.d.ts +93 -0
  6. package/dist/ChatSDK.d.ts.map +1 -0
  7. package/dist/SmartTablesSDK.d.ts +397 -0
  8. package/dist/SmartTablesSDK.d.ts.map +1 -0
  9. package/dist/VoiceSDK.d.ts +73 -0
  10. package/dist/VoiceSDK.d.ts.map +1 -0
  11. package/dist/WorkflowSDK.d.ts +188 -0
  12. package/dist/WorkflowSDK.d.ts.map +1 -0
  13. package/dist/examples/basic-chat.d.ts +2 -0
  14. package/dist/examples/basic-chat.d.ts.map +1 -0
  15. package/dist/examples/react-integration.d.ts +7 -0
  16. package/dist/examples/react-integration.d.ts.map +1 -0
  17. package/dist/examples/smart-tables-basic.d.ts +2 -0
  18. package/dist/examples/smart-tables-basic.d.ts.map +1 -0
  19. package/dist/examples/smart-tables-comprehensive.d.ts +2 -0
  20. package/dist/examples/smart-tables-comprehensive.d.ts.map +1 -0
  21. package/dist/examples/smart-tables-demo.d.ts +2 -0
  22. package/dist/examples/smart-tables-demo.d.ts.map +1 -0
  23. package/dist/examples/smart-tables-import.d.ts +2 -0
  24. package/dist/examples/smart-tables-import.d.ts.map +1 -0
  25. package/dist/examples/streaming-chat.d.ts +2 -0
  26. package/dist/examples/streaming-chat.d.ts.map +1 -0
  27. package/dist/index.d.ts +14 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.esm.js +2281 -0
  30. package/dist/index.esm.js.map +1 -0
  31. package/dist/index.js +2295 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/src/BaseClient.d.ts +48 -0
  34. package/dist/src/BaseClient.d.ts.map +1 -0
  35. package/dist/src/ChatSDK.d.ts +91 -0
  36. package/dist/src/ChatSDK.d.ts.map +1 -0
  37. package/dist/src/SmartTablesSDK.d.ts +312 -0
  38. package/dist/src/SmartTablesSDK.d.ts.map +1 -0
  39. package/dist/src/components/MessageBubble.d.ts +24 -0
  40. package/dist/src/components/MessageBubble.d.ts.map +1 -0
  41. package/dist/src/components/MessageList.d.ts +28 -0
  42. package/dist/src/components/MessageList.d.ts.map +1 -0
  43. package/dist/src/components/index.d.ts +4 -0
  44. package/dist/src/components/index.d.ts.map +1 -0
  45. package/dist/src/index.d.ts +10 -0
  46. package/dist/src/index.d.ts.map +1 -0
  47. package/dist/src/types.d.ts +348 -0
  48. package/dist/src/types.d.ts.map +1 -0
  49. package/dist/types.d.ts +262 -0
  50. package/dist/types.d.ts.map +1 -0
  51. package/dist/useVoiceConversation.d.ts +34 -0
  52. package/dist/useVoiceConversation.d.ts.map +1 -0
  53. package/dist/voice-types.d.ts +169 -0
  54. package/dist/voice-types.d.ts.map +1 -0
  55. package/dist/workflow-types.d.ts +431 -0
  56. package/dist/workflow-types.d.ts.map +1 -0
  57. package/package.json +78 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,48 @@
1
+ export interface BaseClientConfig {
2
+ baseUrl: string;
3
+ projectId: string;
4
+ accessToken?: string;
5
+ apiKey?: string;
6
+ apiSecret?: string;
7
+ }
8
+ export interface APIError extends Error {
9
+ status?: number;
10
+ detail?: string;
11
+ }
12
+ /**
13
+ * Generic HTTP client for AI Content Creator SDKs
14
+ */
15
+ export declare class BaseClient {
16
+ protected config: BaseClientConfig;
17
+ protected headers: Record<string, string>;
18
+ constructor(config: BaseClientConfig);
19
+ /**
20
+ * Make an HTTP request with proper error handling
21
+ */
22
+ protected makeRequest(endpoint: string, method?: string, body?: any, customHeaders?: Record<string, string>): Promise<any>;
23
+ /**
24
+ * Make a GET request
25
+ */
26
+ protected get(endpoint: string, headers?: Record<string, string>): Promise<any>;
27
+ /**
28
+ * Make a POST request
29
+ */
30
+ protected post(endpoint: string, body?: any, headers?: Record<string, string>): Promise<any>;
31
+ /**
32
+ * Make a PUT request
33
+ */
34
+ protected put(endpoint: string, body?: any, headers?: Record<string, string>): Promise<any>;
35
+ /**
36
+ * Make a DELETE request
37
+ */
38
+ protected delete(endpoint: string, body?: any, headers?: Record<string, string>): Promise<any>;
39
+ /**
40
+ * Handle error responses from the API
41
+ */
42
+ protected handleErrorResponse(response: Response): Promise<never>;
43
+ /**
44
+ * Create an error object from an HTTP response
45
+ */
46
+ protected createErrorFromResponse(response: Response): Promise<APIError>;
47
+ }
48
+ //# sourceMappingURL=BaseClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseClient.d.ts","sourceRoot":"","sources":["../../src/BaseClient.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,QAAS,SAAQ,KAAK;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,qBAAa,UAAU;IACrB,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC;IACnC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAE9B,MAAM,EAAE,gBAAgB;IAmCpC;;OAEG;cACa,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,MAAc,EACtB,IAAI,CAAC,EAAE,GAAG,EACV,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACrC,OAAO,CAAC,GAAG,CAAC;IAqCf;;OAEG;cACa,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAIrF;;OAEG;cACa,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAIlG;;OAEG;cACa,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAIjG;;OAEG;cACa,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAIpG;;OAEG;cACa,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC;IAKvE;;OAEG;cACa,uBAAuB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;CAkB/E"}
@@ -0,0 +1,91 @@
1
+ import { ChatSDKConfig, SendMessageOptions, StreamCallbacks, CreateChatResponse, SendMessageResponse, ListChatsResponse, ChatHistoryResponse } from './types';
2
+ import { BaseClient, APIError } from './BaseClient';
3
+ /**
4
+ * Main SDK class for interacting with the AI Content Creator chat system
5
+ */
6
+ export declare class ChatSDK extends BaseClient {
7
+ /**
8
+ * Initialize the Chat SDK
9
+ * @param config Configuration object with API credentials and settings
10
+ */
11
+ constructor(config: ChatSDKConfig);
12
+ /**
13
+ * Create a new chat in the project
14
+ * @param name Optional name for the chat (defaults to "Untitled")
15
+ * @param documentKeys Optional array of document keys for knowledge base context
16
+ * @returns Promise resolving to the created chat information
17
+ */
18
+ createChat(name?: string, documentKeys?: string[]): Promise<CreateChatResponse>;
19
+ /**
20
+ * List chats in the project with pagination support
21
+ * @param cursor Optional cursor for pagination
22
+ * @param limit Number of chats to return (default: 30, max: 100)
23
+ * @returns Promise resolving to paginated chat list
24
+ */
25
+ listChats(cursor?: number, limit?: number): Promise<ListChatsResponse>;
26
+ /**
27
+ * Get a specific chat with its message history
28
+ * @param chatId The ID of the chat to retrieve
29
+ * @returns Promise resolving to chat details with messages
30
+ */
31
+ getChatHistory(chatId: string): Promise<ChatHistoryResponse>;
32
+ /**
33
+ * Delete a chat and all its messages
34
+ * @param chatId The ID of the chat to delete
35
+ * @returns Promise that resolves when the chat is deleted
36
+ */
37
+ deleteChat(chatId: string): Promise<void>;
38
+ /**
39
+ * Update the name of an existing chat
40
+ * @param chatId The ID of the chat to update
41
+ * @param newName The new name for the chat
42
+ * @returns Promise that resolves when the name is updated
43
+ */
44
+ updateChatName(chatId: string, newName: string): Promise<void>;
45
+ /**
46
+ * Send a message and get the response
47
+ * @param message The message text to send
48
+ * @param options Optional configuration for the message
49
+ * @returns Promise resolving to the message response
50
+ */
51
+ sendMessage(message: string, options?: SendMessageOptions): Promise<SendMessageResponse>;
52
+ /**
53
+ * Send a message with streaming response support
54
+ * @param message The message text to send
55
+ * @param options Configuration including streaming callbacks
56
+ * @returns Promise that resolves when streaming is complete
57
+ */
58
+ sendMessageStream(message: string, options?: SendMessageOptions & StreamCallbacks): Promise<void>;
59
+ /**
60
+ * Send user feedback for a message
61
+ * @param messageId The ID of the message to provide feedback for
62
+ * @param chatId The ID of the chat containing the message
63
+ * @param feedback True for positive feedback, false for negative
64
+ * @returns Promise that resolves when feedback is sent
65
+ */
66
+ sendFeedback(messageId: string, chatId: string, feedback: boolean): Promise<void>;
67
+ private messageChunkString;
68
+ private docMessageString;
69
+ private messageInitObject;
70
+ /**
71
+ * Reset streaming state for a new message
72
+ * @private
73
+ */
74
+ private resetStreamingState;
75
+ /**
76
+ * Parse streaming response chunks and trigger appropriate callbacks
77
+ * @private
78
+ */
79
+ private parseStreamChunk;
80
+ /**
81
+ * Handle error responses from the API
82
+ * @private
83
+ */
84
+ protected handleErrorResponse(response: Response): Promise<never>;
85
+ /**
86
+ * Create an error object from an HTTP response
87
+ * @private
88
+ */
89
+ protected createErrorFromResponse(response: Response): Promise<APIError>;
90
+ }
91
+ //# sourceMappingURL=ChatSDK.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatSDK.d.ts","sourceRoot":"","sources":["../../src/ChatSDK.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEpD;;GAEG;AACH,qBAAa,OAAQ,SAAQ,UAAU;IACrC;;;OAGG;gBACS,MAAM,EAAE,aAAa;IAIjC;;;;;OAKG;IACG,UAAU,CACd,IAAI,CAAC,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,kBAAkB,CAAC;IAQ9B;;;;;OAKG;IACG,SAAS,CACb,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,GAAE,MAAW,GACjB,OAAO,CAAC,iBAAiB,CAAC;IAS7B;;;;OAIG;IACG,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAIlE;;;;OAIG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO/C;;;;;OAKG;IACG,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQpE;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,mBAAmB,CAAC;IAoB/B;;;;;OAKG;IACG,iBAAiB,CACrB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,kBAAkB,GAAG,eAAoB,GACjD,OAAO,CAAC,IAAI,CAAC;IAwHhB;;;;;;OAMG;IACG,YAAY,CAChB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,IAAI,CAAC;IAShB,OAAO,CAAC,kBAAkB,CAAM;IAChC,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,iBAAiB,CAAa;IAEtC;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAM3B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAsJxB;;;OAGG;cACa,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC;IAKvE;;;OAGG;cACa,uBAAuB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;CAkB/E"}
@@ -0,0 +1,312 @@
1
+ import { BaseClient, BaseClientConfig } from './BaseClient';
2
+ export interface Filter {
3
+ column: string;
4
+ operator: string;
5
+ value: string | number | boolean;
6
+ }
7
+ export interface PaginationParams {
8
+ page?: number;
9
+ limit?: number;
10
+ search?: string;
11
+ sort_column?: string;
12
+ sort_direction?: "asc" | "desc";
13
+ }
14
+ export interface SmartTable {
15
+ id: string;
16
+ project_id: string;
17
+ title: string;
18
+ description: string;
19
+ schema: SmartTableColumn[];
20
+ table_name: string;
21
+ created_at?: number;
22
+ updated_at?: number;
23
+ }
24
+ export interface SmartTableColumn {
25
+ name: string;
26
+ type: 'text' | 'number' | 'boolean' | 'date' | 'email' | 'url' | 'json';
27
+ description?: string;
28
+ notNull?: boolean;
29
+ unique?: boolean;
30
+ defaultValue?: string | number | boolean | null;
31
+ options?: Record<string, unknown>;
32
+ }
33
+ export interface TableFilter {
34
+ column: string;
35
+ operator: 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'contains' | 'startswith' | 'endswith';
36
+ value: string | number | boolean | null;
37
+ }
38
+ export interface TableSort {
39
+ column: string;
40
+ direction: 'asc' | 'desc';
41
+ }
42
+ export interface TablePagination {
43
+ page?: number;
44
+ limit?: number;
45
+ search?: string;
46
+ }
47
+ export interface TableQueryOptions {
48
+ filters?: TableFilter[];
49
+ sort?: TableSort[];
50
+ pagination?: TablePagination;
51
+ }
52
+ export interface TableQueryResponse {
53
+ data: Record<string, unknown>[];
54
+ total: number;
55
+ page: number;
56
+ limit: number;
57
+ has_more: boolean;
58
+ }
59
+ export interface ColumnMapping {
60
+ sourceColumn: string;
61
+ targetColumn: string;
62
+ dataType: string;
63
+ }
64
+ export interface ImportResult {
65
+ data_type_id: string;
66
+ rows_imported: number;
67
+ table_name: string;
68
+ success: boolean;
69
+ message?: string;
70
+ }
71
+ export interface TableView {
72
+ id: string;
73
+ name: string;
74
+ table_id: string;
75
+ column_meta?: Record<string, {
76
+ name: string;
77
+ order: number;
78
+ visible: boolean;
79
+ width: number;
80
+ type?: string;
81
+ }>;
82
+ filter?: {
83
+ filters?: TableFilter[];
84
+ };
85
+ sort?: {
86
+ configs?: TableSort[];
87
+ };
88
+ }
89
+ export interface TableSchemaColumn {
90
+ name: string;
91
+ type: string;
92
+ options?: Record<string, unknown>;
93
+ order?: number;
94
+ visible?: boolean;
95
+ width?: number;
96
+ }
97
+ export interface TableFullInfo {
98
+ data_schema: TableSchemaColumn[];
99
+ views: TableView[];
100
+ data_view: Record<string, unknown>[];
101
+ total_count: number;
102
+ pagination?: Record<string, unknown>;
103
+ }
104
+ export interface SmartTablesSDKConfig extends BaseClientConfig {
105
+ }
106
+ /**
107
+ * Integrated Smart Tables SDK that uses the BaseClient
108
+ */
109
+ export declare class SmartTablesSDK extends BaseClient {
110
+ constructor(config: SmartTablesSDKConfig);
111
+ private getAllKbDataTypes;
112
+ private getKbDataType;
113
+ private createKbDataType;
114
+ private updateKbDataType;
115
+ private deleteKbDataType;
116
+ private getKbDataTypeForView;
117
+ private addDataTypeRow;
118
+ private deleteDataTypeRow;
119
+ private updateDataTypeColumnValue;
120
+ private addDataTypeColumn;
121
+ private deleteDataTypeColumn;
122
+ private renameDataType;
123
+ private updateColumnMetadata;
124
+ private getDataTypeExampleJson;
125
+ private importSmartTable;
126
+ /**
127
+ * Get all smart tables in the project
128
+ * @returns Promise resolving to array of tables
129
+ */
130
+ getAllTables(): Promise<SmartTable[]>;
131
+ /**
132
+ * Get a specific smart table by ID
133
+ * @param tableId The ID of the table to retrieve
134
+ * @returns Promise resolving to the table details
135
+ */
136
+ getTable(tableId: string): Promise<SmartTable>;
137
+ /**
138
+ * Create a new smart table
139
+ * @param title Title of the table
140
+ * @param description Description of the table
141
+ * @param metadata Optional metadata for the table
142
+ * @returns Promise resolving to the created table
143
+ */
144
+ createTable(title: string, description: string, metadata?: Record<string, unknown>): Promise<SmartTable>;
145
+ /**
146
+ * Update an existing smart table
147
+ * @param tableId The ID of the table to update
148
+ * @param title New title for the table
149
+ * @param description New description for the table
150
+ * @param metadata New metadata for the table
151
+ * @returns Promise that resolves when the table is updated
152
+ */
153
+ updateTable(tableId: string, title: string, description?: string, metadata?: any): Promise<void>;
154
+ /**
155
+ * Delete a smart table
156
+ * @param tableId The ID of the table to delete
157
+ * @returns Promise that resolves when the table is deleted
158
+ */
159
+ deleteTable(tableId: string): Promise<void>;
160
+ /**
161
+ * Query table data with advanced filtering, sorting, and pagination
162
+ * @param tableId The ID of the table to query
163
+ * @param options Query options including filters, sorting, and pagination
164
+ * @returns Promise resolving to query results
165
+ */
166
+ queryTable(tableId: string, options?: TableQueryOptions): Promise<TableQueryResponse>;
167
+ /**
168
+ * Add a new column to the table
169
+ * @param tableId The ID of the table
170
+ * @param column Column configuration
171
+ * @returns Promise that resolves when the column is added
172
+ */
173
+ addColumn(tableId: string, column: SmartTableColumn): Promise<void>;
174
+ /**
175
+ * Update column metadata
176
+ * @param tableId The ID of the table
177
+ * @param columnName Name of the column to update
178
+ * @param updates Column updates
179
+ * @returns Promise that resolves when the column is updated
180
+ */
181
+ updateColumn(tableId: string, columnName: string, updates: Partial<SmartTableColumn>): Promise<void>;
182
+ /**
183
+ * Delete a column from the table
184
+ * @param tableId The ID of the table
185
+ * @param columnName Name of the column to delete
186
+ * @returns Promise that resolves when the column is deleted
187
+ */
188
+ deleteColumn(tableId: string, columnName: string): Promise<void>;
189
+ /**
190
+ * Add a new row to the table
191
+ * @param tableId The ID of the table
192
+ * @param data Row data
193
+ * @returns Promise that resolves when the row is added
194
+ */
195
+ addRow(tableId: string, data: any): Promise<any>;
196
+ /**
197
+ * Update a specific row and column value
198
+ * @param tableId The ID of the table
199
+ * @param rowId The ID of the row to update
200
+ * @param columnName Name of the column to update
201
+ * @param newValue New value for the column
202
+ * @returns Promise that resolves when the row is updated
203
+ */
204
+ updateRow(tableId: string, rowId: string, columnName: string, newValue: any): Promise<void>;
205
+ /**
206
+ * Delete a row from the table
207
+ * @param tableId The ID of the table
208
+ * @param rowId The ID of the row to delete
209
+ * @returns Promise that resolves when the row is deleted
210
+ */
211
+ deleteRow(tableId: string, rowId: string): Promise<void>;
212
+ /**
213
+ * Get full table information including schema, views, and data
214
+ * @param tableId The ID of the table
215
+ * @param options Query options for data fetching
216
+ * @returns Promise resolving to complete table information
217
+ */
218
+ getTableFullInfo(tableId: string, options?: TableQueryOptions): Promise<TableFullInfo>;
219
+ /**
220
+ * Get complete table data with query results and processed schema in a single call
221
+ * @param tableId The ID of the table
222
+ * @param options Query options for data fetching
223
+ * @returns Promise resolving to both query results and processed schema
224
+ */
225
+ queryTableWithSchema(tableId: string, options?: TableQueryOptions): Promise<{
226
+ data: Record<string, unknown>[];
227
+ total: number;
228
+ page: number;
229
+ limit: number;
230
+ has_more: boolean;
231
+ columns: TableSchemaColumn[];
232
+ defaultView: TableView | null;
233
+ viewId: string;
234
+ }>;
235
+ /**
236
+ * Get processed table schema with view metadata applied
237
+ * @param tableId The ID of the table
238
+ * @param options Query options
239
+ * @returns Promise resolving to processed schema columns
240
+ */
241
+ getProcessedTableSchema(tableId: string, options?: TableQueryOptions): Promise<{
242
+ columns: TableSchemaColumn[];
243
+ defaultView: TableView | null;
244
+ viewId: string;
245
+ }>;
246
+ /**
247
+ * Get the table schema as JSON
248
+ * @param tableId The ID of the table
249
+ * @returns Promise resolving to the table schema
250
+ */
251
+ getTableSchema(tableId: string): Promise<any>;
252
+ /**
253
+ * Import data from CSV/Excel file
254
+ * @param title Title for the new table
255
+ * @param description Description for the new table
256
+ * @param columnMappings Array of column mappings
257
+ * @param file File to import
258
+ * @returns Promise resolving to import result
259
+ */
260
+ importTable(title: string, description: string, columnMappings: ColumnMapping[], file: File): Promise<ImportResult>;
261
+ /**
262
+ * Update a table view
263
+ * @param dataTypeId The ID of the data type
264
+ * @param viewId The ID of the view to update
265
+ * @param updates The view updates to apply
266
+ * @returns Promise resolving when update is complete
267
+ */
268
+ updateView(dataTypeId: string, viewId: string, updates: {
269
+ name?: string;
270
+ description?: string;
271
+ type?: string;
272
+ sort?: any;
273
+ filter?: any;
274
+ group?: any;
275
+ options?: any;
276
+ settings?: any;
277
+ column_meta?: any;
278
+ enable_share?: boolean;
279
+ }): Promise<void>;
280
+ /**
281
+ * Compute values for specific columns in a row
282
+ * @param dataTypeId The ID of the data type
283
+ * @param rowId The ID of the row to compute
284
+ * @param columnNames Optional list of column names to compute. If not provided, all executable columns will be computed
285
+ * @returns Promise resolving when computation is complete
286
+ */
287
+ computeRowColumns(dataTypeId: string, rowId: string, columnNames?: string[]): Promise<void>;
288
+ /**
289
+ * Compute values for all rows in a table using LLM
290
+ * @param dataTypeId The ID of the data type
291
+ * @returns Promise resolving to computation results
292
+ */
293
+ computeAllRows(dataTypeId: string): Promise<{
294
+ message: string;
295
+ total_rows_processed: number;
296
+ total_columns_updated: number;
297
+ updated_columns: string[];
298
+ failed_rows: number[];
299
+ stopped_due_to_failures: boolean;
300
+ retry_attempts: Record<number, number>;
301
+ computation_id?: string;
302
+ history_table?: string;
303
+ }>;
304
+ /**
305
+ * Normalize table data from API response
306
+ * @private
307
+ */
308
+ private normalizeTable;
309
+ }
310
+ export declare const createSmartTablesSDK: (projectId: string, baseUrl?: string) => SmartTablesSDK;
311
+ export declare const useSmartTablesSDK: (projectId: string, baseUrl?: string) => SmartTablesSDK;
312
+ //# sourceMappingURL=SmartTablesSDK.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmartTablesSDK.d.ts","sourceRoot":"","sources":["../../src/SmartTablesSDK.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG5D,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACjC;AAGD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,gBA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;QAChD,OAAO,EAAE,MAAM,CAAC;QAChB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,eAAe,EAAE,MAAM,EAAE,CAAC;QAC1B,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,uBAAuB,EAAE,OAAO,CAAC;QACjC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACvC,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IAOF;;;OAGG;IACH,OAAO,CAAC,cAAc;CAYvB;AAGD,eAAO,MAAM,oBAAoB,GAAI,WAAW,MAAM,EAAE,UAAS,MAAW,mBAE3E,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM,EAAE,UAAS,MAAW,mBAExE,CAAC"}
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { ChatComponentProps } from "../types";
3
+ interface MessageBubbleProps extends ChatComponentProps {
4
+ primaryColor?: string;
5
+ backgroundColor?: string;
6
+ textColor?: string;
7
+ fontSize?: number;
8
+ showSources?: boolean;
9
+ showFeedback?: boolean;
10
+ showTimestamp?: boolean;
11
+ showUserAvatar?: boolean;
12
+ showActions?: boolean;
13
+ onImageClick?: (imageUrl: string) => void;
14
+ onSourceClick?: (source: string) => void;
15
+ onFeedback?: (messageId: string, feedback: boolean) => void;
16
+ onActionSubmit?: (actionData: any) => void;
17
+ botName?: string;
18
+ botAvatar?: string;
19
+ userName?: string;
20
+ userAvatar?: string;
21
+ }
22
+ export declare const MessageBubble: React.FC<MessageBubbleProps>;
23
+ export {};
24
+ //# sourceMappingURL=MessageBubble.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAGtE,OAAO,EAAuB,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnE,UAAU,kBAAmB,SAAQ,kBAAkB;IAErD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IAGtB,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,KAAK,IAAI,CAAC;IAG3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2RtD,CAAC"}
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+ import { MessageListProps } from "../types";
3
+ interface UnifiedMessageListProps extends MessageListProps {
4
+ primaryColor?: string;
5
+ backgroundColor?: string;
6
+ textColor?: string;
7
+ fontSize?: number;
8
+ showSources?: boolean;
9
+ showFeedback?: boolean;
10
+ showTimestamp?: boolean;
11
+ showUserAvatar?: boolean;
12
+ showActions?: boolean;
13
+ botName?: string;
14
+ botAvatar?: string;
15
+ userName?: string;
16
+ userAvatar?: string;
17
+ isLoading?: boolean;
18
+ loadingComponent?: React.ReactNode;
19
+ emptyStateComponent?: React.ReactNode;
20
+ emptyStateMessage?: string;
21
+ onImageClick?: (imageUrl: string) => void;
22
+ onSourceClick?: (source: string) => void;
23
+ onFeedback?: (messageId: string, feedback: boolean) => void;
24
+ onActionSubmit?: (actionData: any) => void;
25
+ }
26
+ export declare const MessageList: React.FC<UnifiedMessageListProps>;
27
+ export {};
28
+ //# sourceMappingURL=MessageList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAuB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjE,UAAU,uBAAwB,SAAQ,gBAAgB;IAExD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IAGtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAGnC,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAG3B,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+MzD,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { MessageBubble } from './MessageBubble';
2
+ export { MessageList } from './MessageList';
3
+ export type { ChatComponentProps, MessageListProps, ChatContextState, ChatActions } from '../types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACZ,MAAM,UAAU,CAAC"}
@@ -0,0 +1,10 @@
1
+ export { ChatSDK } from './ChatSDK';
2
+ export { SmartTablesSDK } from './SmartTablesSDK';
3
+ export { BaseClient } from './BaseClient';
4
+ export type { ChatSDKConfig, Chat, Message, FileMetadata, SendMessageOptions, StreamCallbacks, CreateChatResponse, SendMessageResponse, ListChatsResponse, ChatHistoryResponse, APIError, AgentType, ModelName, } from './types';
5
+ export type { BaseClientConfig, APIError as BaseAPIError, } from './BaseClient';
6
+ export type { SmartTableColumn, SmartTable, TableFilter, TableSort, TablePagination, ColumnMapping, TableQueryOptions, TableQueryResponse, ImportResult, } from './SmartTablesSDK';
7
+ export { MessageBubble, MessageList } from './components';
8
+ export type { ChatComponentProps, MessageListProps, ChatContextState, ChatActions } from './types';
9
+ export { ChatSDK as default } from './ChatSDK';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,YAAY,EACV,aAAa,EACb,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,SAAS,EACT,SAAS,GACV,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,gBAAgB,EAChB,QAAQ,IAAI,YAAY,GACzB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,SAAS,EACT,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC1D,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACZ,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}