@aws-sdk/client-lex-runtime-service
Version:
AWS SDK for JavaScript Lex Runtime Service Client for Node.js, Browser and React Native
791 lines (774 loc) • 29.1 kB
JavaScript
'use strict';
var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
var middlewareLogger = require('@aws-sdk/middleware-logger');
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
var configResolver = require('@smithy/config-resolver');
var core = require('@smithy/core');
var schema = require('@smithy/core/schema');
var middlewareContentLength = require('@smithy/middleware-content-length');
var middlewareEndpoint = require('@smithy/middleware-endpoint');
var middlewareRetry = require('@smithy/middleware-retry');
var smithyClient = require('@smithy/smithy-client');
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
var runtimeConfig = require('./runtimeConfig');
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
var protocolHttp = require('@smithy/protocol-http');
const resolveClientEndpointParameters = (options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "lex",
});
};
const commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
}
else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
},
};
};
const resolveHttpAuthRuntimeConfig = (config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials(),
};
};
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
};
class LexRuntimeServiceClient extends smithyClient.Client {
config;
constructor(...[configuration]) {
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
const _config_4 = configResolver.resolveRegionConfig(_config_3);
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
this.config = _config_8;
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultLexRuntimeServiceHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials,
}),
}));
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
}
destroy() {
super.destroy();
}
}
class LexRuntimeServiceServiceException extends smithyClient.ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, LexRuntimeServiceServiceException.prototype);
}
}
class BadRequestException extends LexRuntimeServiceServiceException {
name = "BadRequestException";
$fault = "client";
constructor(opts) {
super({
name: "BadRequestException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, BadRequestException.prototype);
}
}
class ConflictException extends LexRuntimeServiceServiceException {
name = "ConflictException";
$fault = "client";
constructor(opts) {
super({
name: "ConflictException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ConflictException.prototype);
}
}
class InternalFailureException extends LexRuntimeServiceServiceException {
name = "InternalFailureException";
$fault = "server";
constructor(opts) {
super({
name: "InternalFailureException",
$fault: "server",
...opts,
});
Object.setPrototypeOf(this, InternalFailureException.prototype);
}
}
class LimitExceededException extends LexRuntimeServiceServiceException {
name = "LimitExceededException";
$fault = "client";
retryAfterSeconds;
constructor(opts) {
super({
name: "LimitExceededException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, LimitExceededException.prototype);
this.retryAfterSeconds = opts.retryAfterSeconds;
}
}
class NotFoundException extends LexRuntimeServiceServiceException {
name = "NotFoundException";
$fault = "client";
constructor(opts) {
super({
name: "NotFoundException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, NotFoundException.prototype);
}
}
class BadGatewayException extends LexRuntimeServiceServiceException {
name = "BadGatewayException";
$fault = "server";
Message;
constructor(opts) {
super({
name: "BadGatewayException",
$fault: "server",
...opts,
});
Object.setPrototypeOf(this, BadGatewayException.prototype);
this.Message = opts.Message;
}
}
class DependencyFailedException extends LexRuntimeServiceServiceException {
name = "DependencyFailedException";
$fault = "client";
Message;
constructor(opts) {
super({
name: "DependencyFailedException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, DependencyFailedException.prototype);
this.Message = opts.Message;
}
}
class LoopDetectedException extends LexRuntimeServiceServiceException {
name = "LoopDetectedException";
$fault = "server";
Message;
constructor(opts) {
super({
name: "LoopDetectedException",
$fault: "server",
...opts,
});
Object.setPrototypeOf(this, LoopDetectedException.prototype);
this.Message = opts.Message;
}
}
class NotAcceptableException extends LexRuntimeServiceServiceException {
name = "NotAcceptableException";
$fault = "client";
constructor(opts) {
super({
name: "NotAcceptableException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, NotAcceptableException.prototype);
}
}
class RequestTimeoutException extends LexRuntimeServiceServiceException {
name = "RequestTimeoutException";
$fault = "client";
constructor(opts) {
super({
name: "RequestTimeoutException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, RequestTimeoutException.prototype);
}
}
class UnsupportedMediaTypeException extends LexRuntimeServiceServiceException {
name = "UnsupportedMediaTypeException";
$fault = "client";
constructor(opts) {
super({
name: "UnsupportedMediaTypeException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, UnsupportedMediaTypeException.prototype);
}
}
const _A = "Accept";
const _AC = "ActiveContext";
const _ACL = "ActiveContextsList";
const _ACPM = "ActiveContextParametersMap";
const _ACTTL = "ActiveContextTimeToLive";
const _B = "Button";
const _BGE = "BadGatewayException";
const _BRE = "BadRequestException";
const _BS = "BlobStream";
const _CE = "ConflictException";
const _CT = "Content-Type";
const _DA = "DialogAction";
const _DFE = "DependencyFailedException";
const _DS = "DeleteSession";
const _DSR = "DeleteSessionRequest";
const _DSRe = "DeleteSessionResponse";
const _GA = "GenericAttachment";
const _GS = "GetSession";
const _GSR = "GetSessionRequest";
const _GSRe = "GetSessionResponse";
const _IC = "IntentConfidence";
const _IFE = "InternalFailureException";
const _IL = "IntentList";
const _IS = "IntentSummary";
const _ISL = "IntentSummaryList";
const _LDE = "LoopDetectedException";
const _LEE = "LimitExceededException";
const _M = "Message";
const _NAE = "NotAcceptableException";
const _NFE = "NotFoundException";
const _PC = "PostContent";
const _PCR = "PostContentRequest";
const _PCRo = "PostContentResponse";
const _PI = "PredictedIntent";
const _PS = "PutSession";
const _PSR = "PutSessionRequest";
const _PSRu = "PutSessionResponse";
const _PT = "PostText";
const _PTR = "PostTextRequest";
const _PTRo = "PostTextResponse";
const _RA = "Retry-After";
const _RC = "ResponseCard";
const _RTE = "RequestTimeoutException";
const _SJACS = "SynthesizedJsonActiveContextsString";
const _SJAS = "SynthesizedJsonAttributesString";
const _SJS = "SynthesizedJsonString";
const _SM = "StringMap";
const _SR = "SentimentResponse";
const _SS = "SensitiveString";
const _SSU = "SensitiveStringUnbounded";
const _T = "Text";
const _UMTE = "UnsupportedMediaTypeException";
const _a = "application/json";
const _aC = "activeContexts";
const _aI = "alternativeIntents";
const _aLU = "attachmentLinkUrl";
const _aS = "audioStream";
const _ac = "accept";
const _b = "buttons";
const _bA = "botAlias";
const _bN = "botName";
const _bV = "botVersion";
const _c = "client";
const _cL = "checkpointLabel";
const _cLF = "checkpointLabelFilter";
const _cS = "confirmationStatus";
const _cT = "contentType";
const _dA = "dialogAction";
const _dAT = "dialogActionType";
const _dS = "dialogState";
const _e = "error";
const _eIT = "encodedInputTranscript";
const _eM = "encodedMessage";
const _fS = "fulfillmentState";
const _gA = "genericAttachments";
const _gAL = "genericAttachmentList";
const _h = "http";
const _hE = "httpError";
const _hH = "httpHeader";
const _hQ = "httpQuery";
const _iN = "intentName";
const _iS = "inputStream";
const _iT = "inputTranscript";
const _iTn = "inputText";
const _iU = "imageUrl";
const _lOB = "listOfButtons";
const _m = "message";
const _mF = "messageFormat";
const _mT = "mediaType";
const _n = "name";
const _nIC = "nluIntentConfidence";
const _p = "parameters";
const _rA = "requestAttributes";
const _rAS = "retryAfterSeconds";
const _rC = "responseCard";
const _rISV = "recentIntentSummaryView";
const _s = "streaming";
const _sA = "sessionAttributes";
const _sI = "sessionId";
const _sL = "sentimentLabel";
const _sR = "sentimentResponse";
const _sS = "sentimentScore";
const _sT = "subTitle";
const _sTE = "slotToElicit";
const _sc = "score";
const _se = "sensitive";
const _ser = "server";
const _sl = "slots";
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.lexruntimeservice";
const _t = "text";
const _tTL = "timeToLive";
const _tTLIS = "timeToLiveInSeconds";
const _tTLu = "turnsToLive";
const _ti = "title";
const _ty = "type";
const _uI = "userId";
const _v = "value";
const _ve = "version";
const _xalac = "x-amz-lex-active-contexts";
const _xalai = "x-amz-lex-alternative-intents";
const _xalbv = "x-amz-lex-bot-version";
const _xalds = "x-amz-lex-dialog-state";
const _xaleit = "x-amz-lex-encoded-input-transcript";
const _xalem = "x-amz-lex-encoded-message";
const _xalin = "x-amz-lex-intent-name";
const _xalit = "x-amz-lex-input-transcript";
const _xalm = "x-amz-lex-message";
const _xalmf = "x-amz-lex-message-format";
const _xalnic = "x-amz-lex-nlu-intent-confidence";
const _xalra = "x-amz-lex-request-attributes";
const _xals = "x-amz-lex-slots";
const _xals_ = "x-amz-lex-sentiment";
const _xalsa = "x-amz-lex-session-attributes";
const _xalsi = "x-amz-lex-session-id";
const _xalste = "x-amz-lex-slot-to-elicit";
const n0 = "com.amazonaws.lexruntimeservice";
var BlobStream = [0, n0, _BS, { [_s]: 1 }, 42];
var SensitiveString = [0, n0, _SS, 8, 0];
var SensitiveStringUnbounded = [0, n0, _SSU, 8, 0];
var SynthesizedJsonActiveContextsString = [0, n0, _SJACS, { [_mT]: _a, [_se]: 1 }, 0];
var SynthesizedJsonAttributesString = [0, n0, _SJAS, { [_mT]: _a, [_se]: 1 }, 0];
var SynthesizedJsonString = [0, n0, _SJS, { [_mT]: _a }, 0];
var Text = [0, n0, _T, 8, 0];
var ActiveContext$ = [3, n0, _AC,
0,
[_n, _tTL, _p],
[0, () => ActiveContextTimeToLive$, [() => ActiveContextParametersMap, 0]], 3
];
var ActiveContextTimeToLive$ = [3, n0, _ACTTL,
0,
[_tTLIS, _tTLu],
[1, 1]
];
var BadGatewayException$ = [-3, n0, _BGE,
{ [_e]: _ser, [_hE]: 502 },
[_M],
[0]
];
schema.TypeRegistry.for(n0).registerError(BadGatewayException$, BadGatewayException);
var BadRequestException$ = [-3, n0, _BRE,
{ [_e]: _c, [_hE]: 400 },
[_m],
[0]
];
schema.TypeRegistry.for(n0).registerError(BadRequestException$, BadRequestException);
var Button$ = [3, n0, _B,
0,
[_t, _v],
[0, 0], 2
];
var ConflictException$ = [-3, n0, _CE,
{ [_e]: _c, [_hE]: 409 },
[_m],
[0]
];
schema.TypeRegistry.for(n0).registerError(ConflictException$, ConflictException);
var DeleteSessionRequest$ = [3, n0, _DSR,
0,
[_bN, _bA, _uI],
[[0, 1], [0, 1], [0, 1]], 3
];
var DeleteSessionResponse$ = [3, n0, _DSRe,
0,
[_bN, _bA, _uI, _sI],
[0, 0, 0, 0]
];
var DependencyFailedException$ = [-3, n0, _DFE,
{ [_e]: _c, [_hE]: 424 },
[_M],
[0]
];
schema.TypeRegistry.for(n0).registerError(DependencyFailedException$, DependencyFailedException);
var DialogAction$ = [3, n0, _DA,
0,
[_ty, _iN, _sl, _sTE, _fS, _m, _mF],
[0, 0, [() => StringMap, 0], 0, 0, [() => Text, 0], 0], 1
];
var GenericAttachment$ = [3, n0, _GA,
0,
[_ti, _sT, _aLU, _iU, _b],
[0, 0, 0, 0, () => listOfButtons]
];
var GetSessionRequest$ = [3, n0, _GSR,
0,
[_bN, _bA, _uI, _cLF],
[[0, 1], [0, 1], [0, 1], [0, { [_hQ]: _cLF }]], 3
];
var GetSessionResponse$ = [3, n0, _GSRe,
0,
[_rISV, _sA, _sI, _dA, _aC],
[[() => IntentSummaryList, 0], [() => StringMap, 0], 0, [() => DialogAction$, 0], [() => ActiveContextsList, 0]]
];
var IntentConfidence$ = [3, n0, _IC,
0,
[_sc],
[1]
];
var IntentSummary$ = [3, n0, _IS,
0,
[_dAT, _iN, _cL, _sl, _cS, _fS, _sTE],
[0, 0, 0, [() => StringMap, 0], 0, 0, 0], 1
];
var InternalFailureException$ = [-3, n0, _IFE,
{ [_e]: _ser, [_hE]: 500 },
[_m],
[0]
];
schema.TypeRegistry.for(n0).registerError(InternalFailureException$, InternalFailureException);
var LimitExceededException$ = [-3, n0, _LEE,
{ [_e]: _c, [_hE]: 429 },
[_rAS, _m],
[[0, { [_hH]: _RA }], 0]
];
schema.TypeRegistry.for(n0).registerError(LimitExceededException$, LimitExceededException);
var LoopDetectedException$ = [-3, n0, _LDE,
{ [_e]: _ser, [_hE]: 508 },
[_M],
[0]
];
schema.TypeRegistry.for(n0).registerError(LoopDetectedException$, LoopDetectedException);
var NotAcceptableException$ = [-3, n0, _NAE,
{ [_e]: _c, [_hE]: 406 },
[_m],
[0]
];
schema.TypeRegistry.for(n0).registerError(NotAcceptableException$, NotAcceptableException);
var NotFoundException$ = [-3, n0, _NFE,
{ [_e]: _c, [_hE]: 404 },
[_m],
[0]
];
schema.TypeRegistry.for(n0).registerError(NotFoundException$, NotFoundException);
var PostContentRequest$ = [3, n0, _PCR,
0,
[_bN, _bA, _uI, _cT, _iS, _sA, _rA, _ac, _aC],
[[0, 1], [0, 1], [0, 1], [0, { [_hH]: _CT }], [() => BlobStream, 16], [() => SynthesizedJsonAttributesString, { [_hH]: _xalsa }], [() => SynthesizedJsonAttributesString, { [_hH]: _xalra }], [0, { [_hH]: _A }], [() => SynthesizedJsonActiveContextsString, { [_hH]: _xalac }]], 5
];
var PostContentResponse$ = [3, n0, _PCRo,
0,
[_cT, _iN, _nIC, _aI, _sl, _sA, _sR, _m, _eM, _mF, _dS, _sTE, _iT, _eIT, _aS, _bV, _sI, _aC],
[[0, { [_hH]: _CT }], [0, { [_hH]: _xalin }], [() => SynthesizedJsonString, { [_hH]: _xalnic }], [() => SynthesizedJsonString, { [_hH]: _xalai }], [() => SynthesizedJsonString, { [_hH]: _xals }], [() => SynthesizedJsonString, { [_hH]: _xalsa }], [0, { [_hH]: _xals_ }], [() => Text, { [_hH]: _xalm }], [() => SensitiveString, { [_hH]: _xalem }], [0, { [_hH]: _xalmf }], [0, { [_hH]: _xalds }], [0, { [_hH]: _xalste }], [0, { [_hH]: _xalit }], [() => SensitiveStringUnbounded, { [_hH]: _xaleit }], [() => BlobStream, 16], [0, { [_hH]: _xalbv }], [0, { [_hH]: _xalsi }], [() => SynthesizedJsonActiveContextsString, { [_hH]: _xalac }]]
];
var PostTextRequest$ = [3, n0, _PTR,
0,
[_bN, _bA, _uI, _iTn, _sA, _rA, _aC],
[[0, 1], [0, 1], [0, 1], [() => Text, 0], [() => StringMap, 0], [() => StringMap, 0], [() => ActiveContextsList, 0]], 4
];
var PostTextResponse$ = [3, n0, _PTRo,
0,
[_iN, _nIC, _aI, _sl, _sA, _m, _sR, _mF, _dS, _sTE, _rC, _sI, _bV, _aC],
[0, () => IntentConfidence$, [() => IntentList, 0], [() => StringMap, 0], [() => StringMap, 0], [() => Text, 0], () => SentimentResponse$, 0, 0, 0, () => ResponseCard$, 0, 0, [() => ActiveContextsList, 0]]
];
var PredictedIntent$ = [3, n0, _PI,
0,
[_iN, _nIC, _sl],
[0, () => IntentConfidence$, [() => StringMap, 0]]
];
var PutSessionRequest$ = [3, n0, _PSR,
0,
[_bN, _bA, _uI, _sA, _dA, _rISV, _ac, _aC],
[[0, 1], [0, 1], [0, 1], [() => StringMap, 0], [() => DialogAction$, 0], [() => IntentSummaryList, 0], [0, { [_hH]: _A }], [() => ActiveContextsList, 0]], 3
];
var PutSessionResponse$ = [3, n0, _PSRu,
0,
[_cT, _iN, _sl, _sA, _m, _eM, _mF, _dS, _sTE, _aS, _sI, _aC],
[[0, { [_hH]: _CT }], [0, { [_hH]: _xalin }], [() => SynthesizedJsonString, { [_hH]: _xals }], [() => SynthesizedJsonString, { [_hH]: _xalsa }], [() => Text, { [_hH]: _xalm }], [() => SensitiveString, { [_hH]: _xalem }], [0, { [_hH]: _xalmf }], [0, { [_hH]: _xalds }], [0, { [_hH]: _xalste }], [() => BlobStream, 16], [0, { [_hH]: _xalsi }], [() => SynthesizedJsonActiveContextsString, { [_hH]: _xalac }]]
];
var RequestTimeoutException$ = [-3, n0, _RTE,
{ [_e]: _c, [_hE]: 408 },
[_m],
[0]
];
schema.TypeRegistry.for(n0).registerError(RequestTimeoutException$, RequestTimeoutException);
var ResponseCard$ = [3, n0, _RC,
0,
[_ve, _cT, _gA],
[0, 0, () => genericAttachmentList]
];
var SentimentResponse$ = [3, n0, _SR,
0,
[_sL, _sS],
[0, 0]
];
var UnsupportedMediaTypeException$ = [-3, n0, _UMTE,
{ [_e]: _c, [_hE]: 415 },
[_m],
[0]
];
schema.TypeRegistry.for(n0).registerError(UnsupportedMediaTypeException$, UnsupportedMediaTypeException);
var LexRuntimeServiceServiceException$ = [-3, _sm, "LexRuntimeServiceServiceException", 0, [], []];
schema.TypeRegistry.for(_sm).registerError(LexRuntimeServiceServiceException$, LexRuntimeServiceServiceException);
var ActiveContextsList = [1, n0, _ACL,
8, [() => ActiveContext$,
0]
];
var genericAttachmentList = [1, n0, _gAL,
0, () => GenericAttachment$
];
var IntentList = [1, n0, _IL,
0, [() => PredictedIntent$,
0]
];
var IntentSummaryList = [1, n0, _ISL,
0, [() => IntentSummary$,
0]
];
var listOfButtons = [1, n0, _lOB,
0, () => Button$
];
var ActiveContextParametersMap = [2, n0, _ACPM,
0, [0,
0],
[() => Text,
0]
];
var StringMap = [2, n0, _SM,
8, 0, 0
];
var DeleteSession$ = [9, n0, _DS,
{ [_h]: ["DELETE", "/bot/{botName}/alias/{botAlias}/user/{userId}/session", 200] }, () => DeleteSessionRequest$, () => DeleteSessionResponse$
];
var GetSession$ = [9, n0, _GS,
{ [_h]: ["GET", "/bot/{botName}/alias/{botAlias}/user/{userId}/session", 200] }, () => GetSessionRequest$, () => GetSessionResponse$
];
var PostContent$ = [9, n0, _PC,
{ [_h]: ["POST", "/bot/{botName}/alias/{botAlias}/user/{userId}/content", 200] }, () => PostContentRequest$, () => PostContentResponse$
];
var PostText$ = [9, n0, _PT,
{ [_h]: ["POST", "/bot/{botName}/alias/{botAlias}/user/{userId}/text", 200] }, () => PostTextRequest$, () => PostTextResponse$
];
var PutSession$ = [9, n0, _PS,
{ [_h]: ["POST", "/bot/{botName}/alias/{botAlias}/user/{userId}/session", 200] }, () => PutSessionRequest$, () => PutSessionResponse$
];
class DeleteSessionCommand extends smithyClient.Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSDeepSenseRunTimeService", "DeleteSession", {})
.n("LexRuntimeServiceClient", "DeleteSessionCommand")
.sc(DeleteSession$)
.build() {
}
class GetSessionCommand extends smithyClient.Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSDeepSenseRunTimeService", "GetSession", {})
.n("LexRuntimeServiceClient", "GetSessionCommand")
.sc(GetSession$)
.build() {
}
class PostContentCommand extends smithyClient.Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSDeepSenseRunTimeService", "PostContent", {})
.n("LexRuntimeServiceClient", "PostContentCommand")
.sc(PostContent$)
.build() {
}
class PostTextCommand extends smithyClient.Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSDeepSenseRunTimeService", "PostText", {})
.n("LexRuntimeServiceClient", "PostTextCommand")
.sc(PostText$)
.build() {
}
class PutSessionCommand extends smithyClient.Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSDeepSenseRunTimeService", "PutSession", {})
.n("LexRuntimeServiceClient", "PutSessionCommand")
.sc(PutSession$)
.build() {
}
const commands = {
DeleteSessionCommand,
GetSessionCommand,
PostContentCommand,
PostTextCommand,
PutSessionCommand,
};
class LexRuntimeService extends LexRuntimeServiceClient {
}
smithyClient.createAggregatedClient(commands, LexRuntimeService);
const FulfillmentState = {
FAILED: "Failed",
FULFILLED: "Fulfilled",
READY_FOR_FULFILLMENT: "ReadyForFulfillment",
};
const MessageFormatType = {
COMPOSITE: "Composite",
CUSTOM_PAYLOAD: "CustomPayload",
PLAIN_TEXT: "PlainText",
SSML: "SSML",
};
const DialogActionType = {
CLOSE: "Close",
CONFIRM_INTENT: "ConfirmIntent",
DELEGATE: "Delegate",
ELICIT_INTENT: "ElicitIntent",
ELICIT_SLOT: "ElicitSlot",
};
const ConfirmationStatus = {
CONFIRMED: "Confirmed",
DENIED: "Denied",
NONE: "None",
};
const DialogState = {
CONFIRM_INTENT: "ConfirmIntent",
ELICIT_INTENT: "ElicitIntent",
ELICIT_SLOT: "ElicitSlot",
FAILED: "Failed",
FULFILLED: "Fulfilled",
READY_FOR_FULFILLMENT: "ReadyForFulfillment",
};
const ContentType = {
GENERIC: "application/vnd.amazonaws.card.generic",
};
Object.defineProperty(exports, "$Command", {
enumerable: true,
get: function () { return smithyClient.Command; }
});
Object.defineProperty(exports, "__Client", {
enumerable: true,
get: function () { return smithyClient.Client; }
});
exports.ActiveContext$ = ActiveContext$;
exports.ActiveContextTimeToLive$ = ActiveContextTimeToLive$;
exports.BadGatewayException = BadGatewayException;
exports.BadGatewayException$ = BadGatewayException$;
exports.BadRequestException = BadRequestException;
exports.BadRequestException$ = BadRequestException$;
exports.Button$ = Button$;
exports.ConfirmationStatus = ConfirmationStatus;
exports.ConflictException = ConflictException;
exports.ConflictException$ = ConflictException$;
exports.ContentType = ContentType;
exports.DeleteSession$ = DeleteSession$;
exports.DeleteSessionCommand = DeleteSessionCommand;
exports.DeleteSessionRequest$ = DeleteSessionRequest$;
exports.DeleteSessionResponse$ = DeleteSessionResponse$;
exports.DependencyFailedException = DependencyFailedException;
exports.DependencyFailedException$ = DependencyFailedException$;
exports.DialogAction$ = DialogAction$;
exports.DialogActionType = DialogActionType;
exports.DialogState = DialogState;
exports.FulfillmentState = FulfillmentState;
exports.GenericAttachment$ = GenericAttachment$;
exports.GetSession$ = GetSession$;
exports.GetSessionCommand = GetSessionCommand;
exports.GetSessionRequest$ = GetSessionRequest$;
exports.GetSessionResponse$ = GetSessionResponse$;
exports.IntentConfidence$ = IntentConfidence$;
exports.IntentSummary$ = IntentSummary$;
exports.InternalFailureException = InternalFailureException;
exports.InternalFailureException$ = InternalFailureException$;
exports.LexRuntimeService = LexRuntimeService;
exports.LexRuntimeServiceClient = LexRuntimeServiceClient;
exports.LexRuntimeServiceServiceException = LexRuntimeServiceServiceException;
exports.LexRuntimeServiceServiceException$ = LexRuntimeServiceServiceException$;
exports.LimitExceededException = LimitExceededException;
exports.LimitExceededException$ = LimitExceededException$;
exports.LoopDetectedException = LoopDetectedException;
exports.LoopDetectedException$ = LoopDetectedException$;
exports.MessageFormatType = MessageFormatType;
exports.NotAcceptableException = NotAcceptableException;
exports.NotAcceptableException$ = NotAcceptableException$;
exports.NotFoundException = NotFoundException;
exports.NotFoundException$ = NotFoundException$;
exports.PostContent$ = PostContent$;
exports.PostContentCommand = PostContentCommand;
exports.PostContentRequest$ = PostContentRequest$;
exports.PostContentResponse$ = PostContentResponse$;
exports.PostText$ = PostText$;
exports.PostTextCommand = PostTextCommand;
exports.PostTextRequest$ = PostTextRequest$;
exports.PostTextResponse$ = PostTextResponse$;
exports.PredictedIntent$ = PredictedIntent$;
exports.PutSession$ = PutSession$;
exports.PutSessionCommand = PutSessionCommand;
exports.PutSessionRequest$ = PutSessionRequest$;
exports.PutSessionResponse$ = PutSessionResponse$;
exports.RequestTimeoutException = RequestTimeoutException;
exports.RequestTimeoutException$ = RequestTimeoutException$;
exports.ResponseCard$ = ResponseCard$;
exports.SentimentResponse$ = SentimentResponse$;
exports.UnsupportedMediaTypeException = UnsupportedMediaTypeException;
exports.UnsupportedMediaTypeException$ = UnsupportedMediaTypeException$;