@aws-sdk/client-lex-runtime-service 3.1075.0 → 3.1077.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/dist-cjs/index.js CHANGED
@@ -1,21 +1,58 @@
1
- var __exportStar = (m, e) => { Object.assign(e, m); };
2
- const { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
1
+ const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
3
2
  const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require("@smithy/core");
4
- const { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
3
+ const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
5
4
  exports.$Command = Command;
6
5
  exports.__Client = Client;
7
- const { resolveRegionConfig } = require("@smithy/core/config");
8
- const { resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
9
- const { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
10
- const { resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
11
- const { getSchemaSerdePlugin } = require("@smithy/core/schema");
12
- const { resolveHttpAuthSchemeConfig, defaultLexRuntimeServiceHttpAuthSchemeParametersProvider } = require("./auth/httpAuthSchemeProvider");
13
- const { getRuntimeConfig } = require("./runtimeConfig");
14
- const { DeleteSession$, GetSession$, PostContent$, PostText$, PutSession$ } = require("./schemas/schemas_0");
15
- __exportStar(require("./schemas/schemas_0"), exports);
16
- __exportStar(require("./models/errors"), exports);
17
- const { LexRuntimeServiceServiceException } = require("./models/LexRuntimeServiceServiceException");
18
- exports.LexRuntimeServiceServiceException = LexRuntimeServiceServiceException;
6
+ const { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require("@smithy/core/config");
7
+ const { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
8
+ const { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
9
+ const { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
10
+ const { TypeRegistry, getSchemaSerdePlugin } = require("@smithy/core/schema");
11
+ const { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
12
+ const { defaultProvider } = require("@aws-sdk/credential-provider-node");
13
+ const { toUtf8, fromUtf8, sdkStreamMixin, toBase64, fromBase64, calculateBodyLength } = require("@smithy/core/serde");
14
+ const { streamCollector, NodeHttpHandler } = require("@smithy/node-http-handler");
15
+ const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
16
+ const { Sha256 } = require("@smithy/core/checksum");
17
+
18
+ const defaultLexRuntimeServiceHttpAuthSchemeParametersProvider = async (config, context, input) => {
19
+ return {
20
+ operation: getSmithyContext(context).operation,
21
+ region: await normalizeProvider(config.region)() || (() => {
22
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
23
+ })(),
24
+ };
25
+ };
26
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
27
+ return {
28
+ schemeId: "aws.auth#sigv4",
29
+ signingProperties: {
30
+ name: "lex",
31
+ region: authParameters.region,
32
+ },
33
+ propertiesExtractor: (config, context) => ({
34
+ signingProperties: {
35
+ config,
36
+ context,
37
+ },
38
+ }),
39
+ };
40
+ }
41
+ const defaultLexRuntimeServiceHttpAuthSchemeProvider = (authParameters) => {
42
+ const options = [];
43
+ switch (authParameters.operation) {
44
+ default: {
45
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
46
+ }
47
+ }
48
+ return options;
49
+ };
50
+ const resolveHttpAuthSchemeConfig = (config) => {
51
+ const config_0 = resolveAwsSdkSigV4Config(config);
52
+ return Object.assign(config_0, {
53
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
54
+ });
55
+ };
19
56
 
20
57
  const resolveClientEndpointParameters = (options) => {
21
58
  return Object.assign(options, {
@@ -31,6 +68,651 @@ const commonParams = {
31
68
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
32
69
  };
33
70
 
71
+ var version = "3.1076.0";
72
+ var packageInfo = {
73
+ version: version};
74
+
75
+ const m = "ref";
76
+ const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = "stringEquals", h = { [m]: "Endpoint" }, i = { [m]: d }, j = { "fn": f, "argv": [i, "name"] }, k = {}, l = [{ [m]: "Region" }];
77
+ const _data = {
78
+ conditions: [
79
+ [c, [h]],
80
+ [c, l],
81
+ ["aws.partition", l, d],
82
+ [e, [{ [m]: "UseFIPS" }, b]],
83
+ [e, [{ [m]: "UseDualStack" }, b]],
84
+ [e, [{ fn: f, argv: [i, "supportsDualStack"] }, b]],
85
+ [e, [{ fn: f, argv: [i, "supportsFIPS"] }, b]],
86
+ [g, [j, "aws"]],
87
+ [g, [j, "aws-us-gov"]]
88
+ ],
89
+ results: [
90
+ [a],
91
+ [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
92
+ [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
93
+ [h, k],
94
+ ["https://runtime.lex-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", k],
95
+ [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
96
+ ["https://runtime-fips.lex.{Region}.amazonaws.com", k],
97
+ ["https://runtime.lex-fips.{Region}.{PartitionResult#dnsSuffix}", k],
98
+ [a, "FIPS is enabled but this partition does not support FIPS"],
99
+ ["https://runtime.lex.{Region}.{PartitionResult#dualStackDnsSuffix}", k],
100
+ [a, "DualStack is enabled but this partition does not support DualStack"],
101
+ ["https://runtime.lex.{Region}.amazonaws.com", k],
102
+ ["https://runtime.lex.{Region}.{PartitionResult#dnsSuffix}", k],
103
+ [a, "Invalid Configuration: Missing Region"]
104
+ ]
105
+ };
106
+ const root = 2;
107
+ const r = 100_000_000;
108
+ const nodes = new Int32Array([
109
+ -1, 1, -1,
110
+ 0, 16, 3,
111
+ 1, 4, r + 13,
112
+ 2, 5, r + 13,
113
+ 3, 10, 6,
114
+ 4, 9, 7,
115
+ 7, r + 11, 8,
116
+ 8, r + 11, r + 12,
117
+ 5, r + 9, r + 10,
118
+ 4, 14, 11,
119
+ 6, 12, r + 8,
120
+ 7, r + 6, 13,
121
+ 8, r + 6, r + 7,
122
+ 5, 15, r + 5,
123
+ 6, r + 4, r + 5,
124
+ 3, r + 1, 17,
125
+ 4, r + 2, r + 3,
126
+ ]);
127
+ const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
128
+
129
+ const cache = new EndpointCache({
130
+ size: 50,
131
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
132
+ });
133
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
134
+ return cache.get(endpointParams, () => decideEndpoint(bdd, {
135
+ endpointParams: endpointParams,
136
+ logger: context.logger,
137
+ }));
138
+ };
139
+ customEndpointFunctions.aws = awsEndpointFunctions;
140
+
141
+ class LexRuntimeServiceServiceException extends ServiceException {
142
+ constructor(options) {
143
+ super(options);
144
+ Object.setPrototypeOf(this, LexRuntimeServiceServiceException.prototype);
145
+ }
146
+ }
147
+
148
+ class BadRequestException extends LexRuntimeServiceServiceException {
149
+ name = "BadRequestException";
150
+ $fault = "client";
151
+ constructor(opts) {
152
+ super({
153
+ name: "BadRequestException",
154
+ $fault: "client",
155
+ ...opts,
156
+ });
157
+ Object.setPrototypeOf(this, BadRequestException.prototype);
158
+ }
159
+ }
160
+ class ConflictException extends LexRuntimeServiceServiceException {
161
+ name = "ConflictException";
162
+ $fault = "client";
163
+ constructor(opts) {
164
+ super({
165
+ name: "ConflictException",
166
+ $fault: "client",
167
+ ...opts,
168
+ });
169
+ Object.setPrototypeOf(this, ConflictException.prototype);
170
+ }
171
+ }
172
+ class InternalFailureException extends LexRuntimeServiceServiceException {
173
+ name = "InternalFailureException";
174
+ $fault = "server";
175
+ constructor(opts) {
176
+ super({
177
+ name: "InternalFailureException",
178
+ $fault: "server",
179
+ ...opts,
180
+ });
181
+ Object.setPrototypeOf(this, InternalFailureException.prototype);
182
+ }
183
+ }
184
+ class LimitExceededException extends LexRuntimeServiceServiceException {
185
+ name = "LimitExceededException";
186
+ $fault = "client";
187
+ retryAfterSeconds;
188
+ constructor(opts) {
189
+ super({
190
+ name: "LimitExceededException",
191
+ $fault: "client",
192
+ ...opts,
193
+ });
194
+ Object.setPrototypeOf(this, LimitExceededException.prototype);
195
+ this.retryAfterSeconds = opts.retryAfterSeconds;
196
+ }
197
+ }
198
+ class NotFoundException extends LexRuntimeServiceServiceException {
199
+ name = "NotFoundException";
200
+ $fault = "client";
201
+ constructor(opts) {
202
+ super({
203
+ name: "NotFoundException",
204
+ $fault: "client",
205
+ ...opts,
206
+ });
207
+ Object.setPrototypeOf(this, NotFoundException.prototype);
208
+ }
209
+ }
210
+ class BadGatewayException extends LexRuntimeServiceServiceException {
211
+ name = "BadGatewayException";
212
+ $fault = "server";
213
+ Message;
214
+ constructor(opts) {
215
+ super({
216
+ name: "BadGatewayException",
217
+ $fault: "server",
218
+ ...opts,
219
+ });
220
+ Object.setPrototypeOf(this, BadGatewayException.prototype);
221
+ this.Message = opts.Message;
222
+ }
223
+ }
224
+ class DependencyFailedException extends LexRuntimeServiceServiceException {
225
+ name = "DependencyFailedException";
226
+ $fault = "client";
227
+ Message;
228
+ constructor(opts) {
229
+ super({
230
+ name: "DependencyFailedException",
231
+ $fault: "client",
232
+ ...opts,
233
+ });
234
+ Object.setPrototypeOf(this, DependencyFailedException.prototype);
235
+ this.Message = opts.Message;
236
+ }
237
+ }
238
+ class LoopDetectedException extends LexRuntimeServiceServiceException {
239
+ name = "LoopDetectedException";
240
+ $fault = "server";
241
+ Message;
242
+ constructor(opts) {
243
+ super({
244
+ name: "LoopDetectedException",
245
+ $fault: "server",
246
+ ...opts,
247
+ });
248
+ Object.setPrototypeOf(this, LoopDetectedException.prototype);
249
+ this.Message = opts.Message;
250
+ }
251
+ }
252
+ class NotAcceptableException extends LexRuntimeServiceServiceException {
253
+ name = "NotAcceptableException";
254
+ $fault = "client";
255
+ constructor(opts) {
256
+ super({
257
+ name: "NotAcceptableException",
258
+ $fault: "client",
259
+ ...opts,
260
+ });
261
+ Object.setPrototypeOf(this, NotAcceptableException.prototype);
262
+ }
263
+ }
264
+ class RequestTimeoutException extends LexRuntimeServiceServiceException {
265
+ name = "RequestTimeoutException";
266
+ $fault = "client";
267
+ constructor(opts) {
268
+ super({
269
+ name: "RequestTimeoutException",
270
+ $fault: "client",
271
+ ...opts,
272
+ });
273
+ Object.setPrototypeOf(this, RequestTimeoutException.prototype);
274
+ }
275
+ }
276
+ class UnsupportedMediaTypeException extends LexRuntimeServiceServiceException {
277
+ name = "UnsupportedMediaTypeException";
278
+ $fault = "client";
279
+ constructor(opts) {
280
+ super({
281
+ name: "UnsupportedMediaTypeException",
282
+ $fault: "client",
283
+ ...opts,
284
+ });
285
+ Object.setPrototypeOf(this, UnsupportedMediaTypeException.prototype);
286
+ }
287
+ }
288
+
289
+ const _A = "Accept";
290
+ const _AC = "ActiveContext";
291
+ const _ACL = "ActiveContextsList";
292
+ const _ACPM = "ActiveContextParametersMap";
293
+ const _ACTTL = "ActiveContextTimeToLive";
294
+ const _B = "Button";
295
+ const _BGE = "BadGatewayException";
296
+ const _BRE = "BadRequestException";
297
+ const _BS = "BlobStream";
298
+ const _CE = "ConflictException";
299
+ const _CT = "Content-Type";
300
+ const _DA = "DialogAction";
301
+ const _DFE = "DependencyFailedException";
302
+ const _DS = "DeleteSession";
303
+ const _DSR = "DeleteSessionRequest";
304
+ const _DSRe = "DeleteSessionResponse";
305
+ const _GA = "GenericAttachment";
306
+ const _GS = "GetSession";
307
+ const _GSR = "GetSessionRequest";
308
+ const _GSRe = "GetSessionResponse";
309
+ const _IC = "IntentConfidence";
310
+ const _IFE = "InternalFailureException";
311
+ const _IL = "IntentList";
312
+ const _IS = "IntentSummary";
313
+ const _ISL = "IntentSummaryList";
314
+ const _LDE = "LoopDetectedException";
315
+ const _LEE = "LimitExceededException";
316
+ const _M = "Message";
317
+ const _NAE = "NotAcceptableException";
318
+ const _NFE = "NotFoundException";
319
+ const _PC = "PostContent";
320
+ const _PCR = "PostContentRequest";
321
+ const _PCRo = "PostContentResponse";
322
+ const _PI = "PredictedIntent";
323
+ const _PS = "PutSession";
324
+ const _PSR = "PutSessionRequest";
325
+ const _PSRu = "PutSessionResponse";
326
+ const _PT = "PostText";
327
+ const _PTR = "PostTextRequest";
328
+ const _PTRo = "PostTextResponse";
329
+ const _RA = "Retry-After";
330
+ const _RC = "ResponseCard";
331
+ const _RTE = "RequestTimeoutException";
332
+ const _SJACS = "SynthesizedJsonActiveContextsString";
333
+ const _SJAS = "SynthesizedJsonAttributesString";
334
+ const _SJS = "SynthesizedJsonString";
335
+ const _SM = "StringMap";
336
+ const _SR = "SentimentResponse";
337
+ const _SS = "SensitiveString";
338
+ const _SSU = "SensitiveStringUnbounded";
339
+ const _T = "Text";
340
+ const _UMTE = "UnsupportedMediaTypeException";
341
+ const _a = "application/json";
342
+ const _aC = "activeContexts";
343
+ const _aI = "alternativeIntents";
344
+ const _aLU = "attachmentLinkUrl";
345
+ const _aS = "audioStream";
346
+ const _ac = "accept";
347
+ const _b = "buttons";
348
+ const _bA = "botAlias";
349
+ const _bN = "botName";
350
+ const _bV = "botVersion";
351
+ const _c = "client";
352
+ const _cL = "checkpointLabel";
353
+ const _cLF = "checkpointLabelFilter";
354
+ const _cS = "confirmationStatus";
355
+ const _cT = "contentType";
356
+ const _dA = "dialogAction";
357
+ const _dAT = "dialogActionType";
358
+ const _dS = "dialogState";
359
+ const _e = "error";
360
+ const _eIT = "encodedInputTranscript";
361
+ const _eM = "encodedMessage";
362
+ const _fS = "fulfillmentState";
363
+ const _gA = "genericAttachments";
364
+ const _gAL = "genericAttachmentList";
365
+ const _h = "http";
366
+ const _hE = "httpError";
367
+ const _hH = "httpHeader";
368
+ const _hQ = "httpQuery";
369
+ const _iN = "intentName";
370
+ const _iS = "inputStream";
371
+ const _iT = "inputTranscript";
372
+ const _iTn = "inputText";
373
+ const _iU = "imageUrl";
374
+ const _lOB = "listOfButtons";
375
+ const _m = "message";
376
+ const _mF = "messageFormat";
377
+ const _mT = "mediaType";
378
+ const _n = "name";
379
+ const _nIC = "nluIntentConfidence";
380
+ const _p = "parameters";
381
+ const _rA = "requestAttributes";
382
+ const _rAS = "retryAfterSeconds";
383
+ const _rC = "responseCard";
384
+ const _rISV = "recentIntentSummaryView";
385
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.lexruntimeservice";
386
+ const _sA = "sessionAttributes";
387
+ const _sI = "sessionId";
388
+ const _sL = "sentimentLabel";
389
+ const _sR = "sentimentResponse";
390
+ const _sS = "sentimentScore";
391
+ const _sT = "subTitle";
392
+ const _sTE = "slotToElicit";
393
+ const _sc = "score";
394
+ const _se = "server";
395
+ const _sen = "sensitive";
396
+ const _sl = "slots";
397
+ const _st = "streaming";
398
+ const _t = "text";
399
+ const _tTL = "timeToLive";
400
+ const _tTLIS = "timeToLiveInSeconds";
401
+ const _tTLu = "turnsToLive";
402
+ const _ti = "title";
403
+ const _ty = "type";
404
+ const _uI = "userId";
405
+ const _v = "value";
406
+ const _ve = "version";
407
+ const _xalac = "x-amz-lex-active-contexts";
408
+ const _xalai = "x-amz-lex-alternative-intents";
409
+ const _xalbv = "x-amz-lex-bot-version";
410
+ const _xalds = "x-amz-lex-dialog-state";
411
+ const _xaleit = "x-amz-lex-encoded-input-transcript";
412
+ const _xalem = "x-amz-lex-encoded-message";
413
+ const _xalin = "x-amz-lex-intent-name";
414
+ const _xalit = "x-amz-lex-input-transcript";
415
+ const _xalm = "x-amz-lex-message";
416
+ const _xalmf = "x-amz-lex-message-format";
417
+ const _xalnic = "x-amz-lex-nlu-intent-confidence";
418
+ const _xalra = "x-amz-lex-request-attributes";
419
+ const _xals = "x-amz-lex-slots";
420
+ const _xals_ = "x-amz-lex-sentiment";
421
+ const _xalsa = "x-amz-lex-session-attributes";
422
+ const _xalsi = "x-amz-lex-session-id";
423
+ const _xalste = "x-amz-lex-slot-to-elicit";
424
+ const n0 = "com.amazonaws.lexruntimeservice";
425
+ const _s_registry = TypeRegistry.for(_s);
426
+ var LexRuntimeServiceServiceException$ = [-3, _s, "LexRuntimeServiceServiceException", 0, [], []];
427
+ _s_registry.registerError(LexRuntimeServiceServiceException$, LexRuntimeServiceServiceException);
428
+ const n0_registry = TypeRegistry.for(n0);
429
+ var BadGatewayException$ = [-3, n0, _BGE,
430
+ { [_e]: _se, [_hE]: 502 },
431
+ [_M],
432
+ [0]
433
+ ];
434
+ n0_registry.registerError(BadGatewayException$, BadGatewayException);
435
+ var BadRequestException$ = [-3, n0, _BRE,
436
+ { [_e]: _c, [_hE]: 400 },
437
+ [_m],
438
+ [0]
439
+ ];
440
+ n0_registry.registerError(BadRequestException$, BadRequestException);
441
+ var ConflictException$ = [-3, n0, _CE,
442
+ { [_e]: _c, [_hE]: 409 },
443
+ [_m],
444
+ [0]
445
+ ];
446
+ n0_registry.registerError(ConflictException$, ConflictException);
447
+ var DependencyFailedException$ = [-3, n0, _DFE,
448
+ { [_e]: _c, [_hE]: 424 },
449
+ [_M],
450
+ [0]
451
+ ];
452
+ n0_registry.registerError(DependencyFailedException$, DependencyFailedException);
453
+ var InternalFailureException$ = [-3, n0, _IFE,
454
+ { [_e]: _se, [_hE]: 500 },
455
+ [_m],
456
+ [0]
457
+ ];
458
+ n0_registry.registerError(InternalFailureException$, InternalFailureException);
459
+ var LimitExceededException$ = [-3, n0, _LEE,
460
+ { [_e]: _c, [_hE]: 429 },
461
+ [_rAS, _m],
462
+ [[0, { [_hH]: _RA }], 0]
463
+ ];
464
+ n0_registry.registerError(LimitExceededException$, LimitExceededException);
465
+ var LoopDetectedException$ = [-3, n0, _LDE,
466
+ { [_e]: _se, [_hE]: 508 },
467
+ [_M],
468
+ [0]
469
+ ];
470
+ n0_registry.registerError(LoopDetectedException$, LoopDetectedException);
471
+ var NotAcceptableException$ = [-3, n0, _NAE,
472
+ { [_e]: _c, [_hE]: 406 },
473
+ [_m],
474
+ [0]
475
+ ];
476
+ n0_registry.registerError(NotAcceptableException$, NotAcceptableException);
477
+ var NotFoundException$ = [-3, n0, _NFE,
478
+ { [_e]: _c, [_hE]: 404 },
479
+ [_m],
480
+ [0]
481
+ ];
482
+ n0_registry.registerError(NotFoundException$, NotFoundException);
483
+ var RequestTimeoutException$ = [-3, n0, _RTE,
484
+ { [_e]: _c, [_hE]: 408 },
485
+ [_m],
486
+ [0]
487
+ ];
488
+ n0_registry.registerError(RequestTimeoutException$, RequestTimeoutException);
489
+ var UnsupportedMediaTypeException$ = [-3, n0, _UMTE,
490
+ { [_e]: _c, [_hE]: 415 },
491
+ [_m],
492
+ [0]
493
+ ];
494
+ n0_registry.registerError(UnsupportedMediaTypeException$, UnsupportedMediaTypeException);
495
+ const errorTypeRegistries = [
496
+ _s_registry,
497
+ n0_registry,
498
+ ];
499
+ var BlobStream = [0, n0, _BS, { [_st]: 1 }, 42];
500
+ var SensitiveString = [0, n0, _SS, 8, 0];
501
+ var SensitiveStringUnbounded = [0, n0, _SSU, 8, 0];
502
+ var SynthesizedJsonActiveContextsString = [0, n0, _SJACS, { [_mT]: _a, [_sen]: 1 }, 0];
503
+ var SynthesizedJsonAttributesString = [0, n0, _SJAS, { [_mT]: _a, [_sen]: 1 }, 0];
504
+ var SynthesizedJsonString = [0, n0, _SJS, { [_mT]: _a }, 0];
505
+ var Text = [0, n0, _T, 8, 0];
506
+ var ActiveContext$ = [3, n0, _AC,
507
+ 0,
508
+ [_n, _tTL, _p],
509
+ [0, () => ActiveContextTimeToLive$, [() => ActiveContextParametersMap, 0]], 3
510
+ ];
511
+ var ActiveContextTimeToLive$ = [3, n0, _ACTTL,
512
+ 0,
513
+ [_tTLIS, _tTLu],
514
+ [1, 1]
515
+ ];
516
+ var Button$ = [3, n0, _B,
517
+ 0,
518
+ [_t, _v],
519
+ [0, 0], 2
520
+ ];
521
+ var DeleteSessionRequest$ = [3, n0, _DSR,
522
+ 0,
523
+ [_bN, _bA, _uI],
524
+ [[0, 1], [0, 1], [0, 1]], 3
525
+ ];
526
+ var DeleteSessionResponse$ = [3, n0, _DSRe,
527
+ 0,
528
+ [_bN, _bA, _uI, _sI],
529
+ [0, 0, 0, 0]
530
+ ];
531
+ var DialogAction$ = [3, n0, _DA,
532
+ 0,
533
+ [_ty, _iN, _sl, _sTE, _fS, _m, _mF],
534
+ [0, 0, [() => StringMap, 0], 0, 0, [() => Text, 0], 0], 1
535
+ ];
536
+ var GenericAttachment$ = [3, n0, _GA,
537
+ 0,
538
+ [_ti, _sT, _aLU, _iU, _b],
539
+ [0, 0, 0, 0, () => listOfButtons]
540
+ ];
541
+ var GetSessionRequest$ = [3, n0, _GSR,
542
+ 0,
543
+ [_bN, _bA, _uI, _cLF],
544
+ [[0, 1], [0, 1], [0, 1], [0, { [_hQ]: _cLF }]], 3
545
+ ];
546
+ var GetSessionResponse$ = [3, n0, _GSRe,
547
+ 0,
548
+ [_rISV, _sA, _sI, _dA, _aC],
549
+ [[() => IntentSummaryList, 0], [() => StringMap, 0], 0, [() => DialogAction$, 0], [() => ActiveContextsList, 0]]
550
+ ];
551
+ var IntentConfidence$ = [3, n0, _IC,
552
+ 0,
553
+ [_sc],
554
+ [1]
555
+ ];
556
+ var IntentSummary$ = [3, n0, _IS,
557
+ 0,
558
+ [_dAT, _iN, _cL, _sl, _cS, _fS, _sTE],
559
+ [0, 0, 0, [() => StringMap, 0], 0, 0, 0], 1
560
+ ];
561
+ var PostContentRequest$ = [3, n0, _PCR,
562
+ 0,
563
+ [_bN, _bA, _uI, _cT, _iS, _sA, _rA, _ac, _aC],
564
+ [[0, 1], [0, 1], [0, 1], [0, { [_hH]: _CT }], [() => BlobStream, 16], [() => SynthesizedJsonAttributesString, { [_hH]: _xalsa }], [() => SynthesizedJsonAttributesString, { [_hH]: _xalra }], [0, { [_hH]: _A }], [() => SynthesizedJsonActiveContextsString, { [_hH]: _xalac }]], 5
565
+ ];
566
+ var PostContentResponse$ = [3, n0, _PCRo,
567
+ 0,
568
+ [_cT, _iN, _nIC, _aI, _sl, _sA, _sR, _m, _eM, _mF, _dS, _sTE, _iT, _eIT, _aS, _bV, _sI, _aC],
569
+ [[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 }]]
570
+ ];
571
+ var PostTextRequest$ = [3, n0, _PTR,
572
+ 0,
573
+ [_bN, _bA, _uI, _iTn, _sA, _rA, _aC],
574
+ [[0, 1], [0, 1], [0, 1], [() => Text, 0], [() => StringMap, 0], [() => StringMap, 0], [() => ActiveContextsList, 0]], 4
575
+ ];
576
+ var PostTextResponse$ = [3, n0, _PTRo,
577
+ 0,
578
+ [_iN, _nIC, _aI, _sl, _sA, _m, _sR, _mF, _dS, _sTE, _rC, _sI, _bV, _aC],
579
+ [0, () => IntentConfidence$, [() => IntentList, 0], [() => StringMap, 0], [() => StringMap, 0], [() => Text, 0], () => SentimentResponse$, 0, 0, 0, () => ResponseCard$, 0, 0, [() => ActiveContextsList, 0]]
580
+ ];
581
+ var PredictedIntent$ = [3, n0, _PI,
582
+ 0,
583
+ [_iN, _nIC, _sl],
584
+ [0, () => IntentConfidence$, [() => StringMap, 0]]
585
+ ];
586
+ var PutSessionRequest$ = [3, n0, _PSR,
587
+ 0,
588
+ [_bN, _bA, _uI, _sA, _dA, _rISV, _ac, _aC],
589
+ [[0, 1], [0, 1], [0, 1], [() => StringMap, 0], [() => DialogAction$, 0], [() => IntentSummaryList, 0], [0, { [_hH]: _A }], [() => ActiveContextsList, 0]], 3
590
+ ];
591
+ var PutSessionResponse$ = [3, n0, _PSRu,
592
+ 0,
593
+ [_cT, _iN, _sl, _sA, _m, _eM, _mF, _dS, _sTE, _aS, _sI, _aC],
594
+ [[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 }]]
595
+ ];
596
+ var ResponseCard$ = [3, n0, _RC,
597
+ 0,
598
+ [_ve, _cT, _gA],
599
+ [0, 0, () => genericAttachmentList]
600
+ ];
601
+ var SentimentResponse$ = [3, n0, _SR,
602
+ 0,
603
+ [_sL, _sS],
604
+ [0, 0]
605
+ ];
606
+ var ActiveContextsList = [1, n0, _ACL,
607
+ 8, [() => ActiveContext$,
608
+ 0]
609
+ ];
610
+ var genericAttachmentList = [1, n0, _gAL,
611
+ 0, () => GenericAttachment$
612
+ ];
613
+ var IntentList = [1, n0, _IL,
614
+ 0, [() => PredictedIntent$,
615
+ 0]
616
+ ];
617
+ var IntentSummaryList = [1, n0, _ISL,
618
+ 0, [() => IntentSummary$,
619
+ 0]
620
+ ];
621
+ var listOfButtons = [1, n0, _lOB,
622
+ 0, () => Button$
623
+ ];
624
+ var ActiveContextParametersMap = [2, n0, _ACPM,
625
+ 0, [0,
626
+ 0],
627
+ [() => Text,
628
+ 0]
629
+ ];
630
+ var StringMap = [2, n0, _SM,
631
+ 8, 0, 0
632
+ ];
633
+ var DeleteSession$ = [9, n0, _DS,
634
+ { [_h]: ["DELETE", "/bot/{botName}/alias/{botAlias}/user/{userId}/session", 200] }, () => DeleteSessionRequest$, () => DeleteSessionResponse$
635
+ ];
636
+ var GetSession$ = [9, n0, _GS,
637
+ { [_h]: ["GET", "/bot/{botName}/alias/{botAlias}/user/{userId}/session", 200] }, () => GetSessionRequest$, () => GetSessionResponse$
638
+ ];
639
+ var PostContent$ = [9, n0, _PC,
640
+ { [_h]: ["POST", "/bot/{botName}/alias/{botAlias}/user/{userId}/content", 200] }, () => PostContentRequest$, () => PostContentResponse$
641
+ ];
642
+ var PostText$ = [9, n0, _PT,
643
+ { [_h]: ["POST", "/bot/{botName}/alias/{botAlias}/user/{userId}/text", 200] }, () => PostTextRequest$, () => PostTextResponse$
644
+ ];
645
+ var PutSession$ = [9, n0, _PS,
646
+ { [_h]: ["POST", "/bot/{botName}/alias/{botAlias}/user/{userId}/session", 200] }, () => PutSessionRequest$, () => PutSessionResponse$
647
+ ];
648
+
649
+ const getRuntimeConfig$1 = (config) => {
650
+ return {
651
+ apiVersion: "2016-11-28",
652
+ base64Decoder: config?.base64Decoder ?? fromBase64,
653
+ base64Encoder: config?.base64Encoder ?? toBase64,
654
+ disableHostPrefix: config?.disableHostPrefix ?? false,
655
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
656
+ extensions: config?.extensions ?? [],
657
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultLexRuntimeServiceHttpAuthSchemeProvider,
658
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
659
+ {
660
+ schemeId: "aws.auth#sigv4",
661
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
662
+ signer: new AwsSdkSigV4Signer(),
663
+ },
664
+ ],
665
+ logger: config?.logger ?? new NoOpLogger(),
666
+ protocol: config?.protocol ?? AwsRestJsonProtocol,
667
+ protocolSettings: config?.protocolSettings ?? {
668
+ defaultNamespace: "com.amazonaws.lexruntimeservice",
669
+ errorTypeRegistries,
670
+ version: "2016-11-28",
671
+ serviceTarget: "AWSDeepSenseRunTimeService",
672
+ },
673
+ sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,
674
+ serviceId: config?.serviceId ?? "Lex Runtime Service",
675
+ sha256: config?.sha256 ?? Sha256,
676
+ urlParser: config?.urlParser ?? parseUrl,
677
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
678
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
679
+ };
680
+ };
681
+
682
+ const getRuntimeConfig = (config) => {
683
+ emitWarningIfUnsupportedVersion(process.version);
684
+ const defaultsMode = resolveDefaultsModeConfig(config);
685
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
686
+ const clientSharedValues = getRuntimeConfig$1(config);
687
+ emitWarningIfUnsupportedVersion$1(process.version);
688
+ const loaderConfig = {
689
+ profile: config?.profile,
690
+ logger: clientSharedValues.logger,
691
+ };
692
+ return {
693
+ ...clientSharedValues,
694
+ ...config,
695
+ runtime: "node",
696
+ defaultsMode,
697
+ authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
698
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
699
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider,
700
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
701
+ maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
702
+ region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
703
+ requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
704
+ retryMode: config?.retryMode ??
705
+ loadConfig({
706
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
707
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
708
+ }, config),
709
+ streamCollector: config?.streamCollector ?? streamCollector,
710
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
711
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
712
+ userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
713
+ };
714
+ };
715
+
34
716
  const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
717
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
718
  let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
@@ -217,16 +899,66 @@ const ContentType = {
217
899
  GENERIC: "application/vnd.amazonaws.card.generic",
218
900
  };
219
901
 
902
+ exports.ActiveContext$ = ActiveContext$;
903
+ exports.ActiveContextTimeToLive$ = ActiveContextTimeToLive$;
904
+ exports.BadGatewayException = BadGatewayException;
905
+ exports.BadGatewayException$ = BadGatewayException$;
906
+ exports.BadRequestException = BadRequestException;
907
+ exports.BadRequestException$ = BadRequestException$;
908
+ exports.Button$ = Button$;
220
909
  exports.ConfirmationStatus = ConfirmationStatus;
910
+ exports.ConflictException = ConflictException;
911
+ exports.ConflictException$ = ConflictException$;
221
912
  exports.ContentType = ContentType;
913
+ exports.DeleteSession$ = DeleteSession$;
222
914
  exports.DeleteSessionCommand = DeleteSessionCommand;
915
+ exports.DeleteSessionRequest$ = DeleteSessionRequest$;
916
+ exports.DeleteSessionResponse$ = DeleteSessionResponse$;
917
+ exports.DependencyFailedException = DependencyFailedException;
918
+ exports.DependencyFailedException$ = DependencyFailedException$;
919
+ exports.DialogAction$ = DialogAction$;
223
920
  exports.DialogActionType = DialogActionType;
224
921
  exports.DialogState = DialogState;
225
922
  exports.FulfillmentState = FulfillmentState;
923
+ exports.GenericAttachment$ = GenericAttachment$;
924
+ exports.GetSession$ = GetSession$;
226
925
  exports.GetSessionCommand = GetSessionCommand;
926
+ exports.GetSessionRequest$ = GetSessionRequest$;
927
+ exports.GetSessionResponse$ = GetSessionResponse$;
928
+ exports.IntentConfidence$ = IntentConfidence$;
929
+ exports.IntentSummary$ = IntentSummary$;
930
+ exports.InternalFailureException = InternalFailureException;
931
+ exports.InternalFailureException$ = InternalFailureException$;
227
932
  exports.LexRuntimeService = LexRuntimeService;
228
933
  exports.LexRuntimeServiceClient = LexRuntimeServiceClient;
934
+ exports.LexRuntimeServiceServiceException = LexRuntimeServiceServiceException;
935
+ exports.LexRuntimeServiceServiceException$ = LexRuntimeServiceServiceException$;
936
+ exports.LimitExceededException = LimitExceededException;
937
+ exports.LimitExceededException$ = LimitExceededException$;
938
+ exports.LoopDetectedException = LoopDetectedException;
939
+ exports.LoopDetectedException$ = LoopDetectedException$;
229
940
  exports.MessageFormatType = MessageFormatType;
941
+ exports.NotAcceptableException = NotAcceptableException;
942
+ exports.NotAcceptableException$ = NotAcceptableException$;
943
+ exports.NotFoundException = NotFoundException;
944
+ exports.NotFoundException$ = NotFoundException$;
945
+ exports.PostContent$ = PostContent$;
230
946
  exports.PostContentCommand = PostContentCommand;
947
+ exports.PostContentRequest$ = PostContentRequest$;
948
+ exports.PostContentResponse$ = PostContentResponse$;
949
+ exports.PostText$ = PostText$;
231
950
  exports.PostTextCommand = PostTextCommand;
951
+ exports.PostTextRequest$ = PostTextRequest$;
952
+ exports.PostTextResponse$ = PostTextResponse$;
953
+ exports.PredictedIntent$ = PredictedIntent$;
954
+ exports.PutSession$ = PutSession$;
232
955
  exports.PutSessionCommand = PutSessionCommand;
956
+ exports.PutSessionRequest$ = PutSessionRequest$;
957
+ exports.PutSessionResponse$ = PutSessionResponse$;
958
+ exports.RequestTimeoutException = RequestTimeoutException;
959
+ exports.RequestTimeoutException$ = RequestTimeoutException$;
960
+ exports.ResponseCard$ = ResponseCard$;
961
+ exports.SentimentResponse$ = SentimentResponse$;
962
+ exports.UnsupportedMediaTypeException = UnsupportedMediaTypeException;
963
+ exports.UnsupportedMediaTypeException$ = UnsupportedMediaTypeException$;
964
+ exports.errorTypeRegistries = errorTypeRegistries;