UNPKG

sec-edgar-toolkit

Version:

Open source toolkit to facilitate working with the SEC EDGAR database

63 lines 2 kB
/** * SEC Filing Item Extractor * * Extracts individual items from SEC filings (10-K, 10-Q, 8-K, etc.) * based on standard item numbering and structure. */ export declare enum FormType { FORM_10K = "10-K", FORM_10Q = "10-Q", FORM_8K = "8-K", FORM_20F = "20-F", FORM_40F = "40-F" } export interface ItemDefinition { number: string; title: string; aliases?: string[]; required?: boolean; } export interface ExtractedItem { itemNumber: string; title: string; content: string; startPosition: number; endPosition: number; } export declare class ItemExtractor { private static readonly FORM_10K_ITEMS; private static readonly FORM_10Q_ITEMS; private static readonly FORM_8K_ITEMS; private readonly formItems; constructor(); /** * Extract all items from a filing * @param content The filing content (HTML or text) * @param formType The type of form (e.g., "10-K", "10-Q", "8-K") * @returns Dictionary mapping item numbers to their content */ extractItems(content: string, formType: string | FormType): Record<string, string>; /** * Extract specific items from a filing * @param content The filing content * @param formType The type of form * @param itemNumbers List of item numbers to extract * @returns Dictionary with only the requested items */ extractSpecificItems(content: string, formType: string | FormType, itemNumbers: string[]): Record<string, string>; /** * Get item definitions for a specific form type * @param formType The form type * @returns List of item definitions */ getItemDefinitions(formType: string | FormType): ItemDefinition[]; private parseFormType; private cleanContent; private extractTableOfContents; private extractItemsFromContent; private isInToc; private findItemEnd; private postProcessItems; private escapeRegex; } //# sourceMappingURL=item-extractor.d.ts.map