import { Context } from "hono";
import { GrantType } from "@authhero/adapter-interfaces";
import { Bindings, Variables } from "../types";
interface BaseScopesAndPermissionsParams {
    tenantId: string;
    clientId: string;
    audience: string;
    requestedScopes: string[];
    organizationId?: string;
}
interface ClientCredentialsScopesAndPermissionsParams extends BaseScopesAndPermissionsParams {
    grantType: GrantType.ClientCredential;
    userId?: never;
}
interface UserBasedScopesAndPermissionsParams extends BaseScopesAndPermissionsParams {
    grantType?: GrantType.AuthorizationCode | GrantType.RefreshToken | GrantType.Password | GrantType.Passwordless | GrantType.OTP | undefined;
    userId: string;
}
export type CalculateScopesAndPermissionsParams = ClientCredentialsScopesAndPermissionsParams | UserBasedScopesAndPermissionsParams;
export interface ScopesAndPermissionsResult {
    scopes: string[];
    permissions: string[];
    token_lifetime: number;
    token_lifetime_for_web: number;
}
/**
 * Calculates the scopes and permissions for a user based on the audience and resource server configuration.
 * This function implements Auth0-like behavior for RBAC and token dialects.
 *
 * @param ctx - The Hono context
 * @param params - Parameters containing tenant ID, user ID, audience, and requested scopes
 * @returns Object containing calculated scopes and permissions
 */
export declare function calculateScopesAndPermissions(ctx: Context<{
    Bindings: Bindings;
    Variables: Variables;
}>, params: CalculateScopesAndPermissionsParams): Promise<ScopesAndPermissionsResult>;
export {};
