/** * Generic WorkOS API client. * Thin fetch wrapper with auth, error parsing, and query param support. */ export interface WorkOSRequestOptions { method: 'GET' | 'POST' | 'PUT' | 'DELETE'; path: string; apiKey: string; baseUrl?: string; body?: Record; params?: Record; } export interface WorkOSListResponse { data: T[]; list_metadata: { before: string | null; after: string | null; }; } export declare class WorkOSApiError extends Error { readonly statusCode: number; readonly code?: string | undefined; readonly errors?: Array<{ message: string; }> | undefined; constructor(message: string, statusCode: number, code?: string | undefined, errors?: Array<{ message: string; }> | undefined); } export declare function workosRequest(options: WorkOSRequestOptions): Promise;