import { BotMessage, ChatCitation, SearchHit, SearchInput } from '../__generated__/graphql';
import { MessageArray, MessageTypename } from './AIChat/AIChatPage/AIChatPage';
import { FeedbackFromForm } from './AIChat/AIChatPage/Feedback/ChatMessageFeedbackForm';
import { ChatMode, ModalViewTypes, SearchAndChatAttributeFilters } from './InkeepWidgetProps';
export interface UserProps {
    user_type?: UserType;
    user_identification_type?: UserIdentification;
    user_cohorts?: string[];
    user_email?: string | null;
}
export type UserType = 'EXTERNAL' | 'INTERNAL';
export type UserIdentification = 'ANONYMOUS' | 'COOKIED' | 'ID_PROVIDED';
export interface GroupProps {
    [key: string]: any;
    organization_id?: string;
}
export interface SharedEventProps {
    integration_id: string | null;
    widget_library_version: string;
    interaction_type: InteractionType;
    filters: SearchAndChatAttributeFilters | null;
    application_type: 'ADMIN_PORTAL' | 'INKEEP' | 'LANDING_PAGE';
    is_modal_mode_switching_enabled: boolean;
    chat_mode_component_default: ChatMode;
    is_chat_mode_toggle_enabled: boolean;
    chat_mode_currently_selected: ChatMode | null;
    modal_view_component_default: ModalViewTypes;
    modal_view_currently_selected: ModalViewTypes | null;
    shared_chat_session_id?: string | null;
}
export type InteractionType = 'API' | 'CHAT_BUTTON' | 'CUSTOM_TRIGGER' | 'DISCORD_BOT' | 'EMBEDDED_CHAT' | 'SEARCH_BAR' | 'SLACK_BOT';
export interface AIChatMessageSubmittedEvent {
    event_name: 'chat_message_submitted';
    properties: {
        chat_session_id: string | null;
        content: string;
        prefilled_auto_submitted: boolean;
    };
}
export interface AIChatBotResponseReceivedEvent {
    event_name: 'chat_message_bot_response_received';
    properties: {
        chat_session_id: string | null;
        question: string;
        response_message: BotMessage;
        elapsed_time_to_start_streamed_response: number;
        elapsed_time_to_complete_streamed_response: number;
        number_of_citations_used_in_response: number;
        citations_used_in_response: ChatCitation[];
    };
}
export interface AIChatWidgetLoaded {
    event_name: 'chat_widget_loaded';
    properties: {};
}
export interface AIChatSharedSessionLoadedEvent {
    event_name: 'chat_shared_session_loaded';
    properties: {
        shared_chat_session_id: string;
    };
}
export interface AIChatSharedSessionContinuedEvent {
    event_name: 'chat_shared_session_continued';
    properties: {
        shared_chat_session_id: string;
        new_chat_session_id: string;
    };
}
export interface SearchQuerySubmittedEvent {
    event_name: 'search_query_submitted';
    properties: {
        query: string;
    };
}
export interface SearchQueryResponseReceivedEvent {
    event_name: 'search_query_response_received';
    properties: {
        query: string;
        total_hits: number;
    };
}
export interface AIChatThumbsUpFeedbackSubmittedEvent {
    event_name: 'chat_thumbs_up_feedback_submitted';
    properties: {
        chat_session_all_messages: MessageArray;
        chat_session_id: string;
        question: string;
        answer: string;
        answer_id: string;
    };
}
export interface AIChatThumbsDownFeedbackSubmittedEvent {
    event_name: 'chat_thumbs_down_feedback_submitted';
    properties: FeedbackFromForm & {
        chat_session_all_messages: MessageArray;
        chat_session_id: string;
        question: string;
        answer: string;
        answer_id: string;
    };
}
export interface AIChatHistoryClearedEvent {
    event_name: 'chat_history_cleared';
    properties: {
        chat_session_id: string | null;
    };
}
export interface AIChatShareButtonClickedEvent {
    event_name: 'chat_share_button_clicked';
    properties: {
        shared_chat_url: string;
        chat_session_id: string;
    };
}
export interface AIChatMessageCopiedEvent {
    event_name: 'chat_message_copied';
    properties: {
        chat_session_id: string;
        message_id: string;
        author_type: MessageTypename | null;
    };
}
export interface CodeBlockCopiedEvent {
    event_name: 'chat_code_block_copied';
    properties: {
        chat_session_id: string | null;
    };
}
export interface SearchResultClickedEvent {
    event_name: 'search_result_clicked';
    properties: {
        search_query: string;
        search_input: SearchInput;
        clicked_hit_position: number;
        clicked_hit_hit_id: string;
        clicked_hit_root_record_id: string;
        clicked_hit_type: string;
        viewable_results: [SearchHit];
        viewable_results_root_record_ids: [string];
        tab_result_type: string;
        default_tab_type: string;
    };
}
export interface SearchResultUpvote {
    event_name: 'search_result_upvote';
    properties: {
        search_query: string;
        search_input: SearchInput;
        upvoted_hit_position: number;
        upvoted_hit_id: string;
        upvoted_hit_root_record_id: string;
        upvoted_hit_type: string;
        viewable_results: [SearchHit];
        viewable_results_root_record_ids: [string];
        tab_result_type: string;
        default_tab_type: string;
    };
}
export interface SearchResultDownvote {
    event_name: 'search_result_downvote';
    properties: {
        search_query: string;
        search_input: SearchInput;
        downvoted_hit_position: number;
        downvoted_hit_id: string;
        downvoted_hit_root_record_id: string;
        downvoted_hit_type: string;
        viewable_results: [SearchHit];
        viewable_results_root_record_ids: [string];
        tab_result_type: string;
        default_tab_type: string;
    };
}
export interface CallToActionClickedEvent {
    event_name: 'call_to_action_clicked';
    properties: {
        mode: 'chat' | 'search';
        chat_session_id: string;
        query: string;
    };
}
export interface AIChatRevisedAnswerSubmittedEvent {
    event_name: 'chat_revised_answer_submitted';
    properties: {
        chat_session_all_messages: MessageArray;
        chat_session_id: string;
        question: string;
        answer: string;
        revised_answer: string;
        original_available_citations: ChatCitation[];
        original_used_citations: ChatCitation[];
        new_selected_citations: ChatCitation[];
        net_new_citations: ChatCitation[];
        deselected_citations: ChatCitation[];
    };
}
export interface AIChatBotHadInsufficientKnowledgeEvent {
    event_name: 'chat_bot_had_insufficient_knowledge';
    properties: {};
}
export interface AIChatResponseCitationClickedEvent {
    event_name: 'chat_response_citation_clicked';
    properties: {
        citation: ChatCitation | undefined;
        chat_session_id: string;
        message_id: string;
        display_order: number;
        citation_type: 'CARD' | 'INLINE';
    };
}
export interface ModalModeSwitchedEvent {
    event_name: 'modal_mode_switched';
    properties: {};
}
export interface AISharedChatLoadedEvent {
    event_name: 'shared_chat_loaded';
    properties: {};
}
export interface ModalOpenedEvent {
    event_name: 'modal_opened';
    properties: {};
}
export interface ModalClosedEvent {
    event_name: 'modal_closed';
    properties: {};
}
export type InkeepEvent = AIChatBotHadInsufficientKnowledgeEvent | AIChatBotResponseReceivedEvent | AIChatHistoryClearedEvent | AIChatMessageCopiedEvent | AIChatMessageSubmittedEvent | AIChatResponseCitationClickedEvent | AIChatRevisedAnswerSubmittedEvent | AIChatShareButtonClickedEvent | AIChatSharedSessionContinuedEvent | AIChatSharedSessionLoadedEvent | AIChatThumbsDownFeedbackSubmittedEvent | AIChatThumbsUpFeedbackSubmittedEvent | AIChatWidgetLoaded | AISharedChatLoadedEvent | CallToActionClickedEvent | CodeBlockCopiedEvent | ModalClosedEvent | ModalModeSwitchedEvent | ModalOpenedEvent | SearchQueryResponseReceivedEvent | SearchQuerySubmittedEvent | SearchResultClickedEvent;
export type InkeepCallbackEvent = InkeepEvent & {
    common_properties: GroupProps & SharedEventProps & UserProps;
};
