export type CreateApiFinancialDatasetsAgentSignupArgs = {body: {email: string, agent_name: string}}; export type CreateApiFinancialDatasetsAgentSignupOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Create a Financial Datasets account as an AI agent and receive an API key in one call. No authentication required. The email must be the account owners real inbox. * * POST /financial-datasets/agent/signup */ export const createApiFinancialDatasetsAgentSignup = async (args: CreateApiFinancialDatasetsAgentSignupArgs, options?: CreateApiFinancialDatasetsAgentSignupOptions) => { 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(/\/+$/, '')}/financial-datasets/agent/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 };