export type GetApiGetexecutiveprofileArgs = {lookup: string, language?: string | undefined}; export type GetApiGetexecutiveprofileOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Executive and leadership lookup: give a company and a title (for example 'Coinbase CEO') and get the executive's name and title, the company website, a LinkedIn URL, and a biography source URL. For sales prospecting, lead generation, account research, and finding decision makers. * * GET /getexecutiveprofile */ export const getApiGetexecutiveprofile = async (args: GetApiGetexecutiveprofileArgs, options?: GetApiGetexecutiveprofileOptions) => { 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.lookup != null) query.append("lookup", String(args.lookup)) if (args.language != null) query.append("language", String(args.language)) if (ApiKeyAuth !== undefined) headers.set("x-api-key", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/getexecutiveprofile${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 };