export type SearchEndpointRequest = {name?: Array | undefined, firstName?: Array | undefined, lastName?: Array | undefined, title?: Array | undefined, dept?: Array | undefined, level?: Array | undefined, companyName?: Array | undefined, nameDomain?: Array | undefined, numberOfEmployees?: Array | undefined, revenue?: Array | undefined, industryName?: Array | undefined, subIndustry?: Array | undefined, city?: Array | undefined, country?: Array | undefined, state?: Array | undefined, zipCode?: Array | undefined, technologies?: Array | undefined, dontDisplayOwnedContacts?: boolean | undefined, limit?: number | undefined, minimumEmailDeliverabilityScore?: number | undefined, locationPreferences?: string | undefined, cursorMark?: string | undefined, titleExactMatch?: boolean | undefined, excludeTitleKeywords?: Array | undefined, dontDisplayDeadContacts?: boolean | undefined, displayOnlyContactsWithAnyPhoneNumbers?: boolean | undefined, displayOnlyMobileNumberContacts?: boolean | undefined, displayOnlyDirectDialContacts?: boolean | undefined, offset?: number | undefined}; export type CreateApiContactSearchV1HoldArgs = {body: SearchEndpointRequest}; export type CreateApiContactSearchV1HoldOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Search and Filter Contacts * * POST /contact/search/v1-hold */ export const createApiContactSearchV1Hold = async (args: CreateApiContactSearchV1HoldArgs, options?: CreateApiContactSearchV1HoldOptions) => { const {baseUrl = "http://localhost:8080/api", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/contact/search/v1-hold${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };