UNPKG

@fin.cx/opendata

Version:

A comprehensive TypeScript library for accessing business data and real-time financial information. Features include German company data management with MongoDB integration, JSONL bulk processing, automated Handelsregister interactions, and real-time stoc

53 lines (52 loc) 1.83 kB
import * as plugins from '../plugins.js'; import { LawRecord } from './classes.lawrecord.js'; import type { ILawLookupRequest, ILawSearchRequest, ILawServiceConfig, ILawSyncRequest, ILawSyncResult } from './interfaces.law.js'; export declare class LawService { db: plugins.smartdata.SmartdataDb; CLawRecord: typeof LawRecord; private localSmartDb?; private smartBrowser?; private browserStarted; private started; private config; constructor(configArg?: ILawServiceConfig); start(): Promise<void>; stop(): Promise<void>; syncLaw(requestArg: ILawLookupRequest): Promise<LawRecord>; getLaw(requestArg: ILawLookupRequest): Promise<LawRecord | null>; searchLaws(requestArg: ILawSearchRequest): Promise<LawRecord[]>; syncLaws(requestArg: ILawSyncRequest): Promise<ILawSyncResult>; private ensureStarted; private ensureBrowser; private createLookupKey; private normalizeIdentifierForLookup; private getLawByLookupKey; private upsertLaw; private syncGermanyLaws; private syncGermanyLaw; private parseGermanyToc; private normalizeGermanySlug; private syncEuLaws; private syncEuLaw; private fetchEuLawPageContent; private fetchEuMetadataPage; private fetchEuMetadataByCelex; private fetchEuMetadataFromQuery; private syncUsLaws; private syncUsLaw; private syncUsCodeCitation; private trySyncUsLawFromPublicContent; private parseUsCodeCitation; private buildGovInfoCollectionUrl; private withGovInfoApiKey; private fetchText; private fetchJson; private extractTagValue; private extractTagValues; private extractFirstMatch; private extractUsLiiHeading; private markupToText; private decodeHtmlEntities; private escapeRegex; private firstMeaningfulLine; }