interface GCIAPIResult { count: number; next: null | number; previous: null | number; results: GCIResult[]; } interface GCIResult { id: string; shortlink: string | null; name: string; url: string; } interface APIError { error: true; errorMessage: string; } interface APISuccess { error: false; payload: T; } interface APIQueryParams { query: string; lucky?: string; } type APIResult = APIError | APISuccess;