export type CreateApiNetworksAdvertiserSignupArgs = {body: {firstname: string, lastname: string, company: string, email: string, phone?: string | undefined, website: string, offer_landing_page: string, password?: string | undefined, tax_id?: string | undefined, contact_address: {address_1?: string | undefined, address_2?: string | undefined, city?: string | undefined, region_code?: string | undefined, country_id?: number | undefined, zip_postal_code?: string | undefined}, referral_code?: string | undefined, account_manager_encoded_value?: string | undefined, custom_field_values?: Array<{network_signup_custom_field_id: number, field_value: string}> | undefined}}; export type CreateApiNetworksAdvertiserSignupOptions = {baseUrl?: string | undefined, APIKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Submit Advertiser Signup * * POST /networks/advertiser/signup */ export const createApiNetworksAdvertiserSignup = async (args: CreateApiNetworksAdvertiserSignupArgs, options?: CreateApiNetworksAdvertiserSignupOptions) => { const {baseUrl = "https://api.eflow.team/v1", fetch: fetchFn = fetch, APIKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (APIKey !== undefined) headers.set("X-Eflow-Api-Key", APIKey) const url = `${baseUrl.replace(/\/+$/, '')}/networks/advertiser/signup${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 };