@aws-sdk/client-connect-contact-lens 3.186.0 → 3.190.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 +16 -0
- package/dist-es/ConnectContactLens.js +6 -13
- package/dist-es/ConnectContactLensClient.js +22 -28
- package/dist-es/commands/ListRealtimeContactAnalysisSegmentsCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ConnectContactLensServiceException.js +5 -10
- package/dist-es/models/models_0.js +87 -70
- package/dist-es/pagination/ListRealtimeContactAnalysisSegmentsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +182 -228
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.190.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.189.0...v3.190.0) (2022-10-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-connect-contact-lens
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/client-connect-contact-lens
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @aws-sdk/client-connect-contact-lens
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { ListRealtimeContactAnalysisSegmentsCommand, } from "./commands/ListRealtimeContactAnalysisSegmentsCommand";
|
|
3
2
|
import { ConnectContactLensClient } from "./ConnectContactLensClient";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
8
|
-
}
|
|
9
|
-
ConnectContactLens.prototype.listRealtimeContactAnalysisSegments = function (args, optionsOrCb, cb) {
|
|
10
|
-
var command = new ListRealtimeContactAnalysisSegmentsCommand(args);
|
|
3
|
+
export class ConnectContactLens extends ConnectContactLensClient {
|
|
4
|
+
listRealtimeContactAnalysisSegments(args, optionsOrCb, cb) {
|
|
5
|
+
const command = new ListRealtimeContactAnalysisSegmentsCommand(args);
|
|
11
6
|
if (typeof optionsOrCb === "function") {
|
|
12
7
|
this.send(command, optionsOrCb);
|
|
13
8
|
}
|
|
14
9
|
else if (typeof cb === "function") {
|
|
15
10
|
if (typeof optionsOrCb !== "object")
|
|
16
|
-
throw new Error(
|
|
11
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
17
12
|
this.send(command, optionsOrCb || {}, cb);
|
|
18
13
|
}
|
|
19
14
|
else {
|
|
20
15
|
return this.send(command, optionsOrCb);
|
|
21
16
|
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}(ConnectContactLensClient));
|
|
25
|
-
export { ConnectContactLens };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
|
|
3
2
|
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
4
3
|
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
|
|
|
9
8
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
10
9
|
import { Client as __Client, } from "@aws-sdk/smithy-client";
|
|
11
10
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
_this.middlewareStack.use(getAwsAuthPlugin(_this.config));
|
|
31
|
-
_this.middlewareStack.use(getUserAgentPlugin(_this.config));
|
|
32
|
-
return _this;
|
|
11
|
+
export class ConnectContactLensClient extends __Client {
|
|
12
|
+
constructor(configuration) {
|
|
13
|
+
const _config_0 = __getRuntimeConfig(configuration);
|
|
14
|
+
const _config_1 = resolveRegionConfig(_config_0);
|
|
15
|
+
const _config_2 = resolveEndpointsConfig(_config_1);
|
|
16
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
17
|
+
const _config_4 = resolveHostHeaderConfig(_config_3);
|
|
18
|
+
const _config_5 = resolveAwsAuthConfig(_config_4);
|
|
19
|
+
const _config_6 = resolveUserAgentConfig(_config_5);
|
|
20
|
+
super(_config_6);
|
|
21
|
+
this.config = _config_6;
|
|
22
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
23
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
24
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
25
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
26
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
27
|
+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
28
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
33
29
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}(__Client));
|
|
39
|
-
export { ConnectContactLensClient };
|
|
30
|
+
destroy() {
|
|
31
|
+
super.destroy();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,39 +1,32 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { ListRealtimeContactAnalysisSegmentsRequestFilterSensitiveLog, ListRealtimeContactAnalysisSegmentsResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
4
|
import { deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand, serializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
_this.input = input;
|
|
11
|
-
return _this;
|
|
5
|
+
export class ListRealtimeContactAnalysisSegmentsCommand extends $Command {
|
|
6
|
+
constructor(input) {
|
|
7
|
+
super();
|
|
8
|
+
this.input = input;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
11
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
logger
|
|
21
|
-
clientName
|
|
22
|
-
commandName
|
|
12
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
13
|
+
const { logger } = configuration;
|
|
14
|
+
const clientName = "ConnectContactLensClient";
|
|
15
|
+
const commandName = "ListRealtimeContactAnalysisSegmentsCommand";
|
|
16
|
+
const handlerExecutionContext = {
|
|
17
|
+
logger,
|
|
18
|
+
clientName,
|
|
19
|
+
commandName,
|
|
23
20
|
inputFilterSensitiveLog: ListRealtimeContactAnalysisSegmentsRequestFilterSensitiveLog,
|
|
24
21
|
outputFilterSensitiveLog: ListRealtimeContactAnalysisSegmentsResponseFilterSensitiveLog,
|
|
25
22
|
};
|
|
26
|
-
|
|
27
|
-
return stack.resolve(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
ListRealtimeContactAnalysisSegmentsCommand.prototype.serialize = function (input, context) {
|
|
23
|
+
const { requestHandler } = configuration;
|
|
24
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
25
|
+
}
|
|
26
|
+
serialize(input, context) {
|
|
32
27
|
return serializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand(input, context);
|
|
33
|
-
}
|
|
34
|
-
|
|
28
|
+
}
|
|
29
|
+
deserialize(output, context) {
|
|
35
30
|
return deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand(output, context);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}($Command));
|
|
39
|
-
export { ListRealtimeContactAnalysisSegmentsCommand };
|
|
31
|
+
}
|
|
32
|
+
}
|
package/dist-es/endpoints.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { getRegionInfo } from "@aws-sdk/config-resolver";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const regionHash = {};
|
|
3
|
+
const partitionHash = {
|
|
5
4
|
aws: {
|
|
6
5
|
regions: [
|
|
7
6
|
"af-south-1",
|
|
@@ -121,8 +120,9 @@ var partitionHash = {
|
|
|
121
120
|
],
|
|
122
121
|
},
|
|
123
122
|
};
|
|
124
|
-
export
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
|
|
124
|
+
...options,
|
|
125
|
+
signingService: "connect",
|
|
126
|
+
regionHash,
|
|
127
|
+
partitionHash,
|
|
128
|
+
});
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.setPrototypeOf(_this, ConnectContactLensServiceException.prototype);
|
|
8
|
-
return _this;
|
|
2
|
+
export class ConnectContactLensServiceException extends __ServiceException {
|
|
3
|
+
constructor(options) {
|
|
4
|
+
super(options);
|
|
5
|
+
Object.setPrototypeOf(this, ConnectContactLensServiceException.prototype);
|
|
9
6
|
}
|
|
10
|
-
|
|
11
|
-
}(__ServiceException));
|
|
12
|
-
export { ConnectContactLensServiceException };
|
|
7
|
+
}
|
|
@@ -1,82 +1,99 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
1
|
import { ConnectContactLensServiceException as __BaseException } from "./ConnectContactLensServiceException";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
super({
|
|
5
|
+
name: "AccessDeniedException",
|
|
6
|
+
$fault: "client",
|
|
7
|
+
...opts,
|
|
8
|
+
});
|
|
9
|
+
this.name = "AccessDeniedException";
|
|
10
|
+
this.$fault = "client";
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
this.Message = opts.Message;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
}
|
|
15
|
+
export class InternalServiceException extends __BaseException {
|
|
16
|
+
constructor(opts) {
|
|
17
|
+
super({
|
|
18
|
+
name: "InternalServiceException",
|
|
19
|
+
$fault: "server",
|
|
20
|
+
...opts,
|
|
21
|
+
});
|
|
22
|
+
this.name = "InternalServiceException";
|
|
23
|
+
this.$fault = "server";
|
|
24
|
+
Object.setPrototypeOf(this, InternalServiceException.prototype);
|
|
25
|
+
this.Message = opts.Message;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
}
|
|
28
|
+
export class InvalidRequestException extends __BaseException {
|
|
29
|
+
constructor(opts) {
|
|
30
|
+
super({
|
|
31
|
+
name: "InvalidRequestException",
|
|
32
|
+
$fault: "client",
|
|
33
|
+
...opts,
|
|
34
|
+
});
|
|
35
|
+
this.name = "InvalidRequestException";
|
|
36
|
+
this.$fault = "client";
|
|
37
|
+
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
|
38
|
+
this.Message = opts.Message;
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
-
}(__BaseException));
|
|
41
|
-
export { InvalidRequestException };
|
|
40
|
+
}
|
|
42
41
|
export var SentimentValue;
|
|
43
42
|
(function (SentimentValue) {
|
|
44
43
|
SentimentValue["NEGATIVE"] = "NEGATIVE";
|
|
45
44
|
SentimentValue["NEUTRAL"] = "NEUTRAL";
|
|
46
45
|
SentimentValue["POSITIVE"] = "POSITIVE";
|
|
47
46
|
})(SentimentValue || (SentimentValue = {}));
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
48
|
+
constructor(opts) {
|
|
49
|
+
super({
|
|
50
|
+
name: "ResourceNotFoundException",
|
|
51
|
+
$fault: "client",
|
|
52
|
+
...opts,
|
|
53
|
+
});
|
|
54
|
+
this.name = "ResourceNotFoundException";
|
|
55
|
+
this.$fault = "client";
|
|
56
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
57
|
+
this.Message = opts.Message;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
59
|
+
}
|
|
60
|
+
export class ThrottlingException extends __BaseException {
|
|
61
|
+
constructor(opts) {
|
|
62
|
+
super({
|
|
63
|
+
name: "ThrottlingException",
|
|
64
|
+
$fault: "client",
|
|
65
|
+
...opts,
|
|
66
|
+
});
|
|
67
|
+
this.name = "ThrottlingException";
|
|
68
|
+
this.$fault = "client";
|
|
69
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
70
|
+
this.Message = opts.Message;
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
export
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
export
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
export
|
|
82
|
-
|
|
72
|
+
}
|
|
73
|
+
export const ListRealtimeContactAnalysisSegmentsRequestFilterSensitiveLog = (obj) => ({
|
|
74
|
+
...obj,
|
|
75
|
+
});
|
|
76
|
+
export const PointOfInterestFilterSensitiveLog = (obj) => ({
|
|
77
|
+
...obj,
|
|
78
|
+
});
|
|
79
|
+
export const CategoryDetailsFilterSensitiveLog = (obj) => ({
|
|
80
|
+
...obj,
|
|
81
|
+
});
|
|
82
|
+
export const CategoriesFilterSensitiveLog = (obj) => ({
|
|
83
|
+
...obj,
|
|
84
|
+
});
|
|
85
|
+
export const CharacterOffsetsFilterSensitiveLog = (obj) => ({
|
|
86
|
+
...obj,
|
|
87
|
+
});
|
|
88
|
+
export const IssueDetectedFilterSensitiveLog = (obj) => ({
|
|
89
|
+
...obj,
|
|
90
|
+
});
|
|
91
|
+
export const TranscriptFilterSensitiveLog = (obj) => ({
|
|
92
|
+
...obj,
|
|
93
|
+
});
|
|
94
|
+
export const RealtimeContactAnalysisSegmentFilterSensitiveLog = (obj) => ({
|
|
95
|
+
...obj,
|
|
96
|
+
});
|
|
97
|
+
export const ListRealtimeContactAnalysisSegmentsResponseFilterSensitiveLog = (obj) => ({
|
|
98
|
+
...obj,
|
|
99
|
+
});
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { ListRealtimeContactAnalysisSegmentsCommand, } from "../commands/ListRealtimeContactAnalysisSegmentsCommand";
|
|
3
2
|
import { ConnectContactLens } from "../ConnectContactLens";
|
|
4
3
|
import { ConnectContactLensClient } from "../ConnectContactLensClient";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
-
args[_i - 2] = arguments[_i];
|
|
9
|
-
}
|
|
10
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
-
return __generator(this, function (_a) {
|
|
12
|
-
switch (_a.label) {
|
|
13
|
-
case 0: return [4, client.send.apply(client, __spreadArray([new ListRealtimeContactAnalysisSegmentsCommand(input)], __read(args), false))];
|
|
14
|
-
case 1: return [2, _a.sent()];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
});
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new ListRealtimeContactAnalysisSegmentsCommand(input), ...args);
|
|
18
6
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
-
args[_i - 2] = arguments[_i];
|
|
23
|
-
}
|
|
24
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
-
return __generator(this, function (_a) {
|
|
26
|
-
switch (_a.label) {
|
|
27
|
-
case 0: return [4, client.listRealtimeContactAnalysisSegments.apply(client, __spreadArray([input], __read(args), false))];
|
|
28
|
-
case 1: return [2, _a.sent()];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.listRealtimeContactAnalysisSegments(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateListRealtimeContactAnalysisSegments(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateListRealtimeContactAnalysisSegments(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.NextToken = token;
|
|
16
|
+
input["MaxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ConnectContactLens) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ConnectContactLensClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ConnectContactLens | ConnectContactLensClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.NextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
37
30
|
}
|
|
38
|
-
return
|
|
39
|
-
var token, hasNext, page, prevToken;
|
|
40
|
-
return __generator(this, function (_a) {
|
|
41
|
-
switch (_a.label) {
|
|
42
|
-
case 0:
|
|
43
|
-
token = config.startingToken || undefined;
|
|
44
|
-
hasNext = true;
|
|
45
|
-
_a.label = 1;
|
|
46
|
-
case 1:
|
|
47
|
-
if (!hasNext) return [3, 9];
|
|
48
|
-
input.NextToken = token;
|
|
49
|
-
input["MaxResults"] = config.pageSize;
|
|
50
|
-
if (!(config.client instanceof ConnectContactLens)) return [3, 3];
|
|
51
|
-
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
52
|
-
case 2:
|
|
53
|
-
page = _a.sent();
|
|
54
|
-
return [3, 6];
|
|
55
|
-
case 3:
|
|
56
|
-
if (!(config.client instanceof ConnectContactLensClient)) return [3, 5];
|
|
57
|
-
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
58
|
-
case 4:
|
|
59
|
-
page = _a.sent();
|
|
60
|
-
return [3, 6];
|
|
61
|
-
case 5: throw new Error("Invalid client, expected ConnectContactLens | ConnectContactLensClient");
|
|
62
|
-
case 6: return [4, __await(page)];
|
|
63
|
-
case 7: return [4, _a.sent()];
|
|
64
|
-
case 8:
|
|
65
|
-
_a.sent();
|
|
66
|
-
prevToken = token;
|
|
67
|
-
token = page.NextToken;
|
|
68
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
69
|
-
return [3, 1];
|
|
70
|
-
case 9: return [4, __await(undefined)];
|
|
71
|
-
case 10: return [2, _a.sent()];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
31
|
+
return undefined;
|
|
75
32
|
}
|
|
@@ -1,170 +1,141 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
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
3
|
import { ConnectContactLensServiceException as __BaseException } from "../models/ConnectContactLensServiceException";
|
|
5
4
|
import { AccessDeniedException, InternalServiceException, InvalidRequestException, ResourceNotFoundException, ThrottlingException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return [2, new __HttpRequest({
|
|
20
|
-
protocol: protocol,
|
|
21
|
-
hostname: hostname,
|
|
22
|
-
port: port,
|
|
23
|
-
method: "POST",
|
|
24
|
-
headers: headers,
|
|
25
|
-
path: resolvedPath,
|
|
26
|
-
body: body,
|
|
27
|
-
})];
|
|
28
|
-
}
|
|
5
|
+
export const serializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
11
|
+
"/realtime-contact-analysis/analysis-segments";
|
|
12
|
+
let body;
|
|
13
|
+
body = JSON.stringify({
|
|
14
|
+
...(input.ContactId != null && { ContactId: input.ContactId }),
|
|
15
|
+
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
16
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
17
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
29
18
|
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
contents = map({
|
|
40
|
-
$metadata: deserializeMetadata(output),
|
|
41
|
-
});
|
|
42
|
-
_a = __expectNonNull;
|
|
43
|
-
_b = __expectObject;
|
|
44
|
-
return [4, parseBody(output.body, context)];
|
|
45
|
-
case 1:
|
|
46
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
47
|
-
if (data.NextToken != null) {
|
|
48
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
49
|
-
}
|
|
50
|
-
if (data.Segments != null) {
|
|
51
|
-
contents.Segments = deserializeAws_restJson1RealtimeContactAnalysisSegments(data.Segments, context);
|
|
52
|
-
}
|
|
53
|
-
return [2, contents];
|
|
54
|
-
}
|
|
19
|
+
return new __HttpRequest({
|
|
20
|
+
protocol,
|
|
21
|
+
hostname,
|
|
22
|
+
port,
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers,
|
|
25
|
+
path: resolvedPath,
|
|
26
|
+
body,
|
|
55
27
|
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
_a = [__assign({}, output)];
|
|
64
|
-
_c = {};
|
|
65
|
-
return [4, parseErrorBody(output.body, context)];
|
|
66
|
-
case 1:
|
|
67
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
68
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
69
|
-
_b = errorCode;
|
|
70
|
-
switch (_b) {
|
|
71
|
-
case "AccessDeniedException": return [3, 2];
|
|
72
|
-
case "com.amazonaws.connectcontactlens#AccessDeniedException": return [3, 2];
|
|
73
|
-
case "InternalServiceException": return [3, 4];
|
|
74
|
-
case "com.amazonaws.connectcontactlens#InternalServiceException": return [3, 4];
|
|
75
|
-
case "InvalidRequestException": return [3, 6];
|
|
76
|
-
case "com.amazonaws.connectcontactlens#InvalidRequestException": return [3, 6];
|
|
77
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
78
|
-
case "com.amazonaws.connectcontactlens#ResourceNotFoundException": return [3, 8];
|
|
79
|
-
case "ThrottlingException": return [3, 10];
|
|
80
|
-
case "com.amazonaws.connectcontactlens#ThrottlingException": return [3, 10];
|
|
81
|
-
}
|
|
82
|
-
return [3, 12];
|
|
83
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
84
|
-
case 3: throw _d.sent();
|
|
85
|
-
case 4: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
86
|
-
case 5: throw _d.sent();
|
|
87
|
-
case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
88
|
-
case 7: throw _d.sent();
|
|
89
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
90
|
-
case 9: throw _d.sent();
|
|
91
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
92
|
-
case 11: throw _d.sent();
|
|
93
|
-
case 12:
|
|
94
|
-
parsedBody = parsedOutput.body;
|
|
95
|
-
throwDefaultError({
|
|
96
|
-
output: output,
|
|
97
|
-
parsedBody: parsedBody,
|
|
98
|
-
exceptionCtor: __BaseException,
|
|
99
|
-
errorCode: errorCode,
|
|
100
|
-
});
|
|
101
|
-
_d.label = 13;
|
|
102
|
-
case 13: return [2];
|
|
103
|
-
}
|
|
28
|
+
};
|
|
29
|
+
export const deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand = async (output, context) => {
|
|
30
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31
|
+
return deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommandError(output, context);
|
|
32
|
+
}
|
|
33
|
+
const contents = map({
|
|
34
|
+
$metadata: deserializeMetadata(output),
|
|
104
35
|
});
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
contents =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
36
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
37
|
+
if (data.NextToken != null) {
|
|
38
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
39
|
+
}
|
|
40
|
+
if (data.Segments != null) {
|
|
41
|
+
contents.Segments = deserializeAws_restJson1RealtimeContactAnalysisSegments(data.Segments, context);
|
|
42
|
+
}
|
|
43
|
+
return contents;
|
|
44
|
+
};
|
|
45
|
+
const deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommandError = async (output, context) => {
|
|
46
|
+
const parsedOutput = {
|
|
47
|
+
...output,
|
|
48
|
+
body: await parseErrorBody(output.body, context),
|
|
49
|
+
};
|
|
50
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
51
|
+
switch (errorCode) {
|
|
52
|
+
case "AccessDeniedException":
|
|
53
|
+
case "com.amazonaws.connectcontactlens#AccessDeniedException":
|
|
54
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
55
|
+
case "InternalServiceException":
|
|
56
|
+
case "com.amazonaws.connectcontactlens#InternalServiceException":
|
|
57
|
+
throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
|
|
58
|
+
case "InvalidRequestException":
|
|
59
|
+
case "com.amazonaws.connectcontactlens#InvalidRequestException":
|
|
60
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
61
|
+
case "ResourceNotFoundException":
|
|
62
|
+
case "com.amazonaws.connectcontactlens#ResourceNotFoundException":
|
|
63
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
64
|
+
case "ThrottlingException":
|
|
65
|
+
case "com.amazonaws.connectcontactlens#ThrottlingException":
|
|
66
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
67
|
+
default:
|
|
68
|
+
const parsedBody = parsedOutput.body;
|
|
69
|
+
throwDefaultError({
|
|
70
|
+
output,
|
|
71
|
+
parsedBody,
|
|
72
|
+
exceptionCtor: __BaseException,
|
|
73
|
+
errorCode,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const map = __map;
|
|
78
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
79
|
+
const contents = map({});
|
|
80
|
+
const data = parsedOutput.body;
|
|
81
|
+
if (data.Message != null) {
|
|
82
|
+
contents.Message = __expectString(data.Message);
|
|
83
|
+
}
|
|
84
|
+
const exception = new AccessDeniedException({
|
|
85
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
86
|
+
...contents,
|
|
117
87
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
88
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
89
|
+
};
|
|
90
|
+
const deserializeAws_restJson1InternalServiceExceptionResponse = async (parsedOutput, context) => {
|
|
91
|
+
const contents = map({});
|
|
92
|
+
const data = parsedOutput.body;
|
|
93
|
+
if (data.Message != null) {
|
|
94
|
+
contents.Message = __expectString(data.Message);
|
|
95
|
+
}
|
|
96
|
+
const exception = new InternalServiceException({
|
|
97
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
98
|
+
...contents,
|
|
129
99
|
});
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
100
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
101
|
+
};
|
|
102
|
+
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
103
|
+
const contents = map({});
|
|
104
|
+
const data = parsedOutput.body;
|
|
105
|
+
if (data.Message != null) {
|
|
106
|
+
contents.Message = __expectString(data.Message);
|
|
107
|
+
}
|
|
108
|
+
const exception = new InvalidRequestException({
|
|
109
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
110
|
+
...contents,
|
|
141
111
|
});
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
112
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
113
|
+
};
|
|
114
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
115
|
+
const contents = map({});
|
|
116
|
+
const data = parsedOutput.body;
|
|
117
|
+
if (data.Message != null) {
|
|
118
|
+
contents.Message = __expectString(data.Message);
|
|
119
|
+
}
|
|
120
|
+
const exception = new ResourceNotFoundException({
|
|
121
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
122
|
+
...contents,
|
|
153
123
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
124
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
125
|
+
};
|
|
126
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
127
|
+
const contents = map({});
|
|
128
|
+
const data = parsedOutput.body;
|
|
129
|
+
if (data.Message != null) {
|
|
130
|
+
contents.Message = __expectString(data.Message);
|
|
131
|
+
}
|
|
132
|
+
const exception = new ThrottlingException({
|
|
133
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
134
|
+
...contents,
|
|
165
135
|
});
|
|
166
|
-
|
|
167
|
-
|
|
136
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
137
|
+
};
|
|
138
|
+
const deserializeAws_restJson1Categories = (output, context) => {
|
|
168
139
|
return {
|
|
169
140
|
MatchedCategories: output.MatchedCategories != null
|
|
170
141
|
? deserializeAws_restJson1MatchedCategories(output.MatchedCategories, context)
|
|
@@ -174,30 +145,30 @@ var deserializeAws_restJson1Categories = function (output, context) {
|
|
|
174
145
|
: undefined,
|
|
175
146
|
};
|
|
176
147
|
};
|
|
177
|
-
|
|
148
|
+
const deserializeAws_restJson1CategoryDetails = (output, context) => {
|
|
178
149
|
return {
|
|
179
150
|
PointsOfInterest: output.PointsOfInterest != null
|
|
180
151
|
? deserializeAws_restJson1PointsOfInterest(output.PointsOfInterest, context)
|
|
181
152
|
: undefined,
|
|
182
153
|
};
|
|
183
154
|
};
|
|
184
|
-
|
|
155
|
+
const deserializeAws_restJson1CharacterOffsets = (output, context) => {
|
|
185
156
|
return {
|
|
186
157
|
BeginOffsetChar: __expectInt32(output.BeginOffsetChar),
|
|
187
158
|
EndOffsetChar: __expectInt32(output.EndOffsetChar),
|
|
188
159
|
};
|
|
189
160
|
};
|
|
190
|
-
|
|
161
|
+
const deserializeAws_restJson1IssueDetected = (output, context) => {
|
|
191
162
|
return {
|
|
192
163
|
CharacterOffsets: output.CharacterOffsets != null
|
|
193
164
|
? deserializeAws_restJson1CharacterOffsets(output.CharacterOffsets, context)
|
|
194
165
|
: undefined,
|
|
195
166
|
};
|
|
196
167
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
.filter(
|
|
200
|
-
.map(
|
|
168
|
+
const deserializeAws_restJson1IssuesDetected = (output, context) => {
|
|
169
|
+
const retVal = (output || [])
|
|
170
|
+
.filter((e) => e != null)
|
|
171
|
+
.map((entry) => {
|
|
201
172
|
if (entry === null) {
|
|
202
173
|
return null;
|
|
203
174
|
}
|
|
@@ -205,10 +176,10 @@ var deserializeAws_restJson1IssuesDetected = function (output, context) {
|
|
|
205
176
|
});
|
|
206
177
|
return retVal;
|
|
207
178
|
};
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
.filter(
|
|
211
|
-
.map(
|
|
179
|
+
const deserializeAws_restJson1MatchedCategories = (output, context) => {
|
|
180
|
+
const retVal = (output || [])
|
|
181
|
+
.filter((e) => e != null)
|
|
182
|
+
.map((entry) => {
|
|
212
183
|
if (entry === null) {
|
|
213
184
|
return null;
|
|
214
185
|
}
|
|
@@ -216,26 +187,27 @@ var deserializeAws_restJson1MatchedCategories = function (output, context) {
|
|
|
216
187
|
});
|
|
217
188
|
return retVal;
|
|
218
189
|
};
|
|
219
|
-
|
|
220
|
-
return Object.entries(output).reduce(
|
|
221
|
-
var _b;
|
|
222
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
190
|
+
const deserializeAws_restJson1MatchedDetails = (output, context) => {
|
|
191
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
223
192
|
if (value === null) {
|
|
224
193
|
return acc;
|
|
225
194
|
}
|
|
226
|
-
return
|
|
195
|
+
return {
|
|
196
|
+
...acc,
|
|
197
|
+
[key]: deserializeAws_restJson1CategoryDetails(value, context),
|
|
198
|
+
};
|
|
227
199
|
}, {});
|
|
228
200
|
};
|
|
229
|
-
|
|
201
|
+
const deserializeAws_restJson1PointOfInterest = (output, context) => {
|
|
230
202
|
return {
|
|
231
203
|
BeginOffsetMillis: __expectInt32(output.BeginOffsetMillis),
|
|
232
204
|
EndOffsetMillis: __expectInt32(output.EndOffsetMillis),
|
|
233
205
|
};
|
|
234
206
|
};
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
.filter(
|
|
238
|
-
.map(
|
|
207
|
+
const deserializeAws_restJson1PointsOfInterest = (output, context) => {
|
|
208
|
+
const retVal = (output || [])
|
|
209
|
+
.filter((e) => e != null)
|
|
210
|
+
.map((entry) => {
|
|
239
211
|
if (entry === null) {
|
|
240
212
|
return null;
|
|
241
213
|
}
|
|
@@ -243,16 +215,16 @@ var deserializeAws_restJson1PointsOfInterest = function (output, context) {
|
|
|
243
215
|
});
|
|
244
216
|
return retVal;
|
|
245
217
|
};
|
|
246
|
-
|
|
218
|
+
const deserializeAws_restJson1RealtimeContactAnalysisSegment = (output, context) => {
|
|
247
219
|
return {
|
|
248
220
|
Categories: output.Categories != null ? deserializeAws_restJson1Categories(output.Categories, context) : undefined,
|
|
249
221
|
Transcript: output.Transcript != null ? deserializeAws_restJson1Transcript(output.Transcript, context) : undefined,
|
|
250
222
|
};
|
|
251
223
|
};
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
.filter(
|
|
255
|
-
.map(
|
|
224
|
+
const deserializeAws_restJson1RealtimeContactAnalysisSegments = (output, context) => {
|
|
225
|
+
const retVal = (output || [])
|
|
226
|
+
.filter((e) => e != null)
|
|
227
|
+
.map((entry) => {
|
|
256
228
|
if (entry === null) {
|
|
257
229
|
return null;
|
|
258
230
|
}
|
|
@@ -260,7 +232,7 @@ var deserializeAws_restJson1RealtimeContactAnalysisSegments = function (output,
|
|
|
260
232
|
});
|
|
261
233
|
return retVal;
|
|
262
234
|
};
|
|
263
|
-
|
|
235
|
+
const deserializeAws_restJson1Transcript = (output, context) => {
|
|
264
236
|
return {
|
|
265
237
|
BeginOffsetMillis: __expectInt32(output.BeginOffsetMillis),
|
|
266
238
|
Content: __expectString(output.Content),
|
|
@@ -274,57 +246,39 @@ var deserializeAws_restJson1Transcript = function (output, context) {
|
|
|
274
246
|
Sentiment: __expectString(output.Sentiment),
|
|
275
247
|
};
|
|
276
248
|
};
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
});
|
|
285
|
-
};
|
|
286
|
-
var collectBody = function (streamBody, context) {
|
|
287
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
249
|
+
const deserializeMetadata = (output) => ({
|
|
250
|
+
httpStatusCode: output.statusCode,
|
|
251
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
252
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
253
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
254
|
+
});
|
|
255
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
288
256
|
if (streamBody instanceof Uint8Array) {
|
|
289
257
|
return Promise.resolve(streamBody);
|
|
290
258
|
}
|
|
291
259
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
292
260
|
};
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
});
|
|
261
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
262
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
263
|
+
value !== null &&
|
|
264
|
+
value !== "" &&
|
|
265
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
266
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
267
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
268
|
+
if (encoded.length) {
|
|
269
|
+
return JSON.parse(encoded);
|
|
270
|
+
}
|
|
271
|
+
return {};
|
|
272
|
+
});
|
|
273
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
274
|
+
const value = await parseBody(errorBody, context);
|
|
275
|
+
value.message = value.message ?? value.Message;
|
|
276
|
+
return value;
|
|
310
277
|
};
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
switch (_b.label) {
|
|
316
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
317
|
-
case 1:
|
|
318
|
-
value = _b.sent();
|
|
319
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
320
|
-
return [2, value];
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
}); };
|
|
324
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
325
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
326
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
327
|
-
var cleanValue = rawValue;
|
|
278
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
279
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
280
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
281
|
+
let cleanValue = rawValue;
|
|
328
282
|
if (typeof cleanValue === "number") {
|
|
329
283
|
cleanValue = cleanValue.toString();
|
|
330
284
|
}
|
|
@@ -339,7 +293,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
339
293
|
}
|
|
340
294
|
return cleanValue;
|
|
341
295
|
};
|
|
342
|
-
|
|
296
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
343
297
|
if (headerKey !== undefined) {
|
|
344
298
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
345
299
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import packageInfo from "../package.json";
|
|
3
2
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
3
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
@@ -12,15 +11,30 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
|
12
11
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
12
|
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
14
13
|
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
export const getRuntimeConfig = (config) => {
|
|
15
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
17
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
18
|
+
return {
|
|
19
|
+
...clientSharedValues,
|
|
20
|
+
...config,
|
|
21
|
+
runtime: "browser",
|
|
22
|
+
defaultsMode,
|
|
23
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
24
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
25
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
26
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
27
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
28
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
29
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
30
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
31
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
32
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
33
|
+
sha256: config?.sha256 ?? Sha256,
|
|
34
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
35
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
36
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
37
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
38
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
39
|
+
};
|
|
26
40
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import packageInfo from "../package.json";
|
|
3
2
|
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
3
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
|
|
@@ -15,16 +14,35 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
|
|
|
15
14
|
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
16
15
|
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
17
16
|
import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
|
|
18
|
-
export
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
17
|
+
export const getRuntimeConfig = (config) => {
|
|
20
18
|
emitWarningIfUnsupportedVersion(process.version);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
21
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
22
|
+
return {
|
|
23
|
+
...clientSharedValues,
|
|
24
|
+
...config,
|
|
25
|
+
runtime: "node",
|
|
26
|
+
defaultsMode,
|
|
27
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
28
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
29
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
30
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
|
|
31
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
32
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
33
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
34
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
35
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
36
|
+
retryMode: config?.retryMode ??
|
|
37
|
+
loadNodeConfig({
|
|
38
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
39
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
40
|
+
}),
|
|
41
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
42
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
43
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
44
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
45
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
46
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
47
|
+
};
|
|
30
48
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
3
2
|
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
8
11
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { parseUrl } from "@aws-sdk/url-parser";
|
|
2
2
|
import { defaultRegionInfoProvider } from "./endpoints";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : parseUrl,
|
|
12
|
-
});
|
|
13
|
-
};
|
|
3
|
+
export const getRuntimeConfig = (config) => ({
|
|
4
|
+
apiVersion: "2020-08-21",
|
|
5
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
6
|
+
logger: config?.logger ?? {},
|
|
7
|
+
regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
|
|
8
|
+
serviceId: config?.serviceId ?? "Connect Contact Lens",
|
|
9
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
10
|
+
});
|
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.
|
|
4
|
+
"version": "3.190.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",
|
|
@@ -19,41 +19,41 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
21
21
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
22
|
-
"@aws-sdk/client-sts": "3.
|
|
23
|
-
"@aws-sdk/config-resolver": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
26
|
-
"@aws-sdk/hash-node": "3.
|
|
27
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
28
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
29
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
30
|
-
"@aws-sdk/middleware-logger": "3.
|
|
31
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
32
|
-
"@aws-sdk/middleware-retry": "3.
|
|
33
|
-
"@aws-sdk/middleware-serde": "3.
|
|
34
|
-
"@aws-sdk/middleware-signing": "3.
|
|
35
|
-
"@aws-sdk/middleware-stack": "3.
|
|
36
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
37
|
-
"@aws-sdk/node-config-provider": "3.
|
|
38
|
-
"@aws-sdk/node-http-handler": "3.
|
|
39
|
-
"@aws-sdk/protocol-http": "3.
|
|
40
|
-
"@aws-sdk/smithy-client": "3.
|
|
41
|
-
"@aws-sdk/types": "3.
|
|
42
|
-
"@aws-sdk/url-parser": "3.
|
|
43
|
-
"@aws-sdk/util-base64-browser": "3.
|
|
44
|
-
"@aws-sdk/util-base64-node": "3.
|
|
45
|
-
"@aws-sdk/util-body-length-browser": "3.
|
|
46
|
-
"@aws-sdk/util-body-length-node": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
48
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
50
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
51
|
-
"@aws-sdk/util-utf8-browser": "3.
|
|
52
|
-
"@aws-sdk/util-utf8-node": "3.
|
|
22
|
+
"@aws-sdk/client-sts": "3.190.0",
|
|
23
|
+
"@aws-sdk/config-resolver": "3.190.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.190.0",
|
|
25
|
+
"@aws-sdk/fetch-http-handler": "3.190.0",
|
|
26
|
+
"@aws-sdk/hash-node": "3.190.0",
|
|
27
|
+
"@aws-sdk/invalid-dependency": "3.190.0",
|
|
28
|
+
"@aws-sdk/middleware-content-length": "3.190.0",
|
|
29
|
+
"@aws-sdk/middleware-host-header": "3.190.0",
|
|
30
|
+
"@aws-sdk/middleware-logger": "3.190.0",
|
|
31
|
+
"@aws-sdk/middleware-recursion-detection": "3.190.0",
|
|
32
|
+
"@aws-sdk/middleware-retry": "3.190.0",
|
|
33
|
+
"@aws-sdk/middleware-serde": "3.190.0",
|
|
34
|
+
"@aws-sdk/middleware-signing": "3.190.0",
|
|
35
|
+
"@aws-sdk/middleware-stack": "3.190.0",
|
|
36
|
+
"@aws-sdk/middleware-user-agent": "3.190.0",
|
|
37
|
+
"@aws-sdk/node-config-provider": "3.190.0",
|
|
38
|
+
"@aws-sdk/node-http-handler": "3.190.0",
|
|
39
|
+
"@aws-sdk/protocol-http": "3.190.0",
|
|
40
|
+
"@aws-sdk/smithy-client": "3.190.0",
|
|
41
|
+
"@aws-sdk/types": "3.190.0",
|
|
42
|
+
"@aws-sdk/url-parser": "3.190.0",
|
|
43
|
+
"@aws-sdk/util-base64-browser": "3.188.0",
|
|
44
|
+
"@aws-sdk/util-base64-node": "3.188.0",
|
|
45
|
+
"@aws-sdk/util-body-length-browser": "3.188.0",
|
|
46
|
+
"@aws-sdk/util-body-length-node": "3.188.0",
|
|
47
|
+
"@aws-sdk/util-defaults-mode-browser": "3.190.0",
|
|
48
|
+
"@aws-sdk/util-defaults-mode-node": "3.190.0",
|
|
49
|
+
"@aws-sdk/util-user-agent-browser": "3.190.0",
|
|
50
|
+
"@aws-sdk/util-user-agent-node": "3.190.0",
|
|
51
|
+
"@aws-sdk/util-utf8-browser": "3.188.0",
|
|
52
|
+
"@aws-sdk/util-utf8-node": "3.188.0",
|
|
53
53
|
"tslib": "^2.3.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@aws-sdk/service-client-documentation-generator": "3.
|
|
56
|
+
"@aws-sdk/service-client-documentation-generator": "3.188.0",
|
|
57
57
|
"@tsconfig/recommended": "1.0.1",
|
|
58
58
|
"@types/node": "^12.7.5",
|
|
59
59
|
"concurrently": "7.0.0",
|