sec-edgar-api
Version:
Fetch and parse SEC earnings reports and other filings. Useful for financial analysis.
20 lines (19 loc) • 1.01 kB
TypeScript
import { XbrlLinkbase } from '../types/xbrl.type';
export declare function getLabelsByTypeByTaxonomy(labelLinkbase: XbrlLinkbase): Record<string, Record<string, string>>;
/**
* The primary label based on priority: verboseLabel > terseLabel > label > periodEndLabel > first available label (excluding periodStartLabel)
*
* @param labelsByType The result of getLabelsByTypeByTaxonomy[key]
*/
export declare function getPrimaryLabel(labelsByType: Record<string, string>): string;
/**
* The primary documentation based on priority: documentation > longest available label
*
* @param labelsByType The result of getLabelsByTypeByTaxonomy[key]
*/
export declare function getPrimaryDocumentation(labelsByType: Record<string, string>): string;
/**
* Gets labels by taxonomy from the label linkbase. priority level: verboseLabel > terseLabel > label.
*/
export declare function getLabelByTaxonomy(labelLinkbase: XbrlLinkbase): Record<string, string>;
export declare function getTaxonomyFromId(id: string): string;