UNPKG

plato-sdk

Version:

JavaScript client for interacting with the Plato API

22 lines (21 loc) 778 B
import { z } from 'zod'; export declare const ConfigSchema: z.ZodObject<{ baseUrl: z.ZodDefault<z.ZodString>; apiKey: z.ZodString; }, "strip", z.ZodTypeAny, { baseUrl: string; apiKey: string; }, { apiKey: string; baseUrl?: string | undefined; }>; export type Config = z.infer<typeof ConfigSchema>; /** * Creates a configuration object with the provided API key and base URL. * This function is browser-compatible and does not rely on Node.js specific APIs. * * @param apiKey - Required API key for authentication with Plato services * @param baseUrl - Optional base URL for the Plato API (defaults to https://plato.so/api) * @returns A validated configuration object */ export declare function getConfig(apiKey: string, baseUrl?: string): Config;