export type GetApiTombaV1CombinedFindArgs = {email: string}; export type GetApiTombaV1CombinedFindOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get combined person and company information from an email. * * GET /tomba/v1/combined/find */ export const getApiTombaV1CombinedFind = async (args: GetApiTombaV1CombinedFindArgs, options?: GetApiTombaV1CombinedFindOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.email != null) query.append("email", String(args.email)) const url = `${baseUrl.replace(/\/+$/, '')}/tomba/v1/combined/find${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 };