export interface ConsoleAuthOptions { email: string; password: string; } export declare enum Cookie { visitor = "tw-visitor", sIdentity = "server-identity", identity = "identity" } export interface Cookies { [Cookie.identity]: string | undefined; [Cookie.sIdentity]: string; [Cookie.visitor]: string; } /** * Defines interactions with Console API */ export declare class ConsoleAPI { private readonly baseUrl; private readonly consoleAuthOptions; /** * Initialises console base url and verifies console credentials * @param consoleBaseUrl base url of Twilio console * @param auth the {@link ConsoleAuthOptions} */ constructor(consoleBaseUrl: string, auth: ConsoleAuthOptions); /** * Extracts value from response header using regex * @param regex regex to apply * @param response response to be searched * @param matchName name of the entity being looked for */ private static getValueFromResponse; /** * Fetch response from the Twilio console endpoint * @param config request config to send */ private static getResponse; /** * Get required cookies (tw-visitor, identity, server-identity) to authenticate */ getCookies(): Promise; }