@inkeep/cxkit-types 0.5.33 → 0.5.35

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 +56 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -690,6 +690,47 @@ export declare type InkeepCallbackEvent = InkeepEventWithCommon & {
690
690
  userProperties: UserProperties;
691
691
  };
692
692
 
693
+ export declare type InkeepComponentInitializer = {
694
+ (props: InkeepComponentProps): InkeepComponentInstance;
695
+ (targetSelector: string, props: InkeepComponentProps): InkeepComponentInstance;
696
+ };
697
+
698
+ /**
699
+ * Represents an instance of any Inkeep component that is returned after initialization.
700
+ * These instances have methods that can be used to update the component's state.
701
+ */
702
+ export declare interface InkeepComponentInstance {
703
+ /**
704
+ * Updates the component with new props
705
+ * @param newProps The new props to apply to the component
706
+ */
707
+ update: <T extends object>(newProps: T) => void;
708
+ /**
709
+ * Unmounts the component from the DOM but preserves its state
710
+ */
711
+ unmount: () => void;
712
+ /**
713
+ * Remounts a previously unmounted component
714
+ */
715
+ remount: () => void;
716
+ /**
717
+ * Access to chat-specific functionality (only available for components with chat capabilities)
718
+ */
719
+ chat?: {
720
+ [key: string]: (...args: any[]) => any;
721
+ };
722
+ /**
723
+ * Access to search-specific functionality (only available for components with search capabilities)
724
+ */
725
+ search?: {
726
+ [key: string]: (...args: any[]) => any;
727
+ };
728
+ }
729
+
730
+ export declare type InkeepComponentProps = InkeepSettings & {
731
+ [key: string]: any;
732
+ };
733
+
693
734
  export declare interface InkeepConfig {
694
735
  /**
695
736
  * The prefix to use for the widget.
@@ -725,6 +766,14 @@ export declare type InkeepEvent = SearchEvent | ChatEvent | IntelligentFormEvent
725
766
 
726
767
  export declare type InkeepEventWithCommon = ExtendPropertiesWithCommon<InkeepEvent>;
727
768
 
769
+ export declare type InkeepJS = Partial<Record<InkeepJSComponent, InkeepComponentInitializer>>;
770
+
771
+ /**
772
+ * Represents the available Inkeep component types that can be rendered
773
+ * via the global Inkeep object.
774
+ */
775
+ export declare type InkeepJSComponent = 'EmbeddedChat' | 'EmbeddedSearch' | 'EmbeddedSearchAndChat' | 'ModalChat' | 'ModalSearch' | 'ModalSearchAndChat' | 'IntelligentForm' | 'ChatButton' | 'SearchBar';
776
+
728
777
  export declare interface InkeepModalSettings {
729
778
  /**
730
779
  * Controls whether the modal is open.
@@ -824,6 +873,13 @@ export declare interface InkeepSearchSettings {
824
873
  filters?: SearchAndChatFilters;
825
874
  }
826
875
 
876
+ declare interface InkeepSettings {
877
+ baseSettings?: InkeepBaseSettings;
878
+ aiChatSettings?: InkeepAIChatSettings;
879
+ searchSettings?: InkeepSearchSettings;
880
+ modalSettings?: InkeepModalSettings;
881
+ }
882
+
827
883
  export declare type InputMaybe<T> = T | null;
828
884
 
829
885
  export declare interface IntelligentFormAIResponseProvidedEvent {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-types",
3
- "version": "0.5.33",
3
+ "version": "0.5.35",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",