export type GetApiGetemaildomaintypeArgs = {email: string}; export type GetApiGetemaildomaintypeOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Email domain classification: classifies the domain behind an email address as Business, Government, Education, Generic, Disposable, or Unknown. Instant organizational context for lead scoring, trial qualification, CRM enrichment, sales routing, and fraud prevention. * * GET /getemaildomaintype */ export const getApiGetemaildomaintype = async (args: GetApiGetemaildomaintypeArgs, options?: GetApiGetemaildomaintypeOptions) => { const {baseUrl = "https://api.interzoid.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json") if (args.email != null) query.append("email", String(args.email)) if (ApiKeyAuth !== undefined) headers.set("x-api-key", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/getemaildomaintype${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return (await res.json()) as unknown };