import { Client } from '@botpress/client';
import { Credentials, Profile } from './credentials.js';
import type { AgentInfo } from '../agent-project/types.js';
export interface LoginOptions {
    profile?: string;
    apiUrl?: string;
}
export interface AuthAPI {
    login(token: string, options?: LoginOptions): Promise<void>;
    logout(profile?: string): Promise<void>;
    listProfiles(): Promise<Profile[]>;
    getCurrentProfile(): Promise<string>;
    getCurrentProfileDetails(): Promise<Profile | null>;
    setCurrentProfile(profileName: string): Promise<void>;
    setProfileOverride(profile: string | undefined): void;
    getActiveCredentials(): Promise<Credentials>;
    getAgentCredentials(agentPath: string): Promise<Credentials>;
    validateToken(token: string, apiUrl?: string): Promise<boolean>;
}
declare class Auth implements AuthAPI {
    private credentialsManager;
    constructor();
    login(token: string, options?: LoginOptions): Promise<void>;
    private resolveProfileName;
    logout(profile?: string): Promise<void>;
    listProfiles(): Promise<Profile[]>;
    getCurrentProfile(): Promise<string>;
    getCurrentProfileDetails(): Promise<Profile | null>;
    setCurrentProfile(profileName: string): Promise<void>;
    setProfileOverride(profile: string | undefined): void;
    getActiveCredentials(): Promise<Credentials>;
    getAgentCredentials(agentPath: string): Promise<Credentials>;
    validateToken(token: string, apiUrl?: string): Promise<boolean>;
}
export declare const auth: Auth;
export interface ProjectCredentialsContext {
    path?: string;
    agentInfo?: AgentInfo | null;
}
export interface ResolveProjectCredentialsOptions {
    project?: ProjectCredentialsContext;
    credentials?: Credentials;
    apiUrl?: string;
    workspaceId?: string;
    botId?: string;
}
export type WorkspaceCredentials = Credentials & {
    workspaceId: string;
};
export type BotCredentials = WorkspaceCredentials & {
    botId: string;
};
export declare function resolveProjectCredentials(options?: ResolveProjectCredentialsOptions): Promise<Credentials>;
export declare function resolveWorkspaceCredentials(options?: ResolveProjectCredentialsOptions): Promise<WorkspaceCredentials>;
export declare function resolveBotCredentials(options?: ResolveProjectCredentialsOptions): Promise<BotCredentials>;
export interface GetProjectClientOptions extends ResolveProjectCredentialsOptions {
    integrationId?: string;
    integrationAlias?: string;
    headers?: Record<string, string | string[]>;
}
export declare function getProjectClient(options?: GetProjectClientOptions): Promise<Client>;
export declare function clearProjectClientCache(): void;
export type { Credentials, Profile } from './credentials.js';
export type { AuthResult } from './service.js';
export { CredentialsManager } from './credentials.js';
export { bpCliImporter } from './bp-cli-import.js';
//# sourceMappingURL=index.d.ts.map