@inkeep/agents-ui-js-cloud 0.15.14 → 0.15.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.
@@ -0,0 +1,2299 @@
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 enum GitHubIssueState {
693
+ Closed = 'CLOSED',
694
+ Open = 'OPEN',
695
+ }
696
+
697
+ export declare interface Heading {
698
+ anchor?: string | null
699
+ url?: string | null
700
+ content: string
701
+ isMatch?: boolean
702
+ }
703
+
704
+ export declare type IkpChatAction = GetHelpOption | CustomMessageAction
705
+
706
+ export declare type IkpTheme = DeepPartial<StrictIkpTheme>
707
+
708
+ export declare type IkpThemeCategory = keyof StrictIkpTheme
709
+
710
+ export declare type IkpThemeEntry = [keyof IkpTheme, Record<string, unknown>][]
711
+
712
+ export declare interface IncludeChatSessionField extends BaseFormField {
713
+ // _type tells special fields apart from standard fields
714
+ _type: 'include_chat_session'
715
+ inputType?: 'checkbox'
716
+ defaultValue?: boolean
717
+ }
718
+
719
+ export declare interface InkeepAIChatSettings {
720
+ /**
721
+ * Headers for requests
722
+ */
723
+ headers?: Record<string, string>
724
+
725
+ /**
726
+ * App ID for requests, can be generated in the Inkeep dashboard
727
+ */
728
+ appId?: string
729
+
730
+ /**
731
+ * Base API URL for token exchange, captcha challenge, and the chat run api
732
+ * @default https://api.agents.inkeep.com
733
+ */
734
+ baseUrl?: string
735
+
736
+ /**
737
+ * @deprecated Use `appId` instead
738
+ * API key for requests.
739
+ */
740
+ apiKey?: string
741
+
742
+ /**
743
+ * @deprecated Use `baseUrl` instead
744
+ * Agent URL for chatstream API.
745
+ */
746
+ agentUrl?: string
747
+
748
+ /**
749
+ * Context to be passed to the chatstream API.
750
+ */
751
+ context?: Record<string, unknown>
752
+
753
+ /**
754
+ * The placeholder text to display in the chat input field when empty.
755
+ * Use this to provide guidance on what kind of questions users can ask.
756
+ * "Ask me anything about our API documentation..."
757
+ */
758
+ placeholder?: string
759
+
760
+ /**
761
+ * A welcome message shown at the start of a new chat session.
762
+ * Supports markdown formatting for rich text styling.
763
+ * Use this to introduce the AI assistant's capabilities and set expectations.
764
+ * "👋 Hi! I'm here to help you with technical questions about our API..."
765
+ */
766
+ introMessage?: string
767
+
768
+ /**
769
+ * The name of the product/service/topic that the chat assistant specializes in.
770
+ * This helps contextualize the chat experience for users.
771
+ * If not provided, defaults to the organization name from base settings.
772
+ * "MongoDB Atlas" or "React Router"
773
+ */
774
+ chatSubjectName?: string
775
+
776
+ /**
777
+ * The display name for the AI assistant in the chat interface.
778
+ * Choose a name that reflects the assistant's role and your brand.
779
+ * "Atlas Assistant" or "DevBot"
780
+ */
781
+ aiAssistantName?: string
782
+
783
+ /**
784
+ * URL to the AI assistant's avatar image.
785
+ * Should be a square image, recommended size 40x40px.
786
+ * Supports common image formats (PNG, JPG, SVG).
787
+ *
788
+ * You can pass a string or an object to configure for different color modes.
789
+ * {
790
+ * light: 'https://example.com/avatar-light.png',
791
+ * dark: 'https://example.com/avatar-dark.png',
792
+ * }
793
+ */
794
+ aiAssistantAvatar?:
795
+ | string
796
+ | {
797
+ light: string
798
+ dark: string
799
+ }
800
+
801
+ /**
802
+ * URL to the user's avatar image in the chat interface.
803
+ * Should be a square image, recommended size 40x40px.
804
+ * Falls back to a default user icon if not provided.
805
+ */
806
+ userAvatar?: string
807
+
808
+ /**
809
+ * Controls whether links in chat messages open in new browser tabs.
810
+ * Enable this to help users maintain their chat context when following links.
811
+ * @default true
812
+ */
813
+ shouldOpenLinksInNewTab?: boolean
814
+
815
+ /**
816
+ * Custom heading text for the example questions section.
817
+ * Use this to better describe your suggested queries.
818
+ * "Common Questions" or "Try asking about..."
819
+ */
820
+ exampleQuestionsLabel?: string
821
+
822
+ /**
823
+ * A list of pre-written questions users can click to quickly start a conversation.
824
+ * These should reflect common use cases and help users understand the AI assistant's capabilities.
825
+ * ["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?" }]
826
+ */
827
+ exampleQuestions?:
828
+ | string[]
829
+ | {
830
+ value: string
831
+ label: string
832
+ }[]
833
+
834
+ /**
835
+ * Whether to visually emphasize the first example question.
836
+ * Use this to draw attention to the most important or common query.
837
+ */
838
+ isFirstExampleQuestionHighlighted?: boolean
839
+
840
+ /**
841
+ * Enables the ability to share chat conversations via URL.
842
+ * Useful for allowing users to share helpful conversations with teammates.
843
+ */
844
+ isShareButtonVisible?: boolean
845
+
846
+ /**
847
+ * The base URL path used when generating shareable chat links.
848
+ * Should match your application's routing structure.
849
+ * "/shared-chats/" or "/support/conversations/"
850
+ */
851
+ shareChatUrlBasePath?: string
852
+
853
+ /**
854
+ * Controls the visibility of the copy chat button.
855
+ * Allows users to copy the entire chat transcript to their clipboard.
856
+ */
857
+ isCopyChatButtonVisible?: boolean
858
+
859
+ /**
860
+ * Unique identifier for loading a specific conversation.
861
+ * Use this to restore a previous conversation state.
862
+ */
863
+ conversationId?: string
864
+
865
+ /**
866
+ * When enabled, prevents users from sending new messages.
867
+ * Useful for displaying archived or shared chat sessions.
868
+ * @default false
869
+ */
870
+ isViewOnly?: boolean
871
+
872
+ /**
873
+ * Whether to make conversations public by default.
874
+ * @default undefined (private)
875
+ */
876
+ conversationVisibility?: 'public' | 'private'
877
+
878
+ /**
879
+ * Controls the visibility of the chat history button, which opens the list of previous chats.
880
+ * @default true
881
+ */
882
+ isChatHistoryButtonVisible?: boolean
883
+
884
+ /**
885
+ * Configuration for the chat's disclaimer message.
886
+ * Use this to display important notices about AI limitations or data usage.
887
+ */
888
+ disclaimerSettings?: AIChatDisclaimerSettings
889
+
890
+ /**
891
+ * Callback function triggered whenever the user modifies their input message.
892
+ *
893
+
894
+ * @param message - The current content of the input field
895
+ */
896
+ onInputMessageChange?: (message: string) => void
897
+
898
+ /**
899
+ * React ref for accessing the chat component's methods.
900
+ * Enables programmatic control of chat functions from parent components.
901
+ */
902
+ chatFunctionsRef?: React.Ref<AIChatFunctions>
903
+
904
+ /**
905
+ * Array of actions available in the "Get Help" menu.
906
+ * Use this to provide alternative support options like contact forms or documentation links.
907
+ */
908
+ getHelpOptions?: GetHelpOption[]
909
+
910
+ /**
911
+ * Array of actions available rendered after each message.
912
+ */
913
+ messageActions?: CustomMessageAction[]
914
+
915
+ /**
916
+ * Custom heading text for the workflows section.
917
+ * Use this to describe available automated processes or guided flows.
918
+ */
919
+ workflowsHeader?: string
920
+
921
+ /**
922
+ * Collection of interactive workflows that can be triggered during chat.
923
+ * These can guide users through complex processes or data collection.
924
+ */
925
+ // workflows?: Workflow[]
926
+
927
+ /**
928
+ * Custom labels for the chat interface's action buttons.
929
+ * Use this for internationalization or to better match your application's terminology.
930
+ */
931
+ toolbarButtonLabels?: AIChatToolbarButtonLabels
932
+
933
+ /**
934
+ * Filters to apply to the chat results.
935
+ */
936
+ filters?: SearchAndChatFilters
937
+
938
+ /**
939
+ * Components to be rendered in the chat interface.
940
+ */
941
+
942
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
943
+ components?: ComponentsConfig<any>
944
+
945
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
946
+ artifacts?: ComponentsConfig<any>
947
+ }
948
+
949
+ export declare interface InkeepBaseSettings {
950
+ /**
951
+ * The display name of your organization that will be shown in various UI elements.
952
+ * For example, this may appear in chat messages or headers.
953
+ */
954
+ organizationDisplayName?: string
955
+ /**
956
+ * The primary brand color used throughout the widget UI.
957
+ * This color will be used to generate a cohesive color scheme.
958
+ * Should be provided as a valid CSS color value (hex, rgb, etc).
959
+ */
960
+ primaryBrandColor: string
961
+ /**
962
+ * Settings to control the color mode (light/dark) behavior.
963
+ * Can be used to sync with your application's theme or set a forced color mode.
964
+ * @see ColorModeConfig type for detailed configuration options
965
+ */
966
+ colorMode?: ColorModeConfig
967
+ /**
968
+ * Theme customization settings for the widget.
969
+ * Allows customizing colors, typography, component styles, and more.
970
+ */
971
+ theme?: UserTheme
972
+ /**
973
+ * Custom icon overrides for the default icon set.
974
+ * Allows replacing any of the built-in icons with your own components.
975
+ */
976
+ customIcons?: CustomIconMap
977
+ /**
978
+ * Properties to identify and provide context about the current user.
979
+ * Used for personalization and analytics tracking.
980
+ * @see UserProperties interface for available fields
981
+ */
982
+ userProperties?: UserProperties
983
+ /**
984
+ * Authentication token for the current user.
985
+ * Used for authenticated API requests if required.
986
+ */
987
+ userAuthToken?: string
988
+ /**
989
+ * Additional properties to be sent with analytics events.
990
+ * These properties will be merged with the event properties.
991
+ */
992
+ analyticsProperties?: Record<string, unknown>
993
+ /**
994
+ * Handler for analytics events from the widget.
995
+
996
+ * @param event - The analytics event object
997
+ * @returns Promise that resolves when the event is logged
998
+ */
999
+ onEvent?: (event: InkeepCallbackEvent) => Promise<void>
1000
+ /**
1001
+ * Handler for feedback events from the widget.
1002
+
1003
+ * @param feedback - The feedback object
1004
+ * @returns The feedback object
1005
+ */
1006
+ onFeedback?: (
1007
+ feedback: InkeepFeedback & {
1008
+ properties?: Record<string, unknown>
1009
+ },
1010
+ ) => Promise<InkeepFeedback>
1011
+
1012
+ /**
1013
+ * 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.
1014
+ * @default false
1015
+ */
1016
+ shouldBypassCaptcha?: boolean
1017
+ /**
1018
+ * Privacy and cookie preferences configuration.
1019
+ */
1020
+ privacyPreferences?: PrivacyPreferences
1021
+ /**
1022
+ * Function to transform source data before display.
1023
+ *
1024
+ * @remarks
1025
+ * Allows customizing how source information is presented in the widget.
1026
+
1027
+ * @param source - The original source data
1028
+ * @param type - The type of source data
1029
+ * @param opts - The options for the transform source
1030
+ * @returns The transformed source data
1031
+ */
1032
+ transformSource?: TransformSource
1033
+
1034
+ /**
1035
+ * Reference to the shadow DOM host element if using custom Shadow DOM.
1036
+ * Required when embedding the widget within a Shadow DOM.
1037
+ */
1038
+ shadowHost?: HTMLElement | null
1039
+ /**
1040
+ * Reference to the root element where the widget is mounted.
1041
+ * Used for positioning and event handling.
1042
+ */
1043
+ rootElement?: HTMLElement | null
1044
+ /**
1045
+ * Custom tags for widget identification.
1046
+ * Used in analytics to segment and filter widget instances.
1047
+ * Array of string identifiers.
1048
+ */
1049
+ tags?: string[]
1050
+ /**
1051
+ * Instance of the Prism syntax highlighting library.
1052
+ * Required for code block syntax highlighting functionality.
1053
+ */
1054
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1055
+ prism?: any
1056
+ /**
1057
+ * Query parameters to automatically append to URLs in the widget.
1058
+ * Useful for tracking or maintaining context in navigation.
1059
+ * Object mapping parameter names to values.
1060
+ */
1061
+ urlQueryParamsToAppend?: UrlQueryParam
1062
+ /**
1063
+ * Base-level filters to apply to all search and chat operations.
1064
+ * These are typically organization or user-level filters.
1065
+ */
1066
+ filters?: SearchAndChatFilters
1067
+ }
1068
+
1069
+ export declare type InkeepCallbackEvent = InkeepEventWithCommon
1070
+
1071
+ export declare interface InkeepCloudAIChatSettings extends InkeepAIChatSettings {}
1072
+
1073
+ export declare interface InkeepCloudBaseSettings extends InkeepBaseSettings {
1074
+ /**
1075
+ * Custom base URL for analytics API endpoints.
1076
+ * Useful when routing analytics requests through a proxy.
1077
+ * Should include protocol (e.g., 'https://analytics.your-proxy.com')
1078
+ */
1079
+ analyticsApiBaseUrl?: string
1080
+ /**
1081
+ * Environment setting for the widget.
1082
+ * Affects API endpoints and debug behaviors.
1083
+ * @default 'production'
1084
+ */
1085
+ env?: 'development' | 'production'
1086
+ }
1087
+
1088
+ export declare type InkeepCloudComponentInitializer = {
1089
+ (props: InkeepCloudComponentProps): InkeepComponentInstance | undefined
1090
+ (targetSelector: string, props: InkeepCloudComponentProps): InkeepComponentInstance | undefined
1091
+ }
1092
+
1093
+ export declare type InkeepCloudComponentProps = InkeepCloudSettings & {
1094
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1095
+ [key: string]: any
1096
+ }
1097
+
1098
+ export declare interface InkeepCloudConfig {
1099
+ baseSettings: InkeepCloudBaseSettings
1100
+ aiChatSettings: InkeepCloudAIChatSettings
1101
+ searchSettings: InkeepCloudSearchSettings
1102
+ }
1103
+
1104
+ export declare type InkeepCloudJS = Partial<Record<InkeepJSComponent, InkeepCloudComponentInitializer>>
1105
+
1106
+ export declare interface InkeepCloudSearchSettings extends InkeepSearchSettings {
1107
+ /**
1108
+ * The API key to use for authenticating with Inkeep's services.
1109
+ * Required for accessing Inkeep's API endpoints.
1110
+ */
1111
+ apiKey?: string
1112
+ /**
1113
+ * Custom base URL for search API endpoints.
1114
+ * Useful when routing API requests through a proxy.
1115
+ * Should include protocol (e.g., 'https://api.your-proxy.com')
1116
+ */
1117
+ url?: string
1118
+ /**
1119
+ * Search-specific filters to apply to search operations.
1120
+ * These are merged with base filters from baseSettings.
1121
+ */
1122
+ filters?: SearchAndChatFilters
1123
+ /**
1124
+ * The maximum number of hits to return.
1125
+ * @default 40
1126
+ */
1127
+ maxResults?: number
1128
+ /**
1129
+ * Advanced search callback function that handles search with full filter support.
1130
+ * This callback handles the complete search implementation with SearchInput.
1131
+ *
1132
+ * @param searchInput - The search input containing query and filters
1133
+ * @param abortSignal - Signal to abort the search request
1134
+ * @returns Promise that resolves with search results
1135
+ */
1136
+ onSearchWithFilters?: (searchInput: SearchInput, abortSignal: AbortSignal) => Promise<SearchHit[]>
1137
+ }
1138
+
1139
+ export declare interface InkeepCloudSettings {
1140
+ baseSettings?: InkeepCloudBaseSettings
1141
+ aiChatSettings?: InkeepCloudAIChatSettings
1142
+ searchSettings?: InkeepCloudSearchSettings
1143
+ openSettings?: OpenSettingsModal
1144
+ }
1145
+
1146
+ export declare type InkeepComponentInitializer = {
1147
+ (props: InkeepComponentProps): InkeepComponentInstance | undefined
1148
+ (targetSelector: string, props: InkeepComponentProps): InkeepComponentInstance | undefined
1149
+ }
1150
+
1151
+ /**
1152
+ * Represents an instance of any Inkeep component that is returned after initialization.
1153
+ * These instances have methods that can be used to update the component's state.
1154
+ */
1155
+ export declare interface InkeepComponentInstance {
1156
+ /**
1157
+ * Updates the component with new props
1158
+
1159
+ * @param newProps - The new props to apply to the component
1160
+ */
1161
+ update: <T extends object>(newProps: T) => void
1162
+
1163
+ /**
1164
+ * Unmounts the component from the DOM but preserves its state
1165
+ */
1166
+ unmount: () => void
1167
+
1168
+ /**
1169
+ * Remounts a previously unmounted component
1170
+ */
1171
+ remount: () => void
1172
+
1173
+ /**
1174
+ * Access to chat-specific functionality (only available for components with chat capabilities)
1175
+ */
1176
+ chat?: {
1177
+ // biome-ignore lint/suspicious/noExplicitAny: Required for flexible method signatures
1178
+ [key: string]: (...args: any[]) => any
1179
+ }
1180
+
1181
+ /**
1182
+ * Access to search-specific functionality (only available for components with search capabilities)
1183
+ */
1184
+ search?: {
1185
+ // biome-ignore lint/suspicious/noExplicitAny: Required for flexible method signatures
1186
+ [key: string]: (...args: any[]) => any
1187
+ }
1188
+ }
1189
+
1190
+ export declare type InkeepComponentProps = InkeepSettings & {
1191
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1192
+ [key: string]: any
1193
+ }
1194
+
1195
+ export declare interface InkeepConfig {
1196
+ /**
1197
+ * The prefix to use for the widget.
1198
+ * @default 'ikp'
1199
+ */
1200
+ prefix?: string
1201
+ /* Excluded from this release type: componentType */
1202
+ /**
1203
+ * Configuration for the chat.
1204
+ */
1205
+ aiChatSettings: InkeepAIChatSettings & {
1206
+ shouldAutoFocusInput?: boolean
1207
+ }
1208
+ /**
1209
+ * Configuration for the base settings.
1210
+ */
1211
+ baseSettings: InkeepBaseSettings
1212
+ /**
1213
+ * Configuration for the search settings.
1214
+ */
1215
+ searchSettings: InkeepSearchSettings & {
1216
+ shouldAutoFocusInput?: boolean
1217
+ }
1218
+ }
1219
+
1220
+ export declare type InkeepCustomIcon =
1221
+ | {
1222
+ builtIn: AvailableBuiltInIcons
1223
+ }
1224
+ | {
1225
+ custom: string // url of svg or png of icon
1226
+ }
1227
+
1228
+ export declare type InkeepEvent = SearchEvent | ChatEvent | WidgetEvent
1229
+
1230
+ export declare type InkeepEventWithCommon = ExtendPropertiesWithCommon<InkeepEvent>
1231
+
1232
+ export declare interface InkeepFeedback {
1233
+ type: FeedbackType
1234
+ messageId: string
1235
+ reasons?: FeebackReason[]
1236
+ }
1237
+
1238
+ export declare type InkeepJS = Partial<Record<InkeepJSComponent, InkeepComponentInitializer>>
1239
+
1240
+ /**
1241
+ * Represents the available Inkeep component types that can be rendered
1242
+ * via the global Inkeep object.
1243
+ */
1244
+ export declare type InkeepJSComponent =
1245
+ | 'EmbeddedChat'
1246
+ | 'EmbeddedSearch'
1247
+ | 'EmbeddedSearchAndChat'
1248
+ | 'ModalChat'
1249
+ | 'ModalSearch'
1250
+ | 'ModalSearchAndChat'
1251
+ | 'ChatButton'
1252
+ | 'ChatButtonModal'
1253
+ | 'SearchBar'
1254
+ | 'SidebarChat'
1255
+
1256
+ export declare interface InkeepSearchSettings {
1257
+ /**
1258
+ * The placeholder text to use.
1259
+ * @default
1260
+ * 'Search anything...' (desktop)
1261
+ * 'Search' (mobile)
1262
+ */
1263
+ placeholder?: string
1264
+ /**
1265
+ * The default query to use.
1266
+ * @default ''
1267
+ */
1268
+ defaultQuery?: string
1269
+ /**
1270
+ * Callback for when the search query changes.
1271
+ */
1272
+ onQueryChange?: (query: string) => void
1273
+ /**
1274
+ * Search callback function that handles all search functionality.
1275
+ * This callback handles the complete search implementation.
1276
+ * If not provided, the widget will warn and show no results.
1277
+ *
1278
+
1279
+ * @param query - The search query string
1280
+ * @param abortSignal - Signal to abort the search request
1281
+ *
1282
+ * @returns Promise that resolves with search results
1283
+ */
1284
+ onSearch?: (query: string, abortSignal: AbortSignal) => Promise<SourceItem[]>
1285
+ /**
1286
+ * The time in milliseconds to wait triggering the search.
1287
+ * @default 0
1288
+ */
1289
+ debounceTimeMs?: number
1290
+ /**
1291
+ * Ref to the AIChat component's callable functions
1292
+ */
1293
+ searchFunctionsRef?: React.Ref<SearchFunctions>
1294
+ /**
1295
+ * Controls whether links should open in a new tab.
1296
+ * @default false
1297
+ */
1298
+ shouldOpenLinksInNewTab?: boolean
1299
+ /**
1300
+ * 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].
1301
+ *
1302
+ * Default tabs if none provided: All, Publications, PDFs, GitHub, Forums, Discord, Slack, StackOverflow
1303
+ *
1304
+ * Behavior:
1305
+ * - Omit 'All' from tabs array to hide the All tab
1306
+ * - Empty tabs array will show all results without tab UI
1307
+ * - Tabs only appear when they have results, unless isAlwaysVisible is set
1308
+ * ```ts
1309
+ * // Basic tabs
1310
+ * tabs: ['Publications', 'GitHub']
1311
+ *
1312
+ * // With isAlwaysVisible option
1313
+ * tabs: [
1314
+ * 'Publications',
1315
+ * ['GitHub', { isAlwaysVisible: true }] // Shows even with no results
1316
+ * ]
1317
+ * ```
1318
+ */
1319
+ tabs?: (string | SearchTab)[]
1320
+ /**
1321
+ * The key to use for the search query parameter.
1322
+ *
1323
+ * When a user selects a search result, the query is added to the URL as a query parameter.
1324
+ * This is the key of that query parameter.
1325
+ *
1326
+ */
1327
+ searchQueryParamKey?: string
1328
+ /**
1329
+ * The view to use for the search.
1330
+ * @default 'single-pane'
1331
+ */
1332
+ view?: 'single-pane' | 'dual-pane'
1333
+ }
1334
+
1335
+ export declare interface InkeepSettings {
1336
+ baseSettings?: InkeepBaseSettings
1337
+ aiChatSettings?: InkeepAIChatSettings
1338
+ searchSettings?: InkeepSearchSettings
1339
+ openSettings?: OpenSettingsModal
1340
+ }
1341
+
1342
+ export declare type InputMaybe<T> = T | null
1343
+
1344
+ export declare interface InvokeCallbackAction {
1345
+ type: 'invoke_callback'
1346
+ callback: (args: InvokeCallbackArgs) => void
1347
+ shouldCloseModal?: boolean
1348
+ }
1349
+
1350
+ export declare interface InvokeCallbackArgs {
1351
+ conversation: {
1352
+ id: string
1353
+ messages: Message[]
1354
+ }
1355
+ }
1356
+
1357
+ export declare interface InvokeMessageCallbackAction {
1358
+ type: 'invoke_message_callback'
1359
+ callback: (args: InvokeMessageCallbackActionArgs) => void
1360
+ shouldCloseModal?: boolean
1361
+ }
1362
+
1363
+ export declare interface InvokeMessageCallbackActionArgs extends InvokeCallbackArgs {
1364
+ messageId?: string
1365
+ }
1366
+
1367
+ export declare interface JSONSchema {
1368
+ $id?: string | undefined
1369
+ $comment?: string | undefined
1370
+
1371
+ /**
1372
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
1373
+ */
1374
+ type?: JSONSchemaTypeName | JSONSchemaTypeName[] | undefined
1375
+ enum?: JSONSchemaType[] | undefined
1376
+ const?: JSONSchemaType | undefined
1377
+
1378
+ /**
1379
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
1380
+ */
1381
+ multipleOf?: number | undefined
1382
+ maximum?: number | undefined
1383
+ exclusiveMaximum?: number | undefined
1384
+ minimum?: number | undefined
1385
+ exclusiveMinimum?: number | undefined
1386
+
1387
+ /**
1388
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
1389
+ */
1390
+ maxLength?: number | undefined
1391
+ minLength?: number | undefined
1392
+ pattern?: string | undefined
1393
+
1394
+ /**
1395
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
1396
+ */
1397
+ items?: JSONSchemaDefinition | JSONSchemaDefinition[] | undefined
1398
+ additionalItems?: JSONSchemaDefinition | undefined
1399
+ maxItems?: number | undefined
1400
+ minItems?: number | undefined
1401
+ uniqueItems?: boolean | undefined
1402
+ contains?: JSONSchemaDefinition | undefined
1403
+
1404
+ /**
1405
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
1406
+ */
1407
+ maxProperties?: number | undefined
1408
+ minProperties?: number | undefined
1409
+ required?: string[] | undefined
1410
+ properties?:
1411
+ | {
1412
+ [key: string]: JSONSchemaDefinition
1413
+ }
1414
+ | undefined
1415
+ patternProperties?:
1416
+ | {
1417
+ [key: string]: JSONSchemaDefinition
1418
+ }
1419
+ | undefined
1420
+ additionalProperties?: JSONSchemaDefinition | undefined
1421
+ propertyNames?: JSONSchemaDefinition | undefined
1422
+
1423
+ /**
1424
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
1425
+ */
1426
+ if?: JSONSchemaDefinition | undefined
1427
+ then?: JSONSchemaDefinition | undefined
1428
+ else?: JSONSchemaDefinition | undefined
1429
+
1430
+ /**
1431
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
1432
+ */
1433
+ allOf?: JSONSchemaDefinition[] | undefined
1434
+ anyOf?: JSONSchemaDefinition[] | undefined
1435
+ oneOf?: JSONSchemaDefinition[] | undefined
1436
+ not?: JSONSchemaDefinition | undefined
1437
+
1438
+ /**
1439
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
1440
+ */
1441
+ format?: string | undefined
1442
+
1443
+ /**
1444
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
1445
+ */
1446
+ title?: string | undefined
1447
+ description?: string | undefined
1448
+ default?: JSONSchemaType | undefined
1449
+ readOnly?: boolean | undefined
1450
+ writeOnly?: boolean | undefined
1451
+ examples?: JSONSchemaType | undefined
1452
+ }
1453
+
1454
+ export declare interface JSONSchemaArray extends Array<JSONSchemaType> {}
1455
+
1456
+ /**
1457
+ * JSON Schema v7
1458
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
1459
+ */
1460
+ export declare type JSONSchemaDefinition = JSONSchema | boolean
1461
+
1462
+ export declare interface JSONSchemaObject {
1463
+ [key: string]: JSONSchemaType
1464
+ }
1465
+
1466
+ /**
1467
+ * Primitive type
1468
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
1469
+ */
1470
+ export declare type JSONSchemaType =
1471
+ | string //
1472
+ | number
1473
+ | boolean
1474
+ | JSONSchemaObject
1475
+ | JSONSchemaArray
1476
+ | null
1477
+
1478
+ /**
1479
+ * Primitive type
1480
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
1481
+ */
1482
+ export declare type JSONSchemaTypeName =
1483
+ | ({} & string)
1484
+ | 'string'
1485
+ | 'number'
1486
+ | 'integer'
1487
+ | 'boolean'
1488
+ | 'object'
1489
+ | 'array'
1490
+ | 'null'
1491
+
1492
+ /**
1493
+ * Meta schema
1494
+ *
1495
+ * Recommended values:
1496
+ * - 'http://json-schema.org/schema#'
1497
+ * - 'http://json-schema.org/hyper-schema#'
1498
+ * - 'http://json-schema.org/draft-07/schema#'
1499
+ * - 'http://json-schema.org/draft-07/hyper-schema#'
1500
+ *
1501
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
1502
+ */
1503
+ export declare type JSONSchemaVersion = string
1504
+
1505
+ export declare type Message = UIMessage<unknown, DataParts>
1506
+
1507
+ export declare type MessageAction = 'copy' | 'upvote' | 'downvote'
1508
+
1509
+ export declare interface MessageAttachment {
1510
+ contentType: MessageAttachmentContentType
1511
+ title: string
1512
+ content: string
1513
+ id: string
1514
+ context?: string[]
1515
+ }
1516
+
1517
+ /**
1518
+ * MessageAttachmentContentType represents possible type of information that can be attached to a Workflow.
1519
+ */
1520
+ export declare type MessageAttachmentContentType = WorkflowCodeContentType | WorkflowTextContentType
1521
+
1522
+ export declare interface MessageAttributes {
1523
+ attachments?: MessageAttachment[]
1524
+ workflow?: Workflow
1525
+ }
1526
+
1527
+ declare type MessageChatAction = ExpandUnion<InvokeMessageCallbackAction | OpenFormAction | OpenUrlAction>
1528
+
1529
+ export declare interface MessageFeedback {
1530
+ unrelated_response: boolean
1531
+ inaccurate_statement: boolean
1532
+ inaccurate_code_snippet: boolean
1533
+ irrelevant_citations: boolean
1534
+ }
1535
+
1536
+ export declare interface MessageMetadata {
1537
+ attributes?: MessageAttributes
1538
+ context?: string
1539
+ }
1540
+
1541
+ export declare interface ModalClosedEvent {
1542
+ eventName: 'modal_closed'
1543
+ properties: {}
1544
+ }
1545
+
1546
+ export declare interface ModalOpenedEvent {
1547
+ eventName: 'modal_opened'
1548
+ properties: {}
1549
+ }
1550
+
1551
+ export declare type ModalViewTypes = 'chat' | 'search'
1552
+
1553
+ export declare interface OpenFormAction {
1554
+ type: 'open_form'
1555
+ formSettings: AIChatFormSettings
1556
+ }
1557
+
1558
+ export declare interface OpenSettingsChatButton extends BaseOpenSettings {}
1559
+
1560
+ export declare interface OpenSettingsModal extends BaseOpenSettings {
1561
+ /**
1562
+ * The trigger selector.
1563
+ *
1564
+ * The selector to trigger the modal when clicked.
1565
+ *
1566
+ * @default '[data-inkeep-modal-trigger]'
1567
+ */
1568
+ triggerSelector?: string
1569
+ }
1570
+
1571
+ export declare interface OpenSettingsSearchBar extends BaseOpenSettings {
1572
+ /**
1573
+ * The shortcut key.
1574
+ *
1575
+ * The key to trigger the searchbar when pressed with Cmd (Mac) / Ctrl (Windows).
1576
+ *
1577
+ * Set to `null` to disable the shortcut.
1578
+ *
1579
+ * @default 'k'
1580
+ */
1581
+ shortcutKey?: string | null
1582
+ }
1583
+
1584
+ export declare interface OpenSettingsSidebar extends BaseOpenSettings {
1585
+ /**
1586
+ * The trigger selector for the sidebar chat.
1587
+ * @default '[data-inkeep-sidebar-chat-trigger]'
1588
+ */
1589
+ triggerSelector?: string
1590
+
1591
+ /**
1592
+ * Threshold factor for auto-closing when resizing.
1593
+ * When dragging below (minWidth * autoCloseThreshold), the sidebar will auto-close.
1594
+ * @default 0.7 (70% of minimum width)
1595
+ */
1596
+ autoCloseThreshold?: number
1597
+ }
1598
+
1599
+ export declare interface OpenUrlAction {
1600
+ type: 'open_link'
1601
+ url: string
1602
+ }
1603
+
1604
+ export declare type OperationType =
1605
+ | 'error'
1606
+ | 'agent_initializing'
1607
+ | 'completion'
1608
+ | 'agent_generate'
1609
+ | 'agent_reasoning'
1610
+ | 'tool_call'
1611
+ | 'tool_result'
1612
+ | 'transfer'
1613
+ | 'delegation_sent'
1614
+ | 'delegation_returned'
1615
+ | 'artifact_saved'
1616
+
1617
+ export declare interface PrivacyPreferences {
1618
+ /**
1619
+ * Whether to opt out of analytical cookies.
1620
+ * @default false
1621
+ */
1622
+ optOutAnalyticalCookies?: boolean
1623
+ /**
1624
+ * Whether to opt out of all analytics.
1625
+ * @default false
1626
+ */
1627
+ optOutAllAnalytics?: boolean
1628
+ /**
1629
+ * Whether to opt out of functional cookies.
1630
+ * @default false
1631
+ */
1632
+ optOutFunctionalCookies?: boolean
1633
+ }
1634
+
1635
+ declare type QueryCondition = { $eq: QueryValue } | { $in: (number | string)[] }
1636
+
1637
+ declare type QueryValue = boolean | number | string
1638
+
1639
+ declare type RecordTypes =
1640
+ | 'DocumentationRecord'
1641
+ | 'GitHubIssueRecord'
1642
+ | 'StackOverflowRecord'
1643
+ | 'DiscordRecord'
1644
+ | 'SlackEntry'
1645
+ | 'DiscourseRecord'
1646
+
1647
+ export declare type RenderFn = ({
1648
+ children,
1649
+ ssr,
1650
+ root,
1651
+ }: {
1652
+ children: ReactNode
1653
+ ssr: boolean
1654
+ root: ShadowRoot | null
1655
+ }) => ReactNode
1656
+
1657
+ export declare type Root = Record<string, ComponentType<HTMLProps<HTMLElement> & ShadowRootProps>>
1658
+
1659
+ export declare interface SearchAndChatFilters {
1660
+ attributes?: {
1661
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1662
+ [key: string]: any
1663
+ }
1664
+ }
1665
+
1666
+ export declare type SearchEvent =
1667
+ | SearchQueryResponseReceivedEvent
1668
+ | SearchQuerySubmittedEvent
1669
+ | SearchResultClickedEvent
1670
+
1671
+ export declare type SearchFiltersInput = {
1672
+ limit: number
1673
+ }
1674
+
1675
+ export declare interface SearchFunctions {
1676
+ /**
1677
+ * Update the query.
1678
+ */
1679
+ updateQuery: (query: string) => void
1680
+ /**
1681
+ * Focus the input.
1682
+ */
1683
+ focusInput: () => void
1684
+ }
1685
+
1686
+ export declare interface SearchHit {
1687
+ hitOnRoot: boolean
1688
+ id: string
1689
+ rootRecord: SearchRootRecord
1690
+ title?: string
1691
+ url?: string
1692
+ preview?: string
1693
+ pathHeadings?: {
1694
+ anchor?: string | null
1695
+ content: string
1696
+ }[]
1697
+ content?: {
1698
+ content: string
1699
+ anchor?: string | null
1700
+ }
1701
+ }
1702
+
1703
+ export declare type SearchInput = {
1704
+ filters?: InputMaybe<SearchFiltersInput>
1705
+ searchQuery: string
1706
+ }
1707
+
1708
+ export declare interface SearchQueryResponseReceivedEvent {
1709
+ eventName: 'search_query_response_received'
1710
+ properties: {
1711
+ searchQuery: string
1712
+ totalResults: number
1713
+ }
1714
+ }
1715
+
1716
+ export declare interface SearchQuerySubmittedEvent {
1717
+ eventName: 'search_query_submitted'
1718
+ properties: {
1719
+ searchQuery: string
1720
+ }
1721
+ }
1722
+
1723
+ export declare interface SearchResultClickedEvent {
1724
+ eventName: 'search_result_clicked'
1725
+ properties: {
1726
+ searchQuery: string
1727
+ title?: string
1728
+ url?: string
1729
+ }
1730
+ }
1731
+
1732
+ export declare interface SearchRootRecord {
1733
+ __typename: RecordTypes
1734
+ id: string
1735
+ title?: string
1736
+ url?: string
1737
+ preview?: string
1738
+ pathBreadcrumbs?: string[]
1739
+ contentType?: string
1740
+ topLevelHeadings?: TopLevelHeading[]
1741
+ body?: string
1742
+ state?: `${GitHubIssueState}`
1743
+ // StackOverflow
1744
+ markedAsCorrectAnswer?: {
1745
+ url: string
1746
+ score: number
1747
+ content: string
1748
+ }
1749
+ }
1750
+
1751
+ export declare interface SearchTab {
1752
+ [0]: string
1753
+ [1]: {
1754
+ isAlwaysVisible?: boolean
1755
+ }
1756
+ }
1757
+
1758
+ declare interface SelectField extends BaseFormField {
1759
+ inputType: 'select'
1760
+ items: SelectItem[]
1761
+ defaultValue?: string
1762
+ placeholder?: string
1763
+ }
1764
+
1765
+ export declare interface SelectItem {
1766
+ label: string
1767
+ value: string
1768
+ }
1769
+
1770
+ export declare interface ShadowRootProps {
1771
+ mode?: 'closed' | 'open'
1772
+ delegatesFocus?: boolean
1773
+ styleSheets?: CSSStyleSheet[]
1774
+ ssr?: boolean
1775
+ children?: ReactNode
1776
+ }
1777
+
1778
+ export declare interface SharedChatLoadedEvent {
1779
+ eventName: 'shared_chat_loaded'
1780
+ properties: {
1781
+ conversationId?: string
1782
+ }
1783
+ }
1784
+
1785
+ export declare interface SourceItem {
1786
+ id?: string
1787
+ title: string | undefined
1788
+ url: string
1789
+ description: string | undefined
1790
+ breadcrumbs: string[]
1791
+ type: string
1792
+ contentType?: string
1793
+ tag?: string
1794
+ tabs?: (SourceTab | string)[]
1795
+ headings?: Heading[]
1796
+ preview?: string
1797
+ }
1798
+
1799
+ export declare interface SourceTab {
1800
+ [0]: string
1801
+ [1]: {
1802
+ breadcrumbs: string[]
1803
+ }
1804
+ }
1805
+
1806
+ export declare interface StrictIkpTheme {
1807
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1808
+ colors: Record<string, any>
1809
+ fontFamily: Record<string, string>
1810
+ fontSize: Record<string, string>
1811
+ zIndex: Record<string, string | number>
1812
+ }
1813
+
1814
+ export declare interface Style {
1815
+ /**
1816
+ * A unique identifier for the style.
1817
+ * This is used to prevent duplicate styles and allow for style updates.
1818
+ * key: 'custom-button-styles'
1819
+ */
1820
+ key?: string
1821
+ /**
1822
+ * The type of style to apply.
1823
+ * - 'link': Adds a <link> tag to load external resources like fonts or stylesheets
1824
+ * - 'style': Injects CSS directly into a <style> tag
1825
+ * type: 'link' // For loading external resources
1826
+ * type: 'style' // For inline CSS
1827
+ */
1828
+ type: 'link' | 'style'
1829
+ /**
1830
+ * The content of the style.
1831
+ * For type='link', this should be a valid URL to an external resource.
1832
+ * For type='style', this should be valid CSS code.
1833
+ *
1834
+ * ```ts
1835
+ * // For type='link':
1836
+ * value: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap'
1837
+ *
1838
+ * // For type='style':
1839
+ * value: `.custom-button {
1840
+ * background: blue;
1841
+ * color: white;
1842
+ * }`
1843
+ * ```
1844
+ */
1845
+ value: string
1846
+ }
1847
+
1848
+ export declare type SubmitCallback = (values: SubmitCallbackArgs) => Promise<void> | void
1849
+
1850
+ export declare interface SubmitCallbackArgs {
1851
+ values: FieldValues
1852
+ conversation?: {
1853
+ id: string
1854
+ messages: Message[]
1855
+ }
1856
+ }
1857
+
1858
+ export declare interface SyncColorMode {
1859
+ /**
1860
+ * The HTML element to watch for color mode changes.
1861
+ * This element's attributes will be monitored for changes to determine the color mode.
1862
+ *
1863
+ * Common use cases include watching the document root or a specific app container.
1864
+ * ```ts
1865
+ * // Watch the document root element
1866
+ * target: document.documentElement
1867
+ *
1868
+ * // Watch a specific container element
1869
+ * target: document.querySelector('#app')
1870
+ *
1871
+ * // Watch a specific element by ID
1872
+ * target: '#app'
1873
+ * ```
1874
+ */
1875
+ target: HTMLElement | null | string
1876
+
1877
+ /**
1878
+ * The specific attributes to monitor for color mode changes.
1879
+ * The observer will only trigger when these attributes change on the target element.
1880
+ *
1881
+ * Common attributes used for theming include:
1882
+ * - data-theme: Custom theme attribute
1883
+ * - color-scheme: Standard CSS color scheme
1884
+ * - class: Class-based theming
1885
+ * ```ts
1886
+ * // Watch data-theme attribute
1887
+ * attributes: ['data-theme']
1888
+ *
1889
+ * // Watch color-scheme attribute
1890
+ * attributes: ['color-scheme']
1891
+ *
1892
+ * // Watch class changes
1893
+ * attributes: ['class']
1894
+ * ```
1895
+ */
1896
+ attributes: string[]
1897
+
1898
+ /**
1899
+ * A function that determines if dark mode is active based on the target element's attributes.
1900
+ *
1901
+ * @remarks
1902
+ * The function receives an object containing the current values of all monitored attributes,
1903
+ * where the keys are attribute names and values are the attribute values.
1904
+ *
1905
+
1906
+ * @param attributes - Object containing the current values of monitored attributes
1907
+ * @returns True if dark mode is detected, false otherwise
1908
+ * ```ts
1909
+ * // Check data-theme attribute
1910
+ * isDarkMode: (attributes) => attributes['data-theme'] === 'dark'
1911
+ *
1912
+ * // Check class for dark mode
1913
+ * isDarkMode: (attributes) => /\bdark\b/.test(attributes['class'])
1914
+ *
1915
+ * // Check color-scheme
1916
+ * isDarkMode: (attributes) => attributes['color-scheme'] === 'dark'
1917
+ * ```
1918
+ */
1919
+ isDarkMode?: (attributes: Record<string, string | null>) => boolean
1920
+
1921
+ /**
1922
+ * Optional callback function that is invoked whenever the color mode changes.
1923
+ *
1924
+ * This can be used to perform side effects or sync the color mode with other parts of your application.
1925
+ *
1926
+
1927
+ * @param colorMode - The new color mode value ('light' | 'dark')
1928
+ * ```ts
1929
+ * onChange: (colorMode) => {
1930
+ * console.log(`Color mode changed to: ${colorMode}`);
1931
+ * // Update other UI elements
1932
+ * }
1933
+ * ```
1934
+ */
1935
+ onChange?: (colorMode: string) => void
1936
+ }
1937
+
1938
+ export declare interface SyntaxHighlighterTheme {
1939
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1940
+ lightTheme?: any
1941
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
1942
+ darkTheme?: any
1943
+ }
1944
+
1945
+ declare interface TextField extends BaseFormField {
1946
+ inputType: 'email' | 'text' | 'textarea'
1947
+ defaultValue?: string
1948
+ placeholder?: string
1949
+ }
1950
+
1951
+ export declare interface TopLevelHeading {
1952
+ anchor?: string | null
1953
+ url?: string | null
1954
+ content: string
1955
+ isMatch?: boolean
1956
+ }
1957
+
1958
+ export declare interface TransformedSource {
1959
+ /**
1960
+ * ID of the source.
1961
+ */
1962
+ id?: string
1963
+ /**
1964
+ * Title of the source.
1965
+ */
1966
+ title: string
1967
+ /**
1968
+ * URL of the source.
1969
+ */
1970
+ url: string
1971
+ /**
1972
+ * Description of the source.
1973
+ */
1974
+ description?: string
1975
+ /**
1976
+ * Breadcrumbs for the source.
1977
+ * ```ts
1978
+ * breadcrumbs: ['Subpath', 'Page']
1979
+ * ```
1980
+ */
1981
+ breadcrumbs?: string[]
1982
+ /**
1983
+ * Tabs where this source shows up. (Only for searchResultsItem)
1984
+ * ```ts
1985
+ * tabs: ['Docs']
1986
+ * tabs: ['Docs', 'API']
1987
+ * ```
1988
+ * You can also specify different breadcrumbs for specific tab.
1989
+ *
1990
+ * ```ts
1991
+ * tabs: ['Docs', ['API', { breadcrumbs: ['Guides', 'API'] }]]
1992
+ * ```
1993
+ */
1994
+ tabs?: (SourceTab | string)[]
1995
+ /**
1996
+ * Icon of the source.
1997
+ * ```ts
1998
+ * icon: { builtIn: 'LuBookOpen' }
1999
+ * icon: { custom: 'https://example.com/icon.svg' }
2000
+ * ```
2001
+ */
2002
+ icon: InkeepCustomIcon
2003
+ /**
2004
+ * Whether to open the source in a new tab.
2005
+ */
2006
+ shouldOpenInNewTab?: boolean
2007
+ /**
2008
+ * Search query params to append to the URL.
2009
+ * If you want to know if the source is from chat or search, you can append the source type to the URL.
2010
+ * ```ts
2011
+ * appendToUrl: { from: 'chatSourceItem' }
2012
+ * ```
2013
+ */
2014
+ appendToUrl?: UrlQueryParam
2015
+ /**
2016
+ * Type of the source.
2017
+ */
2018
+ type: string
2019
+ /**
2020
+ * Tag to append to the source.
2021
+ */
2022
+ tag?: string
2023
+ }
2024
+
2025
+ export declare type TransformSource = (
2026
+ source: SourceItem,
2027
+ type: TransformSourceType,
2028
+ opts?: TransformSourceOptions,
2029
+ ) => Partial<TransformedSource>
2030
+
2031
+ export declare interface TransformSourceOptions {
2032
+ organizationDisplayName?: string
2033
+ tabs?: InkeepSearchSettings['tabs']
2034
+ }
2035
+
2036
+ export declare type TransformSourceType = 'chatSourceItem' | 'searchResultItem'
2037
+
2038
+ export declare type UrlQueryParam = Record<string, string>
2039
+
2040
+ export declare interface UseColorModeProps {
2041
+ /** List of all available colorMode names */
2042
+ colorModes: string[]
2043
+ /** Forced colorMode name for the current page */
2044
+ forcedColorMode?: string
2045
+ /** Update the colorMode */
2046
+ setColorMode: (colorMode: string) => void
2047
+ /** Active colorMode name */
2048
+ colorMode?: string
2049
+ /** 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` */
2050
+ resolvedColorMode?: string
2051
+ /** If enableSystem is true, returns the System colorMode preference ("dark" or "light"), regardless what the active colorMode is */
2052
+ systemColorMode?: 'dark' | 'light'
2053
+ }
2054
+
2055
+ export declare interface UserEscalationIndicatedEvent {
2056
+ eventName: 'user_escalation_indicated'
2057
+ properties: {
2058
+ escalationType: 'downvote' | 'get_help_option' | 'contact_us' | 'support_form'
2059
+ getHelpOption?: GetHelpOption
2060
+ getHelpOptionName?: string
2061
+ conversationId?: string
2062
+ }
2063
+ }
2064
+
2065
+ export declare interface UserMessageSubmittedEvent {
2066
+ eventName: 'user_message_submitted'
2067
+ properties: {
2068
+ // message: Message
2069
+ conversationId?: string
2070
+ }
2071
+ }
2072
+
2073
+ export declare type UserProperties = {
2074
+ /**
2075
+ * The user ID.
2076
+ */
2077
+ id?: string
2078
+ /**
2079
+ * The user email.
2080
+ */
2081
+ email?: string
2082
+ /**
2083
+ * The user name.
2084
+ */
2085
+ name?: string
2086
+ /**
2087
+ * The user cohorts.
2088
+ */
2089
+ cohorts?: string[]
2090
+ } & Record<string, unknown>
2091
+
2092
+ export declare interface UserProvidedColorScheme {
2093
+ textBold?: string
2094
+ textSubtle?: string
2095
+ lighter?: string
2096
+ light?: string
2097
+ lightSubtle?: string
2098
+ medium?: string
2099
+ mediumSubtle?: string
2100
+ strongerLight?: string
2101
+ strong?: string
2102
+ stronger?: string
2103
+ textColorOnPrimary?: string
2104
+ }
2105
+
2106
+ export declare interface UserTheme extends Partial<IkpTheme> {
2107
+ /**
2108
+ * Whether to disable loading the default font.
2109
+ * @default false
2110
+ */
2111
+ disableLoadingDefaultFont?: boolean
2112
+ /**
2113
+ * The syntax highlighter theme configuration for code blocks.
2114
+ * Allows setting different themes for light and dark modes.
2115
+ * ```ts
2116
+ * syntaxHighlighter: {
2117
+ * lightTheme: themes.github,
2118
+ * darkTheme: themes.dracula
2119
+ * }
2120
+ * ```
2121
+ */
2122
+ syntaxHighlighter?: SyntaxHighlighterTheme
2123
+
2124
+ /**
2125
+ * The primary colors used to generate the color scheme.
2126
+ * These colors will be used to create variations for different UI states.
2127
+ * ```ts
2128
+ * primaryColors: {
2129
+ * primary: '#26D6FF',
2130
+ * secondary: '#6366F1'
2131
+ * }
2132
+ * ```
2133
+ */
2134
+ primaryColors?: UserProvidedColorScheme
2135
+
2136
+ /**
2137
+ * The class name for the container that holds CSS variables.
2138
+ * This class will be added to a wrapper div that provides theming context.
2139
+ *
2140
+ * @default 'ikp-variables'
2141
+ */
2142
+ varsClassName?: string
2143
+
2144
+ /**
2145
+ * Custom styles to be injected into the widget.
2146
+ * Supports both inline styles and external stylesheets/resources.
2147
+ * Styles are uniquely identified by their key to prevent duplicates.
2148
+ * ```ts
2149
+ * styles: [
2150
+ * // External stylesheet or font
2151
+ * {
2152
+ * key: 'google-fonts',
2153
+ * type: 'link',
2154
+ * value: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap'
2155
+ * },
2156
+ * // Custom CSS rules
2157
+ * {
2158
+ * key: 'custom-theme',
2159
+ * type: 'style',
2160
+ * value: `
2161
+ * .ikp-ai-chat-message {
2162
+ * border-radius: 8px;
2163
+ * padding: 12px;
2164
+ * }
2165
+ * [data-theme='dark'] .ikp-ai-chat-message {
2166
+ * background: #2D3748;
2167
+ * }
2168
+ * `
2169
+ * }
2170
+ * ]
2171
+ * ```
2172
+ */
2173
+ styles?: Style[]
2174
+ }
2175
+
2176
+ /** Adapted from https://github.com/pacocoursey/next-theme/blob/a385b8d865bbb317ff73a5b6c1319ae566f7d6f1/src/types.ts */
2177
+
2178
+ declare interface ValueObject {
2179
+ [colorModeName: string]: string
2180
+ }
2181
+
2182
+ export declare type WidgetEvent =
2183
+ | ModalOpenedEvent
2184
+ | ModalClosedEvent
2185
+ | ChatBubbleOpenedEvent
2186
+ | ChatBubbleClosedEvent
2187
+
2188
+ export declare interface WidgetView {
2189
+ /**
2190
+ * Callback fired when the user toggles between chat and search views.
2191
+ *
2192
+ * The parent component can use this
2193
+ * to coordinate showing/hiding the appropriate view.
2194
+ */
2195
+ onToggleView?: (opts: { view: ModalViewTypes; query?: string; autoSubmit?: boolean }) => void
2196
+ /**
2197
+ * The label for the Ask AI button.
2198
+ */
2199
+ askAILabel?: string
2200
+ /**
2201
+ * The label for the Search button.
2202
+ */
2203
+ searchLabel?: string
2204
+ /**
2205
+ * The label for the Ask AI card.
2206
+ */
2207
+ askAICardLabel?: string
2208
+ }
2209
+
2210
+ /**
2211
+ * Workflow defines the interaction steps for the AI bot.
2212
+ */
2213
+ export declare interface Workflow {
2214
+ id: string
2215
+ displayName: string
2216
+ goals: string[]
2217
+ informationToCollect: WorkflowInformationToCollect[]
2218
+ botPersona?: string
2219
+ // userPersonna?: string;
2220
+ context?: string[]
2221
+ guidance?: string[]
2222
+ initialReplyMessage: string
2223
+ supportedInputs?: WorkflowInputTypes[]
2224
+ }
2225
+
2226
+ /**
2227
+ * BaseType is a base interface for data types.
2228
+ */
2229
+ declare interface WorkflowBaseContentType {
2230
+ type: string
2231
+ contentInputLabel: string // for serialization
2232
+ attachmentIcon?: InkeepCustomIcon // icon next to the title in the attachment item
2233
+ }
2234
+
2235
+ /**
2236
+ * WorkflowInputType defines the type of attachments in a Workflow.
2237
+ */
2238
+ export declare interface WorkflowBaseInputTypes {
2239
+ id: string
2240
+ type: string
2241
+ displayName: string // button label
2242
+ }
2243
+
2244
+ export declare interface WorkflowCodeContentType extends WorkflowBaseContentType {
2245
+ type: 'CODE'
2246
+ language: string
2247
+ }
2248
+
2249
+ /**
2250
+ * WorkflowFunctionalMultiInput represents a function to be called when the attachment is invoked.
2251
+ */
2252
+ export declare interface WorkflowFunctionalMultiInput extends WorkflowBaseInputTypes {
2253
+ type: 'FUNCTIONAL_MULTI_ATTACHMENT'
2254
+ onInvoke: (
2255
+ workflow: Workflow,
2256
+ selectedInputType: WorkflowInputTypes,
2257
+ callback: (messageAttachments: MessageAttachment[]) => void,
2258
+ currentMessageAttachments: MessageAttachment[],
2259
+ ) => void
2260
+ }
2261
+
2262
+ export declare interface WorkflowInformationToCollect {
2263
+ description: string
2264
+ required: boolean
2265
+ }
2266
+
2267
+ /**
2268
+ * WorkflowInputTypes represents possible ways of collecting attachments in a Workflow.
2269
+ */
2270
+ export declare type WorkflowInputTypes = WorkflowFunctionalMultiInput | WorkflowModalSingleInput
2271
+
2272
+ export declare interface WorkflowModalProps {
2273
+ titleInputLabel?: string // defaults to 'Title'
2274
+ modalHelpText?: string // help text for the modal
2275
+ modalHelpElement?: React.ReactElement // help element for the modal
2276
+ }
2277
+
2278
+ /**
2279
+ * WorkflowModalSingleInput represents a modal input type.
2280
+ */
2281
+ export declare interface WorkflowModalSingleInput extends WorkflowBaseInputTypes {
2282
+ type: 'MODAL'
2283
+ contentType: MessageAttachmentContentType
2284
+ workflowModalProps?: WorkflowModalProps
2285
+ }
2286
+
2287
+ export declare interface WorkflowTextContentType extends WorkflowBaseContentType {
2288
+ type: 'text'
2289
+ }
2290
+
2291
+ export { }
2292
+
2293
+
2294
+ declare global {
2295
+ var Inkeep: import('@inkeep/agents-ui-cloud/types').InkeepCloudJS;
2296
+ interface Window {
2297
+ Inkeep: import('@inkeep/agents-ui-cloud/types').InkeepCloudJS;
2298
+ }
2299
+ }