import mapping from "./openfigi/mapping.js"; import search from "./openfigi/search.js"; import filter from "./openfigi/filter.js"; export { filter, mapping, search }; export * from "./openfigi/mapping.js"; export * from "./openfigi/search.js"; export * from "./openfigi/filter.js"; interface OpenFIGIOptions { apiKey?: string; } /** * Creates a new OpenFIGI client. * * @param apiKey Optional API key. If not provided, will look for `OPENFIGI_API_KEY` environment variable. * If not found, will proceed without an API key (with lower limits). * * @example * ```ts * import OpenFIGI from "https://jsr.io/@gadicc/openfigi"; * const openfigi = new OpenFIGI(); // or with an API key * * console.log(await openfigi.mapping({ idType: "ID_ISIN", idValue: "US0378331005" })); * ``` * * @see https://www.openfigi.com/api/documentation#api-key * @see https://www.openfigi.com/api/documentation#rate-limits */ export default class OpenFIGI { baseUrl: string; apiKey: string | undefined | null; constructor(); constructor(apiKey?: string); constructor(options?: OpenFIGIOptions); /** See {@linkcode mapping} */ mapping: typeof mapping; /** See {@linkcode search} */ search: typeof search; /** See {@linkcode filter} */ filter: typeof filter; /** * Internal fetch wrapper for common code used by modules, i.e. * attach API key, set content-type, basic error checking, etc. * * @param endpoint API endpoint, e.g. `/mapping` * @param opts Fetch options * @returns Fetch Response * @throws Error if response is not ok (status not in 200-299 range) */ _fetch(endpoint: string, opts?: { method?: "GET" | "POST"; body?: Record; params?: Record; fetchOptions?: Partial; }): Promise; } //# sourceMappingURL=openfigi.d.ts.map