/**
 * Reactive state for managing the authenticated account's auth sessions on a
 * settings page. Reads and mutations flow through a narrow RPC adapter backed
 * by `auth/account_actions.ts`.
 *
 * Holds two `AsyncSlot`s — `list` for the fetch, `revoke_all` for the bulk
 * revoke — plus one `KeyedAsyncSlot<string, void>` (`revoke`) keyed by
 * `session_id` for per-row revoke (independent supersession across
 * concurrent rows; per-row error surfacing). Method names use the
 * `submit_*` prefix to avoid slot-name collisions.
 *
 * @module
 */
import { AsyncSlot } from './async_slot.svelte.js';
import { KeyedAsyncSlot } from './keyed_async_slot.svelte.js';
import type { AuthSessionJson } from '../auth/account_schema.js';
/**
 * Narrow RPC surface consumed by `AccountSessionsState`. Consumers adapt their
 * typed RPC client to this shape. Mirrors the other per-domain `*Rpc`
 * interfaces (`AdminAccountsRpc`, `AuditLogRpc`, `AdminInvitesRpc`).
 *
 * The three methods wrap the corresponding action specs on
 * `auth/account_actions.ts`:
 *
 * - `list` → `account_session_list`
 * - `revoke` → `account_session_revoke` (IDOR-guarded by `account_id` server-side)
 * - `revoke_all` → `account_session_revoke_all`
 */
export interface AccountSessionsRpc {
    list: () => Promise<{
        sessions: Array<AuthSessionJson>;
    }>;
    revoke: (params: {
        session_id: string;
    }) => Promise<{
        ok: true;
        revoked: boolean;
    }>;
    revoke_all: () => Promise<{
        ok: true;
        count: number;
    }>;
}
/**
 * Svelte context carrying the reactive `AccountSessionsRpc` accessor. Mirrors
 * the admin-side RPC contexts. `get()` throws when no provisioner ran above
 * the component — the adapter is required.
 */
export declare const account_sessions_rpc_context: {
    get: (error_message?: string) => () => AccountSessionsRpc;
    get_maybe: () => (() => AccountSessionsRpc) | undefined;
    set: (value: () => AccountSessionsRpc) => () => AccountSessionsRpc;
};
export interface AccountSessionsStateOptions {
    /**
     * Reactive accessor for the RPC adapter. Matches the `get_rpc` pattern on
     * the admin state classes.
     */
    get_rpc: () => AccountSessionsRpc;
}
export declare class AccountSessionsState {
    #private;
    readonly list: AsyncSlot<void, string>;
    readonly revoke: KeyedAsyncSlot<string, void, string>;
    readonly revoke_all: AsyncSlot<void, string>;
    sessions: Array<AuthSessionJson>;
    readonly active_count: number;
    constructor(options: AccountSessionsStateOptions);
    fetch(): Promise<void>;
    submit_revoke(id: string): Promise<void>;
    submit_revoke_all(): Promise<void>;
}
//# sourceMappingURL=account_sessions_state.svelte.d.ts.map