export type MicrosoftClientType = 'electron' | 'nwts' | 'terminal';
export interface MinecraftSkin {
    id?: string;
    state?: string;
    url?: string;
    variant?: string;
    alias?: string;
    base64?: string;
}
export interface MinecraftProfile {
    id: string;
    name: string;
    skins: MinecraftSkin[];
    capes: MinecraftSkin[];
}
export interface AuthError {
    error: string;
    errorType?: string;
    [key: string]: any;
}
export interface AuthResponse {
    access_token: string;
    client_token: string;
    uuid: string;
    name: string;
    refresh_token: string;
    user_properties: string;
    meta: {
        type: 'Xbox';
        access_token_expires_in: number;
        demo: boolean;
    };
    xboxAccount: {
        xuid: string;
        gamertag: string;
        ageGroup: string;
    };
    profile: MinecraftProfile;
}
export default class Microsoft {
    client_id: string;
    type: MicrosoftClientType;
    private tokenManager;
    constructor(client_id?: string);
    /** Login manual */
    getAuth(type?: MicrosoftClientType, url?: string): Promise<AuthResponse | AuthError | false>;
    /** Auto login usando token guardado */
    autoLogin(): Promise<AuthResponse | AuthError | false>;
    /** Logout */
    logout(): void;
    /** Obtener perfil de Minecraft */
    getProfile(mcLogin: {
        access_token: string;
    }): Promise<MinecraftProfile | AuthError>;
    /** Intercambiar código de autorización por token y obtener Minecraft token real */
    private exchangeCodeForToken;
    /** Flujo completo para obtener Minecraft token real y perfil */
    private getMinecraftAccount;
    /** Helper fetch + parse JSON */
    private fetchJSON;
}
