import { CameraFilesServiceConfig, FilesServiceConfig, MicrophoneFilesServiceConfig } from '../types/fileServiceConfigs';
import { ValidateMessageBeforeSending } from '../types/validateMessageBeforeSending';
import { RequestInterceptor, ResponseInterceptor } from '../types/interceptors';
import { RequestSettings } from '../types/requestSettings';
import { Messages } from '../views/chat/messages/messages';
import { InterfacesUnion } from '../types/utilityTypes';
import { FILE_TYPES } from '../types/fileTypes';
import { Result } from '../types/result';
import { Demo } from '../types/demo';
export type PollResult = Promise<InterfacesUnion<Result | {
    timeoutMS: number;
}>>;
export interface CompletionsHandlers {
    onFinish: () => void;
}
export interface StreamHandlers {
    onOpen: () => void;
    onClose: () => void;
    abortStream: AbortController;
}
export interface KeyVerificationHandlers {
    onSuccess: () => void;
    onFail: (message: string) => void;
    onLoad: () => void;
}
export type FileServiceIO = FilesServiceConfig & {
    infoModalTextMarkUp?: string;
};
export type CustomErrors = Set<string>;
export type ServiceFileTypes = {
    [key in FILE_TYPES]?: FileServiceIO;
};
export interface ServiceIO {
    key?: string;
    validateConfigKey: boolean;
    insertKeyPlaceholderText?: string;
    getKeyLink?: string;
    url?: string;
    isTextInputDisabled?: boolean;
    textInputPlaceholderText?: string;
    fileTypes?: ServiceFileTypes;
    camera?: CameraFilesServiceConfig;
    recordAudio?: MicrophoneFilesServiceConfig;
    requestSettings?: RequestSettings;
    introPanelMarkUp?: string;
    permittedErrorPrefixes?: CustomErrors;
    requestInterceptor: RequestInterceptor;
    responseInterceptor: ResponseInterceptor;
    canSendMessage: ValidateMessageBeforeSending;
    verifyKey(key: string, keyVerificationHandlers: KeyVerificationHandlers): void;
    callApi(messages: Messages, completionsHandlers: CompletionsHandlers, streamHandlers: StreamHandlers, files?: File[]): void;
    extractResultData?(result: object): Promise<InterfacesUnion<Result | {
        pollingInAnotherRequest: true;
    }>>;
    extractPollResultData?(result: object): PollResult;
    demo?: Demo;
}
//# sourceMappingURL=serviceIO.d.ts.map