UNPKG

@lusc/fastmail-masked-email

Version:

A library for creating, deleting, and updating Fastmail masked emails

20 lines (19 loc) 690 B
import { type z } from 'zod'; import type { Session } from './schemas.js'; type HttpOptions<T extends z.ZodTypeAny> = { url: string; headers?: Record<string, string> | Headers; body?: unknown; schema: T; action: string; }; export declare function httpRequest<T extends z.ZodTypeAny>({ url, headers, schema, action, body, }: HttpOptions<T>): Promise<z.infer<T>>; type ApiRequestOptions<T extends z.ZodTypeAny> = { schema: T; action: string; session: Session; method: string; body: unknown; }; export declare function apiRequest<T extends z.ZodTypeAny>({ session, method, body, schema, action, }: ApiRequestOptions<T>): Promise<z.infer<T>>; export {};