@aws-sdk/client-transcribe-streaming 3.215.0 → 3.218.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.
Files changed (27) hide show
  1. package/dist-cjs/TranscribeStreaming.js +15 -0
  2. package/dist-cjs/commands/StartCallAnalyticsStreamTranscriptionCommand.js +48 -0
  3. package/dist-cjs/commands/index.js +1 -0
  4. package/dist-cjs/endpoint/ruleset.js +4 -4
  5. package/dist-cjs/models/models_0.js +168 -41
  6. package/dist-cjs/protocols/Aws_restJson1.js +336 -1
  7. package/dist-es/TranscribeStreaming.js +15 -0
  8. package/dist-es/commands/StartCallAnalyticsStreamTranscriptionCommand.js +44 -0
  9. package/dist-es/commands/index.js +1 -0
  10. package/dist-es/endpoint/ruleset.js +4 -4
  11. package/dist-es/models/models_0.js +151 -39
  12. package/dist-es/protocols/Aws_restJson1.js +334 -1
  13. package/dist-types/TranscribeStreaming.d.ts +65 -9
  14. package/dist-types/TranscribeStreamingClient.d.ts +12 -4
  15. package/dist-types/commands/StartCallAnalyticsStreamTranscriptionCommand.d.ts +58 -0
  16. package/dist-types/commands/StartMedicalStreamTranscriptionCommand.d.ts +18 -0
  17. package/dist-types/commands/StartStreamTranscriptionCommand.d.ts +10 -7
  18. package/dist-types/commands/index.d.ts +1 -0
  19. package/dist-types/models/models_0.d.ts +776 -53
  20. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  21. package/dist-types/ts3.4/TranscribeStreaming.d.ts +23 -0
  22. package/dist-types/ts3.4/TranscribeStreamingClient.d.ts +6 -0
  23. package/dist-types/ts3.4/commands/StartCallAnalyticsStreamTranscriptionCommand.d.ts +41 -0
  24. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  25. package/dist-types/ts3.4/models/models_0.d.ts +302 -27
  26. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
  27. package/package.json +4 -4
@@ -4,11 +4,23 @@ export var ItemType;
4
4
  ItemType["PRONUNCIATION"] = "pronunciation";
5
5
  ItemType["PUNCTUATION"] = "punctuation";
6
6
  })(ItemType || (ItemType = {}));
7
+ export var ParticipantRole;
8
+ (function (ParticipantRole) {
9
+ ParticipantRole["AGENT"] = "AGENT";
10
+ ParticipantRole["CUSTOMER"] = "CUSTOMER";
11
+ })(ParticipantRole || (ParticipantRole = {}));
12
+ export var ContentRedactionOutput;
13
+ (function (ContentRedactionOutput) {
14
+ ContentRedactionOutput["REDACTED"] = "redacted";
15
+ ContentRedactionOutput["REDACTED_AND_UNREDACTED"] = "redacted_and_unredacted";
16
+ })(ContentRedactionOutput || (ContentRedactionOutput = {}));
7
17
  export var AudioStream;
8
18
  (function (AudioStream) {
9
19
  AudioStream.visit = (value, visitor) => {
10
20
  if (value.AudioEvent !== undefined)
11
21
  return visitor.AudioEvent(value.AudioEvent);
22
+ if (value.ConfigurationEvent !== undefined)
23
+ return visitor.ConfigurationEvent(value.ConfigurationEvent);
12
24
  return visitor._(value.$unknown[0], value.$unknown[1]);
13
25
  };
14
26
  })(AudioStream || (AudioStream = {}));
@@ -25,6 +37,18 @@ export class BadRequestException extends __BaseException {
25
37
  this.Message = opts.Message;
26
38
  }
27
39
  }
40
+ export var CallAnalyticsLanguageCode;
41
+ (function (CallAnalyticsLanguageCode) {
42
+ CallAnalyticsLanguageCode["DE_DE"] = "de-DE";
43
+ CallAnalyticsLanguageCode["EN_AU"] = "en-AU";
44
+ CallAnalyticsLanguageCode["EN_GB"] = "en-GB";
45
+ CallAnalyticsLanguageCode["EN_US"] = "en-US";
46
+ CallAnalyticsLanguageCode["ES_US"] = "es-US";
47
+ CallAnalyticsLanguageCode["FR_CA"] = "fr-CA";
48
+ CallAnalyticsLanguageCode["FR_FR"] = "fr-FR";
49
+ CallAnalyticsLanguageCode["IT_IT"] = "it-IT";
50
+ CallAnalyticsLanguageCode["PT_BR"] = "pt-BR";
51
+ })(CallAnalyticsLanguageCode || (CallAnalyticsLanguageCode = {}));
28
52
  export class ConflictException extends __BaseException {
29
53
  constructor(opts) {
30
54
  super({
@@ -38,14 +62,6 @@ export class ConflictException extends __BaseException {
38
62
  this.Message = opts.Message;
39
63
  }
40
64
  }
41
- export var ContentIdentificationType;
42
- (function (ContentIdentificationType) {
43
- ContentIdentificationType["PII"] = "PII";
44
- })(ContentIdentificationType || (ContentIdentificationType = {}));
45
- export var ContentRedactionType;
46
- (function (ContentRedactionType) {
47
- ContentRedactionType["PII"] = "PII";
48
- })(ContentRedactionType || (ContentRedactionType = {}));
49
65
  export class InternalFailureException extends __BaseException {
50
66
  constructor(opts) {
51
67
  super({
@@ -59,6 +75,67 @@ export class InternalFailureException extends __BaseException {
59
75
  this.Message = opts.Message;
60
76
  }
61
77
  }
78
+ export class LimitExceededException extends __BaseException {
79
+ constructor(opts) {
80
+ super({
81
+ name: "LimitExceededException",
82
+ $fault: "client",
83
+ ...opts,
84
+ });
85
+ this.name = "LimitExceededException";
86
+ this.$fault = "client";
87
+ Object.setPrototypeOf(this, LimitExceededException.prototype);
88
+ this.Message = opts.Message;
89
+ }
90
+ }
91
+ export class ServiceUnavailableException extends __BaseException {
92
+ constructor(opts) {
93
+ super({
94
+ name: "ServiceUnavailableException",
95
+ $fault: "server",
96
+ ...opts,
97
+ });
98
+ this.name = "ServiceUnavailableException";
99
+ this.$fault = "server";
100
+ Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
101
+ this.Message = opts.Message;
102
+ }
103
+ }
104
+ export var Sentiment;
105
+ (function (Sentiment) {
106
+ Sentiment["MIXED"] = "MIXED";
107
+ Sentiment["NEGATIVE"] = "NEGATIVE";
108
+ Sentiment["NEUTRAL"] = "NEUTRAL";
109
+ Sentiment["POSITIVE"] = "POSITIVE";
110
+ })(Sentiment || (Sentiment = {}));
111
+ export var CallAnalyticsTranscriptResultStream;
112
+ (function (CallAnalyticsTranscriptResultStream) {
113
+ CallAnalyticsTranscriptResultStream.visit = (value, visitor) => {
114
+ if (value.UtteranceEvent !== undefined)
115
+ return visitor.UtteranceEvent(value.UtteranceEvent);
116
+ if (value.CategoryEvent !== undefined)
117
+ return visitor.CategoryEvent(value.CategoryEvent);
118
+ if (value.BadRequestException !== undefined)
119
+ return visitor.BadRequestException(value.BadRequestException);
120
+ if (value.LimitExceededException !== undefined)
121
+ return visitor.LimitExceededException(value.LimitExceededException);
122
+ if (value.InternalFailureException !== undefined)
123
+ return visitor.InternalFailureException(value.InternalFailureException);
124
+ if (value.ConflictException !== undefined)
125
+ return visitor.ConflictException(value.ConflictException);
126
+ if (value.ServiceUnavailableException !== undefined)
127
+ return visitor.ServiceUnavailableException(value.ServiceUnavailableException);
128
+ return visitor._(value.$unknown[0], value.$unknown[1]);
129
+ };
130
+ })(CallAnalyticsTranscriptResultStream || (CallAnalyticsTranscriptResultStream = {}));
131
+ export var ContentIdentificationType;
132
+ (function (ContentIdentificationType) {
133
+ ContentIdentificationType["PII"] = "PII";
134
+ })(ContentIdentificationType || (ContentIdentificationType = {}));
135
+ export var ContentRedactionType;
136
+ (function (ContentRedactionType) {
137
+ ContentRedactionType["PII"] = "PII";
138
+ })(ContentRedactionType || (ContentRedactionType = {}));
62
139
  export var LanguageCode;
63
140
  (function (LanguageCode) {
64
141
  LanguageCode["DE_DE"] = "de-DE";
@@ -76,19 +153,6 @@ export var LanguageCode;
76
153
  LanguageCode["TH_TH"] = "th-TH";
77
154
  LanguageCode["ZH_CN"] = "zh-CN";
78
155
  })(LanguageCode || (LanguageCode = {}));
79
- export class LimitExceededException extends __BaseException {
80
- constructor(opts) {
81
- super({
82
- name: "LimitExceededException",
83
- $fault: "client",
84
- ...opts,
85
- });
86
- this.name = "LimitExceededException";
87
- this.$fault = "client";
88
- Object.setPrototypeOf(this, LimitExceededException.prototype);
89
- this.Message = opts.Message;
90
- }
91
- }
92
156
  export var MediaEncoding;
93
157
  (function (MediaEncoding) {
94
158
  MediaEncoding["FLAC"] = "flac";
@@ -99,19 +163,6 @@ export var MedicalContentIdentificationType;
99
163
  (function (MedicalContentIdentificationType) {
100
164
  MedicalContentIdentificationType["PHI"] = "PHI";
101
165
  })(MedicalContentIdentificationType || (MedicalContentIdentificationType = {}));
102
- export class ServiceUnavailableException extends __BaseException {
103
- constructor(opts) {
104
- super({
105
- name: "ServiceUnavailableException",
106
- $fault: "server",
107
- ...opts,
108
- });
109
- this.name = "ServiceUnavailableException";
110
- this.$fault = "server";
111
- Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
112
- this.Message = opts.Message;
113
- }
114
- }
115
166
  export var MedicalTranscriptResultStream;
116
167
  (function (MedicalTranscriptResultStream) {
117
168
  MedicalTranscriptResultStream.visit = (value, visitor) => {
@@ -145,17 +196,17 @@ export var Specialty;
145
196
  Specialty["RADIOLOGY"] = "RADIOLOGY";
146
197
  Specialty["UROLOGY"] = "UROLOGY";
147
198
  })(Specialty || (Specialty = {}));
148
- export var Type;
149
- (function (Type) {
150
- Type["CONVERSATION"] = "CONVERSATION";
151
- Type["DICTATION"] = "DICTATION";
152
- })(Type || (Type = {}));
153
199
  export var VocabularyFilterMethod;
154
200
  (function (VocabularyFilterMethod) {
155
201
  VocabularyFilterMethod["MASK"] = "mask";
156
202
  VocabularyFilterMethod["REMOVE"] = "remove";
157
203
  VocabularyFilterMethod["TAG"] = "tag";
158
204
  })(VocabularyFilterMethod || (VocabularyFilterMethod = {}));
205
+ export var Type;
206
+ (function (Type) {
207
+ Type["CONVERSATION"] = "CONVERSATION";
208
+ Type["DICTATION"] = "DICTATION";
209
+ })(Type || (Type = {}));
159
210
  export var TranscriptResultStream;
160
211
  (function (TranscriptResultStream) {
161
212
  TranscriptResultStream.visit = (value, visitor) => {
@@ -186,9 +237,62 @@ export const AlternativeFilterSensitiveLog = (obj) => ({
186
237
  export const AudioEventFilterSensitiveLog = (obj) => ({
187
238
  ...obj,
188
239
  });
240
+ export const ChannelDefinitionFilterSensitiveLog = (obj) => ({
241
+ ...obj,
242
+ });
243
+ export const PostCallAnalyticsSettingsFilterSensitiveLog = (obj) => ({
244
+ ...obj,
245
+ });
246
+ export const ConfigurationEventFilterSensitiveLog = (obj) => ({
247
+ ...obj,
248
+ });
189
249
  export const AudioStreamFilterSensitiveLog = (obj) => {
190
250
  if (obj.AudioEvent !== undefined)
191
251
  return { AudioEvent: AudioEventFilterSensitiveLog(obj.AudioEvent) };
252
+ if (obj.ConfigurationEvent !== undefined)
253
+ return { ConfigurationEvent: ConfigurationEventFilterSensitiveLog(obj.ConfigurationEvent) };
254
+ if (obj.$unknown !== undefined)
255
+ return { [obj.$unknown[0]]: "UNKNOWN" };
256
+ };
257
+ export const CallAnalyticsEntityFilterSensitiveLog = (obj) => ({
258
+ ...obj,
259
+ });
260
+ export const CallAnalyticsItemFilterSensitiveLog = (obj) => ({
261
+ ...obj,
262
+ });
263
+ export const TimestampRangeFilterSensitiveLog = (obj) => ({
264
+ ...obj,
265
+ });
266
+ export const PointsOfInterestFilterSensitiveLog = (obj) => ({
267
+ ...obj,
268
+ });
269
+ export const CategoryEventFilterSensitiveLog = (obj) => ({
270
+ ...obj,
271
+ });
272
+ export const CharacterOffsetsFilterSensitiveLog = (obj) => ({
273
+ ...obj,
274
+ });
275
+ export const IssueDetectedFilterSensitiveLog = (obj) => ({
276
+ ...obj,
277
+ });
278
+ export const UtteranceEventFilterSensitiveLog = (obj) => ({
279
+ ...obj,
280
+ });
281
+ export const CallAnalyticsTranscriptResultStreamFilterSensitiveLog = (obj) => {
282
+ if (obj.UtteranceEvent !== undefined)
283
+ return { UtteranceEvent: UtteranceEventFilterSensitiveLog(obj.UtteranceEvent) };
284
+ if (obj.CategoryEvent !== undefined)
285
+ return { CategoryEvent: CategoryEventFilterSensitiveLog(obj.CategoryEvent) };
286
+ if (obj.BadRequestException !== undefined)
287
+ return { BadRequestException: obj.BadRequestException };
288
+ if (obj.LimitExceededException !== undefined)
289
+ return { LimitExceededException: obj.LimitExceededException };
290
+ if (obj.InternalFailureException !== undefined)
291
+ return { InternalFailureException: obj.InternalFailureException };
292
+ if (obj.ConflictException !== undefined)
293
+ return { ConflictException: obj.ConflictException };
294
+ if (obj.ServiceUnavailableException !== undefined)
295
+ return { ServiceUnavailableException: obj.ServiceUnavailableException };
192
296
  if (obj.$unknown !== undefined)
193
297
  return { [obj.$unknown[0]]: "UNKNOWN" };
194
298
  };
@@ -232,6 +336,14 @@ export const MedicalTranscriptResultStreamFilterSensitiveLog = (obj) => {
232
336
  export const ResultFilterSensitiveLog = (obj) => ({
233
337
  ...obj,
234
338
  });
339
+ export const StartCallAnalyticsStreamTranscriptionRequestFilterSensitiveLog = (obj) => ({
340
+ ...obj,
341
+ ...(obj.AudioStream && { AudioStream: "STREAMING_CONTENT" }),
342
+ });
343
+ export const StartCallAnalyticsStreamTranscriptionResponseFilterSensitiveLog = (obj) => ({
344
+ ...obj,
345
+ ...(obj.CallAnalyticsTranscriptResultStream && { CallAnalyticsTranscriptResultStream: "STREAMING_CONTENT" }),
346
+ });
235
347
  export const StartMedicalStreamTranscriptionRequestFilterSensitiveLog = (obj) => ({
236
348
  ...obj,
237
349
  ...(obj.AudioStream && { AudioStream: "STREAMING_CONTENT" }),
@@ -1,7 +1,45 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, parseBoolean as __parseBoolean, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, parseBoolean as __parseBoolean, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
3
3
  import { AudioStream, BadRequestException, ConflictException, InternalFailureException, LimitExceededException, ServiceUnavailableException, } from "../models/models_0";
4
4
  import { TranscribeStreamingServiceException as __BaseException } from "../models/TranscribeStreamingServiceException";
5
+ export const serializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand = async (input, context) => {
6
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const headers = map({}, isSerializableHeaderValue, {
8
+ "x-amzn-transcribe-language-code": input.LanguageCode,
9
+ "x-amzn-transcribe-sample-rate": [
10
+ () => isSerializableHeaderValue(input.MediaSampleRateHertz),
11
+ () => input.MediaSampleRateHertz.toString(),
12
+ ],
13
+ "x-amzn-transcribe-media-encoding": input.MediaEncoding,
14
+ "x-amzn-transcribe-vocabulary-name": input.VocabularyName,
15
+ "x-amzn-transcribe-session-id": input.SessionId,
16
+ "x-amzn-transcribe-vocabulary-filter-name": input.VocabularyFilterName,
17
+ "x-amzn-transcribe-vocabulary-filter-method": input.VocabularyFilterMethod,
18
+ "x-amzn-transcribe-language-model-name": input.LanguageModelName,
19
+ "x-amzn-transcribe-enable-partial-results-stabilization": [
20
+ () => isSerializableHeaderValue(input.EnablePartialResultsStabilization),
21
+ () => input.EnablePartialResultsStabilization.toString(),
22
+ ],
23
+ "x-amzn-transcribe-partial-results-stability": input.PartialResultsStability,
24
+ "x-amzn-transcribe-content-identification-type": input.ContentIdentificationType,
25
+ "x-amzn-transcribe-content-redaction-type": input.ContentRedactionType,
26
+ "x-amzn-transcribe-pii-entity-types": input.PiiEntityTypes,
27
+ });
28
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/call-analytics-stream-transcription";
29
+ let body;
30
+ if (input.AudioStream !== undefined) {
31
+ body = serializeAws_restJson1AudioStream(input.AudioStream, context);
32
+ }
33
+ return new __HttpRequest({
34
+ protocol,
35
+ hostname,
36
+ port,
37
+ method: "POST",
38
+ headers,
39
+ path: resolvedPath,
40
+ body,
41
+ });
42
+ };
5
43
  export const serializeAws_restJson1StartMedicalStreamTranscriptionCommand = async (input, context) => {
6
44
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
45
  const headers = map({}, isSerializableHeaderValue, {
@@ -102,6 +140,69 @@ export const serializeAws_restJson1StartStreamTranscriptionCommand = async (inpu
102
140
  body,
103
141
  });
104
142
  };
143
+ export const deserializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand = async (output, context) => {
144
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
145
+ return deserializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommandError(output, context);
146
+ }
147
+ const contents = map({
148
+ $metadata: deserializeMetadata(output),
149
+ RequestId: [, output.headers["x-amzn-request-id"]],
150
+ LanguageCode: [, output.headers["x-amzn-transcribe-language-code"]],
151
+ MediaSampleRateHertz: [
152
+ () => void 0 !== output.headers["x-amzn-transcribe-sample-rate"],
153
+ () => __strictParseInt32(output.headers["x-amzn-transcribe-sample-rate"]),
154
+ ],
155
+ MediaEncoding: [, output.headers["x-amzn-transcribe-media-encoding"]],
156
+ VocabularyName: [, output.headers["x-amzn-transcribe-vocabulary-name"]],
157
+ SessionId: [, output.headers["x-amzn-transcribe-session-id"]],
158
+ VocabularyFilterName: [, output.headers["x-amzn-transcribe-vocabulary-filter-name"]],
159
+ VocabularyFilterMethod: [, output.headers["x-amzn-transcribe-vocabulary-filter-method"]],
160
+ LanguageModelName: [, output.headers["x-amzn-transcribe-language-model-name"]],
161
+ EnablePartialResultsStabilization: [
162
+ () => void 0 !== output.headers["x-amzn-transcribe-enable-partial-results-stabilization"],
163
+ () => __parseBoolean(output.headers["x-amzn-transcribe-enable-partial-results-stabilization"]),
164
+ ],
165
+ PartialResultsStability: [, output.headers["x-amzn-transcribe-partial-results-stability"]],
166
+ ContentIdentificationType: [, output.headers["x-amzn-transcribe-content-identification-type"]],
167
+ ContentRedactionType: [, output.headers["x-amzn-transcribe-content-redaction-type"]],
168
+ PiiEntityTypes: [, output.headers["x-amzn-transcribe-pii-entity-types"]],
169
+ });
170
+ const data = output.body;
171
+ contents.CallAnalyticsTranscriptResultStream = deserializeAws_restJson1CallAnalyticsTranscriptResultStream(data, context);
172
+ return contents;
173
+ };
174
+ const deserializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommandError = async (output, context) => {
175
+ const parsedOutput = {
176
+ ...output,
177
+ body: await parseErrorBody(output.body, context),
178
+ };
179
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
180
+ switch (errorCode) {
181
+ case "BadRequestException":
182
+ case "com.amazonaws.transcribestreaming#BadRequestException":
183
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
184
+ case "ConflictException":
185
+ case "com.amazonaws.transcribestreaming#ConflictException":
186
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
187
+ case "InternalFailureException":
188
+ case "com.amazonaws.transcribestreaming#InternalFailureException":
189
+ throw await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
190
+ case "LimitExceededException":
191
+ case "com.amazonaws.transcribestreaming#LimitExceededException":
192
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
193
+ case "ServiceUnavailableException":
194
+ case "com.amazonaws.transcribestreaming#ServiceUnavailableException":
195
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
196
+ default:
197
+ const parsedBody = parsedOutput.body;
198
+ throwDefaultError({
199
+ output,
200
+ parsedBody,
201
+ exceptionCtor: __BaseException,
202
+ errorCode,
203
+ });
204
+ }
205
+ };
105
206
  export const deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = async (output, context) => {
106
207
  if (output.statusCode !== 200 && output.statusCode >= 300) {
107
208
  return deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError(output, context);
@@ -316,6 +417,7 @@ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parse
316
417
  const serializeAws_restJson1AudioStream = (input, context) => {
317
418
  const eventMarshallingVisitor = (event) => AudioStream.visit(event, {
318
419
  AudioEvent: (value) => serializeAws_restJson1AudioEvent_event(value, context),
420
+ ConfigurationEvent: (value) => serializeAws_restJson1ConfigurationEvent_event(value, context),
319
421
  _: (value) => value,
320
422
  });
321
423
  return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
@@ -332,6 +434,57 @@ const serializeAws_restJson1AudioEvent_event = (input, context) => {
332
434
  }
333
435
  return { headers, body };
334
436
  };
437
+ const serializeAws_restJson1ConfigurationEvent_event = (input, context) => {
438
+ const headers = {
439
+ ":event-type": { type: "string", value: "ConfigurationEvent" },
440
+ ":message-type": { type: "string", value: "event" },
441
+ ":content-type": { type: "string", value: "application/json" },
442
+ };
443
+ let body = new Uint8Array();
444
+ body = serializeAws_restJson1ConfigurationEvent(input, context);
445
+ body = context.utf8Decoder(JSON.stringify(body));
446
+ return { headers, body };
447
+ };
448
+ const deserializeAws_restJson1CallAnalyticsTranscriptResultStream = (output, context) => {
449
+ return context.eventStreamMarshaller.deserialize(output, async (event) => {
450
+ if (event["UtteranceEvent"] != null) {
451
+ return {
452
+ UtteranceEvent: await deserializeAws_restJson1UtteranceEvent_event(event["UtteranceEvent"], context),
453
+ };
454
+ }
455
+ if (event["CategoryEvent"] != null) {
456
+ return {
457
+ CategoryEvent: await deserializeAws_restJson1CategoryEvent_event(event["CategoryEvent"], context),
458
+ };
459
+ }
460
+ if (event["BadRequestException"] != null) {
461
+ return {
462
+ BadRequestException: await deserializeAws_restJson1BadRequestException_event(event["BadRequestException"], context),
463
+ };
464
+ }
465
+ if (event["LimitExceededException"] != null) {
466
+ return {
467
+ LimitExceededException: await deserializeAws_restJson1LimitExceededException_event(event["LimitExceededException"], context),
468
+ };
469
+ }
470
+ if (event["InternalFailureException"] != null) {
471
+ return {
472
+ InternalFailureException: await deserializeAws_restJson1InternalFailureException_event(event["InternalFailureException"], context),
473
+ };
474
+ }
475
+ if (event["ConflictException"] != null) {
476
+ return {
477
+ ConflictException: await deserializeAws_restJson1ConflictException_event(event["ConflictException"], context),
478
+ };
479
+ }
480
+ if (event["ServiceUnavailableException"] != null) {
481
+ return {
482
+ ServiceUnavailableException: await deserializeAws_restJson1ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
483
+ };
484
+ }
485
+ return { $unknown: output };
486
+ });
487
+ };
335
488
  const deserializeAws_restJson1MedicalTranscriptResultStream = (output, context) => {
336
489
  return context.eventStreamMarshaller.deserialize(output, async (event) => {
337
490
  if (event["TranscriptEvent"] != null) {
@@ -409,6 +562,12 @@ const deserializeAws_restJson1BadRequestException_event = async (output, context
409
562
  };
410
563
  return deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
411
564
  };
565
+ const deserializeAws_restJson1CategoryEvent_event = async (output, context) => {
566
+ const contents = {};
567
+ const data = await parseBody(output.body, context);
568
+ Object.assign(contents, deserializeAws_restJson1CategoryEvent(data, context));
569
+ return contents;
570
+ };
412
571
  const deserializeAws_restJson1ConflictException_event = async (output, context) => {
413
572
  const parsedOutput = {
414
573
  ...output,
@@ -449,6 +608,43 @@ const deserializeAws_restJson1TranscriptEvent_event = async (output, context) =>
449
608
  Object.assign(contents, deserializeAws_restJson1TranscriptEvent(data, context));
450
609
  return contents;
451
610
  };
611
+ const deserializeAws_restJson1UtteranceEvent_event = async (output, context) => {
612
+ const contents = {};
613
+ const data = await parseBody(output.body, context);
614
+ Object.assign(contents, deserializeAws_restJson1UtteranceEvent(data, context));
615
+ return contents;
616
+ };
617
+ const serializeAws_restJson1ChannelDefinition = (input, context) => {
618
+ return {
619
+ ...(input.ChannelId != null && { ChannelId: input.ChannelId }),
620
+ ...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }),
621
+ };
622
+ };
623
+ const serializeAws_restJson1ChannelDefinitions = (input, context) => {
624
+ return input
625
+ .filter((e) => e != null)
626
+ .map((entry) => {
627
+ return serializeAws_restJson1ChannelDefinition(entry, context);
628
+ });
629
+ };
630
+ const serializeAws_restJson1ConfigurationEvent = (input, context) => {
631
+ return {
632
+ ...(input.ChannelDefinitions != null && {
633
+ ChannelDefinitions: serializeAws_restJson1ChannelDefinitions(input.ChannelDefinitions, context),
634
+ }),
635
+ ...(input.PostCallAnalyticsSettings != null && {
636
+ PostCallAnalyticsSettings: serializeAws_restJson1PostCallAnalyticsSettings(input.PostCallAnalyticsSettings, context),
637
+ }),
638
+ };
639
+ };
640
+ const serializeAws_restJson1PostCallAnalyticsSettings = (input, context) => {
641
+ return {
642
+ ...(input.ContentRedactionOutput != null && { ContentRedactionOutput: input.ContentRedactionOutput }),
643
+ ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
644
+ ...(input.OutputEncryptionKMSKeyId != null && { OutputEncryptionKMSKeyId: input.OutputEncryptionKMSKeyId }),
645
+ ...(input.OutputLocation != null && { OutputLocation: input.OutputLocation }),
646
+ };
647
+ };
452
648
  const deserializeAws_restJson1Alternative = (output, context) => {
453
649
  return {
454
650
  Entities: output.Entities != null ? deserializeAws_restJson1EntityList(output.Entities, context) : undefined,
@@ -467,6 +663,65 @@ const deserializeAws_restJson1AlternativeList = (output, context) => {
467
663
  });
468
664
  return retVal;
469
665
  };
666
+ const deserializeAws_restJson1CallAnalyticsEntity = (output, context) => {
667
+ return {
668
+ BeginOffsetMillis: __expectLong(output.BeginOffsetMillis),
669
+ Category: __expectString(output.Category),
670
+ Confidence: __limitedParseDouble(output.Confidence),
671
+ Content: __expectString(output.Content),
672
+ EndOffsetMillis: __expectLong(output.EndOffsetMillis),
673
+ Type: __expectString(output.Type),
674
+ };
675
+ };
676
+ const deserializeAws_restJson1CallAnalyticsEntityList = (output, context) => {
677
+ const retVal = (output || [])
678
+ .filter((e) => e != null)
679
+ .map((entry) => {
680
+ if (entry === null) {
681
+ return null;
682
+ }
683
+ return deserializeAws_restJson1CallAnalyticsEntity(entry, context);
684
+ });
685
+ return retVal;
686
+ };
687
+ const deserializeAws_restJson1CallAnalyticsItem = (output, context) => {
688
+ return {
689
+ BeginOffsetMillis: __expectLong(output.BeginOffsetMillis),
690
+ Confidence: __limitedParseDouble(output.Confidence),
691
+ Content: __expectString(output.Content),
692
+ EndOffsetMillis: __expectLong(output.EndOffsetMillis),
693
+ Stable: __expectBoolean(output.Stable),
694
+ Type: __expectString(output.Type),
695
+ VocabularyFilterMatch: __expectBoolean(output.VocabularyFilterMatch),
696
+ };
697
+ };
698
+ const deserializeAws_restJson1CallAnalyticsItemList = (output, context) => {
699
+ const retVal = (output || [])
700
+ .filter((e) => e != null)
701
+ .map((entry) => {
702
+ if (entry === null) {
703
+ return null;
704
+ }
705
+ return deserializeAws_restJson1CallAnalyticsItem(entry, context);
706
+ });
707
+ return retVal;
708
+ };
709
+ const deserializeAws_restJson1CategoryEvent = (output, context) => {
710
+ return {
711
+ MatchedCategories: output.MatchedCategories != null
712
+ ? deserializeAws_restJson1StringList(output.MatchedCategories, context)
713
+ : undefined,
714
+ MatchedDetails: output.MatchedDetails != null
715
+ ? deserializeAws_restJson1MatchedCategoryDetails(output.MatchedDetails, context)
716
+ : undefined,
717
+ };
718
+ };
719
+ const deserializeAws_restJson1CharacterOffsets = (output, context) => {
720
+ return {
721
+ Begin: __expectInt32(output.Begin),
722
+ End: __expectInt32(output.End),
723
+ };
724
+ };
470
725
  const deserializeAws_restJson1Entity = (output, context) => {
471
726
  return {
472
727
  Category: __expectString(output.Category),
@@ -488,6 +743,24 @@ const deserializeAws_restJson1EntityList = (output, context) => {
488
743
  });
489
744
  return retVal;
490
745
  };
746
+ const deserializeAws_restJson1IssueDetected = (output, context) => {
747
+ return {
748
+ CharacterOffsets: output.CharacterOffsets != null
749
+ ? deserializeAws_restJson1CharacterOffsets(output.CharacterOffsets, context)
750
+ : undefined,
751
+ };
752
+ };
753
+ const deserializeAws_restJson1IssuesDetected = (output, context) => {
754
+ const retVal = (output || [])
755
+ .filter((e) => e != null)
756
+ .map((entry) => {
757
+ if (entry === null) {
758
+ return null;
759
+ }
760
+ return deserializeAws_restJson1IssueDetected(entry, context);
761
+ });
762
+ return retVal;
763
+ };
491
764
  const deserializeAws_restJson1Item = (output, context) => {
492
765
  return {
493
766
  Confidence: __limitedParseDouble(output.Confidence),
@@ -528,6 +801,15 @@ const deserializeAws_restJson1LanguageWithScore = (output, context) => {
528
801
  Score: __limitedParseDouble(output.Score),
529
802
  };
530
803
  };
804
+ const deserializeAws_restJson1MatchedCategoryDetails = (output, context) => {
805
+ return Object.entries(output).reduce((acc, [key, value]) => {
806
+ if (value === null) {
807
+ return acc;
808
+ }
809
+ acc[key] = deserializeAws_restJson1PointsOfInterest(value, context);
810
+ return acc;
811
+ }, {});
812
+ };
531
813
  const deserializeAws_restJson1MedicalAlternative = (output, context) => {
532
814
  return {
533
815
  Entities: output.Entities != null ? deserializeAws_restJson1MedicalEntityList(output.Entities, context) : undefined,
@@ -620,6 +902,13 @@ const deserializeAws_restJson1MedicalTranscriptEvent = (output, context) => {
620
902
  Transcript: output.Transcript != null ? deserializeAws_restJson1MedicalTranscript(output.Transcript, context) : undefined,
621
903
  };
622
904
  };
905
+ const deserializeAws_restJson1PointsOfInterest = (output, context) => {
906
+ return {
907
+ TimestampRanges: output.TimestampRanges != null
908
+ ? deserializeAws_restJson1TimestampRanges(output.TimestampRanges, context)
909
+ : undefined,
910
+ };
911
+ };
623
912
  const deserializeAws_restJson1Result = (output, context) => {
624
913
  return {
625
914
  Alternatives: output.Alternatives != null ? deserializeAws_restJson1AlternativeList(output.Alternatives, context) : undefined,
@@ -645,6 +934,34 @@ const deserializeAws_restJson1ResultList = (output, context) => {
645
934
  });
646
935
  return retVal;
647
936
  };
937
+ const deserializeAws_restJson1StringList = (output, context) => {
938
+ const retVal = (output || [])
939
+ .filter((e) => e != null)
940
+ .map((entry) => {
941
+ if (entry === null) {
942
+ return null;
943
+ }
944
+ return __expectString(entry);
945
+ });
946
+ return retVal;
947
+ };
948
+ const deserializeAws_restJson1TimestampRange = (output, context) => {
949
+ return {
950
+ BeginOffsetMillis: __expectLong(output.BeginOffsetMillis),
951
+ EndOffsetMillis: __expectLong(output.EndOffsetMillis),
952
+ };
953
+ };
954
+ const deserializeAws_restJson1TimestampRanges = (output, context) => {
955
+ const retVal = (output || [])
956
+ .filter((e) => e != null)
957
+ .map((entry) => {
958
+ if (entry === null) {
959
+ return null;
960
+ }
961
+ return deserializeAws_restJson1TimestampRange(entry, context);
962
+ });
963
+ return retVal;
964
+ };
648
965
  const deserializeAws_restJson1Transcript = (output, context) => {
649
966
  return {
650
967
  Results: output.Results != null ? deserializeAws_restJson1ResultList(output.Results, context) : undefined,
@@ -655,6 +972,22 @@ const deserializeAws_restJson1TranscriptEvent = (output, context) => {
655
972
  Transcript: output.Transcript != null ? deserializeAws_restJson1Transcript(output.Transcript, context) : undefined,
656
973
  };
657
974
  };
975
+ const deserializeAws_restJson1UtteranceEvent = (output, context) => {
976
+ return {
977
+ BeginOffsetMillis: __expectLong(output.BeginOffsetMillis),
978
+ EndOffsetMillis: __expectLong(output.EndOffsetMillis),
979
+ Entities: output.Entities != null ? deserializeAws_restJson1CallAnalyticsEntityList(output.Entities, context) : undefined,
980
+ IsPartial: __expectBoolean(output.IsPartial),
981
+ IssuesDetected: output.IssuesDetected != null
982
+ ? deserializeAws_restJson1IssuesDetected(output.IssuesDetected, context)
983
+ : undefined,
984
+ Items: output.Items != null ? deserializeAws_restJson1CallAnalyticsItemList(output.Items, context) : undefined,
985
+ ParticipantRole: __expectString(output.ParticipantRole),
986
+ Sentiment: __expectString(output.Sentiment),
987
+ Transcript: __expectString(output.Transcript),
988
+ UtteranceId: __expectString(output.UtteranceId),
989
+ };
990
+ };
658
991
  const deserializeMetadata = (output) => ({
659
992
  httpStatusCode: output.statusCode,
660
993
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],