@omnizoek/sdk 0.1.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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/errors.ts","../src/client.ts","../src/geo.ts","../src/finance.ts","../src/compliance.ts","../src/hr.ts","../src/realEstate.ts","../src/logistics.ts","../src/energy.ts","../src/webhooks.ts","../src/OmniClient.ts","../src/index.ts"],"names":["OmniAuthError","OmniError","OmniNetworkError","OmniNotFoundError","OmniRateLimitError","OmniUpstreamError","OmniValidationError"],"mappings":";;;;;;;;;;;;;AAAA,IAAA,cAAA,GAAA,EAAA;AAAA,QAAA,CAAA,cAAA,EAAA;AAAA,EAAA,aAAA,EAAA,MAAAA,qBAAA;AAAA,EAAA,SAAA,EAAA,MAAAC,iBAAA;AAAA,EAAA,gBAAA,EAAA,MAAAC,wBAAA;AAAA,EAAA,iBAAA,EAAA,MAAAC,yBAAA;AAAA,EAAA,kBAAA,EAAA,MAAAC,0BAAA;AAAA,EAAA,iBAAA,EAAA,MAAAC,yBAAA;AAAA,EAAA,mBAAA,EAAA,MAAAC;AAAA,CAAA,CAAA;AAIaL,0BAAA,CAAA,CAaAD,8BAAA,CAAA,CAQAG,kCAAA,CAAA,CAQAG,oCAAA,CAAA,CAQAF,qCAaAC,kCAAA,CAAA,CAQAH;AA9Db,IAAA,WAAA,GAAA,KAAA,CAAA;AAAA,EAAA,eAAA,GAAA;AAIO,IAAMD,iBAAA,GAAN,cAAwB,KAAA,CAAM;AAAA,MACnC,WAAA,CACE,OAAA,EACgB,MAAA,EACA,IAAA,EACA,MAAA,EAChB;AACA,QAAA,KAAA,CAAM,OAAO,CAAA;AAJG,QAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AACA,QAAA,IAAA,CAAA,IAAA,GAAA,IAAA;AACA,QAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAGhB,QAAA,IAAA,CAAK,IAAA,GAAO,WAAA;AAAA,MACd;A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I,CAAA;AACzC,IAAA,IAAA,CAAK,MAAA,GAAS,IAAI,YAAA,CAAa,IAAI,CAAA;AACnC,IAAA,IAAA,CAAK,QAAA,GAAW,IAAI,cAAA,CAAe,IAAI,CAAA;AAAA,EACzC;AACF;;;ACjDA,WAAA,EAAA","file":"index.cjs","sourcesContent":["/**\n * errors.ts — Typed error classes for the OmniZoek SDK.\n */\n\nexport class OmniError extends Error {\n constructor(\n message: string,\n public readonly status: number,\n public readonly code: string,\n public readonly detail: string,\n ) {\n super(message);\n this.name = \"OmniError\";\n }\n}\n\n/** 401 — API key missing or invalid. */\nexport class OmniAuthError extends OmniError {\n constructor(detail: string) {\n super(`Authentication failed: ${detail}`, 401, \"auth_error\", detail);\n this.name = \"OmniAuthError\";\n }\n}\n\n/** 404 — Requested resource not found (address, label, etc.). */\nexport class OmniNotFoundError extends OmniError {\n constructor(detail: string) {\n super(`Not found: ${detail}`, 404, \"not_found\", detail);\n this.name = \"OmniNotFoundError\";\n }\n}\n\n/** 422 — Request parameters failed validation. */\nexport class OmniValidationError extends OmniError {\n constructor(detail: string) {\n super(`Validation error: ${detail}`, 422, \"validation_error\", detail);\n this.name = \"OmniValidationError\";\n }\n}\n\n/** 429 — Rate limit exceeded. Retried automatically by the client. */\nexport class OmniRateLimitError extends OmniError {\n constructor(public readonly retryAfterMs: number) {\n super(\n `Rate limit exceeded. Retry after ${retryAfterMs}ms.`,\n 429,\n \"rate_limit\",\n `Retry after ${retryAfterMs}ms`,\n );\n this.name = \"OmniRateLimitError\";\n }\n}\n\n/** 503 — Upstream data source unavailable (BAG, EP-Online, RDW, etc.). */\nexport class OmniUpstreamError extends OmniError {\n constructor(detail: string) {\n super(`Upstream error: ${detail}`, 503, \"upstream_error\", detail);\n this.name = \"OmniUpstreamError\";\n }\n}\n\n/** Network-level failure (DNS, timeout, no internet). */\nexport class OmniNetworkError extends Error {\n readonly cause?: Error;\n\n constructor(cause: unknown) {\n super(`Network error: ${cause instanceof Error ? cause.message : String(cause)}`);\n this.name = \"OmniNetworkError\";\n if (cause instanceof Error) this.cause = cause;\n }\n}\n","/**\n * client.ts — Core HTTP client with automatic retry and error mapping.\n */\n\nimport {\n OmniAuthError,\n OmniNetworkError,\n OmniNotFoundError,\n OmniRateLimitError,\n OmniUpstreamError,\n OmniValidationError,\n} from \"./errors.js\";\n\nexport interface OmniClientOptions {\n /** Your OmniZoek API key (omni_live_… or omni_test_…) */\n apiKey: string;\n /** Override the base URL — useful for testing. Default: https://api.omnizoek.nl */\n baseUrl?: string;\n /** Max retries on 429 rate-limit responses. Default: 3 */\n maxRetries?: number;\n /** Base delay in ms for exponential backoff. Default: 500 */\n retryDelayMs?: number;\n /** Request timeout in ms. Default: 20000 */\n timeoutMs?: number;\n}\n\nconst DEFAULT_BASE_URL = \"https://api.omnizoek.nl\";\nconst DEFAULT_MAX_RETRIES = 3;\nconst DEFAULT_RETRY_DELAY_MS = 500;\nconst DEFAULT_TIMEOUT_MS = 20_000;\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nexport class HttpClient {\n private readonly apiKey: string;\n private readonly baseUrl: string;\n private readonly maxRetries: number;\n private readonly retryDelayMs: number;\n private readonly timeoutMs: number;\n\n constructor(options: OmniClientOptions) {\n this.apiKey = options.apiKey;\n this.baseUrl = (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\\/$/, \"\");\n this.maxRetries = options.maxRetries ?? DEFAULT_MAX_RETRIES;\n this.retryDelayMs = options.retryDelayMs ?? DEFAULT_RETRY_DELAY_MS;\n this.timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;\n }\n\n async get<T>(path: string, params?: Record<string, string | number | boolean | undefined>): Promise<T> {\n const url = new URL(this.baseUrl + path);\n\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n let attempt = 0;\n\n while (true) {\n let response: Response;\n\n try {\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), this.timeoutMs);\n\n response = await fetch(url.toString(), {\n method: \"GET\",\n headers: {\n \"X-API-Key\": this.apiKey,\n \"Accept\": \"application/json\",\n \"User-Agent\": \"@omnizoek/sdk/0.1.0\",\n },\n signal: controller.signal,\n });\n\n clearTimeout(timeoutId);\n } catch (err) {\n throw new OmniNetworkError(err);\n }\n\n // 429 — retry with exponential backoff\n if (response.status === 429 && attempt < this.maxRetries) {\n const retryAfter = Number(response.headers.get(\"Retry-After\") ?? 0);\n const delay = retryAfter > 0\n ? retryAfter * 1000\n : this.retryDelayMs * Math.pow(2, attempt);\n\n attempt++;\n await sleep(delay);\n continue;\n }\n\n if (!response.ok) {\n await this._throwFromResponse(response);\n }\n\n return response.json() as Promise<T>;\n }\n }\n\n async post<T>(path: string, body?: unknown): Promise<T> {\n let response: Response;\n\n try {\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), this.timeoutMs);\n\n response = await fetch(this.baseUrl + path, {\n method: \"POST\",\n headers: {\n \"X-API-Key\": this.apiKey,\n \"Accept\": \"application/json\",\n \"Content-Type\": \"application/json\",\n \"User-Agent\": \"@omnizoek/sdk/0.1.0\",\n },\n body: body !== undefined ? JSON.stringify(body) : undefined,\n signal: controller.signal,\n });\n\n clearTimeout(timeoutId);\n } catch (err) {\n throw new OmniNetworkError(err);\n }\n\n if (!response.ok) {\n await this._throwFromResponse(response);\n }\n\n return response.json() as Promise<T>;\n }\n\n async delete(path: string): Promise<void> {\n let response: Response;\n\n try {\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), this.timeoutMs);\n\n response = await fetch(this.baseUrl + path, {\n method: \"DELETE\",\n headers: {\n \"X-API-Key\": this.apiKey,\n \"User-Agent\": \"@omnizoek/sdk/0.1.0\",\n },\n signal: controller.signal,\n });\n\n clearTimeout(timeoutId);\n } catch (err) {\n throw new OmniNetworkError(err);\n }\n\n if (!response.ok) {\n await this._throwFromResponse(response);\n }\n }\n\n private async _throwFromResponse(response: Response): Promise<never> {\n let detail = response.statusText;\n try {\n const body = await response.json() as { detail?: string; error?: string };\n detail = body.detail ?? body.error ?? detail;\n } catch {\n // non-JSON body\n }\n\n switch (response.status) {\n case 401: throw new OmniAuthError(detail);\n case 404: throw new OmniNotFoundError(detail);\n case 422: throw new OmniValidationError(detail);\n case 429: throw new OmniRateLimitError(0);\n case 503: throw new OmniUpstreamError(detail);\n default: {\n const { OmniError } = await import(\"./errors.js\");\n throw new OmniError(\n `API error ${response.status}: ${detail}`,\n response.status,\n \"api_error\",\n detail,\n );\n }\n }\n }\n}\n","import type { HttpClient } from \"./client.js\";\nimport type { AddressEnrichParams, AddressEnrichResponse } from \"./types.js\";\n\nexport class GeoModule {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Enrich a Dutch address with BAG data, coordinates, neighbourhood\n * statistics, energy labels and more.\n *\n * @example\n * const result = await omni.geo.enrichAddress({ postcode: \"1012LG\", houseNumber: 1 });\n */\n async enrichAddress(params: AddressEnrichParams): Promise<AddressEnrichResponse> {\n return this.http.get<AddressEnrichResponse>(\"/v1/geo/enrich-address\", {\n postcode: params.postcode,\n house_number: params.houseNumber,\n });\n }\n}\n","import type { HttpClient } from \"./client.js\";\nimport type {\n IbanToBicParams,\n IbanToBicResponse,\n VatVerifyParams,\n VatVerifyResponse,\n} from \"./types.js\";\n\nexport class FinanceModule {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Resolve an IBAN to its BIC/SWIFT code and bank name.\n *\n * @example\n * const result = await omni.finance.ibanToBic({ iban: \"NL91ABNA0417164300\" });\n */\n async ibanToBic(params: IbanToBicParams): Promise<IbanToBicResponse> {\n return this.http.get<IbanToBicResponse>(\"/v1/finance/iban-to-bic\", {\n iban: params.iban,\n });\n }\n\n /**\n * Verify a Dutch BTW (VAT) number via the EU VIES service and return\n * company metadata.\n *\n * @example\n * const result = await omni.finance.vatVerify({ vatNumber: \"NL123456782B01\" });\n */\n async vatVerify(params: VatVerifyParams): Promise<VatVerifyResponse> {\n return this.http.get<VatVerifyResponse>(\"/v1/finance/vat-verify\", {\n vat_number: params.vatNumber,\n });\n }\n}\n","import type { HttpClient } from \"./client.js\";\nimport type { ValidateFinanceParams, FinanceValidationResponse } from \"./types.js\";\n\nexport class ComplianceModule {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Validate a Dutch BSN or IBAN number using checksum algorithms.\n *\n * @example\n * const result = await omni.compliance.validateFinance({ type: \"iban\", number: \"NL91ABNA0417164300\" });\n */\n async validateFinance(params: ValidateFinanceParams): Promise<FinanceValidationResponse> {\n return this.http.get<FinanceValidationResponse>(\"/v1/compliance/validate-finance\", {\n type: params.type,\n number: params.number,\n });\n }\n}\n","import type { HttpClient } from \"./client.js\";\nimport type {\n MinimumWageParams,\n MinimumWageResponse,\n HolidaySurchargeParams,\n HolidaySurchargeResponse,\n} from \"./types.js\";\n\nexport class HrModule {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Look up the current Dutch statutory minimum wage for a given age.\n *\n * @example\n * const result = await omni.hr.minimumWage({ age: 21 });\n */\n async minimumWage(params: MinimumWageParams): Promise<MinimumWageResponse> {\n return this.http.get<MinimumWageResponse>(\"/v1/hr/minimum-wage\", {\n age: params.age,\n });\n }\n\n /**\n * Check whether a given date is a public holiday (and get the applicable\n * surcharge multiplier for a given industry).\n *\n * @example\n * const result = await omni.hr.holidaySurcharge({ date: \"2024-12-25\", industry: \"retail\" });\n */\n async holidaySurcharge(params: HolidaySurchargeParams): Promise<HolidaySurchargeResponse> {\n return this.http.get<HolidaySurchargeResponse>(\"/v1/hr/holiday-surcharge\", {\n date: params.date,\n industry: params.industry,\n });\n }\n}\n","import type { HttpClient } from \"./client.js\";\nimport type { EnergyLabelParams, EnergyLabelResponse } from \"./types.js\";\n\nexport class RealEstateModule {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Retrieve the official EP-Online energy label for a Dutch address.\n *\n * @example\n * const result = await omni.realEstate.energyLabel({ postcode: \"1012LG\", houseNumber: 1 });\n */\n async energyLabel(params: EnergyLabelParams): Promise<EnergyLabelResponse> {\n return this.http.get<EnergyLabelResponse>(\"/v1/real-estate/energy-label\", {\n postcode: params.postcode,\n house_number: params.houseNumber,\n });\n }\n}\n","import type { HttpClient } from \"./client.js\";\nimport type {\n EmissionZoneParams,\n EmissionZoneResponse,\n TransitDisruptionsParams,\n TransitDisruptionsResponse,\n} from \"./types.js\";\n\nexport class LogisticsModule {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Check whether a vehicle (by Dutch licence plate / kenteken) is allowed\n * in a zero-emission zone (ZE-zone).\n *\n * @example\n * const result = await omni.logistics.emissionZone({ kenteken: \"AB123C\" });\n */\n async emissionZone(params: EmissionZoneParams): Promise<EmissionZoneResponse> {\n return this.http.get<EmissionZoneResponse>(\"/v1/logistics/emission-zone\", {\n kenteken: params.kenteken,\n });\n }\n\n /**\n * Retrieve current and upcoming NS train disruptions, optionally filtered\n * by station code.\n *\n * @example\n * const result = await omni.logistics.transitDisruptions({ stationCode: \"ASD\" });\n */\n async transitDisruptions(params?: TransitDisruptionsParams): Promise<TransitDisruptionsResponse> {\n return this.http.get<TransitDisruptionsResponse>(\"/v1/logistics/transit-disruptions\", {\n station_code: params?.stationCode,\n });\n }\n}\n","import type { HttpClient } from \"./client.js\";\nimport type { GridTriggerParams, GridTriggerResponse } from \"./types.js\";\n\nexport class EnergyModule {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Retrieve the current Dutch electricity grid congestion status for a\n * given postal code / province.\n *\n * @example\n * const result = await omni.energy.gridTrigger();\n * const result = await omni.energy.gridTrigger({ countryCode: \"NL\" });\n */\n async gridTrigger(params?: GridTriggerParams): Promise<GridTriggerResponse> {\n return this.http.get<GridTriggerResponse>(\"/v1/energy/grid-trigger\", {\n country_code: params?.countryCode,\n });\n }\n}\n","import type { HttpClient } from \"./client.js\";\nimport type {\n RegisterWebhookParams,\n WebhookCreatedResponse,\n WebhookListResponse,\n} from \"./types.js\";\n\nexport class WebhooksModule {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Register a new outbound webhook. OmniZoek will POST to `url` whenever\n * any of the specified `events` fire.\n *\n * @example\n * const wh = await omni.webhooks.register({\n * url: \"https://example.com/hook\",\n * events: [\"quota.warning\"],\n * });\n */\n async register(params: RegisterWebhookParams): Promise<WebhookCreatedResponse> {\n return this.http.post<WebhookCreatedResponse>(\"/v1/webhooks\", {\n url: params.url,\n events: params.events,\n });\n }\n\n /**\n * List all registered webhooks for this API key.\n *\n * @example\n * const { webhooks } = await omni.webhooks.list();\n */\n async list(): Promise<WebhookListResponse> {\n return this.http.get<WebhookListResponse>(\"/v1/webhooks\");\n }\n\n /**\n * Delete a webhook by its ID.\n *\n * @example\n * await omni.webhooks.delete(\"wh_abc123\");\n */\n async delete(webhookId: string): Promise<void> {\n return this.http.delete(`/v1/webhooks/${encodeURIComponent(webhookId)}`);\n }\n}\n","import { HttpClient, type OmniClientOptions } from \"./client.js\";\nimport { GeoModule } from \"./geo.js\";\nimport { FinanceModule } from \"./finance.js\";\nimport { ComplianceModule } from \"./compliance.js\";\nimport { HrModule } from \"./hr.js\";\nimport { RealEstateModule } from \"./realEstate.js\";\nimport { LogisticsModule } from \"./logistics.js\";\nimport { EnergyModule } from \"./energy.js\";\nimport { WebhooksModule } from \"./webhooks.js\";\n\nexport { type OmniClientOptions };\n\n/**\n * The main entry point for the OmniZoek SDK.\n *\n * @example\n * ```ts\n * import { OmniClient } from \"@omnizoek/sdk\";\n *\n * const omni = new OmniClient({ apiKey: \"omni_live_…\" });\n *\n * const address = await omni.geo.enrichAddress({ postcode: \"1012LG\", houseNumber: 1 });\n * const wage = await omni.hr.minimumWage({ age: 21 });\n * ```\n */\nexport class OmniClient {\n /** Geographic address enrichment (BAG, CBS, energy labels) */\n readonly geo: GeoModule;\n /** Financial utilities (IBAN → BIC, VAT verification) */\n readonly finance: FinanceModule;\n /** Compliance checks (financial institution registers) */\n readonly compliance: ComplianceModule;\n /** HR calculations (minimum wage, holiday surcharge) */\n readonly hr: HrModule;\n /** Real-estate data (EP-Online energy labels) */\n readonly realEstate: RealEstateModule;\n /** Logistics (ZE-zones, NS disruptions) */\n readonly logistics: LogisticsModule;\n /** Energy (grid congestion triggers) */\n readonly energy: EnergyModule;\n /** Outbound webhooks (register, list, delete) */\n readonly webhooks: WebhooksModule;\n\n constructor(options: OmniClientOptions) {\n const http = new HttpClient(options);\n this.geo = new GeoModule(http);\n this.finance = new FinanceModule(http);\n this.compliance = new ComplianceModule(http);\n this.hr = new HrModule(http);\n this.realEstate = new RealEstateModule(http);\n this.logistics = new LogisticsModule(http);\n this.energy = new EnergyModule(http);\n this.webhooks = new WebhooksModule(http);\n }\n}\n","// Main entry point\nexport { OmniClient } from \"./OmniClient.js\";\nexport type { OmniClientOptions } from \"./OmniClient.js\";\n\n// Typed error classes\nexport {\n OmniError,\n OmniAuthError,\n OmniNotFoundError,\n OmniValidationError,\n OmniRateLimitError,\n OmniUpstreamError,\n OmniNetworkError,\n} from \"./errors.js\";\n\n// All request/response types\nexport type {\n AddressEnrichParams,\n AddressEnrichResponse,\n IbanToBicParams,\n IbanToBicResponse,\n VatVerifyParams,\n VatVerifyResponse,\n ValidateFinanceParams,\n FinanceValidationResponse,\n MinimumWageParams,\n MinimumWageResponse,\n HolidaySurchargeParams,\n HolidaySurchargeResponse,\n EnergyLabelParams,\n EnergyLabelResponse,\n EmissionZoneParams,\n EmissionZoneResponse,\n TransitDisruptionsParams,\n TransitDisruptionsResponse,\n GridTriggerParams,\n GridTriggerResponse,\n RegisterWebhookParams,\n WebhookCreatedResponse,\n WebhookSummary,\n WebhookListResponse,\n} from \"./types.js\";\n"]}
@@ -0,0 +1,410 @@
1
+ /**
2
+ * client.ts — Core HTTP client with automatic retry and error mapping.
3
+ */
4
+ interface OmniClientOptions {
5
+ /** Your OmniZoek API key (omni_live_… or omni_test_…) */
6
+ apiKey: string;
7
+ /** Override the base URL — useful for testing. Default: https://api.omnizoek.nl */
8
+ baseUrl?: string;
9
+ /** Max retries on 429 rate-limit responses. Default: 3 */
10
+ maxRetries?: number;
11
+ /** Base delay in ms for exponential backoff. Default: 500 */
12
+ retryDelayMs?: number;
13
+ /** Request timeout in ms. Default: 20000 */
14
+ timeoutMs?: number;
15
+ }
16
+ declare class HttpClient {
17
+ private readonly apiKey;
18
+ private readonly baseUrl;
19
+ private readonly maxRetries;
20
+ private readonly retryDelayMs;
21
+ private readonly timeoutMs;
22
+ constructor(options: OmniClientOptions);
23
+ get<T>(path: string, params?: Record<string, string | number | boolean | undefined>): Promise<T>;
24
+ post<T>(path: string, body?: unknown): Promise<T>;
25
+ delete(path: string): Promise<void>;
26
+ private _throwFromResponse;
27
+ }
28
+
29
+ interface AddressEnrichParams {
30
+ postcode: string;
31
+ houseNumber: string;
32
+ /** Include EP-Online energy label (default: true) */
33
+ energy?: boolean;
34
+ }
35
+ interface AddressEnrichResponse {
36
+ street: string;
37
+ house_number: string;
38
+ house_letter: string | null;
39
+ house_addition: string | null;
40
+ postcode: string;
41
+ city: string;
42
+ municipality: string | null;
43
+ province: string | null;
44
+ lat: number | null;
45
+ lon: number | null;
46
+ bag_id: string;
47
+ surface_m2: number | null;
48
+ building_year: number | null;
49
+ usage_function: string | null;
50
+ status: string | null;
51
+ energy_label: string | null;
52
+ energy_label_registered: string | null;
53
+ energy_label_valid_until: string | null;
54
+ energy_label_calculation_type: string | null;
55
+ }
56
+ interface IbanToBicParams {
57
+ iban: string;
58
+ }
59
+ interface IbanToBicResponse {
60
+ iban: string;
61
+ bic: string;
62
+ bank_name: string;
63
+ country_code: string;
64
+ }
65
+ interface VatVerifyParams {
66
+ countryCode: string;
67
+ vatNumber: string;
68
+ }
69
+ interface VatVerifyResponse {
70
+ valid: boolean;
71
+ status: string;
72
+ country_code: string;
73
+ vat_number: string;
74
+ company_name: string | null;
75
+ address: string | null;
76
+ checked_at: string;
77
+ }
78
+ type FinanceValidationType = "bsn" | "iban";
79
+ interface ValidateFinanceParams {
80
+ type: FinanceValidationType;
81
+ number: string;
82
+ }
83
+ interface FinanceValidationResponse {
84
+ valid: boolean;
85
+ type: string;
86
+ number: string;
87
+ algorithm: string;
88
+ detail: string;
89
+ }
90
+ interface MinimumWageParams {
91
+ age: number;
92
+ /** Reference date YYYY-MM-DD (defaults to today) */
93
+ date?: string;
94
+ }
95
+ interface MinimumWageResponse {
96
+ age: number;
97
+ date: string;
98
+ hourly_eur: number;
99
+ daily_eur: number;
100
+ monthly_eur: number;
101
+ law_reference: string;
102
+ note: string | null;
103
+ }
104
+ interface HolidaySurchargeParams {
105
+ date: string;
106
+ industry: string;
107
+ }
108
+ interface HolidaySurchargeResponse {
109
+ date: string;
110
+ is_holiday: boolean;
111
+ holiday_name: string | null;
112
+ industry: string;
113
+ surcharge_multiplier: number;
114
+ surcharge_basis: string;
115
+ disclaimer: string;
116
+ }
117
+ interface EnergyLabelParams {
118
+ postcode: string;
119
+ houseNumber: string;
120
+ }
121
+ interface EnergyLabelResponse {
122
+ bag_id: string;
123
+ postcode: string;
124
+ house_number: string;
125
+ energy_label: string;
126
+ label_class: string;
127
+ calculation_type: string | null;
128
+ registered_at: string | null;
129
+ valid_until: string | null;
130
+ }
131
+ interface EmissionZoneParams {
132
+ kenteken: string;
133
+ }
134
+ interface EmissionZoneResponse {
135
+ kenteken: string;
136
+ ze_compliant: boolean;
137
+ fuel_types: string[];
138
+ euro_standard: string | null;
139
+ emission_category: string | null;
140
+ vehicle_category: string | null;
141
+ reason: string;
142
+ zones_checked: string[];
143
+ }
144
+ interface TransitDisruptionsParams {
145
+ stationCode: string;
146
+ }
147
+ interface TransitDisruptionItem {
148
+ type: string;
149
+ title: string;
150
+ cause: string | null;
151
+ start: string | null;
152
+ end: string | null;
153
+ impact: string | null;
154
+ }
155
+ interface TransitDisruptionsResponse {
156
+ station_code: string;
157
+ disruptions: TransitDisruptionItem[];
158
+ retrieved_at: string;
159
+ }
160
+ interface GridTriggerParams {
161
+ /** ISO alpha-2 country code (default: "NL") */
162
+ countryCode?: string;
163
+ }
164
+ interface GridTriggerResponse {
165
+ country_code: string;
166
+ current_price_eur_mwh: number;
167
+ negative_price: boolean;
168
+ trigger: boolean;
169
+ period_start: string | null;
170
+ period_end: string | null;
171
+ retrieved_at: string;
172
+ }
173
+ type OmniWebhookEvent = "key.created" | "key.test_created" | "quota.warning" | "quota.exceeded";
174
+ interface RegisterWebhookParams {
175
+ url: string;
176
+ events: OmniWebhookEvent[];
177
+ }
178
+ interface WebhookCreatedResponse {
179
+ webhook_id: string;
180
+ url: string;
181
+ events: OmniWebhookEvent[];
182
+ /** Shown once — store securely for HMAC signature verification */
183
+ secret: string;
184
+ note: string;
185
+ }
186
+ interface WebhookSummary {
187
+ webhook_id: string;
188
+ url: string;
189
+ events: OmniWebhookEvent[];
190
+ active: boolean;
191
+ created_at: string;
192
+ last_fired_at: string | null;
193
+ failure_count: number;
194
+ }
195
+ interface WebhookListResponse {
196
+ webhooks: WebhookSummary[];
197
+ }
198
+
199
+ declare class GeoModule {
200
+ private readonly http;
201
+ constructor(http: HttpClient);
202
+ /**
203
+ * Enrich a Dutch address with BAG data, coordinates, neighbourhood
204
+ * statistics, energy labels and more.
205
+ *
206
+ * @example
207
+ * const result = await omni.geo.enrichAddress({ postcode: "1012LG", houseNumber: 1 });
208
+ */
209
+ enrichAddress(params: AddressEnrichParams): Promise<AddressEnrichResponse>;
210
+ }
211
+
212
+ declare class FinanceModule {
213
+ private readonly http;
214
+ constructor(http: HttpClient);
215
+ /**
216
+ * Resolve an IBAN to its BIC/SWIFT code and bank name.
217
+ *
218
+ * @example
219
+ * const result = await omni.finance.ibanToBic({ iban: "NL91ABNA0417164300" });
220
+ */
221
+ ibanToBic(params: IbanToBicParams): Promise<IbanToBicResponse>;
222
+ /**
223
+ * Verify a Dutch BTW (VAT) number via the EU VIES service and return
224
+ * company metadata.
225
+ *
226
+ * @example
227
+ * const result = await omni.finance.vatVerify({ vatNumber: "NL123456782B01" });
228
+ */
229
+ vatVerify(params: VatVerifyParams): Promise<VatVerifyResponse>;
230
+ }
231
+
232
+ declare class ComplianceModule {
233
+ private readonly http;
234
+ constructor(http: HttpClient);
235
+ /**
236
+ * Validate a Dutch BSN or IBAN number using checksum algorithms.
237
+ *
238
+ * @example
239
+ * const result = await omni.compliance.validateFinance({ type: "iban", number: "NL91ABNA0417164300" });
240
+ */
241
+ validateFinance(params: ValidateFinanceParams): Promise<FinanceValidationResponse>;
242
+ }
243
+
244
+ declare class HrModule {
245
+ private readonly http;
246
+ constructor(http: HttpClient);
247
+ /**
248
+ * Look up the current Dutch statutory minimum wage for a given age.
249
+ *
250
+ * @example
251
+ * const result = await omni.hr.minimumWage({ age: 21 });
252
+ */
253
+ minimumWage(params: MinimumWageParams): Promise<MinimumWageResponse>;
254
+ /**
255
+ * Check whether a given date is a public holiday (and get the applicable
256
+ * surcharge multiplier for a given industry).
257
+ *
258
+ * @example
259
+ * const result = await omni.hr.holidaySurcharge({ date: "2024-12-25", industry: "retail" });
260
+ */
261
+ holidaySurcharge(params: HolidaySurchargeParams): Promise<HolidaySurchargeResponse>;
262
+ }
263
+
264
+ declare class RealEstateModule {
265
+ private readonly http;
266
+ constructor(http: HttpClient);
267
+ /**
268
+ * Retrieve the official EP-Online energy label for a Dutch address.
269
+ *
270
+ * @example
271
+ * const result = await omni.realEstate.energyLabel({ postcode: "1012LG", houseNumber: 1 });
272
+ */
273
+ energyLabel(params: EnergyLabelParams): Promise<EnergyLabelResponse>;
274
+ }
275
+
276
+ declare class LogisticsModule {
277
+ private readonly http;
278
+ constructor(http: HttpClient);
279
+ /**
280
+ * Check whether a vehicle (by Dutch licence plate / kenteken) is allowed
281
+ * in a zero-emission zone (ZE-zone).
282
+ *
283
+ * @example
284
+ * const result = await omni.logistics.emissionZone({ kenteken: "AB123C" });
285
+ */
286
+ emissionZone(params: EmissionZoneParams): Promise<EmissionZoneResponse>;
287
+ /**
288
+ * Retrieve current and upcoming NS train disruptions, optionally filtered
289
+ * by station code.
290
+ *
291
+ * @example
292
+ * const result = await omni.logistics.transitDisruptions({ stationCode: "ASD" });
293
+ */
294
+ transitDisruptions(params?: TransitDisruptionsParams): Promise<TransitDisruptionsResponse>;
295
+ }
296
+
297
+ declare class EnergyModule {
298
+ private readonly http;
299
+ constructor(http: HttpClient);
300
+ /**
301
+ * Retrieve the current Dutch electricity grid congestion status for a
302
+ * given postal code / province.
303
+ *
304
+ * @example
305
+ * const result = await omni.energy.gridTrigger();
306
+ * const result = await omni.energy.gridTrigger({ countryCode: "NL" });
307
+ */
308
+ gridTrigger(params?: GridTriggerParams): Promise<GridTriggerResponse>;
309
+ }
310
+
311
+ declare class WebhooksModule {
312
+ private readonly http;
313
+ constructor(http: HttpClient);
314
+ /**
315
+ * Register a new outbound webhook. OmniZoek will POST to `url` whenever
316
+ * any of the specified `events` fire.
317
+ *
318
+ * @example
319
+ * const wh = await omni.webhooks.register({
320
+ * url: "https://example.com/hook",
321
+ * events: ["quota.warning"],
322
+ * });
323
+ */
324
+ register(params: RegisterWebhookParams): Promise<WebhookCreatedResponse>;
325
+ /**
326
+ * List all registered webhooks for this API key.
327
+ *
328
+ * @example
329
+ * const { webhooks } = await omni.webhooks.list();
330
+ */
331
+ list(): Promise<WebhookListResponse>;
332
+ /**
333
+ * Delete a webhook by its ID.
334
+ *
335
+ * @example
336
+ * await omni.webhooks.delete("wh_abc123");
337
+ */
338
+ delete(webhookId: string): Promise<void>;
339
+ }
340
+
341
+ /**
342
+ * The main entry point for the OmniZoek SDK.
343
+ *
344
+ * @example
345
+ * ```ts
346
+ * import { OmniClient } from "@omnizoek/sdk";
347
+ *
348
+ * const omni = new OmniClient({ apiKey: "omni_live_…" });
349
+ *
350
+ * const address = await omni.geo.enrichAddress({ postcode: "1012LG", houseNumber: 1 });
351
+ * const wage = await omni.hr.minimumWage({ age: 21 });
352
+ * ```
353
+ */
354
+ declare class OmniClient {
355
+ /** Geographic address enrichment (BAG, CBS, energy labels) */
356
+ readonly geo: GeoModule;
357
+ /** Financial utilities (IBAN → BIC, VAT verification) */
358
+ readonly finance: FinanceModule;
359
+ /** Compliance checks (financial institution registers) */
360
+ readonly compliance: ComplianceModule;
361
+ /** HR calculations (minimum wage, holiday surcharge) */
362
+ readonly hr: HrModule;
363
+ /** Real-estate data (EP-Online energy labels) */
364
+ readonly realEstate: RealEstateModule;
365
+ /** Logistics (ZE-zones, NS disruptions) */
366
+ readonly logistics: LogisticsModule;
367
+ /** Energy (grid congestion triggers) */
368
+ readonly energy: EnergyModule;
369
+ /** Outbound webhooks (register, list, delete) */
370
+ readonly webhooks: WebhooksModule;
371
+ constructor(options: OmniClientOptions);
372
+ }
373
+
374
+ /**
375
+ * errors.ts — Typed error classes for the OmniZoek SDK.
376
+ */
377
+ declare class OmniError extends Error {
378
+ readonly status: number;
379
+ readonly code: string;
380
+ readonly detail: string;
381
+ constructor(message: string, status: number, code: string, detail: string);
382
+ }
383
+ /** 401 — API key missing or invalid. */
384
+ declare class OmniAuthError extends OmniError {
385
+ constructor(detail: string);
386
+ }
387
+ /** 404 — Requested resource not found (address, label, etc.). */
388
+ declare class OmniNotFoundError extends OmniError {
389
+ constructor(detail: string);
390
+ }
391
+ /** 422 — Request parameters failed validation. */
392
+ declare class OmniValidationError extends OmniError {
393
+ constructor(detail: string);
394
+ }
395
+ /** 429 — Rate limit exceeded. Retried automatically by the client. */
396
+ declare class OmniRateLimitError extends OmniError {
397
+ readonly retryAfterMs: number;
398
+ constructor(retryAfterMs: number);
399
+ }
400
+ /** 503 — Upstream data source unavailable (BAG, EP-Online, RDW, etc.). */
401
+ declare class OmniUpstreamError extends OmniError {
402
+ constructor(detail: string);
403
+ }
404
+ /** Network-level failure (DNS, timeout, no internet). */
405
+ declare class OmniNetworkError extends Error {
406
+ readonly cause?: Error;
407
+ constructor(cause: unknown);
408
+ }
409
+
410
+ export { type AddressEnrichParams, type AddressEnrichResponse, type EmissionZoneParams, type EmissionZoneResponse, type EnergyLabelParams, type EnergyLabelResponse, type FinanceValidationResponse, type GridTriggerParams, type GridTriggerResponse, type HolidaySurchargeParams, type HolidaySurchargeResponse, type IbanToBicParams, type IbanToBicResponse, type MinimumWageParams, type MinimumWageResponse, OmniAuthError, OmniClient, type OmniClientOptions, OmniError, OmniNetworkError, OmniNotFoundError, OmniRateLimitError, OmniUpstreamError, OmniValidationError, type RegisterWebhookParams, type TransitDisruptionsParams, type TransitDisruptionsResponse, type ValidateFinanceParams, type VatVerifyParams, type VatVerifyResponse, type WebhookCreatedResponse, type WebhookListResponse, type WebhookSummary };