import { AuthType } from "../enums/AuthType";
import { ConnectionType } from "../enums/ConnectionType";
import { NodeTrustedMailcore2NativeBinding } from "../types/NodeTrustedMailcore2NativeBinding";
import { IMAPSessionNativeBinding } from '../types';
import { IMAPFolder } from "./IMAPFolder";
import { IMAPFolderStatus } from "./IMAPFolderStatus";
import { IMAPMessage } from "./IMAPMessage";
import { Data } from "../basetypes/Data";
import { IMAPSyncResult } from "./IMAPSyncResult";
import { MessageFlag } from "../enums/MessageFlag";
import { IMAPStoreFlagsRequestKind } from "../enums/IMAPStoreFlagsRequestKind";
declare let bindings: NodeTrustedMailcore2NativeBinding;
/**
 * IMAPSession Class
 *
 * @public
 */
declare class IMAPSession extends bindings.IMAPSession {
    protected handle: IMAPSessionNativeBinding;
    constructor();
    /**
     * Set hostname
     *
     * @memberof IMAPSession
     */
    set hostname(hostname: string);
    /**
     * Get hostname
     *
     * @type {string}
     * @memberof IMAPSession
     */
    get hostname(): string;
    /**
     * Set port
     *
     * @memberof IMAPSession
     */
    set port(port: number);
    /**
     * Get port
     *
     * @type {number}
     * @memberof IMAPSession
     */
    get port(): number;
    /**
     * Set string
     *
     * @memberof IMAPSession
     */
    set username(username: string);
    /**
     * Get string
     *
     * @type {string}
     * @memberof IMAPSession
     */
    get username(): string;
    /**
     * Set password
     *
     * @memberof IMAPSession
     */
    set password(password: string);
    /**
     * Get password
     *
     * @type {string}
     * @memberof IMAPSession
     */
    get password(): string;
    /**
     * Set checkCertificateEnabled
     *
     * @memberof IMAPSession
     */
    set checkCertificateEnabled(isEnabled: boolean);
    /**
     * Get checkCertificateEnabled
     *
     * @type {boolean}
     * @memberof IMAPSession
     */
    get checkCertificateEnabled(): boolean;
    /**
     * Set OAuth2Token
     *
     * @memberof IMAPSession
     */
    set OAuth2Token(OAuth2Token: string);
    /**
     * Get OAuth2Token
     *
     * @type {string}
     * @memberof IMAPSession
     */
    get OAuth2Token(): string;
    /**
     * Set authType
     *
     * @memberof IMAPSession
     */
    set authType(authType: AuthType);
    /**
     * Get authType
     *
     * @type {AuthType}
     * @memberof IMAPSession
     */
    get authType(): AuthType;
    /**
     * Set connectionType
     *
     * @memberof IMAPSession
     */
    set connectionType(connectionType: ConnectionType);
    /**
     * Get connectionType
     *
     * @type {ConnectionType}
     * @memberof IMAPSession
     */
    get connectionType(): ConnectionType;
    /**
     * Set strictGost flag (to force using GOST for TLS)
     *
     * @memberof IMAPSession
     */
    set strictGost(value: Boolean);
    /**
     * Get strictGost flag (to force using GOST for TLS)
     *
     * @type {Boolean}
     * @memberof IMAPSession
     */
    get strictGost(): Boolean;
    /**
     * Validate exist account
     *
     * @param {string} from address
     * @returns {number} 0 - success, other - failure
     *
     * @memberof IMAPSession
     */
    checkAccount(from: string): Promise<number>;
    /**
     * Disconnect connection
     *
     * @memberof IMAPSession
     */
    disconnect(): void;
    /**
     * Disconnect connection asynchronously
     *
     * @memberof IMAPSession
     */
    disconnectAsync(): Promise<void>;
    /**
     * Validate connection status
     *
     * @returns {boolean}
     *
     * @memberof IMAPSession
     */
    isDisconnected(): boolean;
    /**
     * Login if needed to session
     *
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    loginIfNeeded(): number;
    /**
     * Asynchronously login if needed to session
     *
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    loginIfNeededAsync(): Promise<number>;
    /**
     * Connect if needed to session
     *
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    connectIfNeeded(): number;
    /**
     * Asynchronously connect if needed to session
     *
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    connectIfNeededAsync(): Promise<number>;
    /**
     * Create IMAP folder
     *
     * @param {string} folder
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    createFolder(folder: string): number;
    /**
    * Create IMAP folder
    *
    * @param {string} folder
    * @param {string} flag
    * @return {*}  {number}
    * @memberof IMAPSession
    */
    createSpecialFolder(folder: string, flag: number): number;
    /**
     * Delete IMAP folder
     *
     * @param {string} folder
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    deleteFolder(folder: string): number;
    /**
     * Rename folder
     *
     * @param {string} folder
     * @param {string} folderOther
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    renameFolder(folder: string, folderOther: string): number;
    /**
     * Subscribe to folder
     *
     * @param {string} folder
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    subscribeFolder(folder: string): number;
    /**
     * Unsubscribe to folder
     *
     * @param {string} folder
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    unsubscribeFolder(folder: string): number;
    /**
     * Fetch all subscribed folders
     *
     * @return {*}  {IMAPFolder[]}
     * @memberof IMAPSession
     */
    fetchSubscribedFolders(): IMAPFolder[];
    /**
     * Fetch all folders
     *
     * @return {*}  {IMAPFolder[]}
     * @memberof IMAPSession
     */
    fetchAllFolders(): IMAPFolder[];
    /**
     * Fetch all folders asynchronously
     *
     * @return {*}  {IMAPFolder[]}
     * @memberof IMAPSession
     */
    fetchAllFoldersAsync(): Promise<IMAPFolder[]>;
    /**
     * Get folder status
     *
     * @param {string} folder Folder to fetch status
     * @return {IMAPFolderStatus} Folder status object
     * @memberof IMAPSession
     */
    folderStatus(folder: string): IMAPFolderStatus;
    /**
     * Get folder status asynchronously
     *
     * @param {string} folder Folder to fetch status
     * @return {IMAPFolderStatus} Folder status object
     * @memberof IMAPSession
     */
    folderStatusAsync(folder: string): Promise<IMAPFolderStatus>;
    /**
     * Move messages
     *
     * @param {string} folder
     * @param {number} uidSet
     * @param {string} destFolder
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    moveMessages(folder: string, uidSet: number, destFolder: string): number;
    /**
     * Move messages asynchronously
     *
     * @param {string} folder
     * @param {number} uidSet
     * @param {string} destFolder
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    moveMessagesAsync(folder: string, uidSet: number, destFolder: string): Promise<number>;
    /**
     * Fetch messages by UID
     *
     * @param {string} folder foder to fetch messages from
     * @param {number} rangeStart Start of UIDs range, 0 by default
     * @param {number} rangeEnd End of UIDs range, "infinity" by default
     * @return {IMAPMessage[]} Array of fetched messages info
     * @memberof IMAPSession
     */
    fetchMessagesByUID(folder: string, rangeStart?: number, rangeEnd?: number): IMAPMessage[];
    /**
     * Fetch messages by UID asynchronously
     *
     * @param {string} folder foder to fetch messages from
     * @param {number} rangeStart Start of UIDs range, 0 by default
     * @param {number} rangeEnd End of UIDs range, "infinity" by default
     * @return {Promise<IMAPMessage[]>} Promise to return array of fetched messages info
     * @memberof IMAPSession
     */
    fetchMessagesByUIDAsync(folder: string, rangeStart: number, rangeEnd: number): Promise<IMAPMessage[]>;
    /**
     * Fetch messsage by uid
     *
     * @param {string} folder
     * @param {number} uid
     * @return {Data} Data object with message data
     * @memberof IMAPSession
     */
    fetchMessageByUID(folder: string, uid: number): Data;
    /**
     * Fetch messsage by uid asynchonously
     *
     * @param {string} folder
     * @param {number} uid
     * @return {Promise<Data>} Promise with Data object with message data
     * @memberof IMAPSession
     */
    fetchMessageByUIDAsync(folder: string, uid: number): Promise<Data>;
    /**
     * Fetch messsage by number
     *
     * @param {string} folder
     * @param {number} messageNumber
     * @return {Data}
     * @memberof IMAPSession
     */
    fetchMessageByNumber(folder: string, messageNumber: number): Data;
    /**
     * Get isQResyncEnabled
     *
     * @type {boolean}
     * @memberof IMAPSession
     */
    get isQResyncEnabled(): boolean;
    /**
     * Quick messsages synchronization by uid (with QRESYNC/CONDSTORE)
     *
     * @param {string} folder
     * @param {number} rangeStart? Start of UID range. Default value is 1
     * @param {number} rangeEnd? End of UID range. Default value is "int max" (to sync all messages)
     * @return {IMAPSyncResult | undefined}
     * @memberof IMAPSession
     */
    syncMessagesByUID(folder: string, modseq: number, rangeStart?: number, rangeEnd?: number): IMAPSyncResult | undefined;
    /**
     * Asynchronous quick messsages synchronization by uid (with QRESYNC/CONDSTORE)
     *
     * @param {string} folder
     * @param {number} rangeStart? Start of UID range. Default value is 1
     * @param {number} rangeEnd? End of UID range. Default value is "int max" (to sync all messages)
     * @return {IMAPSyncResult | undefined}
     * @memberof IMAPSession
     */
    syncMessagesByUIDAsync(folder: string, modseq: number): Promise<IMAPSyncResult | undefined>;
    /**
     * Store flags by number
     *
     * @param {string} folder
     * @param {number} uidSet
     * @param {IMAPStoreFlagsRequestKind} requestKind
     * @param {MessageFlag} flags
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    storeFlagsByUID(folder: string, uidSet: number, requestKind: IMAPStoreFlagsRequestKind, flags: MessageFlag): number;
    /**
     * Store flags by number
     *
     * @param {string} folder
     * @param {number} uidSet
     * @param {IMAPStoreFlagsRequestKind} requestKind
     * @param {MessageFlag} flags
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    storeFlagsByUIDAsync(folder: string, uidSet: number, requestKind: IMAPStoreFlagsRequestKind, flags: MessageFlag): Promise<number>;
    /**
     * Store flags by number
     *
     * @param {string} folder
     * @param {number} mnuber
     * @param {IMAPStoreFlagsRequestKind} requestKind
     * @param {MessageFlag} flags
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    storeFlagsByNumber(folder: string, mnuber: number, requestKind: IMAPStoreFlagsRequestKind, flags: MessageFlag): number;
    /**
     * Append message
     *
     * @param {string} folder
     * @param {Data} mdata
     * @param {MessageFlag} flags
     * @return {*}  {number} Created UID
     * @memberof IMAPSession
     */
    appendMessage(folder: string, mdata: Data, flags: MessageFlag): number;
    /**
     * Append message asynchronously
     *
     * @param {string} folder
     * @param {Data} mdata
     * @param {MessageFlag} flags
     * @return {*}  {Promise<number>} Created UID
     * @memberof IMAPSession
     */
    appendMessageAsync(folder: string, mdata: Data, flags: MessageFlag): Promise<number>;
    /**
     * Copy messages
     *
     * @param {string} folder
     * @param {string} destFolder
     * @param {number} locationStart
     * @param {number} [length]
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    copyMessages(folder: string, destFolder: string, locationStart: number, length?: number): number;
    /**
     * Expunge folder
     *
     * @param {string} folder
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    expunge(folder: string): number;
    /**
     * Expunge folder asynchronously
     *
     * @param {string} folder
     * @return {*}  {number}
     * @memberof IMAPSession
     */
    expungeAsync(folder: string): Promise<number>;
    /**
     * Get capabilityMove
     *
     * @type {string}
     * @memberof IMAPSession
     */
    get capabilityMove(): boolean;
    /**
     * Get capabilityCreateSpecialUse
     *
     * @type {string}
     * @memberof IMAPSession
     */
    get capabilityCreateSpecialUse(): boolean;
}
export { IMAPSession };
//# sourceMappingURL=IMAPSession.d.ts.map