export declare type Fetch = typeof fetch; /** * Error format * * {@link https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes} */ export declare type PostgrestError = { message: string; details: string; hint: string; code: string; }; /** * Response format * * {@link https://github.com/supabase/supabase-js/issues/32} */ interface PostgrestResponseBase { status: number; statusText: string; } interface PostgrestResponseSuccess extends PostgrestResponseBase { error: null; data: T[]; body: T[]; count: number | null; } interface PostgrestResponseFailure extends PostgrestResponseBase { error: PostgrestError; data: null; body: null; count: null; } export declare type PostgrestResponse = PostgrestResponseSuccess | PostgrestResponseFailure; interface PostgrestSingleResponseSuccess extends PostgrestResponseBase { error: null; data: T; body: T; } export declare type PostgrestSingleResponse = PostgrestSingleResponseSuccess | PostgrestResponseFailure; export declare type PostgrestMaybeSingleResponse = PostgrestSingleResponse; export declare abstract class PostgrestBuilder implements PromiseLike> { protected method: 'GET' | 'HEAD' | 'POST' | 'PATCH' | 'DELETE'; protected url: URL; protected headers: { [key: string]: string; }; protected schema?: string; protected body?: Partial | Partial[]; protected shouldThrowOnError: boolean; protected signal?: AbortSignal; protected fetch: Fetch; protected allowEmpty: boolean; constructor(builder: PostgrestBuilder); /** * If there's an error with the query, throwOnError will reject the promise by * throwing the error instead of returning it as part of a successful response. * * {@link https://github.com/supabase/supabase-js/issues/92} */ throwOnError(throwOnError?: boolean): this; then, TResult2 = never>(onfulfilled?: ((value: PostgrestResponse) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; } export {}; //# sourceMappingURL=types.d.ts.map