export type CreateApiBytemineV1ProposalsGenerateArgs = {body: {source_domain: string, target_domain: string, contact_name?: string | undefined, contact_email?: string | undefined, proposal_type?: string | undefined, cta_link?: string | undefined, calendar_embed?: string | undefined}}; export type CreateApiBytemineV1ProposalsGenerateOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Generate a personalized sales or partnership proposal with branding, ROI projections, social proof, and outreach copy. Returns a public shareable URL. 10 credits. * * POST /bytemine/v1/proposals/generate */ export const createApiBytemineV1ProposalsGenerate = async (args: CreateApiBytemineV1ProposalsGenerateArgs, options?: CreateApiBytemineV1ProposalsGenerateOptions) => { 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(/\/+$/, '')}/bytemine/v1/proposals/generate${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 };