@inkeep/cxkit-types 0.0.0-dev-20250228055234 → 0.0.0-dev-20250228071024

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 +104 -163
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2,18 +2,6 @@ import { ComponentType } from 'react';
2
2
  import { HTMLProps } from 'react';
3
3
  import { ReactNode } from 'react';
4
4
 
5
- export declare interface AIChatBotResponseReceivedEvent {
6
- eventName: 'chat_message_bot_response_received';
7
- properties: {
8
- messages: Message[];
9
- messageId: string;
10
- question: string;
11
- responseMessage: Message;
12
- linksUsedInResponse: SourceItem[];
13
- workflowId?: string;
14
- };
15
- }
16
-
17
5
  export declare interface AIChatDisclaimerSettings {
18
6
  /**
19
7
  * Controls whether the disclaimer message is shown.
@@ -92,85 +80,6 @@ export declare interface AIChatFunctions {
92
80
  focusInput: () => void;
93
81
  }
94
82
 
95
- export declare interface AIChatGetHelpOptionClickedEvent {
96
- eventName: 'get_help_option_clicked';
97
- properties: {
98
- actionType?: ChatActionType;
99
- name: string;
100
- url?: string;
101
- conversationId: string;
102
- };
103
- }
104
-
105
- export declare interface AIChatHistoryClearedEvent {
106
- eventName: 'chat_history_cleared';
107
- properties: {
108
- conversationId: string | null;
109
- };
110
- }
111
-
112
- export declare interface AIChatMessageCopiedEvent {
113
- eventName: 'chat_message_copied';
114
- properties: {
115
- messageId: string;
116
- };
117
- }
118
-
119
- export declare interface AIChatMessageSubmittedEvent {
120
- eventName: 'chat_message_submitted';
121
- properties: {
122
- messages: Message[];
123
- messageId: string;
124
- content: string;
125
- workflowId?: string;
126
- };
127
- }
128
-
129
- export declare interface AIChatResponseLinkOpenedEvent {
130
- eventName: 'chat_response_link_opened';
131
- properties: {
132
- messageId: string;
133
- title?: string;
134
- url?: string;
135
- };
136
- }
137
-
138
- export declare interface AIChatResponseSourceItemClickedEvent {
139
- eventName: 'chat_response_source_item_clicked';
140
- properties: {
141
- messageId: string;
142
- sourceType: SourceItem['type'];
143
- title?: string;
144
- url?: string;
145
- };
146
- }
147
-
148
- export declare interface AIChatShareButtonClickedEvent {
149
- eventName: 'chat_share_button_clicked';
150
- properties: {
151
- sharedChatUrl: string;
152
- sharedConversationId: string;
153
- originalConversationId: string;
154
- };
155
- }
156
-
157
- export declare interface AIChatSharedSessionLoadedEvent {
158
- eventName: 'chat_shared_session_loaded';
159
- properties: {
160
- conversationId: string;
161
- };
162
- }
163
-
164
- export declare interface AIChatThumbsDownFeedbackSubmittedEvent {
165
- eventName: 'chat_thumbs_down_feedback_submitted';
166
- properties: FeedbackProperties;
167
- }
168
-
169
- export declare interface AIChatThumbsUpFeedbackSubmittedEvent {
170
- eventName: 'chat_thumbs_up_feedback_submitted';
171
- properties: FeedbackProperties;
172
- }
173
-
174
83
  export declare interface AIChatToolbarButtonLabels {
175
84
  /**
176
85
  * Text shown on the button that clears the chat history.
@@ -199,25 +108,62 @@ export declare interface AIChatToolbarButtonLabels {
199
108
  copyChat?: string;
200
109
  }
201
110
 
202
- export declare interface AIChatToolCallActionClickedEvent {
203
- eventName: 'toolcall_action_clicked';
111
+ export declare type AnswerConfidence = 'very_confident' | 'somewhat_confident' | 'not_confident' | 'no_sources' | 'other';
112
+
113
+ export declare interface AssistantCodeBlockCopiedEvent {
114
+ eventName: 'assistant_code_block_copied';
204
115
  properties: {
205
- actionType: ChatActionType;
206
- conversationId: string;
207
- question?: string;
208
- answer?: string;
209
- answerId?: string;
210
- workflowId?: string;
116
+ conversation: ConversationResponse;
117
+ language: string;
118
+ code: string;
211
119
  };
212
120
  }
213
121
 
214
- export declare type AnswerConfidence = 'very_confident' | 'somewhat_confident' | 'not_confident' | 'no_sources' | 'other';
215
-
216
122
  export declare interface AssistantMessage extends MessageBase {
217
123
  role: 'assistant';
218
124
  links: SourceItem[];
219
125
  }
220
126
 
127
+ export declare interface AssistantMessageCopiedEvent {
128
+ eventName: 'assistant_message_copied';
129
+ properties: {
130
+ conversation: ConversationResponse;
131
+ };
132
+ }
133
+
134
+ export declare interface AssistantMessageLinkOpenedEvent {
135
+ eventName: 'assistant_message_inline_link_opened';
136
+ properties: {
137
+ title?: string;
138
+ url?: string;
139
+ };
140
+ }
141
+
142
+ export declare interface AssistantMessageReceivedEvent {
143
+ eventName: 'assistant_message_received';
144
+ properties: {
145
+ conversation?: ConversationResponse;
146
+ };
147
+ }
148
+
149
+ export declare interface AssistantNegativeFeedbackSubmittedEvent {
150
+ eventName: 'assistant_positive_feedback_submitted';
151
+ properties: FeedbackProperties;
152
+ }
153
+
154
+ export declare interface AssistantPositiveFeedbackSubmittedEvent {
155
+ eventName: 'assistant_negative_feedback_submitted';
156
+ properties: FeedbackProperties;
157
+ }
158
+
159
+ export declare interface AssistantSourceItemClickedEvent {
160
+ eventName: 'assistant_source_item_clicked';
161
+ properties: {
162
+ conversation: ConversationResponse;
163
+ link: TransformedSource;
164
+ };
165
+ }
166
+
221
167
  export declare type AvailableBuiltInIcons = 'FaBook' | 'FaGithub' | 'FaDatabase' | 'FaStackOverflow' | 'FaChrome' | 'FaPhone' | 'FaEnvelope' | 'FaPencil' | 'FaBlog' | 'FaSort' | 'FaPenSquare' | 'FaChevronRight' | 'FaChevronUp' | 'FaFilePdf' | 'FaDiscourse' | 'FaDiscord' | 'FaSlack' | 'IoDocumentTextSharp' | 'IoDocumentSharp' | 'IoSend' | 'IoInformationCircleOutline' | 'IoLinkOutline' | 'IoThumbsUpSharp' | 'IoThumbsDownSharp' | 'IoSearch' | 'IoCopyOutline' | 'IoCopy' | 'IoReturnDownBackOutline' | 'IoChevronForwardOutline' | 'IoReturnDownForward' | 'IoCloseOutline' | 'IoCheckmarkOutline' | 'IoBookOutline' | 'IoReaderOutline' | 'IoHelpBuoyOutline' | 'IoPeopleOutline' | 'IoDocumentTextOutline' | 'IoChatbubblesOutline' | 'FaRegFilePdf' | 'IoLogoDiscord' | 'IoLogoGithub' | 'IoTerminal' | 'FaBriefcase' | 'IoPlayCircleOutline' | 'IoPencilOutline' | 'IoCheckmarkDoneOutline' | 'IoHomeOutline' | 'IoMail' | 'IoOpenOutline' | 'FaTelegram' | 'FaTable' | 'FaMagnifyingGlass' | 'LuArrowLeft' | 'LuCircleCheck' | 'LuCommand' | 'LuCopy' | 'LuCheck' | 'LuCornerDownLeft' | 'LuRepeat' | 'LuThumbsDown' | 'LuThumbsUp' | 'LuUsers' | 'LuUser' | 'LuArrowUpRight' | 'LuBookOpen' | 'LuChevronDown' | 'LuLoaderCircle' | 'FiEdit' | 'LuSparkles';
222
168
 
223
169
  export declare interface BaseFormField {
@@ -232,7 +178,14 @@ declare type ChatAction = InvokeCallbackAction | OpenFormAction | OpenUrlAction;
232
178
 
233
179
  export declare type ChatActionType = ChatAction['type'];
234
180
 
235
- export declare type ChatEvent = AIChatBotResponseReceivedEvent | AIChatMessageSubmittedEvent | AIChatSharedSessionLoadedEvent | AIChatThumbsDownFeedbackSubmittedEvent | AIChatThumbsUpFeedbackSubmittedEvent | AIChatHistoryClearedEvent | AIChatMessageCopiedEvent | AIChatGetHelpOptionClickedEvent | AIChatToolCallActionClickedEvent | AIChatShareButtonClickedEvent | AIChatResponseSourceItemClickedEvent | AIChatResponseLinkOpenedEvent | CodeBlockCopiedEvent;
181
+ export declare interface ChatClearButtonClickedEvent {
182
+ eventName: 'chat_clear_button_clicked';
183
+ properties: {
184
+ conversation: ConversationResponse;
185
+ };
186
+ }
187
+
188
+ export declare type ChatEvent = AssistantMessageReceivedEvent | UserMessageSubmittedEvent | SharedChatLoadedEvent | AssistantPositiveFeedbackSubmittedEvent | AssistantNegativeFeedbackSubmittedEvent | ChatClearButtonClickedEvent | AssistantMessageCopiedEvent | GetHelpOptionClickedEvent | ChatShareButtonClickedEvent | AssistantSourceItemClickedEvent | AssistantMessageLinkOpenedEvent | AssistantCodeBlockCopiedEvent;
236
189
 
237
190
  export declare enum ChatModel {
238
191
  /**
@@ -242,6 +195,16 @@ export declare enum ChatModel {
242
195
  QA_EXPERT = "inkeep-qa-expert"
243
196
  }
244
197
 
198
+ export declare interface ChatShareButtonClickedEvent {
199
+ eventName: 'chat_share_button_clicked';
200
+ properties: {
201
+ sharedChatUrl: string;
202
+ sharedConversationId: string;
203
+ originalConversationId: string;
204
+ conversation: ConversationResponse;
205
+ };
206
+ }
207
+
245
208
  declare interface CheckboxField extends BaseFormField {
246
209
  inputType: 'checkbox';
247
210
  defaultValue?: boolean;
@@ -249,15 +212,6 @@ declare interface CheckboxField extends BaseFormField {
249
212
 
250
213
  export declare type CloseFormAction = 'return_to_chat' | 'close_modal';
251
214
 
252
- export declare interface CodeBlockCopiedEvent {
253
- eventName: 'chat_code_block_copied';
254
- properties: {
255
- conversationId: string;
256
- language: string;
257
- code: string;
258
- };
259
- }
260
-
261
215
  export declare interface ColorMode extends Omit<ColorModeProviderProps, 'children' | 'rootId' | 'shadowHostId'> {
262
216
  /**
263
217
  * Configuration for syncing the widget's color mode with an external element.
@@ -311,7 +265,7 @@ export declare interface ColorModeProviderProps {
311
265
  }
312
266
 
313
267
  declare interface CommonProperties {
314
- conversationId: string;
268
+ conversation: ConversationResponse;
315
269
  componentType: any;
316
270
  tags: string[];
317
271
  }
@@ -332,7 +286,10 @@ export declare interface ConversationMessage {
332
286
  createdAt: string;
333
287
  updatedAt: string;
334
288
  role: 'assistant' | 'system' | 'user';
335
- content: string;
289
+ content: string | {
290
+ type: 'text';
291
+ text: string;
292
+ }[];
336
293
  name: string;
337
294
  links: SourceItem[];
338
295
  properties: Record<string, unknown>;
@@ -411,12 +368,8 @@ export declare interface FeedbackBody {
411
368
  export declare type FeedbackItemType = keyof MessageFeedback;
412
369
 
413
370
  declare interface FeedbackProperties {
414
- conversationId: string;
415
- messageId: string;
416
- question: string;
417
- answer: string;
371
+ conversation?: ConversationResponse;
418
372
  reasons: FeebackReason[];
419
- workflowId?: string;
420
373
  }
421
374
 
422
375
  export declare type FeedbackType = 'positive' | 'negative';
@@ -438,6 +391,14 @@ export declare interface GetHelpOption {
438
391
  action: ChatAction;
439
392
  }
440
393
 
394
+ export declare interface GetHelpOptionClickedEvent {
395
+ eventName: 'get_help_option_clicked';
396
+ properties: {
397
+ getHelpOption: GetHelpOption;
398
+ conversation?: ConversationResponse;
399
+ };
400
+ }
401
+
441
402
  export declare enum GitHubIssueState {
442
403
  Closed = "CLOSED",
443
404
  Open = "OPEN"
@@ -848,11 +809,11 @@ export declare interface InkeepSearchSettings {
848
809
 
849
810
  export declare type InputMaybe<T> = T | null;
850
811
 
851
- export declare interface IntelligentFormAIErrorEvent {
852
- eventName: 'intelligent_form_ai_error';
812
+ export declare interface IntelligentFormAIResponseProvidedEvent {
813
+ eventName: 'intelligent_form_ai_response_provided';
853
814
  properties: {
854
- conversationId: string;
855
- error: string;
815
+ conversation?: ConversationResponse;
816
+ recordsConsidered?: SourceItem[];
856
817
  };
857
818
  }
858
819
 
@@ -864,15 +825,7 @@ export declare interface IntelligentFormButtons {
864
825
  };
865
826
  }
866
827
 
867
- export declare interface IntelligentFormContextSuggestionsEvent {
868
- eventName: 'intelligent_form_context_suggestions';
869
- properties: {
870
- conversationId: string;
871
- suggestedFields: string[];
872
- };
873
- }
874
-
875
- export declare type IntelligentFormEvent = IntelligentFormSubmittedEvent | IntelligentFormSubmissionErrorEvent | IntelligentFormPrimarySubmittedEvent | IntelligentFormQAResponseEvent | IntelligentFormContextSuggestionsEvent | IntelligentFormAIErrorEvent;
828
+ export declare type IntelligentFormEvent = IntelligentFormPrimarySectionSubmittedEvent | IntelligentFormAIResponseProvidedEvent | IntelligentFormSubmittedEvent;
876
829
 
877
830
  export declare type IntelligentFormField = Exclude<FormField, IncludeChatSessionField> & {
878
831
  /**
@@ -881,23 +834,10 @@ export declare type IntelligentFormField = Exclude<FormField, IncludeChatSession
881
834
  shouldPrefillWithAI?: boolean;
882
835
  };
883
836
 
884
- export declare interface IntelligentFormPrimarySubmittedEvent {
885
- eventName: 'intelligent_form_primary_submitted';
886
- properties: {
887
- conversationId: string;
888
- fields: string[];
889
- messages: Message[];
890
- };
891
- }
892
-
893
- export declare interface IntelligentFormQAResponseEvent {
894
- eventName: 'intelligent_form_qa_response';
837
+ export declare interface IntelligentFormPrimarySectionSubmittedEvent {
838
+ eventName: 'intelligent_form_primary_section_submitted';
895
839
  properties: {
896
- conversationId: string;
897
- messages: Message[];
898
- answer: string;
899
- confidence?: AnswerConfidence;
900
- recordsConsidered?: SourceItem[];
840
+ conversation?: ConversationResponse;
901
841
  };
902
842
  }
903
843
 
@@ -937,18 +877,10 @@ export declare interface IntelligentFormSettings {
937
877
  aiAssistantName?: string;
938
878
  }
939
879
 
940
- export declare interface IntelligentFormSubmissionErrorEvent {
941
- eventName: 'intelligent_form_submission_error';
942
- properties: {
943
- conversationId: string;
944
- error: string;
945
- };
946
- }
947
-
948
880
  export declare interface IntelligentFormSubmittedEvent {
949
881
  eventName: 'intelligent_form_submitted';
950
882
  properties: {
951
- conversationId: string;
883
+ conversation: ConversationResponse;
952
884
  values: Record<string, unknown>;
953
885
  };
954
886
  }
@@ -992,16 +924,11 @@ export declare interface MessageAttributes {
992
924
  }
993
925
 
994
926
  declare interface MessageBase {
995
- content: MessageContent;
927
+ content: ConversationResponse['messages'][number]['content'];
996
928
  id: string;
997
929
  metadata?: MessageMetadata;
998
930
  }
999
931
 
1000
- export declare type MessageContent = string | {
1001
- type: 'text';
1002
- text: string;
1003
- }[];
1004
-
1005
932
  export declare interface MessageFeedback {
1006
933
  unrelated_response: boolean;
1007
934
  inaccurate_statement: boolean;
@@ -1101,7 +1028,7 @@ export declare interface SearchQueryResponseReceivedEvent {
1101
1028
  eventName: 'search_query_response_received';
1102
1029
  properties: {
1103
1030
  searchQuery: string;
1104
- totalHits: number;
1031
+ totalResults: number;
1105
1032
  };
1106
1033
  }
1107
1034
 
@@ -1165,6 +1092,13 @@ export declare interface ShadowRootProps {
1165
1092
  children?: ReactNode;
1166
1093
  }
1167
1094
 
1095
+ export declare interface SharedChatLoadedEvent {
1096
+ eventName: 'shared_chat_loaded';
1097
+ properties: {
1098
+ conversation?: ConversationResponse;
1099
+ };
1100
+ }
1101
+
1168
1102
  export declare interface SourceItem {
1169
1103
  id?: string;
1170
1104
  title: string | undefined;
@@ -1509,6 +1443,13 @@ export declare interface UserMessage extends MessageBase {
1509
1443
  role: 'user';
1510
1444
  }
1511
1445
 
1446
+ export declare interface UserMessageSubmittedEvent {
1447
+ eventName: 'user_message_submitted';
1448
+ properties: {
1449
+ conversation?: ConversationResponse;
1450
+ };
1451
+ }
1452
+
1512
1453
  export declare interface UserProperties {
1513
1454
  /**
1514
1455
  * The user ID.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-types",
3
- "version": "0.0.0-dev-20250228055234",
3
+ "version": "0.0.0-dev-20250228071024",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",