earningscall
Version:
The EarningsCall JavaScript library provides convenient access to the EarningsCall API. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses.
83 lines • 3.93 kB
TypeScript
import { CompanyInfo, DownloadAudioFileOptions, DownloadAudioFileResponse, GetCompanyOptions, GetTranscriptFromEventOptions, GetTranscriptOptions } from '../types/company';
import { EarningsEvent } from '../types/event';
import { BasicTranscript, SpeakerGroups, WordLevelTimestampsTranscript, QuestionAndAnswersTranscript } from '../types/transcript';
export declare class Company {
readonly companyInfo: CompanyInfo;
readonly name?: string;
private events_?;
constructor(companyInfo: CompanyInfo);
toString(): string;
/**
* Get the events for the company. Useful for getting the earnings events for a company.
*
* @returns A promise that resolves to an array of EarningsEvent objects.
*/
private getEvents;
events(): Promise<EarningsEvent[]>;
validateTranscriptOptions(options: GetTranscriptOptions): void;
getOptions(options: GetTranscriptOptions | GetTranscriptFromEventOptions): GetTranscriptOptions;
/**
* Retrieve a single transcript for this company. This is the basic transcript with no speaker groups.
*
* @param options - The options for getting a transcript.
* @returns A promise that resolves to a Transcript object or undefined if not found.
*/
getBasicTranscript(options: GetTranscriptOptions | GetTranscriptFromEventOptions): Promise<BasicTranscript | undefined>;
handleEnhancedTranscriptDataError(error: unknown): void;
/**
* Retrieve a single transcript for this company with speaker groups.
*
* Requires an Enhanced Transcript Data plan.
*
* @param options - The options for getting a transcript.
* @returns A promise that resolves to a Transcript object or undefined if not found.
*/
getSpeakerGroups(options: GetTranscriptOptions | GetTranscriptFromEventOptions): Promise<SpeakerGroups | undefined>;
/**
* Retrieve a single transcript for this company with word level timestamps.
*
* Requires an Enhanced Transcript Data plan.
*
* @param options - The options for getting a transcript.
* @returns A promise that resolves to a TranscriptV3 object or undefined if not found.
*/
getWordLevelTimestamps(options: GetTranscriptOptions | GetTranscriptFromEventOptions): Promise<WordLevelTimestampsTranscript | undefined>;
/**
* Retrieve a single transcript for this company with question and answer transcripts.
*
* Requires an Enhanced Transcript Data plan.
*
* @param options - The options for getting a transcript.
* @returns A promise that resolves to a TranscriptV4 object or undefined if not found.
*/
getQuestionAndAnswerTranscript(options: GetTranscriptOptions | GetTranscriptFromEventOptions): Promise<QuestionAndAnswersTranscript | undefined>;
/**
* Downloads a single audio file for this company to disk.
*
* @param options - The options for getting an audio file.
* @returns A promise that resolves to a GetAudioFileResponse object.
*/
downloadAudioFile(options: DownloadAudioFileOptions): Promise<DownloadAudioFileResponse | undefined>;
}
/**
* Get a company by symbol and optionally, exchange.
*
* @param options - The options for getting a company.
* @returns A promise that resolves to a Company object.
*/
export declare function getCompany(options: GetCompanyOptions): Promise<Company>;
export declare function lookupCompany(options: GetCompanyOptions): Promise<CompanyInfo | undefined>;
export declare function getAllCompaniesInfos(): Promise<CompanyInfo[]>;
/**
* Get all companies.
*
* @returns A promise that resolves to an array of Company objects.
*/
export declare function getAllCompanies(): Promise<Company[]>;
/**
* Get all S&P 500 companies.
*
* @returns A promise that resolves to an array of Company objects.
*/
export declare function getSP500Companies(): Promise<Company[]>;
//# sourceMappingURL=company.d.ts.map