interface GetVercelOidcTokenBaseOptions {
    /**
     * Optional team ID (team_*) or slug to use for token refresh.
     * When provided, this team will be used instead of reading from `.vercel/project.json`.
     */
    team?: string;
    /**
     * Optional project ID (prj_*) or slug to use for token refresh.
     * When provided, this project will be used instead of reading from `.vercel/project.json`.
     */
    project?: string;
    /**
     * Optional time buffer in milliseconds before token expiry to consider it expired.
     * When provided, the token will be refreshed if it expires within this buffer time.
     * @default 0
     */
    expirationBufferMs?: number;
}
/**
 * Options for getting the Vercel OIDC token.
 *
 * `jti` and `skipCache` are only accepted when `audience` is provided, because
 * they only take effect while exchanging the token for a custom audience —
 * without an `audience` there is no exchange.
 */
export type GetVercelOidcTokenOptions = (GetVercelOidcTokenBaseOptions & {
    /**
     * Audience to set on the exchanged token.
     */
    audience: string;
    /**
     * Optional JTI to set on the exchanged token.
     * @default undefined
     */
    jti?: string;
    /**
     * When `true`, bypasses the in-memory exchange cache and performs a fresh
     * token exchange.
     * @default false
     */
    skipCache?: boolean;
}) | (GetVercelOidcTokenBaseOptions & {
    /**
     * @default undefined
     */
    audience?: undefined;
    jti?: never;
    skipCache?: never;
});
/**
 * Gets the current OIDC token from the request context or the environment variable.
 *
 * Do not cache this value, as it is subject to change in production!
 *
 * This function is used to retrieve the OIDC token from the request context or the environment variable.
 * It checks for the `x-vercel-oidc-token` header in the request context and falls back to the `VERCEL_OIDC_TOKEN` environment variable if the header is not present.
 *
 * Unlike the `getVercelOidcTokenSync` function, this function will refresh the token if it is expired in a development environment.
 *
 * @param {GetVercelOidcTokenOptions} [options] - Optional configuration for token retrieval.
 * @returns {Promise<string>} A promise that resolves to the OIDC token.
 * @throws {Error} If the `x-vercel-oidc-token` header is missing from the request context and the environment variable `VERCEL_OIDC_TOKEN` is not set. If the token
 * is expired in a development environment, will also throw an error if the token cannot be refreshed: no CLI credentials are available, CLI credentials are expired, no project configuration is available
 * or the token refresh request fails.
 *
 * @example
 *
 * ```js
 * // Using the OIDC token
 * getVercelOidcToken().then((token) => {
 *   console.log('OIDC Token:', token);
 * }).catch((error) => {
 *   console.error('Error:', error.message);
 * });
 * ```
 *
 * @example
 *
 * ```js
 * // Using the OIDC token with explicit team and project (supports IDs and slugs)
 * getVercelOidcToken({ team: 'my-team', project: 'my-project' }).then((token) => {
 *   console.log('OIDC Token:', token);
 * }).catch((error) => {
 *   console.error('Error:', error.message);
 * });
 * ```
 */
export declare function getVercelOidcToken(options?: GetVercelOidcTokenOptions): Promise<string>;
export {};
