OptionalallowAllow apiKey, bearerToken or an auth provider to be
used with a plain http:// baseUrl on a non-loopback host.
By default the constructor throws when credentials are configured for an
http:// base URL whose host is not localhost, an address in
127.0.0.0/8, or [::1], because the credentials would be sent in
cleartext. Loopback http:// and every https:// base URL are always
accepted, as is any base URL when no credentials are configured. Set this
to true only for trusted networks (for example a private test cluster).
Default: false.
OptionalapiStatic API key sent as X-API-Key. Prefer auth for refreshable credentials.
OptionalauthOptional credential provider. The SDK calls it lazily, caches returned
credentials until expiresAt nears, and never persists secrets itself.
Returning a string is shorthand for { bearerToken: string }.
OptionalauthMilliseconds before expiresAt when credentials should be refreshed. Default: 60 seconds.
Absolute origin of the Honua server (e.g. https://api.honua.example).
Trailing slashes are normalized.
OptionalbearerStatic bearer token sent as Authorization: Bearer <token>. Prefer auth for refreshable credentials.
OptionalfetchOverride the global fetch implementation (useful in Node before built-in fetch, or for testing).
Optionalinit: RequestInitOptionalinit: RequestInitOptionalinterceptorsPer-request before / after / error hooks invoked on every HTTP call.
OptionalpreferWhen true, query methods use f=pbf for binary protobuf responses
and decode them transparently into the same JSON-compatible shape.
Falls back to f=json on decode failure. Default: false.
OptionalretryRetry strategy for transient failures.
Applies to both the REST and "grpc-web" transports. On gRPC-web the same
policy is applied to replay-safe unary calls only: transient gRPC
status codes (resource_exhausted, unavailable, deadline_exceeded,
aborted) are retried with the same exponential backoff + jitter and
retry-after handling as REST, and never past the abort/timeoutMs
deadline. Server-streaming calls are not retried (they cannot be safely
replayed mid-iteration).
OptionaltimeoutPer-request hard timeout in milliseconds. Independent of any caller-supplied AbortSignal.
OptionaltransportTransport protocol for this constructor. "rest" uses GeoServices JSON/PBF over HTTP
(the constructor default). "grpc-web" uses the native typed RPC contract via the
Connect gRPC-Web transport. Prefer createHonuaClient, which selects gRPC-Web where
the server offers it and REST otherwise.
Configuration passed to the HonuaClient constructor.
Example: Minimal config
Example: With API key + retries
Example: With an OAuth-style credential provider