@aws-sdk/client-connect-contact-lens 3.180.0 → 3.183.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
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.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-connect-contact-lens
9
+
10
+
11
+
12
+
13
+
14
+ # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
20
+ * **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
7
27
 
8
28
  **Note:** Version bump only for package @aws-sdk/client-connect-contact-lens
@@ -50,7 +50,7 @@ exports.deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand = des
50
50
  const deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommandError = async (output, context) => {
51
51
  const parsedOutput = {
52
52
  ...output,
53
- body: await parseBody(output.body, context),
53
+ body: await parseErrorBody(output.body, context),
54
54
  };
55
55
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
56
56
  switch (errorCode) {
@@ -278,6 +278,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
278
278
  }
279
279
  return {};
280
280
  });
281
+ const parseErrorBody = async (errorBody, context) => {
282
+ var _a;
283
+ const value = await parseBody(errorBody, context);
284
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
285
+ return value;
286
+ };
281
287
  const loadRestJsonErrorCode = (output, data) => {
282
288
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
283
289
  const sanitizeErrorCode = (rawValue) => {
@@ -1,25 +1,18 @@
1
- import { __extends } from "tslib";
2
1
  import { ListRealtimeContactAnalysisSegmentsCommand, } from "./commands/ListRealtimeContactAnalysisSegmentsCommand";
3
2
  import { ConnectContactLensClient } from "./ConnectContactLensClient";
4
- var ConnectContactLens = (function (_super) {
5
- __extends(ConnectContactLens, _super);
6
- function ConnectContactLens() {
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- return ConnectContactLens;
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
- var ConnectContactLensClient = (function (_super) {
13
- __extends(ConnectContactLensClient, _super);
14
- function ConnectContactLensClient(configuration) {
15
- var _this = this;
16
- var _config_0 = __getRuntimeConfig(configuration);
17
- var _config_1 = resolveRegionConfig(_config_0);
18
- var _config_2 = resolveEndpointsConfig(_config_1);
19
- var _config_3 = resolveRetryConfig(_config_2);
20
- var _config_4 = resolveHostHeaderConfig(_config_3);
21
- var _config_5 = resolveAwsAuthConfig(_config_4);
22
- var _config_6 = resolveUserAgentConfig(_config_5);
23
- _this = _super.call(this, _config_6) || this;
24
- _this.config = _config_6;
25
- _this.middlewareStack.use(getRetryPlugin(_this.config));
26
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
27
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
28
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
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
- ConnectContactLensClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return ConnectContactLensClient;
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
- var ListRealtimeContactAnalysisSegmentsCommand = (function (_super) {
7
- __extends(ListRealtimeContactAnalysisSegmentsCommand, _super);
8
- function ListRealtimeContactAnalysisSegmentsCommand(input) {
9
- var _this = _super.call(this) || this;
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
- ListRealtimeContactAnalysisSegmentsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "ConnectContactLensClient";
18
- var commandName = "ListRealtimeContactAnalysisSegmentsCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: 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
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
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
- ListRealtimeContactAnalysisSegmentsCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1ListRealtimeContactAnalysisSegmentsCommand(output, context);
36
- };
37
- return ListRealtimeContactAnalysisSegmentsCommand;
38
- }($Command));
39
- export { ListRealtimeContactAnalysisSegmentsCommand };
31
+ }
32
+ }
@@ -1,7 +1,6 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
- var regionHash = {};
4
- var partitionHash = {
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 var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
125
- return __generator(this, function (_a) {
126
- return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "connect", regionHash: regionHash, partitionHash: partitionHash }))];
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
- var ConnectContactLensServiceException = (function (_super) {
4
- __extends(ConnectContactLensServiceException, _super);
5
- function ConnectContactLensServiceException(options) {
6
- var _this = _super.call(this, options) || this;
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
- return ConnectContactLensServiceException;
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
- var AccessDeniedException = (function (_super) {
4
- __extends(AccessDeniedException, _super);
5
- function AccessDeniedException(opts) {
6
- var _this = _super.call(this, __assign({ name: "AccessDeniedException", $fault: "client" }, opts)) || this;
7
- _this.name = "AccessDeniedException";
8
- _this.$fault = "client";
9
- Object.setPrototypeOf(_this, AccessDeniedException.prototype);
10
- _this.Message = opts.Message;
11
- return _this;
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
- return AccessDeniedException;
14
- }(__BaseException));
15
- export { AccessDeniedException };
16
- var InternalServiceException = (function (_super) {
17
- __extends(InternalServiceException, _super);
18
- function InternalServiceException(opts) {
19
- var _this = _super.call(this, __assign({ name: "InternalServiceException", $fault: "server" }, opts)) || this;
20
- _this.name = "InternalServiceException";
21
- _this.$fault = "server";
22
- Object.setPrototypeOf(_this, InternalServiceException.prototype);
23
- _this.Message = opts.Message;
24
- return _this;
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
- return InternalServiceException;
27
- }(__BaseException));
28
- export { InternalServiceException };
29
- var InvalidRequestException = (function (_super) {
30
- __extends(InvalidRequestException, _super);
31
- function InvalidRequestException(opts) {
32
- var _this = _super.call(this, __assign({ name: "InvalidRequestException", $fault: "client" }, opts)) || this;
33
- _this.name = "InvalidRequestException";
34
- _this.$fault = "client";
35
- Object.setPrototypeOf(_this, InvalidRequestException.prototype);
36
- _this.Message = opts.Message;
37
- return _this;
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
- return InvalidRequestException;
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
- var ResourceNotFoundException = (function (_super) {
49
- __extends(ResourceNotFoundException, _super);
50
- function ResourceNotFoundException(opts) {
51
- var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
52
- _this.name = "ResourceNotFoundException";
53
- _this.$fault = "client";
54
- Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
55
- _this.Message = opts.Message;
56
- return _this;
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
- return ResourceNotFoundException;
59
- }(__BaseException));
60
- export { ResourceNotFoundException };
61
- var ThrottlingException = (function (_super) {
62
- __extends(ThrottlingException, _super);
63
- function ThrottlingException(opts) {
64
- var _this = _super.call(this, __assign({ name: "ThrottlingException", $fault: "client" }, opts)) || this;
65
- _this.name = "ThrottlingException";
66
- _this.$fault = "client";
67
- Object.setPrototypeOf(_this, ThrottlingException.prototype);
68
- _this.Message = opts.Message;
69
- return _this;
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
- return ThrottlingException;
72
- }(__BaseException));
73
- export { ThrottlingException };
74
- export var ListRealtimeContactAnalysisSegmentsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
75
- export var PointOfInterestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
76
- export var CategoryDetailsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
77
- export var CategoriesFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
78
- export var CharacterOffsetsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
79
- export var IssueDetectedFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
80
- export var TranscriptFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
81
- export var RealtimeContactAnalysisSegmentFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
82
- export var ListRealtimeContactAnalysisSegmentsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
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
- var makePagedClientRequest = function (client, input) {
6
- var args = [];
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
- var makePagedRequest = function (client, input) {
20
- var args = [];
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
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
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 __asyncGenerator(this, arguments, function paginateListRealtimeContactAnalysisSegments_1() {
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
  }