@aws-sdk/client-geo-places 3.683.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +297 -0
- package/dist-cjs/GeoPlaces.js +25 -0
- package/dist-cjs/GeoPlacesClient.js +50 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/commands/AutocompleteCommand.js +27 -0
- package/dist-cjs/commands/GeocodeCommand.js +27 -0
- package/dist-cjs/commands/GetPlaceCommand.js +27 -0
- package/dist-cjs/commands/ReverseGeocodeCommand.js +27 -0
- package/dist-cjs/commands/SearchNearbyCommand.js +27 -0
- package/dist-cjs/commands/SearchTextCommand.js +27 -0
- package/dist-cjs/commands/SuggestCommand.js +27 -0
- package/dist-cjs/commands/index.js +10 -0
- package/dist-cjs/endpoint/EndpointParameters.js +18 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +10 -0
- package/dist-cjs/models/GeoPlacesServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +379 -0
- package/dist-cjs/protocols/Aws_restJson1.js +690 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +34 -0
- package/dist-cjs/runtimeExtensions.js +25 -0
- package/dist-es/GeoPlaces.js +21 -0
- package/dist-es/GeoPlacesClient.js +46 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/AutocompleteCommand.js +23 -0
- package/dist-es/commands/GeocodeCommand.js +23 -0
- package/dist-es/commands/GetPlaceCommand.js +23 -0
- package/dist-es/commands/ReverseGeocodeCommand.js +23 -0
- package/dist-es/commands/SearchNearbyCommand.js +23 -0
- package/dist-es/commands/SearchTextCommand.js +23 -0
- package/dist-es/commands/SuggestCommand.js +23 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/endpoint/EndpointParameters.js +14 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/GeoPlacesServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +345 -0
- package/dist-es/protocols/Aws_restJson1.js +673 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +30 -0
- package/dist-es/runtimeExtensions.js +21 -0
- package/dist-types/GeoPlaces.d.ts +97 -0
- package/dist-types/GeoPlacesClient.d.ts +212 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/dist-types/commands/AutocompleteCommand.d.ts +204 -0
- package/dist-types/commands/GeocodeCommand.d.ts +231 -0
- package/dist-types/commands/GetPlaceCommand.d.ts +312 -0
- package/dist-types/commands/ReverseGeocodeCommand.d.ts +196 -0
- package/dist-types/commands/SearchNearbyCommand.d.ts +335 -0
- package/dist-types/commands/SearchTextCommand.d.ts +326 -0
- package/dist-types/commands/SuggestCommand.d.ts +289 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +40 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +49 -0
- package/dist-types/models/GeoPlacesServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +2871 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +65 -0
- package/dist-types/runtimeConfig.browser.d.ts +48 -0
- package/dist-types/runtimeConfig.d.ts +48 -0
- package/dist-types/runtimeConfig.native.d.ts +47 -0
- package/dist-types/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/GeoPlaces.d.ts +126 -0
- package/dist-types/ts3.4/GeoPlacesClient.d.ts +160 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
- package/dist-types/ts3.4/commands/AutocompleteCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/GeocodeCommand.d.ts +45 -0
- package/dist-types/ts3.4/commands/GetPlaceCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/ReverseGeocodeCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/SearchNearbyCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/SearchTextCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/SuggestCommand.d.ts +43 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +8 -0
- package/dist-types/ts3.4/models/GeoPlacesServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +786 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +89 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +94 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +87 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/package.json +101 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
|
3
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
4
|
+
import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node";
|
|
5
|
+
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
|
|
6
|
+
import { Hash } from "@smithy/hash-node";
|
|
7
|
+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
|
|
8
|
+
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
10
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
11
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
12
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
14
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
15
|
+
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
|
|
16
|
+
export const getRuntimeConfig = (config) => {
|
|
17
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
18
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
19
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
20
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
21
|
+
awsCheckVersion(process.version);
|
|
22
|
+
return {
|
|
23
|
+
...clientSharedValues,
|
|
24
|
+
...config,
|
|
25
|
+
runtime: "node",
|
|
26
|
+
defaultsMode,
|
|
27
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
28
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
29
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
30
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
31
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
32
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
33
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
34
|
+
retryMode: config?.retryMode ??
|
|
35
|
+
loadNodeConfig({
|
|
36
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
37
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
38
|
+
}),
|
|
39
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
40
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
41
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
42
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
43
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS),
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
3
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
4
|
+
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
5
|
+
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
6
|
+
import { defaultGeoPlacesHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
7
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
8
|
+
export const getRuntimeConfig = (config) => {
|
|
9
|
+
return {
|
|
10
|
+
apiVersion: "2020-11-19",
|
|
11
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
12
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
13
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
14
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
15
|
+
extensions: config?.extensions ?? [],
|
|
16
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultGeoPlacesHttpAuthSchemeProvider,
|
|
17
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
18
|
+
{
|
|
19
|
+
schemeId: "aws.auth#sigv4",
|
|
20
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
21
|
+
signer: new AwsSdkSigV4Signer(),
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
25
|
+
serviceId: config?.serviceId ?? "Geo Places",
|
|
26
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
27
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
28
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
|
2
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
3
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
4
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
+
const asPartial = (t) => t;
|
|
6
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
7
|
+
const extensionConfiguration = {
|
|
8
|
+
...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
|
|
9
|
+
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
|
10
|
+
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
|
11
|
+
...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
|
|
12
|
+
};
|
|
13
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
14
|
+
return {
|
|
15
|
+
...runtimeConfig,
|
|
16
|
+
...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
|
|
17
|
+
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
|
18
|
+
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
|
19
|
+
...resolveHttpAuthRuntimeConfig(extensionConfiguration),
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { AutocompleteCommandInput, AutocompleteCommandOutput } from "./commands/AutocompleteCommand";
|
|
3
|
+
import { GeocodeCommandInput, GeocodeCommandOutput } from "./commands/GeocodeCommand";
|
|
4
|
+
import { GetPlaceCommandInput, GetPlaceCommandOutput } from "./commands/GetPlaceCommand";
|
|
5
|
+
import { ReverseGeocodeCommandInput, ReverseGeocodeCommandOutput } from "./commands/ReverseGeocodeCommand";
|
|
6
|
+
import { SearchNearbyCommandInput, SearchNearbyCommandOutput } from "./commands/SearchNearbyCommand";
|
|
7
|
+
import { SearchTextCommandInput, SearchTextCommandOutput } from "./commands/SearchTextCommand";
|
|
8
|
+
import { SuggestCommandInput, SuggestCommandOutput } from "./commands/SuggestCommand";
|
|
9
|
+
import { GeoPlacesClient } from "./GeoPlacesClient";
|
|
10
|
+
export interface GeoPlaces {
|
|
11
|
+
/**
|
|
12
|
+
* @see {@link AutocompleteCommand}
|
|
13
|
+
*/
|
|
14
|
+
autocomplete(args: AutocompleteCommandInput, options?: __HttpHandlerOptions): Promise<AutocompleteCommandOutput>;
|
|
15
|
+
autocomplete(args: AutocompleteCommandInput, cb: (err: any, data?: AutocompleteCommandOutput) => void): void;
|
|
16
|
+
autocomplete(args: AutocompleteCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AutocompleteCommandOutput) => void): void;
|
|
17
|
+
/**
|
|
18
|
+
* @see {@link GeocodeCommand}
|
|
19
|
+
*/
|
|
20
|
+
geocode(): Promise<GeocodeCommandOutput>;
|
|
21
|
+
geocode(args: GeocodeCommandInput, options?: __HttpHandlerOptions): Promise<GeocodeCommandOutput>;
|
|
22
|
+
geocode(args: GeocodeCommandInput, cb: (err: any, data?: GeocodeCommandOutput) => void): void;
|
|
23
|
+
geocode(args: GeocodeCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GeocodeCommandOutput) => void): void;
|
|
24
|
+
/**
|
|
25
|
+
* @see {@link GetPlaceCommand}
|
|
26
|
+
*/
|
|
27
|
+
getPlace(args: GetPlaceCommandInput, options?: __HttpHandlerOptions): Promise<GetPlaceCommandOutput>;
|
|
28
|
+
getPlace(args: GetPlaceCommandInput, cb: (err: any, data?: GetPlaceCommandOutput) => void): void;
|
|
29
|
+
getPlace(args: GetPlaceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPlaceCommandOutput) => void): void;
|
|
30
|
+
/**
|
|
31
|
+
* @see {@link ReverseGeocodeCommand}
|
|
32
|
+
*/
|
|
33
|
+
reverseGeocode(args: ReverseGeocodeCommandInput, options?: __HttpHandlerOptions): Promise<ReverseGeocodeCommandOutput>;
|
|
34
|
+
reverseGeocode(args: ReverseGeocodeCommandInput, cb: (err: any, data?: ReverseGeocodeCommandOutput) => void): void;
|
|
35
|
+
reverseGeocode(args: ReverseGeocodeCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ReverseGeocodeCommandOutput) => void): void;
|
|
36
|
+
/**
|
|
37
|
+
* @see {@link SearchNearbyCommand}
|
|
38
|
+
*/
|
|
39
|
+
searchNearby(args: SearchNearbyCommandInput, options?: __HttpHandlerOptions): Promise<SearchNearbyCommandOutput>;
|
|
40
|
+
searchNearby(args: SearchNearbyCommandInput, cb: (err: any, data?: SearchNearbyCommandOutput) => void): void;
|
|
41
|
+
searchNearby(args: SearchNearbyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SearchNearbyCommandOutput) => void): void;
|
|
42
|
+
/**
|
|
43
|
+
* @see {@link SearchTextCommand}
|
|
44
|
+
*/
|
|
45
|
+
searchText(): Promise<SearchTextCommandOutput>;
|
|
46
|
+
searchText(args: SearchTextCommandInput, options?: __HttpHandlerOptions): Promise<SearchTextCommandOutput>;
|
|
47
|
+
searchText(args: SearchTextCommandInput, cb: (err: any, data?: SearchTextCommandOutput) => void): void;
|
|
48
|
+
searchText(args: SearchTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SearchTextCommandOutput) => void): void;
|
|
49
|
+
/**
|
|
50
|
+
* @see {@link SuggestCommand}
|
|
51
|
+
*/
|
|
52
|
+
suggest(args: SuggestCommandInput, options?: __HttpHandlerOptions): Promise<SuggestCommandOutput>;
|
|
53
|
+
suggest(args: SuggestCommandInput, cb: (err: any, data?: SuggestCommandOutput) => void): void;
|
|
54
|
+
suggest(args: SuggestCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SuggestCommandOutput) => void): void;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* <p>
|
|
58
|
+
* The Places API enables powerful location search and geocoding capabilities for your applications, offering global coverage with rich, detailed information. Key features include:
|
|
59
|
+
* </p>
|
|
60
|
+
* <ul>
|
|
61
|
+
* <li>
|
|
62
|
+
* <p>Forward and reverse geocoding for addresses and coordinates</p>
|
|
63
|
+
* </li>
|
|
64
|
+
* <li>
|
|
65
|
+
* <p>Comprehensive place searches with detailed information, including:</p>
|
|
66
|
+
* <ul>
|
|
67
|
+
* <li>
|
|
68
|
+
* <p>Business names and addresses</p>
|
|
69
|
+
* </li>
|
|
70
|
+
* <li>
|
|
71
|
+
* <p>Contact information</p>
|
|
72
|
+
* </li>
|
|
73
|
+
* <li>
|
|
74
|
+
* <p>Hours of operation</p>
|
|
75
|
+
* </li>
|
|
76
|
+
* <li>
|
|
77
|
+
* <p>POI (Points of Interest) categories</p>
|
|
78
|
+
* </li>
|
|
79
|
+
* <li>
|
|
80
|
+
* <p>Food types for restaurants</p>
|
|
81
|
+
* </li>
|
|
82
|
+
* <li>
|
|
83
|
+
* <p>Chain affiliation for relevant businesses</p>
|
|
84
|
+
* </li>
|
|
85
|
+
* </ul>
|
|
86
|
+
* </li>
|
|
87
|
+
* <li>
|
|
88
|
+
* <p>Global data coverage with a wide range of POI categories</p>
|
|
89
|
+
* </li>
|
|
90
|
+
* <li>
|
|
91
|
+
* <p>Regular data updates to ensure accuracy and relevance</p>
|
|
92
|
+
* </li>
|
|
93
|
+
* </ul>
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
export declare class GeoPlaces extends GeoPlacesClient implements GeoPlaces {
|
|
97
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
2
|
+
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
3
|
+
import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
|
|
4
|
+
import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
|
|
5
|
+
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
6
|
+
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
7
|
+
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
8
|
+
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
9
|
+
import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
10
|
+
import { AutocompleteCommandInput, AutocompleteCommandOutput } from "./commands/AutocompleteCommand";
|
|
11
|
+
import { GeocodeCommandInput, GeocodeCommandOutput } from "./commands/GeocodeCommand";
|
|
12
|
+
import { GetPlaceCommandInput, GetPlaceCommandOutput } from "./commands/GetPlaceCommand";
|
|
13
|
+
import { ReverseGeocodeCommandInput, ReverseGeocodeCommandOutput } from "./commands/ReverseGeocodeCommand";
|
|
14
|
+
import { SearchNearbyCommandInput, SearchNearbyCommandOutput } from "./commands/SearchNearbyCommand";
|
|
15
|
+
import { SearchTextCommandInput, SearchTextCommandOutput } from "./commands/SearchTextCommand";
|
|
16
|
+
import { SuggestCommandInput, SuggestCommandOutput } from "./commands/SuggestCommand";
|
|
17
|
+
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
18
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
19
|
+
export { __Client };
|
|
20
|
+
/**
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export type ServiceInputTypes = AutocompleteCommandInput | GeocodeCommandInput | GetPlaceCommandInput | ReverseGeocodeCommandInput | SearchNearbyCommandInput | SearchTextCommandInput | SuggestCommandInput;
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export type ServiceOutputTypes = AutocompleteCommandOutput | GeocodeCommandOutput | GetPlaceCommandOutput | ReverseGeocodeCommandOutput | SearchNearbyCommandOutput | SearchTextCommandOutput | SuggestCommandOutput;
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
|
|
32
|
+
/**
|
|
33
|
+
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
|
|
34
|
+
*/
|
|
35
|
+
requestHandler?: __HttpHandlerUserInput;
|
|
36
|
+
/**
|
|
37
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
38
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
42
|
+
/**
|
|
43
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
urlParser?: __UrlParser;
|
|
47
|
+
/**
|
|
48
|
+
* A function that can calculate the length of a request body.
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
52
|
+
/**
|
|
53
|
+
* A function that converts a stream into an array of bytes.
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
streamCollector?: __StreamCollector;
|
|
57
|
+
/**
|
|
58
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
base64Decoder?: __Decoder;
|
|
62
|
+
/**
|
|
63
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
base64Encoder?: __Encoder;
|
|
67
|
+
/**
|
|
68
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
utf8Decoder?: __Decoder;
|
|
72
|
+
/**
|
|
73
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
utf8Encoder?: __Encoder;
|
|
77
|
+
/**
|
|
78
|
+
* The runtime environment.
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
runtime?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
84
|
+
* trait of an operation.
|
|
85
|
+
*/
|
|
86
|
+
disableHostPrefix?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Unique service identifier.
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
serviceId?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
94
|
+
*/
|
|
95
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
96
|
+
/**
|
|
97
|
+
* Enables FIPS compatible endpoints.
|
|
98
|
+
*/
|
|
99
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
100
|
+
/**
|
|
101
|
+
* The AWS region to which this client will send requests
|
|
102
|
+
*/
|
|
103
|
+
region?: string | __Provider<string>;
|
|
104
|
+
/**
|
|
105
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
109
|
+
/**
|
|
110
|
+
* Default credentials provider; Not available in browser runtime.
|
|
111
|
+
* @deprecated
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
|
|
115
|
+
/**
|
|
116
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
117
|
+
*/
|
|
118
|
+
maxAttempts?: number | __Provider<number>;
|
|
119
|
+
/**
|
|
120
|
+
* Specifies which retry algorithm to use.
|
|
121
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
124
|
+
retryMode?: string | __Provider<string>;
|
|
125
|
+
/**
|
|
126
|
+
* Optional logger for logging debug/info/warn/error.
|
|
127
|
+
*/
|
|
128
|
+
logger?: __Logger;
|
|
129
|
+
/**
|
|
130
|
+
* Optional extensions
|
|
131
|
+
*/
|
|
132
|
+
extensions?: RuntimeExtension[];
|
|
133
|
+
/**
|
|
134
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
135
|
+
*/
|
|
136
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
export type GeoPlacesClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
|
|
142
|
+
/**
|
|
143
|
+
* @public
|
|
144
|
+
*
|
|
145
|
+
* The configuration interface of GeoPlacesClient class constructor that set the region, credentials and other options.
|
|
146
|
+
*/
|
|
147
|
+
export interface GeoPlacesClientConfig extends GeoPlacesClientConfigType {
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
export type GeoPlacesClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
|
153
|
+
/**
|
|
154
|
+
* @public
|
|
155
|
+
*
|
|
156
|
+
* The resolved configuration interface of GeoPlacesClient class. This is resolved and normalized from the {@link GeoPlacesClientConfig | constructor configuration interface}.
|
|
157
|
+
*/
|
|
158
|
+
export interface GeoPlacesClientResolvedConfig extends GeoPlacesClientResolvedConfigType {
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* <p>
|
|
162
|
+
* The Places API enables powerful location search and geocoding capabilities for your applications, offering global coverage with rich, detailed information. Key features include:
|
|
163
|
+
* </p>
|
|
164
|
+
* <ul>
|
|
165
|
+
* <li>
|
|
166
|
+
* <p>Forward and reverse geocoding for addresses and coordinates</p>
|
|
167
|
+
* </li>
|
|
168
|
+
* <li>
|
|
169
|
+
* <p>Comprehensive place searches with detailed information, including:</p>
|
|
170
|
+
* <ul>
|
|
171
|
+
* <li>
|
|
172
|
+
* <p>Business names and addresses</p>
|
|
173
|
+
* </li>
|
|
174
|
+
* <li>
|
|
175
|
+
* <p>Contact information</p>
|
|
176
|
+
* </li>
|
|
177
|
+
* <li>
|
|
178
|
+
* <p>Hours of operation</p>
|
|
179
|
+
* </li>
|
|
180
|
+
* <li>
|
|
181
|
+
* <p>POI (Points of Interest) categories</p>
|
|
182
|
+
* </li>
|
|
183
|
+
* <li>
|
|
184
|
+
* <p>Food types for restaurants</p>
|
|
185
|
+
* </li>
|
|
186
|
+
* <li>
|
|
187
|
+
* <p>Chain affiliation for relevant businesses</p>
|
|
188
|
+
* </li>
|
|
189
|
+
* </ul>
|
|
190
|
+
* </li>
|
|
191
|
+
* <li>
|
|
192
|
+
* <p>Global data coverage with a wide range of POI categories</p>
|
|
193
|
+
* </li>
|
|
194
|
+
* <li>
|
|
195
|
+
* <p>Regular data updates to ensure accuracy and relevance</p>
|
|
196
|
+
* </li>
|
|
197
|
+
* </ul>
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
export declare class GeoPlacesClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, GeoPlacesClientResolvedConfig> {
|
|
201
|
+
/**
|
|
202
|
+
* The resolved configuration of GeoPlacesClient class. This is resolved and normalized from the {@link GeoPlacesClientConfig | constructor configuration interface}.
|
|
203
|
+
*/
|
|
204
|
+
readonly config: GeoPlacesClientResolvedConfig;
|
|
205
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<GeoPlacesClientConfig>);
|
|
206
|
+
/**
|
|
207
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
208
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
209
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
210
|
+
*/
|
|
211
|
+
destroy(): void;
|
|
212
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
|
|
2
|
+
import { GeoPlacesHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface HttpAuthExtensionConfiguration {
|
|
7
|
+
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
|
|
8
|
+
httpAuthSchemes(): HttpAuthScheme[];
|
|
9
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider: GeoPlacesHttpAuthSchemeProvider): void;
|
|
10
|
+
httpAuthSchemeProvider(): GeoPlacesHttpAuthSchemeProvider;
|
|
11
|
+
setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
|
|
12
|
+
credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export type HttpAuthRuntimeConfig = Partial<{
|
|
18
|
+
httpAuthSchemes: HttpAuthScheme[];
|
|
19
|
+
httpAuthSchemeProvider: GeoPlacesHttpAuthSchemeProvider;
|
|
20
|
+
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core";
|
|
2
|
+
import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider } from "@smithy/types";
|
|
3
|
+
import { GeoPlacesClientResolvedConfig } from "../GeoPlacesClient";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface GeoPlacesHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
|
|
8
|
+
region?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface GeoPlacesHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<GeoPlacesClientResolvedConfig, HandlerExecutionContext, GeoPlacesHttpAuthSchemeParameters, object> {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const defaultGeoPlacesHttpAuthSchemeParametersProvider: (config: GeoPlacesClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise<GeoPlacesHttpAuthSchemeParameters>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export interface GeoPlacesHttpAuthSchemeProvider extends HttpAuthSchemeProvider<GeoPlacesHttpAuthSchemeParameters> {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare const defaultGeoPlacesHttpAuthSchemeProvider: GeoPlacesHttpAuthSchemeProvider;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
|
|
32
|
+
/**
|
|
33
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
httpAuthSchemes?: HttpAuthScheme[];
|
|
37
|
+
/**
|
|
38
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
httpAuthSchemeProvider?: GeoPlacesHttpAuthSchemeProvider;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
|
|
47
|
+
/**
|
|
48
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
readonly httpAuthSchemes: HttpAuthScheme[];
|
|
52
|
+
/**
|
|
53
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
readonly httpAuthSchemeProvider: GeoPlacesHttpAuthSchemeProvider;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig;
|