cry-bizisi-parser 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { BizisiScraper } from "./bizisi.js";
2
+ // types: import from "cry-bizisi-parser/src/types.js" if needed
package/src/types.ts ADDED
@@ -0,0 +1,71 @@
1
+ /** A single search result from bizi.si */
2
+ export interface CompanySearchResult {
3
+ name: string;
4
+ /** Relative URL path like /SPELA-VODLAN-S-P/ */
5
+ url: string;
6
+ address: string;
7
+ city: string;
8
+ registrationNumber: string;
9
+ taxNumber: string;
10
+ activity: string;
11
+ /** Average employee count (e.g. "3 ali 4" → 3.5) */
12
+ employees: number;
13
+ }
14
+
15
+ /** Key people groups on the company page */
16
+ export interface KeyPeople {
17
+ nadzorniki: string[];
18
+ ustanovitelji: string[];
19
+ zastopniki: string[];
20
+ }
21
+
22
+ /** A single bank account (TRR) */
23
+ export interface BankAccount {
24
+ iban: string;
25
+ status: "odprt" | "zaprt" | "blokiran";
26
+ openedDate: string | null;
27
+ bank: string | null;
28
+ }
29
+
30
+ /** Parsed company details from the main company page */
31
+ export interface CompanyDetail {
32
+ name: string;
33
+ fullAddress: string;
34
+ phone: string;
35
+ website: string;
36
+ email: string;
37
+ taxNumber: string;
38
+ registrationNumber: string;
39
+ vatPayer: boolean;
40
+ vatNumber: string;
41
+ skis: string;
42
+ dateOfEntry: string;
43
+ activity: string;
44
+ keyPeople: KeyPeople;
45
+ bankAccounts: BankAccount[];
46
+ /** Sum of "financiranje iz proračuna" per year */
47
+ financingFromBudget: Record<number, number>;
48
+ }
49
+
50
+ /** Financial data for a single year */
51
+ export interface FinancialData {
52
+ year: number;
53
+ netSalesRevenue: number | null;
54
+ operatingResult: number | null;
55
+ }
56
+
57
+ /** Complete scrape result for one company */
58
+ export interface ScrapeResult {
59
+ company: CompanyDetail;
60
+ financialData: FinancialData[];
61
+ }
62
+
63
+ /** Options for the scrape/search operation */
64
+ export interface ScraperOptions {
65
+ /** Search query (company name, tax number, or registration number) */
66
+ query: string;
67
+ /** Max results to process. 0 = all */
68
+ maxResults?: number;
69
+ /** Whether to also fetch financial data */
70
+ includeFinancialData?: boolean;
71
+ }