export type AuthType = 'client_credentials' | 'oidc_oauth'; export interface StoredConfig { url: string; webId: string; authType: AuthType; } export interface ClientCredentialsSecrets { clientId: string; clientSecret: string; } export interface OidcOAuthSecrets { oidcRefreshToken: string; oidcAccessToken: string; oidcExpiresAt: string; oidcClientId?: string; } export type StoredSecrets = ClientCredentialsSecrets | OidcOAuthSecrets; export interface StoredCredentials extends StoredConfig { secrets: StoredSecrets; } export declare function getSolidHomeDir(): string; export declare function getSolidAuthDir(): string; export declare function getSolidCredentialsPath(): string; export declare function saveCredentials(creds: StoredCredentials): void; /** * Load credentials from the shared Solid auth store. * * This is the only credential source for Solid apps (LinX, xpod, etc.). * * Format: * { * url: "https://id.undefineds.co/", * webId: "https://id.undefineds.co/user/profile/card#me", * authType: "oidc_oauth", * secrets: { * oidcRefreshToken: "...", * oidcAccessToken: "...", * oidcExpiresAt: "2026-06-06T17:10:49.000Z", * oidcClientId: "..." * } * } */ export declare function loadCredentials(): StoredCredentials | null; export declare function clearCredentials(): void; export declare function isClientCredentials(secrets: StoredSecrets): secrets is ClientCredentialsSecrets; export declare function isOidcOAuth(secrets: StoredSecrets): secrets is OidcOAuthSecrets; /** * Get client credentials from stored credentials. * Returns null if using OAuth instead of client credentials. */ export declare function getClientCredentials(creds: StoredCredentials): ClientCredentialsSecrets | null; /** * Get OAuth credentials from stored credentials. * Returns null if using client credentials instead of OAuth. */ export declare function getOAuthCredentials(creds: StoredCredentials): OidcOAuthSecrets | null;