@aws-sdk/client-lex-runtime-v2 3.928.0 → 3.930.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 +761 -1106
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/LexRuntimeV2Client.js +2 -0
- package/dist-es/commands/DeleteSessionCommand.js +3 -9
- package/dist-es/commands/GetSessionCommand.js +3 -10
- package/dist-es/commands/PutSessionCommand.js +3 -10
- package/dist-es/commands/RecognizeTextCommand.js +3 -10
- package/dist-es/commands/RecognizeUtteranceCommand.js +3 -10
- package/dist-es/commands/StartConversationCommand.js +3 -11
- package/dist-es/models/models_0.js +0 -169
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +746 -0
- package/dist-types/LexRuntimeV2Client.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +8 -78
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +78 -0
- package/dist-types/ts3.4/LexRuntimeV2Client.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -61
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +85 -0
- package/package.json +39 -39
- package/dist-es/protocols/Aws_restJson1.js +0 -873
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -56
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -81
|
@@ -1,873 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { LexRuntimeV2ServiceException as __BaseException } from "../models/LexRuntimeV2ServiceException";
|
|
5
|
-
import { AccessDeniedException, BadGatewayException, ConflictException, DependencyFailedException, InternalServerException, ResourceNotFoundException, StartConversationRequestEventStream, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
-
export const se_DeleteSessionCommand = async (input, context) => {
|
|
7
|
-
const b = rb(input, context);
|
|
8
|
-
const headers = {};
|
|
9
|
-
b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}");
|
|
10
|
-
b.p("botId", () => input.botId, "{botId}", false);
|
|
11
|
-
b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
|
|
12
|
-
b.p("localeId", () => input.localeId, "{localeId}", false);
|
|
13
|
-
b.p("sessionId", () => input.sessionId, "{sessionId}", false);
|
|
14
|
-
let body;
|
|
15
|
-
b.m("DELETE").h(headers).b(body);
|
|
16
|
-
return b.build();
|
|
17
|
-
};
|
|
18
|
-
export const se_GetSessionCommand = async (input, context) => {
|
|
19
|
-
const b = rb(input, context);
|
|
20
|
-
const headers = {};
|
|
21
|
-
b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}");
|
|
22
|
-
b.p("botId", () => input.botId, "{botId}", false);
|
|
23
|
-
b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
|
|
24
|
-
b.p("localeId", () => input.localeId, "{localeId}", false);
|
|
25
|
-
b.p("sessionId", () => input.sessionId, "{sessionId}", false);
|
|
26
|
-
let body;
|
|
27
|
-
b.m("GET").h(headers).b(body);
|
|
28
|
-
return b.build();
|
|
29
|
-
};
|
|
30
|
-
export const se_PutSessionCommand = async (input, context) => {
|
|
31
|
-
const b = rb(input, context);
|
|
32
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
33
|
-
"content-type": "application/json",
|
|
34
|
-
[_r]: input[_rCT],
|
|
35
|
-
});
|
|
36
|
-
b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}");
|
|
37
|
-
b.p("botId", () => input.botId, "{botId}", false);
|
|
38
|
-
b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
|
|
39
|
-
b.p("localeId", () => input.localeId, "{localeId}", false);
|
|
40
|
-
b.p("sessionId", () => input.sessionId, "{sessionId}", false);
|
|
41
|
-
let body;
|
|
42
|
-
body = JSON.stringify(take(input, {
|
|
43
|
-
messages: (_) => _json(_),
|
|
44
|
-
requestAttributes: (_) => _json(_),
|
|
45
|
-
sessionState: (_) => se_SessionState(_, context),
|
|
46
|
-
}));
|
|
47
|
-
b.m("POST").h(headers).b(body);
|
|
48
|
-
return b.build();
|
|
49
|
-
};
|
|
50
|
-
export const se_RecognizeTextCommand = async (input, context) => {
|
|
51
|
-
const b = rb(input, context);
|
|
52
|
-
const headers = {
|
|
53
|
-
"content-type": "application/json",
|
|
54
|
-
};
|
|
55
|
-
b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text");
|
|
56
|
-
b.p("botId", () => input.botId, "{botId}", false);
|
|
57
|
-
b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
|
|
58
|
-
b.p("localeId", () => input.localeId, "{localeId}", false);
|
|
59
|
-
b.p("sessionId", () => input.sessionId, "{sessionId}", false);
|
|
60
|
-
let body;
|
|
61
|
-
body = JSON.stringify(take(input, {
|
|
62
|
-
requestAttributes: (_) => _json(_),
|
|
63
|
-
sessionState: (_) => se_SessionState(_, context),
|
|
64
|
-
text: [],
|
|
65
|
-
}));
|
|
66
|
-
b.m("POST").h(headers).b(body);
|
|
67
|
-
return b.build();
|
|
68
|
-
};
|
|
69
|
-
export const se_RecognizeUtteranceCommand = async (input, context) => {
|
|
70
|
-
const b = rb(input, context);
|
|
71
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
72
|
-
"x-amz-content-sha256": "UNSIGNED-PAYLOAD",
|
|
73
|
-
[_ct]: input[_rCTe] || "application/octet-stream",
|
|
74
|
-
[_xalss]: input[_sS],
|
|
75
|
-
[_xalra]: input[_rA],
|
|
76
|
-
[_rct]: input[_rCT],
|
|
77
|
-
});
|
|
78
|
-
b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance");
|
|
79
|
-
b.p("botId", () => input.botId, "{botId}", false);
|
|
80
|
-
b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
|
|
81
|
-
b.p("localeId", () => input.localeId, "{localeId}", false);
|
|
82
|
-
b.p("sessionId", () => input.sessionId, "{sessionId}", false);
|
|
83
|
-
let body;
|
|
84
|
-
if (input.inputStream !== undefined) {
|
|
85
|
-
body = input.inputStream;
|
|
86
|
-
}
|
|
87
|
-
b.m("POST").h(headers).b(body);
|
|
88
|
-
return b.build();
|
|
89
|
-
};
|
|
90
|
-
export const se_StartConversationCommand = async (input, context) => {
|
|
91
|
-
const b = rb(input, context);
|
|
92
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
93
|
-
"content-type": "application/json",
|
|
94
|
-
[_xalcm]: input[_cM],
|
|
95
|
-
});
|
|
96
|
-
b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/conversation");
|
|
97
|
-
b.p("botId", () => input.botId, "{botId}", false);
|
|
98
|
-
b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
|
|
99
|
-
b.p("localeId", () => input.localeId, "{localeId}", false);
|
|
100
|
-
b.p("sessionId", () => input.sessionId, "{sessionId}", false);
|
|
101
|
-
let body;
|
|
102
|
-
if (input.requestEventStream !== undefined) {
|
|
103
|
-
body = se_StartConversationRequestEventStream(input.requestEventStream, context);
|
|
104
|
-
}
|
|
105
|
-
b.m("POST").h(headers).b(body);
|
|
106
|
-
return b.build();
|
|
107
|
-
};
|
|
108
|
-
export const de_DeleteSessionCommand = async (output, context) => {
|
|
109
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
110
|
-
return de_CommandError(output, context);
|
|
111
|
-
}
|
|
112
|
-
const contents = map({
|
|
113
|
-
$metadata: deserializeMetadata(output),
|
|
114
|
-
});
|
|
115
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
116
|
-
const doc = take(data, {
|
|
117
|
-
botAliasId: __expectString,
|
|
118
|
-
botId: __expectString,
|
|
119
|
-
localeId: __expectString,
|
|
120
|
-
sessionId: __expectString,
|
|
121
|
-
});
|
|
122
|
-
Object.assign(contents, doc);
|
|
123
|
-
return contents;
|
|
124
|
-
};
|
|
125
|
-
export const de_GetSessionCommand = async (output, context) => {
|
|
126
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
127
|
-
return de_CommandError(output, context);
|
|
128
|
-
}
|
|
129
|
-
const contents = map({
|
|
130
|
-
$metadata: deserializeMetadata(output),
|
|
131
|
-
});
|
|
132
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
133
|
-
const doc = take(data, {
|
|
134
|
-
interpretations: (_) => de_Interpretations(_, context),
|
|
135
|
-
messages: _json,
|
|
136
|
-
sessionId: __expectString,
|
|
137
|
-
sessionState: (_) => de_SessionState(_, context),
|
|
138
|
-
});
|
|
139
|
-
Object.assign(contents, doc);
|
|
140
|
-
return contents;
|
|
141
|
-
};
|
|
142
|
-
export const de_PutSessionCommand = async (output, context) => {
|
|
143
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
144
|
-
return de_CommandError(output, context);
|
|
145
|
-
}
|
|
146
|
-
const contents = map({
|
|
147
|
-
$metadata: deserializeMetadata(output),
|
|
148
|
-
[_cT]: [, output.headers[_ct]],
|
|
149
|
-
[_m]: [, output.headers[_xalm]],
|
|
150
|
-
[_sS]: [, output.headers[_xalss]],
|
|
151
|
-
[_rA]: [, output.headers[_xalra]],
|
|
152
|
-
[_sI]: [, output.headers[_xalsi]],
|
|
153
|
-
});
|
|
154
|
-
const data = output.body;
|
|
155
|
-
context.sdkStreamMixin(data);
|
|
156
|
-
contents.audioStream = data;
|
|
157
|
-
return contents;
|
|
158
|
-
};
|
|
159
|
-
export const de_RecognizeTextCommand = async (output, context) => {
|
|
160
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
161
|
-
return de_CommandError(output, context);
|
|
162
|
-
}
|
|
163
|
-
const contents = map({
|
|
164
|
-
$metadata: deserializeMetadata(output),
|
|
165
|
-
});
|
|
166
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
167
|
-
const doc = take(data, {
|
|
168
|
-
interpretations: (_) => de_Interpretations(_, context),
|
|
169
|
-
messages: _json,
|
|
170
|
-
recognizedBotMember: _json,
|
|
171
|
-
requestAttributes: _json,
|
|
172
|
-
sessionId: __expectString,
|
|
173
|
-
sessionState: (_) => de_SessionState(_, context),
|
|
174
|
-
});
|
|
175
|
-
Object.assign(contents, doc);
|
|
176
|
-
return contents;
|
|
177
|
-
};
|
|
178
|
-
export const de_RecognizeUtteranceCommand = async (output, context) => {
|
|
179
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
180
|
-
return de_CommandError(output, context);
|
|
181
|
-
}
|
|
182
|
-
const contents = map({
|
|
183
|
-
$metadata: deserializeMetadata(output),
|
|
184
|
-
[_iM]: [, output.headers[_xalim]],
|
|
185
|
-
[_cT]: [, output.headers[_ct]],
|
|
186
|
-
[_m]: [, output.headers[_xalm]],
|
|
187
|
-
[_i]: [, output.headers[_xali]],
|
|
188
|
-
[_sS]: [, output.headers[_xalss]],
|
|
189
|
-
[_rA]: [, output.headers[_xalra]],
|
|
190
|
-
[_sI]: [, output.headers[_xalsi]],
|
|
191
|
-
[_iT]: [, output.headers[_xalit]],
|
|
192
|
-
[_rBM]: [, output.headers[_xalrbm]],
|
|
193
|
-
});
|
|
194
|
-
const data = output.body;
|
|
195
|
-
context.sdkStreamMixin(data);
|
|
196
|
-
contents.audioStream = data;
|
|
197
|
-
return contents;
|
|
198
|
-
};
|
|
199
|
-
export const de_StartConversationCommand = async (output, context) => {
|
|
200
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
201
|
-
return de_CommandError(output, context);
|
|
202
|
-
}
|
|
203
|
-
const contents = map({
|
|
204
|
-
$metadata: deserializeMetadata(output),
|
|
205
|
-
});
|
|
206
|
-
const data = output.body;
|
|
207
|
-
contents.responseEventStream = de_StartConversationResponseEventStream(data, context);
|
|
208
|
-
return contents;
|
|
209
|
-
};
|
|
210
|
-
const de_CommandError = async (output, context) => {
|
|
211
|
-
const parsedOutput = {
|
|
212
|
-
...output,
|
|
213
|
-
body: await parseErrorBody(output.body, context),
|
|
214
|
-
};
|
|
215
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
216
|
-
switch (errorCode) {
|
|
217
|
-
case "AccessDeniedException":
|
|
218
|
-
case "com.amazonaws.lexruntimev2#AccessDeniedException":
|
|
219
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
220
|
-
case "ConflictException":
|
|
221
|
-
case "com.amazonaws.lexruntimev2#ConflictException":
|
|
222
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
223
|
-
case "InternalServerException":
|
|
224
|
-
case "com.amazonaws.lexruntimev2#InternalServerException":
|
|
225
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
226
|
-
case "ResourceNotFoundException":
|
|
227
|
-
case "com.amazonaws.lexruntimev2#ResourceNotFoundException":
|
|
228
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
229
|
-
case "ThrottlingException":
|
|
230
|
-
case "com.amazonaws.lexruntimev2#ThrottlingException":
|
|
231
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
232
|
-
case "ValidationException":
|
|
233
|
-
case "com.amazonaws.lexruntimev2#ValidationException":
|
|
234
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
235
|
-
case "BadGatewayException":
|
|
236
|
-
case "com.amazonaws.lexruntimev2#BadGatewayException":
|
|
237
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
238
|
-
case "DependencyFailedException":
|
|
239
|
-
case "com.amazonaws.lexruntimev2#DependencyFailedException":
|
|
240
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
241
|
-
default:
|
|
242
|
-
const parsedBody = parsedOutput.body;
|
|
243
|
-
return throwDefaultError({
|
|
244
|
-
output,
|
|
245
|
-
parsedBody,
|
|
246
|
-
errorCode,
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
251
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
252
|
-
const contents = map({});
|
|
253
|
-
const data = parsedOutput.body;
|
|
254
|
-
const doc = take(data, {
|
|
255
|
-
message: __expectString,
|
|
256
|
-
});
|
|
257
|
-
Object.assign(contents, doc);
|
|
258
|
-
const exception = new AccessDeniedException({
|
|
259
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
260
|
-
...contents,
|
|
261
|
-
});
|
|
262
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
263
|
-
};
|
|
264
|
-
const de_BadGatewayExceptionRes = async (parsedOutput, context) => {
|
|
265
|
-
const contents = map({});
|
|
266
|
-
const data = parsedOutput.body;
|
|
267
|
-
const doc = take(data, {
|
|
268
|
-
message: __expectString,
|
|
269
|
-
});
|
|
270
|
-
Object.assign(contents, doc);
|
|
271
|
-
const exception = new BadGatewayException({
|
|
272
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
273
|
-
...contents,
|
|
274
|
-
});
|
|
275
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
276
|
-
};
|
|
277
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
278
|
-
const contents = map({});
|
|
279
|
-
const data = parsedOutput.body;
|
|
280
|
-
const doc = take(data, {
|
|
281
|
-
message: __expectString,
|
|
282
|
-
});
|
|
283
|
-
Object.assign(contents, doc);
|
|
284
|
-
const exception = new ConflictException({
|
|
285
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
286
|
-
...contents,
|
|
287
|
-
});
|
|
288
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
289
|
-
};
|
|
290
|
-
const de_DependencyFailedExceptionRes = async (parsedOutput, context) => {
|
|
291
|
-
const contents = map({});
|
|
292
|
-
const data = parsedOutput.body;
|
|
293
|
-
const doc = take(data, {
|
|
294
|
-
message: __expectString,
|
|
295
|
-
});
|
|
296
|
-
Object.assign(contents, doc);
|
|
297
|
-
const exception = new DependencyFailedException({
|
|
298
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
299
|
-
...contents,
|
|
300
|
-
});
|
|
301
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
302
|
-
};
|
|
303
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
304
|
-
const contents = map({});
|
|
305
|
-
const data = parsedOutput.body;
|
|
306
|
-
const doc = take(data, {
|
|
307
|
-
message: __expectString,
|
|
308
|
-
});
|
|
309
|
-
Object.assign(contents, doc);
|
|
310
|
-
const exception = new InternalServerException({
|
|
311
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
312
|
-
...contents,
|
|
313
|
-
});
|
|
314
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
315
|
-
};
|
|
316
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
317
|
-
const contents = map({});
|
|
318
|
-
const data = parsedOutput.body;
|
|
319
|
-
const doc = take(data, {
|
|
320
|
-
message: __expectString,
|
|
321
|
-
});
|
|
322
|
-
Object.assign(contents, doc);
|
|
323
|
-
const exception = new ResourceNotFoundException({
|
|
324
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
325
|
-
...contents,
|
|
326
|
-
});
|
|
327
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
328
|
-
};
|
|
329
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
330
|
-
const contents = map({});
|
|
331
|
-
const data = parsedOutput.body;
|
|
332
|
-
const doc = take(data, {
|
|
333
|
-
message: __expectString,
|
|
334
|
-
});
|
|
335
|
-
Object.assign(contents, doc);
|
|
336
|
-
const exception = new ThrottlingException({
|
|
337
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
338
|
-
...contents,
|
|
339
|
-
});
|
|
340
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
341
|
-
};
|
|
342
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
343
|
-
const contents = map({});
|
|
344
|
-
const data = parsedOutput.body;
|
|
345
|
-
const doc = take(data, {
|
|
346
|
-
message: __expectString,
|
|
347
|
-
});
|
|
348
|
-
Object.assign(contents, doc);
|
|
349
|
-
const exception = new ValidationException({
|
|
350
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
351
|
-
...contents,
|
|
352
|
-
});
|
|
353
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
354
|
-
};
|
|
355
|
-
const se_StartConversationRequestEventStream = (input, context) => {
|
|
356
|
-
const eventMarshallingVisitor = (event) => StartConversationRequestEventStream.visit(event, {
|
|
357
|
-
ConfigurationEvent: (value) => se_ConfigurationEvent_event(value, context),
|
|
358
|
-
AudioInputEvent: (value) => se_AudioInputEvent_event(value, context),
|
|
359
|
-
DTMFInputEvent: (value) => se_DTMFInputEvent_event(value, context),
|
|
360
|
-
TextInputEvent: (value) => se_TextInputEvent_event(value, context),
|
|
361
|
-
PlaybackCompletionEvent: (value) => se_PlaybackCompletionEvent_event(value, context),
|
|
362
|
-
DisconnectionEvent: (value) => se_DisconnectionEvent_event(value, context),
|
|
363
|
-
_: (value) => value,
|
|
364
|
-
});
|
|
365
|
-
return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
|
|
366
|
-
};
|
|
367
|
-
const se_AudioInputEvent_event = (input, context) => {
|
|
368
|
-
const headers = {
|
|
369
|
-
":event-type": { type: "string", value: "AudioInputEvent" },
|
|
370
|
-
":message-type": { type: "string", value: "event" },
|
|
371
|
-
":content-type": { type: "string", value: "application/json" },
|
|
372
|
-
};
|
|
373
|
-
let body = new Uint8Array();
|
|
374
|
-
body = se_AudioInputEvent(input, context);
|
|
375
|
-
body = context.utf8Decoder(JSON.stringify(body));
|
|
376
|
-
return { headers, body };
|
|
377
|
-
};
|
|
378
|
-
const se_ConfigurationEvent_event = (input, context) => {
|
|
379
|
-
const headers = {
|
|
380
|
-
":event-type": { type: "string", value: "ConfigurationEvent" },
|
|
381
|
-
":message-type": { type: "string", value: "event" },
|
|
382
|
-
":content-type": { type: "string", value: "application/json" },
|
|
383
|
-
};
|
|
384
|
-
let body = new Uint8Array();
|
|
385
|
-
body = se_ConfigurationEvent(input, context);
|
|
386
|
-
body = context.utf8Decoder(JSON.stringify(body));
|
|
387
|
-
return { headers, body };
|
|
388
|
-
};
|
|
389
|
-
const se_DisconnectionEvent_event = (input, context) => {
|
|
390
|
-
const headers = {
|
|
391
|
-
":event-type": { type: "string", value: "DisconnectionEvent" },
|
|
392
|
-
":message-type": { type: "string", value: "event" },
|
|
393
|
-
":content-type": { type: "string", value: "application/json" },
|
|
394
|
-
};
|
|
395
|
-
let body = new Uint8Array();
|
|
396
|
-
body = _json(input);
|
|
397
|
-
body = context.utf8Decoder(JSON.stringify(body));
|
|
398
|
-
return { headers, body };
|
|
399
|
-
};
|
|
400
|
-
const se_DTMFInputEvent_event = (input, context) => {
|
|
401
|
-
const headers = {
|
|
402
|
-
":event-type": { type: "string", value: "DTMFInputEvent" },
|
|
403
|
-
":message-type": { type: "string", value: "event" },
|
|
404
|
-
":content-type": { type: "string", value: "application/json" },
|
|
405
|
-
};
|
|
406
|
-
let body = new Uint8Array();
|
|
407
|
-
body = _json(input);
|
|
408
|
-
body = context.utf8Decoder(JSON.stringify(body));
|
|
409
|
-
return { headers, body };
|
|
410
|
-
};
|
|
411
|
-
const se_PlaybackCompletionEvent_event = (input, context) => {
|
|
412
|
-
const headers = {
|
|
413
|
-
":event-type": { type: "string", value: "PlaybackCompletionEvent" },
|
|
414
|
-
":message-type": { type: "string", value: "event" },
|
|
415
|
-
":content-type": { type: "string", value: "application/json" },
|
|
416
|
-
};
|
|
417
|
-
let body = new Uint8Array();
|
|
418
|
-
body = _json(input);
|
|
419
|
-
body = context.utf8Decoder(JSON.stringify(body));
|
|
420
|
-
return { headers, body };
|
|
421
|
-
};
|
|
422
|
-
const se_TextInputEvent_event = (input, context) => {
|
|
423
|
-
const headers = {
|
|
424
|
-
":event-type": { type: "string", value: "TextInputEvent" },
|
|
425
|
-
":message-type": { type: "string", value: "event" },
|
|
426
|
-
":content-type": { type: "string", value: "application/json" },
|
|
427
|
-
};
|
|
428
|
-
let body = new Uint8Array();
|
|
429
|
-
body = _json(input);
|
|
430
|
-
body = context.utf8Decoder(JSON.stringify(body));
|
|
431
|
-
return { headers, body };
|
|
432
|
-
};
|
|
433
|
-
const de_StartConversationResponseEventStream = (output, context) => {
|
|
434
|
-
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
435
|
-
if (event["PlaybackInterruptionEvent"] != null) {
|
|
436
|
-
return {
|
|
437
|
-
PlaybackInterruptionEvent: await de_PlaybackInterruptionEvent_event(event["PlaybackInterruptionEvent"], context),
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
if (event["TranscriptEvent"] != null) {
|
|
441
|
-
return {
|
|
442
|
-
TranscriptEvent: await de_TranscriptEvent_event(event["TranscriptEvent"], context),
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
if (event["IntentResultEvent"] != null) {
|
|
446
|
-
return {
|
|
447
|
-
IntentResultEvent: await de_IntentResultEvent_event(event["IntentResultEvent"], context),
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
if (event["TextResponseEvent"] != null) {
|
|
451
|
-
return {
|
|
452
|
-
TextResponseEvent: await de_TextResponseEvent_event(event["TextResponseEvent"], context),
|
|
453
|
-
};
|
|
454
|
-
}
|
|
455
|
-
if (event["AudioResponseEvent"] != null) {
|
|
456
|
-
return {
|
|
457
|
-
AudioResponseEvent: await de_AudioResponseEvent_event(event["AudioResponseEvent"], context),
|
|
458
|
-
};
|
|
459
|
-
}
|
|
460
|
-
if (event["HeartbeatEvent"] != null) {
|
|
461
|
-
return {
|
|
462
|
-
HeartbeatEvent: await de_HeartbeatEvent_event(event["HeartbeatEvent"], context),
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
if (event["AccessDeniedException"] != null) {
|
|
466
|
-
return {
|
|
467
|
-
AccessDeniedException: await de_AccessDeniedException_event(event["AccessDeniedException"], context),
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
if (event["ResourceNotFoundException"] != null) {
|
|
471
|
-
return {
|
|
472
|
-
ResourceNotFoundException: await de_ResourceNotFoundException_event(event["ResourceNotFoundException"], context),
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
|
-
if (event["ValidationException"] != null) {
|
|
476
|
-
return {
|
|
477
|
-
ValidationException: await de_ValidationException_event(event["ValidationException"], context),
|
|
478
|
-
};
|
|
479
|
-
}
|
|
480
|
-
if (event["ThrottlingException"] != null) {
|
|
481
|
-
return {
|
|
482
|
-
ThrottlingException: await de_ThrottlingException_event(event["ThrottlingException"], context),
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
if (event["InternalServerException"] != null) {
|
|
486
|
-
return {
|
|
487
|
-
InternalServerException: await de_InternalServerException_event(event["InternalServerException"], context),
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
if (event["ConflictException"] != null) {
|
|
491
|
-
return {
|
|
492
|
-
ConflictException: await de_ConflictException_event(event["ConflictException"], context),
|
|
493
|
-
};
|
|
494
|
-
}
|
|
495
|
-
if (event["DependencyFailedException"] != null) {
|
|
496
|
-
return {
|
|
497
|
-
DependencyFailedException: await de_DependencyFailedException_event(event["DependencyFailedException"], context),
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
if (event["BadGatewayException"] != null) {
|
|
501
|
-
return {
|
|
502
|
-
BadGatewayException: await de_BadGatewayException_event(event["BadGatewayException"], context),
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
|
-
return { $unknown: event };
|
|
506
|
-
});
|
|
507
|
-
};
|
|
508
|
-
const de_AccessDeniedException_event = async (output, context) => {
|
|
509
|
-
const parsedOutput = {
|
|
510
|
-
...output,
|
|
511
|
-
body: await parseBody(output.body, context),
|
|
512
|
-
};
|
|
513
|
-
return de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
514
|
-
};
|
|
515
|
-
const de_AudioResponseEvent_event = async (output, context) => {
|
|
516
|
-
const contents = {};
|
|
517
|
-
const data = await parseBody(output.body, context);
|
|
518
|
-
Object.assign(contents, de_AudioResponseEvent(data, context));
|
|
519
|
-
return contents;
|
|
520
|
-
};
|
|
521
|
-
const de_BadGatewayException_event = async (output, context) => {
|
|
522
|
-
const parsedOutput = {
|
|
523
|
-
...output,
|
|
524
|
-
body: await parseBody(output.body, context),
|
|
525
|
-
};
|
|
526
|
-
return de_BadGatewayExceptionRes(parsedOutput, context);
|
|
527
|
-
};
|
|
528
|
-
const de_ConflictException_event = async (output, context) => {
|
|
529
|
-
const parsedOutput = {
|
|
530
|
-
...output,
|
|
531
|
-
body: await parseBody(output.body, context),
|
|
532
|
-
};
|
|
533
|
-
return de_ConflictExceptionRes(parsedOutput, context);
|
|
534
|
-
};
|
|
535
|
-
const de_DependencyFailedException_event = async (output, context) => {
|
|
536
|
-
const parsedOutput = {
|
|
537
|
-
...output,
|
|
538
|
-
body: await parseBody(output.body, context),
|
|
539
|
-
};
|
|
540
|
-
return de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
541
|
-
};
|
|
542
|
-
const de_HeartbeatEvent_event = async (output, context) => {
|
|
543
|
-
const contents = {};
|
|
544
|
-
const data = await parseBody(output.body, context);
|
|
545
|
-
Object.assign(contents, _json(data));
|
|
546
|
-
return contents;
|
|
547
|
-
};
|
|
548
|
-
const de_IntentResultEvent_event = async (output, context) => {
|
|
549
|
-
const contents = {};
|
|
550
|
-
const data = await parseBody(output.body, context);
|
|
551
|
-
Object.assign(contents, de_IntentResultEvent(data, context));
|
|
552
|
-
return contents;
|
|
553
|
-
};
|
|
554
|
-
const de_InternalServerException_event = async (output, context) => {
|
|
555
|
-
const parsedOutput = {
|
|
556
|
-
...output,
|
|
557
|
-
body: await parseBody(output.body, context),
|
|
558
|
-
};
|
|
559
|
-
return de_InternalServerExceptionRes(parsedOutput, context);
|
|
560
|
-
};
|
|
561
|
-
const de_PlaybackInterruptionEvent_event = async (output, context) => {
|
|
562
|
-
const contents = {};
|
|
563
|
-
const data = await parseBody(output.body, context);
|
|
564
|
-
Object.assign(contents, _json(data));
|
|
565
|
-
return contents;
|
|
566
|
-
};
|
|
567
|
-
const de_ResourceNotFoundException_event = async (output, context) => {
|
|
568
|
-
const parsedOutput = {
|
|
569
|
-
...output,
|
|
570
|
-
body: await parseBody(output.body, context),
|
|
571
|
-
};
|
|
572
|
-
return de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
573
|
-
};
|
|
574
|
-
const de_TextResponseEvent_event = async (output, context) => {
|
|
575
|
-
const contents = {};
|
|
576
|
-
const data = await parseBody(output.body, context);
|
|
577
|
-
Object.assign(contents, _json(data));
|
|
578
|
-
return contents;
|
|
579
|
-
};
|
|
580
|
-
const de_ThrottlingException_event = async (output, context) => {
|
|
581
|
-
const parsedOutput = {
|
|
582
|
-
...output,
|
|
583
|
-
body: await parseBody(output.body, context),
|
|
584
|
-
};
|
|
585
|
-
return de_ThrottlingExceptionRes(parsedOutput, context);
|
|
586
|
-
};
|
|
587
|
-
const de_TranscriptEvent_event = async (output, context) => {
|
|
588
|
-
const contents = {};
|
|
589
|
-
const data = await parseBody(output.body, context);
|
|
590
|
-
Object.assign(contents, _json(data));
|
|
591
|
-
return contents;
|
|
592
|
-
};
|
|
593
|
-
const de_ValidationException_event = async (output, context) => {
|
|
594
|
-
const parsedOutput = {
|
|
595
|
-
...output,
|
|
596
|
-
body: await parseBody(output.body, context),
|
|
597
|
-
};
|
|
598
|
-
return de_ValidationExceptionRes(parsedOutput, context);
|
|
599
|
-
};
|
|
600
|
-
const se_AudioInputEvent = (input, context) => {
|
|
601
|
-
return take(input, {
|
|
602
|
-
audioChunk: context.base64Encoder,
|
|
603
|
-
clientTimestampMillis: [],
|
|
604
|
-
contentType: [],
|
|
605
|
-
eventId: [],
|
|
606
|
-
});
|
|
607
|
-
};
|
|
608
|
-
const se_ConfigurationEvent = (input, context) => {
|
|
609
|
-
return take(input, {
|
|
610
|
-
clientTimestampMillis: [],
|
|
611
|
-
disablePlayback: [],
|
|
612
|
-
eventId: [],
|
|
613
|
-
requestAttributes: _json,
|
|
614
|
-
responseContentType: [],
|
|
615
|
-
sessionState: (_) => se_SessionState(_, context),
|
|
616
|
-
welcomeMessages: _json,
|
|
617
|
-
});
|
|
618
|
-
};
|
|
619
|
-
const se_DialogAction = (input, context) => {
|
|
620
|
-
return take(input, {
|
|
621
|
-
slotElicitationStyle: [],
|
|
622
|
-
slotToElicit: [],
|
|
623
|
-
subSlotToElicit: (_) => se_ElicitSubSlot(_, context),
|
|
624
|
-
type: [],
|
|
625
|
-
});
|
|
626
|
-
};
|
|
627
|
-
const se_ElicitSubSlot = (input, context) => {
|
|
628
|
-
return take(input, {
|
|
629
|
-
name: [],
|
|
630
|
-
subSlotToElicit: (_) => se_ElicitSubSlot(_, context),
|
|
631
|
-
});
|
|
632
|
-
};
|
|
633
|
-
const se_Intent = (input, context) => {
|
|
634
|
-
return take(input, {
|
|
635
|
-
confirmationState: [],
|
|
636
|
-
name: [],
|
|
637
|
-
slots: (_) => se_Slots(_, context),
|
|
638
|
-
state: [],
|
|
639
|
-
});
|
|
640
|
-
};
|
|
641
|
-
const se_RuntimeHintDetails = (input, context) => {
|
|
642
|
-
return take(input, {
|
|
643
|
-
runtimeHintValues: _json,
|
|
644
|
-
subSlotHints: (_) => se_SlotHintsSlotMap(_, context),
|
|
645
|
-
});
|
|
646
|
-
};
|
|
647
|
-
const se_RuntimeHints = (input, context) => {
|
|
648
|
-
return take(input, {
|
|
649
|
-
slotHints: (_) => se_SlotHintsIntentMap(_, context),
|
|
650
|
-
});
|
|
651
|
-
};
|
|
652
|
-
const se_SessionState = (input, context) => {
|
|
653
|
-
return take(input, {
|
|
654
|
-
activeContexts: _json,
|
|
655
|
-
dialogAction: (_) => se_DialogAction(_, context),
|
|
656
|
-
intent: (_) => se_Intent(_, context),
|
|
657
|
-
originatingRequestId: [],
|
|
658
|
-
runtimeHints: (_) => se_RuntimeHints(_, context),
|
|
659
|
-
sessionAttributes: _json,
|
|
660
|
-
});
|
|
661
|
-
};
|
|
662
|
-
const se_Slot = (input, context) => {
|
|
663
|
-
return take(input, {
|
|
664
|
-
shape: [],
|
|
665
|
-
subSlots: (_) => se_Slots(_, context),
|
|
666
|
-
value: _json,
|
|
667
|
-
values: (_) => se_Values(_, context),
|
|
668
|
-
});
|
|
669
|
-
};
|
|
670
|
-
const se_SlotHintsIntentMap = (input, context) => {
|
|
671
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
672
|
-
if (value === null) {
|
|
673
|
-
return acc;
|
|
674
|
-
}
|
|
675
|
-
acc[key] = se_SlotHintsSlotMap(value, context);
|
|
676
|
-
return acc;
|
|
677
|
-
}, {});
|
|
678
|
-
};
|
|
679
|
-
const se_SlotHintsSlotMap = (input, context) => {
|
|
680
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
681
|
-
if (value === null) {
|
|
682
|
-
return acc;
|
|
683
|
-
}
|
|
684
|
-
acc[key] = se_RuntimeHintDetails(value, context);
|
|
685
|
-
return acc;
|
|
686
|
-
}, {});
|
|
687
|
-
};
|
|
688
|
-
const se_Slots = (input, context) => {
|
|
689
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
690
|
-
if (value === null) {
|
|
691
|
-
return acc;
|
|
692
|
-
}
|
|
693
|
-
acc[key] = se_Slot(value, context);
|
|
694
|
-
return acc;
|
|
695
|
-
}, {});
|
|
696
|
-
};
|
|
697
|
-
const se_Values = (input, context) => {
|
|
698
|
-
return input
|
|
699
|
-
.filter((e) => e != null)
|
|
700
|
-
.map((entry) => {
|
|
701
|
-
return se_Slot(entry, context);
|
|
702
|
-
});
|
|
703
|
-
};
|
|
704
|
-
const de_AudioResponseEvent = (output, context) => {
|
|
705
|
-
return take(output, {
|
|
706
|
-
audioChunk: context.base64Decoder,
|
|
707
|
-
contentType: __expectString,
|
|
708
|
-
eventId: __expectString,
|
|
709
|
-
});
|
|
710
|
-
};
|
|
711
|
-
const de_ConfidenceScore = (output, context) => {
|
|
712
|
-
return take(output, {
|
|
713
|
-
score: __limitedParseDouble,
|
|
714
|
-
});
|
|
715
|
-
};
|
|
716
|
-
const de_DialogAction = (output, context) => {
|
|
717
|
-
return take(output, {
|
|
718
|
-
slotElicitationStyle: __expectString,
|
|
719
|
-
slotToElicit: __expectString,
|
|
720
|
-
subSlotToElicit: (_) => de_ElicitSubSlot(_, context),
|
|
721
|
-
type: __expectString,
|
|
722
|
-
});
|
|
723
|
-
};
|
|
724
|
-
const de_ElicitSubSlot = (output, context) => {
|
|
725
|
-
return take(output, {
|
|
726
|
-
name: __expectString,
|
|
727
|
-
subSlotToElicit: (_) => de_ElicitSubSlot(_, context),
|
|
728
|
-
});
|
|
729
|
-
};
|
|
730
|
-
const de_Intent = (output, context) => {
|
|
731
|
-
return take(output, {
|
|
732
|
-
confirmationState: __expectString,
|
|
733
|
-
name: __expectString,
|
|
734
|
-
slots: (_) => de_Slots(_, context),
|
|
735
|
-
state: __expectString,
|
|
736
|
-
});
|
|
737
|
-
};
|
|
738
|
-
const de_IntentResultEvent = (output, context) => {
|
|
739
|
-
return take(output, {
|
|
740
|
-
eventId: __expectString,
|
|
741
|
-
inputMode: __expectString,
|
|
742
|
-
interpretations: (_) => de_Interpretations(_, context),
|
|
743
|
-
recognizedBotMember: _json,
|
|
744
|
-
requestAttributes: _json,
|
|
745
|
-
sessionId: __expectString,
|
|
746
|
-
sessionState: (_) => de_SessionState(_, context),
|
|
747
|
-
});
|
|
748
|
-
};
|
|
749
|
-
const de_Interpretation = (output, context) => {
|
|
750
|
-
return take(output, {
|
|
751
|
-
intent: (_) => de_Intent(_, context),
|
|
752
|
-
interpretationSource: __expectString,
|
|
753
|
-
nluConfidence: (_) => de_ConfidenceScore(_, context),
|
|
754
|
-
sentimentResponse: (_) => de_SentimentResponse(_, context),
|
|
755
|
-
});
|
|
756
|
-
};
|
|
757
|
-
const de_Interpretations = (output, context) => {
|
|
758
|
-
const retVal = (output || [])
|
|
759
|
-
.filter((e) => e != null)
|
|
760
|
-
.map((entry) => {
|
|
761
|
-
return de_Interpretation(entry, context);
|
|
762
|
-
});
|
|
763
|
-
return retVal;
|
|
764
|
-
};
|
|
765
|
-
const de_RuntimeHintDetails = (output, context) => {
|
|
766
|
-
return take(output, {
|
|
767
|
-
runtimeHintValues: _json,
|
|
768
|
-
subSlotHints: (_) => de_SlotHintsSlotMap(_, context),
|
|
769
|
-
});
|
|
770
|
-
};
|
|
771
|
-
const de_RuntimeHints = (output, context) => {
|
|
772
|
-
return take(output, {
|
|
773
|
-
slotHints: (_) => de_SlotHintsIntentMap(_, context),
|
|
774
|
-
});
|
|
775
|
-
};
|
|
776
|
-
const de_SentimentResponse = (output, context) => {
|
|
777
|
-
return take(output, {
|
|
778
|
-
sentiment: __expectString,
|
|
779
|
-
sentimentScore: (_) => de_SentimentScore(_, context),
|
|
780
|
-
});
|
|
781
|
-
};
|
|
782
|
-
const de_SentimentScore = (output, context) => {
|
|
783
|
-
return take(output, {
|
|
784
|
-
mixed: __limitedParseDouble,
|
|
785
|
-
negative: __limitedParseDouble,
|
|
786
|
-
neutral: __limitedParseDouble,
|
|
787
|
-
positive: __limitedParseDouble,
|
|
788
|
-
});
|
|
789
|
-
};
|
|
790
|
-
const de_SessionState = (output, context) => {
|
|
791
|
-
return take(output, {
|
|
792
|
-
activeContexts: _json,
|
|
793
|
-
dialogAction: (_) => de_DialogAction(_, context),
|
|
794
|
-
intent: (_) => de_Intent(_, context),
|
|
795
|
-
originatingRequestId: __expectString,
|
|
796
|
-
runtimeHints: (_) => de_RuntimeHints(_, context),
|
|
797
|
-
sessionAttributes: _json,
|
|
798
|
-
});
|
|
799
|
-
};
|
|
800
|
-
const de_Slot = (output, context) => {
|
|
801
|
-
return take(output, {
|
|
802
|
-
shape: __expectString,
|
|
803
|
-
subSlots: (_) => de_Slots(_, context),
|
|
804
|
-
value: _json,
|
|
805
|
-
values: (_) => de_Values(_, context),
|
|
806
|
-
});
|
|
807
|
-
};
|
|
808
|
-
const de_SlotHintsIntentMap = (output, context) => {
|
|
809
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
810
|
-
if (value === null) {
|
|
811
|
-
return acc;
|
|
812
|
-
}
|
|
813
|
-
acc[key] = de_SlotHintsSlotMap(value, context);
|
|
814
|
-
return acc;
|
|
815
|
-
}, {});
|
|
816
|
-
};
|
|
817
|
-
const de_SlotHintsSlotMap = (output, context) => {
|
|
818
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
819
|
-
if (value === null) {
|
|
820
|
-
return acc;
|
|
821
|
-
}
|
|
822
|
-
acc[key] = de_RuntimeHintDetails(value, context);
|
|
823
|
-
return acc;
|
|
824
|
-
}, {});
|
|
825
|
-
};
|
|
826
|
-
const de_Slots = (output, context) => {
|
|
827
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
828
|
-
if (value === null) {
|
|
829
|
-
return acc;
|
|
830
|
-
}
|
|
831
|
-
acc[key] = de_Slot(value, context);
|
|
832
|
-
return acc;
|
|
833
|
-
}, {});
|
|
834
|
-
};
|
|
835
|
-
const de_Values = (output, context) => {
|
|
836
|
-
const retVal = (output || [])
|
|
837
|
-
.filter((e) => e != null)
|
|
838
|
-
.map((entry) => {
|
|
839
|
-
return de_Slot(entry, context);
|
|
840
|
-
});
|
|
841
|
-
return retVal;
|
|
842
|
-
};
|
|
843
|
-
const deserializeMetadata = (output) => ({
|
|
844
|
-
httpStatusCode: output.statusCode,
|
|
845
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
846
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
847
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
848
|
-
});
|
|
849
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
850
|
-
const _cM = "conversationMode";
|
|
851
|
-
const _cT = "contentType";
|
|
852
|
-
const _ct = "content-type";
|
|
853
|
-
const _i = "interpretations";
|
|
854
|
-
const _iM = "inputMode";
|
|
855
|
-
const _iT = "inputTranscript";
|
|
856
|
-
const _m = "messages";
|
|
857
|
-
const _r = "responsecontenttype";
|
|
858
|
-
const _rA = "requestAttributes";
|
|
859
|
-
const _rBM = "recognizedBotMember";
|
|
860
|
-
const _rCT = "responseContentType";
|
|
861
|
-
const _rCTe = "requestContentType";
|
|
862
|
-
const _rct = "response-content-type";
|
|
863
|
-
const _sI = "sessionId";
|
|
864
|
-
const _sS = "sessionState";
|
|
865
|
-
const _xalcm = "x-amz-lex-conversation-mode";
|
|
866
|
-
const _xali = "x-amz-lex-interpretations";
|
|
867
|
-
const _xalim = "x-amz-lex-input-mode";
|
|
868
|
-
const _xalit = "x-amz-lex-input-transcript";
|
|
869
|
-
const _xalm = "x-amz-lex-messages";
|
|
870
|
-
const _xalra = "x-amz-lex-request-attributes";
|
|
871
|
-
const _xalrbm = "x-amz-lex-recognized-bot-member";
|
|
872
|
-
const _xalsi = "x-amz-lex-session-id";
|
|
873
|
-
const _xalss = "x-amz-lex-session-state";
|