// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../../core/resource'; import * as CompanyAPI from '../../company/company'; import * as EdgarAPI from '../../company/edgar'; import * as DocumentAPI from './document'; import { Document, DocumentDownloadPdfParams, DocumentGetTextParams, DocumentGetTextResponse, DocumentRetrieveParams, DocumentRetrieveResponse, } from './document'; import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; /** * Direct access to SEC EDGAR filings and documents by accession number. */ export class Filing extends APIResource { document: DocumentAPI.Document = new DocumentAPI.Document(this._client); /** * Retrieve an SEC filing by its accession number, including the full list of * documents in the filing and all related entities with their relationship types * (e.g. filer, subject company, reporting owner). */ retrieve(accessionNumber: string, options?: RequestOptions): APIPromise { return this._client.get(path`/edgar/filing/${accessionNumber}`, options); } } /** * A document from an SEC EDGAR filing. */ export interface EdgarDocument { /** * The accession number of the parent filing. */ accession_number: string; /** * A short description of the document's contents. */ description: string; /** * Unique document identifier in '{accession_number}.{sequence}' format. */ document_id: string; /** * The filename of the document as submitted to EDGAR. */ filename: string; /** * The total number of pages in the document. */ page_count: number; /** * The document's sequence number within the filing, as assigned by the SEC. */ sequence: number; /** * The total number of words in the document. */ word_count: number; } /** * An SEC EDGAR filing. */ export interface EdgarFiling { /** * The SEC accession number uniquely identifying this filing (e.g. * '0000320193-23-000077'). */ accession_number: string; /** * The grant or issue date, for Orders or Notices. */ action_date: string | null; /** * Whether this filing is a correction to a prior filing. */ correction: boolean; /** * The date associated with the filing's change, if applicable. */ date_as_of_change: string | null; /** * Whether this filing is a deletion. */ deletion: boolean; /** * The depositor file number for ABS-related filings. */ depositor_file_number: string | null; /** * The date the filing was submitted to the SEC. */ filing_date: string; /** * The filing form type as submitted (e.g. '10-K', '10-Q/A'). */ form: string; /** * Whether this filing is an amendment to a prior filing. */ is_amendment: boolean; /** * The filing form type without amendment suffixes (e.g. '10-K' for both '10-K' and * '10-K/A'). */ normalized_form: string; /** * The end date of the reporting period covered by this filing. */ period_of_report_end: string | null; /** * The received date, for Orders or Notices. */ received_date: string | null; /** * The file number identifying an asset-backed security (ABS) filing. */ securitizer_file_number: string | null; /** * The dissemination timestamp for post-acceptance corrections. */ timestamp: string | null; } /** * An SEC filing with its documents and related entities. */ export interface EdgarFilingFull extends EdgarFiling { /** * All documents contained in this filing. */ documents: Array; /** * Entities associated with this filing and their relationship types (e.g. filer, * reporting owner). */ entity_relationships: Array; } export namespace EdgarFilingFull { /** * An entity paired with its relationship to a specific filing. */ export interface EntityRelationship { /** * The entity metadata. */ entity: CompanyAPI.EdgarEntityResource; /** * The entity-filing relationship record, including the entity's CIK and its role. */ relationship: EntityRelationship.Relationship; } export namespace EntityRelationship { /** * The entity-filing relationship record, including the entity's CIK and its role. */ export interface Relationship { /** * The accession number of the related filing. */ accession_number: string; /** * The CIK of the related entity. */ entity_cik: string; /** * The type of relationship between the entity and the filing. */ relationship: EdgarAPI.EntityFilingRelationship; } } } Filing.Document = Document; export declare namespace Filing { export { type EdgarDocument as EdgarDocument, type EdgarFiling as EdgarFiling, type EdgarFilingFull as EdgarFilingFull, }; export { Document as Document, type DocumentRetrieveResponse as DocumentRetrieveResponse, type DocumentGetTextResponse as DocumentGetTextResponse, type DocumentRetrieveParams as DocumentRetrieveParams, type DocumentDownloadPdfParams as DocumentDownloadPdfParams, type DocumentGetTextParams as DocumentGetTextParams, }; }