import { AxiosInstance, AxiosResponse } from 'axios'; import apiEndpoints from '../data/apiEndpoints.json'; import { Company, FloorSheet, Headers, LiveMarketData, MarketDepth, MarketStatus, MarketSummary, NepseIndex, Security, TopTenItem } from '../types'; import { DummyIDManager } from '../utils/DummyIDManager'; import { TokenManager } from '../utils/TokenManager'; /** * Base class for Nepse API */ export declare abstract class BaseNepse { protected tokenManager: TokenManager; protected dummyIdManager: DummyIDManager; protected tlsVerify: boolean; protected companySymbolIdKeymap: Map | null; protected securitySymbolIdKeymap: Map | null; protected companyList: Company[] | null; protected securityList: Security[] | null; protected sectorScrips: Record | null; protected floorSheetSize: number; protected baseUrl: string; protected apiEndpoints: typeof apiEndpoints; protected headers: Headers; protected client: AxiosInstance; constructor(); /** * Set the TLS verification * @param verify - Whether to verify the TLS certificate */ setTLSVerification(verify: boolean): void; /** * Initialize the client */ protected initClient(): void; /** * Get the full URL * @param apiUrl - The API URL * @returns The full URL */ protected getFullUrl(apiUrl: string): string; /** * Get the authorization headers * @param accessToken - The access token * @returns The authorization headers */ protected getAuthorizationHeaders(accessToken: string): Record; /** * Handle the response * @param response - The response * @returns The response data */ protected handleResponse(response: AxiosResponse): TResponse; /** * Request a GET API * @param url - The URL * @param includeAuth - Whether to include the authorization headers * @returns The response data */ requestGETAPI(url: string, includeAuth?: boolean): Promise; /** * Request a POST API * @param url - The URL * @param payload - The payload * @param includeAuth - Whether to include the authorization headers * @returns The response data */ requestPOSTAPI(url: string, payload: Record, includeAuth?: boolean): Promise; /** * Get the company ID keymap * @returns The company ID keymap */ getCompanyIdKeymap(): Promise>; /** * Get the security symbol ID keymap * @returns The security symbol ID keymap */ getSecuritySymbolIdKeymap(force?: boolean): Promise>; /** * Get the security ID keymap * @returns The security ID keymap */ getSecurityIdKeymap(force?: boolean): Promise>; /** * Abstract methods to be implemented by child classes */ abstract getMarketStatus(): Promise; abstract getCompanyList(force?: boolean): Promise; abstract getSecurityList(force?: boolean): Promise; abstract getMarketSummary(): Promise; abstract getNepseIndex(): Promise; abstract getTopTenGainers(): Promise; abstract getTopTenLosers(): Promise; abstract getFloorSheet(options?: { page?: number; size?: number; }): Promise; abstract getLiveMarket(): Promise; abstract getMarketDepth(symbol: string): Promise; } //# sourceMappingURL=BaseNepse.d.ts.map