import { a as EdgarClientOptions, c as FetchInit, d as RequestEndEvent, f as RequestStartEvent, h as TelemetryOptions, i as DownloadedExhibit, l as FetchResponse, m as RetryOptions, n as CompanyTicker, o as ExhibitRef, p as RetryEvent, r as DiscoverFilingsInput, s as FetchFn, t as CompanyInfo, u as FilingRef } from "./index-Gjxpawjc.cjs";

//#region src/errors/index.d.ts
type EdgarErrorCode = "CONFIGURATION_ERROR" | "VALIDATION_ERROR" | "TRANSPORT_ERROR" | "RATE_LIMITED" | "TIMEOUT" | "NOT_FOUND" | "PARSE_ERROR" | "UNKNOWN_ERROR";
declare class EdgarError extends Error {
  readonly code: EdgarErrorCode;
  readonly retryable: boolean;
  readonly metadata?: Record<string, unknown>;
  constructor(message: string, code: EdgarErrorCode, retryable: boolean, options?: {
    cause?: unknown;
    metadata?: Record<string, unknown>;
  });
}
declare class ConfigurationError extends EdgarError {
  constructor(message: string, options?: {
    cause?: unknown;
    metadata?: Record<string, unknown>;
  });
}
declare class ValidationError extends EdgarError {
  constructor(message: string, options?: {
    cause?: unknown;
    metadata?: Record<string, unknown>;
  });
}
declare class TransportError extends EdgarError {
  constructor(message: string, retryable: boolean, options?: {
    cause?: unknown;
    metadata?: Record<string, unknown>;
  });
}
declare class RateLimitedError extends EdgarError {
  constructor(message: string, options?: {
    cause?: unknown;
    metadata?: Record<string, unknown>;
  });
}
declare class TimeoutError extends EdgarError {
  constructor(message: string, options?: {
    cause?: unknown;
    metadata?: Record<string, unknown>;
  });
}
declare class NotFoundError extends EdgarError {
  constructor(message: string, options?: {
    cause?: unknown;
    metadata?: Record<string, unknown>;
  });
}
declare class ParseError extends EdgarError {
  constructor(message: string, options?: {
    cause?: unknown;
    metadata?: Record<string, unknown>;
  });
}
//#endregion
//#region src/bulk/service.d.ts
type BulkDownloadResult = {
  bytes: Uint8Array;
  sizeBytes: number;
  mimeType?: string;
  source: "submissions" | "companyfacts";
};
//#endregion
//#region src/search/service.d.ts
type SearchQuery = {
  q: string;
  formTypes?: string[];
  from?: string;
  to?: string;
  entity?: string;
  start?: number;
};
type SearchResult = {
  total: number;
  hits: SearchHit[];
};
type SearchHit = {
  id: string;
  entityName: string;
  fileNumber?: string;
  formType: string;
  fileDate: string;
  fileDescription?: string;
  periodOfReport?: string;
  score: number;
};
//#endregion
//#region src/xbrl/service.d.ts
type CompanyFacts = {
  cik: number;
  entityName: string;
  facts: Record<string, Record<string, FactEntry>>;
};
type FactEntry = {
  label: string;
  description?: string;
  units: Record<string, FactValue[]>;
};
type FactValue = {
  val: number;
  accn: string;
  fy?: number;
  fp?: string;
  form?: string;
  filed?: string;
  start?: string;
  end?: string;
};
type CompanyConcept = {
  cik: number;
  taxonomy: string;
  tag: string;
  label?: string;
  entityName?: string;
  units: Record<string, FactValue[]>;
};
type Frame = {
  taxonomy: string;
  tag: string;
  ccp?: string;
  uom?: string;
  label?: string;
  pts?: number;
  data: FrameEntry[];
};
type FrameEntry = {
  accn: string;
  cik: number;
  entityName: string;
  val: number;
  start?: string;
  end?: string;
};
//#endregion
//#region src/client.d.ts
declare class EdgarClient {
  private readonly options;
  private readonly httpClient;
  private readonly bulkDataService;
  private readonly searchService;
  private readonly xbrlService;
  private readonly companyService;
  private readonly discoveryService;
  private readonly exhibitService;
  private readonly downloadService;
  constructor(options: EdgarClientOptions);
  getCompanyInfo(cik: string): Promise<CompanyInfo>;
  lookupCompany(query: string): Promise<CompanyTicker[]>;
  discoverFilings(input: DiscoverFilingsInput): Promise<FilingRef[]>;
  listExhibits(filing: FilingRef): Promise<ExhibitRef[]>;
  listContractExhibits(filing: FilingRef): Promise<ExhibitRef[]>;
  downloadExhibit(exhibit: ExhibitRef): Promise<DownloadedExhibit>;
  downloadSubmissionsBulk(): Promise<BulkDownloadResult>;
  downloadCompanyFactsBulk(): Promise<BulkDownloadResult>;
  getCompanyFacts(cik: string): Promise<CompanyFacts>;
  getCompanyConcept(cik: string, taxonomy: string, tag: string): Promise<CompanyConcept>;
  getFrame(taxonomy: string, tag: string, unit: string, period: string): Promise<Frame>;
  searchFilings(query: SearchQuery): Promise<SearchResult>;
}
//#endregion
export { CompanyInfo, CompanyTicker, ConfigurationError, DiscoverFilingsInput, DownloadedExhibit, EdgarClient, EdgarClientOptions, EdgarError, EdgarErrorCode, ExhibitRef, FetchFn, FetchInit, FetchResponse, FilingRef, NotFoundError, ParseError, RateLimitedError, RequestEndEvent, RequestStartEvent, RetryEvent, RetryOptions, TelemetryOptions, TimeoutError, TransportError, ValidationError };
//# sourceMappingURL=index.d.cts.map