@aws-sdk/client-geo-routes 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 +265 -0
- package/dist-cjs/GeoRoutes.js +21 -0
- package/dist-cjs/GeoRoutesClient.js +50 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/commands/CalculateIsolinesCommand.js +27 -0
- package/dist-cjs/commands/CalculateRouteMatrixCommand.js +27 -0
- package/dist-cjs/commands/CalculateRoutesCommand.js +27 -0
- package/dist-cjs/commands/OptimizeWaypointsCommand.js +27 -0
- package/dist-cjs/commands/SnapToRoadsCommand.js +27 -0
- package/dist-cjs/commands/index.js +8 -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/GeoRoutesServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +1009 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1529 -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/GeoRoutes.js +17 -0
- package/dist-es/GeoRoutesClient.js +46 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/CalculateIsolinesCommand.js +23 -0
- package/dist-es/commands/CalculateRouteMatrixCommand.js +23 -0
- package/dist-es/commands/CalculateRoutesCommand.js +23 -0
- package/dist-es/commands/OptimizeWaypointsCommand.js +23 -0
- package/dist-es/commands/SnapToRoadsCommand.js +23 -0
- package/dist-es/commands/index.js +5 -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/GeoRoutesServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +927 -0
- package/dist-es/protocols/Aws_restJson1.js +1516 -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/GeoRoutes.d.ts +65 -0
- package/dist-types/GeoRoutesClient.d.ts +194 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/dist-types/commands/CalculateIsolinesCommand.d.ts +315 -0
- package/dist-types/commands/CalculateRouteMatrixCommand.d.ts +281 -0
- package/dist-types/commands/CalculateRoutesCommand.d.ts +969 -0
- package/dist-types/commands/OptimizeWaypointsCommand.d.ts +251 -0
- package/dist-types/commands/SnapToRoadsCommand.d.ts +140 -0
- package/dist-types/commands/index.d.ts +5 -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 +33 -0
- package/dist-types/models/GeoRoutesServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +7597 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +47 -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/GeoRoutes.d.ts +90 -0
- package/dist-types/ts3.4/GeoRoutesClient.d.ts +148 -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/CalculateIsolinesCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/CalculateRouteMatrixCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/CalculateRoutesCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/OptimizeWaypointsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/SnapToRoadsCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -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/GeoRoutesServiceException.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 +2022 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +65 -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,34 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
|
|
5
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
6
|
+
import { invalidProvider } from "@smithy/invalid-dependency";
|
|
7
|
+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
8
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
9
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
10
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
11
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
12
|
+
export const getRuntimeConfig = (config) => {
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
return {
|
|
17
|
+
...clientSharedValues,
|
|
18
|
+
...config,
|
|
19
|
+
runtime: "browser",
|
|
20
|
+
defaultsMode,
|
|
21
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
22
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
23
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
24
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
25
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
26
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
27
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
28
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
29
|
+
sha256: config?.sha256 ?? Sha256,
|
|
30
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
31
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
32
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -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 { defaultGeoRoutesHttpAuthSchemeProvider } 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 ?? defaultGeoRoutesHttpAuthSchemeProvider,
|
|
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 Routes",
|
|
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,65 @@
|
|
|
1
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { CalculateIsolinesCommandInput, CalculateIsolinesCommandOutput } from "./commands/CalculateIsolinesCommand";
|
|
3
|
+
import { CalculateRouteMatrixCommandInput, CalculateRouteMatrixCommandOutput } from "./commands/CalculateRouteMatrixCommand";
|
|
4
|
+
import { CalculateRoutesCommandInput, CalculateRoutesCommandOutput } from "./commands/CalculateRoutesCommand";
|
|
5
|
+
import { OptimizeWaypointsCommandInput, OptimizeWaypointsCommandOutput } from "./commands/OptimizeWaypointsCommand";
|
|
6
|
+
import { SnapToRoadsCommandInput, SnapToRoadsCommandOutput } from "./commands/SnapToRoadsCommand";
|
|
7
|
+
import { GeoRoutesClient } from "./GeoRoutesClient";
|
|
8
|
+
export interface GeoRoutes {
|
|
9
|
+
/**
|
|
10
|
+
* @see {@link CalculateIsolinesCommand}
|
|
11
|
+
*/
|
|
12
|
+
calculateIsolines(args: CalculateIsolinesCommandInput, options?: __HttpHandlerOptions): Promise<CalculateIsolinesCommandOutput>;
|
|
13
|
+
calculateIsolines(args: CalculateIsolinesCommandInput, cb: (err: any, data?: CalculateIsolinesCommandOutput) => void): void;
|
|
14
|
+
calculateIsolines(args: CalculateIsolinesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CalculateIsolinesCommandOutput) => void): void;
|
|
15
|
+
/**
|
|
16
|
+
* @see {@link CalculateRouteMatrixCommand}
|
|
17
|
+
*/
|
|
18
|
+
calculateRouteMatrix(args: CalculateRouteMatrixCommandInput, options?: __HttpHandlerOptions): Promise<CalculateRouteMatrixCommandOutput>;
|
|
19
|
+
calculateRouteMatrix(args: CalculateRouteMatrixCommandInput, cb: (err: any, data?: CalculateRouteMatrixCommandOutput) => void): void;
|
|
20
|
+
calculateRouteMatrix(args: CalculateRouteMatrixCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CalculateRouteMatrixCommandOutput) => void): void;
|
|
21
|
+
/**
|
|
22
|
+
* @see {@link CalculateRoutesCommand}
|
|
23
|
+
*/
|
|
24
|
+
calculateRoutes(args: CalculateRoutesCommandInput, options?: __HttpHandlerOptions): Promise<CalculateRoutesCommandOutput>;
|
|
25
|
+
calculateRoutes(args: CalculateRoutesCommandInput, cb: (err: any, data?: CalculateRoutesCommandOutput) => void): void;
|
|
26
|
+
calculateRoutes(args: CalculateRoutesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CalculateRoutesCommandOutput) => void): void;
|
|
27
|
+
/**
|
|
28
|
+
* @see {@link OptimizeWaypointsCommand}
|
|
29
|
+
*/
|
|
30
|
+
optimizeWaypoints(args: OptimizeWaypointsCommandInput, options?: __HttpHandlerOptions): Promise<OptimizeWaypointsCommandOutput>;
|
|
31
|
+
optimizeWaypoints(args: OptimizeWaypointsCommandInput, cb: (err: any, data?: OptimizeWaypointsCommandOutput) => void): void;
|
|
32
|
+
optimizeWaypoints(args: OptimizeWaypointsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: OptimizeWaypointsCommandOutput) => void): void;
|
|
33
|
+
/**
|
|
34
|
+
* @see {@link SnapToRoadsCommand}
|
|
35
|
+
*/
|
|
36
|
+
snapToRoads(args: SnapToRoadsCommandInput, options?: __HttpHandlerOptions): Promise<SnapToRoadsCommandOutput>;
|
|
37
|
+
snapToRoads(args: SnapToRoadsCommandInput, cb: (err: any, data?: SnapToRoadsCommandOutput) => void): void;
|
|
38
|
+
snapToRoads(args: SnapToRoadsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SnapToRoadsCommandOutput) => void): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* <p>With the Amazon Location Routes API you can calculate
|
|
42
|
+
* routes and estimate travel time based on up-to-date road network and live
|
|
43
|
+
* traffic information.</p>
|
|
44
|
+
* <p>Calculate optimal travel routes and estimate travel times using up-to-date road network and traffic data. Key features include:</p>
|
|
45
|
+
* <ul>
|
|
46
|
+
* <li>
|
|
47
|
+
* <p>Point-to-point routing with estimated travel time, distance, and turn-by-turn directions</p>
|
|
48
|
+
* </li>
|
|
49
|
+
* <li>
|
|
50
|
+
* <p>Multi-point route optimization to minimize travel time or distance</p>
|
|
51
|
+
* </li>
|
|
52
|
+
* <li>
|
|
53
|
+
* <p>Route matrices for efficient multi-destination planning</p>
|
|
54
|
+
* </li>
|
|
55
|
+
* <li>
|
|
56
|
+
* <p>Isoline calculations to determine reachable areas within specified time or distance thresholds</p>
|
|
57
|
+
* </li>
|
|
58
|
+
* <li>
|
|
59
|
+
* <p>Map-matching to align GPS traces with the road network</p>
|
|
60
|
+
* </li>
|
|
61
|
+
* </ul>
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export declare class GeoRoutes extends GeoRoutesClient implements GeoRoutes {
|
|
65
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
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 { CalculateIsolinesCommandInput, CalculateIsolinesCommandOutput } from "./commands/CalculateIsolinesCommand";
|
|
11
|
+
import { CalculateRouteMatrixCommandInput, CalculateRouteMatrixCommandOutput } from "./commands/CalculateRouteMatrixCommand";
|
|
12
|
+
import { CalculateRoutesCommandInput, CalculateRoutesCommandOutput } from "./commands/CalculateRoutesCommand";
|
|
13
|
+
import { OptimizeWaypointsCommandInput, OptimizeWaypointsCommandOutput } from "./commands/OptimizeWaypointsCommand";
|
|
14
|
+
import { SnapToRoadsCommandInput, SnapToRoadsCommandOutput } from "./commands/SnapToRoadsCommand";
|
|
15
|
+
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
16
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
17
|
+
export { __Client };
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export type ServiceInputTypes = CalculateIsolinesCommandInput | CalculateRouteMatrixCommandInput | CalculateRoutesCommandInput | OptimizeWaypointsCommandInput | SnapToRoadsCommandInput;
|
|
22
|
+
/**
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export type ServiceOutputTypes = CalculateIsolinesCommandOutput | CalculateRouteMatrixCommandOutput | CalculateRoutesCommandOutput | OptimizeWaypointsCommandOutput | SnapToRoadsCommandOutput;
|
|
26
|
+
/**
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
|
|
30
|
+
/**
|
|
31
|
+
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
|
|
32
|
+
*/
|
|
33
|
+
requestHandler?: __HttpHandlerUserInput;
|
|
34
|
+
/**
|
|
35
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
36
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
40
|
+
/**
|
|
41
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
urlParser?: __UrlParser;
|
|
45
|
+
/**
|
|
46
|
+
* A function that can calculate the length of a request body.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
50
|
+
/**
|
|
51
|
+
* A function that converts a stream into an array of bytes.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
streamCollector?: __StreamCollector;
|
|
55
|
+
/**
|
|
56
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
base64Decoder?: __Decoder;
|
|
60
|
+
/**
|
|
61
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
base64Encoder?: __Encoder;
|
|
65
|
+
/**
|
|
66
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
utf8Decoder?: __Decoder;
|
|
70
|
+
/**
|
|
71
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
utf8Encoder?: __Encoder;
|
|
75
|
+
/**
|
|
76
|
+
* The runtime environment.
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
runtime?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
82
|
+
* trait of an operation.
|
|
83
|
+
*/
|
|
84
|
+
disableHostPrefix?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Unique service identifier.
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
serviceId?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
92
|
+
*/
|
|
93
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
94
|
+
/**
|
|
95
|
+
* Enables FIPS compatible endpoints.
|
|
96
|
+
*/
|
|
97
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
98
|
+
/**
|
|
99
|
+
* The AWS region to which this client will send requests
|
|
100
|
+
*/
|
|
101
|
+
region?: string | __Provider<string>;
|
|
102
|
+
/**
|
|
103
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
107
|
+
/**
|
|
108
|
+
* Default credentials provider; Not available in browser runtime.
|
|
109
|
+
* @deprecated
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
|
|
113
|
+
/**
|
|
114
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
115
|
+
*/
|
|
116
|
+
maxAttempts?: number | __Provider<number>;
|
|
117
|
+
/**
|
|
118
|
+
* Specifies which retry algorithm to use.
|
|
119
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
120
|
+
*
|
|
121
|
+
*/
|
|
122
|
+
retryMode?: string | __Provider<string>;
|
|
123
|
+
/**
|
|
124
|
+
* Optional logger for logging debug/info/warn/error.
|
|
125
|
+
*/
|
|
126
|
+
logger?: __Logger;
|
|
127
|
+
/**
|
|
128
|
+
* Optional extensions
|
|
129
|
+
*/
|
|
130
|
+
extensions?: RuntimeExtension[];
|
|
131
|
+
/**
|
|
132
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
133
|
+
*/
|
|
134
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
export type GeoRoutesClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
|
|
140
|
+
/**
|
|
141
|
+
* @public
|
|
142
|
+
*
|
|
143
|
+
* The configuration interface of GeoRoutesClient class constructor that set the region, credentials and other options.
|
|
144
|
+
*/
|
|
145
|
+
export interface GeoRoutesClientConfig extends GeoRoutesClientConfigType {
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
export type GeoRoutesClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
|
151
|
+
/**
|
|
152
|
+
* @public
|
|
153
|
+
*
|
|
154
|
+
* The resolved configuration interface of GeoRoutesClient class. This is resolved and normalized from the {@link GeoRoutesClientConfig | constructor configuration interface}.
|
|
155
|
+
*/
|
|
156
|
+
export interface GeoRoutesClientResolvedConfig extends GeoRoutesClientResolvedConfigType {
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* <p>With the Amazon Location Routes API you can calculate
|
|
160
|
+
* routes and estimate travel time based on up-to-date road network and live
|
|
161
|
+
* traffic information.</p>
|
|
162
|
+
* <p>Calculate optimal travel routes and estimate travel times using up-to-date road network and traffic data. Key features include:</p>
|
|
163
|
+
* <ul>
|
|
164
|
+
* <li>
|
|
165
|
+
* <p>Point-to-point routing with estimated travel time, distance, and turn-by-turn directions</p>
|
|
166
|
+
* </li>
|
|
167
|
+
* <li>
|
|
168
|
+
* <p>Multi-point route optimization to minimize travel time or distance</p>
|
|
169
|
+
* </li>
|
|
170
|
+
* <li>
|
|
171
|
+
* <p>Route matrices for efficient multi-destination planning</p>
|
|
172
|
+
* </li>
|
|
173
|
+
* <li>
|
|
174
|
+
* <p>Isoline calculations to determine reachable areas within specified time or distance thresholds</p>
|
|
175
|
+
* </li>
|
|
176
|
+
* <li>
|
|
177
|
+
* <p>Map-matching to align GPS traces with the road network</p>
|
|
178
|
+
* </li>
|
|
179
|
+
* </ul>
|
|
180
|
+
* @public
|
|
181
|
+
*/
|
|
182
|
+
export declare class GeoRoutesClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, GeoRoutesClientResolvedConfig> {
|
|
183
|
+
/**
|
|
184
|
+
* The resolved configuration of GeoRoutesClient class. This is resolved and normalized from the {@link GeoRoutesClientConfig | constructor configuration interface}.
|
|
185
|
+
*/
|
|
186
|
+
readonly config: GeoRoutesClientResolvedConfig;
|
|
187
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<GeoRoutesClientConfig>);
|
|
188
|
+
/**
|
|
189
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
190
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
191
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
192
|
+
*/
|
|
193
|
+
destroy(): void;
|
|
194
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
|
|
2
|
+
import { GeoRoutesHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface HttpAuthExtensionConfiguration {
|
|
7
|
+
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
|
|
8
|
+
httpAuthSchemes(): HttpAuthScheme[];
|
|
9
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider: GeoRoutesHttpAuthSchemeProvider): void;
|
|
10
|
+
httpAuthSchemeProvider(): GeoRoutesHttpAuthSchemeProvider;
|
|
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: GeoRoutesHttpAuthSchemeProvider;
|
|
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 { GeoRoutesClientResolvedConfig } from "../GeoRoutesClient";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface GeoRoutesHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
|
|
8
|
+
region?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface GeoRoutesHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<GeoRoutesClientResolvedConfig, HandlerExecutionContext, GeoRoutesHttpAuthSchemeParameters, object> {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const defaultGeoRoutesHttpAuthSchemeParametersProvider: (config: GeoRoutesClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise<GeoRoutesHttpAuthSchemeParameters>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export interface GeoRoutesHttpAuthSchemeProvider extends HttpAuthSchemeProvider<GeoRoutesHttpAuthSchemeParameters> {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare const defaultGeoRoutesHttpAuthSchemeProvider: GeoRoutesHttpAuthSchemeProvider;
|
|
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?: GeoRoutesHttpAuthSchemeProvider;
|
|
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: GeoRoutesHttpAuthSchemeProvider;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig;
|