export type GetApiContactoutV1PeopleLinkedinArgs = {profile: string, include_phone?: boolean | undefined, email_type?: string | undefined}; export type GetApiContactoutV1PeopleLinkedinOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get contact details for a LinkedIn profile. * * GET /contactout/v1/people/linkedin */ export const getApiContactoutV1PeopleLinkedin = async (args: GetApiContactoutV1PeopleLinkedinArgs, options?: GetApiContactoutV1PeopleLinkedinOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.profile != null) query.append("profile", String(args.profile)) if (args.include_phone != null) query.append("include_phone", String(args.include_phone)) if (args.email_type != null) query.append("email_type", String(args.email_type)) const url = `${baseUrl.replace(/\/+$/, '')}/contactout/v1/people/linkedin${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 };