export type GetApiAktaProV1NewsArgs = {company?: string | undefined, primary_company?: string | undefined, industry?: string | undefined, query?: string | undefined, title?: string | undefined, start_date?: string | undefined, end_date?: string | undefined, limit?: number | undefined, offset?: number | undefined, group_articles?: boolean | undefined, news_score_list?: string | undefined, countries?: string | undefined, blacklisted?: string | undefined, type_list?: string | undefined, sentiment_list?: string | undefined, entity_person_list?: string | undefined, entity_location_list?: string | undefined, entity_product_list?: string | undefined, entity_event_list?: string | undefined, naics_code_list?: string | undefined, sic_code_list?: string | undefined, iptc_code_list?: string | undefined, iab_code_list?: string | undefined, full_text?: boolean | undefined}; export type GetApiAktaProV1NewsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Search real-time news and historical archives by company (domain or akta UUID), industry (akta codes from Industry Search, or NAICS, SIC, IPTC, IAB codes), topic or keyword (query) or headline text (title). Covers funding, M&A, launches, partnerships, leadership changes, layoffs, financial, regulatory, litigation, cybersecurity and risk events. Use company for mentions or primary_company when the company must be the main subject. Filter by start_date/end_date, type_list, sentiment_list, countries, news_score_list, people, locations, products, events and excluded publishers. Group duplicates and paginate; set full_text=false for compact results. Use for GTM or buying signals, account monitoring, sector trackers and diligence. Returns article IDs, titles, AI summaries, URLs, dates, publishers, event tags, sentiment and company mentions. Optimized for AI agents with compact, structured output for reliable routing. * * GET /akta-pro/v1/news */ export const getApiAktaProV1News = async (args: GetApiAktaProV1NewsArgs, options?: GetApiAktaProV1NewsOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.company != null) query.append("company", String(args.company)) if (args.primary_company != null) query.append("primary_company", String(args.primary_company)) if (args.industry != null) query.append("industry", String(args.industry)) if (args.query != null) query.append("query", String(args.query)) if (args.title != null) query.append("title", String(args.title)) if (args.start_date != null) query.append("start_date", String(args.start_date)) if (args.end_date != null) query.append("end_date", String(args.end_date)) if (args.limit != null) query.append("limit", String(args.limit)) if (args.offset != null) query.append("offset", String(args.offset)) if (args.group_articles != null) query.append("group_articles", String(args.group_articles)) if (args.news_score_list != null) query.append("news_score_list", String(args.news_score_list)) if (args.countries != null) query.append("countries", String(args.countries)) if (args.blacklisted != null) query.append("blacklisted", String(args.blacklisted)) if (args.type_list != null) query.append("type_list", String(args.type_list)) if (args.sentiment_list != null) query.append("sentiment_list", String(args.sentiment_list)) if (args.entity_person_list != null) query.append("entity_person_list", String(args.entity_person_list)) if (args.entity_location_list != null) query.append("entity_location_list", String(args.entity_location_list)) if (args.entity_product_list != null) query.append("entity_product_list", String(args.entity_product_list)) if (args.entity_event_list != null) query.append("entity_event_list", String(args.entity_event_list)) if (args.naics_code_list != null) query.append("naics_code_list", String(args.naics_code_list)) if (args.sic_code_list != null) query.append("sic_code_list", String(args.sic_code_list)) if (args.iptc_code_list != null) query.append("iptc_code_list", String(args.iptc_code_list)) if (args.iab_code_list != null) query.append("iab_code_list", String(args.iab_code_list)) if (args.full_text != null) query.append("full_text", String(args.full_text)) const url = `${baseUrl.replace(/\/+$/, '')}/akta-pro/v1/news${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };