@aws-sdk/client-connect-contact-lens 3.141.0 → 3.150.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/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.150.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.149.0...v3.150.0) (2022-08-15)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-connect-contact-lens
9
+
10
+
11
+
12
+
13
+
14
+ # [3.145.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.144.0...v3.145.0) (2022-08-08)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-connect-contact-lens
17
+
18
+
19
+
20
+
21
+
22
+ # [3.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
23
+
24
+
25
+ ### Features
26
+
27
+ * **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
28
+
29
+
30
+
31
+
32
+
6
33
  # [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
7
34
 
8
35
 
@@ -34,19 +34,17 @@ const deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand = async
34
34
  if (output.statusCode !== 200 && output.statusCode >= 300) {
35
35
  return deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommandError(output, context);
36
36
  }
37
- const contents = {
37
+ const contents = map({
38
38
  $metadata: deserializeMetadata(output),
39
- NextToken: undefined,
40
- Segments: undefined,
41
- };
39
+ });
42
40
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
43
- if (data.NextToken !== undefined && data.NextToken !== null) {
41
+ if (data.NextToken != null) {
44
42
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
45
43
  }
46
- if (data.Segments !== undefined && data.Segments !== null) {
44
+ if (data.Segments != null) {
47
45
  contents.Segments = deserializeAws_restJson1RealtimeContactAnalysisSegments(data.Segments, context);
48
46
  }
49
- return Promise.resolve(contents);
47
+ return contents;
50
48
  };
51
49
  exports.deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand = deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand;
52
50
  const deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommandError = async (output, context) => {
@@ -54,7 +52,6 @@ const deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommandError =
54
52
  ...output,
55
53
  body: await parseBody(output.body, context),
56
54
  };
57
- let response;
58
55
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
59
56
  switch (errorCode) {
60
57
  case "AccessDeniedException":
@@ -74,20 +71,19 @@ const deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommandError =
74
71
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
75
72
  default:
76
73
  const parsedBody = parsedOutput.body;
77
- const $metadata = deserializeMetadata(output);
78
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
79
- response = new ConnectContactLensServiceException_1.ConnectContactLensServiceException({
80
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
81
- $fault: "client",
82
- $metadata,
74
+ (0, smithy_client_1.throwDefaultError)({
75
+ output,
76
+ parsedBody,
77
+ exceptionCtor: ConnectContactLensServiceException_1.ConnectContactLensServiceException,
78
+ errorCode,
83
79
  });
84
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
85
80
  }
86
81
  };
82
+ const map = smithy_client_1.map;
87
83
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
88
- const contents = {};
84
+ const contents = map({});
89
85
  const data = parsedOutput.body;
90
- if (data.Message !== undefined && data.Message !== null) {
86
+ if (data.Message != null) {
91
87
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
92
88
  }
93
89
  const exception = new models_0_1.AccessDeniedException({
@@ -97,9 +93,9 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
97
93
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
98
94
  };
99
95
  const deserializeAws_restJson1InternalServiceExceptionResponse = async (parsedOutput, context) => {
100
- const contents = {};
96
+ const contents = map({});
101
97
  const data = parsedOutput.body;
102
- if (data.Message !== undefined && data.Message !== null) {
98
+ if (data.Message != null) {
103
99
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
104
100
  }
105
101
  const exception = new models_0_1.InternalServiceException({
@@ -109,9 +105,9 @@ const deserializeAws_restJson1InternalServiceExceptionResponse = async (parsedOu
109
105
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
110
106
  };
111
107
  const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
112
- const contents = {};
108
+ const contents = map({});
113
109
  const data = parsedOutput.body;
114
- if (data.Message !== undefined && data.Message !== null) {
110
+ if (data.Message != null) {
115
111
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
116
112
  }
117
113
  const exception = new models_0_1.InvalidRequestException({
@@ -121,9 +117,9 @@ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOut
121
117
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
122
118
  };
123
119
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
124
- const contents = {};
120
+ const contents = map({});
125
121
  const data = parsedOutput.body;
126
- if (data.Message !== undefined && data.Message !== null) {
122
+ if (data.Message != null) {
127
123
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
128
124
  }
129
125
  const exception = new models_0_1.ResourceNotFoundException({
@@ -133,9 +129,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
133
129
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
134
130
  };
135
131
  const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
136
- const contents = {};
132
+ const contents = map({});
137
133
  const data = parsedOutput.body;
138
- if (data.Message !== undefined && data.Message !== null) {
134
+ if (data.Message != null) {
139
135
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
140
136
  }
141
137
  const exception = new models_0_1.ThrottlingException({
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { ConnectContactLensServiceException as __BaseException } from "../models/ConnectContactLensServiceException";
5
5
  import { AccessDeniedException, InternalServiceException, InvalidRequestException, ResourceNotFoundException, ThrottlingException, } from "../models/models_0";
6
6
  export var serializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -36,28 +36,26 @@ export var deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand =
36
36
  if (output.statusCode !== 200 && output.statusCode >= 300) {
37
37
  return [2, deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommandError(output, context)];
38
38
  }
39
- contents = {
39
+ contents = map({
40
40
  $metadata: deserializeMetadata(output),
41
- NextToken: undefined,
42
- Segments: undefined,
43
- };
41
+ });
44
42
  _a = __expectNonNull;
45
43
  _b = __expectObject;
46
44
  return [4, parseBody(output.body, context)];
47
45
  case 1:
48
46
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
49
- if (data.NextToken !== undefined && data.NextToken !== null) {
47
+ if (data.NextToken != null) {
50
48
  contents.NextToken = __expectString(data.NextToken);
51
49
  }
52
- if (data.Segments !== undefined && data.Segments !== null) {
50
+ if (data.Segments != null) {
53
51
  contents.Segments = deserializeAws_restJson1RealtimeContactAnalysisSegments(data.Segments, context);
54
52
  }
55
- return [2, Promise.resolve(contents)];
53
+ return [2, contents];
56
54
  }
57
55
  });
58
56
  }); };
59
57
  var deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
60
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
58
+ var parsedOutput, _a, errorCode, _b, parsedBody;
61
59
  var _c;
62
60
  return __generator(this, function (_d) {
63
61
  switch (_d.label) {
@@ -94,23 +92,24 @@ var deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommandError = fu
94
92
  case 11: throw _d.sent();
95
93
  case 12:
96
94
  parsedBody = parsedOutput.body;
97
- $metadata = deserializeMetadata(output);
98
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
99
- response = new __BaseException({
100
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
101
- $fault: "client",
102
- $metadata: $metadata,
95
+ throwDefaultError({
96
+ output: output,
97
+ parsedBody: parsedBody,
98
+ exceptionCtor: __BaseException,
99
+ errorCode: errorCode,
103
100
  });
104
- throw __decorateServiceException(response, parsedBody);
101
+ _d.label = 13;
102
+ case 13: return [2];
105
103
  }
106
104
  });
107
105
  }); };
106
+ var map = __map;
108
107
  var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
109
108
  var contents, data, exception;
110
109
  return __generator(this, function (_a) {
111
- contents = {};
110
+ contents = map({});
112
111
  data = parsedOutput.body;
113
- if (data.Message !== undefined && data.Message !== null) {
112
+ if (data.Message != null) {
114
113
  contents.Message = __expectString(data.Message);
115
114
  }
116
115
  exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -120,9 +119,9 @@ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutp
120
119
  var deserializeAws_restJson1InternalServiceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
121
120
  var contents, data, exception;
122
121
  return __generator(this, function (_a) {
123
- contents = {};
122
+ contents = map({});
124
123
  data = parsedOutput.body;
125
- if (data.Message !== undefined && data.Message !== null) {
124
+ if (data.Message != null) {
126
125
  contents.Message = __expectString(data.Message);
127
126
  }
128
127
  exception = new InternalServiceException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -132,9 +131,9 @@ var deserializeAws_restJson1InternalServiceExceptionResponse = function (parsedO
132
131
  var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
133
132
  var contents, data, exception;
134
133
  return __generator(this, function (_a) {
135
- contents = {};
134
+ contents = map({});
136
135
  data = parsedOutput.body;
137
- if (data.Message !== undefined && data.Message !== null) {
136
+ if (data.Message != null) {
138
137
  contents.Message = __expectString(data.Message);
139
138
  }
140
139
  exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -144,9 +143,9 @@ var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOu
144
143
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
145
144
  var contents, data, exception;
146
145
  return __generator(this, function (_a) {
147
- contents = {};
146
+ contents = map({});
148
147
  data = parsedOutput.body;
149
- if (data.Message !== undefined && data.Message !== null) {
148
+ if (data.Message != null) {
150
149
  contents.Message = __expectString(data.Message);
151
150
  }
152
151
  exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -156,9 +155,9 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
156
155
  var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
157
156
  var contents, data, exception;
158
157
  return __generator(this, function (_a) {
159
- contents = {};
158
+ contents = map({});
160
159
  data = parsedOutput.body;
161
- if (data.Message !== undefined && data.Message !== null) {
160
+ if (data.Message != null) {
162
161
  contents.Message = __expectString(data.Message);
163
162
  }
164
163
  exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
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.141.0",
4
+ "version": "3.150.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -18,9 +18,9 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.141.0",
21
+ "@aws-sdk/client-sts": "3.150.0",
22
22
  "@aws-sdk/config-resolver": "3.130.0",
23
- "@aws-sdk/credential-provider-node": "3.141.0",
23
+ "@aws-sdk/credential-provider-node": "3.150.0",
24
24
  "@aws-sdk/fetch-http-handler": "3.131.0",
25
25
  "@aws-sdk/hash-node": "3.127.0",
26
26
  "@aws-sdk/invalid-dependency": "3.127.0",
@@ -36,15 +36,15 @@
36
36
  "@aws-sdk/node-config-provider": "3.127.0",
37
37
  "@aws-sdk/node-http-handler": "3.127.0",
38
38
  "@aws-sdk/protocol-http": "3.127.0",
39
- "@aws-sdk/smithy-client": "3.137.0",
39
+ "@aws-sdk/smithy-client": "3.142.0",
40
40
  "@aws-sdk/types": "3.127.0",
41
41
  "@aws-sdk/url-parser": "3.127.0",
42
42
  "@aws-sdk/util-base64-browser": "3.109.0",
43
43
  "@aws-sdk/util-base64-node": "3.55.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.55.0",
45
45
  "@aws-sdk/util-body-length-node": "3.55.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.137.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.137.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.142.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.142.0",
48
48
  "@aws-sdk/util-user-agent-browser": "3.127.0",
49
49
  "@aws-sdk/util-user-agent-node": "3.127.0",
50
50
  "@aws-sdk/util-utf8-browser": "3.109.0",
@@ -61,6 +61,11 @@
61
61
  "typedoc": "0.19.2",
62
62
  "typescript": "~4.6.2"
63
63
  },
64
+ "overrides": {
65
+ "typedoc": {
66
+ "typescript": "~4.6.2"
67
+ }
68
+ },
64
69
  "engines": {
65
70
  "node": ">=12.0.0"
66
71
  },