ReadonlyAllowsTrue if the provider's free tier / ToS permits indefinite persistent storage of geocoding results. Used to gate use for RecordGeoCode persistence.
ReadonlyNameStable identifier used in config and the GeocodingSource enum (e.g. 'google', 'geocodio', 'here').
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: RequestInitForward geocode. Returns null when the provider can't resolve the address. Throws on transient API errors.
True 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').
Reverse geocode. Returns null when the provider can't resolve coordinates. Throws on transient API errors.
Google Maps Geocoding API provider.
Note on persistent storage: Google Maps Platform ToS technically forbid indefinite storage of geocoding results unless displayed on a Google Map. We expose
AllowsPersistentStorage = truefor backwards compatibility (the existing system already persists Google results) but customers with strict compliance posture should use Geocod.io or HERE as the default.