/// <reference types="node" />
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleServerStreamingCall, Client, CallOptions, ClientReadableStream, Metadata } from '@grpc/grpc-js';
import _m0 from 'protobufjs/minimal';
export declare const protobufPackage = "yandex.cloud.searchapi.v2";
export declare enum Role {
    ROLE_UNSPECIFIED = 0,
    /** ROLE_USER - The message is sent by the user. */
    ROLE_USER = 1,
    /** ROLE_ASSISTANT - The message is sent by the model. */
    ROLE_ASSISTANT = 2,
    UNRECOGNIZED = -1
}
export declare function roleFromJSON(object: any): Role;
export declare function roleToJSON(object: Role): string;
export interface GenSearchMessage {
    /** Text of user query or the model's response (depending on the role value). */
    content: string;
    /** Message sender's role */
    role: Role;
}
export interface GenSearchRequest {
    /** Single search query or a search query with context in the form of chat with the model. */
    messages: GenSearchMessage[];
    /** ID of the folder. */
    folderId: string;
    site?: GenSearchRequest_SiteOption | undefined;
    host?: GenSearchRequest_HostOption | undefined;
    url?: GenSearchRequest_UrlOption | undefined;
    /** Fix query misspells. */
    fixMisspell: boolean;
    /** Use the documents inaccessible from the site's front page. */
    enableNrfmDocs: boolean;
    /** Restricts the search by date, document formats or language. */
    searchFilters: GenSearchRequest_SearchFilter[];
}
export interface GenSearchRequest_SiteOption {
    /** Restricts the search to the specific websites. */
    site: string[];
}
export interface GenSearchRequest_UrlOption {
    /** Restricts the search to the specific pages. */
    url: string[];
}
export interface GenSearchRequest_HostOption {
    /** Restricts the search to the specific hosts. */
    host: string[];
}
export interface GenSearchRequest_SearchFilter {
    /** Restrict by document date. See https://yandex.ru/support/search/ru/query-language/search-operators details. */
    date: string | undefined;
    /** Restrict by document language. Use ISO 639-1 language codes. */
    lang: string | undefined;
    /** Restrict by document format. */
    format: GenSearchRequest_SearchFilter_DocFormat | undefined;
}
export declare enum GenSearchRequest_SearchFilter_DocFormat {
    DOC_FORMAT_UNSPECIFIED = 0,
    DOC_FORMAT_PDF = 1,
    DOC_FORMAT_XLS = 2,
    DOC_FORMAT_ODS = 3,
    DOC_FORMAT_RTF = 4,
    DOC_FORMAT_PPT = 5,
    DOC_FORMAT_ODP = 6,
    DOC_FORMAT_SWF = 7,
    DOC_FORMAT_ODT = 8,
    DOC_FORMAT_ODG = 9,
    DOC_FORMAT_DOC = 10,
    UNRECOGNIZED = -1
}
export declare function genSearchRequest_SearchFilter_DocFormatFromJSON(object: any): GenSearchRequest_SearchFilter_DocFormat;
export declare function genSearchRequest_SearchFilter_DocFormatToJSON(object: GenSearchRequest_SearchFilter_DocFormat): string;
export interface GenSearchResponse {
    /** The text of the generative response. */
    message?: GenSearchMessage;
    /** The documents used to form the generative response. */
    sources: GenSearchResponse_Source[];
    /** The search queries, refined by the YandexGPT model and used for the generative response. */
    searchQueries: GenSearchResponse_SearchQuery[];
    /** The text of the search query with fixed misspells. */
    fixedMisspellQuery: string;
    /** The model failed to answer due to the ethical concerns. */
    isAnswerRejected: boolean;
    /** A bullet answer in case the model cannot give a proper response and returns a set of bullets with various data. */
    isBulletAnswer: boolean;
}
export interface GenSearchResponse_Source {
    /** Document URL. */
    url: string;
    /** Document title. */
    title: string;
    /** The document was used in the answer. */
    used: boolean;
}
export interface GenSearchResponse_SearchQuery {
    /** Query text. */
    text: string;
    /** Query ID in Yandex Search. */
    reqId: string;
}
export declare const GenSearchMessage: {
    encode(message: GenSearchMessage, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GenSearchMessage;
    fromJSON(object: any): GenSearchMessage;
    toJSON(message: GenSearchMessage): unknown;
    fromPartial<I extends {
        content?: string | undefined;
        role?: Role | undefined;
    } & {
        content?: string | undefined;
        role?: Role | undefined;
    } & Record<Exclude<keyof I, keyof GenSearchMessage>, never>>(object: I): GenSearchMessage;
};
export declare const GenSearchRequest: {
    encode(message: GenSearchRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GenSearchRequest;
    fromJSON(object: any): GenSearchRequest;
    toJSON(message: GenSearchRequest): unknown;
    fromPartial<I extends {
        messages?: {
            content?: string | undefined;
            role?: Role | undefined;
        }[] | undefined;
        folderId?: string | undefined;
        site?: {
            site?: string[] | undefined;
        } | undefined;
        host?: {
            host?: string[] | undefined;
        } | undefined;
        url?: {
            url?: string[] | undefined;
        } | undefined;
        fixMisspell?: boolean | undefined;
        enableNrfmDocs?: boolean | undefined;
        searchFilters?: {
            date?: string | undefined;
            lang?: string | undefined;
            format?: GenSearchRequest_SearchFilter_DocFormat | undefined;
        }[] | undefined;
    } & {
        messages?: ({
            content?: string | undefined;
            role?: Role | undefined;
        }[] & ({
            content?: string | undefined;
            role?: Role | undefined;
        } & {
            content?: string | undefined;
            role?: Role | undefined;
        } & Record<Exclude<keyof I["messages"][number], keyof GenSearchMessage>, never>)[] & Record<Exclude<keyof I["messages"], keyof {
            content?: string | undefined;
            role?: Role | undefined;
        }[]>, never>) | undefined;
        folderId?: string | undefined;
        site?: ({
            site?: string[] | undefined;
        } & {
            site?: (string[] & string[] & Record<Exclude<keyof I["site"]["site"], keyof string[]>, never>) | undefined;
        } & Record<Exclude<keyof I["site"], "site">, never>) | undefined;
        host?: ({
            host?: string[] | undefined;
        } & {
            host?: (string[] & string[] & Record<Exclude<keyof I["host"]["host"], keyof string[]>, never>) | undefined;
        } & Record<Exclude<keyof I["host"], "host">, never>) | undefined;
        url?: ({
            url?: string[] | undefined;
        } & {
            url?: (string[] & string[] & Record<Exclude<keyof I["url"]["url"], keyof string[]>, never>) | undefined;
        } & Record<Exclude<keyof I["url"], "url">, never>) | undefined;
        fixMisspell?: boolean | undefined;
        enableNrfmDocs?: boolean | undefined;
        searchFilters?: ({
            date?: string | undefined;
            lang?: string | undefined;
            format?: GenSearchRequest_SearchFilter_DocFormat | undefined;
        }[] & ({
            date?: string | undefined;
            lang?: string | undefined;
            format?: GenSearchRequest_SearchFilter_DocFormat | undefined;
        } & {
            date?: string | undefined;
            lang?: string | undefined;
            format?: GenSearchRequest_SearchFilter_DocFormat | undefined;
        } & Record<Exclude<keyof I["searchFilters"][number], keyof GenSearchRequest_SearchFilter>, never>)[] & Record<Exclude<keyof I["searchFilters"], keyof {
            date?: string | undefined;
            lang?: string | undefined;
            format?: GenSearchRequest_SearchFilter_DocFormat | undefined;
        }[]>, never>) | undefined;
    } & Record<Exclude<keyof I, keyof GenSearchRequest>, never>>(object: I): GenSearchRequest;
};
export declare const GenSearchRequest_SiteOption: {
    encode(message: GenSearchRequest_SiteOption, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GenSearchRequest_SiteOption;
    fromJSON(object: any): GenSearchRequest_SiteOption;
    toJSON(message: GenSearchRequest_SiteOption): unknown;
    fromPartial<I extends {
        site?: string[] | undefined;
    } & {
        site?: (string[] & string[] & Record<Exclude<keyof I["site"], keyof string[]>, never>) | undefined;
    } & Record<Exclude<keyof I, "site">, never>>(object: I): GenSearchRequest_SiteOption;
};
export declare const GenSearchRequest_UrlOption: {
    encode(message: GenSearchRequest_UrlOption, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GenSearchRequest_UrlOption;
    fromJSON(object: any): GenSearchRequest_UrlOption;
    toJSON(message: GenSearchRequest_UrlOption): unknown;
    fromPartial<I extends {
        url?: string[] | undefined;
    } & {
        url?: (string[] & string[] & Record<Exclude<keyof I["url"], keyof string[]>, never>) | undefined;
    } & Record<Exclude<keyof I, "url">, never>>(object: I): GenSearchRequest_UrlOption;
};
export declare const GenSearchRequest_HostOption: {
    encode(message: GenSearchRequest_HostOption, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GenSearchRequest_HostOption;
    fromJSON(object: any): GenSearchRequest_HostOption;
    toJSON(message: GenSearchRequest_HostOption): unknown;
    fromPartial<I extends {
        host?: string[] | undefined;
    } & {
        host?: (string[] & string[] & Record<Exclude<keyof I["host"], keyof string[]>, never>) | undefined;
    } & Record<Exclude<keyof I, "host">, never>>(object: I): GenSearchRequest_HostOption;
};
export declare const GenSearchRequest_SearchFilter: {
    encode(message: GenSearchRequest_SearchFilter, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GenSearchRequest_SearchFilter;
    fromJSON(object: any): GenSearchRequest_SearchFilter;
    toJSON(message: GenSearchRequest_SearchFilter): unknown;
    fromPartial<I extends {
        date?: string | undefined;
        lang?: string | undefined;
        format?: GenSearchRequest_SearchFilter_DocFormat | undefined;
    } & {
        date?: string | undefined;
        lang?: string | undefined;
        format?: GenSearchRequest_SearchFilter_DocFormat | undefined;
    } & Record<Exclude<keyof I, keyof GenSearchRequest_SearchFilter>, never>>(object: I): GenSearchRequest_SearchFilter;
};
export declare const GenSearchResponse: {
    encode(message: GenSearchResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GenSearchResponse;
    fromJSON(object: any): GenSearchResponse;
    toJSON(message: GenSearchResponse): unknown;
    fromPartial<I extends {
        message?: {
            content?: string | undefined;
            role?: Role | undefined;
        } | undefined;
        sources?: {
            url?: string | undefined;
            title?: string | undefined;
            used?: boolean | undefined;
        }[] | undefined;
        searchQueries?: {
            text?: string | undefined;
            reqId?: string | undefined;
        }[] | undefined;
        fixedMisspellQuery?: string | undefined;
        isAnswerRejected?: boolean | undefined;
        isBulletAnswer?: boolean | undefined;
    } & {
        message?: ({
            content?: string | undefined;
            role?: Role | undefined;
        } & {
            content?: string | undefined;
            role?: Role | undefined;
        } & Record<Exclude<keyof I["message"], keyof GenSearchMessage>, never>) | undefined;
        sources?: ({
            url?: string | undefined;
            title?: string | undefined;
            used?: boolean | undefined;
        }[] & ({
            url?: string | undefined;
            title?: string | undefined;
            used?: boolean | undefined;
        } & {
            url?: string | undefined;
            title?: string | undefined;
            used?: boolean | undefined;
        } & Record<Exclude<keyof I["sources"][number], keyof GenSearchResponse_Source>, never>)[] & Record<Exclude<keyof I["sources"], keyof {
            url?: string | undefined;
            title?: string | undefined;
            used?: boolean | undefined;
        }[]>, never>) | undefined;
        searchQueries?: ({
            text?: string | undefined;
            reqId?: string | undefined;
        }[] & ({
            text?: string | undefined;
            reqId?: string | undefined;
        } & {
            text?: string | undefined;
            reqId?: string | undefined;
        } & Record<Exclude<keyof I["searchQueries"][number], keyof GenSearchResponse_SearchQuery>, never>)[] & Record<Exclude<keyof I["searchQueries"], keyof {
            text?: string | undefined;
            reqId?: string | undefined;
        }[]>, never>) | undefined;
        fixedMisspellQuery?: string | undefined;
        isAnswerRejected?: boolean | undefined;
        isBulletAnswer?: boolean | undefined;
    } & Record<Exclude<keyof I, keyof GenSearchResponse>, never>>(object: I): GenSearchResponse;
};
export declare const GenSearchResponse_Source: {
    encode(message: GenSearchResponse_Source, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GenSearchResponse_Source;
    fromJSON(object: any): GenSearchResponse_Source;
    toJSON(message: GenSearchResponse_Source): unknown;
    fromPartial<I extends {
        url?: string | undefined;
        title?: string | undefined;
        used?: boolean | undefined;
    } & {
        url?: string | undefined;
        title?: string | undefined;
        used?: boolean | undefined;
    } & Record<Exclude<keyof I, keyof GenSearchResponse_Source>, never>>(object: I): GenSearchResponse_Source;
};
export declare const GenSearchResponse_SearchQuery: {
    encode(message: GenSearchResponse_SearchQuery, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GenSearchResponse_SearchQuery;
    fromJSON(object: any): GenSearchResponse_SearchQuery;
    toJSON(message: GenSearchResponse_SearchQuery): unknown;
    fromPartial<I extends {
        text?: string | undefined;
        reqId?: string | undefined;
    } & {
        text?: string | undefined;
        reqId?: string | undefined;
    } & Record<Exclude<keyof I, keyof GenSearchResponse_SearchQuery>, never>>(object: I): GenSearchResponse_SearchQuery;
};
/** A set of methods for searching the Yandex search database using YandexGPT generative AI. */
export declare const GenSearchServiceService: {
    readonly search: {
        readonly path: "/yandex.cloud.searchapi.v2.GenSearchService/Search";
        readonly requestStream: false;
        readonly responseStream: true;
        readonly requestSerialize: (value: GenSearchRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => GenSearchRequest;
        readonly responseSerialize: (value: GenSearchResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => GenSearchResponse;
    };
};
export interface GenSearchServiceServer extends UntypedServiceImplementation {
    search: handleServerStreamingCall<GenSearchRequest, GenSearchResponse>;
}
export interface GenSearchServiceClient extends Client {
    search(request: GenSearchRequest, options?: Partial<CallOptions>): ClientReadableStream<GenSearchResponse>;
    search(request: GenSearchRequest, metadata?: Metadata, options?: Partial<CallOptions>): ClientReadableStream<GenSearchResponse>;
}
export declare const GenSearchServiceClient: {
    new (address: string, credentials: ChannelCredentials, options?: Partial<ChannelOptions>): GenSearchServiceClient;
    service: typeof GenSearchServiceService;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
    [K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
    [K in keyof P]: Exact<P[K], I[K]>;
} & Record<Exclude<keyof I, KeysOfUnion<P>>, never>;
export {};
