import { Protocol } from "../utils";
import { BaseResource } from "./base";
import { AuthorizationToken } from "../models";
/**
 * Utilities for authorizing users using OAuth2.
 *
 * {@link https://developers.akahu.nz/docs/authorizing-with-oauth2}
 *
 * @category Resource
 */
export declare class AuthResource extends BaseResource {
    /**
     * Build the OAuth Authorization URL
     *
     * @param options Options for customising the generated URL.
     *
     * {@link https://developers.akahu.nz/docs/authorizing-with-oauth2#the-authorization-request}
     */
    buildAuthorizationUrl(options: {
        /**
         * Where to redirect the user once they have accepted or rejected the access request.
         * This **must** match one of your app's Redirect URIs.
         */
        redirect_uri: string;
        /**
         * This option is intended for mobile app developers.
         *
         * Specify a value of deep_link if your provided `redirect_uri` intends to activate your native
         * mobile application via iOS universal link or Android app link. When you supply this value,
         * the user will be required to tap to confirm before returning to your application. This
         * interaction ensures successful native app activation.
         */
        redirect_mode?: "deep_link";
        /**
         * The type of OAuth response. Currently `code` is the only supported option.
         *
         * @default `code`
         */
        response_type?: string;
        scope?: string;
        email?: string;
        connection?: string;
        state?: string;
        protocol?: Protocol;
        host?: string;
        port?: number;
        path?: string;
    }): string;
    /**
     * Exchange an OAuth authorization code for an access token.
     *
     * {@link https://developers.akahu.nz/docs/authorizing-with-oauth2#exchanging-the-authorization-code}
     * {@link https://developers.akahu.nz/reference/post_token}
     */
    exchange(code: string, redirect_uri: string, grant_type?: string): Promise<AuthorizationToken>;
    /**
     * Revoke the specified user auth token:
     *
     * {@link https://developers.akahu.nz/reference/delete_token}
     */
    revoke(token: string): Promise<void>;
}
