@aws-sdk/client-connect-contact-lens 3.899.0 → 3.906.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 (2) hide show
  1. package/dist-cjs/index.js +359 -483
  2. package/package.json +37 -37
package/dist-cjs/index.js CHANGED
@@ -1,512 +1,388 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- $Command: () => import_smithy_client.Command,
25
- AccessDeniedException: () => AccessDeniedException,
26
- ConnectContactLens: () => ConnectContactLens,
27
- ConnectContactLensClient: () => ConnectContactLensClient,
28
- ConnectContactLensServiceException: () => ConnectContactLensServiceException,
29
- InternalServiceException: () => InternalServiceException,
30
- InvalidRequestException: () => InvalidRequestException,
31
- ListRealtimeContactAnalysisSegmentsCommand: () => ListRealtimeContactAnalysisSegmentsCommand,
32
- PostContactSummaryFailureCode: () => PostContactSummaryFailureCode,
33
- PostContactSummaryStatus: () => PostContactSummaryStatus,
34
- ResourceNotFoundException: () => ResourceNotFoundException,
35
- SentimentValue: () => SentimentValue,
36
- ThrottlingException: () => ThrottlingException,
37
- __Client: () => import_smithy_client.Client,
38
- paginateListRealtimeContactAnalysisSegments: () => paginateListRealtimeContactAnalysisSegments
39
- });
40
- module.exports = __toCommonJS(index_exports);
41
-
42
- // src/ConnectContactLensClient.ts
43
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
44
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
45
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
46
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
47
- var import_config_resolver = require("@smithy/config-resolver");
48
- var import_core = require("@smithy/core");
49
- var import_middleware_content_length = require("@smithy/middleware-content-length");
50
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
51
- var import_middleware_retry = require("@smithy/middleware-retry");
1
+ 'use strict';
52
2
 
53
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
54
19
 
55
- // src/endpoint/EndpointParameters.ts
56
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
57
- return Object.assign(options, {
58
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
59
- useFipsEndpoint: options.useFipsEndpoint ?? false,
60
- defaultSigningName: "connect"
61
- });
62
- }, "resolveClientEndpointParameters");
63
- var commonParams = {
64
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
65
- Endpoint: { type: "builtInParams", name: "endpoint" },
66
- Region: { type: "builtInParams", name: "region" },
67
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
20
+ const resolveClientEndpointParameters = (options) => {
21
+ return Object.assign(options, {
22
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
23
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
24
+ defaultSigningName: "connect",
25
+ });
26
+ };
27
+ const commonParams = {
28
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
29
+ Endpoint: { type: "builtInParams", name: "endpoint" },
30
+ Region: { type: "builtInParams", name: "region" },
31
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
68
32
  };
69
33
 
70
- // src/ConnectContactLensClient.ts
71
- var import_runtimeConfig = require("././runtimeConfig");
34
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
37
+ let _credentials = runtimeConfig.credentials;
38
+ return {
39
+ setHttpAuthScheme(httpAuthScheme) {
40
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
41
+ if (index === -1) {
42
+ _httpAuthSchemes.push(httpAuthScheme);
43
+ }
44
+ else {
45
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
46
+ }
47
+ },
48
+ httpAuthSchemes() {
49
+ return _httpAuthSchemes;
50
+ },
51
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
52
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
53
+ },
54
+ httpAuthSchemeProvider() {
55
+ return _httpAuthSchemeProvider;
56
+ },
57
+ setCredentials(credentials) {
58
+ _credentials = credentials;
59
+ },
60
+ credentials() {
61
+ return _credentials;
62
+ },
63
+ };
64
+ };
65
+ const resolveHttpAuthRuntimeConfig = (config) => {
66
+ return {
67
+ httpAuthSchemes: config.httpAuthSchemes(),
68
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
69
+ credentials: config.credentials(),
70
+ };
71
+ };
72
72
 
73
- // src/runtimeExtensions.ts
74
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
75
- var import_protocol_http = require("@smithy/protocol-http");
76
- var import_smithy_client = require("@smithy/smithy-client");
73
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
74
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
75
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
76
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
77
+ };
77
78
 
78
- // src/auth/httpAuthExtensionConfiguration.ts
79
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
80
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
81
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
82
- let _credentials = runtimeConfig.credentials;
83
- return {
84
- setHttpAuthScheme(httpAuthScheme) {
85
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
86
- if (index === -1) {
87
- _httpAuthSchemes.push(httpAuthScheme);
88
- } else {
89
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
90
- }
91
- },
92
- httpAuthSchemes() {
93
- return _httpAuthSchemes;
94
- },
95
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
96
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
97
- },
98
- httpAuthSchemeProvider() {
99
- return _httpAuthSchemeProvider;
100
- },
101
- setCredentials(credentials) {
102
- _credentials = credentials;
103
- },
104
- credentials() {
105
- return _credentials;
79
+ class ConnectContactLensClient extends smithyClient.Client {
80
+ config;
81
+ constructor(...[configuration]) {
82
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
83
+ super(_config_0);
84
+ this.initConfig = _config_0;
85
+ const _config_1 = resolveClientEndpointParameters(_config_0);
86
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
87
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
88
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
89
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
90
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
91
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
92
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
93
+ this.config = _config_8;
94
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
95
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
96
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
97
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
98
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
99
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
100
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
101
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultConnectContactLensHttpAuthSchemeParametersProvider,
102
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
103
+ "aws.auth#sigv4": config.credentials,
104
+ }),
105
+ }));
106
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
107
+ }
108
+ destroy() {
109
+ super.destroy();
106
110
  }
107
- };
108
- }, "getHttpAuthExtensionConfiguration");
109
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
110
- return {
111
- httpAuthSchemes: config.httpAuthSchemes(),
112
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
113
- credentials: config.credentials()
114
- };
115
- }, "resolveHttpAuthRuntimeConfig");
111
+ }
116
112
 
117
- // src/runtimeExtensions.ts
118
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
119
- const extensionConfiguration = Object.assign(
120
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
121
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
122
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
123
- getHttpAuthExtensionConfiguration(runtimeConfig)
124
- );
125
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
126
- return Object.assign(
127
- runtimeConfig,
128
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
129
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
130
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
131
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
132
- );
133
- }, "resolveRuntimeExtensions");
113
+ class ConnectContactLensServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, ConnectContactLensServiceException.prototype);
117
+ }
118
+ }
134
119
 
135
- // src/ConnectContactLensClient.ts
136
- var ConnectContactLensClient = class extends import_smithy_client.Client {
137
- static {
138
- __name(this, "ConnectContactLensClient");
139
- }
140
- /**
141
- * The resolved configuration of ConnectContactLensClient class. This is resolved and normalized from the {@link ConnectContactLensClientConfig | constructor configuration interface}.
142
- */
143
- config;
144
- constructor(...[configuration]) {
145
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
146
- super(_config_0);
147
- this.initConfig = _config_0;
148
- const _config_1 = resolveClientEndpointParameters(_config_0);
149
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
150
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
151
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
152
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
153
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
154
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
155
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
156
- this.config = _config_8;
157
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
158
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
159
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
160
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
161
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
162
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
163
- this.middlewareStack.use(
164
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
165
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultConnectContactLensHttpAuthSchemeParametersProvider,
166
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
167
- "aws.auth#sigv4": config.credentials
168
- }), "identityProviderConfigProvider")
169
- })
170
- );
171
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
172
- }
173
- /**
174
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
175
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
176
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
177
- */
178
- destroy() {
179
- super.destroy();
180
- }
120
+ class AccessDeniedException extends ConnectContactLensServiceException {
121
+ name = "AccessDeniedException";
122
+ $fault = "client";
123
+ Message;
124
+ constructor(opts) {
125
+ super({
126
+ name: "AccessDeniedException",
127
+ $fault: "client",
128
+ ...opts,
129
+ });
130
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
131
+ this.Message = opts.Message;
132
+ }
133
+ }
134
+ class InternalServiceException extends ConnectContactLensServiceException {
135
+ name = "InternalServiceException";
136
+ $fault = "server";
137
+ Message;
138
+ constructor(opts) {
139
+ super({
140
+ name: "InternalServiceException",
141
+ $fault: "server",
142
+ ...opts,
143
+ });
144
+ Object.setPrototypeOf(this, InternalServiceException.prototype);
145
+ this.Message = opts.Message;
146
+ }
147
+ }
148
+ class InvalidRequestException extends ConnectContactLensServiceException {
149
+ name = "InvalidRequestException";
150
+ $fault = "client";
151
+ Message;
152
+ constructor(opts) {
153
+ super({
154
+ name: "InvalidRequestException",
155
+ $fault: "client",
156
+ ...opts,
157
+ });
158
+ Object.setPrototypeOf(this, InvalidRequestException.prototype);
159
+ this.Message = opts.Message;
160
+ }
161
+ }
162
+ const PostContactSummaryFailureCode = {
163
+ FAILED_SAFETY_GUIDELINES: "FAILED_SAFETY_GUIDELINES",
164
+ INSUFFICIENT_CONVERSATION_CONTENT: "INSUFFICIENT_CONVERSATION_CONTENT",
165
+ INTERNAL_ERROR: "INTERNAL_ERROR",
166
+ INVALID_ANALYSIS_CONFIGURATION: "INVALID_ANALYSIS_CONFIGURATION",
167
+ QUOTA_EXCEEDED: "QUOTA_EXCEEDED",
181
168
  };
182
-
183
- // src/ConnectContactLens.ts
184
-
185
-
186
- // src/commands/ListRealtimeContactAnalysisSegmentsCommand.ts
187
-
188
- var import_middleware_serde = require("@smithy/middleware-serde");
189
-
190
-
191
- // src/protocols/Aws_restJson1.ts
192
- var import_core2 = require("@aws-sdk/core");
193
-
194
-
195
-
196
- // src/models/ConnectContactLensServiceException.ts
197
-
198
- var ConnectContactLensServiceException = class _ConnectContactLensServiceException extends import_smithy_client.ServiceException {
199
- static {
200
- __name(this, "ConnectContactLensServiceException");
201
- }
202
- /**
203
- * @internal
204
- */
205
- constructor(options) {
206
- super(options);
207
- Object.setPrototypeOf(this, _ConnectContactLensServiceException.prototype);
208
- }
169
+ const PostContactSummaryStatus = {
170
+ COMPLETED: "COMPLETED",
171
+ FAILED: "FAILED",
172
+ };
173
+ const SentimentValue = {
174
+ NEGATIVE: "NEGATIVE",
175
+ NEUTRAL: "NEUTRAL",
176
+ POSITIVE: "POSITIVE",
209
177
  };
178
+ class ResourceNotFoundException extends ConnectContactLensServiceException {
179
+ name = "ResourceNotFoundException";
180
+ $fault = "client";
181
+ Message;
182
+ constructor(opts) {
183
+ super({
184
+ name: "ResourceNotFoundException",
185
+ $fault: "client",
186
+ ...opts,
187
+ });
188
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
189
+ this.Message = opts.Message;
190
+ }
191
+ }
192
+ class ThrottlingException extends ConnectContactLensServiceException {
193
+ name = "ThrottlingException";
194
+ $fault = "client";
195
+ Message;
196
+ constructor(opts) {
197
+ super({
198
+ name: "ThrottlingException",
199
+ $fault: "client",
200
+ ...opts,
201
+ });
202
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
203
+ this.Message = opts.Message;
204
+ }
205
+ }
210
206
 
211
- // src/models/models_0.ts
212
- var AccessDeniedException = class _AccessDeniedException extends ConnectContactLensServiceException {
213
- static {
214
- __name(this, "AccessDeniedException");
215
- }
216
- name = "AccessDeniedException";
217
- $fault = "client";
218
- Message;
219
- /**
220
- * @internal
221
- */
222
- constructor(opts) {
223
- super({
224
- name: "AccessDeniedException",
225
- $fault: "client",
226
- ...opts
227
- });
228
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
229
- this.Message = opts.Message;
230
- }
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();
231
222
  };
232
- var InternalServiceException = class _InternalServiceException extends ConnectContactLensServiceException {
233
- static {
234
- __name(this, "InternalServiceException");
235
- }
236
- name = "InternalServiceException";
237
- $fault = "server";
238
- Message;
239
- /**
240
- * @internal
241
- */
242
- constructor(opts) {
243
- super({
244
- name: "InternalServiceException",
245
- $fault: "server",
246
- ...opts
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),
247
229
  });
248
- Object.setPrototypeOf(this, _InternalServiceException.prototype);
249
- this.Message = opts.Message;
250
- }
251
- };
252
- var InvalidRequestException = class _InvalidRequestException extends ConnectContactLensServiceException {
253
- static {
254
- __name(this, "InvalidRequestException");
255
- }
256
- name = "InvalidRequestException";
257
- $fault = "client";
258
- Message;
259
- /**
260
- * @internal
261
- */
262
- constructor(opts) {
263
- super({
264
- name: "InvalidRequestException",
265
- $fault: "client",
266
- ...opts
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,
267
234
  });
268
- Object.setPrototypeOf(this, _InvalidRequestException.prototype);
269
- this.Message = opts.Message;
270
- }
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
+ }
271
268
  };
272
- var PostContactSummaryFailureCode = {
273
- FAILED_SAFETY_GUIDELINES: "FAILED_SAFETY_GUIDELINES",
274
- INSUFFICIENT_CONVERSATION_CONTENT: "INSUFFICIENT_CONVERSATION_CONTENT",
275
- INTERNAL_ERROR: "INTERNAL_ERROR",
276
- INVALID_ANALYSIS_CONFIGURATION: "INVALID_ANALYSIS_CONFIGURATION",
277
- QUOTA_EXCEEDED: "QUOTA_EXCEEDED"
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);
278
282
  };
279
- var PostContactSummaryStatus = {
280
- COMPLETED: "COMPLETED",
281
- FAILED: "FAILED"
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);
282
295
  };
283
- var SentimentValue = {
284
- NEGATIVE: "NEGATIVE",
285
- NEUTRAL: "NEUTRAL",
286
- POSITIVE: "POSITIVE"
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);
287
308
  };
288
- var ResourceNotFoundException = class _ResourceNotFoundException extends ConnectContactLensServiceException {
289
- static {
290
- __name(this, "ResourceNotFoundException");
291
- }
292
- name = "ResourceNotFoundException";
293
- $fault = "client";
294
- Message;
295
- /**
296
- * @internal
297
- */
298
- constructor(opts) {
299
- super({
300
- name: "ResourceNotFoundException",
301
- $fault: "client",
302
- ...opts
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,
303
314
  });
304
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
305
- this.Message = opts.Message;
306
- }
315
+ Object.assign(contents, doc);
316
+ const exception = new ResourceNotFoundException({
317
+ $metadata: deserializeMetadata(parsedOutput),
318
+ ...contents,
319
+ });
320
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
307
321
  };
308
- var ThrottlingException = class _ThrottlingException extends ConnectContactLensServiceException {
309
- static {
310
- __name(this, "ThrottlingException");
311
- }
312
- name = "ThrottlingException";
313
- $fault = "client";
314
- Message;
315
- /**
316
- * @internal
317
- */
318
- constructor(opts) {
319
- super({
320
- name: "ThrottlingException",
321
- $fault: "client",
322
- ...opts
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,
323
332
  });
324
- Object.setPrototypeOf(this, _ThrottlingException.prototype);
325
- this.Message = opts.Message;
326
- }
333
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
327
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
+ });
328
341
 
329
- // src/protocols/Aws_restJson1.ts
330
- var se_ListRealtimeContactAnalysisSegmentsCommand = /* @__PURE__ */ __name(async (input, context) => {
331
- const b = (0, import_core.requestBuilder)(input, context);
332
- const headers = {
333
- "content-type": "application/json"
334
- };
335
- b.bp("/realtime-contact-analysis/analysis-segments");
336
- let body;
337
- body = JSON.stringify(
338
- (0, import_smithy_client.take)(input, {
339
- ContactId: [],
340
- InstanceId: [],
341
- MaxResults: [],
342
- NextToken: []
343
- })
344
- );
345
- b.m("POST").h(headers).b(body);
346
- return b.build();
347
- }, "se_ListRealtimeContactAnalysisSegmentsCommand");
348
- var de_ListRealtimeContactAnalysisSegmentsCommand = /* @__PURE__ */ __name(async (output, context) => {
349
- if (output.statusCode !== 200 && output.statusCode >= 300) {
350
- return de_CommandError(output, context);
351
- }
352
- const contents = (0, import_smithy_client.map)({
353
- $metadata: deserializeMetadata(output)
354
- });
355
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
356
- const doc = (0, import_smithy_client.take)(data, {
357
- NextToken: import_smithy_client.expectString,
358
- Segments: import_smithy_client._json
359
- });
360
- Object.assign(contents, doc);
361
- return contents;
362
- }, "de_ListRealtimeContactAnalysisSegmentsCommand");
363
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
364
- const parsedOutput = {
365
- ...output,
366
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
367
- };
368
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
369
- switch (errorCode) {
370
- case "AccessDeniedException":
371
- case "com.amazonaws.connectcontactlens#AccessDeniedException":
372
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
373
- case "InternalServiceException":
374
- case "com.amazonaws.connectcontactlens#InternalServiceException":
375
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
376
- case "InvalidRequestException":
377
- case "com.amazonaws.connectcontactlens#InvalidRequestException":
378
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
379
- case "ResourceNotFoundException":
380
- case "com.amazonaws.connectcontactlens#ResourceNotFoundException":
381
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
382
- case "ThrottlingException":
383
- case "com.amazonaws.connectcontactlens#ThrottlingException":
384
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
385
- default:
386
- const parsedBody = parsedOutput.body;
387
- return throwDefaultError({
388
- output,
389
- parsedBody,
390
- errorCode
391
- });
392
- }
393
- }, "de_CommandError");
394
- var throwDefaultError = (0, import_smithy_client.withBaseException)(ConnectContactLensServiceException);
395
- var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
396
- const contents = (0, import_smithy_client.map)({});
397
- const data = parsedOutput.body;
398
- const doc = (0, import_smithy_client.take)(data, {
399
- Message: import_smithy_client.expectString
400
- });
401
- Object.assign(contents, doc);
402
- const exception = new AccessDeniedException({
403
- $metadata: deserializeMetadata(parsedOutput),
404
- ...contents
405
- });
406
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
407
- }, "de_AccessDeniedExceptionRes");
408
- var de_InternalServiceExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
409
- const contents = (0, import_smithy_client.map)({});
410
- const data = parsedOutput.body;
411
- const doc = (0, import_smithy_client.take)(data, {
412
- Message: import_smithy_client.expectString
413
- });
414
- Object.assign(contents, doc);
415
- const exception = new InternalServiceException({
416
- $metadata: deserializeMetadata(parsedOutput),
417
- ...contents
418
- });
419
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
420
- }, "de_InternalServiceExceptionRes");
421
- var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
422
- const contents = (0, import_smithy_client.map)({});
423
- const data = parsedOutput.body;
424
- const doc = (0, import_smithy_client.take)(data, {
425
- Message: import_smithy_client.expectString
426
- });
427
- Object.assign(contents, doc);
428
- const exception = new InvalidRequestException({
429
- $metadata: deserializeMetadata(parsedOutput),
430
- ...contents
431
- });
432
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
433
- }, "de_InvalidRequestExceptionRes");
434
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
435
- const contents = (0, import_smithy_client.map)({});
436
- const data = parsedOutput.body;
437
- const doc = (0, import_smithy_client.take)(data, {
438
- Message: import_smithy_client.expectString
439
- });
440
- Object.assign(contents, doc);
441
- const exception = new ResourceNotFoundException({
442
- $metadata: deserializeMetadata(parsedOutput),
443
- ...contents
444
- });
445
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
446
- }, "de_ResourceNotFoundExceptionRes");
447
- var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
448
- const contents = (0, import_smithy_client.map)({});
449
- const data = parsedOutput.body;
450
- const doc = (0, import_smithy_client.take)(data, {
451
- Message: import_smithy_client.expectString
452
- });
453
- Object.assign(contents, doc);
454
- const exception = new ThrottlingException({
455
- $metadata: deserializeMetadata(parsedOutput),
456
- ...contents
457
- });
458
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
459
- }, "de_ThrottlingExceptionRes");
460
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
461
- httpStatusCode: output.statusCode,
462
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
463
- extendedRequestId: output.headers["x-amz-id-2"],
464
- cfId: output.headers["x-amz-cf-id"]
465
- }), "deserializeMetadata");
466
-
467
- // src/commands/ListRealtimeContactAnalysisSegmentsCommand.ts
468
- var ListRealtimeContactAnalysisSegmentsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
469
- return [
470
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
471
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
472
- ];
473
- }).s("AmazonConnectContactLens", "ListRealtimeContactAnalysisSegments", {}).n("ConnectContactLensClient", "ListRealtimeContactAnalysisSegmentsCommand").f(void 0, void 0).ser(se_ListRealtimeContactAnalysisSegmentsCommand).de(de_ListRealtimeContactAnalysisSegmentsCommand).build() {
474
- static {
475
- __name(this, "ListRealtimeContactAnalysisSegmentsCommand");
476
- }
477
- };
342
+ class ListRealtimeContactAnalysisSegmentsCommand extends smithyClient.Command
343
+ .classBuilder()
344
+ .ep(commonParams)
345
+ .m(function (Command, cs, config, o) {
346
+ return [
347
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
348
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
349
+ ];
350
+ })
351
+ .s("AmazonConnectContactLens", "ListRealtimeContactAnalysisSegments", {})
352
+ .n("ConnectContactLensClient", "ListRealtimeContactAnalysisSegmentsCommand")
353
+ .f(void 0, void 0)
354
+ .ser(se_ListRealtimeContactAnalysisSegmentsCommand)
355
+ .de(de_ListRealtimeContactAnalysisSegmentsCommand)
356
+ .build() {
357
+ }
478
358
 
479
- // src/ConnectContactLens.ts
480
- var commands = {
481
- ListRealtimeContactAnalysisSegmentsCommand
482
- };
483
- var ConnectContactLens = class extends ConnectContactLensClient {
484
- static {
485
- __name(this, "ConnectContactLens");
486
- }
359
+ const commands = {
360
+ ListRealtimeContactAnalysisSegmentsCommand,
487
361
  };
488
- (0, import_smithy_client.createAggregatedClient)(commands, ConnectContactLens);
362
+ class ConnectContactLens extends ConnectContactLensClient {
363
+ }
364
+ smithyClient.createAggregatedClient(commands, ConnectContactLens);
489
365
 
490
- // src/pagination/ListRealtimeContactAnalysisSegmentsPaginator.ts
366
+ const paginateListRealtimeContactAnalysisSegments = core.createPaginator(ConnectContactLensClient, ListRealtimeContactAnalysisSegmentsCommand, "NextToken", "NextToken", "MaxResults");
491
367
 
492
- var paginateListRealtimeContactAnalysisSegments = (0, import_core.createPaginator)(ConnectContactLensClient, ListRealtimeContactAnalysisSegmentsCommand, "NextToken", "NextToken", "MaxResults");
493
- // Annotate the CommonJS export names for ESM import in node:
494
-
495
- 0 && (module.exports = {
496
- ConnectContactLensServiceException,
497
- __Client,
498
- ConnectContactLensClient,
499
- ConnectContactLens,
500
- $Command,
501
- ListRealtimeContactAnalysisSegmentsCommand,
502
- paginateListRealtimeContactAnalysisSegments,
503
- AccessDeniedException,
504
- InternalServiceException,
505
- InvalidRequestException,
506
- PostContactSummaryFailureCode,
507
- PostContactSummaryStatus,
508
- SentimentValue,
509
- ResourceNotFoundException,
510
- ThrottlingException
368
+ Object.defineProperty(exports, "$Command", {
369
+ enumerable: true,
370
+ get: function () { return smithyClient.Command; }
511
371
  });
512
-
372
+ Object.defineProperty(exports, "__Client", {
373
+ enumerable: true,
374
+ get: function () { return smithyClient.Client; }
375
+ });
376
+ exports.AccessDeniedException = AccessDeniedException;
377
+ exports.ConnectContactLens = ConnectContactLens;
378
+ exports.ConnectContactLensClient = ConnectContactLensClient;
379
+ exports.ConnectContactLensServiceException = ConnectContactLensServiceException;
380
+ exports.InternalServiceException = InternalServiceException;
381
+ exports.InvalidRequestException = InvalidRequestException;
382
+ exports.ListRealtimeContactAnalysisSegmentsCommand = ListRealtimeContactAnalysisSegmentsCommand;
383
+ exports.PostContactSummaryFailureCode = PostContactSummaryFailureCode;
384
+ exports.PostContactSummaryStatus = PostContactSummaryStatus;
385
+ exports.ResourceNotFoundException = ResourceNotFoundException;
386
+ exports.SentimentValue = SentimentValue;
387
+ exports.ThrottlingException = ThrottlingException;
388
+ exports.paginateListRealtimeContactAnalysisSegments = paginateListRealtimeContactAnalysisSegments;
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.899.0",
4
+ "version": "3.906.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",
@@ -20,42 +20,42 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "3.899.0",
24
- "@aws-sdk/credential-provider-node": "3.899.0",
25
- "@aws-sdk/middleware-host-header": "3.893.0",
26
- "@aws-sdk/middleware-logger": "3.893.0",
27
- "@aws-sdk/middleware-recursion-detection": "3.893.0",
28
- "@aws-sdk/middleware-user-agent": "3.899.0",
29
- "@aws-sdk/region-config-resolver": "3.893.0",
30
- "@aws-sdk/types": "3.893.0",
31
- "@aws-sdk/util-endpoints": "3.895.0",
32
- "@aws-sdk/util-user-agent-browser": "3.893.0",
33
- "@aws-sdk/util-user-agent-node": "3.899.0",
34
- "@smithy/config-resolver": "^4.2.2",
35
- "@smithy/core": "^3.13.0",
36
- "@smithy/fetch-http-handler": "^5.2.1",
37
- "@smithy/hash-node": "^4.1.1",
38
- "@smithy/invalid-dependency": "^4.1.1",
39
- "@smithy/middleware-content-length": "^4.1.1",
40
- "@smithy/middleware-endpoint": "^4.2.5",
41
- "@smithy/middleware-retry": "^4.3.1",
42
- "@smithy/middleware-serde": "^4.1.1",
43
- "@smithy/middleware-stack": "^4.1.1",
44
- "@smithy/node-config-provider": "^4.2.2",
45
- "@smithy/node-http-handler": "^4.2.1",
46
- "@smithy/protocol-http": "^5.2.1",
47
- "@smithy/smithy-client": "^4.6.5",
48
- "@smithy/types": "^4.5.0",
49
- "@smithy/url-parser": "^4.1.1",
50
- "@smithy/util-base64": "^4.1.0",
51
- "@smithy/util-body-length-browser": "^4.1.0",
52
- "@smithy/util-body-length-node": "^4.1.0",
53
- "@smithy/util-defaults-mode-browser": "^4.1.5",
54
- "@smithy/util-defaults-mode-node": "^4.1.5",
55
- "@smithy/util-endpoints": "^3.1.2",
56
- "@smithy/util-middleware": "^4.1.1",
57
- "@smithy/util-retry": "^4.1.2",
58
- "@smithy/util-utf8": "^4.1.0",
23
+ "@aws-sdk/core": "3.906.0",
24
+ "@aws-sdk/credential-provider-node": "3.906.0",
25
+ "@aws-sdk/middleware-host-header": "3.901.0",
26
+ "@aws-sdk/middleware-logger": "3.901.0",
27
+ "@aws-sdk/middleware-recursion-detection": "3.901.0",
28
+ "@aws-sdk/middleware-user-agent": "3.906.0",
29
+ "@aws-sdk/region-config-resolver": "3.901.0",
30
+ "@aws-sdk/types": "3.901.0",
31
+ "@aws-sdk/util-endpoints": "3.901.0",
32
+ "@aws-sdk/util-user-agent-browser": "3.901.0",
33
+ "@aws-sdk/util-user-agent-node": "3.906.0",
34
+ "@smithy/config-resolver": "^4.3.0",
35
+ "@smithy/core": "^3.14.0",
36
+ "@smithy/fetch-http-handler": "^5.3.0",
37
+ "@smithy/hash-node": "^4.2.0",
38
+ "@smithy/invalid-dependency": "^4.2.0",
39
+ "@smithy/middleware-content-length": "^4.2.0",
40
+ "@smithy/middleware-endpoint": "^4.3.0",
41
+ "@smithy/middleware-retry": "^4.4.0",
42
+ "@smithy/middleware-serde": "^4.2.0",
43
+ "@smithy/middleware-stack": "^4.2.0",
44
+ "@smithy/node-config-provider": "^4.3.0",
45
+ "@smithy/node-http-handler": "^4.3.0",
46
+ "@smithy/protocol-http": "^5.3.0",
47
+ "@smithy/smithy-client": "^4.7.0",
48
+ "@smithy/types": "^4.6.0",
49
+ "@smithy/url-parser": "^4.2.0",
50
+ "@smithy/util-base64": "^4.2.0",
51
+ "@smithy/util-body-length-browser": "^4.2.0",
52
+ "@smithy/util-body-length-node": "^4.2.0",
53
+ "@smithy/util-defaults-mode-browser": "^4.2.0",
54
+ "@smithy/util-defaults-mode-node": "^4.2.0",
55
+ "@smithy/util-endpoints": "^3.2.0",
56
+ "@smithy/util-middleware": "^4.2.0",
57
+ "@smithy/util-retry": "^4.2.0",
58
+ "@smithy/util-utf8": "^4.2.0",
59
59
  "tslib": "^2.6.2"
60
60
  },
61
61
  "devDependencies": {