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

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 +74 -71
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -34,6 +34,36 @@ export declare interface AIChatDisclaimerSettings {
34
34
  tooltip?: string;
35
35
  }
36
36
 
37
+ export declare interface AIChatFormButtons {
38
+ submit: {
39
+ label?: string;
40
+ onSubmit: SubmitCallback;
41
+ };
42
+ close?: {
43
+ action: CloseFormAction;
44
+ };
45
+ }
46
+
47
+ declare interface AIChatFormDoneButton {
48
+ label: string;
49
+ icon?: InkeepCustomIcon;
50
+ action: CloseFormAction;
51
+ }
52
+
53
+ export declare interface AIChatFormSettings {
54
+ heading?: string;
55
+ description?: string;
56
+ buttons: AIChatFormButtons;
57
+ fields: FormField[];
58
+ successView: AIChatFormSuccessView;
59
+ }
60
+
61
+ declare interface AIChatFormSuccessView {
62
+ heading: string;
63
+ message: string;
64
+ doneButton: AIChatFormDoneButton;
65
+ }
66
+
37
67
  export declare interface AIChatFunctions {
38
68
  /**
39
69
  * Programmatically sends a message in the chat.
@@ -52,9 +82,9 @@ export declare interface AIChatFunctions {
52
82
  clearChat: () => void;
53
83
  /**
54
84
  * Displays a form overlay in the chat interface.
55
- * @param formConfig Configuration object defining the form's fields and behavior
85
+ * @param formSettings Configuration object defining the form's fields and behavior
56
86
  */
57
- openForm: (formConfig: FormConfig) => void;
87
+ openForm: (formSettings: AIChatFormSettings) => void;
58
88
  /**
59
89
  * Programmatically sets focus to the chat input field.
60
90
  * Useful after programmatic updates or when showing the chat interface.
@@ -217,10 +247,6 @@ declare interface CheckboxField extends BaseFormField {
217
247
  defaultValue?: boolean;
218
248
  }
219
249
 
220
- export declare interface Client {
221
- currentUrl: string;
222
- }
223
-
224
250
  export declare type CloseFormAction = 'return_to_chat' | 'close_modal';
225
251
 
226
252
  export declare interface CodeBlockCopiedEvent {
@@ -401,24 +427,6 @@ declare interface FileField extends BaseFormField {
401
427
  inputType: 'file';
402
428
  }
403
429
 
404
- export declare interface FormButtons {
405
- submit: {
406
- label?: string;
407
- onSubmit: SubmitCallback;
408
- };
409
- close?: {
410
- action: CloseFormAction;
411
- };
412
- }
413
-
414
- export declare interface FormConfig {
415
- heading?: string;
416
- description?: string;
417
- buttons: FormButtons;
418
- fields: FormField[];
419
- successView: SuccessView;
420
- }
421
-
422
430
  export declare type FormField = CheckboxField | FileField | SelectField | TextField | IncludeChatSessionField;
423
431
 
424
432
  export declare type FormInputType = NonNullable<FormField['inputType']>;
@@ -848,40 +856,12 @@ export declare interface IntelligentFormAIErrorEvent {
848
856
  };
849
857
  }
850
858
 
851
- export declare interface IntelligentFormConfig {
852
- /**
853
- * Primary form section that is always shown
854
- */
855
- primary: {
856
- /** Array of form fields to display */
857
- fields: IntelligentFormField[];
858
- /** Optional description text shown above the fields */
859
- description?: string;
860
- };
861
- /**
862
- * Secondary form section that can be conditionally shown
863
- */
864
- secondary: {
865
- /** Array of form fields to display */
866
- fields: IntelligentFormField[];
867
- /**
868
- * Optional description text shown above the fields.
869
- * Can be either a simple string or an object with different messages
870
- * based on AI confidence level
871
- */
872
- description?: string | {
873
- /** Default message shown when AI confidence is low/medium */
874
- default: string;
875
- /** Message shown when AI has high confidence */
876
- confident: string;
877
- };
878
- };
879
- /** Configuration for the success view shown after form submission */
880
- successView: IntelligentFormSuccessView;
859
+ export declare interface IntelligentFormButtons {
881
860
  /** Callback function called when form is submitted */
882
- onSubmit: SubmitCallback;
883
- /** Optional name of the assistant shown in the form */
884
- aiAssistantName?: string;
861
+ submit: {
862
+ label?: string;
863
+ onSubmit: SubmitCallback;
864
+ };
885
865
  }
886
866
 
887
867
  export declare interface IntelligentFormContextSuggestionsEvent {
@@ -921,6 +901,42 @@ export declare interface IntelligentFormQAResponseEvent {
921
901
  };
922
902
  }
923
903
 
904
+ export declare interface IntelligentFormSettings {
905
+ /**
906
+ * Primary form section that is always shown
907
+ */
908
+ primary: {
909
+ /** Array of form fields to display */
910
+ fields: IntelligentFormField[];
911
+ /** Optional description text shown above the fields */
912
+ description?: string;
913
+ };
914
+ /**
915
+ * Secondary form section that can be conditionally shown
916
+ */
917
+ secondary: {
918
+ /** Array of form fields to display */
919
+ fields: IntelligentFormField[];
920
+ /**
921
+ * Optional description text shown above the fields.
922
+ * Can be either a simple string or an object with different messages
923
+ * based on AI confidence level
924
+ */
925
+ description?: string | {
926
+ /** Default message shown when AI confidence is low/medium */
927
+ default: string;
928
+ /** Message shown when AI has high confidence */
929
+ confident: string;
930
+ };
931
+ };
932
+ /** Configuration for the success view shown after form submission */
933
+ successView: IntelligentFormSuccessView;
934
+ /** Configuration for the buttons shown in the form */
935
+ buttons: IntelligentFormButtons;
936
+ /** Optional name of the assistant shown in the form */
937
+ aiAssistantName?: string;
938
+ }
939
+
924
940
  export declare interface IntelligentFormSubmissionErrorEvent {
925
941
  eventName: 'intelligent_form_submission_error';
926
942
  properties: {
@@ -1008,7 +1024,7 @@ export declare type OnToggleView = (opts: {
1008
1024
 
1009
1025
  export declare interface OpenFormAction {
1010
1026
  type: 'open_form';
1011
- formConfig: FormConfig;
1027
+ formSettings: AIChatFormSettings;
1012
1028
  }
1013
1029
 
1014
1030
  export declare interface OpenUrlAction {
@@ -1233,19 +1249,6 @@ export declare type SubmitCallback = (values: SubmitCallbackArgs) => Promise<voi
1233
1249
  export declare interface SubmitCallbackArgs {
1234
1250
  values: FieldValues;
1235
1251
  conversation: ConversationResponse | null;
1236
- client: Client;
1237
- }
1238
-
1239
- declare interface SuccessView {
1240
- heading: string;
1241
- message: string;
1242
- button: SuccessViewButton;
1243
- }
1244
-
1245
- declare interface SuccessViewButton {
1246
- label: string;
1247
- icon?: InkeepCustomIcon;
1248
- action: CloseFormAction;
1249
1252
  }
1250
1253
 
1251
1254
  export declare interface SyncColorMode {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-types",
3
- "version": "0.0.0-dev-20250228015002",
3
+ "version": "0.0.0-dev-20250228055234",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",