import type { VirtualFS } from '../virtual-fs';
export declare const INFISICAL_CONFIG_DIR = "/home/user/.infisical";
export declare const INFISICAL_CONFIG_PATH = "/home/user/.infisical/infisical-config.json";
export declare const INFISICAL_AUTH_PATH = "/home/user/.infisical/auth.json";
export declare const INFISICAL_WORKSPACE_FILE_NAME = ".infisical.json";
export declare const DEFAULT_INFISICAL_DOMAIN = "https://app.infisical.com";
export type InfisicalVaultBackend = 'auto' | 'file';
export type InfisicalAuthMethod = 'universal-auth' | 'user';
export interface InfisicalMachineIdentityConfig {
    method: InfisicalAuthMethod;
    clientId: string | null;
    clientSecret: string | null;
    organizationSlug: string | null;
}
export interface InfisicalConfigFile {
    version: number;
    domain: string;
    domains: string[];
    loggedInUserEmail: string | null;
    machineIdentity: InfisicalMachineIdentityConfig | null;
    path: string;
    raw: Record<string, unknown>;
    vaultBackendType: InfisicalVaultBackend;
}
export interface InfisicalAuthFile {
    version: number;
    accessToken: string | null;
    email: string | null;
    refreshToken: string | null;
    privateKey: string | null;
    tokenType: string | null;
    expiresAt: string | null;
    issuedAt: string | null;
    domain: string;
    method: InfisicalAuthMethod | null;
    clientId: string | null;
    organizationSlug: string | null;
}
export interface InfisicalStoredStateSummary {
    clientId: string | null;
    domain: string;
    email: string | null;
    expiresAt: string | null;
    hasAuth: boolean;
    hasConfig: boolean;
    hasMachineIdentity: boolean;
    hasValidAccessToken: boolean;
    organizationSlug: string | null;
}
export interface InfisicalWorkspaceConfigFile {
    defaultEnvironment: string | null;
    gitBranchToEnvironmentMapping: Record<string, string> | null;
    path: string | null;
    raw: Record<string, unknown>;
    workspaceId: string | null;
}
export declare function normalizeInfisicalDomain(value: unknown): string;
export declare function readInfisicalConfig(vfs: VirtualFS): InfisicalConfigFile;
export declare function writeInfisicalConfig(vfs: VirtualFS, config: InfisicalConfigFile): void;
export declare function readInfisicalAuth(vfs: VirtualFS): InfisicalAuthFile;
export declare function writeInfisicalAuth(vfs: VirtualFS, auth: InfisicalAuthFile): void;
export declare function deleteInfisicalAuth(vfs: VirtualFS): boolean;
export declare function hasInfisicalAuth(vfs: VirtualFS): boolean;
export declare function isInfisicalAccessTokenValid(auth: InfisicalAuthFile, now?: number): boolean;
export declare function inspectInfisicalStoredState(vfs: VirtualFS): InfisicalStoredStateSummary;
export declare function readInfisicalWorkspaceConfig(vfs: VirtualFS, cwd: string): InfisicalWorkspaceConfigFile | null;
export interface InfisicalProjectEnvironment {
    id: string | null;
    name: string | null;
    slug: string | null;
}
export interface InfisicalProjectInfo {
    id: string;
    name: string;
    slug: string | null;
    environments: InfisicalProjectEnvironment[];
}
export declare function fetchInfisicalProjects(domain: string, token: string): Promise<InfisicalProjectInfo[]>;
export interface InfisicalOrganizationInfo {
    id: string;
    name: string | null;
    slug: string | null;
}
export declare function fetchInfisicalOrganizations(domain: string, token: string): Promise<InfisicalOrganizationInfo[]>;
export interface ProvisionInfisicalUniversalAuthOptions {
    domain: string;
    token: string;
    identityName: string;
    organizationId?: string | null;
    projectId?: string | null;
    projectRole?: string;
}
export interface ProvisionInfisicalUniversalAuthResult {
    identityId: string;
    clientId: string;
    clientSecret: string;
    organizationId: string;
    organizationSlug: string | null;
    attachedToProject: boolean;
}
export declare function provisionInfisicalUniversalAuth(options: ProvisionInfisicalUniversalAuthOptions): Promise<ProvisionInfisicalUniversalAuthResult>;
export declare function ensureInfisicalFolder(options: {
    domain: string;
    token: string;
    projectId: string;
    environment: string;
    secretPath: string;
}): Promise<void>;
export declare function upsertInfisicalSecret(options: {
    domain: string;
    token: string;
    projectId: string;
    environment: string;
    key: string;
    value: string;
    secretPath?: string;
    type?: string;
}): Promise<'created' | 'updated'>;
export declare function writeInfisicalWorkspaceConfig(vfs: VirtualFS, cwd: string, config: {
    defaultEnvironment?: string | null;
    gitBranchToEnvironmentMapping?: Record<string, string> | null;
    workspaceId: string;
}): string;
//# sourceMappingURL=infisical-auth.d.ts.map