Socket
Socket
Sign inDemoInstall

@aws-sdk/client-connect-contact-lens

Package Overview
Dependencies
Maintainers
5
Versions
348
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-connect-contact-lens - npm Package Compare versions

Comparing version 3.490.0 to 3.495.0

5

dist-cjs/commands/index.js

@@ -1,4 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./ListRealtimeContactAnalysisSegmentsCommand"), exports);
module.exports = require("../index.js");

29

dist-cjs/commands/ListRealtimeContactAnalysisSegmentsCommand.js

@@ -1,28 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListRealtimeContactAnalysisSegmentsCommand = exports.$Command = void 0;
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
const middleware_serde_1 = require("@smithy/middleware-serde");
const smithy_client_1 = require("@smithy/smithy-client");
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
const EndpointParameters_1 = require("../endpoint/EndpointParameters");
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
class ListRealtimeContactAnalysisSegmentsCommand extends smithy_client_1.Command
.classBuilder()
.ep({
...EndpointParameters_1.commonParams,
})
.m(function (Command, cs, config, o) {
return [
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
];
})
.s("AmazonConnectContactLens", "ListRealtimeContactAnalysisSegments", {})
.n("ConnectContactLensClient", "ListRealtimeContactAnalysisSegmentsCommand")
.f(void 0, void 0)
.ser(Aws_restJson1_1.se_ListRealtimeContactAnalysisSegmentsCommand)
.de(Aws_restJson1_1.de_ListRealtimeContactAnalysisSegmentsCommand)
.build() {
}
exports.ListRealtimeContactAnalysisSegmentsCommand = ListRealtimeContactAnalysisSegmentsCommand;
module.exports = require("../index.js");

@@ -1,13 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConnectContactLens = void 0;
const smithy_client_1 = require("@smithy/smithy-client");
const ListRealtimeContactAnalysisSegmentsCommand_1 = require("./commands/ListRealtimeContactAnalysisSegmentsCommand");
const ConnectContactLensClient_1 = require("./ConnectContactLensClient");
const commands = {
ListRealtimeContactAnalysisSegmentsCommand: ListRealtimeContactAnalysisSegmentsCommand_1.ListRealtimeContactAnalysisSegmentsCommand,
};
class ConnectContactLens extends ConnectContactLensClient_1.ConnectContactLensClient {
}
exports.ConnectContactLens = ConnectContactLens;
(0, smithy_client_1.createAggregatedClient)(commands, ConnectContactLens);
module.exports = require("./index.js");

@@ -1,43 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConnectContactLensClient = exports.__Client = void 0;
const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
const middleware_logger_1 = require("@aws-sdk/middleware-logger");
const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
const config_resolver_1 = require("@smithy/config-resolver");
const middleware_content_length_1 = require("@smithy/middleware-content-length");
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
const middleware_retry_1 = require("@smithy/middleware-retry");
const smithy_client_1 = require("@smithy/smithy-client");
Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
const EndpointParameters_1 = require("./endpoint/EndpointParameters");
const runtimeConfig_1 = require("./runtimeConfig");
const runtimeExtensions_1 = require("./runtimeExtensions");
class ConnectContactLensClient extends smithy_client_1.Client {
constructor(...[configuration]) {
const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);
const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);
const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
const _config_6 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_5);
const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6);
const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
super(_config_8);
this.config = _config_8;
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config));
this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
}
destroy() {
super.destroy();
}
}
exports.ConnectContactLensClient = ConnectContactLensClient;
module.exports = require("./index.js");

@@ -1,18 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.commonParams = exports.resolveClientEndpointParameters = void 0;
const resolveClientEndpointParameters = (options) => {
return {
...options,
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "connect",
};
};
exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
exports.commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
module.exports = require("../index.js");

@@ -1,2 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
module.exports = require("./index.js");
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConnectContactLensServiceException = void 0;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./ConnectContactLensClient"), exports);
tslib_1.__exportStar(require("./ConnectContactLens"), exports);
tslib_1.__exportStar(require("./commands"), exports);
tslib_1.__exportStar(require("./pagination"), exports);
tslib_1.__exportStar(require("./models"), exports);
require("@aws-sdk/util-endpoints");
var ConnectContactLensServiceException_1 = require("./models/ConnectContactLensServiceException");
Object.defineProperty(exports, "ConnectContactLensServiceException", { enumerable: true, get: function () { return ConnectContactLensServiceException_1.ConnectContactLensServiceException; } });
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
$Command: () => import_smithy_client.Command,
AccessDeniedException: () => AccessDeniedException,
ConnectContactLens: () => ConnectContactLens,
ConnectContactLensClient: () => ConnectContactLensClient,
ConnectContactLensServiceException: () => ConnectContactLensServiceException,
InternalServiceException: () => InternalServiceException,
InvalidRequestException: () => InvalidRequestException,
ListRealtimeContactAnalysisSegmentsCommand: () => ListRealtimeContactAnalysisSegmentsCommand,
ResourceNotFoundException: () => ResourceNotFoundException,
SentimentValue: () => SentimentValue,
ThrottlingException: () => ThrottlingException,
__Client: () => import_smithy_client.Client,
__MetadataBearer: () => import_types.MetadataBearer,
paginateListRealtimeContactAnalysisSegments: () => paginateListRealtimeContactAnalysisSegments
});
module.exports = __toCommonJS(src_exports);
// src/ConnectContactLensClient.ts
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
var import_middleware_logger = require("@aws-sdk/middleware-logger");
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
var import_middleware_signing = require("@aws-sdk/middleware-signing");
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
var import_config_resolver = require("@smithy/config-resolver");
var import_middleware_content_length = require("@smithy/middleware-content-length");
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
var import_middleware_retry = require("@smithy/middleware-retry");
// src/endpoint/EndpointParameters.ts
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
return {
...options,
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "connect"
};
}, "resolveClientEndpointParameters");
var commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
};
// src/ConnectContactLensClient.ts
var import_runtimeConfig = require("././runtimeConfig");
// src/runtimeExtensions.ts
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
var import_protocol_http = require("@smithy/protocol-http");
var import_smithy_client = require("@smithy/smithy-client");
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
const extensionConfiguration = {
...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
};
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return {
...runtimeConfig,
...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
};
}, "resolveRuntimeExtensions");
// src/ConnectContactLensClient.ts
var _ConnectContactLensClient = class _ConnectContactLensClient extends import_smithy_client.Client {
constructor(...[configuration]) {
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
super(_config_8);
this.config = _config_8;
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
}
/**
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
*/
destroy() {
super.destroy();
}
};
__name(_ConnectContactLensClient, "ConnectContactLensClient");
var ConnectContactLensClient = _ConnectContactLensClient;
// src/ConnectContactLens.ts
// src/commands/ListRealtimeContactAnalysisSegmentsCommand.ts
var import_middleware_serde = require("@smithy/middleware-serde");
var import_types = require("@smithy/types");
// src/protocols/Aws_restJson1.ts
var import_core = require("@smithy/core");
// src/models/ConnectContactLensServiceException.ts
var _ConnectContactLensServiceException = class _ConnectContactLensServiceException extends import_smithy_client.ServiceException {
/**
* @internal
*/
constructor(options) {
super(options);
Object.setPrototypeOf(this, _ConnectContactLensServiceException.prototype);
}
};
__name(_ConnectContactLensServiceException, "ConnectContactLensServiceException");
var ConnectContactLensServiceException = _ConnectContactLensServiceException;
// src/models/models_0.ts
var _AccessDeniedException = class _AccessDeniedException extends ConnectContactLensServiceException {
/**
* @internal
*/
constructor(opts) {
super({
name: "AccessDeniedException",
$fault: "client",
...opts
});
this.name = "AccessDeniedException";
this.$fault = "client";
Object.setPrototypeOf(this, _AccessDeniedException.prototype);
this.Message = opts.Message;
}
};
__name(_AccessDeniedException, "AccessDeniedException");
var AccessDeniedException = _AccessDeniedException;
var _InternalServiceException = class _InternalServiceException extends ConnectContactLensServiceException {
/**
* @internal
*/
constructor(opts) {
super({
name: "InternalServiceException",
$fault: "server",
...opts
});
this.name = "InternalServiceException";
this.$fault = "server";
Object.setPrototypeOf(this, _InternalServiceException.prototype);
this.Message = opts.Message;
}
};
__name(_InternalServiceException, "InternalServiceException");
var InternalServiceException = _InternalServiceException;
var _InvalidRequestException = class _InvalidRequestException extends ConnectContactLensServiceException {
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidRequestException",
$fault: "client",
...opts
});
this.name = "InvalidRequestException";
this.$fault = "client";
Object.setPrototypeOf(this, _InvalidRequestException.prototype);
this.Message = opts.Message;
}
};
__name(_InvalidRequestException, "InvalidRequestException");
var InvalidRequestException = _InvalidRequestException;
var SentimentValue = {
NEGATIVE: "NEGATIVE",
NEUTRAL: "NEUTRAL",
POSITIVE: "POSITIVE"
};
var _ResourceNotFoundException = class _ResourceNotFoundException extends ConnectContactLensServiceException {
/**
* @internal
*/
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts
});
this.name = "ResourceNotFoundException";
this.$fault = "client";
Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
this.Message = opts.Message;
}
};
__name(_ResourceNotFoundException, "ResourceNotFoundException");
var ResourceNotFoundException = _ResourceNotFoundException;
var _ThrottlingException = class _ThrottlingException extends ConnectContactLensServiceException {
/**
* @internal
*/
constructor(opts) {
super({
name: "ThrottlingException",
$fault: "client",
...opts
});
this.name = "ThrottlingException";
this.$fault = "client";
Object.setPrototypeOf(this, _ThrottlingException.prototype);
this.Message = opts.Message;
}
};
__name(_ThrottlingException, "ThrottlingException");
var ThrottlingException = _ThrottlingException;
// src/protocols/Aws_restJson1.ts
var se_ListRealtimeContactAnalysisSegmentsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core.requestBuilder)(input, context);
const headers = {
"content-type": "application/json"
};
b.bp("/realtime-contact-analysis/analysis-segments");
let body;
body = JSON.stringify(
(0, import_smithy_client.take)(input, {
ContactId: [],
InstanceId: [],
MaxResults: [],
NextToken: []
})
);
b.m("POST").h(headers).b(body);
return b.build();
}, "se_ListRealtimeContactAnalysisSegmentsCommand");
var de_ListRealtimeContactAnalysisSegmentsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_ListRealtimeContactAnalysisSegmentsCommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
const doc = (0, import_smithy_client.take)(data, {
NextToken: import_smithy_client.expectString,
Segments: import_smithy_client._json
});
Object.assign(contents, doc);
return contents;
}, "de_ListRealtimeContactAnalysisSegmentsCommand");
var de_ListRealtimeContactAnalysisSegmentsCommandError = /* @__PURE__ */ __name(async (output, context) => {
const parsedOutput = {
...output,
body: await parseErrorBody(output.body, context)
};
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "AccessDeniedException":
case "com.amazonaws.connectcontactlens#AccessDeniedException":
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
case "InternalServiceException":
case "com.amazonaws.connectcontactlens#InternalServiceException":
throw await de_InternalServiceExceptionRes(parsedOutput, context);
case "InvalidRequestException":
case "com.amazonaws.connectcontactlens#InvalidRequestException":
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
case "ResourceNotFoundException":
case "com.amazonaws.connectcontactlens#ResourceNotFoundException":
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.connectcontactlens#ThrottlingException":
throw await de_ThrottlingExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody,
errorCode
});
}
}, "de_ListRealtimeContactAnalysisSegmentsCommandError");
var throwDefaultError = (0, import_smithy_client.withBaseException)(ConnectContactLensServiceException);
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
Message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new AccessDeniedException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_AccessDeniedExceptionRes");
var de_InternalServiceExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
Message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new InternalServiceException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_InternalServiceExceptionRes");
var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
Message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new InvalidRequestException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidRequestExceptionRes");
var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
Message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new ResourceNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_ResourceNotFoundExceptionRes");
var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
Message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new ThrottlingException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_ThrottlingExceptionRes");
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"]
}), "deserializeMetadata");
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
if (encoded.length) {
return JSON.parse(encoded);
}
return {};
}), "parseBody");
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
const value = await parseBody(errorBody, context);
value.message = value.message ?? value.Message;
return value;
}, "parseErrorBody");
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
let cleanValue = rawValue;
if (typeof cleanValue === "number") {
cleanValue = cleanValue.toString();
}
if (cleanValue.indexOf(",") >= 0) {
cleanValue = cleanValue.split(",")[0];
}
if (cleanValue.indexOf(":") >= 0) {
cleanValue = cleanValue.split(":")[0];
}
if (cleanValue.indexOf("#") >= 0) {
cleanValue = cleanValue.split("#")[1];
}
return cleanValue;
}, "sanitizeErrorCode");
const headerKey = findKey(output.headers, "x-amzn-errortype");
if (headerKey !== void 0) {
return sanitizeErrorCode(output.headers[headerKey]);
}
if (data.code !== void 0) {
return sanitizeErrorCode(data.code);
}
if (data["__type"] !== void 0) {
return sanitizeErrorCode(data["__type"]);
}
}, "loadRestJsonErrorCode");
// src/commands/ListRealtimeContactAnalysisSegmentsCommand.ts
var _ListRealtimeContactAnalysisSegmentsCommand = class _ListRealtimeContactAnalysisSegmentsCommand extends import_smithy_client.Command.classBuilder().ep({
...commonParams
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonConnectContactLens", "ListRealtimeContactAnalysisSegments", {}).n("ConnectContactLensClient", "ListRealtimeContactAnalysisSegmentsCommand").f(void 0, void 0).ser(se_ListRealtimeContactAnalysisSegmentsCommand).de(de_ListRealtimeContactAnalysisSegmentsCommand).build() {
};
__name(_ListRealtimeContactAnalysisSegmentsCommand, "ListRealtimeContactAnalysisSegmentsCommand");
var ListRealtimeContactAnalysisSegmentsCommand = _ListRealtimeContactAnalysisSegmentsCommand;
// src/ConnectContactLens.ts
var commands = {
ListRealtimeContactAnalysisSegmentsCommand
};
var _ConnectContactLens = class _ConnectContactLens extends ConnectContactLensClient {
};
__name(_ConnectContactLens, "ConnectContactLens");
var ConnectContactLens = _ConnectContactLens;
(0, import_smithy_client.createAggregatedClient)(commands, ConnectContactLens);
// src/pagination/ListRealtimeContactAnalysisSegmentsPaginator.ts
var paginateListRealtimeContactAnalysisSegments = (0, import_core.createPaginator)(ConnectContactLensClient, ListRealtimeContactAnalysisSegmentsCommand, "NextToken", "NextToken", "MaxResults");
// src/index.ts
var import_util_endpoints = require("@aws-sdk/util-endpoints");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
$Command,
AccessDeniedException,
ConnectContactLens,
ConnectContactLensClient,
ConnectContactLensServiceException,
InternalServiceException,
InvalidRequestException,
ListRealtimeContactAnalysisSegmentsCommand,
ResourceNotFoundException,
SentimentValue,
ThrottlingException,
__Client,
__MetadataBearer,
paginateListRealtimeContactAnalysisSegments
});

@@ -1,12 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConnectContactLensServiceException = exports.__ServiceException = void 0;
const smithy_client_1 = require("@smithy/smithy-client");
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
class ConnectContactLensServiceException extends smithy_client_1.ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, ConnectContactLensServiceException.prototype);
}
}
exports.ConnectContactLensServiceException = ConnectContactLensServiceException;
module.exports = require("../index.js");

@@ -1,4 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./models_0"), exports);
module.exports = require("../index.js");

@@ -1,79 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ThrottlingException = exports.ResourceNotFoundException = exports.SentimentValue = exports.InvalidRequestException = exports.InternalServiceException = exports.AccessDeniedException = void 0;
const ConnectContactLensServiceException_1 = require("./ConnectContactLensServiceException");
class AccessDeniedException extends ConnectContactLensServiceException_1.ConnectContactLensServiceException {
constructor(opts) {
super({
name: "AccessDeniedException",
$fault: "client",
...opts,
});
this.name = "AccessDeniedException";
this.$fault = "client";
Object.setPrototypeOf(this, AccessDeniedException.prototype);
this.Message = opts.Message;
}
}
exports.AccessDeniedException = AccessDeniedException;
class InternalServiceException extends ConnectContactLensServiceException_1.ConnectContactLensServiceException {
constructor(opts) {
super({
name: "InternalServiceException",
$fault: "server",
...opts,
});
this.name = "InternalServiceException";
this.$fault = "server";
Object.setPrototypeOf(this, InternalServiceException.prototype);
this.Message = opts.Message;
}
}
exports.InternalServiceException = InternalServiceException;
class InvalidRequestException extends ConnectContactLensServiceException_1.ConnectContactLensServiceException {
constructor(opts) {
super({
name: "InvalidRequestException",
$fault: "client",
...opts,
});
this.name = "InvalidRequestException";
this.$fault = "client";
Object.setPrototypeOf(this, InvalidRequestException.prototype);
this.Message = opts.Message;
}
}
exports.InvalidRequestException = InvalidRequestException;
exports.SentimentValue = {
NEGATIVE: "NEGATIVE",
NEUTRAL: "NEUTRAL",
POSITIVE: "POSITIVE",
};
class ResourceNotFoundException extends ConnectContactLensServiceException_1.ConnectContactLensServiceException {
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts,
});
this.name = "ResourceNotFoundException";
this.$fault = "client";
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
this.Message = opts.Message;
}
}
exports.ResourceNotFoundException = ResourceNotFoundException;
class ThrottlingException extends ConnectContactLensServiceException_1.ConnectContactLensServiceException {
constructor(opts) {
super({
name: "ThrottlingException",
$fault: "client",
...opts,
});
this.name = "ThrottlingException";
this.$fault = "client";
Object.setPrototypeOf(this, ThrottlingException.prototype);
this.Message = opts.Message;
}
}
exports.ThrottlingException = ThrottlingException;
module.exports = require("../index.js");

@@ -1,5 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./Interfaces"), exports);
tslib_1.__exportStar(require("./ListRealtimeContactAnalysisSegmentsPaginator"), exports);
module.exports = require("../index.js");

@@ -1,2 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
module.exports = require("../index.js");

@@ -1,7 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.paginateListRealtimeContactAnalysisSegments = void 0;
const core_1 = require("@smithy/core");
const ListRealtimeContactAnalysisSegmentsCommand_1 = require("../commands/ListRealtimeContactAnalysisSegmentsCommand");
const ConnectContactLensClient_1 = require("../ConnectContactLensClient");
exports.paginateListRealtimeContactAnalysisSegments = (0, core_1.createPaginator)(ConnectContactLensClient_1.ConnectContactLensClient, ListRealtimeContactAnalysisSegmentsCommand_1.ListRealtimeContactAnalysisSegmentsCommand, "NextToken", "NextToken", "MaxResults");
module.exports = require("../index.js");

@@ -1,189 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.de_ListRealtimeContactAnalysisSegmentsCommand = exports.se_ListRealtimeContactAnalysisSegmentsCommand = void 0;
const core_1 = require("@smithy/core");
const smithy_client_1 = require("@smithy/smithy-client");
const ConnectContactLensServiceException_1 = require("../models/ConnectContactLensServiceException");
const models_0_1 = require("../models/models_0");
const se_ListRealtimeContactAnalysisSegmentsCommand = async (input, context) => {
const b = (0, core_1.requestBuilder)(input, context);
const headers = {
"content-type": "application/json",
};
b.bp("/realtime-contact-analysis/analysis-segments");
let body;
body = JSON.stringify((0, smithy_client_1.take)(input, {
ContactId: [],
InstanceId: [],
MaxResults: [],
NextToken: [],
}));
b.m("POST").h(headers).b(body);
return b.build();
};
exports.se_ListRealtimeContactAnalysisSegmentsCommand = se_ListRealtimeContactAnalysisSegmentsCommand;
const de_ListRealtimeContactAnalysisSegmentsCommand = async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_ListRealtimeContactAnalysisSegmentsCommandError(output, context);
}
const contents = (0, smithy_client_1.map)({
$metadata: deserializeMetadata(output),
});
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
const doc = (0, smithy_client_1.take)(data, {
NextToken: smithy_client_1.expectString,
Segments: smithy_client_1._json,
});
Object.assign(contents, doc);
return contents;
};
exports.de_ListRealtimeContactAnalysisSegmentsCommand = de_ListRealtimeContactAnalysisSegmentsCommand;
const de_ListRealtimeContactAnalysisSegmentsCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseErrorBody(output.body, context),
};
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "AccessDeniedException":
case "com.amazonaws.connectcontactlens#AccessDeniedException":
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
case "InternalServiceException":
case "com.amazonaws.connectcontactlens#InternalServiceException":
throw await de_InternalServiceExceptionRes(parsedOutput, context);
case "InvalidRequestException":
case "com.amazonaws.connectcontactlens#InvalidRequestException":
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
case "ResourceNotFoundException":
case "com.amazonaws.connectcontactlens#ResourceNotFoundException":
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.connectcontactlens#ThrottlingException":
throw await de_ThrottlingExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody,
errorCode,
});
}
};
const throwDefaultError = (0, smithy_client_1.withBaseException)(ConnectContactLensServiceException_1.ConnectContactLensServiceException);
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
const contents = (0, smithy_client_1.map)({});
const data = parsedOutput.body;
const doc = (0, smithy_client_1.take)(data, {
Message: smithy_client_1.expectString,
});
Object.assign(contents, doc);
const exception = new models_0_1.AccessDeniedException({
$metadata: deserializeMetadata(parsedOutput),
...contents,
});
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
};
const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
const contents = (0, smithy_client_1.map)({});
const data = parsedOutput.body;
const doc = (0, smithy_client_1.take)(data, {
Message: smithy_client_1.expectString,
});
Object.assign(contents, doc);
const exception = new models_0_1.InternalServiceException({
$metadata: deserializeMetadata(parsedOutput),
...contents,
});
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
};
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
const contents = (0, smithy_client_1.map)({});
const data = parsedOutput.body;
const doc = (0, smithy_client_1.take)(data, {
Message: smithy_client_1.expectString,
});
Object.assign(contents, doc);
const exception = new models_0_1.InvalidRequestException({
$metadata: deserializeMetadata(parsedOutput),
...contents,
});
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
};
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
const contents = (0, smithy_client_1.map)({});
const data = parsedOutput.body;
const doc = (0, smithy_client_1.take)(data, {
Message: smithy_client_1.expectString,
});
Object.assign(contents, doc);
const exception = new models_0_1.ResourceNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...contents,
});
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
};
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
const contents = (0, smithy_client_1.map)({});
const data = parsedOutput.body;
const doc = (0, smithy_client_1.take)(data, {
Message: smithy_client_1.expectString,
});
Object.assign(contents, doc);
const exception = new models_0_1.ThrottlingException({
$metadata: deserializeMetadata(parsedOutput),
...contents,
});
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
};
const deserializeMetadata = (output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"],
});
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
const isSerializableHeaderValue = (value) => value !== undefined &&
value !== null &&
value !== "" &&
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
if (encoded.length) {
return JSON.parse(encoded);
}
return {};
});
const parseErrorBody = async (errorBody, context) => {
const value = await parseBody(errorBody, context);
value.message = value.message ?? value.Message;
return value;
};
const loadRestJsonErrorCode = (output, data) => {
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
const sanitizeErrorCode = (rawValue) => {
let cleanValue = rawValue;
if (typeof cleanValue === "number") {
cleanValue = cleanValue.toString();
}
if (cleanValue.indexOf(",") >= 0) {
cleanValue = cleanValue.split(",")[0];
}
if (cleanValue.indexOf(":") >= 0) {
cleanValue = cleanValue.split(":")[0];
}
if (cleanValue.indexOf("#") >= 0) {
cleanValue = cleanValue.split("#")[1];
}
return cleanValue;
};
const headerKey = findKey(output.headers, "x-amzn-errortype");
if (headerKey !== undefined) {
return sanitizeErrorCode(output.headers[headerKey]);
}
if (data.code !== undefined) {
return sanitizeErrorCode(data.code);
}
if (data["__type"] !== undefined) {
return sanitizeErrorCode(data["__type"]);
}
};
module.exports = require("../index.js");

@@ -1,22 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveRuntimeExtensions = void 0;
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
const protocol_http_1 = require("@smithy/protocol-http");
const smithy_client_1 = require("@smithy/smithy-client");
const asPartial = (t) => t;
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
const extensionConfiguration = {
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
};
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return {
...runtimeConfig,
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
};
};
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
module.exports = require("./index.js");
{
"name": "@aws-sdk/client-connect-contact-lens",
"description": "AWS SDK for JavaScript Connect Contact Lens Client for Node.js, Browser and React Native",
"version": "3.490.0",
"version": "3.495.0",
"scripts": {
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:cjs": "node ../../scripts/compilation/inline client-connect-contact-lens",
"build:es": "tsc -p tsconfig.es.json",

@@ -23,43 +23,43 @@ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",

"@aws-crypto/sha256-js": "3.0.0",
"@aws-sdk/client-sts": "3.490.0",
"@aws-sdk/core": "3.490.0",
"@aws-sdk/credential-provider-node": "3.490.0",
"@aws-sdk/middleware-host-header": "3.489.0",
"@aws-sdk/middleware-logger": "3.489.0",
"@aws-sdk/middleware-recursion-detection": "3.489.0",
"@aws-sdk/middleware-signing": "3.489.0",
"@aws-sdk/middleware-user-agent": "3.489.0",
"@aws-sdk/region-config-resolver": "3.489.0",
"@aws-sdk/types": "3.489.0",
"@aws-sdk/util-endpoints": "3.489.0",
"@aws-sdk/util-user-agent-browser": "3.489.0",
"@aws-sdk/util-user-agent-node": "3.489.0",
"@smithy/config-resolver": "^2.0.23",
"@smithy/core": "^1.2.2",
"@smithy/fetch-http-handler": "^2.3.2",
"@smithy/hash-node": "^2.0.18",
"@smithy/invalid-dependency": "^2.0.16",
"@smithy/middleware-content-length": "^2.0.18",
"@smithy/middleware-endpoint": "^2.3.0",
"@smithy/middleware-retry": "^2.0.26",
"@smithy/middleware-serde": "^2.0.16",
"@smithy/middleware-stack": "^2.0.10",
"@smithy/node-config-provider": "^2.1.9",
"@smithy/node-http-handler": "^2.2.2",
"@smithy/protocol-http": "^3.0.12",
"@smithy/smithy-client": "^2.2.1",
"@smithy/types": "^2.8.0",
"@smithy/url-parser": "^2.0.16",
"@smithy/util-base64": "^2.0.1",
"@smithy/util-body-length-browser": "^2.0.1",
"@smithy/util-body-length-node": "^2.1.0",
"@smithy/util-defaults-mode-browser": "^2.0.24",
"@smithy/util-defaults-mode-node": "^2.0.32",
"@smithy/util-endpoints": "^1.0.8",
"@smithy/util-retry": "^2.0.9",
"@smithy/util-utf8": "^2.0.2",
"@aws-sdk/client-sts": "3.495.0",
"@aws-sdk/core": "3.495.0",
"@aws-sdk/credential-provider-node": "3.495.0",
"@aws-sdk/middleware-host-header": "3.495.0",
"@aws-sdk/middleware-logger": "3.495.0",
"@aws-sdk/middleware-recursion-detection": "3.495.0",
"@aws-sdk/middleware-signing": "3.495.0",
"@aws-sdk/middleware-user-agent": "3.495.0",
"@aws-sdk/region-config-resolver": "3.495.0",
"@aws-sdk/types": "3.495.0",
"@aws-sdk/util-endpoints": "3.495.0",
"@aws-sdk/util-user-agent-browser": "3.495.0",
"@aws-sdk/util-user-agent-node": "3.495.0",
"@smithy/config-resolver": "^2.1.0",
"@smithy/core": "^1.3.0",
"@smithy/fetch-http-handler": "^2.4.0",
"@smithy/hash-node": "^2.1.0",
"@smithy/invalid-dependency": "^2.1.0",
"@smithy/middleware-content-length": "^2.1.0",
"@smithy/middleware-endpoint": "^2.4.0",
"@smithy/middleware-retry": "^2.1.0",
"@smithy/middleware-serde": "^2.1.0",
"@smithy/middleware-stack": "^2.1.0",
"@smithy/node-config-provider": "^2.2.0",
"@smithy/node-http-handler": "^2.3.0",
"@smithy/protocol-http": "^3.1.0",
"@smithy/smithy-client": "^2.3.0",
"@smithy/types": "^2.9.0",
"@smithy/url-parser": "^2.1.0",
"@smithy/util-base64": "^2.1.0",
"@smithy/util-body-length-browser": "^2.1.0",
"@smithy/util-body-length-node": "^2.2.0",
"@smithy/util-defaults-mode-browser": "^2.1.0",
"@smithy/util-defaults-mode-node": "^2.1.0",
"@smithy/util-endpoints": "^1.1.0",
"@smithy/util-retry": "^2.1.0",
"@smithy/util-utf8": "^2.1.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@smithy/service-client-documentation-generator": "^2.0.0",
"@smithy/service-client-documentation-generator": "^2.1.0",
"@tsconfig/node14": "1.0.3",

@@ -66,0 +66,0 @@ "@types/node": "^14.14.31",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc