@informedai/react 0.4.14 → 0.4.16
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.mts +95 -1
- package/dist/index.d.ts +95 -1
- package/dist/index.js +1006 -13
- package/dist/index.mjs +999 -8
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -187,6 +187,100 @@ interface InformedAssistantProps extends InformedAssistantConfig {
|
|
|
187
187
|
*/
|
|
188
188
|
declare function InformedAssistant({ className, ...config }: InformedAssistantProps): react_jsx_runtime.JSX.Element;
|
|
189
189
|
|
|
190
|
+
/**
|
|
191
|
+
* AdminChatbot
|
|
192
|
+
* A chatbot widget for querying the workspace's knowledge library directly.
|
|
193
|
+
* Requires an API key with 'admin_chatbot' scope.
|
|
194
|
+
*/
|
|
195
|
+
interface AdminChatbotTheme {
|
|
196
|
+
primaryColor?: string;
|
|
197
|
+
backgroundColor?: string;
|
|
198
|
+
textColor?: string;
|
|
199
|
+
borderRadius?: string;
|
|
200
|
+
fontFamily?: string;
|
|
201
|
+
}
|
|
202
|
+
interface AdminChatbotConfig {
|
|
203
|
+
/** API key with admin_chatbot scope */
|
|
204
|
+
apiKey: string;
|
|
205
|
+
/** API base URL (defaults to production) */
|
|
206
|
+
apiUrl?: string;
|
|
207
|
+
/** Custom system prompt for the chatbot */
|
|
208
|
+
systemPrompt?: string;
|
|
209
|
+
/** Whether system prompt is editable in the UI */
|
|
210
|
+
allowEditSystemPrompt?: boolean;
|
|
211
|
+
/** Theme customization */
|
|
212
|
+
theme?: Partial<AdminChatbotTheme>;
|
|
213
|
+
/** Position (inline or fixed) */
|
|
214
|
+
position?: 'bottom-right' | 'bottom-left' | 'inline';
|
|
215
|
+
/** Start collapsed */
|
|
216
|
+
defaultCollapsed?: boolean;
|
|
217
|
+
/** Widget title */
|
|
218
|
+
title?: string;
|
|
219
|
+
/** Placeholder text */
|
|
220
|
+
placeholder?: string;
|
|
221
|
+
}
|
|
222
|
+
interface AdminChatbotProps extends AdminChatbotConfig {
|
|
223
|
+
className?: string;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* AdminChatbot - Direct access to your knowledge library
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```tsx
|
|
230
|
+
* <AdminChatbot
|
|
231
|
+
* apiKey="wsk_..."
|
|
232
|
+
* systemPrompt="You are a helpful assistant that answers questions about our products."
|
|
233
|
+
* allowEditSystemPrompt={true}
|
|
234
|
+
* />
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
declare function AdminChatbot({ className, ...config }: AdminChatbotProps): react_jsx_runtime.JSX.Element;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* WebsiteChatbot
|
|
241
|
+
* An embeddable chatbot widget for website agents.
|
|
242
|
+
* Uses domain-based authentication - no API key required.
|
|
243
|
+
* Supports rendering rich cards from AI responses.
|
|
244
|
+
*/
|
|
245
|
+
interface WebsiteChatbotTheme {
|
|
246
|
+
primaryColor?: string;
|
|
247
|
+
backgroundColor?: string;
|
|
248
|
+
textColor?: string;
|
|
249
|
+
borderRadius?: string;
|
|
250
|
+
fontFamily?: string;
|
|
251
|
+
}
|
|
252
|
+
interface WebsiteChatbotConfig {
|
|
253
|
+
/** Website agent ID */
|
|
254
|
+
agentId: string;
|
|
255
|
+
/** API base URL (defaults to production) */
|
|
256
|
+
apiUrl?: string;
|
|
257
|
+
/** Theme customization */
|
|
258
|
+
theme?: Partial<WebsiteChatbotTheme>;
|
|
259
|
+
/** Position (inline or fixed) */
|
|
260
|
+
position?: 'bottom-right' | 'bottom-left' | 'inline';
|
|
261
|
+
/** Start collapsed */
|
|
262
|
+
defaultCollapsed?: boolean;
|
|
263
|
+
/** Widget title */
|
|
264
|
+
title?: string;
|
|
265
|
+
/** Placeholder text */
|
|
266
|
+
placeholder?: string;
|
|
267
|
+
}
|
|
268
|
+
interface WebsiteChatbotProps extends WebsiteChatbotConfig {
|
|
269
|
+
className?: string;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* WebsiteChatbot - Embeddable chatbot for website agents
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```tsx
|
|
276
|
+
* <WebsiteChatbot
|
|
277
|
+
* agentId="wa_abc123"
|
|
278
|
+
* title="Support Chat"
|
|
279
|
+
* />
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
declare function WebsiteChatbot({ className, ...config }: WebsiteChatbotProps): react_jsx_runtime.JSX.Element;
|
|
283
|
+
|
|
190
284
|
interface InformedAIContextValue {
|
|
191
285
|
session: Session | null;
|
|
192
286
|
document: Document | null;
|
|
@@ -322,4 +416,4 @@ declare class InformedAIClient {
|
|
|
322
416
|
private processSSEStream;
|
|
323
417
|
}
|
|
324
418
|
|
|
325
|
-
export { type ChatMessage, type Document, type DocumentType, type DocumentTypeSchema, type FieldDefinition, InformedAIClient, InformedAIProvider, InformedAssistant, type InformedAssistantConfig, type QuickAction, type SSEEvent, type Session, type TaskConfig, type TaskState, type UseSessionReturn, type WidgetMessage, type WidgetReadyContext, type WidgetTheme, useInformedAI, useSession };
|
|
419
|
+
export { AdminChatbot, type AdminChatbotConfig, type AdminChatbotTheme, type ChatMessage, type Document, type DocumentType, type DocumentTypeSchema, type FieldDefinition, InformedAIClient, InformedAIProvider, InformedAssistant, type InformedAssistantConfig, type QuickAction, type SSEEvent, type Session, type TaskConfig, type TaskState, type UseSessionReturn, WebsiteChatbot, type WebsiteChatbotConfig, type WebsiteChatbotTheme, type WidgetMessage, type WidgetReadyContext, type WidgetTheme, useInformedAI, useSession };
|
package/dist/index.d.ts
CHANGED
|
@@ -187,6 +187,100 @@ interface InformedAssistantProps extends InformedAssistantConfig {
|
|
|
187
187
|
*/
|
|
188
188
|
declare function InformedAssistant({ className, ...config }: InformedAssistantProps): react_jsx_runtime.JSX.Element;
|
|
189
189
|
|
|
190
|
+
/**
|
|
191
|
+
* AdminChatbot
|
|
192
|
+
* A chatbot widget for querying the workspace's knowledge library directly.
|
|
193
|
+
* Requires an API key with 'admin_chatbot' scope.
|
|
194
|
+
*/
|
|
195
|
+
interface AdminChatbotTheme {
|
|
196
|
+
primaryColor?: string;
|
|
197
|
+
backgroundColor?: string;
|
|
198
|
+
textColor?: string;
|
|
199
|
+
borderRadius?: string;
|
|
200
|
+
fontFamily?: string;
|
|
201
|
+
}
|
|
202
|
+
interface AdminChatbotConfig {
|
|
203
|
+
/** API key with admin_chatbot scope */
|
|
204
|
+
apiKey: string;
|
|
205
|
+
/** API base URL (defaults to production) */
|
|
206
|
+
apiUrl?: string;
|
|
207
|
+
/** Custom system prompt for the chatbot */
|
|
208
|
+
systemPrompt?: string;
|
|
209
|
+
/** Whether system prompt is editable in the UI */
|
|
210
|
+
allowEditSystemPrompt?: boolean;
|
|
211
|
+
/** Theme customization */
|
|
212
|
+
theme?: Partial<AdminChatbotTheme>;
|
|
213
|
+
/** Position (inline or fixed) */
|
|
214
|
+
position?: 'bottom-right' | 'bottom-left' | 'inline';
|
|
215
|
+
/** Start collapsed */
|
|
216
|
+
defaultCollapsed?: boolean;
|
|
217
|
+
/** Widget title */
|
|
218
|
+
title?: string;
|
|
219
|
+
/** Placeholder text */
|
|
220
|
+
placeholder?: string;
|
|
221
|
+
}
|
|
222
|
+
interface AdminChatbotProps extends AdminChatbotConfig {
|
|
223
|
+
className?: string;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* AdminChatbot - Direct access to your knowledge library
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```tsx
|
|
230
|
+
* <AdminChatbot
|
|
231
|
+
* apiKey="wsk_..."
|
|
232
|
+
* systemPrompt="You are a helpful assistant that answers questions about our products."
|
|
233
|
+
* allowEditSystemPrompt={true}
|
|
234
|
+
* />
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
declare function AdminChatbot({ className, ...config }: AdminChatbotProps): react_jsx_runtime.JSX.Element;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* WebsiteChatbot
|
|
241
|
+
* An embeddable chatbot widget for website agents.
|
|
242
|
+
* Uses domain-based authentication - no API key required.
|
|
243
|
+
* Supports rendering rich cards from AI responses.
|
|
244
|
+
*/
|
|
245
|
+
interface WebsiteChatbotTheme {
|
|
246
|
+
primaryColor?: string;
|
|
247
|
+
backgroundColor?: string;
|
|
248
|
+
textColor?: string;
|
|
249
|
+
borderRadius?: string;
|
|
250
|
+
fontFamily?: string;
|
|
251
|
+
}
|
|
252
|
+
interface WebsiteChatbotConfig {
|
|
253
|
+
/** Website agent ID */
|
|
254
|
+
agentId: string;
|
|
255
|
+
/** API base URL (defaults to production) */
|
|
256
|
+
apiUrl?: string;
|
|
257
|
+
/** Theme customization */
|
|
258
|
+
theme?: Partial<WebsiteChatbotTheme>;
|
|
259
|
+
/** Position (inline or fixed) */
|
|
260
|
+
position?: 'bottom-right' | 'bottom-left' | 'inline';
|
|
261
|
+
/** Start collapsed */
|
|
262
|
+
defaultCollapsed?: boolean;
|
|
263
|
+
/** Widget title */
|
|
264
|
+
title?: string;
|
|
265
|
+
/** Placeholder text */
|
|
266
|
+
placeholder?: string;
|
|
267
|
+
}
|
|
268
|
+
interface WebsiteChatbotProps extends WebsiteChatbotConfig {
|
|
269
|
+
className?: string;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* WebsiteChatbot - Embeddable chatbot for website agents
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```tsx
|
|
276
|
+
* <WebsiteChatbot
|
|
277
|
+
* agentId="wa_abc123"
|
|
278
|
+
* title="Support Chat"
|
|
279
|
+
* />
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
declare function WebsiteChatbot({ className, ...config }: WebsiteChatbotProps): react_jsx_runtime.JSX.Element;
|
|
283
|
+
|
|
190
284
|
interface InformedAIContextValue {
|
|
191
285
|
session: Session | null;
|
|
192
286
|
document: Document | null;
|
|
@@ -322,4 +416,4 @@ declare class InformedAIClient {
|
|
|
322
416
|
private processSSEStream;
|
|
323
417
|
}
|
|
324
418
|
|
|
325
|
-
export { type ChatMessage, type Document, type DocumentType, type DocumentTypeSchema, type FieldDefinition, InformedAIClient, InformedAIProvider, InformedAssistant, type InformedAssistantConfig, type QuickAction, type SSEEvent, type Session, type TaskConfig, type TaskState, type UseSessionReturn, type WidgetMessage, type WidgetReadyContext, type WidgetTheme, useInformedAI, useSession };
|
|
419
|
+
export { AdminChatbot, type AdminChatbotConfig, type AdminChatbotTheme, type ChatMessage, type Document, type DocumentType, type DocumentTypeSchema, type FieldDefinition, InformedAIClient, InformedAIProvider, InformedAssistant, type InformedAssistantConfig, type QuickAction, type SSEEvent, type Session, type TaskConfig, type TaskState, type UseSessionReturn, WebsiteChatbot, type WebsiteChatbotConfig, type WebsiteChatbotTheme, type WidgetMessage, type WidgetReadyContext, type WidgetTheme, useInformedAI, useSession };
|