import { type Requester } from '@logto/js'; import { type Nullable } from '@silverhand/essentials'; import { type CacheKey, type Navigate, type PersistKey, type Storage, type StorageKey, type ClientAdapter, type InferStorageKey } from './types.js'; export declare class ClientAdapterInstance implements ClientAdapter { requester: Requester; storage: Storage; unstable_cache?: Storage | undefined; navigate: Navigate; generateState: () => string | Promise; generateCodeVerifier: () => string | Promise; generateCodeChallenge: (codeVerifier: string) => string | Promise; constructor(adapter: ClientAdapter); setStorageItem(key: InferStorageKey, value: Nullable): Promise; /** * Try to get the string value from the cache and parse as JSON. * Return the parsed value if it is an object, return `undefined` otherwise. * * @param key The cache key to get value from. */ getCachedObject(key: CacheKey): Promise; /** * Try to get the value from the cache first, if it doesn't exist in cache, * run the getter function and store the result into cache. * * @param key The cache key to get value from. */ getWithCache(key: CacheKey, getter: () => Promise): Promise; } export * from './types.js';