@aws-sdk/client-lex-runtime-service
Version:
AWS SDK for JavaScript Lex Runtime Service Client for Node.js, Browser and React Native
112 lines (111 loc) • 6.21 kB
TypeScript
import { DeleteSessionCommandInput, DeleteSessionCommandOutput } from "./commands/DeleteSessionCommand";
import { GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand";
import { PostContentCommandInput, PostContentCommandOutput } from "./commands/PostContentCommand";
import { PostTextCommandInput, PostTextCommandOutput } from "./commands/PostTextCommand";
import { PutSessionCommandInput, PutSessionCommandOutput } from "./commands/PutSessionCommand";
import { EndpointsInputConfig, EndpointsResolvedConfig, RegionInputConfig, RegionResolvedConfig } from "@aws-sdk/config-resolver";
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry";
import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
import { Provider, RegionInfoProvider, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
export declare type ServiceInputTypes = DeleteSessionCommandInput | GetSessionCommandInput | PostContentCommandInput | PostTextCommandInput | PutSessionCommandInput;
export declare type ServiceOutputTypes = DeleteSessionCommandOutput | GetSessionCommandOutput | PostContentCommandOutput | PostTextCommandOutput | PutSessionCommandOutput;
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
/**
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
*/
requestHandler?: __HttpHandler;
/**
* A constructor for a class implementing the @aws-sdk/types.Hash interface
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
*/
sha256?: __HashConstructor;
/**
* The function that will be used to convert strings into HTTP endpoints.
*/
urlParser?: __UrlParser;
/**
* A function that can calculate the length of a request body.
*/
bodyLengthChecker?: (body: any) => number | undefined;
/**
* A function that converts a stream into an array of bytes.
*/
streamCollector?: __StreamCollector;
/**
* The function that will be used to convert a base64-encoded string to a byte array
*/
base64Decoder?: __Decoder;
/**
* The function that will be used to convert binary data to a base64-encoded string
*/
base64Encoder?: __Encoder;
/**
* The function that will be used to convert a UTF8-encoded string to a byte array
*/
utf8Decoder?: __Decoder;
/**
* The function that will be used to convert binary data to a UTF-8 encoded string
*/
utf8Encoder?: __Encoder;
/**
* The runtime environment
*/
runtime?: string;
/**
* Disable dyanamically changing the endpoint of the client based on the hostPrefix
* trait of an operation.
*/
disableHostPrefix?: boolean;
/**
* Unique service identifier.
* @internal
*/
serviceId?: string;
/**
* The AWS region to which this client will send requests
*/
region?: string | __Provider<string>;
/**
* Value for how many times a request will be made at most in case of retry.
*/
maxAttempts?: number | __Provider<number>;
/**
* Optional logger for logging debug/info/warn/error.
*/
logger?: __Logger;
/**
* Default credentials provider; Not available in browser runtime.
*/
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
/**
* Fetch related hostname, signing name or signing region with given region.
*/
regionInfoProvider?: RegionInfoProvider;
/**
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
* @internal
*/
defaultUserAgentProvider?: Provider<__UserAgent>;
}
export declare type LexRuntimeServiceClientConfig = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
export declare type LexRuntimeServiceClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointsResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig;
/**
* <p>Amazon Lex provides both build and runtime endpoints. Each endpoint provides a set of
* operations (API). Your conversational bot uses the runtime API to understand user utterances
* (user input text or voice). For example, suppose a user says "I want pizza", your bot sends
* this input to Amazon Lex using the runtime API. Amazon Lex recognizes that the user request is
* for the OrderPizza intent (one of the intents defined in the bot). Then Amazon Lex engages in
* user conversation on behalf of the bot to elicit required information (slot values, such as
* pizza size and crust type), and then performs fulfillment activity (that you configured when
* you created the bot). You use the build-time API to create and manage your Amazon Lex bot. For
* a list of build-time operations, see the build-time API, . </p>
*/
export declare class LexRuntimeServiceClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, LexRuntimeServiceClientResolvedConfig> {
readonly config: LexRuntimeServiceClientResolvedConfig;
constructor(configuration: LexRuntimeServiceClientConfig);
destroy(): void;
}