UNPKG

@aws-sdk/client-lex-runtime-service

Version:

AWS SDK for JavaScript Lex Runtime Service Client for Node.js, Browser and React Native

366 lines (365 loc) 14.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PutSession$ = exports.PostText$ = exports.PostContent$ = exports.GetSession$ = exports.DeleteSession$ = exports.SentimentResponse$ = exports.ResponseCard$ = exports.PutSessionResponse$ = exports.PutSessionRequest$ = exports.PredictedIntent$ = exports.PostTextResponse$ = exports.PostTextRequest$ = exports.PostContentResponse$ = exports.PostContentRequest$ = exports.IntentSummary$ = exports.IntentConfidence$ = exports.GetSessionResponse$ = exports.GetSessionRequest$ = exports.GenericAttachment$ = exports.DialogAction$ = exports.DeleteSessionResponse$ = exports.DeleteSessionRequest$ = exports.Button$ = exports.ActiveContextTimeToLive$ = exports.ActiveContext$ = exports.errorTypeRegistries = exports.UnsupportedMediaTypeException$ = exports.RequestTimeoutException$ = exports.NotFoundException$ = exports.NotAcceptableException$ = exports.LoopDetectedException$ = exports.LimitExceededException$ = exports.InternalFailureException$ = exports.DependencyFailedException$ = exports.ConflictException$ = exports.BadRequestException$ = exports.BadGatewayException$ = exports.LexRuntimeServiceServiceException$ = void 0; 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 = "smithy.ts.sdk.synthetic.com.amazonaws.lexruntimeservice"; 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 = "server"; const _sen = "sensitive"; const _sl = "slots"; const _st = "streaming"; 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"; const schema_1 = require("@smithy/core/schema"); const errors_1 = require("../models/errors"); const LexRuntimeServiceServiceException_1 = require("../models/LexRuntimeServiceServiceException"); const _s_registry = schema_1.TypeRegistry.for(_s); exports.LexRuntimeServiceServiceException$ = [-3, _s, "LexRuntimeServiceServiceException", 0, [], []]; _s_registry.registerError(exports.LexRuntimeServiceServiceException$, LexRuntimeServiceServiceException_1.LexRuntimeServiceServiceException); const n0_registry = schema_1.TypeRegistry.for(n0); exports.BadGatewayException$ = [-3, n0, _BGE, { [_e]: _se, [_hE]: 502 }, [_M], [0] ]; n0_registry.registerError(exports.BadGatewayException$, errors_1.BadGatewayException); exports.BadRequestException$ = [-3, n0, _BRE, { [_e]: _c, [_hE]: 400 }, [_m], [0] ]; n0_registry.registerError(exports.BadRequestException$, errors_1.BadRequestException); exports.ConflictException$ = [-3, n0, _CE, { [_e]: _c, [_hE]: 409 }, [_m], [0] ]; n0_registry.registerError(exports.ConflictException$, errors_1.ConflictException); exports.DependencyFailedException$ = [-3, n0, _DFE, { [_e]: _c, [_hE]: 424 }, [_M], [0] ]; n0_registry.registerError(exports.DependencyFailedException$, errors_1.DependencyFailedException); exports.InternalFailureException$ = [-3, n0, _IFE, { [_e]: _se, [_hE]: 500 }, [_m], [0] ]; n0_registry.registerError(exports.InternalFailureException$, errors_1.InternalFailureException); exports.LimitExceededException$ = [-3, n0, _LEE, { [_e]: _c, [_hE]: 429 }, [_rAS, _m], [[0, { [_hH]: _RA }], 0] ]; n0_registry.registerError(exports.LimitExceededException$, errors_1.LimitExceededException); exports.LoopDetectedException$ = [-3, n0, _LDE, { [_e]: _se, [_hE]: 508 }, [_M], [0] ]; n0_registry.registerError(exports.LoopDetectedException$, errors_1.LoopDetectedException); exports.NotAcceptableException$ = [-3, n0, _NAE, { [_e]: _c, [_hE]: 406 }, [_m], [0] ]; n0_registry.registerError(exports.NotAcceptableException$, errors_1.NotAcceptableException); exports.NotFoundException$ = [-3, n0, _NFE, { [_e]: _c, [_hE]: 404 }, [_m], [0] ]; n0_registry.registerError(exports.NotFoundException$, errors_1.NotFoundException); exports.RequestTimeoutException$ = [-3, n0, _RTE, { [_e]: _c, [_hE]: 408 }, [_m], [0] ]; n0_registry.registerError(exports.RequestTimeoutException$, errors_1.RequestTimeoutException); exports.UnsupportedMediaTypeException$ = [-3, n0, _UMTE, { [_e]: _c, [_hE]: 415 }, [_m], [0] ]; n0_registry.registerError(exports.UnsupportedMediaTypeException$, errors_1.UnsupportedMediaTypeException); exports.errorTypeRegistries = [ _s_registry, n0_registry, ]; var BlobStream = [0, n0, _BS, { [_st]: 1 }, 42]; var SensitiveString = [0, n0, _SS, 8, 0]; var SensitiveStringUnbounded = [0, n0, _SSU, 8, 0]; var SynthesizedJsonActiveContextsString = [0, n0, _SJACS, { [_mT]: _a, [_sen]: 1 }, 0]; var SynthesizedJsonAttributesString = [0, n0, _SJAS, { [_mT]: _a, [_sen]: 1 }, 0]; var SynthesizedJsonString = [0, n0, _SJS, { [_mT]: _a }, 0]; var Text = [0, n0, _T, 8, 0]; exports.ActiveContext$ = [3, n0, _AC, 0, [_n, _tTL, _p], [0, () => exports.ActiveContextTimeToLive$, [() => ActiveContextParametersMap, 0]], 3 ]; exports.ActiveContextTimeToLive$ = [3, n0, _ACTTL, 0, [_tTLIS, _tTLu], [1, 1] ]; exports.Button$ = [3, n0, _B, 0, [_t, _v], [0, 0], 2 ]; exports.DeleteSessionRequest$ = [3, n0, _DSR, 0, [_bN, _bA, _uI], [[0, 1], [0, 1], [0, 1]], 3 ]; exports.DeleteSessionResponse$ = [3, n0, _DSRe, 0, [_bN, _bA, _uI, _sI], [0, 0, 0, 0] ]; exports.DialogAction$ = [3, n0, _DA, 0, [_ty, _iN, _sl, _sTE, _fS, _m, _mF], [0, 0, [() => StringMap, 0], 0, 0, [() => Text, 0], 0], 1 ]; exports.GenericAttachment$ = [3, n0, _GA, 0, [_ti, _sT, _aLU, _iU, _b], [0, 0, 0, 0, () => listOfButtons] ]; exports.GetSessionRequest$ = [3, n0, _GSR, 0, [_bN, _bA, _uI, _cLF], [[0, 1], [0, 1], [0, 1], [0, { [_hQ]: _cLF }]], 3 ]; exports.GetSessionResponse$ = [3, n0, _GSRe, 0, [_rISV, _sA, _sI, _dA, _aC], [[() => IntentSummaryList, 0], [() => StringMap, 0], 0, [() => exports.DialogAction$, 0], [() => ActiveContextsList, 0]] ]; exports.IntentConfidence$ = [3, n0, _IC, 0, [_sc], [1] ]; exports.IntentSummary$ = [3, n0, _IS, 0, [_dAT, _iN, _cL, _sl, _cS, _fS, _sTE], [0, 0, 0, [() => StringMap, 0], 0, 0, 0], 1 ]; exports.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 ]; exports.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 }]] ]; exports.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 ]; exports.PostTextResponse$ = [3, n0, _PTRo, 0, [_iN, _nIC, _aI, _sl, _sA, _m, _sR, _mF, _dS, _sTE, _rC, _sI, _bV, _aC], [0, () => exports.IntentConfidence$, [() => IntentList, 0], [() => StringMap, 0], [() => StringMap, 0], [() => Text, 0], () => exports.SentimentResponse$, 0, 0, 0, () => exports.ResponseCard$, 0, 0, [() => ActiveContextsList, 0]] ]; exports.PredictedIntent$ = [3, n0, _PI, 0, [_iN, _nIC, _sl], [0, () => exports.IntentConfidence$, [() => StringMap, 0]] ]; exports.PutSessionRequest$ = [3, n0, _PSR, 0, [_bN, _bA, _uI, _sA, _dA, _rISV, _ac, _aC], [[0, 1], [0, 1], [0, 1], [() => StringMap, 0], [() => exports.DialogAction$, 0], [() => IntentSummaryList, 0], [0, { [_hH]: _A }], [() => ActiveContextsList, 0]], 3 ]; exports.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 }]] ]; exports.ResponseCard$ = [3, n0, _RC, 0, [_ve, _cT, _gA], [0, 0, () => genericAttachmentList] ]; exports.SentimentResponse$ = [3, n0, _SR, 0, [_sL, _sS], [0, 0] ]; var ActiveContextsList = [1, n0, _ACL, 8, [() => exports.ActiveContext$, 0] ]; var genericAttachmentList = [1, n0, _gAL, 0, () => exports.GenericAttachment$ ]; var IntentList = [1, n0, _IL, 0, [() => exports.PredictedIntent$, 0] ]; var IntentSummaryList = [1, n0, _ISL, 0, [() => exports.IntentSummary$, 0] ]; var listOfButtons = [1, n0, _lOB, 0, () => exports.Button$ ]; var ActiveContextParametersMap = [2, n0, _ACPM, 0, [0, 0], [() => Text, 0] ]; var StringMap = [2, n0, _SM, 8, 0, 0 ]; exports.DeleteSession$ = [9, n0, _DS, { [_h]: ["DELETE", "/bot/{botName}/alias/{botAlias}/user/{userId}/session", 200] }, () => exports.DeleteSessionRequest$, () => exports.DeleteSessionResponse$ ]; exports.GetSession$ = [9, n0, _GS, { [_h]: ["GET", "/bot/{botName}/alias/{botAlias}/user/{userId}/session", 200] }, () => exports.GetSessionRequest$, () => exports.GetSessionResponse$ ]; exports.PostContent$ = [9, n0, _PC, { [_h]: ["POST", "/bot/{botName}/alias/{botAlias}/user/{userId}/content", 200] }, () => exports.PostContentRequest$, () => exports.PostContentResponse$ ]; exports.PostText$ = [9, n0, _PT, { [_h]: ["POST", "/bot/{botName}/alias/{botAlias}/user/{userId}/text", 200] }, () => exports.PostTextRequest$, () => exports.PostTextResponse$ ]; exports.PutSession$ = [9, n0, _PS, { [_h]: ["POST", "/bot/{botName}/alias/{botAlias}/user/{userId}/session", 200] }, () => exports.PutSessionRequest$, () => exports.PutSessionResponse$ ];