import * as z from "zod"; //#region src/index.d.ts declare const ACTIONS: readonly ["LIST", "CREATE", "UPDATE", "DELETE", "READ", "COUNT"]; type ACTION = (typeof ACTIONS)[number]; declare function createApi({ baseId, origin, schema, tableId, token }: { baseId: string; origin: string; schema: Schema; tableId: string; token?: string; }): { fetch(props: ("inputSchema" extends keyof { COUNT: { method: "get"; responseSchema: z.ZodUnion<[z.ZodObject<{ count: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ msg: z.ZodString; }, z.core.$strip>]>; url: string; }; CREATE: { inputSchema: z.ZodObject<{ fields: Schema; }, z.core.$strip>; method: "post"; responseSchema: z.ZodObject<{ records: z.ZodArray>; }, z.core.$strip>; url: string; }; DELETE: { inputSchema: z.ZodObject<{ id: z.ZodNumber; }, z.core.$strip>; method: "patch"; responseSchema: z.ZodObject<{}, z.core.$strip>; url: string; }; LIST: { method: "get"; querySchema: z.ZodObject<{ fields: z.ZodUnion<[z.ZodArray, z.ZodString]>; sort: z.ZodPipe; field: z.ZodString; }, z.core.$strip>, z.ZodTransform>; }, z.core.$strip>; responseSchema: z.ZodObject<{ nestedNext: z.ZodNullable>; nestedPrev: z.ZodNullable>; next: z.ZodNullable>; prev: z.ZodNullable>; records: z.ZodArray>; }, z.core.$strip>; url: string; }; READ: { method: "get"; responseSchema: z.ZodObject<{ fields: Schema; id: z.ZodNumber; }, z.core.$strip>; url: string; }; UPDATE: { inputSchema: z.ZodObject<{ fields: Schema; id: z.ZodString; }, z.core.$strip>; method: "patch"; responseSchema: z.ZodObject<{}, z.core.$strip>; url: string; }; }[A] ? { body: z.input<{ COUNT: { method: "get"; responseSchema: z.ZodUnion<[z.ZodObject<{ count: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ msg: z.ZodString; }, z.core.$strip>]>; url: string; }; CREATE: { inputSchema: z.ZodObject<{ fields: Schema; }, z.core.$strip>; method: "post"; responseSchema: z.ZodObject<{ records: z.ZodArray>; }, z.core.$strip>; url: string; }; DELETE: { inputSchema: z.ZodObject<{ id: z.ZodNumber; }, z.core.$strip>; method: "patch"; responseSchema: z.ZodObject<{}, z.core.$strip>; url: string; }; LIST: { method: "get"; querySchema: z.ZodObject<{ fields: z.ZodUnion<[z.ZodArray, z.ZodString]>; sort: z.ZodPipe; field: z.ZodString; }, z.core.$strip>, z.ZodTransform>; }, z.core.$strip>; responseSchema: z.ZodObject<{ nestedNext: z.ZodNullable>; nestedPrev: z.ZodNullable>; next: z.ZodNullable>; prev: z.ZodNullable>; records: z.ZodArray>; }, z.core.$strip>; url: string; }; READ: { method: "get"; responseSchema: z.ZodObject<{ fields: Schema; id: z.ZodNumber; }, z.core.$strip>; url: string; }; UPDATE: { inputSchema: z.ZodObject<{ fields: Schema; id: z.ZodString; }, z.core.$strip>; method: "patch"; responseSchema: z.ZodObject<{}, z.core.$strip>; url: string; }; }[A]["inputSchema"]>; } : {}) & ("querySchema" extends keyof { COUNT: { method: "get"; responseSchema: z.ZodUnion<[z.ZodObject<{ count: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ msg: z.ZodString; }, z.core.$strip>]>; url: string; }; CREATE: { inputSchema: z.ZodObject<{ fields: Schema; }, z.core.$strip>; method: "post"; responseSchema: z.ZodObject<{ records: z.ZodArray>; }, z.core.$strip>; url: string; }; DELETE: { inputSchema: z.ZodObject<{ id: z.ZodNumber; }, z.core.$strip>; method: "patch"; responseSchema: z.ZodObject<{}, z.core.$strip>; url: string; }; LIST: { method: "get"; querySchema: z.ZodObject<{ fields: z.ZodUnion<[z.ZodArray, z.ZodString]>; sort: z.ZodPipe; field: z.ZodString; }, z.core.$strip>, z.ZodTransform>; }, z.core.$strip>; responseSchema: z.ZodObject<{ nestedNext: z.ZodNullable>; nestedPrev: z.ZodNullable>; next: z.ZodNullable>; prev: z.ZodNullable>; records: z.ZodArray>; }, z.core.$strip>; url: string; }; READ: { method: "get"; responseSchema: z.ZodObject<{ fields: Schema; id: z.ZodNumber; }, z.core.$strip>; url: string; }; UPDATE: { inputSchema: z.ZodObject<{ fields: Schema; id: z.ZodString; }, z.core.$strip>; method: "patch"; responseSchema: z.ZodObject<{}, z.core.$strip>; url: string; }; }[A] ? { query?: z.input<{ COUNT: { method: "get"; responseSchema: z.ZodUnion<[z.ZodObject<{ count: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ msg: z.ZodString; }, z.core.$strip>]>; url: string; }; CREATE: { inputSchema: z.ZodObject<{ fields: Schema; }, z.core.$strip>; method: "post"; responseSchema: z.ZodObject<{ records: z.ZodArray>; }, z.core.$strip>; url: string; }; DELETE: { inputSchema: z.ZodObject<{ id: z.ZodNumber; }, z.core.$strip>; method: "patch"; responseSchema: z.ZodObject<{}, z.core.$strip>; url: string; }; LIST: { method: "get"; querySchema: z.ZodObject<{ fields: z.ZodUnion<[z.ZodArray, z.ZodString]>; sort: z.ZodPipe; field: z.ZodString; }, z.core.$strip>, z.ZodTransform>; }, z.core.$strip>; responseSchema: z.ZodObject<{ nestedNext: z.ZodNullable>; nestedPrev: z.ZodNullable>; next: z.ZodNullable>; prev: z.ZodNullable>; records: z.ZodArray>; }, z.core.$strip>; url: string; }; READ: { method: "get"; responseSchema: z.ZodObject<{ fields: Schema; id: z.ZodNumber; }, z.core.$strip>; url: string; }; UPDATE: { inputSchema: z.ZodObject<{ fields: Schema; id: z.ZodString; }, z.core.$strip>; method: "patch"; responseSchema: z.ZodObject<{}, z.core.$strip>; url: string; }; }[A]["querySchema"]>; } : {}) & { action: A; token?: string; }): Promise, z.ZodObject<{ msg: z.ZodString; }, z.core.$strip>]>; url: string; }; CREATE: { inputSchema: z.ZodObject<{ fields: Schema; }, z.core.$strip>; method: "post"; responseSchema: z.ZodObject<{ records: z.ZodArray>; }, z.core.$strip>; url: string; }; DELETE: { inputSchema: z.ZodObject<{ id: z.ZodNumber; }, z.core.$strip>; method: "patch"; responseSchema: z.ZodObject<{}, z.core.$strip>; url: string; }; LIST: { method: "get"; querySchema: z.ZodObject<{ fields: z.ZodUnion<[z.ZodArray, z.ZodString]>; sort: z.ZodPipe; field: z.ZodString; }, z.core.$strip>, z.ZodTransform>; }, z.core.$strip>; responseSchema: z.ZodObject<{ nestedNext: z.ZodNullable>; nestedPrev: z.ZodNullable>; next: z.ZodNullable>; prev: z.ZodNullable>; records: z.ZodArray>; }, z.core.$strip>; url: string; }; READ: { method: "get"; responseSchema: z.ZodObject<{ fields: Schema; id: z.ZodNumber; }, z.core.$strip>; url: string; }; UPDATE: { inputSchema: z.ZodObject<{ fields: Schema; id: z.ZodString; }, z.core.$strip>; method: "patch"; responseSchema: z.ZodObject<{}, z.core.$strip>; url: string; }; }[A]["responseSchema"]>>; }; //#endregion export { ACTION, ACTIONS, createApi };