AbstractAbstract ReadonlyAllowsTrue if the provider's free tier / ToS permits indefinite persistent storage of geocoding results. Used to gate use for RecordGeoCode persistence.
Abstract ReadonlyNameStable identifier used in config and the GeocodingSource enum (e.g. 'google', 'geocodio', 'here').
Abstract ReadonlySupported'global' if the provider supports all countries, otherwise an array of ISO 3166-1 alpha-2 codes. Used for routing decisions when a country is known up-front.
ProtectedfetchFetch JSON from a provider API with consistent error logging. Returns null on non-2xx responses (so callers treat HTTP errors as "no result" rather than throwing); throws on network/parse errors so the scheduled job can mark the row as 'failed' and retry later.
Optionalinit: RequestInitAbstractGeocodeForward geocode. Returns null when the provider can't resolve the address. Throws on transient API errors.
AbstractIsTrue if API credentials are configured and the provider is ready to call.
ProtectednormalizeHelper for subclasses: clamp a numeric confidence to 0.0–1.0, returning null if the input is null/undefined/NaN.
ProtectedresolveResolve a credential from env vars first, then mj.config.cjs. Mirrors the existing GeoCodeSyncService.getGoogleApiKey() pattern but generalized so each provider can declare its own env/config keys.
Ordered list of env var names to try (e.g. ['GEOCODIO_API_KEY']).
Dotted path within __mj_config_apiIntegrations (e.g. 'geocodio.apiKey' or 'google.geocoding.apiKey').
AbstractReverseReverse geocode. Returns null when the provider can't resolve coordinates. Throws on transient API errors.
Abstract base class for geocoding providers. Holds shared HTTP and config-lookup helpers so concrete providers only implement the API-specific request/response mapping.