Skip to content

loqate API

Everything the package exports, by the path you import it from. Open an export for its signature and options.

@evolve-framework/loqate

LoqateAddressSuggestModule and its options

Classes

LoqateAddressSuggestModuleQuery.addressSuggest and addressResolve from Loqate's Capture service, for type-ahead address entry in the configured countries.
import { LoqateAddressSuggestModule } from "@evolve-framework/loqate";

Every query answers null for a country it is not configured for, or when Loqate is unavailable, so a form falls back to another way of entering the address.

Extends AbstractModule<unknown>

new LoqateAddressSuggestModule(options: LoqateAddressSuggestOptions)
OptionTypeDescription
apiKeystring

The Loqate API key, from the site's secret configuration.

countriesreadonly string[]

The countries to answer for, as ISO 3166-1 alpha-2 codes. Loqate covers nearly every country and bills per resolved address, so a site names the ones it sells to; any other country answers null without a request.

baseUrl?string

Defaults to Loqate's Capture Interactive endpoints.

timeoutMs?number

How long a request may take before it counts as unavailable. Defaults to 3 seconds.

fetch?((url: string | URL | Request, options?: RequestInit | undefined, spanName?: string | undefined) => Promise<Response>)

Defaults to the framework's traced fetch.

Not listed: 1 options types. They appear as the tables under the constructors and functions they type.