import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends {
    [key: string]: unknown;
}> = {
    [K in keyof T]: T[K];
};
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
    [SubKey in K]?: Maybe<T[SubKey]>;
};
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
    [SubKey in K]: Maybe<T[SubKey]>;
};
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
    ID: string;
    String: string;
    Boolean: boolean;
    Int: number;
    Float: number;
    /** Date with time (isoformat) */
    DateTime: any;
    /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
    JSON: any;
};
export type BotMessage = ChatMessage & {
    __typename?: 'BotMessage';
    citations: Array<ChatCitation>;
    codeBlocks?: Maybe<Array<CodeBlock>>;
    content: Scalars['String'];
    id: Scalars['ID'];
};
export type ChatCitation = {
    __typename?: 'ChatCitation';
    citationNumber: Scalars['Int'];
    rootRecordId?: Maybe<Scalars['ID']>;
    rootRecordType?: Maybe<RecordType>;
    title?: Maybe<Scalars['String']>;
    url: Scalars['String'];
};
export type ChatFilters = {
    __typename?: 'ChatFilters';
    attributes?: Maybe<Scalars['JSON']>;
    product?: Maybe<Scalars['String']>;
    productVersion?: Maybe<Scalars['String']>;
    sourceIds?: Maybe<Scalars['String']>;
};
export type ChatFiltersInput = {
    attributes?: InputMaybe<Scalars['JSON']>;
    product?: InputMaybe<Scalars['String']>;
    productVersion?: InputMaybe<Scalars['String']>;
    sourceIds?: InputMaybe<Scalars['String']>;
};
export type ChatMessage = {
    content: Scalars['String'];
    id: Scalars['ID'];
};
export declare enum ChatMode {
    Auto = "AUTO",
    Turbo = "TURBO"
}
export type ChatResult = {
    __typename?: 'ChatResult';
    isEnd: Scalars['Boolean'];
    message: BotMessage;
    postChatResultSignals?: Maybe<PostChatResultSignals>;
    sessionId: Scalars['ID'];
};
export type ChatSession = {
    __typename?: 'ChatSession';
    chatMode: ChatMode;
    filters?: Maybe<ChatFilters>;
    id: Scalars['ID'];
    integrationId: Scalars['String'];
    isSharedSession: Scalars['Boolean'];
    messages: Array<ChatMessage>;
    organizationId: Scalars['String'];
    outputMode: OutputMode;
    product?: Maybe<Scalars['String']>;
    productVersion?: Maybe<Scalars['String']>;
    userAttributes?: Maybe<Scalars['JSON']>;
    workflowVersion?: Maybe<Scalars['String']>;
};
export type CodeBlock = {
    __typename?: 'CodeBlock';
    code: Scalars['String'];
    language: CodeLanguage;
};
export declare enum CodeLanguage {
    Python = "PYTHON",
    Sql = "SQL",
    Undefined = "UNDEFINED"
}
export type ContinueChatResultInput = {
    messageAttributes?: InputMaybe<Scalars['JSON']>;
    messageContext?: InputMaybe<Scalars['String']>;
    messageInput: Scalars['String'];
    sessionId: Scalars['ID'];
};
export type DiscourseHit = SearchHit & {
    __typename?: 'DiscourseHit';
    hitOnRoot: Scalars['Boolean'];
    id: Scalars['ID'];
    preview?: Maybe<Scalars['String']>;
    rootRecord: DiscourseRecord;
    title?: Maybe<Scalars['String']>;
    url?: Maybe<Scalars['String']>;
};
export type DiscourseRecord = SearchRootRecord & {
    __typename?: 'DiscourseRecord';
    body?: Maybe<Scalars['String']>;
    bodyHtml?: Maybe<Scalars['String']>;
    categoryBreadcrumbs: Array<Scalars['String']>;
    createdAt: Scalars['DateTime'];
    id: Scalars['ID'];
    preview?: Maybe<Scalars['String']>;
    title?: Maybe<Scalars['String']>;
    url?: Maybe<Scalars['String']>;
};
export type DocumentationContentLevel = {
    __typename?: 'DocumentationContentLevel';
    anchor?: Maybe<Scalars['String']>;
    content: Scalars['String'];
    contentHtml: Scalars['String'];
    htmlTag: Scalars['String'];
    url?: Maybe<Scalars['String']>;
};
export type DocumentationHit = SearchHit & {
    __typename?: 'DocumentationHit';
    content: DocumentationContentLevel;
    hitOnRoot: Scalars['Boolean'];
    id: Scalars['ID'];
    pathHeadings: Array<DocumentationContentLevel>;
    preview?: Maybe<Scalars['String']>;
    rootRecord: SearchRootRecord;
    title?: Maybe<Scalars['String']>;
    url?: Maybe<Scalars['String']>;
};
export type DocumentationRecord = SearchRootRecord & {
    __typename?: 'DocumentationRecord';
    contentType: Scalars['String'];
    firstContent: Scalars['String'];
    firstContentPath: Array<DocumentationContentLevel>;
    id: Scalars['ID'];
    pathBreadcrumbs?: Maybe<Array<Scalars['String']>>;
    preview?: Maybe<Scalars['String']>;
    title?: Maybe<Scalars['String']>;
    topLevelHeadings: Array<DocumentationContentLevel>;
    url?: Maybe<Scalars['String']>;
};
export type GitHubIssueComment = {
    __typename?: 'GitHubIssueComment';
    body?: Maybe<Scalars['String']>;
    commentDate: Scalars['DateTime'];
    id: Scalars['ID'];
    reactions: Array<GitHubReaction>;
    url: Scalars['String'];
};
export type GitHubIssueHit = SearchHit & {
    __typename?: 'GitHubIssueHit';
    hitOnRoot: Scalars['Boolean'];
    id: Scalars['ID'];
    preview?: Maybe<Scalars['String']>;
    rootRecord: GitHubIssueRecord;
    title?: Maybe<Scalars['String']>;
    url?: Maybe<Scalars['String']>;
};
export type GitHubIssueRecord = SearchRootRecord & {
    __typename?: 'GitHubIssueRecord';
    body?: Maybe<Scalars['String']>;
    commentsWithMostPositiveReactions: Array<GitHubIssueComment>;
    createdAt: Scalars['DateTime'];
    id: Scalars['ID'];
    preview?: Maybe<Scalars['String']>;
    reactions: Array<GitHubReaction>;
    state: GitHubIssueState;
    title?: Maybe<Scalars['String']>;
    url?: Maybe<Scalars['String']>;
};
export declare enum GitHubIssueState {
    Closed = "CLOSED",
    Open = "OPEN"
}
export type GitHubReaction = {
    __typename?: 'GitHubReaction';
    count: Scalars['Int'];
    reactionType: ReactionType;
};
export type Mutation = {
    __typename?: 'Mutation';
    copyChatSession: Scalars['ID'];
};
export type MutationCopyChatSessionArgs = {
    isSharedSession: Scalars['Boolean'];
    sessionId: Scalars['ID'];
};
export type NewSessionChatResultInput = {
    chatMode?: InputMaybe<ChatMode>;
    filters?: InputMaybe<ChatFiltersInput>;
    integrationId?: InputMaybe<Scalars['ID']>;
    messageAttributes?: InputMaybe<Scalars['JSON']>;
    messageContext?: InputMaybe<Scalars['String']>;
    messageInput: Scalars['String'];
    organizationId?: InputMaybe<Scalars['ID']>;
    outputMode?: InputMaybe<OutputMode>;
    product?: InputMaybe<Scalars['String']>;
    productVersion?: InputMaybe<Scalars['String']>;
    userAttributes?: InputMaybe<Scalars['JSON']>;
    workflowVersion?: InputMaybe<Scalars['String']>;
};
export declare enum OutputMode {
    Code = "CODE",
    Default = "DEFAULT",
    Python = "PYTHON",
    Sql = "SQL"
}
export type PostChatResultSignals = {
    __typename?: 'PostChatResultSignals';
    botAbleToAnswerGivenSources?: Maybe<Scalars['Boolean']>;
    suggestedFollowupQuestions?: Maybe<Array<Scalars['String']>>;
};
export type Query = {
    __typename?: 'Query';
    getChatSession: ChatSession;
    getSearchRootRecords: Array<SearchRootRecord>;
    hello?: Maybe<Scalars['String']>;
    search: SearchResult;
};
export type QueryGetChatSessionArgs = {
    id: Scalars['ID'];
};
export type QueryGetSearchRootRecordsArgs = {
    ids: Array<Scalars['ID']>;
};
export type QuerySearchArgs = {
    searchInput: SearchInput;
};
export declare enum ReactionType {
    Confused = "CONFUSED",
    Eyes = "EYES",
    Heart = "HEART",
    Hooray = "HOORAY",
    Laugh = "LAUGH",
    MinusOne = "MINUS_ONE",
    PlusOne = "PLUS_ONE",
    Rocket = "ROCKET"
}
export declare enum RecordType {
    Discord = "DISCORD",
    DiscordMessage = "DISCORD_MESSAGE",
    Discourse = "DISCOURSE",
    Documentation = "DOCUMENTATION",
    GithubDiscussion = "GITHUB_DISCUSSION",
    GithubIssue = "GITHUB_ISSUE",
    Manual = "MANUAL",
    Stackoverflow = "STACKOVERFLOW"
}
export type SearchFiltersInput = {
    attributes?: InputMaybe<Scalars['JSON']>;
    limit?: InputMaybe<Scalars['Int']>;
    product?: InputMaybe<Scalars['String']>;
    productVersion?: InputMaybe<Scalars['String']>;
    sourceIds?: InputMaybe<Scalars['String']>;
    sources?: InputMaybe<Array<RecordType>>;
};
export type SearchHit = {
    hitOnRoot: Scalars['Boolean'];
    id: Scalars['ID'];
    preview?: Maybe<Scalars['String']>;
    rootRecord: SearchRootRecord;
    title?: Maybe<Scalars['String']>;
    url?: Maybe<Scalars['String']>;
};
export type SearchInput = {
    filters?: InputMaybe<SearchFiltersInput>;
    integrationId?: InputMaybe<Scalars['ID']>;
    organizationId?: InputMaybe<Scalars['ID']>;
    searchMode?: InputMaybe<SearchMode>;
    searchQuery: Scalars['String'];
};
export declare enum SearchMode {
    Auto = "AUTO",
    Intelligent = "INTELLIGENT",
    Keyword = "KEYWORD"
}
export type SearchResult = {
    __typename?: 'SearchResult';
    searchHits: Array<SearchHit>;
    searchQuery: Scalars['String'];
};
export type SearchRootRecord = {
    id: Scalars['ID'];
    preview?: Maybe<Scalars['String']>;
    title?: Maybe<Scalars['String']>;
    url?: Maybe<Scalars['String']>;
};
export type StackOverflowAnswer = {
    __typename?: 'StackOverflowAnswer';
    content: Scalars['String'];
    contentHtml: Scalars['String'];
    id: Scalars['ID'];
    score: Scalars['Int'];
    url: Scalars['String'];
};
export type StackOverflowHit = SearchHit & {
    __typename?: 'StackOverflowHit';
    hitOnRoot: Scalars['Boolean'];
    id: Scalars['ID'];
    preview?: Maybe<Scalars['String']>;
    rootRecord: StackOverflowRecord;
    title?: Maybe<Scalars['String']>;
    url?: Maybe<Scalars['String']>;
};
export type StackOverflowRecord = SearchRootRecord & {
    __typename?: 'StackOverflowRecord';
    body?: Maybe<Scalars['String']>;
    bodyHtml?: Maybe<Scalars['String']>;
    createdAt: Scalars['DateTime'];
    id: Scalars['ID'];
    markedAsCorrectAnswer?: Maybe<StackOverflowAnswer>;
    preview?: Maybe<Scalars['String']>;
    score: Scalars['Int'];
    tags: Array<Scalars['String']>;
    title?: Maybe<Scalars['String']>;
    topVotedAnswer?: Maybe<StackOverflowAnswer>;
    url?: Maybe<Scalars['String']>;
};
export type Subscription = {
    __typename?: 'Subscription';
    continueChatResult: ChatResult;
    newSessionChatResult: ChatResult;
};
export type SubscriptionContinueChatResultArgs = {
    input: ContinueChatResultInput;
};
export type SubscriptionNewSessionChatResultArgs = {
    input: NewSessionChatResultInput;
};
export type UserMessage = ChatMessage & {
    __typename?: 'UserMessage';
    attributes?: Maybe<Scalars['JSON']>;
    content: Scalars['String'];
    context?: Maybe<Scalars['String']>;
    id: Scalars['ID'];
};
export type GetSearchRootRecordsQueryVariables = Exact<{
    ids: Array<Scalars['ID']> | Scalars['ID'];
}>;
export type GetSearchRootRecordsQuery = {
    __typename?: 'Query';
    getSearchRootRecords: Array<{
        __typename: 'DiscourseRecord';
        body?: string | null;
        categoryBreadcrumbs: Array<string>;
        createdAt: any;
        id: string;
        title?: string | null;
        url?: string | null;
        preview?: string | null;
    } | {
        __typename: 'DocumentationRecord';
        pathBreadcrumbs?: Array<string> | null;
        contentType: string;
        id: string;
        title?: string | null;
        url?: string | null;
        preview?: string | null;
    } | {
        __typename: 'GitHubIssueRecord';
        body?: string | null;
        state: GitHubIssueState;
        createdAt: any;
        id: string;
        title?: string | null;
        url?: string | null;
        preview?: string | null;
    } | {
        __typename: 'StackOverflowRecord';
        body?: string | null;
        tags: Array<string>;
        createdAt: any;
        id: string;
        title?: string | null;
        url?: string | null;
        preview?: string | null;
    }>;
};
export type OnNewSessionChatResultSubscriptionVariables = Exact<{
    messageInput: Scalars['String'];
    organizationId: Scalars['ID'];
    integrationId?: InputMaybe<Scalars['ID']>;
    chatMode?: InputMaybe<ChatMode>;
    filters?: InputMaybe<ChatFiltersInput>;
}>;
export type OnNewSessionChatResultSubscription = {
    __typename?: 'Subscription';
    newSessionChatResult: {
        __typename?: 'ChatResult';
        isEnd: boolean;
        sessionId: string;
        message: {
            __typename: 'BotMessage';
            id: string;
            content: string;
            citations: Array<{
                __typename?: 'ChatCitation';
                citationNumber: number;
                title?: string | null;
                url: string;
                rootRecordId?: string | null;
                rootRecordType?: RecordType | null;
            }>;
        };
        postChatResultSignals?: {
            __typename?: 'PostChatResultSignals';
            botAbleToAnswerGivenSources?: boolean | null;
            suggestedFollowupQuestions?: Array<string> | null;
        } | null;
    };
};
export type OnContinueChatResultSubscriptionVariables = Exact<{
    messageInput: Scalars['String'];
    sessionId: Scalars['ID'];
}>;
export type OnContinueChatResultSubscription = {
    __typename?: 'Subscription';
    continueChatResult: {
        __typename?: 'ChatResult';
        isEnd: boolean;
        sessionId: string;
        message: {
            __typename: 'BotMessage';
            id: string;
            content: string;
            citations: Array<{
                __typename?: 'ChatCitation';
                citationNumber: number;
                title?: string | null;
                url: string;
                rootRecordId?: string | null;
                rootRecordType?: RecordType | null;
            }>;
        };
        postChatResultSignals?: {
            __typename?: 'PostChatResultSignals';
            botAbleToAnswerGivenSources?: boolean | null;
            suggestedFollowupQuestions?: Array<string> | null;
        } | null;
    };
};
export type GetSearchResultsQueryVariables = Exact<{
    searchInput: SearchInput;
}>;
export type GetSearchResultsQuery = {
    __typename?: 'Query';
    search: {
        __typename?: 'SearchResult';
        searchQuery: string;
        searchHits: Array<{
            __typename?: 'DiscourseHit';
            id: string;
            hitOnRoot: boolean;
            url?: string | null;
            title?: string | null;
            preview?: string | null;
            rootRecord: {
                __typename: 'DiscourseRecord';
                body?: string | null;
                bodyHtml?: string | null;
                categoryBreadcrumbs: Array<string>;
                createdAt: any;
                id: string;
                title?: string | null;
                url?: string | null;
                preview?: string | null;
            };
        } | {
            __typename?: 'DocumentationHit';
            id: string;
            hitOnRoot: boolean;
            url?: string | null;
            title?: string | null;
            preview?: string | null;
            rootRecord: {
                __typename: 'DiscourseRecord';
                id: string;
                title?: string | null;
                url?: string | null;
                preview?: string | null;
            } | {
                __typename: 'DocumentationRecord';
                pathBreadcrumbs?: Array<string> | null;
                contentType: string;
                firstContent: string;
                id: string;
                title?: string | null;
                url?: string | null;
                preview?: string | null;
                topLevelHeadings: Array<{
                    __typename?: 'DocumentationContentLevel';
                    anchor?: string | null;
                    url?: string | null;
                    htmlTag: string;
                    content: string;
                }>;
                firstContentPath: Array<{
                    __typename?: 'DocumentationContentLevel';
                    anchor?: string | null;
                    url?: string | null;
                    htmlTag: string;
                    content: string;
                }>;
            } | {
                __typename: 'GitHubIssueRecord';
                id: string;
                title?: string | null;
                url?: string | null;
                preview?: string | null;
            } | {
                __typename: 'StackOverflowRecord';
                id: string;
                title?: string | null;
                url?: string | null;
                preview?: string | null;
            };
            pathHeadings: Array<{
                __typename?: 'DocumentationContentLevel';
                anchor?: string | null;
                url?: string | null;
                htmlTag: string;
                content: string;
            }>;
            content: {
                __typename?: 'DocumentationContentLevel';
                anchor?: string | null;
                url?: string | null;
                htmlTag: string;
                content: string;
                contentHtml: string;
            };
        } | {
            __typename?: 'GitHubIssueHit';
            id: string;
            hitOnRoot: boolean;
            url?: string | null;
            title?: string | null;
            preview?: string | null;
            rootRecord: {
                __typename: 'GitHubIssueRecord';
                body?: string | null;
                state: GitHubIssueState;
                createdAt: any;
                id: string;
                title?: string | null;
                url?: string | null;
                preview?: string | null;
                reactions: Array<{
                    __typename?: 'GitHubReaction';
                    reactionType: ReactionType;
                    count: number;
                }>;
                commentsWithMostPositiveReactions: Array<{
                    __typename?: 'GitHubIssueComment';
                    id: string;
                    url: string;
                    body?: string | null;
                    commentDate: any;
                    reactions: Array<{
                        __typename?: 'GitHubReaction';
                        reactionType: ReactionType;
                        count: number;
                    }>;
                }>;
            };
        } | {
            __typename?: 'StackOverflowHit';
            id: string;
            hitOnRoot: boolean;
            url?: string | null;
            title?: string | null;
            preview?: string | null;
            rootRecord: {
                __typename: 'StackOverflowRecord';
                body?: string | null;
                tags: Array<string>;
                createdAt: any;
                score: number;
                id: string;
                title?: string | null;
                url?: string | null;
                preview?: string | null;
                topVotedAnswer?: {
                    __typename?: 'StackOverflowAnswer';
                    url: string;
                    score: number;
                    content: string;
                } | null;
                markedAsCorrectAnswer?: {
                    __typename?: 'StackOverflowAnswer';
                    url: string;
                    score: number;
                    content: string;
                } | null;
            };
        }>;
    };
};
export type GetChatSessionQueryVariables = Exact<{
    id: Scalars['ID'];
}>;
export type GetChatSessionQuery = {
    __typename?: 'Query';
    getChatSession: {
        __typename?: 'ChatSession';
        id: string;
        organizationId: string;
        chatMode: ChatMode;
        messages: Array<{
            __typename?: 'BotMessage';
            id: string;
            content: string;
            citations: Array<{
                __typename?: 'ChatCitation';
                citationNumber: number;
                title?: string | null;
                url: string;
                rootRecordId?: string | null;
                rootRecordType?: RecordType | null;
            }>;
        } | {
            __typename?: 'UserMessage';
            id: string;
            content: string;
        }>;
        filters?: {
            __typename?: 'ChatFilters';
            product?: string | null;
            productVersion?: string | null;
            attributes?: any | null;
        } | null;
    };
};
export type CopyChatSessionMutationVariables = Exact<{
    sessionId: Scalars['ID'];
    isSharedSession: Scalars['Boolean'];
}>;
export type CopyChatSessionMutation = {
    __typename?: 'Mutation';
    copyChatSession: string;
};
export declare const GetSearchRootRecordsDocument: DocumentNode<GetSearchRootRecordsQuery, Exact<{
    ids: Array<Scalars['ID']> | Scalars['ID'];
}>>;
export declare const OnNewSessionChatResultDocument: DocumentNode<OnNewSessionChatResultSubscription, Exact<{
    messageInput: Scalars['String'];
    organizationId: Scalars['ID'];
    integrationId?: InputMaybe<string> | undefined;
    chatMode?: InputMaybe<ChatMode> | undefined;
    filters?: InputMaybe<ChatFiltersInput> | undefined;
}>>;
export declare const OnContinueChatResultDocument: DocumentNode<OnContinueChatResultSubscription, Exact<{
    messageInput: Scalars['String'];
    sessionId: Scalars['ID'];
}>>;
export declare const GetSearchResultsDocument: DocumentNode<GetSearchResultsQuery, Exact<{
    searchInput: SearchInput;
}>>;
export declare const GetChatSessionDocument: DocumentNode<GetChatSessionQuery, Exact<{
    id: Scalars['ID'];
}>>;
export declare const CopyChatSessionDocument: DocumentNode<CopyChatSessionMutation, Exact<{
    sessionId: Scalars['ID'];
    isSharedSession: Scalars['Boolean'];
}>>;
