UNPKG

@instantdb/core

Version:

Instant's core local abstraction

120 lines 2.41 kB
type InstantIssueBody = { type: 'param-missing'; message: string; hint: { in: string[]; }; } | { type: 'param-malformed'; message: string; hint: { in: string[]; }; } | { type: 'record-not-found'; message: string; hint: { 'record-type': string; }; } | { type: 'record-not-unique'; message: string; hint: { 'record-type': string; }; } | { type: 'validation-failed'; message: string; hint: { 'data-type': string; errors: any[]; }; } | { type: 'record-expired'; message: string; hint: { 'record-type': string; }; } | { type: 'record-foreign-key-invalid'; message: string; hint: { table?: string; condition?: string; constraint?: string; }; } | { type: 'record-check-violation'; message: string; hint: { table?: string; condition?: string; constraint?: string; }; } | { type: 'permission-denied'; message: string; hint: { input: any; expected: string; }; } | { type: 'permission-evaluation-failed'; message: string; hint: { rule: [string, string]; error?: { type: string; message: string; hint: any; }; }; } | { type: 'sql-raise'; message: string; hint: { table?: string; condition?: string; constraint?: string; }; } | { type: 'sql-exception'; message: string; hint: { table?: string; condition?: string; constraint?: string; }; } | { type: 'rate-limited'; message: string; } | { type: 'session-missing'; message: string; hint: { 'sess-id': string; }; } | { type: 'socket-missing'; message: string; hint: { 'sess-id': string; 'exception-message'?: string; }; } | { type: undefined; [k: string]: any; } | undefined; export type InstantIssue = { body: InstantIssueBody; status: number; }; export declare class InstantAPIError extends Error { body: InstantIssueBody; status: number; constructor(error: InstantIssue); get [Symbol.toStringTag](): string; } export declare function jsonFetch(input: RequestInfo, init: RequestInit | undefined): Promise<any>; export {}; //# sourceMappingURL=fetch.d.ts.map