export type GetApiTombaV1TechnologyArgs = {domain: string}; export type GetApiTombaV1TechnologyOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Discover technologies used by a website. * * GET /tomba/v1/technology */ export const getApiTombaV1Technology = async (args: GetApiTombaV1TechnologyArgs, options?: GetApiTombaV1TechnologyOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.domain != null) query.append("domain", String(args.domain)) const url = `${baseUrl.replace(/\/+$/, '')}/tomba/v1/technology${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 undefined };