import type { RealmAuthOptions, RealmConnectionState, RealmEventsModule, RealmOptions, RealmServiceRegistry, RealmTokenRefreshResult, RealmUnsafeRawModule } from './client-types.js';
export declare class Realm {
    #private;
    readonly services: RealmServiceRegistry;
    readonly events: RealmEventsModule;
    readonly unsafeRaw: RealmUnsafeRawModule;
    readonly baseUrl: string;
    constructor(options: RealmOptions);
    connect(): Promise<void>;
    ready(input?: {
        timeoutMs?: number;
    }): Promise<void>;
    close(): Promise<void>;
    state(): RealmConnectionState;
    updateAuth(patch: Partial<RealmAuthOptions>): void;
    clearAuth(): void;
    static refreshAccessToken(input: {
        authMode: 'external_principal';
        realmBaseUrl: string;
        refreshToken: string;
        fetchImpl?: typeof fetch;
    }): Promise<RealmTokenRefreshResult>;
    /**
     * Decodes the unverified JWT payload for UX hints only.
     * Do not use this helper for trust, authorization, or expiry enforcement.
     *
     * @deprecated Prefer {@link Realm.decodeTokenExpiryUnsafe} in new code to make
     * the lack of signature verification explicit.
     */
    static decodeTokenExpiry(jwt: string): {
        expiresAt: number;
        expiresInMs: number;
    } | null;
    static decodeTokenExpiryUnsafe(jwt: string): {
        expiresAt: number;
        expiresInMs: number;
    } | null;
}
//# sourceMappingURL=client.d.ts.map