import { Company, AnnualFinancials, QuarterlyFinancials, ChangeEvent, PeerGroup } from '../types/index.js'; import { Jurisdiction } from '../lib/entity-id.js'; import { AnalysisData, CompanyData, EventItem, FinancialsData, OwnerEntry, SimilarData } from '../lib/widget-api-client.js'; export type AuthFailureCode = 401 | 402; export interface CompanyOptions { jurisdiction: Jurisdiction; } export interface RegnaApiClientOptions { /** Fires once per client lifetime when the server rejects the apiKey * (HTTP 401) or the subscription is paused / past-due (HTTP 402). * The provider uses this to flip into 'inactive' render mode so * every mounted widget tombstones. */ onAuthFailure?: (status: AuthFailureCode) => void; /** * v1.2 Phase 12: when true, the client is hitting a customer-owned * proxy and MUST NOT attach an Authorization header — the proxy * injects the secret key server-side. */ proxyMode?: boolean; } export declare class RegnaApiClient { private baseUrl; private apiKey?; private onAuthFailure?; private authFailureFired; private proxyMode; constructor(baseUrl: string, apiKey?: string, options?: RegnaApiClientOptions); private request; getCompany(orgNumber: string): Promise; getFinancials(orgNumber: string, opts?: { type?: 'annual' | 'quarterly'; years?: number; }): Promise<{ annual: AnnualFinancials[]; quarterly: QuarterlyFinancials[]; }>; getChangelog(orgNumber: string, opts?: { limit?: number; }): Promise; getPeers(orgNumber: string, opts?: { sniCode?: string; limit?: number; }): Promise; getCompanyByEntity(companyId: string, opts: CompanyOptions): Promise; getFinancialsByEntity(companyId: string, opts: CompanyOptions): Promise; getEvents(companyId: string, opts: CompanyOptions): Promise; getOwnership(companyId: string, opts: CompanyOptions): Promise<{ owners: OwnerEntry[]; }>; getAnalysis(companyId: string, opts: CompanyOptions): Promise; getSimilar(companyId: string, opts: CompanyOptions): Promise; } //# sourceMappingURL=api-client.d.ts.map