/** * Polymorphic entity-ID resolver — TypeScript port of api.utils.entity_id. * Single source of truth for translating widget-supplied company * identifiers into the wire form the API expects. * * As of v2.0 the jurisdiction prop is REQUIRED on all widget components * and the legacy /v1/companies/{id} polymorphic alias has been removed * from the API. Callers must always provide both ``companyId`` and * ``jurisdiction``; bare-id-without-jurisdiction is no longer a valid * input shape. * * Three accepted ID forms (matching the Python parser): * bare native id: "5560000028" (SE) | "0000320193" (US) | "923609016" (NO) * namespaced SE: "regna:SE:5560000028" * namespaced US: "regna:US:0000320193" * namespaced NO: "regna:NO:923609016" * * Anything else throws InvalidCompanyIdError before the network call. * * Country codes are uppercase ISO 3166-1 alpha-2 inside namespaced IDs. * URL paths use lowercase (/v1/se/..., /v1/us/..., /v1/no/...). The * `routePath` helper handles the case shift at the API boundary. */ export declare class InvalidCompanyIdError extends Error { constructor(message: string); } export type Jurisdiction = 'SE' | 'US' | 'NO'; /** * Parse a polymorphic company ID into (country, native_id). * * Accepts the same three forms as the Python parser. The `jurisdiction` * argument is REQUIRED — the v2.0 API has no polymorphic alias to fall * back to, so callers must always commit to a country up front. * * If the ID is namespaced (regna:CC:...), the embedded country must * agree with the `jurisdiction` argument, or this throws. */ export declare function resolveEntityId(companyId: string, jurisdiction: Jurisdiction): { country: Jurisdiction; nativeId: string; }; /** * Build the canonical country-scoped path segment from a parsed id. * Country-scoped paths are lowercase: /v1/se/companies/..., * /v1/us/companies/..., /v1/no/companies/... * * As of v2.0 there is no longer an alias mode — the legacy un-scoped * /v1/companies/{id} route was removed from the API. The returned * path is always country-scoped. */ export declare function entityPathSegment(country: Jurisdiction, nativeId: string): string; //# sourceMappingURL=entity-id.d.ts.map