UNPKG

parsera-ts

Version:

Official TypeScript SDK for Parsera.org API - Extract structured data from any webpage

71 lines (70 loc) 2.39 kB
import { z } from 'zod'; export declare const AttributeSchema: z.ZodObject<{ name: z.ZodString; description: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; description: string; }, { name: string; description: string; }>; export declare const CookieSchema: z.ZodObject<{ sameSite: z.ZodEnum<["None", "Lax", "Strict"]>; }, "strip", z.ZodString, z.objectOutputType<{ sameSite: z.ZodEnum<["None", "Lax", "Strict"]>; }, z.ZodString, "strip">, z.objectInputType<{ sameSite: z.ZodEnum<["None", "Lax", "Strict"]>; }, z.ZodString, "strip">>; /** * Fetches the list of valid proxy countries from Parsera API * @returns A Zod enum schema of valid proxy countries */ export declare const getProxyCountriesSchema: () => Promise<z.ZodString | z.ZodEnum<[string, ...string[]]>>; export declare const createInputSchema: () => Promise<z.ZodObject<{ url: z.ZodString; apiKey: z.ZodString; attributes: z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; description: string; }, { name: string; description: string; }>, "many">; proxyCountry: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEnum<[string, ...string[]]>>; cookies: z.ZodOptional<z.ZodArray<z.ZodObject<{ sameSite: z.ZodEnum<["None", "Lax", "Strict"]>; }, "strip", z.ZodString, z.objectOutputType<{ sameSite: z.ZodEnum<["None", "Lax", "Strict"]>; }, z.ZodString, "strip">, z.objectInputType<{ sameSite: z.ZodEnum<["None", "Lax", "Strict"]>; }, z.ZodString, "strip">>, "many">>; precisionMode: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { apiKey: string; url: string; attributes: { name: string; description: string; }[]; proxyCountry?: string | undefined; cookies?: z.objectOutputType<{ sameSite: z.ZodEnum<["None", "Lax", "Strict"]>; }, z.ZodString, "strip">[] | undefined; precisionMode?: boolean | undefined; }, { apiKey: string; url: string; attributes: { name: string; description: string; }[]; proxyCountry?: string | undefined; cookies?: z.objectInputType<{ sameSite: z.ZodEnum<["None", "Lax", "Strict"]>; }, z.ZodString, "strip">[] | undefined; precisionMode?: boolean | undefined; }>>;