@informedai/react 0.4.13 → 0.4.15

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 CHANGED
@@ -187,6 +187,99 @@ 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
+ */
244
+ interface WebsiteChatbotTheme {
245
+ primaryColor?: string;
246
+ backgroundColor?: string;
247
+ textColor?: string;
248
+ borderRadius?: string;
249
+ fontFamily?: string;
250
+ }
251
+ interface WebsiteChatbotConfig {
252
+ /** Website agent ID */
253
+ agentId: string;
254
+ /** API base URL (defaults to production) */
255
+ apiUrl?: string;
256
+ /** Theme customization */
257
+ theme?: Partial<WebsiteChatbotTheme>;
258
+ /** Position (inline or fixed) */
259
+ position?: 'bottom-right' | 'bottom-left' | 'inline';
260
+ /** Start collapsed */
261
+ defaultCollapsed?: boolean;
262
+ /** Widget title */
263
+ title?: string;
264
+ /** Placeholder text */
265
+ placeholder?: string;
266
+ }
267
+ interface WebsiteChatbotProps extends WebsiteChatbotConfig {
268
+ className?: string;
269
+ }
270
+ /**
271
+ * WebsiteChatbot - Embeddable chatbot for website agents
272
+ *
273
+ * @example
274
+ * ```tsx
275
+ * <WebsiteChatbot
276
+ * agentId="wa_abc123"
277
+ * title="Support Chat"
278
+ * />
279
+ * ```
280
+ */
281
+ declare function WebsiteChatbot({ className, ...config }: WebsiteChatbotProps): react_jsx_runtime.JSX.Element;
282
+
190
283
  interface InformedAIContextValue {
191
284
  session: Session | null;
192
285
  document: Document | null;
@@ -322,4 +415,4 @@ declare class InformedAIClient {
322
415
  private processSSEStream;
323
416
  }
324
417
 
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 };
418
+ 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,99 @@ 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
+ */
244
+ interface WebsiteChatbotTheme {
245
+ primaryColor?: string;
246
+ backgroundColor?: string;
247
+ textColor?: string;
248
+ borderRadius?: string;
249
+ fontFamily?: string;
250
+ }
251
+ interface WebsiteChatbotConfig {
252
+ /** Website agent ID */
253
+ agentId: string;
254
+ /** API base URL (defaults to production) */
255
+ apiUrl?: string;
256
+ /** Theme customization */
257
+ theme?: Partial<WebsiteChatbotTheme>;
258
+ /** Position (inline or fixed) */
259
+ position?: 'bottom-right' | 'bottom-left' | 'inline';
260
+ /** Start collapsed */
261
+ defaultCollapsed?: boolean;
262
+ /** Widget title */
263
+ title?: string;
264
+ /** Placeholder text */
265
+ placeholder?: string;
266
+ }
267
+ interface WebsiteChatbotProps extends WebsiteChatbotConfig {
268
+ className?: string;
269
+ }
270
+ /**
271
+ * WebsiteChatbot - Embeddable chatbot for website agents
272
+ *
273
+ * @example
274
+ * ```tsx
275
+ * <WebsiteChatbot
276
+ * agentId="wa_abc123"
277
+ * title="Support Chat"
278
+ * />
279
+ * ```
280
+ */
281
+ declare function WebsiteChatbot({ className, ...config }: WebsiteChatbotProps): react_jsx_runtime.JSX.Element;
282
+
190
283
  interface InformedAIContextValue {
191
284
  session: Session | null;
192
285
  document: Document | null;
@@ -322,4 +415,4 @@ declare class InformedAIClient {
322
415
  private processSSEStream;
323
416
  }
324
417
 
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 };
418
+ 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 };