sec-edgar-toolkit
Version:
Open source toolkit to facilitate working with the SEC EDGAR database
87 lines • 2.93 kB
TypeScript
/**
* Parser for SEC ownership forms (Form 3, 4, and 5) XML documents.
*
* These forms contain information about insider transactions and holdings
* by officers, directors, and significant shareholders.
*
* Form 3: Initial statement of beneficial ownership
* Form 4: Changes in beneficial ownership
* Form 5: Annual statement of changes in beneficial ownership
*/
import { DocumentInfo, IssuerInfo, ReportingOwnerInfo, NonDerivativeTransaction, NonDerivativeHolding, DerivativeTransaction, ParsedOwnershipForm, OwnershipFormParseError } from '../types/ownership-forms';
export { OwnershipFormParseError };
export declare class OwnershipFormParser {
private xmlContent;
private root;
readonly formType: string;
/**
* Initialize the ownership form parser.
* @param xmlContent Raw XML content of the form
* @throws OwnershipFormParseError If XML parsing fails
*/
constructor(xmlContent: string | Buffer);
/**
* Extract the form type from the XML document.
*/
private extractFormType;
/**
* Find a nested value in the XML structure
*/
private findNestedValue;
/**
* Safely extract text from an XML element.
*/
private getText;
/**
* Safely extract float value from an XML element.
*/
private getFloat;
/**
* Extract date from XML element and convert to Date object.
*/
private getDate;
/**
* Parse document-level information from the form.
*/
parseDocumentInfo(): DocumentInfo;
/**
* Parse information about the issuer (company) from the form.
*/
parseIssuerInfo(): IssuerInfo;
/**
* Parse information about the reporting owner (insider) from the form.
*/
parseReportingOwnerInfo(): ReportingOwnerInfo;
/**
* Parse non-derivative transactions from the form.
*/
parseNonDerivativeTransactions(): NonDerivativeTransaction[];
/**
* Parse non-derivative holdings from the form.
*/
parseNonDerivativeHoldings(): NonDerivativeHolding[];
/**
* Parse derivative transactions (options, warrants, etc.) from the form.
*/
parseDerivativeTransactions(): DerivativeTransaction[];
/**
* Parse all information from the ownership form.
*/
parseAll(): ParsedOwnershipForm;
}
/**
* Specialized parser for Form 4 (Changes in Beneficial Ownership).
* Form 4 must be filed within 2 business days of a transaction.
*/
export declare class Form4Parser extends OwnershipFormParser {
constructor(xmlContent: string | Buffer);
}
/**
* Specialized parser for Form 5 (Annual Statement of Changes in Beneficial Ownership).
* Form 5 is filed annually and reports transactions that were exempt from
* Form 4 reporting requirements.
*/
export declare class Form5Parser extends OwnershipFormParser {
constructor(xmlContent: string | Buffer);
}
//# sourceMappingURL=ownership-forms.d.ts.map