export interface StoredCredentials { api_key: string; user_id: string; created_at: string; devices: Array<{ id: string; name: string; platform: "ios" | "android"; paired_at: string; }>; } export interface PairingState { pairing_token: string; manual_code: string; expires_at: string; } export declare class CredentialStore { private readonly configDir; private readonly credentialsFile; private readonly pairingStateFile; constructor(); /** * Ensure the config directory exists */ ensureDir(): Promise; /** * Check if credentials exist */ isPaired(): Promise; /** * Load stored credentials */ load(): Promise; /** * Save credentials */ save(credentials: StoredCredentials): Promise; /** * Get the API key */ getApiKey(): Promise; /** * Add a device to the stored credentials */ addDevice(device: StoredCredentials["devices"][0]): Promise; /** * Remove a device */ removeDevice(deviceId: string): Promise; /** * Clear all credentials (for logout/reset) */ clear(): Promise; /** * Save temporary pairing state (used during QR pairing) */ savePairingState(state: PairingState): Promise; /** * Load pairing state */ loadPairingState(): Promise; /** * Clear pairing state */ clearPairingState(): Promise; /** * Get the config directory path (for display to users) */ getConfigDir(): string; /** * Check if there's a pending pairing session and finalize it if complete. * This is used to auto-finalize pairing when the user tries to send a notification * immediately after scanning the QR code, without explicitly calling check_pairing_status. * * @returns The API key if pairing was finalized, null otherwise */ tryFinalizePendingPairing(apiClient: { getPairingStatus: (token: string) => Promise<{ status: "pending" | "completed" | "expired"; api_key?: string; user_id?: string; device_id?: string; device_name?: string; }>; setApiKey: (key: string) => void; }): Promise; } //# sourceMappingURL=credentials.d.ts.map