@inkeep/cxkit-types 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +120 -117
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2,34 +2,6 @@ import { ComponentType } from 'react';
2
2
  import { HTMLProps } from 'react';
3
3
  import { ReactNode } from 'react';
4
4
 
5
- export declare interface AIChatActionButtonLabels {
6
- /**
7
- * Text shown on the button that clears the chat history.
8
- * @example "Clear Chat" or "Start Over"
9
- */
10
- clearButtonLabel?: string;
11
- /**
12
- * Text shown on the button that generates a shareable chat link.
13
- * @example "Share Chat" or "Get Link"
14
- */
15
- shareButtonLabel?: string;
16
- /**
17
- * Text shown on the button that opens the help options menu.
18
- * @example "Get Help" or "Support Options"
19
- */
20
- getHelpButtonLabel?: string;
21
- /**
22
- * Text shown on the button that stops the AI from generating a response.
23
- * @example "Stop" or "Cancel Response"
24
- */
25
- stopButtonLabel?: string;
26
- /**
27
- * Text shown on the button that copies the chat transcript.
28
- * @example "Copy Chat" or "Copy Transcript"
29
- */
30
- copyChatButtonLabel?: string;
31
- }
32
-
33
5
  export declare interface AIChatBotResponseReceivedEvent {
34
6
  eventName: 'chat_message_bot_response_received';
35
7
  properties: {
@@ -48,7 +20,7 @@ export declare interface AIChatDisclaimerSettings {
48
20
  * Enable this when you need to display important notices or legal disclaimers.
49
21
  * @default false
50
22
  */
51
- enabled?: boolean;
23
+ isEnabled?: boolean;
52
24
  /**
53
25
  * The main text content of the disclaimer message.
54
26
  * Should clearly communicate important information about AI usage or limitations.
@@ -169,6 +141,34 @@ export declare interface AIChatThumbsUpFeedbackSubmittedEvent {
169
141
  properties: FeedbackProperties;
170
142
  }
171
143
 
144
+ export declare interface AIChatToolbarButtonLabels {
145
+ /**
146
+ * Text shown on the button that clears the chat history.
147
+ * @example "Clear Chat" or "Start Over"
148
+ */
149
+ clear?: string;
150
+ /**
151
+ * Text shown on the button that generates a shareable chat link.
152
+ * @example "Share Chat" or "Get Link"
153
+ */
154
+ share?: string;
155
+ /**
156
+ * Text shown on the button that opens the help options menu.
157
+ * @example "Get Help" or "Support Options"
158
+ */
159
+ getHelp?: string;
160
+ /**
161
+ * Text shown on the button that stops the AI from generating a response.
162
+ * @example "Stop" or "Cancel Response"
163
+ */
164
+ stop?: string;
165
+ /**
166
+ * Text shown on the button that copies the chat transcript.
167
+ * @example "Copy Chat" or "Copy Transcript"
168
+ */
169
+ copyChat?: string;
170
+ }
171
+
172
172
  export declare interface AIChatToolCallActionClickedEvent {
173
173
  eventName: 'toolcall_action_clicked';
174
174
  properties: {
@@ -181,24 +181,6 @@ export declare interface AIChatToolCallActionClickedEvent {
181
181
  };
182
182
  }
183
183
 
184
- export declare interface Analytics {
185
- /**
186
- * Whether to opt out of analytical cookies.
187
- * @default false
188
- */
189
- optOutAnalyticalCookies?: boolean;
190
- /**
191
- * Whether to opt out of all analytics.
192
- * @default false
193
- */
194
- optOutAllAnalytics?: boolean;
195
- /**
196
- * Whether to opt out of functional cookies.
197
- * @default false
198
- */
199
- optOutFunctionalCookies?: boolean;
200
- }
201
-
202
184
  export declare type AnswerConfidence = 'very_confident' | 'somewhat_confident' | 'not_confident' | 'no_sources' | 'other';
203
185
 
204
186
  export declare interface AssistantMessage extends MessageBase {
@@ -211,7 +193,7 @@ export declare type AvailableBuiltInIcons = 'FaBook' | 'FaGithub' | 'FaDatabase'
211
193
  export declare interface BaseFormField {
212
194
  name: string;
213
195
  label: string;
214
- required?: boolean;
196
+ isRequired?: boolean;
215
197
  isHidden?: boolean;
216
198
  description?: string;
217
199
  }
@@ -231,7 +213,7 @@ export declare enum ChatModel {
231
213
  }
232
214
 
233
215
  declare interface CheckboxField extends BaseFormField {
234
- inputType: 'CHECKBOX';
216
+ inputType: 'checkbox';
235
217
  defaultValue?: boolean;
236
218
  }
237
219
 
@@ -239,7 +221,7 @@ export declare interface Client {
239
221
  currentUrl: string;
240
222
  }
241
223
 
242
- export declare type CloseFormAction = 'BACK_TO_CHAT' | 'CLOSE_MODAL';
224
+ export declare type CloseFormAction = 'return_to_chat' | 'close_modal';
243
225
 
244
226
  export declare interface CodeBlockCopiedEvent {
245
227
  eventName: 'chat_code_block_copied';
@@ -304,7 +286,7 @@ export declare interface ColorModeProviderProps {
304
286
 
305
287
  declare interface CommonProperties {
306
288
  conversationId: string;
307
- interactionType: any;
289
+ componentType: any;
308
290
  tags: string[];
309
291
  }
310
292
 
@@ -416,7 +398,7 @@ export declare type FeedbackType = 'positive' | 'negative';
416
398
  export declare type FieldValues = Record<string, any>;
417
399
 
418
400
  declare interface FileField extends BaseFormField {
419
- inputType: 'FILE';
401
+ inputType: 'file';
420
402
  }
421
403
 
422
404
  export declare interface FormButtons {
@@ -441,10 +423,10 @@ export declare type FormField = CheckboxField | FileField | SelectField | TextFi
441
423
 
442
424
  export declare type FormInputType = NonNullable<FormField['inputType']>;
443
425
 
444
- export declare interface GetHelpCallToAction {
426
+ export declare interface GetHelpOption {
445
427
  icon?: InkeepCustomIcon;
446
428
  name: string;
447
- pinToToolbar?: boolean;
429
+ isPinnedToToolbar?: boolean;
448
430
  action: ChatAction;
449
431
  }
450
432
 
@@ -453,7 +435,7 @@ export declare enum GitHubIssueState {
453
435
  Open = "OPEN"
454
436
  }
455
437
 
456
- export declare type IkpChatAction = GetHelpCallToAction | ToolCallAction;
438
+ export declare type IkpChatAction = GetHelpOption | ToolCallAction;
457
439
 
458
440
  export declare type IkpTheme = DeepPartial<StrictIkpTheme>;
459
441
 
@@ -462,8 +444,8 @@ export declare type IkpThemeCategory = keyof StrictIkpTheme;
462
444
  export declare type IkpThemeEntry = [keyof IkpTheme, Record<string, unknown>][];
463
445
 
464
446
  export declare interface IncludeChatSessionField extends BaseFormField {
465
- _type: 'INCLUDE_CHAT_SESSION';
466
- inputType?: 'CHECKBOX';
447
+ _type: 'include_chat_session';
448
+ inputType?: 'checkbox';
467
449
  defaultValue?: boolean;
468
450
  }
469
451
 
@@ -477,7 +459,7 @@ export declare interface InkeepAIChatSettings extends ToolConfig {
477
459
  /**
478
460
  * A welcome message shown at the start of a new chat session.
479
461
  * Supports markdown formatting for rich text styling.
480
- * Use this to introduce the bot's capabilities and set expectations.
462
+ * Use this to introduce the AI assistant's capabilities and set expectations.
481
463
  * @example "👋 Hi! I'm here to help you with technical questions about our API..."
482
464
  */
483
465
  introMessage?: string;
@@ -493,24 +475,30 @@ export declare interface InkeepAIChatSettings extends ToolConfig {
493
475
  * Choose a name that reflects the assistant's role and your brand.
494
476
  * @example "Atlas Assistant" or "DevBot"
495
477
  */
496
- botName?: string;
478
+ aiAssistantName?: string;
497
479
  /**
498
- * URL to the bot's avatar image for light mode.
480
+ * URL to the AI assistant's avatar image.
499
481
  * Should be a square image, recommended size 40x40px.
500
482
  * Supports common image formats (PNG, JPG, SVG).
483
+ *
484
+ * You can pass a string or an object to configure for different color modes.
485
+ *
486
+ * @example
487
+ * {
488
+ * light: 'https://example.com/avatar-light.png',
489
+ * dark: 'https://example.com/avatar-dark.png',
490
+ * }
501
491
  */
502
- botAvatarSrcUrl?: string;
503
- /**
504
- * URL to the bot's avatar image for dark mode.
505
- * Should be a square image, recommended size 40x40px.
506
- */
507
- botAvatarDarkSrcUrl?: string;
492
+ aiAssistantAvatar?: string | {
493
+ light: string;
494
+ dark: string;
495
+ };
508
496
  /**
509
497
  * URL to the user's avatar image in the chat interface.
510
498
  * Should be a square image, recommended size 40x40px.
511
499
  * Falls back to a default user icon if not provided.
512
500
  */
513
- userAvatarSrcUrl?: string;
501
+ userAvatar?: string;
514
502
  /**
515
503
  * Controls whether links in chat messages open in new browser tabs.
516
504
  * Enable this to help users maintain their chat context when following links.
@@ -518,27 +506,27 @@ export declare interface InkeepAIChatSettings extends ToolConfig {
518
506
  */
519
507
  shouldOpenLinksInNewTab?: boolean;
520
508
  /**
521
- * Custom heading text for the quick questions section.
509
+ * Custom heading text for the example questions section.
522
510
  * Use this to better describe your suggested queries.
523
511
  * @example "Common Questions" or "Try asking about..."
524
512
  */
525
- quickQuestionsLabel?: string;
513
+ exampleQuestionsLabel?: string;
526
514
  /**
527
515
  * A list of pre-written questions users can click to quickly start a conversation.
528
- * These should reflect common use cases and help users understand the bot's capabilities.
516
+ * These should reflect common use cases and help users understand the AI assistant's capabilities.
529
517
  * @example ["How do I reset my password?", "What are the API rate limits?"]
530
518
  */
531
- quickQuestions?: string[];
519
+ exampleQuestions?: string[];
532
520
  /**
533
- * Whether to visually emphasize the first quick question.
521
+ * Whether to visually emphasize the first example question.
534
522
  * Use this to draw attention to the most important or common query.
535
523
  */
536
- shouldHighlightFirstQuickQuestion?: boolean;
524
+ isFirstExampleQuestionHighlighted?: boolean;
537
525
  /**
538
526
  * Enables the ability to share chat conversations via URL.
539
527
  * Useful for allowing users to share helpful conversations with teammates.
540
528
  */
541
- isChatSharingEnabled?: boolean;
529
+ isShareButtonVisible?: boolean;
542
530
  /**
543
531
  * The base URL path used when generating shareable chat links.
544
532
  * Should match your application's routing structure.
@@ -549,7 +537,7 @@ export declare interface InkeepAIChatSettings extends ToolConfig {
549
537
  * Controls the visibility of the copy chat button.
550
538
  * Allows users to copy the entire chat transcript to their clipboard.
551
539
  */
552
- shouldShowCopyChatButton?: boolean;
540
+ isCopyChatButtonVisible?: boolean;
553
541
  /**
554
542
  * Unique identifier for loading a specific chat session.
555
543
  * Use this to restore a previous conversation state.
@@ -580,7 +568,7 @@ export declare interface InkeepAIChatSettings extends ToolConfig {
580
568
  * Array of actions available in the "Get Help" menu.
581
569
  * Use this to provide alternative support options like contact forms or documentation links.
582
570
  */
583
- getHelpCallToActions?: GetHelpCallToAction[];
571
+ getHelpOptions?: GetHelpOption[];
584
572
  /**
585
573
  * System-level instructions that guide the AI's behavior and responses.
586
574
  * Use these to define the assistant's personality, knowledge boundaries, and response style.
@@ -595,12 +583,11 @@ export declare interface InkeepAIChatSettings extends ToolConfig {
595
583
  * Collection of interactive workflows that can be triggered during chat.
596
584
  * These can guide users through complex processes or data collection.
597
585
  */
598
- workflows?: Workflow[];
599
586
  /**
600
587
  * Custom labels for the chat interface's action buttons.
601
588
  * Use this for internationalization or to better match your application's terminology.
602
589
  */
603
- actionButtonLabels?: AIChatActionButtonLabels;
590
+ toolbarButtonLabels?: AIChatToolbarButtonLabels;
604
591
  /**
605
592
  * Specifies which AI model to use for generating responses.
606
593
  * Different models may have different capabilities or specializations.
@@ -654,33 +641,31 @@ export declare interface InkeepBaseSettings {
654
641
  */
655
642
  userAuthToken?: string;
656
643
  /**
657
- * Callback function to handle analytics events from the widget.
658
- * Receives InkeepCallbackEvent objects containing event details.
644
+ * Handler for analytics events from the widget.
659
645
  * @param event The analytics event object
660
646
  */
661
- logEventCallback?: (event: InkeepCallbackEvent) => void;
647
+ onEvent?: (event: InkeepCallbackEvent) => void;
662
648
  /**
663
- * Configuration for analytics behavior and tracking.
664
- * Controls what events are tracked and how they are processed.
649
+ * Privacy and cookie preferences configuration.
665
650
  */
666
- analytics?: Analytics;
651
+ privacyPreferences?: PrivacyPreferences;
667
652
  /**
668
653
  * Custom base URL for analytics API endpoints.
669
654
  * Useful when routing analytics requests through a proxy.
670
655
  * Should include protocol (e.g., 'https://analytics.your-proxy.com')
671
656
  */
672
- analyticsBaseUrl?: string;
657
+ analyticsApiBaseUrl?: string;
673
658
  /**
674
659
  * Custom base URL for search and chat API endpoints.
675
660
  * Useful when routing API requests through a proxy.
676
661
  * Should include protocol (e.g., 'https://api.your-proxy.com')
677
662
  */
678
- baseUrl?: string;
663
+ aiApiBaseUrl?: string;
679
664
  /**
680
665
  * 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.
681
666
  * @default false
682
667
  */
683
- bypassChallenge?: boolean;
668
+ shouldBypassCaptcha?: boolean;
684
669
  /**
685
670
  * Function to transform source data before display.
686
671
  * Allows customizing how source information is presented in the widget.
@@ -691,9 +676,9 @@ export declare interface InkeepBaseSettings {
691
676
  /**
692
677
  * Environment setting for the widget.
693
678
  * Affects API endpoints and debug behaviors.
694
- * @default 'PRODUCTION'
679
+ * @default 'production'
695
680
  */
696
- env?: 'DEVELOPMENT' | 'PRODUCTION';
681
+ env?: 'development' | 'production';
697
682
  /**
698
683
  * Reference to the shadow DOM host element if using custom Shadow DOM.
699
684
  * Required when embedding the widget within a Shadow DOM.
@@ -720,7 +705,7 @@ export declare interface InkeepBaseSettings {
720
705
  * Useful for tracking or maintaining context in navigation.
721
706
  * Object mapping parameter names to values.
722
707
  */
723
- appendQueryParamsToUrls?: UrlQueryParam;
708
+ urlQueryParamsToAppend?: UrlQueryParam;
724
709
  }
725
710
 
726
711
  export declare type InkeepCallbackEvent = InkeepEventWithCommon & {
@@ -733,10 +718,7 @@ export declare interface InkeepConfig {
733
718
  * @default 'ikp'
734
719
  */
735
720
  prefix?: string;
736
- /**
737
- * The type widget.
738
- */
739
- interactionType: any;
721
+ /* Excluded from this release type: componentType */
740
722
  /**
741
723
  * Configuration for the chat.
742
724
  */
@@ -767,13 +749,13 @@ export declare type InkeepEventWithCommon = ExtendPropertiesWithCommon<InkeepEve
767
749
 
768
750
  export declare interface InkeepModalSettings {
769
751
  /**
770
- * Whether the modal is open.
752
+ * Controls whether the modal is open.
771
753
  */
772
- open?: boolean;
754
+ isOpen?: boolean;
773
755
  /**
774
- * Callback fired when the modal open state changes.
756
+ * Handler called when the modal opens or closes.
775
757
  */
776
- onOpenChange?: (open: boolean) => void;
758
+ onOpenChange?: (isOpen: boolean) => void;
777
759
  /**
778
760
  * The shortcut key.
779
761
  *
@@ -807,18 +789,18 @@ export declare interface InkeepSearchSettings {
807
789
  * The maximum number of hits to return.
808
790
  * @default 40
809
791
  */
810
- maximumHitsLimit?: number;
792
+ maxResults?: number;
811
793
  /**
812
794
  * The time in milliseconds to wait triggering the search.
813
795
  * @default 0
814
796
  */
815
- debounceTime?: number;
797
+ debounceTimeMs?: number;
816
798
  /**
817
799
  * Ref to the AIChat component's callable functions
818
800
  */
819
801
  searchFunctionsRef?: React.Ref<SearchFunctions>;
820
802
  /**
821
- * Whether to open links in new tab.
803
+ * Controls whether links should open in a new tab.
822
804
  * @default false
823
805
  */
824
806
  shouldOpenLinksInNewTab?: boolean;
@@ -830,17 +812,17 @@ export declare interface InkeepSearchSettings {
830
812
  * Behavior:
831
813
  * - Omit 'All' from tabs array to hide the All tab
832
814
  * - Empty tabs array will show all results without tab UI
833
- * - Tabs only appear when they have results, unless alwaysVisible is set
815
+ * - Tabs only appear when they have results, unless isAlwaysVisible is set
834
816
  *
835
817
  * @example
836
818
  * ```ts
837
819
  * // Basic tabs
838
820
  * tabs: ['Publications', 'GitHub']
839
821
  *
840
- * // With alwaysVisible option
822
+ * // With isAlwaysVisible option
841
823
  * tabs: [
842
824
  * 'Publications',
843
- * ['GitHub', { alwaysVisible: true }] // Shows even with no results
825
+ * ['GitHub', { isAlwaysVisible: true }] // Shows even with no results
844
826
  * ]
845
827
  * ```
846
828
  */
@@ -898,8 +880,8 @@ export declare interface IntelligentFormConfig {
898
880
  successView: IntelligentFormSuccessView;
899
881
  /** Callback function called when form is submitted */
900
882
  onSubmit: SubmitCallback;
901
- /** Optional name of the bot shown in the form */
902
- botName?: string;
883
+ /** Optional name of the assistant shown in the form */
884
+ aiAssistantName?: string;
903
885
  }
904
886
 
905
887
  export declare interface IntelligentFormContextSuggestionsEvent {
@@ -914,9 +896,9 @@ export declare type IntelligentFormEvent = IntelligentFormSubmittedEvent | Intel
914
896
 
915
897
  export declare type IntelligentFormField = Exclude<FormField, IncludeChatSessionField> & {
916
898
  /**
917
- * Controls AI field generation behavior
899
+ * Controls whether to prefill the field with the AI's response
918
900
  */
919
- aiGenerated?: boolean;
901
+ shouldPrefillWithAI?: boolean;
920
902
  };
921
903
 
922
904
  export declare interface IntelligentFormPrimarySubmittedEvent {
@@ -962,7 +944,7 @@ export declare interface IntelligentFormSuccessView {
962
944
  }
963
945
 
964
946
  export declare interface InvokeCallbackAction {
965
- type: 'INVOKE_CALLBACK';
947
+ type: 'invoke_callback';
966
948
  callback: (args: InvokeCallbackArgs) => void;
967
949
  shouldCloseModal?: boolean;
968
950
  }
@@ -1025,15 +1007,33 @@ export declare type OnToggleView = (opts: {
1025
1007
  }) => void;
1026
1008
 
1027
1009
  export declare interface OpenFormAction {
1028
- type: 'OPEN_FORM';
1010
+ type: 'open_form';
1029
1011
  formConfig: FormConfig;
1030
1012
  }
1031
1013
 
1032
1014
  export declare interface OpenUrlAction {
1033
- type: 'OPEN_LINK';
1015
+ type: 'open_link';
1034
1016
  url: string;
1035
1017
  }
1036
1018
 
1019
+ export declare interface PrivacyPreferences {
1020
+ /**
1021
+ * Whether to opt out of analytical cookies.
1022
+ * @default false
1023
+ */
1024
+ optOutAnalyticalCookies?: boolean;
1025
+ /**
1026
+ * Whether to opt out of all analytics.
1027
+ * @default false
1028
+ */
1029
+ optOutAllAnalytics?: boolean;
1030
+ /**
1031
+ * Whether to opt out of functional cookies.
1032
+ * @default false
1033
+ */
1034
+ optOutFunctionalCookies?: boolean;
1035
+ }
1036
+
1037
1037
  declare type RecordTypes = 'DocumentationRecord' | 'GitHubIssueRecord' | 'StackOverflowRecord' | 'DiscordRecord' | 'SlackEntry' | 'DiscourseRecord';
1038
1038
 
1039
1039
  export declare type RenderFn = ({ children, ssr, root, }: {
@@ -1125,12 +1125,12 @@ export declare interface SearchRootRecord {
1125
1125
  export declare interface SearchTab {
1126
1126
  [0]: string;
1127
1127
  [1]: {
1128
- alwaysVisible?: boolean;
1128
+ isAlwaysVisible?: boolean;
1129
1129
  };
1130
1130
  }
1131
1131
 
1132
1132
  declare interface SelectField extends BaseFormField {
1133
- inputType: 'SELECT';
1133
+ inputType: 'select';
1134
1134
  items: SelectItem[];
1135
1135
  defaultValue?: string;
1136
1136
  placeholder?: string;
@@ -1262,9 +1262,12 @@ export declare interface SyncColorMode {
1262
1262
  *
1263
1263
  * // Watch a specific container element
1264
1264
  * target: document.querySelector('#app')
1265
+ *
1266
+ * // Watch a specific element by ID
1267
+ * target: '#app'
1265
1268
  * ```
1266
1269
  */
1267
- target: HTMLElement;
1270
+ target: HTMLElement | string;
1268
1271
  /**
1269
1272
  * The specific attributes to monitor for color mode changes.
1270
1273
  * The observer will only trigger when these attributes change on the target element.
@@ -1308,7 +1311,7 @@ export declare interface SyncColorMode {
1308
1311
  * isDarkMode: (attributes) => attributes['color-scheme'] === 'dark'
1309
1312
  * ```
1310
1313
  */
1311
- isDarkMode: (attributes: Record<string, string | null>) => boolean;
1314
+ isDarkMode?: (attributes: Record<string, string | null>) => boolean;
1312
1315
  /**
1313
1316
  * Optional callback function that is invoked whenever the color mode changes.
1314
1317
  *
@@ -1337,7 +1340,7 @@ export declare interface SystemMessage extends MessageBase {
1337
1340
  }
1338
1341
 
1339
1342
  declare interface TextField extends BaseFormField {
1340
- inputType: 'EMAIL' | 'TEXT' | 'TEXTAREA';
1343
+ inputType: 'email' | 'text' | 'textarea';
1341
1344
  defaultValue?: string;
1342
1345
  placeholder?: string;
1343
1346
  }
@@ -1698,7 +1701,7 @@ export declare interface WorkflowModalSingleInput extends WorkflowBaseInputTypes
1698
1701
  }
1699
1702
 
1700
1703
  export declare interface WorkflowTextContentType extends WorkflowBaseContentType {
1701
- type: 'TEXT';
1704
+ type: 'text';
1702
1705
  }
1703
1706
 
1704
1707
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-types",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",