export type CreateApiOpenfunnelApiV2AccountBatchArgs = {body: {account_ids?: string | undefined, account_domains?: string | undefined, icp_people_page?: number | undefined, icp_people_page_size?: number | undefined, max_signals_per_account?: number | undefined, raw_content?: boolean | undefined}}; export type CreateApiOpenfunnelApiV2AccountBatchOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Fetch account records in bulk by account IDs or domains. Use this when you already know the companies and want OpenFunnel account details, signals, and optional ICP people pagination in one request. * * POST /openfunnel/api/v2/account/batch */ export const createApiOpenfunnelApiV2AccountBatch = async (args: CreateApiOpenfunnelApiV2AccountBatchArgs, options?: CreateApiOpenfunnelApiV2AccountBatchOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/openfunnel/api/v2/account/batch${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 };