import { BasicURL, BooleanState, User } from "../../../types"; export declare enum BasicAuthenticationUIIdentifier { EMAIL = 0, USERNAME = 1 } export type RunnerAuthenticatable = { getAuthenticatedUser(): Promise; handleUserSignOut(): Promise; }; export type WebViewAuthenticatable = RunnerAuthenticatable & { /** * HTTP Request to be made in the WebView */ getWebAuthRequestURL(): Promise; /** * Handle Cookies received from the webview * @param name The name of the received cookie * @return A boolean value indicating whether the user has been successfully logged in */ didReceiveSessionCookieFromWebAuthResponse(name: string): Promise; }; export type BasicAuthenticatable = RunnerAuthenticatable & { /** * Used to decide if suwatte shows login with "username" & password or "email" and password. */ readonly BasicAuthUIIdentifier: BasicAuthenticationUIIdentifier; /** * Handle basic identifier-password authentication */ handleBasicAuth(identifier: string, password: string): Promise; }; export type OAuthAuthenticatable = RunnerAuthenticatable & { getOAuthRequestURL(): Promise; handleOAuthCallback(response: string): Promise; };