@inkeep/agents-ui-js 0.15.13 → 0.15.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.
@@ -0,0 +1,2157 @@
1
+ import type { ComponentType } from 'react';
2
+ import type { HTMLProps } from 'react';
3
+ import type { ReactNode } from 'react';
4
+ import type { ToolUIPart } from 'ai';
5
+ import type { UIMessage } from '@ai-sdk/react';
6
+
7
+ export declare interface AIChatDisclaimerSettings {
8
+ /**
9
+ * Controls whether the disclaimer message is shown.
10
+ * Enable this when you need to display important notices or legal disclaimers.
11
+ * @default false
12
+ */
13
+ isEnabled?: boolean
14
+
15
+ /**
16
+ * The main text content of the disclaimer message.
17
+ * Should clearly communicate important information about AI usage or limitations.
18
+ * "AI responses are generated automatically and may require verification."
19
+ */
20
+ label?: string
21
+
22
+ /**
23
+ * Additional information shown when hovering over the disclaimer.
24
+ * Use this to provide more detailed explanations or context.
25
+ */
26
+ tooltip?: string
27
+ }
28
+
29
+ export declare interface AIChatFormButtons {
30
+ submit: { label?: string; onSubmit: SubmitCallback }
31
+ close?: {
32
+ action: CloseFormAction // defaults to BackToChatFormAction
33
+ }
34
+ }
35
+
36
+ declare interface AIChatFormDoneButton {
37
+ label: string
38
+ icon?: InkeepCustomIcon
39
+ action: CloseFormAction
40
+ }
41
+
42
+ export declare interface AIChatFormSettings {
43
+ heading?: string
44
+ description?: string
45
+ buttons: AIChatFormButtons
46
+ fields: FormField[]
47
+ successView?: AIChatFormSuccessView
48
+ }
49
+
50
+ declare interface AIChatFormSuccessView {
51
+ heading: string
52
+ message: string
53
+ doneButton: AIChatFormDoneButton
54
+ }
55
+
56
+ export declare interface AIChatFunctions {
57
+ /**
58
+ * Programmatically sends a message in the chat.
59
+
60
+ * @param message - Optional message text. If omitted, sends the current input value.
61
+ */
62
+ submitMessage: (message?: string) => void
63
+
64
+ /**
65
+ * Programmatically updates the text in the chat input field.
66
+
67
+ * @param message - The new message text to set
68
+ */
69
+ updateInputMessage: (message: string) => void
70
+
71
+ /**
72
+ * Resets the chat to its initial state.
73
+ * Removes all messages and resets any active workflows.
74
+ */
75
+ clearChat: () => void
76
+
77
+ /**
78
+ * Displays a form overlay in the chat interface.
79
+
80
+ * @param formSettings - Configuration object defining the form's fields and behavior
81
+ * @param getHelpOption - Optional getHelpOption that triggered the form (for analytics)
82
+ */
83
+ openForm: (formSettings: AIChatFormSettings, getHelpOption?: GetHelpOption) => void
84
+
85
+ /**
86
+ * Programmatically sets focus to the chat input field.
87
+ * Useful after programmatic updates or when showing the chat interface.
88
+ */
89
+ focusInput: () => void
90
+ }
91
+
92
+ export declare interface AIChatToolbarButtonLabels {
93
+ /**
94
+ * Text shown on the button that clears the chat history.
95
+ * "Clear Chat" or "Start Over"
96
+ */
97
+ clear?: string
98
+
99
+ /**
100
+ * Text shown on the button that generates a shareable chat link.
101
+ * "Share Chat" or "Get Link"
102
+ */
103
+ share?: string
104
+
105
+ /**
106
+ * Text shown on the button that opens the help options menu.
107
+ * "Get Help" or "Support Options"
108
+ */
109
+ getHelp?: string
110
+
111
+ /**
112
+ * Text shown on the button that stops the AI from generating a response.
113
+ * "Stop" or "Cancel Response"
114
+ */
115
+ stop?: string
116
+
117
+ /**
118
+ * Text shown on the button that copies the chat transcript.
119
+ * "Copy Chat" or "Copy Transcript"
120
+ */
121
+ copyChat?: string
122
+ }
123
+
124
+ export declare type AnswerConfidence =
125
+ | 'very_confident'
126
+ | 'somewhat_confident'
127
+ | 'not_confident'
128
+ | 'no_sources'
129
+ | 'other'
130
+
131
+ export declare type ArtifactPart = Extract<Message['parts'][number], { type: 'data-artifact' }>
132
+
133
+ export declare type ArtifactType = 'citation' | (string & {})
134
+
135
+ export declare interface AssistantAnswerDisplayedEvent {
136
+ eventName: 'assistant_answer_displayed'
137
+ properties: {
138
+ // message: Message
139
+ conversationId?: string
140
+ }
141
+ }
142
+
143
+ export declare interface AssistantCodeBlockCopiedEvent {
144
+ eventName: 'assistant_code_block_copied'
145
+ properties: {
146
+ // message: Message
147
+ conversationId: string
148
+ language: string
149
+ code: string
150
+ }
151
+ }
152
+
153
+ export declare interface AssistantMessageCopiedEvent {
154
+ eventName: 'assistant_message_copied'
155
+ properties: {
156
+ // message: Message
157
+ conversationId: string
158
+ }
159
+ }
160
+
161
+ export declare interface AssistantMessageLinkOpenedEvent {
162
+ eventName: 'assistant_message_inline_link_opened'
163
+ properties: {
164
+ // message: Message
165
+ title?: string
166
+ url?: string
167
+ }
168
+ }
169
+
170
+ export declare interface AssistantMessageReceivedEvent {
171
+ eventName: 'assistant_message_received'
172
+ properties: {
173
+ // message: Message
174
+ conversationId?: string
175
+ }
176
+ }
177
+
178
+ export declare interface AssistantNegativeFeedbackSubmittedEvent {
179
+ eventName: 'assistant_negative_feedback_submitted'
180
+ properties: FeedbackProperties
181
+ }
182
+
183
+ export declare interface AssistantPositiveFeedbackSubmittedEvent {
184
+ eventName: 'assistant_positive_feedback_submitted'
185
+ properties: FeedbackProperties
186
+ }
187
+
188
+ export declare interface AssistantSourceItemClickedEvent {
189
+ eventName: 'assistant_source_item_clicked'
190
+ properties: {
191
+ // message: Message
192
+ conversationId: string
193
+ link: TransformedSource
194
+ }
195
+ }
196
+
197
+ export declare type AvailableBuiltInIcons =
198
+ | 'FaBook'
199
+ | 'FaGithub'
200
+ | 'FaDatabase'
201
+ | 'FaStackOverflow'
202
+ | 'FaChrome'
203
+ | 'FaPhone'
204
+ | 'FaEnvelope'
205
+ | 'FaPencil'
206
+ | 'FaBlog'
207
+ | 'FaSort'
208
+ | 'FaPenSquare'
209
+ | 'FaChevronRight'
210
+ | 'FaChevronUp'
211
+ | 'FaFilePdf'
212
+ | 'FaDiscourse'
213
+ | 'FaDiscord'
214
+ | 'FaSlack'
215
+ | 'IoDocumentTextSharp'
216
+ | 'IoDocumentSharp'
217
+ | 'IoSend'
218
+ | 'IoInformationCircleOutline'
219
+ | 'IoLinkOutline'
220
+ | 'IoThumbsUpSharp'
221
+ | 'IoThumbsDownSharp'
222
+ | 'IoSearch'
223
+ | 'IoCopyOutline'
224
+ | 'IoCopy'
225
+ | 'IoReturnDownBackOutline'
226
+ | 'IoChevronForwardOutline'
227
+ | 'IoReturnDownForward'
228
+ | 'IoCloseOutline'
229
+ | 'IoCheckmarkOutline'
230
+ | 'IoBookOutline'
231
+ | 'IoReaderOutline'
232
+ | 'IoHelpBuoyOutline'
233
+ | 'IoPeopleOutline'
234
+ | 'IoDocumentTextOutline'
235
+ | 'IoChatbubblesOutline'
236
+ | 'FaRegFilePdf'
237
+ | 'IoLogoDiscord'
238
+ | 'IoLogoGithub'
239
+ | 'IoTerminal'
240
+ | 'FaBriefcase'
241
+ | 'IoPlayCircleOutline'
242
+ | 'IoPencilOutline'
243
+ | 'IoCheckmarkDoneOutline'
244
+ | 'IoHomeOutline'
245
+ | 'IoMail'
246
+ | 'IoOpenOutline'
247
+ | 'FaTelegram'
248
+ | 'FaTable'
249
+ | 'FaMagnifyingGlass'
250
+ | 'LuArrowLeft'
251
+ | 'LuCircleCheck'
252
+ | 'LuCommand'
253
+ | 'LuCopy'
254
+ | 'LuCheck'
255
+ | 'LuCornerDownLeft'
256
+ | 'LuGlobe'
257
+ | 'LuHistory'
258
+ | 'LuPanelLeft'
259
+ | 'LuLink'
260
+ | 'LuRepeat'
261
+ | 'LuThumbsDown'
262
+ | 'LuThumbsUp'
263
+ | 'LuUsers'
264
+ | 'LuUser'
265
+ | 'LuArrowUpRight'
266
+ | 'LuBookOpen'
267
+ | 'LuChevronDown'
268
+ | 'LuLoaderCircle'
269
+ | 'FiEdit'
270
+ | 'LuSparkles'
271
+ | 'LuCornerDownRight'
272
+ | 'LuCalendar'
273
+ | 'LuHeadset'
274
+ | 'LuSend'
275
+
276
+ export declare interface BaseFormField {
277
+ name: string // input name -- must be unique
278
+ label: string
279
+ isRequired?: boolean
280
+ isHidden?: boolean
281
+ description?: string
282
+ }
283
+
284
+ export declare interface BaseOpenSettings {
285
+ /**
286
+ * Controls whether the component is open.
287
+ */
288
+ isOpen?: boolean
289
+ /**
290
+ * Handler called when the component opens or closes.
291
+ */
292
+ onOpenChange?: (isOpen: boolean) => void
293
+ /**
294
+ * Whether the component is open by default.
295
+ * @default false
296
+ */
297
+ defaultOpen?: boolean
298
+ /**
299
+ * The shortcut key.
300
+ *
301
+ * The key to trigger the component when pressed with Cmd (Mac) / Ctrl (Windows).
302
+ *
303
+ * Set to `null` to disable the shortcut.
304
+ *
305
+ * @default null
306
+ */
307
+ shortcutKey?: string | null
308
+ /**
309
+ * The trigger selector.
310
+ *
311
+ * The selector to trigger the component when clicked.
312
+ *
313
+ * @default undefined
314
+ */
315
+ triggerSelector?: string
316
+ }
317
+
318
+ declare type ChatAction = ExpandUnion<InvokeCallbackAction | OpenFormAction | OpenUrlAction>
319
+
320
+ export declare type ChatActionType = ChatAction['type']
321
+
322
+ export declare interface ChatBubbleClosedEvent {
323
+ eventName: 'chat_bubble_closed'
324
+ properties: {}
325
+ }
326
+
327
+ export declare interface ChatBubbleOpenedEvent {
328
+ eventName: 'chat_bubble_opened'
329
+ properties: {}
330
+ }
331
+
332
+ export declare interface ChatClearButtonClickedEvent {
333
+ eventName: 'chat_clear_button_clicked'
334
+ properties: {
335
+ conversationId: string
336
+ }
337
+ }
338
+
339
+ export declare interface ChatErrorEvent {
340
+ eventName: 'chat_error'
341
+ properties: {
342
+ conversationId: string
343
+ error?: string
344
+ }
345
+ }
346
+
347
+ export declare type ChatEvent =
348
+ | AssistantMessageReceivedEvent
349
+ | AssistantAnswerDisplayedEvent
350
+ | UserMessageSubmittedEvent
351
+ | UserEscalationIndicatedEvent
352
+ | SharedChatLoadedEvent
353
+ | AssistantPositiveFeedbackSubmittedEvent
354
+ | AssistantNegativeFeedbackSubmittedEvent
355
+ | ChatClearButtonClickedEvent
356
+ | AssistantMessageCopiedEvent
357
+ | GetHelpOptionClickedEvent
358
+ // | AIChatToolCallActionClickedEvent
359
+ | ChatShareButtonClickedEvent
360
+ | AssistantSourceItemClickedEvent
361
+ | AssistantMessageLinkOpenedEvent
362
+ | AssistantCodeBlockCopiedEvent
363
+ | ChatErrorEvent
364
+
365
+ export declare interface ChatShareButtonClickedEvent {
366
+ eventName: 'chat_share_button_clicked'
367
+ properties: {
368
+ sharedChatUrl: string
369
+ sharedConversationId: string
370
+ originalConversationId: string
371
+ conversationId: string
372
+ }
373
+ }
374
+
375
+ declare interface CheckboxField extends BaseFormField {
376
+ inputType: 'checkbox'
377
+ defaultValue?: boolean
378
+ }
379
+
380
+ export declare type CloseFormAction = 'return_to_chat' | 'close_modal'
381
+
382
+ export declare interface ColorModeConfig
383
+ extends Omit<ColorModeProviderProps, 'children' | 'rootId' | 'shadowHostId'> {
384
+ /**
385
+ * Configuration for syncing the widget's color mode with an external element.
386
+ *
387
+ * This allows the widget to automatically match its color mode (light/dark) with your application's theme.
388
+ * The widget will observe changes to specified attributes on a target element and update its appearance accordingly.
389
+ * ```ts
390
+ * colorMode: {
391
+ * sync: {
392
+ * // Watch the document root for theme changes
393
+ * target: document.documentElement,
394
+ * // Monitor the data-theme attribute
395
+ * attributes: ['data-theme'],
396
+ * // Determine dark mode based on attribute value
397
+ * isDarkMode: (attrs) => attrs['data-theme'] === 'dark',
398
+ * // Optional callback when color mode changes
399
+ * onChange: (mode) => console.log('Color mode changed to:', mode)
400
+ * }
401
+ * }
402
+ * ```
403
+ */
404
+ sync?: SyncColorMode
405
+ }
406
+
407
+ export declare interface ColorModeProviderProps {
408
+ /** List of all available colorMode names */
409
+ colorModes?: string[]
410
+ /** Forced colorMode name for the current page */
411
+ forcedColorMode?: string
412
+ /** Whether to switch between dark and light colorModes based on prefers-color-scheme */
413
+ enableSystem?: boolean
414
+ /** Disable all CSS transitions when switching colorModes */
415
+ disableTransitionOnChange?: boolean
416
+ /** Whether to indicate to browsers which color scheme is used (dark or light) for built-in UI like inputs and buttons */
417
+ enableColorScheme?: boolean
418
+ /** Key used to store colorMode setting in localStorage */
419
+ storageKey?: string
420
+ /** Default colorMode name (for v0.0.12 and lower the default was light). If `enableSystem` is false, the default colorMode is light */
421
+ defaultColorMode?: string
422
+ /** HTML attribute modified based on the active colorMode. Accepts `class` and `data-*` (meaning any data attribute, `data-mode`, `data-color`, etc.) */
423
+ attribute?: 'class' | (string & {})
424
+ /** Mapping of colorMode name to HTML attribute value. Object where key is the colorMode name and value is the attribute value */
425
+ value?: ValueObject
426
+ /** Nonce string to pass to the inline script for CSP headers */
427
+ nonce?: string
428
+
429
+ shadowHostId?: string
430
+ rootId?: string
431
+ children?: React.ReactNode
432
+ }
433
+
434
+ declare interface ComboboxField extends BaseFormField {
435
+ inputType: 'combobox'
436
+ items: SelectItem[]
437
+ /** Value is always an array; single selection = array with one value. */
438
+ defaultValue?: string[]
439
+ placeholder?: string
440
+ multiple?: boolean
441
+ }
442
+
443
+ declare interface CommonProperties {
444
+ conversationId: string
445
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
446
+ componentType: any
447
+ tags: string[]
448
+ }
449
+
450
+ export declare type ComponentsConfig<A extends Record<string, unknown>> = {
451
+ [K in keyof A]: (
452
+ props: A[K],
453
+ target: HTMLElement,
454
+ // TODO: add context
455
+ context: null,
456
+ // biome-ignore lint/suspicious/noConfusingVoidType: <explanation>
457
+ ) => void | React.ReactNode
458
+ } & {
459
+ IkpMessage?(
460
+ props: {
461
+ message: Message
462
+ renderComponent: (name: string, props: Record<string, unknown>) => React.ReactNode
463
+ renderMarkdown: (text: string) => React.ReactNode
464
+ },
465
+ target: HTMLElement,
466
+ context: null,
467
+ // biome-ignore lint/suspicious/noConfusingVoidType: <explanation>
468
+ ): void | React.ReactNode
469
+ IkpTool?(
470
+ props: {
471
+ tool: ToolUIPart
472
+ approve: (approved?: boolean) => Promise<void>
473
+ renderMarkdown: (text: string) => React.ReactNode
474
+ },
475
+ target: HTMLElement,
476
+ context: null,
477
+ // biome-ignore lint/suspicious/noConfusingVoidType: <explanation>
478
+ ): void | React.ReactNode
479
+ }
480
+
481
+ export declare type CustomIconMap = {
482
+ [K in keyof CustomIcons]?: InkeepCustomIcon
483
+ }
484
+
485
+ export declare interface CustomIcons {
486
+ search: string
487
+ thumbsUp: string
488
+ thumbsDown: string
489
+ messageCopy: string
490
+ messageCopied: string
491
+ messageRevise: string
492
+ codeCopy: string
493
+ codeCopied: string
494
+ openLinkInNewTab: string
495
+ openLinkInSameTab: string
496
+ newLine: string
497
+ breadcrumbSeparator: string
498
+ switchToSearch: string
499
+ switchToChat: string
500
+ chatSubmit: string
501
+ close: string
502
+ info: string
503
+ command: string
504
+ chatButtonClose: string
505
+ chatHistory: string
506
+ chatHistoryPanel: string
507
+ backToChat: string
508
+ }
509
+
510
+ export declare interface CustomMessageAction {
511
+ label?: string
512
+ /**
513
+ * Icon to be displayed next to the label.
514
+ *
515
+ * ```ts
516
+ * icon: { builtIn: 'FaEnvelope' },
517
+ * icon: { custom: 'https://example.com/icon.svg' },
518
+ * ```
519
+ */
520
+ icon?: InkeepCustomIcon
521
+ /**
522
+ * Action to be performed when the option is clicked.
523
+ *
524
+ * ```ts
525
+ * action: {
526
+ * type: 'open_form',
527
+ * formSettings: {
528
+ * title: 'Open Form',
529
+ * description: 'Open a form',
530
+ * },
531
+ * },
532
+ * ```
533
+ * ```ts
534
+ * action: {
535
+ * type: 'invoke_message_callback',
536
+ * callback: (args: InvokeMessageCallbackActionArgs) => {
537
+ * console.log(args)
538
+ * },
539
+ * }
540
+ * ```
541
+ * ```ts
542
+ * action: {
543
+ * type: 'open_link',
544
+ * url: 'https://example.com',
545
+ * }
546
+ * ```
547
+ */
548
+ action: MessageChatAction
549
+ }
550
+
551
+ export declare type DataParts = {
552
+ operation: {
553
+ type: OperationType
554
+ ctx: Record<string, unknown>
555
+ message?: string
556
+ label?: string
557
+ }
558
+ summary: {
559
+ type: string
560
+ label?: string
561
+ details?: Record<string, unknown>
562
+ }
563
+ component:
564
+ | {
565
+ type: 'text'
566
+ text?: string
567
+ }
568
+ | {
569
+ type: 'component'
570
+ name: string
571
+ props: Record<string, unknown>
572
+ }
573
+
574
+ artifact: {
575
+ artifactId: string
576
+ taskId: string
577
+ name: string
578
+ description: string
579
+ artifactType: string
580
+ type: ArtifactType
581
+ artifactSummary: {
582
+ record_type: 'custom_question_answer' | 'site'
583
+ title: string
584
+ url?: string
585
+ }
586
+ }
587
+ }
588
+
589
+ export declare type DeepPartial<T> = {
590
+ [P in keyof T]?: T[P] extends Record<string, unknown> ? DeepPartial<T[P]> : T[P]
591
+ }
592
+
593
+ export declare type EntityType = 'conversation' | 'message' | 'search'
594
+
595
+ declare type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never
596
+
597
+ declare type ExpandUnion<T> = T extends any ? Expand<T> : never
598
+
599
+ declare type ExtendPropertiesWithCommon<T> = T extends { properties: infer P }
600
+ ? T & { properties: P & CommonProperties }
601
+ : T
602
+
603
+ export declare type FeebackReason = { label: string; details: string }
604
+
605
+ export declare interface FeedbackBody {
606
+ type: FeedbackType
607
+ messageId: string
608
+ createdAt: string
609
+ reasons?:
610
+ | {
611
+ label: string
612
+ details: string
613
+ }[]
614
+ | null
615
+ userProperties: UserProperties
616
+ properties?: Record<string, unknown>
617
+ }
618
+
619
+ export declare type FeedbackItemType = keyof MessageFeedback
620
+
621
+ declare interface FeedbackProperties {
622
+ conversationId?: string
623
+ // message: Message
624
+ reasons: FeebackReason[]
625
+ }
626
+
627
+ export declare type FeedbackType = 'positive' | 'negative'
628
+
629
+ export declare type FieldValues = Record<string, any>
630
+
631
+ declare interface FileField extends BaseFormField {
632
+ inputType: 'file'
633
+ }
634
+
635
+ export declare type FilterQuery =
636
+ | Record<string, QueryCondition | QueryValue | QueryValue[]>
637
+ | { $and: FilterQuery[] }
638
+ | { $or: FilterQuery[] }
639
+
640
+ export declare type FormField =
641
+ | CheckboxField
642
+ | ComboboxField
643
+ | FileField
644
+ | SelectField
645
+ | TextField
646
+ | IncludeChatSessionField
647
+
648
+ export declare type FormInputType = NonNullable<FormField['inputType']>
649
+
650
+ export declare interface GetHelpOption {
651
+ icon?: InkeepCustomIcon
652
+ name: string
653
+ isPinnedToToolbar?: boolean
654
+ /**
655
+ * Action to be performed when the option is clicked.
656
+ *
657
+ * ```ts
658
+ * action: {
659
+ * type: 'open_form',
660
+ * formSettings: {
661
+ * title: 'Open Form',
662
+ * description: 'Open a form',
663
+ * },
664
+ * }
665
+ * ```
666
+ * ```ts
667
+ * action: {
668
+ * type: 'open_link',
669
+ * url: 'https://example.com',
670
+ * }
671
+ * ```
672
+ * ```ts
673
+ * action: {
674
+ * type: 'invoke_callback',
675
+ * callback: (args: InvokeCallbackArgs) => {
676
+ * console.log(args)
677
+ * },
678
+ * }
679
+ * ```
680
+ */
681
+ action: ChatAction
682
+ }
683
+
684
+ export declare interface GetHelpOptionClickedEvent {
685
+ eventName: 'get_help_option_clicked'
686
+ properties: {
687
+ getHelpOption: GetHelpOption
688
+ conversationId?: string
689
+ }
690
+ }
691
+
692
+ export declare interface Heading {
693
+ anchor?: string | null
694
+ url?: string | null
695
+ content: string
696
+ isMatch?: boolean
697
+ }
698
+
699
+ export declare type IkpChatAction = GetHelpOption | CustomMessageAction
700
+
701
+ export declare type IkpTheme = DeepPartial<StrictIkpTheme>
702
+
703
+ export declare type IkpThemeCategory = keyof StrictIkpTheme
704
+
705
+ export declare type IkpThemeEntry = [keyof IkpTheme, Record<string, unknown>][]
706
+
707
+ export declare interface IncludeChatSessionField extends BaseFormField {
708
+ // _type tells special fields apart from standard fields
709
+ _type: 'include_chat_session'
710
+ inputType?: 'checkbox'
711
+ defaultValue?: boolean
712
+ }
713
+
714
+ export declare interface InkeepAIChatSettings {
715
+ /**
716
+ * Headers for requests
717
+ */
718
+ headers?: Record<string, string>
719
+
720
+ /**
721
+ * App ID for requests, can be generated in the Inkeep dashboard
722
+ */
723
+ appId?: string
724
+
725
+ /**
726
+ * Base API URL for token exchange, captcha challenge, and the chat run api
727
+ * @default https://api.agents.inkeep.com
728
+ */
729
+ baseUrl?: string
730
+
731
+ /**
732
+ * @deprecated Use `appId` instead
733
+ * API key for requests.
734
+ */
735
+ apiKey?: string
736
+
737
+ /**
738
+ * @deprecated Use `baseUrl` instead
739
+ * Agent URL for chatstream API.
740
+ */
741
+ agentUrl?: string
742
+
743
+ /**
744
+ * Context to be passed to the chatstream API.
745
+ */
746
+ context?: Record<string, unknown>
747
+
748
+ /**
749
+ * The placeholder text to display in the chat input field when empty.
750
+ * Use this to provide guidance on what kind of questions users can ask.
751
+ * "Ask me anything about our API documentation..."
752
+ */
753
+ placeholder?: string
754
+
755
+ /**
756
+ * A welcome message shown at the start of a new chat session.
757
+ * Supports markdown formatting for rich text styling.
758
+ * Use this to introduce the AI assistant's capabilities and set expectations.
759
+ * "👋 Hi! I'm here to help you with technical questions about our API..."
760
+ */
761
+ introMessage?: string
762
+
763
+ /**
764
+ * The name of the product/service/topic that the chat assistant specializes in.
765
+ * This helps contextualize the chat experience for users.
766
+ * If not provided, defaults to the organization name from base settings.
767
+ * "MongoDB Atlas" or "React Router"
768
+ */
769
+ chatSubjectName?: string
770
+
771
+ /**
772
+ * The display name for the AI assistant in the chat interface.
773
+ * Choose a name that reflects the assistant's role and your brand.
774
+ * "Atlas Assistant" or "DevBot"
775
+ */
776
+ aiAssistantName?: string
777
+
778
+ /**
779
+ * URL to the AI assistant's avatar image.
780
+ * Should be a square image, recommended size 40x40px.
781
+ * Supports common image formats (PNG, JPG, SVG).
782
+ *
783
+ * You can pass a string or an object to configure for different color modes.
784
+ * {
785
+ * light: 'https://example.com/avatar-light.png',
786
+ * dark: 'https://example.com/avatar-dark.png',
787
+ * }
788
+ */
789
+ aiAssistantAvatar?:
790
+ | string
791
+ | {
792
+ light: string
793
+ dark: string
794
+ }
795
+
796
+ /**
797
+ * URL to the user's avatar image in the chat interface.
798
+ * Should be a square image, recommended size 40x40px.
799
+ * Falls back to a default user icon if not provided.
800
+ */
801
+ userAvatar?: string
802
+
803
+ /**
804
+ * Controls whether links in chat messages open in new browser tabs.
805
+ * Enable this to help users maintain their chat context when following links.
806
+ * @default true
807
+ */
808
+ shouldOpenLinksInNewTab?: boolean
809
+
810
+ /**
811
+ * Custom heading text for the example questions section.
812
+ * Use this to better describe your suggested queries.
813
+ * "Common Questions" or "Try asking about..."
814
+ */
815
+ exampleQuestionsLabel?: string
816
+
817
+ /**
818
+ * A list of pre-written questions users can click to quickly start a conversation.
819
+ * These should reflect common use cases and help users understand the AI assistant's capabilities.
820
+ * ["How do I reset my password?", "What are the API rate limits?"] or [{ value: "How do I reset my password?", label: "How do I reset my password?" }, { value: "What are the API rate limits?", label: "What are the API rate limits?" }]
821
+ */
822
+ exampleQuestions?:
823
+ | string[]
824
+ | {
825
+ value: string
826
+ label: string
827
+ }[]
828
+
829
+ /**
830
+ * Whether to visually emphasize the first example question.
831
+ * Use this to draw attention to the most important or common query.
832
+ */
833
+ isFirstExampleQuestionHighlighted?: boolean
834
+
835
+ /**
836
+ * Enables the ability to share chat conversations via URL.
837
+ * Useful for allowing users to share helpful conversations with teammates.
838
+ */
839
+ isShareButtonVisible?: boolean
840
+
841
+ /**
842
+ * The base URL path used when generating shareable chat links.
843
+ * Should match your application's routing structure.
844
+ * "/shared-chats/" or "/support/conversations/"
845
+ */
846
+ shareChatUrlBasePath?: string
847
+
848
+ /**
849
+ * Controls the visibility of the copy chat button.
850
+ * Allows users to copy the entire chat transcript to their clipboard.
851
+ */
852
+ isCopyChatButtonVisible?: boolean
853
+
854
+ /**
855
+ * Unique identifier for loading a specific conversation.
856
+ * Use this to restore a previous conversation state.
857
+ */
858
+ conversationId?: string
859
+
860
+ /**
861
+ * When enabled, prevents users from sending new messages.
862
+ * Useful for displaying archived or shared chat sessions.
863
+ * @default false
864
+ */
865
+ isViewOnly?: boolean
866
+
867
+ /**
868
+ * Whether to make conversations public by default.
869
+ * @default undefined (private)
870
+ */
871
+ conversationVisibility?: 'public' | 'private'
872
+
873
+ /**
874
+ * Controls the visibility of the chat history button, which opens the list of previous chats.
875
+ * @default true
876
+ */
877
+ isChatHistoryButtonVisible?: boolean
878
+
879
+ /**
880
+ * Configuration for the chat's disclaimer message.
881
+ * Use this to display important notices about AI limitations or data usage.
882
+ */
883
+ disclaimerSettings?: AIChatDisclaimerSettings
884
+
885
+ /**
886
+ * Callback function triggered whenever the user modifies their input message.
887
+ *
888
+
889
+ * @param message - The current content of the input field
890
+ */
891
+ onInputMessageChange?: (message: string) => void
892
+
893
+ /**
894
+ * React ref for accessing the chat component's methods.
895
+ * Enables programmatic control of chat functions from parent components.
896
+ */
897
+ chatFunctionsRef?: React.Ref<AIChatFunctions>
898
+
899
+ /**
900
+ * Array of actions available in the "Get Help" menu.
901
+ * Use this to provide alternative support options like contact forms or documentation links.
902
+ */
903
+ getHelpOptions?: GetHelpOption[]
904
+
905
+ /**
906
+ * Array of actions available rendered after each message.
907
+ */
908
+ messageActions?: CustomMessageAction[]
909
+
910
+ /**
911
+ * Custom heading text for the workflows section.
912
+ * Use this to describe available automated processes or guided flows.
913
+ */
914
+ workflowsHeader?: string
915
+
916
+ /**
917
+ * Collection of interactive workflows that can be triggered during chat.
918
+ * These can guide users through complex processes or data collection.
919
+ */
920
+ // workflows?: Workflow[]
921
+
922
+ /**
923
+ * Custom labels for the chat interface's action buttons.
924
+ * Use this for internationalization or to better match your application's terminology.
925
+ */
926
+ toolbarButtonLabels?: AIChatToolbarButtonLabels
927
+
928
+ /**
929
+ * Filters to apply to the chat results.
930
+ */
931
+ filters?: SearchAndChatFilters
932
+
933
+ /**
934
+ * Components to be rendered in the chat interface.
935
+ */
936
+
937
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
938
+ components?: ComponentsConfig<any>
939
+
940
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
941
+ artifacts?: ComponentsConfig<any>
942
+ }
943
+
944
+ export declare interface InkeepBaseSettings {
945
+ /**
946
+ * The display name of your organization that will be shown in various UI elements.
947
+ * For example, this may appear in chat messages or headers.
948
+ */
949
+ organizationDisplayName?: string
950
+ /**
951
+ * The primary brand color used throughout the widget UI.
952
+ * This color will be used to generate a cohesive color scheme.
953
+ * Should be provided as a valid CSS color value (hex, rgb, etc).
954
+ */
955
+ primaryBrandColor: string
956
+ /**
957
+ * Settings to control the color mode (light/dark) behavior.
958
+ * Can be used to sync with your application's theme or set a forced color mode.
959
+ * @see ColorModeConfig type for detailed configuration options
960
+ */
961
+ colorMode?: ColorModeConfig
962
+ /**
963
+ * Theme customization settings for the widget.
964
+ * Allows customizing colors, typography, component styles, and more.
965
+ */
966
+ theme?: UserTheme
967
+ /**
968
+ * Custom icon overrides for the default icon set.
969
+ * Allows replacing any of the built-in icons with your own components.
970
+ */
971
+ customIcons?: CustomIconMap
972
+ /**
973
+ * Properties to identify and provide context about the current user.
974
+ * Used for personalization and analytics tracking.
975
+ * @see UserProperties interface for available fields
976
+ */
977
+ userProperties?: UserProperties
978
+ /**
979
+ * Authentication token for the current user.
980
+ * Used for authenticated API requests if required.
981
+ */
982
+ userAuthToken?: string
983
+ /**
984
+ * Additional properties to be sent with analytics events.
985
+ * These properties will be merged with the event properties.
986
+ */
987
+ analyticsProperties?: Record<string, unknown>
988
+ /**
989
+ * Handler for analytics events from the widget.
990
+
991
+ * @param event - The analytics event object
992
+ * @returns Promise that resolves when the event is logged
993
+ */
994
+ onEvent?: (event: InkeepCallbackEvent) => Promise<void>
995
+ /**
996
+ * Handler for feedback events from the widget.
997
+
998
+ * @param feedback - The feedback object
999
+ * @returns The feedback object
1000
+ */
1001
+ onFeedback?: (
1002
+ feedback: InkeepFeedback & {
1003
+ properties?: Record<string, unknown>
1004
+ },
1005
+ ) => Promise<InkeepFeedback>
1006
+
1007
+ /**
1008
+ * Whether to bypass the captcha challenge. Only enable this flag if using a server side API type api key, otherwise the api requests will fail without the challenge solution.
1009
+ * @default false
1010
+ */
1011
+ shouldBypassCaptcha?: boolean
1012
+ /**
1013
+ * Privacy and cookie preferences configuration.
1014
+ */
1015
+ privacyPreferences?: PrivacyPreferences
1016
+ /**
1017
+ * Function to transform source data before display.
1018
+ *
1019
+ * @remarks
1020
+ * Allows customizing how source information is presented in the widget.
1021
+
1022
+ * @param source - The original source data
1023
+ * @param type - The type of source data
1024
+ * @param opts - The options for the transform source
1025
+ * @returns The transformed source data
1026
+ */
1027
+ transformSource?: TransformSource
1028
+
1029
+ /**
1030
+ * Reference to the shadow DOM host element if using custom Shadow DOM.
1031
+ * Required when embedding the widget within a Shadow DOM.
1032
+ */
1033
+ shadowHost?: HTMLElement | null
1034
+ /**
1035
+ * Reference to the root element where the widget is mounted.
1036
+ * Used for positioning and event handling.
1037
+ */
1038
+ rootElement?: HTMLElement | null
1039
+ /**
1040
+ * Custom tags for widget identification.
1041
+ * Used in analytics to segment and filter widget instances.
1042
+ * Array of string identifiers.
1043
+ */
1044
+ tags?: string[]
1045
+ /**
1046
+ * Instance of the Prism syntax highlighting library.
1047
+ * Required for code block syntax highlighting functionality.
1048
+ */
1049
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1050
+ prism?: any
1051
+ /**
1052
+ * Query parameters to automatically append to URLs in the widget.
1053
+ * Useful for tracking or maintaining context in navigation.
1054
+ * Object mapping parameter names to values.
1055
+ */
1056
+ urlQueryParamsToAppend?: UrlQueryParam
1057
+ /**
1058
+ * Base-level filters to apply to all search and chat operations.
1059
+ * These are typically organization or user-level filters.
1060
+ */
1061
+ filters?: SearchAndChatFilters
1062
+ }
1063
+
1064
+ export declare type InkeepCallbackEvent = InkeepEventWithCommon
1065
+
1066
+ export declare type InkeepComponentInitializer = {
1067
+ (props: InkeepComponentProps): InkeepComponentInstance | undefined
1068
+ (targetSelector: string, props: InkeepComponentProps): InkeepComponentInstance | undefined
1069
+ }
1070
+
1071
+ /**
1072
+ * Represents an instance of any Inkeep component that is returned after initialization.
1073
+ * These instances have methods that can be used to update the component's state.
1074
+ */
1075
+ export declare interface InkeepComponentInstance {
1076
+ /**
1077
+ * Updates the component with new props
1078
+
1079
+ * @param newProps - The new props to apply to the component
1080
+ */
1081
+ update: <T extends object>(newProps: T) => void
1082
+
1083
+ /**
1084
+ * Unmounts the component from the DOM but preserves its state
1085
+ */
1086
+ unmount: () => void
1087
+
1088
+ /**
1089
+ * Remounts a previously unmounted component
1090
+ */
1091
+ remount: () => void
1092
+
1093
+ /**
1094
+ * Access to chat-specific functionality (only available for components with chat capabilities)
1095
+ */
1096
+ chat?: {
1097
+ // biome-ignore lint/suspicious/noExplicitAny: Required for flexible method signatures
1098
+ [key: string]: (...args: any[]) => any
1099
+ }
1100
+
1101
+ /**
1102
+ * Access to search-specific functionality (only available for components with search capabilities)
1103
+ */
1104
+ search?: {
1105
+ // biome-ignore lint/suspicious/noExplicitAny: Required for flexible method signatures
1106
+ [key: string]: (...args: any[]) => any
1107
+ }
1108
+ }
1109
+
1110
+ export declare type InkeepComponentProps = InkeepSettings & {
1111
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1112
+ [key: string]: any
1113
+ }
1114
+
1115
+ export declare interface InkeepConfig {
1116
+ /**
1117
+ * The prefix to use for the widget.
1118
+ * @default 'ikp'
1119
+ */
1120
+ prefix?: string
1121
+ /* Excluded from this release type: componentType */
1122
+ /**
1123
+ * Configuration for the chat.
1124
+ */
1125
+ aiChatSettings: InkeepAIChatSettings & {
1126
+ shouldAutoFocusInput?: boolean
1127
+ }
1128
+ /**
1129
+ * Configuration for the base settings.
1130
+ */
1131
+ baseSettings: InkeepBaseSettings
1132
+ /**
1133
+ * Configuration for the search settings.
1134
+ */
1135
+ searchSettings: InkeepSearchSettings & {
1136
+ shouldAutoFocusInput?: boolean
1137
+ }
1138
+ }
1139
+
1140
+ export declare type InkeepCustomIcon =
1141
+ | {
1142
+ builtIn: AvailableBuiltInIcons
1143
+ }
1144
+ | {
1145
+ custom: string // url of svg or png of icon
1146
+ }
1147
+
1148
+ export declare type InkeepEvent = SearchEvent | ChatEvent | WidgetEvent
1149
+
1150
+ export declare type InkeepEventWithCommon = ExtendPropertiesWithCommon<InkeepEvent>
1151
+
1152
+ export declare interface InkeepFeedback {
1153
+ type: FeedbackType
1154
+ messageId: string
1155
+ reasons?: FeebackReason[]
1156
+ }
1157
+
1158
+ export declare type InkeepJS = Partial<Record<InkeepJSComponent, InkeepComponentInitializer>>
1159
+
1160
+ /**
1161
+ * Represents the available Inkeep component types that can be rendered
1162
+ * via the global Inkeep object.
1163
+ */
1164
+ export declare type InkeepJSComponent =
1165
+ | 'EmbeddedChat'
1166
+ | 'EmbeddedSearch'
1167
+ | 'EmbeddedSearchAndChat'
1168
+ | 'ModalChat'
1169
+ | 'ModalSearch'
1170
+ | 'ModalSearchAndChat'
1171
+ | 'ChatButton'
1172
+ | 'ChatButtonModal'
1173
+ | 'SearchBar'
1174
+ | 'SidebarChat'
1175
+
1176
+ export declare interface InkeepSearchSettings {
1177
+ /**
1178
+ * The placeholder text to use.
1179
+ * @default
1180
+ * 'Search anything...' (desktop)
1181
+ * 'Search' (mobile)
1182
+ */
1183
+ placeholder?: string
1184
+ /**
1185
+ * The default query to use.
1186
+ * @default ''
1187
+ */
1188
+ defaultQuery?: string
1189
+ /**
1190
+ * Callback for when the search query changes.
1191
+ */
1192
+ onQueryChange?: (query: string) => void
1193
+ /**
1194
+ * Search callback function that handles all search functionality.
1195
+ * This callback handles the complete search implementation.
1196
+ * If not provided, the widget will warn and show no results.
1197
+ *
1198
+
1199
+ * @param query - The search query string
1200
+ * @param abortSignal - Signal to abort the search request
1201
+ *
1202
+ * @returns Promise that resolves with search results
1203
+ */
1204
+ onSearch?: (query: string, abortSignal: AbortSignal) => Promise<SourceItem[]>
1205
+ /**
1206
+ * The time in milliseconds to wait triggering the search.
1207
+ * @default 0
1208
+ */
1209
+ debounceTimeMs?: number
1210
+ /**
1211
+ * Ref to the AIChat component's callable functions
1212
+ */
1213
+ searchFunctionsRef?: React.Ref<SearchFunctions>
1214
+ /**
1215
+ * Controls whether links should open in a new tab.
1216
+ * @default false
1217
+ */
1218
+ shouldOpenLinksInNewTab?: boolean
1219
+ /**
1220
+ * Tabs to display in the search results, and in the **desired order**. Each tab can be either a string or a tuple of [string, options].
1221
+ *
1222
+ * Default tabs if none provided: All, Publications, PDFs, GitHub, Forums, Discord, Slack, StackOverflow
1223
+ *
1224
+ * Behavior:
1225
+ * - Omit 'All' from tabs array to hide the All tab
1226
+ * - Empty tabs array will show all results without tab UI
1227
+ * - Tabs only appear when they have results, unless isAlwaysVisible is set
1228
+ * ```ts
1229
+ * // Basic tabs
1230
+ * tabs: ['Publications', 'GitHub']
1231
+ *
1232
+ * // With isAlwaysVisible option
1233
+ * tabs: [
1234
+ * 'Publications',
1235
+ * ['GitHub', { isAlwaysVisible: true }] // Shows even with no results
1236
+ * ]
1237
+ * ```
1238
+ */
1239
+ tabs?: (string | SearchTab)[]
1240
+ /**
1241
+ * The key to use for the search query parameter.
1242
+ *
1243
+ * When a user selects a search result, the query is added to the URL as a query parameter.
1244
+ * This is the key of that query parameter.
1245
+ *
1246
+ */
1247
+ searchQueryParamKey?: string
1248
+ /**
1249
+ * The view to use for the search.
1250
+ * @default 'single-pane'
1251
+ */
1252
+ view?: 'single-pane' | 'dual-pane'
1253
+ }
1254
+
1255
+ export declare interface InkeepSettings {
1256
+ baseSettings?: InkeepBaseSettings
1257
+ aiChatSettings?: InkeepAIChatSettings
1258
+ searchSettings?: InkeepSearchSettings
1259
+ openSettings?: OpenSettingsModal
1260
+ }
1261
+
1262
+ export declare interface InvokeCallbackAction {
1263
+ type: 'invoke_callback'
1264
+ callback: (args: InvokeCallbackArgs) => void
1265
+ shouldCloseModal?: boolean
1266
+ }
1267
+
1268
+ export declare interface InvokeCallbackArgs {
1269
+ conversation: {
1270
+ id: string
1271
+ messages: Message[]
1272
+ }
1273
+ }
1274
+
1275
+ export declare interface InvokeMessageCallbackAction {
1276
+ type: 'invoke_message_callback'
1277
+ callback: (args: InvokeMessageCallbackActionArgs) => void
1278
+ shouldCloseModal?: boolean
1279
+ }
1280
+
1281
+ export declare interface InvokeMessageCallbackActionArgs extends InvokeCallbackArgs {
1282
+ messageId?: string
1283
+ }
1284
+
1285
+ export declare interface JSONSchema {
1286
+ $id?: string | undefined
1287
+ $comment?: string | undefined
1288
+
1289
+ /**
1290
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
1291
+ */
1292
+ type?: JSONSchemaTypeName | JSONSchemaTypeName[] | undefined
1293
+ enum?: JSONSchemaType[] | undefined
1294
+ const?: JSONSchemaType | undefined
1295
+
1296
+ /**
1297
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
1298
+ */
1299
+ multipleOf?: number | undefined
1300
+ maximum?: number | undefined
1301
+ exclusiveMaximum?: number | undefined
1302
+ minimum?: number | undefined
1303
+ exclusiveMinimum?: number | undefined
1304
+
1305
+ /**
1306
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
1307
+ */
1308
+ maxLength?: number | undefined
1309
+ minLength?: number | undefined
1310
+ pattern?: string | undefined
1311
+
1312
+ /**
1313
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
1314
+ */
1315
+ items?: JSONSchemaDefinition | JSONSchemaDefinition[] | undefined
1316
+ additionalItems?: JSONSchemaDefinition | undefined
1317
+ maxItems?: number | undefined
1318
+ minItems?: number | undefined
1319
+ uniqueItems?: boolean | undefined
1320
+ contains?: JSONSchemaDefinition | undefined
1321
+
1322
+ /**
1323
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
1324
+ */
1325
+ maxProperties?: number | undefined
1326
+ minProperties?: number | undefined
1327
+ required?: string[] | undefined
1328
+ properties?:
1329
+ | {
1330
+ [key: string]: JSONSchemaDefinition
1331
+ }
1332
+ | undefined
1333
+ patternProperties?:
1334
+ | {
1335
+ [key: string]: JSONSchemaDefinition
1336
+ }
1337
+ | undefined
1338
+ additionalProperties?: JSONSchemaDefinition | undefined
1339
+ propertyNames?: JSONSchemaDefinition | undefined
1340
+
1341
+ /**
1342
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
1343
+ */
1344
+ if?: JSONSchemaDefinition | undefined
1345
+ then?: JSONSchemaDefinition | undefined
1346
+ else?: JSONSchemaDefinition | undefined
1347
+
1348
+ /**
1349
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
1350
+ */
1351
+ allOf?: JSONSchemaDefinition[] | undefined
1352
+ anyOf?: JSONSchemaDefinition[] | undefined
1353
+ oneOf?: JSONSchemaDefinition[] | undefined
1354
+ not?: JSONSchemaDefinition | undefined
1355
+
1356
+ /**
1357
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
1358
+ */
1359
+ format?: string | undefined
1360
+
1361
+ /**
1362
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
1363
+ */
1364
+ title?: string | undefined
1365
+ description?: string | undefined
1366
+ default?: JSONSchemaType | undefined
1367
+ readOnly?: boolean | undefined
1368
+ writeOnly?: boolean | undefined
1369
+ examples?: JSONSchemaType | undefined
1370
+ }
1371
+
1372
+ export declare interface JSONSchemaArray extends Array<JSONSchemaType> {}
1373
+
1374
+ /**
1375
+ * JSON Schema v7
1376
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
1377
+ */
1378
+ export declare type JSONSchemaDefinition = JSONSchema | boolean
1379
+
1380
+ export declare interface JSONSchemaObject {
1381
+ [key: string]: JSONSchemaType
1382
+ }
1383
+
1384
+ /**
1385
+ * Primitive type
1386
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
1387
+ */
1388
+ export declare type JSONSchemaType =
1389
+ | string //
1390
+ | number
1391
+ | boolean
1392
+ | JSONSchemaObject
1393
+ | JSONSchemaArray
1394
+ | null
1395
+
1396
+ /**
1397
+ * Primitive type
1398
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
1399
+ */
1400
+ export declare type JSONSchemaTypeName =
1401
+ | ({} & string)
1402
+ | 'string'
1403
+ | 'number'
1404
+ | 'integer'
1405
+ | 'boolean'
1406
+ | 'object'
1407
+ | 'array'
1408
+ | 'null'
1409
+
1410
+ /**
1411
+ * Meta schema
1412
+ *
1413
+ * Recommended values:
1414
+ * - 'http://json-schema.org/schema#'
1415
+ * - 'http://json-schema.org/hyper-schema#'
1416
+ * - 'http://json-schema.org/draft-07/schema#'
1417
+ * - 'http://json-schema.org/draft-07/hyper-schema#'
1418
+ *
1419
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
1420
+ */
1421
+ export declare type JSONSchemaVersion = string
1422
+
1423
+ export declare type Message = UIMessage<unknown, DataParts>
1424
+
1425
+ export declare type MessageAction = 'copy' | 'upvote' | 'downvote'
1426
+
1427
+ export declare interface MessageAttachment {
1428
+ contentType: MessageAttachmentContentType
1429
+ title: string
1430
+ content: string
1431
+ id: string
1432
+ context?: string[]
1433
+ }
1434
+
1435
+ /**
1436
+ * MessageAttachmentContentType represents possible type of information that can be attached to a Workflow.
1437
+ */
1438
+ export declare type MessageAttachmentContentType = WorkflowCodeContentType | WorkflowTextContentType
1439
+
1440
+ export declare interface MessageAttributes {
1441
+ attachments?: MessageAttachment[]
1442
+ workflow?: Workflow
1443
+ }
1444
+
1445
+ declare type MessageChatAction = ExpandUnion<InvokeMessageCallbackAction | OpenFormAction | OpenUrlAction>
1446
+
1447
+ export declare interface MessageFeedback {
1448
+ unrelated_response: boolean
1449
+ inaccurate_statement: boolean
1450
+ inaccurate_code_snippet: boolean
1451
+ irrelevant_citations: boolean
1452
+ }
1453
+
1454
+ export declare interface MessageMetadata {
1455
+ attributes?: MessageAttributes
1456
+ context?: string
1457
+ }
1458
+
1459
+ export declare interface ModalClosedEvent {
1460
+ eventName: 'modal_closed'
1461
+ properties: {}
1462
+ }
1463
+
1464
+ export declare interface ModalOpenedEvent {
1465
+ eventName: 'modal_opened'
1466
+ properties: {}
1467
+ }
1468
+
1469
+ export declare type ModalViewTypes = 'chat' | 'search'
1470
+
1471
+ export declare interface OpenFormAction {
1472
+ type: 'open_form'
1473
+ formSettings: AIChatFormSettings
1474
+ }
1475
+
1476
+ export declare interface OpenSettingsChatButton extends BaseOpenSettings {}
1477
+
1478
+ export declare interface OpenSettingsModal extends BaseOpenSettings {
1479
+ /**
1480
+ * The trigger selector.
1481
+ *
1482
+ * The selector to trigger the modal when clicked.
1483
+ *
1484
+ * @default '[data-inkeep-modal-trigger]'
1485
+ */
1486
+ triggerSelector?: string
1487
+ }
1488
+
1489
+ export declare interface OpenSettingsSearchBar extends BaseOpenSettings {
1490
+ /**
1491
+ * The shortcut key.
1492
+ *
1493
+ * The key to trigger the searchbar when pressed with Cmd (Mac) / Ctrl (Windows).
1494
+ *
1495
+ * Set to `null` to disable the shortcut.
1496
+ *
1497
+ * @default 'k'
1498
+ */
1499
+ shortcutKey?: string | null
1500
+ }
1501
+
1502
+ export declare interface OpenSettingsSidebar extends BaseOpenSettings {
1503
+ /**
1504
+ * The trigger selector for the sidebar chat.
1505
+ * @default '[data-inkeep-sidebar-chat-trigger]'
1506
+ */
1507
+ triggerSelector?: string
1508
+
1509
+ /**
1510
+ * Threshold factor for auto-closing when resizing.
1511
+ * When dragging below (minWidth * autoCloseThreshold), the sidebar will auto-close.
1512
+ * @default 0.7 (70% of minimum width)
1513
+ */
1514
+ autoCloseThreshold?: number
1515
+ }
1516
+
1517
+ export declare interface OpenUrlAction {
1518
+ type: 'open_link'
1519
+ url: string
1520
+ }
1521
+
1522
+ export declare type OperationType =
1523
+ | 'error'
1524
+ | 'agent_initializing'
1525
+ | 'completion'
1526
+ | 'agent_generate'
1527
+ | 'agent_reasoning'
1528
+ | 'tool_call'
1529
+ | 'tool_result'
1530
+ | 'transfer'
1531
+ | 'delegation_sent'
1532
+ | 'delegation_returned'
1533
+ | 'artifact_saved'
1534
+
1535
+ export declare interface PrivacyPreferences {
1536
+ /**
1537
+ * Whether to opt out of analytical cookies.
1538
+ * @default false
1539
+ */
1540
+ optOutAnalyticalCookies?: boolean
1541
+ /**
1542
+ * Whether to opt out of all analytics.
1543
+ * @default false
1544
+ */
1545
+ optOutAllAnalytics?: boolean
1546
+ /**
1547
+ * Whether to opt out of functional cookies.
1548
+ * @default false
1549
+ */
1550
+ optOutFunctionalCookies?: boolean
1551
+ }
1552
+
1553
+ declare type QueryCondition = { $eq: QueryValue } | { $in: (number | string)[] }
1554
+
1555
+ declare type QueryValue = boolean | number | string
1556
+
1557
+ export declare type RenderFn = ({
1558
+ children,
1559
+ ssr,
1560
+ root,
1561
+ }: {
1562
+ children: ReactNode
1563
+ ssr: boolean
1564
+ root: ShadowRoot | null
1565
+ }) => ReactNode
1566
+
1567
+ export declare type Root = Record<string, ComponentType<HTMLProps<HTMLElement> & ShadowRootProps>>
1568
+
1569
+ export declare interface SearchAndChatFilters {
1570
+ attributes?: {
1571
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1572
+ [key: string]: any
1573
+ }
1574
+ }
1575
+
1576
+ export declare type SearchEvent =
1577
+ | SearchQueryResponseReceivedEvent
1578
+ | SearchQuerySubmittedEvent
1579
+ | SearchResultClickedEvent
1580
+
1581
+ export declare interface SearchFunctions {
1582
+ /**
1583
+ * Update the query.
1584
+ */
1585
+ updateQuery: (query: string) => void
1586
+ /**
1587
+ * Focus the input.
1588
+ */
1589
+ focusInput: () => void
1590
+ }
1591
+
1592
+ export declare interface SearchQueryResponseReceivedEvent {
1593
+ eventName: 'search_query_response_received'
1594
+ properties: {
1595
+ searchQuery: string
1596
+ totalResults: number
1597
+ }
1598
+ }
1599
+
1600
+ export declare interface SearchQuerySubmittedEvent {
1601
+ eventName: 'search_query_submitted'
1602
+ properties: {
1603
+ searchQuery: string
1604
+ }
1605
+ }
1606
+
1607
+ export declare interface SearchResultClickedEvent {
1608
+ eventName: 'search_result_clicked'
1609
+ properties: {
1610
+ searchQuery: string
1611
+ title?: string
1612
+ url?: string
1613
+ }
1614
+ }
1615
+
1616
+ export declare interface SearchTab {
1617
+ [0]: string
1618
+ [1]: {
1619
+ isAlwaysVisible?: boolean
1620
+ }
1621
+ }
1622
+
1623
+ declare interface SelectField extends BaseFormField {
1624
+ inputType: 'select'
1625
+ items: SelectItem[]
1626
+ defaultValue?: string
1627
+ placeholder?: string
1628
+ }
1629
+
1630
+ export declare interface SelectItem {
1631
+ label: string
1632
+ value: string
1633
+ }
1634
+
1635
+ export declare interface ShadowRootProps {
1636
+ mode?: 'closed' | 'open'
1637
+ delegatesFocus?: boolean
1638
+ styleSheets?: CSSStyleSheet[]
1639
+ ssr?: boolean
1640
+ children?: ReactNode
1641
+ }
1642
+
1643
+ export declare interface SharedChatLoadedEvent {
1644
+ eventName: 'shared_chat_loaded'
1645
+ properties: {
1646
+ conversationId?: string
1647
+ }
1648
+ }
1649
+
1650
+ export declare interface SourceItem {
1651
+ id?: string
1652
+ title: string | undefined
1653
+ url: string
1654
+ description: string | undefined
1655
+ breadcrumbs: string[]
1656
+ type: string
1657
+ contentType?: string
1658
+ tag?: string
1659
+ tabs?: (SourceTab | string)[]
1660
+ headings?: Heading[]
1661
+ preview?: string
1662
+ }
1663
+
1664
+ export declare interface SourceTab {
1665
+ [0]: string
1666
+ [1]: {
1667
+ breadcrumbs: string[]
1668
+ }
1669
+ }
1670
+
1671
+ export declare interface StrictIkpTheme {
1672
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1673
+ colors: Record<string, any>
1674
+ fontFamily: Record<string, string>
1675
+ fontSize: Record<string, string>
1676
+ zIndex: Record<string, string | number>
1677
+ }
1678
+
1679
+ export declare interface Style {
1680
+ /**
1681
+ * A unique identifier for the style.
1682
+ * This is used to prevent duplicate styles and allow for style updates.
1683
+ * key: 'custom-button-styles'
1684
+ */
1685
+ key?: string
1686
+ /**
1687
+ * The type of style to apply.
1688
+ * - 'link': Adds a <link> tag to load external resources like fonts or stylesheets
1689
+ * - 'style': Injects CSS directly into a <style> tag
1690
+ * type: 'link' // For loading external resources
1691
+ * type: 'style' // For inline CSS
1692
+ */
1693
+ type: 'link' | 'style'
1694
+ /**
1695
+ * The content of the style.
1696
+ * For type='link', this should be a valid URL to an external resource.
1697
+ * For type='style', this should be valid CSS code.
1698
+ *
1699
+ * ```ts
1700
+ * // For type='link':
1701
+ * value: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap'
1702
+ *
1703
+ * // For type='style':
1704
+ * value: `.custom-button {
1705
+ * background: blue;
1706
+ * color: white;
1707
+ * }`
1708
+ * ```
1709
+ */
1710
+ value: string
1711
+ }
1712
+
1713
+ export declare type SubmitCallback = (values: SubmitCallbackArgs) => Promise<void> | void
1714
+
1715
+ export declare interface SubmitCallbackArgs {
1716
+ values: FieldValues
1717
+ conversation?: {
1718
+ id: string
1719
+ messages: Message[]
1720
+ }
1721
+ }
1722
+
1723
+ export declare interface SyncColorMode {
1724
+ /**
1725
+ * The HTML element to watch for color mode changes.
1726
+ * This element's attributes will be monitored for changes to determine the color mode.
1727
+ *
1728
+ * Common use cases include watching the document root or a specific app container.
1729
+ * ```ts
1730
+ * // Watch the document root element
1731
+ * target: document.documentElement
1732
+ *
1733
+ * // Watch a specific container element
1734
+ * target: document.querySelector('#app')
1735
+ *
1736
+ * // Watch a specific element by ID
1737
+ * target: '#app'
1738
+ * ```
1739
+ */
1740
+ target: HTMLElement | null | string
1741
+
1742
+ /**
1743
+ * The specific attributes to monitor for color mode changes.
1744
+ * The observer will only trigger when these attributes change on the target element.
1745
+ *
1746
+ * Common attributes used for theming include:
1747
+ * - data-theme: Custom theme attribute
1748
+ * - color-scheme: Standard CSS color scheme
1749
+ * - class: Class-based theming
1750
+ * ```ts
1751
+ * // Watch data-theme attribute
1752
+ * attributes: ['data-theme']
1753
+ *
1754
+ * // Watch color-scheme attribute
1755
+ * attributes: ['color-scheme']
1756
+ *
1757
+ * // Watch class changes
1758
+ * attributes: ['class']
1759
+ * ```
1760
+ */
1761
+ attributes: string[]
1762
+
1763
+ /**
1764
+ * A function that determines if dark mode is active based on the target element's attributes.
1765
+ *
1766
+ * @remarks
1767
+ * The function receives an object containing the current values of all monitored attributes,
1768
+ * where the keys are attribute names and values are the attribute values.
1769
+ *
1770
+
1771
+ * @param attributes - Object containing the current values of monitored attributes
1772
+ * @returns True if dark mode is detected, false otherwise
1773
+ * ```ts
1774
+ * // Check data-theme attribute
1775
+ * isDarkMode: (attributes) => attributes['data-theme'] === 'dark'
1776
+ *
1777
+ * // Check class for dark mode
1778
+ * isDarkMode: (attributes) => /\bdark\b/.test(attributes['class'])
1779
+ *
1780
+ * // Check color-scheme
1781
+ * isDarkMode: (attributes) => attributes['color-scheme'] === 'dark'
1782
+ * ```
1783
+ */
1784
+ isDarkMode?: (attributes: Record<string, string | null>) => boolean
1785
+
1786
+ /**
1787
+ * Optional callback function that is invoked whenever the color mode changes.
1788
+ *
1789
+ * This can be used to perform side effects or sync the color mode with other parts of your application.
1790
+ *
1791
+
1792
+ * @param colorMode - The new color mode value ('light' | 'dark')
1793
+ * ```ts
1794
+ * onChange: (colorMode) => {
1795
+ * console.log(`Color mode changed to: ${colorMode}`);
1796
+ * // Update other UI elements
1797
+ * }
1798
+ * ```
1799
+ */
1800
+ onChange?: (colorMode: string) => void
1801
+ }
1802
+
1803
+ export declare interface SyntaxHighlighterTheme {
1804
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1805
+ lightTheme?: any
1806
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1807
+ darkTheme?: any
1808
+ }
1809
+
1810
+ declare interface TextField extends BaseFormField {
1811
+ inputType: 'email' | 'text' | 'textarea'
1812
+ defaultValue?: string
1813
+ placeholder?: string
1814
+ }
1815
+
1816
+ export declare interface TransformedSource {
1817
+ /**
1818
+ * ID of the source.
1819
+ */
1820
+ id?: string
1821
+ /**
1822
+ * Title of the source.
1823
+ */
1824
+ title: string
1825
+ /**
1826
+ * URL of the source.
1827
+ */
1828
+ url: string
1829
+ /**
1830
+ * Description of the source.
1831
+ */
1832
+ description?: string
1833
+ /**
1834
+ * Breadcrumbs for the source.
1835
+ * ```ts
1836
+ * breadcrumbs: ['Subpath', 'Page']
1837
+ * ```
1838
+ */
1839
+ breadcrumbs?: string[]
1840
+ /**
1841
+ * Tabs where this source shows up. (Only for searchResultsItem)
1842
+ * ```ts
1843
+ * tabs: ['Docs']
1844
+ * tabs: ['Docs', 'API']
1845
+ * ```
1846
+ * You can also specify different breadcrumbs for specific tab.
1847
+ *
1848
+ * ```ts
1849
+ * tabs: ['Docs', ['API', { breadcrumbs: ['Guides', 'API'] }]]
1850
+ * ```
1851
+ */
1852
+ tabs?: (SourceTab | string)[]
1853
+ /**
1854
+ * Icon of the source.
1855
+ * ```ts
1856
+ * icon: { builtIn: 'LuBookOpen' }
1857
+ * icon: { custom: 'https://example.com/icon.svg' }
1858
+ * ```
1859
+ */
1860
+ icon: InkeepCustomIcon
1861
+ /**
1862
+ * Whether to open the source in a new tab.
1863
+ */
1864
+ shouldOpenInNewTab?: boolean
1865
+ /**
1866
+ * Search query params to append to the URL.
1867
+ * If you want to know if the source is from chat or search, you can append the source type to the URL.
1868
+ * ```ts
1869
+ * appendToUrl: { from: 'chatSourceItem' }
1870
+ * ```
1871
+ */
1872
+ appendToUrl?: UrlQueryParam
1873
+ /**
1874
+ * Type of the source.
1875
+ */
1876
+ type: string
1877
+ /**
1878
+ * Tag to append to the source.
1879
+ */
1880
+ tag?: string
1881
+ }
1882
+
1883
+ export declare type TransformSource = (
1884
+ source: SourceItem,
1885
+ type: TransformSourceType,
1886
+ opts?: TransformSourceOptions,
1887
+ ) => Partial<TransformedSource>
1888
+
1889
+ export declare interface TransformSourceOptions {
1890
+ organizationDisplayName?: string
1891
+ tabs?: InkeepSearchSettings['tabs']
1892
+ }
1893
+
1894
+ export declare type TransformSourceType = 'chatSourceItem' | 'searchResultItem'
1895
+
1896
+ export declare type UrlQueryParam = Record<string, string>
1897
+
1898
+ export declare interface UseColorModeProps {
1899
+ /** List of all available colorMode names */
1900
+ colorModes: string[]
1901
+ /** Forced colorMode name for the current page */
1902
+ forcedColorMode?: string
1903
+ /** Update the colorMode */
1904
+ setColorMode: (colorMode: string) => void
1905
+ /** Active colorMode name */
1906
+ colorMode?: string
1907
+ /** If `enableSystem` is true and the active colorMode is "system", this returns whether the system preference resolved to "dark" or "light". Otherwise, identical to `colorMode` */
1908
+ resolvedColorMode?: string
1909
+ /** If enableSystem is true, returns the System colorMode preference ("dark" or "light"), regardless what the active colorMode is */
1910
+ systemColorMode?: 'dark' | 'light'
1911
+ }
1912
+
1913
+ export declare interface UserEscalationIndicatedEvent {
1914
+ eventName: 'user_escalation_indicated'
1915
+ properties: {
1916
+ escalationType: 'downvote' | 'get_help_option' | 'contact_us' | 'support_form'
1917
+ getHelpOption?: GetHelpOption
1918
+ getHelpOptionName?: string
1919
+ conversationId?: string
1920
+ }
1921
+ }
1922
+
1923
+ export declare interface UserMessageSubmittedEvent {
1924
+ eventName: 'user_message_submitted'
1925
+ properties: {
1926
+ // message: Message
1927
+ conversationId?: string
1928
+ }
1929
+ }
1930
+
1931
+ export declare type UserProperties = {
1932
+ /**
1933
+ * The user ID.
1934
+ */
1935
+ id?: string
1936
+ /**
1937
+ * The user email.
1938
+ */
1939
+ email?: string
1940
+ /**
1941
+ * The user name.
1942
+ */
1943
+ name?: string
1944
+ /**
1945
+ * The user cohorts.
1946
+ */
1947
+ cohorts?: string[]
1948
+ } & Record<string, unknown>
1949
+
1950
+ export declare interface UserProvidedColorScheme {
1951
+ textBold?: string
1952
+ textSubtle?: string
1953
+ lighter?: string
1954
+ light?: string
1955
+ lightSubtle?: string
1956
+ medium?: string
1957
+ mediumSubtle?: string
1958
+ strongerLight?: string
1959
+ strong?: string
1960
+ stronger?: string
1961
+ textColorOnPrimary?: string
1962
+ }
1963
+
1964
+ export declare interface UserTheme extends Partial<IkpTheme> {
1965
+ /**
1966
+ * Whether to disable loading the default font.
1967
+ * @default false
1968
+ */
1969
+ disableLoadingDefaultFont?: boolean
1970
+ /**
1971
+ * The syntax highlighter theme configuration for code blocks.
1972
+ * Allows setting different themes for light and dark modes.
1973
+ * ```ts
1974
+ * syntaxHighlighter: {
1975
+ * lightTheme: themes.github,
1976
+ * darkTheme: themes.dracula
1977
+ * }
1978
+ * ```
1979
+ */
1980
+ syntaxHighlighter?: SyntaxHighlighterTheme
1981
+
1982
+ /**
1983
+ * The primary colors used to generate the color scheme.
1984
+ * These colors will be used to create variations for different UI states.
1985
+ * ```ts
1986
+ * primaryColors: {
1987
+ * primary: '#26D6FF',
1988
+ * secondary: '#6366F1'
1989
+ * }
1990
+ * ```
1991
+ */
1992
+ primaryColors?: UserProvidedColorScheme
1993
+
1994
+ /**
1995
+ * The class name for the container that holds CSS variables.
1996
+ * This class will be added to a wrapper div that provides theming context.
1997
+ *
1998
+ * @default 'ikp-variables'
1999
+ */
2000
+ varsClassName?: string
2001
+
2002
+ /**
2003
+ * Custom styles to be injected into the widget.
2004
+ * Supports both inline styles and external stylesheets/resources.
2005
+ * Styles are uniquely identified by their key to prevent duplicates.
2006
+ * ```ts
2007
+ * styles: [
2008
+ * // External stylesheet or font
2009
+ * {
2010
+ * key: 'google-fonts',
2011
+ * type: 'link',
2012
+ * value: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap'
2013
+ * },
2014
+ * // Custom CSS rules
2015
+ * {
2016
+ * key: 'custom-theme',
2017
+ * type: 'style',
2018
+ * value: `
2019
+ * .ikp-ai-chat-message {
2020
+ * border-radius: 8px;
2021
+ * padding: 12px;
2022
+ * }
2023
+ * [data-theme='dark'] .ikp-ai-chat-message {
2024
+ * background: #2D3748;
2025
+ * }
2026
+ * `
2027
+ * }
2028
+ * ]
2029
+ * ```
2030
+ */
2031
+ styles?: Style[]
2032
+ }
2033
+
2034
+ /** Adapted from https://github.com/pacocoursey/next-theme/blob/a385b8d865bbb317ff73a5b6c1319ae566f7d6f1/src/types.ts */
2035
+
2036
+ declare interface ValueObject {
2037
+ [colorModeName: string]: string
2038
+ }
2039
+
2040
+ export declare type WidgetEvent =
2041
+ | ModalOpenedEvent
2042
+ | ModalClosedEvent
2043
+ | ChatBubbleOpenedEvent
2044
+ | ChatBubbleClosedEvent
2045
+
2046
+ export declare interface WidgetView {
2047
+ /**
2048
+ * Callback fired when the user toggles between chat and search views.
2049
+ *
2050
+ * The parent component can use this
2051
+ * to coordinate showing/hiding the appropriate view.
2052
+ */
2053
+ onToggleView?: (opts: { view: ModalViewTypes; query?: string; autoSubmit?: boolean }) => void
2054
+ /**
2055
+ * The label for the Ask AI button.
2056
+ */
2057
+ askAILabel?: string
2058
+ /**
2059
+ * The label for the Search button.
2060
+ */
2061
+ searchLabel?: string
2062
+ /**
2063
+ * The label for the Ask AI card.
2064
+ */
2065
+ askAICardLabel?: string
2066
+ }
2067
+
2068
+ /**
2069
+ * Workflow defines the interaction steps for the AI bot.
2070
+ */
2071
+ export declare interface Workflow {
2072
+ id: string
2073
+ displayName: string
2074
+ goals: string[]
2075
+ informationToCollect: WorkflowInformationToCollect[]
2076
+ botPersona?: string
2077
+ // userPersonna?: string;
2078
+ context?: string[]
2079
+ guidance?: string[]
2080
+ initialReplyMessage: string
2081
+ supportedInputs?: WorkflowInputTypes[]
2082
+ }
2083
+
2084
+ /**
2085
+ * BaseType is a base interface for data types.
2086
+ */
2087
+ declare interface WorkflowBaseContentType {
2088
+ type: string
2089
+ contentInputLabel: string // for serialization
2090
+ attachmentIcon?: InkeepCustomIcon // icon next to the title in the attachment item
2091
+ }
2092
+
2093
+ /**
2094
+ * WorkflowInputType defines the type of attachments in a Workflow.
2095
+ */
2096
+ export declare interface WorkflowBaseInputTypes {
2097
+ id: string
2098
+ type: string
2099
+ displayName: string // button label
2100
+ }
2101
+
2102
+ export declare interface WorkflowCodeContentType extends WorkflowBaseContentType {
2103
+ type: 'CODE'
2104
+ language: string
2105
+ }
2106
+
2107
+ /**
2108
+ * WorkflowFunctionalMultiInput represents a function to be called when the attachment is invoked.
2109
+ */
2110
+ export declare interface WorkflowFunctionalMultiInput extends WorkflowBaseInputTypes {
2111
+ type: 'FUNCTIONAL_MULTI_ATTACHMENT'
2112
+ onInvoke: (
2113
+ workflow: Workflow,
2114
+ selectedInputType: WorkflowInputTypes,
2115
+ callback: (messageAttachments: MessageAttachment[]) => void,
2116
+ currentMessageAttachments: MessageAttachment[],
2117
+ ) => void
2118
+ }
2119
+
2120
+ export declare interface WorkflowInformationToCollect {
2121
+ description: string
2122
+ required: boolean
2123
+ }
2124
+
2125
+ /**
2126
+ * WorkflowInputTypes represents possible ways of collecting attachments in a Workflow.
2127
+ */
2128
+ export declare type WorkflowInputTypes = WorkflowFunctionalMultiInput | WorkflowModalSingleInput
2129
+
2130
+ export declare interface WorkflowModalProps {
2131
+ titleInputLabel?: string // defaults to 'Title'
2132
+ modalHelpText?: string // help text for the modal
2133
+ modalHelpElement?: React.ReactElement // help element for the modal
2134
+ }
2135
+
2136
+ /**
2137
+ * WorkflowModalSingleInput represents a modal input type.
2138
+ */
2139
+ export declare interface WorkflowModalSingleInput extends WorkflowBaseInputTypes {
2140
+ type: 'MODAL'
2141
+ contentType: MessageAttachmentContentType
2142
+ workflowModalProps?: WorkflowModalProps
2143
+ }
2144
+
2145
+ export declare interface WorkflowTextContentType extends WorkflowBaseContentType {
2146
+ type: 'text'
2147
+ }
2148
+
2149
+ export { }
2150
+
2151
+
2152
+ declare global {
2153
+ var Inkeep: import('@inkeep/agents-ui/types').InkeepJS;
2154
+ interface Window {
2155
+ Inkeep: import('@inkeep/agents-ui/types').InkeepJS;
2156
+ }
2157
+ }