import type { FileConnectorAuthorizationStore, ConnectorAuthorization } from "./auth/authorization-store.js"; import type { FileConnectorPairingStore, PendingConnectorPairing } from "./auth/pairing-store.js"; import type { FileRevocationQueueStore } from "./auth/revocation-queue.js"; export type RemoteStatus = { type: "connected"; authorization: ConnectorAuthorization; } | { type: "pairing"; pairing: PendingConnectorPairing; } | { type: "revoked"; } | { type: "waiting"; } | { type: "error"; message: string; }; export interface RemoteAccessStores { authorizationStore: FileConnectorAuthorizationStore; pairingStore: FileConnectorPairingStore; revocationQueueStore: FileRevocationQueueStore; } export declare function readRemoteStatus(authorizationStore: FileConnectorAuthorizationStore, pairingStore: FileConnectorPairingStore): Promise; /** * The local kill switch. Disables this device before anything is told to the server: an * unreachable or misbehaving service must never be able to keep a confirmed revoke from taking * effect here. The credential is queued first, so a retry can still reach the service after this * device has forgotten it. * * Throws when the stored authorization no longer matches the one the dialog was opened on -- a * stale dialog must not revoke a replacement -- and leaves local authorization intact on any * failure. Returns the validated service origin for the best-effort call that follows. */ export declare function revokeLocalAccess(stores: RemoteAccessStores, authorization: ConnectorAuthorization): Promise; export declare function notifyServiceRevocation(stores: Pick, serviceOrigin: URL, credential: string, signal: AbortSignal): Promise; export declare function regeneratePairingCode(stores: Pick, pairing: PendingConnectorPairing, signal: AbortSignal, wait: (milliseconds: number, signal: AbortSignal) => Promise): Promise; export declare function shortIdentifier(value: string): string; export declare function formatDate(value: string): string; export declare function formatTokenExpiration(value: string): string; export declare function errorMessage(error: unknown): string; //# sourceMappingURL=remote-access.d.ts.map