type Highlight = { version_id: number; passage_id: string; color: string;};
HighlightColor
Legacy type for highlight colors (constants only)
Not an API response, so no schema needed
Code
/** * Legacy type for highlight colors (constants only) * Not an API response, so no schema needed */interface HighlightColor { id: number; color: string; label: string;}
Abstract storage strategy for auth-related data (callbacks, return URLs).
Implementations can use different mechanisms (sessionStorage, memory, etc.)
WARNING: Session storage has known XSS vulnerabilities. An attacker that gains
script execution access (via XSS) can read all values in sessionStorage. Consider
using a secure, HTTP-only cookie mechanism for production applications.
Code
/** * Abstract storage strategy for auth-related data (callbacks, return URLs). * Implementations can use different mechanisms (sessionStorage, memory, etc.) * * WARNING: Session storage has known XSS vulnerabilities. An attacker that gains * script execution access (via XSS) can read all values in sessionStorage. Consider * using a secure, HTTP-only cookie mechanism for production applications. */interface StorageStrategy { setItem(key: string, value: string): void; getItem(key: string): string | null; removeItem(key: string): void; clear(): void;}
UseApiDataOptions
Code
type UseApiDataOptions = { enabled?: boolean;};
Hooks
UseApiDataResult
Code
type UseApiDataResult<T> = { data: T | null; loading: boolean; error: Error | null; refetch: () => void;};
Other
Collection
Generic Collection type for paginated responses
Code
/** * Generic Collection type for paginated responses */type Collection<T> = Readonly<{ data: T[]; next_page_token: string | null; total_size?: number;}>;