@aws-sdk/client-connect-contact-lens 3.928.0 → 3.929.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
@@ -6,6 +6,7 @@ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detect
6
6
  var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
7
  var configResolver = require('@smithy/config-resolver');
8
8
  var core = require('@smithy/core');
9
+ var schema = require('@smithy/core/schema');
9
10
  var middlewareContentLength = require('@smithy/middleware-content-length');
10
11
  var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
12
  var middlewareRetry = require('@smithy/middleware-retry');
@@ -14,8 +15,6 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
15
  var runtimeConfig = require('./runtimeConfig');
15
16
  var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
17
  var protocolHttp = require('@smithy/protocol-http');
17
- var middlewareSerde = require('@smithy/middleware-serde');
18
- var core$1 = require('@aws-sdk/core');
19
18
 
20
19
  const resolveClientEndpointParameters = (options) => {
21
20
  return Object.assign(options, {
@@ -91,6 +90,7 @@ class ConnectContactLensClient extends smithyClient.Client {
91
90
  const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
92
91
  const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
93
92
  this.config = _config_8;
93
+ this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
94
94
  this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
95
95
  this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
96
96
  this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
@@ -110,14 +110,14 @@ class ConnectContactLensClient extends smithyClient.Client {
110
110
  }
111
111
  }
112
112
 
113
- class ConnectContactLensServiceException extends smithyClient.ServiceException {
113
+ let ConnectContactLensServiceException$1 = class ConnectContactLensServiceException extends smithyClient.ServiceException {
114
114
  constructor(options) {
115
115
  super(options);
116
116
  Object.setPrototypeOf(this, ConnectContactLensServiceException.prototype);
117
117
  }
118
- }
118
+ };
119
119
 
120
- class AccessDeniedException extends ConnectContactLensServiceException {
120
+ let AccessDeniedException$1 = class AccessDeniedException extends ConnectContactLensServiceException$1 {
121
121
  name = "AccessDeniedException";
122
122
  $fault = "client";
123
123
  Message;
@@ -130,8 +130,8 @@ class AccessDeniedException extends ConnectContactLensServiceException {
130
130
  Object.setPrototypeOf(this, AccessDeniedException.prototype);
131
131
  this.Message = opts.Message;
132
132
  }
133
- }
134
- class InternalServiceException extends ConnectContactLensServiceException {
133
+ };
134
+ let InternalServiceException$1 = class InternalServiceException extends ConnectContactLensServiceException$1 {
135
135
  name = "InternalServiceException";
136
136
  $fault = "server";
137
137
  Message;
@@ -144,8 +144,8 @@ class InternalServiceException extends ConnectContactLensServiceException {
144
144
  Object.setPrototypeOf(this, InternalServiceException.prototype);
145
145
  this.Message = opts.Message;
146
146
  }
147
- }
148
- class InvalidRequestException extends ConnectContactLensServiceException {
147
+ };
148
+ let InvalidRequestException$1 = class InvalidRequestException extends ConnectContactLensServiceException$1 {
149
149
  name = "InvalidRequestException";
150
150
  $fault = "client";
151
151
  Message;
@@ -158,7 +158,7 @@ class InvalidRequestException extends ConnectContactLensServiceException {
158
158
  Object.setPrototypeOf(this, InvalidRequestException.prototype);
159
159
  this.Message = opts.Message;
160
160
  }
161
- }
161
+ };
162
162
  const PostContactSummaryFailureCode = {
163
163
  FAILED_SAFETY_GUIDELINES: "FAILED_SAFETY_GUIDELINES",
164
164
  INSUFFICIENT_CONVERSATION_CONTENT: "INSUFFICIENT_CONVERSATION_CONTENT",
@@ -175,7 +175,7 @@ const SentimentValue = {
175
175
  NEUTRAL: "NEUTRAL",
176
176
  POSITIVE: "POSITIVE",
177
177
  };
178
- class ResourceNotFoundException extends ConnectContactLensServiceException {
178
+ let ResourceNotFoundException$1 = class ResourceNotFoundException extends ConnectContactLensServiceException$1 {
179
179
  name = "ResourceNotFoundException";
180
180
  $fault = "client";
181
181
  Message;
@@ -188,8 +188,8 @@ class ResourceNotFoundException extends ConnectContactLensServiceException {
188
188
  Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
189
189
  this.Message = opts.Message;
190
190
  }
191
- }
192
- class ThrottlingException extends ConnectContactLensServiceException {
191
+ };
192
+ let ThrottlingException$1 = class ThrottlingException extends ConnectContactLensServiceException$1 {
193
193
  name = "ThrottlingException";
194
194
  $fault = "client";
195
195
  Message;
@@ -202,157 +202,184 @@ class ThrottlingException extends ConnectContactLensServiceException {
202
202
  Object.setPrototypeOf(this, ThrottlingException.prototype);
203
203
  this.Message = opts.Message;
204
204
  }
205
- }
206
-
207
- const se_ListRealtimeContactAnalysisSegmentsCommand = async (input, context) => {
208
- const b = core.requestBuilder(input, context);
209
- const headers = {
210
- "content-type": "application/json",
211
- };
212
- b.bp("/realtime-contact-analysis/analysis-segments");
213
- let body;
214
- body = JSON.stringify(smithyClient.take(input, {
215
- ContactId: [],
216
- InstanceId: [],
217
- MaxResults: [],
218
- NextToken: [],
219
- }));
220
- b.m("POST").h(headers).b(body);
221
- return b.build();
222
205
  };
223
- const de_ListRealtimeContactAnalysisSegmentsCommand = async (output, context) => {
224
- if (output.statusCode !== 200 && output.statusCode >= 300) {
225
- return de_CommandError(output, context);
226
- }
227
- const contents = smithyClient.map({
228
- $metadata: deserializeMetadata(output),
229
- });
230
- const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
231
- const doc = smithyClient.take(data, {
232
- NextToken: smithyClient.expectString,
233
- Segments: smithyClient._json,
234
- });
235
- Object.assign(contents, doc);
236
- return contents;
237
- };
238
- const de_CommandError = async (output, context) => {
239
- const parsedOutput = {
240
- ...output,
241
- body: await core$1.parseJsonErrorBody(output.body, context),
242
- };
243
- const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
244
- switch (errorCode) {
245
- case "AccessDeniedException":
246
- case "com.amazonaws.connectcontactlens#AccessDeniedException":
247
- throw await de_AccessDeniedExceptionRes(parsedOutput);
248
- case "InternalServiceException":
249
- case "com.amazonaws.connectcontactlens#InternalServiceException":
250
- throw await de_InternalServiceExceptionRes(parsedOutput);
251
- case "InvalidRequestException":
252
- case "com.amazonaws.connectcontactlens#InvalidRequestException":
253
- throw await de_InvalidRequestExceptionRes(parsedOutput);
254
- case "ResourceNotFoundException":
255
- case "com.amazonaws.connectcontactlens#ResourceNotFoundException":
256
- throw await de_ResourceNotFoundExceptionRes(parsedOutput);
257
- case "ThrottlingException":
258
- case "com.amazonaws.connectcontactlens#ThrottlingException":
259
- throw await de_ThrottlingExceptionRes(parsedOutput);
260
- default:
261
- const parsedBody = parsedOutput.body;
262
- return throwDefaultError({
263
- output,
264
- parsedBody,
265
- errorCode,
266
- });
267
- }
268
- };
269
- const throwDefaultError = smithyClient.withBaseException(ConnectContactLensServiceException);
270
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
271
- const contents = smithyClient.map({});
272
- const data = parsedOutput.body;
273
- const doc = smithyClient.take(data, {
274
- Message: smithyClient.expectString,
275
- });
276
- Object.assign(contents, doc);
277
- const exception = new AccessDeniedException({
278
- $metadata: deserializeMetadata(parsedOutput),
279
- ...contents,
280
- });
281
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
282
- };
283
- const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
284
- const contents = smithyClient.map({});
285
- const data = parsedOutput.body;
286
- const doc = smithyClient.take(data, {
287
- Message: smithyClient.expectString,
288
- });
289
- Object.assign(contents, doc);
290
- const exception = new InternalServiceException({
291
- $metadata: deserializeMetadata(parsedOutput),
292
- ...contents,
293
- });
294
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
295
- };
296
- const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
297
- const contents = smithyClient.map({});
298
- const data = parsedOutput.body;
299
- const doc = smithyClient.take(data, {
300
- Message: smithyClient.expectString,
301
- });
302
- Object.assign(contents, doc);
303
- const exception = new InvalidRequestException({
304
- $metadata: deserializeMetadata(parsedOutput),
305
- ...contents,
306
- });
307
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
308
- };
309
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
310
- const contents = smithyClient.map({});
311
- const data = parsedOutput.body;
312
- const doc = smithyClient.take(data, {
313
- Message: smithyClient.expectString,
314
- });
315
- Object.assign(contents, doc);
316
- const exception = new ResourceNotFoundException({
317
- $metadata: deserializeMetadata(parsedOutput),
318
- ...contents,
319
- });
320
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
321
- };
322
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
323
- const contents = smithyClient.map({});
324
- const data = parsedOutput.body;
325
- const doc = smithyClient.take(data, {
326
- Message: smithyClient.expectString,
327
- });
328
- Object.assign(contents, doc);
329
- const exception = new ThrottlingException({
330
- $metadata: deserializeMetadata(parsedOutput),
331
- ...contents,
332
- });
333
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
334
- };
335
- const deserializeMetadata = (output) => ({
336
- httpStatusCode: output.statusCode,
337
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
338
- extendedRequestId: output.headers["x-amz-id-2"],
339
- cfId: output.headers["x-amz-cf-id"],
340
- });
206
+
207
+ const _ADE = "AccessDeniedException";
208
+ const _BOC = "BeginOffsetChar";
209
+ const _BOM = "BeginOffsetMillis";
210
+ const _C = "Categories";
211
+ const _CD = "CategoryDetails";
212
+ const _CI = "ContactId";
213
+ const _CO = "CharacterOffsets";
214
+ const _Co = "Content";
215
+ const _EOC = "EndOffsetChar";
216
+ const _EOM = "EndOffsetMillis";
217
+ const _FC = "FailureCode";
218
+ const _I = "Id";
219
+ const _ID = "IssueDetected";
220
+ const _IDs = "IssuesDetected";
221
+ const _II = "InstanceId";
222
+ const _IRE = "InvalidRequestException";
223
+ const _ISE = "InternalServiceException";
224
+ const _LRCAS = "ListRealtimeContactAnalysisSegments";
225
+ const _LRCASR = "ListRealtimeContactAnalysisSegmentsRequest";
226
+ const _LRCASRi = "ListRealtimeContactAnalysisSegmentsResponse";
227
+ const _M = "Message";
228
+ const _MC = "MatchedCategories";
229
+ const _MD = "MatchedDetails";
230
+ const _MR = "MaxResults";
231
+ const _NT = "NextToken";
232
+ const _PCS = "PostContactSummary";
233
+ const _PI = "ParticipantId";
234
+ const _POI = "PointsOfInterest";
235
+ const _POIo = "PointOfInterest";
236
+ const _PR = "ParticipantRole";
237
+ const _RCAS = "RealtimeContactAnalysisSegment";
238
+ const _RCASe = "RealtimeContactAnalysisSegments";
239
+ const _RNFE = "ResourceNotFoundException";
240
+ const _S = "Segments";
241
+ const _Se = "Sentiment";
242
+ const _St = "Status";
243
+ const _T = "Transcript";
244
+ const _TE = "ThrottlingException";
245
+ const _c = "client";
246
+ const _e = "error";
247
+ const _h = "http";
248
+ const _hE = "httpError";
249
+ const _s = "server";
250
+ const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.connectcontactlens";
251
+ const n0 = "com.amazonaws.connectcontactlens";
252
+ var AccessDeniedException = [
253
+ -3,
254
+ n0,
255
+ _ADE,
256
+ {
257
+ [_e]: _c,
258
+ [_hE]: 403,
259
+ },
260
+ [_M],
261
+ [0],
262
+ ];
263
+ schema.TypeRegistry.for(n0).registerError(AccessDeniedException, AccessDeniedException$1);
264
+ var Categories = [3, n0, _C, 0, [_MC, _MD], [64 | 0, () => MatchedDetails]];
265
+ var CategoryDetails = [3, n0, _CD, 0, [_POI], [() => PointsOfInterest]];
266
+ var CharacterOffsets = [3, n0, _CO, 0, [_BOC, _EOC], [1, 1]];
267
+ var InternalServiceException = [
268
+ -3,
269
+ n0,
270
+ _ISE,
271
+ {
272
+ [_e]: _s,
273
+ [_hE]: 500,
274
+ },
275
+ [_M],
276
+ [0],
277
+ ];
278
+ schema.TypeRegistry.for(n0).registerError(InternalServiceException, InternalServiceException$1);
279
+ var InvalidRequestException = [
280
+ -3,
281
+ n0,
282
+ _IRE,
283
+ {
284
+ [_e]: _c,
285
+ [_hE]: 400,
286
+ },
287
+ [_M],
288
+ [0],
289
+ ];
290
+ schema.TypeRegistry.for(n0).registerError(InvalidRequestException, InvalidRequestException$1);
291
+ var IssueDetected = [3, n0, _ID, 0, [_CO], [() => CharacterOffsets]];
292
+ var ListRealtimeContactAnalysisSegmentsRequest = [
293
+ 3,
294
+ n0,
295
+ _LRCASR,
296
+ 0,
297
+ [_II, _CI, _MR, _NT],
298
+ [0, 0, 1, 0],
299
+ ];
300
+ var ListRealtimeContactAnalysisSegmentsResponse = [
301
+ 3,
302
+ n0,
303
+ _LRCASRi,
304
+ 0,
305
+ [_S, _NT],
306
+ [() => RealtimeContactAnalysisSegments, 0],
307
+ ];
308
+ var PointOfInterest = [3, n0, _POIo, 0, [_BOM, _EOM], [1, 1]];
309
+ var PostContactSummary = [3, n0, _PCS, 0, [_Co, _St, _FC], [0, 0, 0]];
310
+ var RealtimeContactAnalysisSegment = [
311
+ 3,
312
+ n0,
313
+ _RCAS,
314
+ 0,
315
+ [_T, _C, _PCS],
316
+ [() => Transcript, () => Categories, () => PostContactSummary],
317
+ ];
318
+ var ResourceNotFoundException = [
319
+ -3,
320
+ n0,
321
+ _RNFE,
322
+ {
323
+ [_e]: _c,
324
+ [_hE]: 404,
325
+ },
326
+ [_M],
327
+ [0],
328
+ ];
329
+ schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException, ResourceNotFoundException$1);
330
+ var ThrottlingException = [
331
+ -3,
332
+ n0,
333
+ _TE,
334
+ {
335
+ [_e]: _c,
336
+ [_hE]: 429,
337
+ },
338
+ [_M],
339
+ [0],
340
+ ];
341
+ schema.TypeRegistry.for(n0).registerError(ThrottlingException, ThrottlingException$1);
342
+ var Transcript = [
343
+ 3,
344
+ n0,
345
+ _T,
346
+ 0,
347
+ [_I, _PI, _PR, _Co, _BOM, _EOM, _Se, _IDs],
348
+ [0, 0, 0, 0, 1, 1, 0, () => IssuesDetected],
349
+ ];
350
+ var ConnectContactLensServiceException = [
351
+ -3,
352
+ _sm,
353
+ "ConnectContactLensServiceException",
354
+ 0,
355
+ [],
356
+ [],
357
+ ];
358
+ schema.TypeRegistry.for(_sm).registerError(ConnectContactLensServiceException, ConnectContactLensServiceException$1);
359
+ var IssuesDetected = [1, n0, _IDs, 0, () => IssueDetected];
360
+ var PointsOfInterest = [1, n0, _POI, 0, () => PointOfInterest];
361
+ var RealtimeContactAnalysisSegments = [1, n0, _RCASe, 0, () => RealtimeContactAnalysisSegment];
362
+ var MatchedDetails = [2, n0, _MD, 0, 0, () => CategoryDetails];
363
+ var ListRealtimeContactAnalysisSegments = [
364
+ 9,
365
+ n0,
366
+ _LRCAS,
367
+ {
368
+ [_h]: ["POST", "/realtime-contact-analysis/analysis-segments", 200],
369
+ },
370
+ () => ListRealtimeContactAnalysisSegmentsRequest,
371
+ () => ListRealtimeContactAnalysisSegmentsResponse,
372
+ ];
341
373
 
342
374
  class ListRealtimeContactAnalysisSegmentsCommand extends smithyClient.Command
343
375
  .classBuilder()
344
376
  .ep(commonParams)
345
377
  .m(function (Command, cs, config, o) {
346
- return [
347
- middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
348
- middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
349
- ];
378
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
350
379
  })
351
380
  .s("AmazonConnectContactLens", "ListRealtimeContactAnalysisSegments", {})
352
381
  .n("ConnectContactLensClient", "ListRealtimeContactAnalysisSegmentsCommand")
353
- .f(void 0, void 0)
354
- .ser(se_ListRealtimeContactAnalysisSegmentsCommand)
355
- .de(de_ListRealtimeContactAnalysisSegmentsCommand)
382
+ .sc(ListRealtimeContactAnalysisSegments)
356
383
  .build() {
357
384
  }
358
385
 
@@ -373,16 +400,16 @@ Object.defineProperty(exports, "__Client", {
373
400
  enumerable: true,
374
401
  get: function () { return smithyClient.Client; }
375
402
  });
376
- exports.AccessDeniedException = AccessDeniedException;
403
+ exports.AccessDeniedException = AccessDeniedException$1;
377
404
  exports.ConnectContactLens = ConnectContactLens;
378
405
  exports.ConnectContactLensClient = ConnectContactLensClient;
379
- exports.ConnectContactLensServiceException = ConnectContactLensServiceException;
380
- exports.InternalServiceException = InternalServiceException;
381
- exports.InvalidRequestException = InvalidRequestException;
406
+ exports.ConnectContactLensServiceException = ConnectContactLensServiceException$1;
407
+ exports.InternalServiceException = InternalServiceException$1;
408
+ exports.InvalidRequestException = InvalidRequestException$1;
382
409
  exports.ListRealtimeContactAnalysisSegmentsCommand = ListRealtimeContactAnalysisSegmentsCommand;
383
410
  exports.PostContactSummaryFailureCode = PostContactSummaryFailureCode;
384
411
  exports.PostContactSummaryStatus = PostContactSummaryStatus;
385
- exports.ResourceNotFoundException = ResourceNotFoundException;
412
+ exports.ResourceNotFoundException = ResourceNotFoundException$1;
386
413
  exports.SentimentValue = SentimentValue;
387
- exports.ThrottlingException = ThrottlingException;
414
+ exports.ThrottlingException = ThrottlingException$1;
388
415
  exports.paginateListRealtimeContactAnalysisSegments = paginateListRealtimeContactAnalysisSegments;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const core_1 = require("@aws-sdk/core");
5
+ const protocols_1 = require("@aws-sdk/core/protocols");
5
6
  const smithy_client_1 = require("@smithy/smithy-client");
6
7
  const url_parser_1 = require("@smithy/url-parser");
7
8
  const util_base64_1 = require("@smithy/util-base64");
@@ -25,6 +26,7 @@ const getRuntimeConfig = (config) => {
25
26
  },
26
27
  ],
27
28
  logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
29
+ protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.connectcontactlens" }),
28
30
  serviceId: config?.serviceId ?? "Connect Contact Lens",
29
31
  urlParser: config?.urlParser ?? url_parser_1.parseUrl,
30
32
  utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
@@ -4,6 +4,7 @@ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detec
4
4
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
5
5
  import { resolveRegionConfig } from "@smithy/config-resolver";
6
6
  import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
7
+ import { getSchemaSerdePlugin } from "@smithy/core/schema";
7
8
  import { getContentLengthPlugin } from "@smithy/middleware-content-length";
8
9
  import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
9
10
  import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
@@ -28,6 +29,7 @@ export class ConnectContactLensClient extends __Client {
28
29
  const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
29
30
  const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
30
31
  this.config = _config_8;
32
+ this.middlewareStack.use(getSchemaSerdePlugin(this.config));
31
33
  this.middlewareStack.use(getUserAgentPlugin(this.config));
32
34
  this.middlewareStack.use(getRetryPlugin(this.config));
33
35
  this.middlewareStack.use(getContentLengthPlugin(this.config));
@@ -1,22 +1,16 @@
1
1
  import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
- import { getSerdePlugin } from "@smithy/middleware-serde";
3
2
  import { Command as $Command } from "@smithy/smithy-client";
4
3
  import { commonParams } from "../endpoint/EndpointParameters";
5
- import { de_ListRealtimeContactAnalysisSegmentsCommand, se_ListRealtimeContactAnalysisSegmentsCommand, } from "../protocols/Aws_restJson1";
4
+ import { ListRealtimeContactAnalysisSegments } from "../schemas/schemas_0";
6
5
  export { $Command };
7
6
  export class ListRealtimeContactAnalysisSegmentsCommand extends $Command
8
7
  .classBuilder()
9
8
  .ep(commonParams)
10
9
  .m(function (Command, cs, config, o) {
11
- return [
12
- getSerdePlugin(config, this.serialize, this.deserialize),
13
- getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
- ];
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
15
11
  })
16
12
  .s("AmazonConnectContactLens", "ListRealtimeContactAnalysisSegments", {})
17
13
  .n("ConnectContactLensClient", "ListRealtimeContactAnalysisSegmentsCommand")
18
- .f(void 0, void 0)
19
- .ser(se_ListRealtimeContactAnalysisSegmentsCommand)
20
- .de(de_ListRealtimeContactAnalysisSegmentsCommand)
14
+ .sc(ListRealtimeContactAnalysisSegments)
21
15
  .build() {
22
16
  }
@@ -1,4 +1,5 @@
1
1
  import { AwsSdkSigV4Signer } from "@aws-sdk/core";
2
+ import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
2
3
  import { NoOpLogger } from "@smithy/smithy-client";
3
4
  import { parseUrl } from "@smithy/url-parser";
4
5
  import { fromBase64, toBase64 } from "@smithy/util-base64";
@@ -22,6 +23,7 @@ export const getRuntimeConfig = (config) => {
22
23
  },
23
24
  ],
24
25
  logger: config?.logger ?? new NoOpLogger(),
26
+ protocol: config?.protocol ?? new AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.connectcontactlens" }),
25
27
  serviceId: config?.serviceId ?? "Connect Contact Lens",
26
28
  urlParser: config?.urlParser ?? parseUrl,
27
29
  utf8Decoder: config?.utf8Decoder ?? fromUtf8,
@@ -0,0 +1,171 @@
1
+ const _ADE = "AccessDeniedException";
2
+ const _BOC = "BeginOffsetChar";
3
+ const _BOM = "BeginOffsetMillis";
4
+ const _C = "Categories";
5
+ const _CD = "CategoryDetails";
6
+ const _CI = "ContactId";
7
+ const _CO = "CharacterOffsets";
8
+ const _Co = "Content";
9
+ const _EOC = "EndOffsetChar";
10
+ const _EOM = "EndOffsetMillis";
11
+ const _FC = "FailureCode";
12
+ const _I = "Id";
13
+ const _ID = "IssueDetected";
14
+ const _IDs = "IssuesDetected";
15
+ const _II = "InstanceId";
16
+ const _IRE = "InvalidRequestException";
17
+ const _ISE = "InternalServiceException";
18
+ const _LRCAS = "ListRealtimeContactAnalysisSegments";
19
+ const _LRCASR = "ListRealtimeContactAnalysisSegmentsRequest";
20
+ const _LRCASRi = "ListRealtimeContactAnalysisSegmentsResponse";
21
+ const _M = "Message";
22
+ const _MC = "MatchedCategories";
23
+ const _MD = "MatchedDetails";
24
+ const _MR = "MaxResults";
25
+ const _NT = "NextToken";
26
+ const _PCS = "PostContactSummary";
27
+ const _PI = "ParticipantId";
28
+ const _POI = "PointsOfInterest";
29
+ const _POIo = "PointOfInterest";
30
+ const _PR = "ParticipantRole";
31
+ const _RCAS = "RealtimeContactAnalysisSegment";
32
+ const _RCASe = "RealtimeContactAnalysisSegments";
33
+ const _RNFE = "ResourceNotFoundException";
34
+ const _S = "Segments";
35
+ const _Se = "Sentiment";
36
+ const _St = "Status";
37
+ const _T = "Transcript";
38
+ const _TE = "ThrottlingException";
39
+ const _c = "client";
40
+ const _e = "error";
41
+ const _h = "http";
42
+ const _hE = "httpError";
43
+ const _s = "server";
44
+ const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.connectcontactlens";
45
+ const n0 = "com.amazonaws.connectcontactlens";
46
+ import { TypeRegistry } from "@smithy/core/schema";
47
+ import { ConnectContactLensServiceException as __ConnectContactLensServiceException } from "../models/ConnectContactLensServiceException";
48
+ import { AccessDeniedException as __AccessDeniedException, InternalServiceException as __InternalServiceException, InvalidRequestException as __InvalidRequestException, ResourceNotFoundException as __ResourceNotFoundException, ThrottlingException as __ThrottlingException, } from "../models/index";
49
+ export var AccessDeniedException = [
50
+ -3,
51
+ n0,
52
+ _ADE,
53
+ {
54
+ [_e]: _c,
55
+ [_hE]: 403,
56
+ },
57
+ [_M],
58
+ [0],
59
+ ];
60
+ TypeRegistry.for(n0).registerError(AccessDeniedException, __AccessDeniedException);
61
+ export var Categories = [3, n0, _C, 0, [_MC, _MD], [64 | 0, () => MatchedDetails]];
62
+ export var CategoryDetails = [3, n0, _CD, 0, [_POI], [() => PointsOfInterest]];
63
+ export var CharacterOffsets = [3, n0, _CO, 0, [_BOC, _EOC], [1, 1]];
64
+ export var InternalServiceException = [
65
+ -3,
66
+ n0,
67
+ _ISE,
68
+ {
69
+ [_e]: _s,
70
+ [_hE]: 500,
71
+ },
72
+ [_M],
73
+ [0],
74
+ ];
75
+ TypeRegistry.for(n0).registerError(InternalServiceException, __InternalServiceException);
76
+ export var InvalidRequestException = [
77
+ -3,
78
+ n0,
79
+ _IRE,
80
+ {
81
+ [_e]: _c,
82
+ [_hE]: 400,
83
+ },
84
+ [_M],
85
+ [0],
86
+ ];
87
+ TypeRegistry.for(n0).registerError(InvalidRequestException, __InvalidRequestException);
88
+ export var IssueDetected = [3, n0, _ID, 0, [_CO], [() => CharacterOffsets]];
89
+ export var ListRealtimeContactAnalysisSegmentsRequest = [
90
+ 3,
91
+ n0,
92
+ _LRCASR,
93
+ 0,
94
+ [_II, _CI, _MR, _NT],
95
+ [0, 0, 1, 0],
96
+ ];
97
+ export var ListRealtimeContactAnalysisSegmentsResponse = [
98
+ 3,
99
+ n0,
100
+ _LRCASRi,
101
+ 0,
102
+ [_S, _NT],
103
+ [() => RealtimeContactAnalysisSegments, 0],
104
+ ];
105
+ export var PointOfInterest = [3, n0, _POIo, 0, [_BOM, _EOM], [1, 1]];
106
+ export var PostContactSummary = [3, n0, _PCS, 0, [_Co, _St, _FC], [0, 0, 0]];
107
+ export var RealtimeContactAnalysisSegment = [
108
+ 3,
109
+ n0,
110
+ _RCAS,
111
+ 0,
112
+ [_T, _C, _PCS],
113
+ [() => Transcript, () => Categories, () => PostContactSummary],
114
+ ];
115
+ export var ResourceNotFoundException = [
116
+ -3,
117
+ n0,
118
+ _RNFE,
119
+ {
120
+ [_e]: _c,
121
+ [_hE]: 404,
122
+ },
123
+ [_M],
124
+ [0],
125
+ ];
126
+ TypeRegistry.for(n0).registerError(ResourceNotFoundException, __ResourceNotFoundException);
127
+ export var ThrottlingException = [
128
+ -3,
129
+ n0,
130
+ _TE,
131
+ {
132
+ [_e]: _c,
133
+ [_hE]: 429,
134
+ },
135
+ [_M],
136
+ [0],
137
+ ];
138
+ TypeRegistry.for(n0).registerError(ThrottlingException, __ThrottlingException);
139
+ export var Transcript = [
140
+ 3,
141
+ n0,
142
+ _T,
143
+ 0,
144
+ [_I, _PI, _PR, _Co, _BOM, _EOM, _Se, _IDs],
145
+ [0, 0, 0, 0, 1, 1, 0, () => IssuesDetected],
146
+ ];
147
+ export var __Unit = "unit";
148
+ export var ConnectContactLensServiceException = [
149
+ -3,
150
+ _sm,
151
+ "ConnectContactLensServiceException",
152
+ 0,
153
+ [],
154
+ [],
155
+ ];
156
+ TypeRegistry.for(_sm).registerError(ConnectContactLensServiceException, __ConnectContactLensServiceException);
157
+ export var IssuesDetected = [1, n0, _IDs, 0, () => IssueDetected];
158
+ export var MatchedCategories = 64 | 0;
159
+ export var PointsOfInterest = [1, n0, _POI, 0, () => PointOfInterest];
160
+ export var RealtimeContactAnalysisSegments = [1, n0, _RCASe, 0, () => RealtimeContactAnalysisSegment];
161
+ export var MatchedDetails = [2, n0, _MD, 0, 0, () => CategoryDetails];
162
+ export var ListRealtimeContactAnalysisSegments = [
163
+ 9,
164
+ n0,
165
+ _LRCAS,
166
+ {
167
+ [_h]: ["POST", "/realtime-contact-analysis/analysis-segments", 200],
168
+ },
169
+ () => ListRealtimeContactAnalysisSegmentsRequest,
170
+ () => ListRealtimeContactAnalysisSegmentsResponse,
171
+ ];
@@ -5,7 +5,7 @@ import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-
5
5
  import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
6
6
  import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
7
7
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
8
- import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
8
+ import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, ClientProtocol, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, HttpRequest, HttpResponse, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
9
9
  import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
10
10
  import { ListRealtimeContactAnalysisSegmentsCommandInput, ListRealtimeContactAnalysisSegmentsCommandOutput } from "./commands/ListRealtimeContactAnalysisSegmentsCommand";
11
11
  import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
@@ -142,6 +142,15 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
142
142
  * Optional extensions
143
143
  */
144
144
  extensions?: RuntimeExtension[];
145
+ /**
146
+ * The protocol controlling the message type (e.g. HTTP) and format (e.g. JSON)
147
+ * may be overridden. A default will always be set by the client.
148
+ * Available options depend on the service's supported protocols and will not be validated by
149
+ * the client.
150
+ * @alpha
151
+ *
152
+ */
153
+ protocol?: ClientProtocol<HttpRequest, HttpResponse>;
145
154
  /**
146
155
  * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
147
156
  */
@@ -29,6 +29,7 @@ export declare const getRuntimeConfig: (config: ConnectContactLensClientConfig)
29
29
  profile?: string;
30
30
  logger: import("@smithy/types").Logger;
31
31
  extensions: import("./runtimeExtensions").RuntimeExtension[];
32
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
32
33
  customUserAgent?: string | import("@smithy/types").UserAgent;
33
34
  userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
34
35
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
@@ -31,6 +31,7 @@ export declare const getRuntimeConfig: (config: ConnectContactLensClientConfig)
31
31
  profile?: string;
32
32
  logger: import("@smithy/types").Logger;
33
33
  extensions: import("./runtimeExtensions").RuntimeExtension[];
34
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
34
35
  customUserAgent?: string | import("@smithy/types").UserAgent;
35
36
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
36
37
  endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
@@ -27,6 +27,7 @@ export declare const getRuntimeConfig: (config: ConnectContactLensClientConfig)
27
27
  retryMode: string | import("@smithy/types").Provider<string>;
28
28
  logger: import("@smithy/types").Logger;
29
29
  extensions: import("./runtimeExtensions").RuntimeExtension[];
30
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
30
31
  defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
31
32
  customUserAgent?: string | import("@smithy/types").UserAgent;
32
33
  userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
@@ -14,6 +14,7 @@ export declare const getRuntimeConfig: (config: ConnectContactLensClientConfig)
14
14
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").ConnectContactLensHttpAuthSchemeProvider;
15
15
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
16
16
  logger: import("@smithy/types").Logger;
17
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
17
18
  serviceId: string;
18
19
  urlParser: import("@smithy/types").UrlParser;
19
20
  utf8Decoder: import("@smithy/types").Decoder;
@@ -0,0 +1,24 @@
1
+ import { StaticErrorSchema, StaticListSchema, StaticMapSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";
2
+ export declare var AccessDeniedException: StaticErrorSchema;
3
+ export declare var Categories: StaticStructureSchema;
4
+ export declare var CategoryDetails: StaticStructureSchema;
5
+ export declare var CharacterOffsets: StaticStructureSchema;
6
+ export declare var InternalServiceException: StaticErrorSchema;
7
+ export declare var InvalidRequestException: StaticErrorSchema;
8
+ export declare var IssueDetected: StaticStructureSchema;
9
+ export declare var ListRealtimeContactAnalysisSegmentsRequest: StaticStructureSchema;
10
+ export declare var ListRealtimeContactAnalysisSegmentsResponse: StaticStructureSchema;
11
+ export declare var PointOfInterest: StaticStructureSchema;
12
+ export declare var PostContactSummary: StaticStructureSchema;
13
+ export declare var RealtimeContactAnalysisSegment: StaticStructureSchema;
14
+ export declare var ResourceNotFoundException: StaticErrorSchema;
15
+ export declare var ThrottlingException: StaticErrorSchema;
16
+ export declare var Transcript: StaticStructureSchema;
17
+ export declare var __Unit: "unit";
18
+ export declare var ConnectContactLensServiceException: StaticErrorSchema;
19
+ export declare var IssuesDetected: StaticListSchema;
20
+ export declare var MatchedCategories: number;
21
+ export declare var PointsOfInterest: StaticListSchema;
22
+ export declare var RealtimeContactAnalysisSegments: StaticListSchema;
23
+ export declare var MatchedDetails: StaticMapSchema;
24
+ export declare var ListRealtimeContactAnalysisSegments: StaticOperationSchema;
@@ -30,10 +30,13 @@ import {
30
30
  BodyLengthCalculator as __BodyLengthCalculator,
31
31
  CheckOptionalClientConfig as __CheckOptionalClientConfig,
32
32
  ChecksumConstructor as __ChecksumConstructor,
33
+ ClientProtocol,
33
34
  Decoder as __Decoder,
34
35
  Encoder as __Encoder,
35
36
  HashConstructor as __HashConstructor,
36
37
  HttpHandlerOptions as __HttpHandlerOptions,
38
+ HttpRequest,
39
+ HttpResponse,
37
40
  Logger as __Logger,
38
41
  Provider as __Provider,
39
42
  Provider,
@@ -83,6 +86,7 @@ export interface ClientDefaults
83
86
  retryMode?: string | __Provider<string>;
84
87
  logger?: __Logger;
85
88
  extensions?: RuntimeExtension[];
89
+ protocol?: ClientProtocol<HttpRequest, HttpResponse>;
86
90
  defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
87
91
  }
88
92
  export type ConnectContactLensClientConfigType = Partial<
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
40
40
  profile?: string;
41
41
  logger: import("@smithy/types").Logger;
42
42
  extensions: import("./runtimeExtensions").RuntimeExtension[];
43
+ protocol: import("@smithy/types").ClientProtocol<
44
+ import("@smithy/types").HttpRequest,
45
+ import("@smithy/types").HttpResponse
46
+ >;
43
47
  customUserAgent?: string | import("@smithy/types").UserAgent;
44
48
  userAgentAppId?:
45
49
  | string
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
40
40
  profile?: string;
41
41
  logger: import("@smithy/types").Logger;
42
42
  extensions: import("./runtimeExtensions").RuntimeExtension[];
43
+ protocol: import("@smithy/types").ClientProtocol<
44
+ import("@smithy/types").HttpRequest,
45
+ import("@smithy/types").HttpResponse
46
+ >;
43
47
  customUserAgent?: string | import("@smithy/types").UserAgent;
44
48
  retryStrategy?:
45
49
  | import("@smithy/types").RetryStrategy
@@ -39,6 +39,10 @@ export declare const getRuntimeConfig: (
39
39
  retryMode: string | import("@smithy/types").Provider<string>;
40
40
  logger: import("@smithy/types").Logger;
41
41
  extensions: import("./runtimeExtensions").RuntimeExtension[];
42
+ protocol: import("@smithy/types").ClientProtocol<
43
+ import("@smithy/types").HttpRequest,
44
+ import("@smithy/types").HttpResponse
45
+ >;
42
46
  defaultsMode:
43
47
  | import("@smithy/smithy-client").DefaultsMode
44
48
  | import("@smithy/types").Provider<
@@ -16,6 +16,10 @@ export declare const getRuntimeConfig: (
16
16
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").ConnectContactLensHttpAuthSchemeProvider;
17
17
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
18
18
  logger: import("@smithy/types").Logger;
19
+ protocol: import("@smithy/types").ClientProtocol<
20
+ import("@smithy/types").HttpRequest,
21
+ import("@smithy/types").HttpResponse
22
+ >;
19
23
  serviceId: string;
20
24
  urlParser: import("@smithy/types").UrlParser;
21
25
  utf8Decoder: import("@smithy/types").Decoder;
@@ -0,0 +1,30 @@
1
+ import {
2
+ StaticErrorSchema,
3
+ StaticListSchema,
4
+ StaticMapSchema,
5
+ StaticOperationSchema,
6
+ StaticStructureSchema,
7
+ } from "@smithy/types";
8
+ export declare var AccessDeniedException: StaticErrorSchema;
9
+ export declare var Categories: StaticStructureSchema;
10
+ export declare var CategoryDetails: StaticStructureSchema;
11
+ export declare var CharacterOffsets: StaticStructureSchema;
12
+ export declare var InternalServiceException: StaticErrorSchema;
13
+ export declare var InvalidRequestException: StaticErrorSchema;
14
+ export declare var IssueDetected: StaticStructureSchema;
15
+ export declare var ListRealtimeContactAnalysisSegmentsRequest: StaticStructureSchema;
16
+ export declare var ListRealtimeContactAnalysisSegmentsResponse: StaticStructureSchema;
17
+ export declare var PointOfInterest: StaticStructureSchema;
18
+ export declare var PostContactSummary: StaticStructureSchema;
19
+ export declare var RealtimeContactAnalysisSegment: StaticStructureSchema;
20
+ export declare var ResourceNotFoundException: StaticErrorSchema;
21
+ export declare var ThrottlingException: StaticErrorSchema;
22
+ export declare var Transcript: StaticStructureSchema;
23
+ export declare var __Unit: "unit";
24
+ export declare var ConnectContactLensServiceException: StaticErrorSchema;
25
+ export declare var IssuesDetected: StaticListSchema;
26
+ export declare var MatchedCategories: number;
27
+ export declare var PointsOfInterest: StaticListSchema;
28
+ export declare var RealtimeContactAnalysisSegments: StaticListSchema;
29
+ export declare var MatchedDetails: StaticMapSchema;
30
+ export declare var ListRealtimeContactAnalysisSegments: StaticOperationSchema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-connect-contact-lens",
3
3
  "description": "AWS SDK for JavaScript Connect Contact Lens Client for Node.js, Browser and React Native",
4
- "version": "3.928.0",
4
+ "version": "3.929.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-connect-contact-lens",
@@ -21,7 +21,7 @@
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
23
  "@aws-sdk/core": "3.928.0",
24
- "@aws-sdk/credential-provider-node": "3.928.0",
24
+ "@aws-sdk/credential-provider-node": "3.929.0",
25
25
  "@aws-sdk/middleware-host-header": "3.922.0",
26
26
  "@aws-sdk/middleware-logger": "3.922.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.922.0",
@@ -1,140 +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, map, take, withBaseException, } from "@smithy/smithy-client";
4
- import { ConnectContactLensServiceException as __BaseException } from "../models/ConnectContactLensServiceException";
5
- import { AccessDeniedException, InternalServiceException, InvalidRequestException, ResourceNotFoundException, ThrottlingException, } from "../models/models_0";
6
- export const se_ListRealtimeContactAnalysisSegmentsCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = {
9
- "content-type": "application/json",
10
- };
11
- b.bp("/realtime-contact-analysis/analysis-segments");
12
- let body;
13
- body = JSON.stringify(take(input, {
14
- ContactId: [],
15
- InstanceId: [],
16
- MaxResults: [],
17
- NextToken: [],
18
- }));
19
- b.m("POST").h(headers).b(body);
20
- return b.build();
21
- };
22
- export const de_ListRealtimeContactAnalysisSegmentsCommand = async (output, context) => {
23
- if (output.statusCode !== 200 && output.statusCode >= 300) {
24
- return de_CommandError(output, context);
25
- }
26
- const contents = map({
27
- $metadata: deserializeMetadata(output),
28
- });
29
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
30
- const doc = take(data, {
31
- NextToken: __expectString,
32
- Segments: _json,
33
- });
34
- Object.assign(contents, doc);
35
- return contents;
36
- };
37
- const de_CommandError = async (output, context) => {
38
- const parsedOutput = {
39
- ...output,
40
- body: await parseErrorBody(output.body, context),
41
- };
42
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
43
- switch (errorCode) {
44
- case "AccessDeniedException":
45
- case "com.amazonaws.connectcontactlens#AccessDeniedException":
46
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
47
- case "InternalServiceException":
48
- case "com.amazonaws.connectcontactlens#InternalServiceException":
49
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
50
- case "InvalidRequestException":
51
- case "com.amazonaws.connectcontactlens#InvalidRequestException":
52
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
53
- case "ResourceNotFoundException":
54
- case "com.amazonaws.connectcontactlens#ResourceNotFoundException":
55
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
56
- case "ThrottlingException":
57
- case "com.amazonaws.connectcontactlens#ThrottlingException":
58
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
59
- default:
60
- const parsedBody = parsedOutput.body;
61
- return throwDefaultError({
62
- output,
63
- parsedBody,
64
- errorCode,
65
- });
66
- }
67
- };
68
- const throwDefaultError = withBaseException(__BaseException);
69
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
70
- const contents = map({});
71
- const data = parsedOutput.body;
72
- const doc = take(data, {
73
- Message: __expectString,
74
- });
75
- Object.assign(contents, doc);
76
- const exception = new AccessDeniedException({
77
- $metadata: deserializeMetadata(parsedOutput),
78
- ...contents,
79
- });
80
- return __decorateServiceException(exception, parsedOutput.body);
81
- };
82
- const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
83
- const contents = map({});
84
- const data = parsedOutput.body;
85
- const doc = take(data, {
86
- Message: __expectString,
87
- });
88
- Object.assign(contents, doc);
89
- const exception = new InternalServiceException({
90
- $metadata: deserializeMetadata(parsedOutput),
91
- ...contents,
92
- });
93
- return __decorateServiceException(exception, parsedOutput.body);
94
- };
95
- const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
96
- const contents = map({});
97
- const data = parsedOutput.body;
98
- const doc = take(data, {
99
- Message: __expectString,
100
- });
101
- Object.assign(contents, doc);
102
- const exception = new InvalidRequestException({
103
- $metadata: deserializeMetadata(parsedOutput),
104
- ...contents,
105
- });
106
- return __decorateServiceException(exception, parsedOutput.body);
107
- };
108
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
109
- const contents = map({});
110
- const data = parsedOutput.body;
111
- const doc = take(data, {
112
- Message: __expectString,
113
- });
114
- Object.assign(contents, doc);
115
- const exception = new ResourceNotFoundException({
116
- $metadata: deserializeMetadata(parsedOutput),
117
- ...contents,
118
- });
119
- return __decorateServiceException(exception, parsedOutput.body);
120
- };
121
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
122
- const contents = map({});
123
- const data = parsedOutput.body;
124
- const doc = take(data, {
125
- Message: __expectString,
126
- });
127
- Object.assign(contents, doc);
128
- const exception = new ThrottlingException({
129
- $metadata: deserializeMetadata(parsedOutput),
130
- ...contents,
131
- });
132
- return __decorateServiceException(exception, parsedOutput.body);
133
- };
134
- const deserializeMetadata = (output) => ({
135
- httpStatusCode: output.statusCode,
136
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
137
- extendedRequestId: output.headers["x-amz-id-2"],
138
- cfId: output.headers["x-amz-cf-id"],
139
- });
140
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
@@ -1,11 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
2
- import { SerdeContext as __SerdeContext } from "@smithy/types";
3
- import { ListRealtimeContactAnalysisSegmentsCommandInput, ListRealtimeContactAnalysisSegmentsCommandOutput } from "../commands/ListRealtimeContactAnalysisSegmentsCommand";
4
- /**
5
- * serializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand
6
- */
7
- export declare const se_ListRealtimeContactAnalysisSegmentsCommand: (input: ListRealtimeContactAnalysisSegmentsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
8
- /**
9
- * deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand
10
- */
11
- export declare const de_ListRealtimeContactAnalysisSegmentsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListRealtimeContactAnalysisSegmentsCommandOutput>;
@@ -1,17 +0,0 @@
1
- import {
2
- HttpRequest as __HttpRequest,
3
- HttpResponse as __HttpResponse,
4
- } from "@smithy/protocol-http";
5
- import { SerdeContext as __SerdeContext } from "@smithy/types";
6
- import {
7
- ListRealtimeContactAnalysisSegmentsCommandInput,
8
- ListRealtimeContactAnalysisSegmentsCommandOutput,
9
- } from "../commands/ListRealtimeContactAnalysisSegmentsCommand";
10
- export declare const se_ListRealtimeContactAnalysisSegmentsCommand: (
11
- input: ListRealtimeContactAnalysisSegmentsCommandInput,
12
- context: __SerdeContext
13
- ) => Promise<__HttpRequest>;
14
- export declare const de_ListRealtimeContactAnalysisSegmentsCommand: (
15
- output: __HttpResponse,
16
- context: __SerdeContext
17
- ) => Promise<ListRealtimeContactAnalysisSegmentsCommandOutput>;