/// import { TaskNotificationRequest, TaskRecaptchaRequest } from "@mediahubmx/schema"; import { RequestInfo, RequestInit, Response, ResponseInit } from "node-fetch"; import { URLSearchParams } from "url"; export declare type MRequestInit = RequestInit & { /** * Shorthand to set the URL query string. */ qs?: URLSearchParams | Record; /** * Shorthand to send JSON data. */ json?: any; /** * Do this request `direct` or `proxy` it via the client connection. * Default: `proxy` */ connection?: "direct" | "proxy"; }; export declare type MResponseInit = ResponseInit & { url?: string; size?: number; }; export declare type FetchFn = (url: RequestInfo, init?: MRequestInit, timeout?: number) => Promise; export declare type RecaptchaFn = (data: Omit, timeout?: number) => Promise; export declare type ToastFn = (text: string) => Promise; export declare type NotificationFn = ({ caption, text, url, closeOnClick, theme, timeout, }: { caption?: string; text?: string; url?: string; closeOnClick?: boolean; theme?: TaskNotificationRequest["theme"]; timeout?: number; }) => Promise;