@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
135 lines (134 loc) • 4.69 kB
TypeScript
import type { BusinessRecord } from './classes.businessrecord.js';
import type { OpenData } from './classes.main.opendata.js';
import * as plugins from './plugins.js';
/**
* the HandlesRegister exposed as a class
*/
export declare class HandelsRegister {
private openDataRef;
private asyncExecutionStack;
private downloadDir;
private uniqueDowloadFolder;
smartbrowserInstance: plugins.smartbrowser.SmartBrowser;
constructor(openDataRef: OpenData, downloadDirArg: string);
private resetDownloadFolder;
private waitForDownloadedFile;
start(): Promise<void>;
stop(): Promise<void>;
/**
* Creates a new page and configures it to allow file downloads
* to a predefined path.
*/
getNewPage: () => Promise<plugins.smartbrowser.smartpuppeteer.puppeteer.Page>;
private navigateToPage;
private waitForResults;
private clickFindButton;
private downloadFile;
/**
* Helper method to parse the German registration string
*/
private parseGermanRegistration;
/**
* Search for a company by name and return basic info
*/
searchCompany(companyNameArg: string, resultsLimitArg?: number): Promise<{
name?: string;
startDate?: string;
endDate?: string;
status?: "active" | "liquidating" | "closed";
address?: string;
postalCode?: string;
city?: string;
country?: string;
phone?: string;
fax?: string;
email?: string;
website?: string;
businessType?: string;
registrationId?: string;
germanParsedRegistration?: {
court?: string;
type?: "HRA" | "HRB" | "GnR" | "PR" | "VR" | "GsR";
number?: string;
};
legalForm?: "GmbH" | "GmbH & Co. KG" | "AG" | "LLC" | "LLP" | "GmbH & Co. KGaA" | "GmbH & Co. KGaA, LLC";
managingDirectors?: string[];
boardOfDirectors?: string[];
supervisoryBoard?: string[];
foundingDate?: string;
capital?: string;
purpose?: string;
lastUpdate?: string;
}[]>;
/**
* Search for a specific company (known register type/number/court),
* then click on an element that triggers a file download.
*/
getSpecificCompany(companyArg: BusinessRecord['data']['germanParsedRegistration']): Promise<{
businessRecords: {
name?: string;
startDate?: string;
endDate?: string;
status?: "active" | "liquidating" | "closed";
address?: string;
postalCode?: string;
city?: string;
country?: string;
phone?: string;
fax?: string;
email?: string;
website?: string;
businessType?: string;
registrationId?: string;
germanParsedRegistration?: {
court?: string;
type?: "HRA" | "HRB" | "GnR" | "PR" | "VR" | "GsR";
number?: string;
};
legalForm?: "GmbH" | "GmbH & Co. KG" | "AG" | "LLC" | "LLP" | "GmbH & Co. KGaA" | "GmbH & Co. KGaA, LLC";
managingDirectors?: string[];
boardOfDirectors?: string[];
supervisoryBoard?: string[];
foundingDate?: string;
capital?: string;
purpose?: string;
lastUpdate?: string;
}[];
files: plugins.smartfile.SmartFile[];
}>;
/**
* get specific company by full name
*/
getSpecificCompanyByName(companyNameArg: string): Promise<{
businessRecords: {
name?: string;
startDate?: string;
endDate?: string;
status?: "active" | "liquidating" | "closed";
address?: string;
postalCode?: string;
city?: string;
country?: string;
phone?: string;
fax?: string;
email?: string;
website?: string;
businessType?: string;
registrationId?: string;
germanParsedRegistration?: {
court?: string;
type?: "HRA" | "HRB" | "GnR" | "PR" | "VR" | "GsR";
number?: string;
};
legalForm?: "GmbH" | "GmbH & Co. KG" | "AG" | "LLC" | "LLP" | "GmbH & Co. KGaA" | "GmbH & Co. KGaA, LLC";
managingDirectors?: string[];
boardOfDirectors?: string[];
supervisoryBoard?: string[];
foundingDate?: string;
capital?: string;
purpose?: string;
lastUpdate?: string;
}[];
files: plugins.smartfile.SmartFile[];
}>;
}