@aws-sdk/client-connectparticipant 3.185.0 → 3.188.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.
@@ -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 { SendMessageRequestFilterSensitiveLog, SendMessageResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1SendMessageCommand, serializeAws_restJson1SendMessageCommand, } from "../protocols/Aws_restJson1";
6
- var SendMessageCommand = (function (_super) {
7
- __extends(SendMessageCommand, _super);
8
- function SendMessageCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class SendMessageCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- SendMessageCommand.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 = "ConnectParticipantClient";
18
- var commandName = "SendMessageCommand";
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 = "ConnectParticipantClient";
15
+ const commandName = "SendMessageCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: SendMessageRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: SendMessageResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- SendMessageCommand.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_restJson1SendMessageCommand(input, context);
33
- };
34
- SendMessageCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1SendMessageCommand(output, context);
36
- };
37
- return SendMessageCommand;
38
- }($Command));
39
- export { SendMessageCommand };
31
+ }
32
+ }
@@ -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 { StartAttachmentUploadRequestFilterSensitiveLog, StartAttachmentUploadResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1StartAttachmentUploadCommand, serializeAws_restJson1StartAttachmentUploadCommand, } from "../protocols/Aws_restJson1";
6
- var StartAttachmentUploadCommand = (function (_super) {
7
- __extends(StartAttachmentUploadCommand, _super);
8
- function StartAttachmentUploadCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class StartAttachmentUploadCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- StartAttachmentUploadCommand.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 = "ConnectParticipantClient";
18
- var commandName = "StartAttachmentUploadCommand";
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 = "ConnectParticipantClient";
15
+ const commandName = "StartAttachmentUploadCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: StartAttachmentUploadRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: StartAttachmentUploadResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- StartAttachmentUploadCommand.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_restJson1StartAttachmentUploadCommand(input, context);
33
- };
34
- StartAttachmentUploadCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1StartAttachmentUploadCommand(output, context);
36
- };
37
- return StartAttachmentUploadCommand;
38
- }($Command));
39
- export { StartAttachmentUploadCommand };
31
+ }
32
+ }
@@ -1,6 +1,5 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
- var regionHash = {
2
+ const regionHash = {
4
3
  "us-east-1": {
5
4
  variants: [
6
5
  {
@@ -27,7 +26,7 @@ var regionHash = {
27
26
  ],
28
27
  },
29
28
  };
30
- var partitionHash = {
29
+ const partitionHash = {
31
30
  aws: {
32
31
  regions: [
33
32
  "af-south-1",
@@ -149,8 +148,9 @@ var partitionHash = {
149
148
  ],
150
149
  },
151
150
  };
152
- export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
153
- return __generator(this, function (_a) {
154
- return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "execute-api", regionHash: regionHash, partitionHash: partitionHash }))];
155
- });
156
- }); };
151
+ export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
152
+ ...options,
153
+ signingService: "execute-api",
154
+ regionHash,
155
+ partitionHash,
156
+ });
@@ -1,12 +1,7 @@
1
- import { __extends } from "tslib";
2
1
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
- var ConnectParticipantServiceException = (function (_super) {
4
- __extends(ConnectParticipantServiceException, _super);
5
- function ConnectParticipantServiceException(options) {
6
- var _this = _super.call(this, options) || this;
7
- Object.setPrototypeOf(_this, ConnectParticipantServiceException.prototype);
8
- return _this;
2
+ export class ConnectParticipantServiceException extends __ServiceException {
3
+ constructor(options) {
4
+ super(options);
5
+ Object.setPrototypeOf(this, ConnectParticipantServiceException.prototype);
9
6
  }
10
- return ConnectParticipantServiceException;
11
- }(__ServiceException));
12
- export { ConnectParticipantServiceException };
7
+ }
@@ -1,83 +1,82 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { ConnectParticipantServiceException as __BaseException } from "./ConnectParticipantServiceException";
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 ConflictException = (function (_super) {
17
- __extends(ConflictException, _super);
18
- function ConflictException(opts) {
19
- var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
20
- _this.name = "ConflictException";
21
- _this.$fault = "client";
22
- Object.setPrototypeOf(_this, ConflictException.prototype);
23
- _this.Message = opts.Message;
24
- return _this;
14
+ }
15
+ export class ConflictException extends __BaseException {
16
+ constructor(opts) {
17
+ super({
18
+ name: "ConflictException",
19
+ $fault: "client",
20
+ ...opts,
21
+ });
22
+ this.name = "ConflictException";
23
+ this.$fault = "client";
24
+ Object.setPrototypeOf(this, ConflictException.prototype);
25
+ this.Message = opts.Message;
25
26
  }
26
- return ConflictException;
27
- }(__BaseException));
28
- export { ConflictException };
29
- var InternalServerException = (function (_super) {
30
- __extends(InternalServerException, _super);
31
- function InternalServerException(opts) {
32
- var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
33
- _this.name = "InternalServerException";
34
- _this.$fault = "server";
35
- Object.setPrototypeOf(_this, InternalServerException.prototype);
36
- _this.Message = opts.Message;
37
- return _this;
27
+ }
28
+ export class InternalServerException extends __BaseException {
29
+ constructor(opts) {
30
+ super({
31
+ name: "InternalServerException",
32
+ $fault: "server",
33
+ ...opts,
34
+ });
35
+ this.name = "InternalServerException";
36
+ this.$fault = "server";
37
+ Object.setPrototypeOf(this, InternalServerException.prototype);
38
+ this.Message = opts.Message;
38
39
  }
39
- return InternalServerException;
40
- }(__BaseException));
41
- export { InternalServerException };
42
- var ServiceQuotaExceededException = (function (_super) {
43
- __extends(ServiceQuotaExceededException, _super);
44
- function ServiceQuotaExceededException(opts) {
45
- var _this = _super.call(this, __assign({ name: "ServiceQuotaExceededException", $fault: "client" }, opts)) || this;
46
- _this.name = "ServiceQuotaExceededException";
47
- _this.$fault = "client";
48
- Object.setPrototypeOf(_this, ServiceQuotaExceededException.prototype);
49
- _this.Message = opts.Message;
50
- return _this;
40
+ }
41
+ export class ServiceQuotaExceededException extends __BaseException {
42
+ constructor(opts) {
43
+ super({
44
+ name: "ServiceQuotaExceededException",
45
+ $fault: "client",
46
+ ...opts,
47
+ });
48
+ this.name = "ServiceQuotaExceededException";
49
+ this.$fault = "client";
50
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
51
+ this.Message = opts.Message;
51
52
  }
52
- return ServiceQuotaExceededException;
53
- }(__BaseException));
54
- export { ServiceQuotaExceededException };
55
- var ThrottlingException = (function (_super) {
56
- __extends(ThrottlingException, _super);
57
- function ThrottlingException(opts) {
58
- var _this = _super.call(this, __assign({ name: "ThrottlingException", $fault: "client" }, opts)) || this;
59
- _this.name = "ThrottlingException";
60
- _this.$fault = "client";
61
- Object.setPrototypeOf(_this, ThrottlingException.prototype);
62
- _this.Message = opts.Message;
63
- return _this;
53
+ }
54
+ export class ThrottlingException extends __BaseException {
55
+ constructor(opts) {
56
+ super({
57
+ name: "ThrottlingException",
58
+ $fault: "client",
59
+ ...opts,
60
+ });
61
+ this.name = "ThrottlingException";
62
+ this.$fault = "client";
63
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
64
+ this.Message = opts.Message;
64
65
  }
65
- return ThrottlingException;
66
- }(__BaseException));
67
- export { ThrottlingException };
68
- var ValidationException = (function (_super) {
69
- __extends(ValidationException, _super);
70
- function ValidationException(opts) {
71
- var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
72
- _this.name = "ValidationException";
73
- _this.$fault = "client";
74
- Object.setPrototypeOf(_this, ValidationException.prototype);
75
- _this.Message = opts.Message;
76
- return _this;
66
+ }
67
+ export class ValidationException extends __BaseException {
68
+ constructor(opts) {
69
+ super({
70
+ name: "ValidationException",
71
+ $fault: "client",
72
+ ...opts,
73
+ });
74
+ this.name = "ValidationException";
75
+ this.$fault = "client";
76
+ Object.setPrototypeOf(this, ValidationException.prototype);
77
+ this.Message = opts.Message;
77
78
  }
78
- return ValidationException;
79
- }(__BaseException));
80
- export { ValidationException };
79
+ }
81
80
  export var ConnectionType;
82
81
  (function (ConnectionType) {
83
82
  ConnectionType["CONNECTION_CREDENTIALS"] = "CONNECTION_CREDENTIALS";
@@ -118,25 +117,69 @@ export var ChatItemType;
118
117
  ChatItemType["TRANSFER_SUCCEEDED"] = "TRANSFER_SUCCEEDED";
119
118
  ChatItemType["TYPING"] = "TYPING";
120
119
  })(ChatItemType || (ChatItemType = {}));
121
- export var CompleteAttachmentUploadRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
122
- export var CompleteAttachmentUploadResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
123
- export var CreateParticipantConnectionRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
124
- export var ConnectionCredentialsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
125
- export var WebsocketFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
126
- export var CreateParticipantConnectionResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
127
- export var DisconnectParticipantRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
128
- export var DisconnectParticipantResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
129
- export var GetAttachmentRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
130
- export var GetAttachmentResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
131
- export var StartPositionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
132
- export var GetTranscriptRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
133
- export var AttachmentItemFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
134
- export var ItemFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
135
- export var GetTranscriptResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
136
- export var SendEventRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
137
- export var SendEventResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
138
- export var SendMessageRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
139
- export var SendMessageResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
140
- export var StartAttachmentUploadRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
141
- export var UploadMetadataFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
142
- export var StartAttachmentUploadResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
120
+ export const CompleteAttachmentUploadRequestFilterSensitiveLog = (obj) => ({
121
+ ...obj,
122
+ });
123
+ export const CompleteAttachmentUploadResponseFilterSensitiveLog = (obj) => ({
124
+ ...obj,
125
+ });
126
+ export const CreateParticipantConnectionRequestFilterSensitiveLog = (obj) => ({
127
+ ...obj,
128
+ });
129
+ export const ConnectionCredentialsFilterSensitiveLog = (obj) => ({
130
+ ...obj,
131
+ });
132
+ export const WebsocketFilterSensitiveLog = (obj) => ({
133
+ ...obj,
134
+ });
135
+ export const CreateParticipantConnectionResponseFilterSensitiveLog = (obj) => ({
136
+ ...obj,
137
+ });
138
+ export const DisconnectParticipantRequestFilterSensitiveLog = (obj) => ({
139
+ ...obj,
140
+ });
141
+ export const DisconnectParticipantResponseFilterSensitiveLog = (obj) => ({
142
+ ...obj,
143
+ });
144
+ export const GetAttachmentRequestFilterSensitiveLog = (obj) => ({
145
+ ...obj,
146
+ });
147
+ export const GetAttachmentResponseFilterSensitiveLog = (obj) => ({
148
+ ...obj,
149
+ });
150
+ export const StartPositionFilterSensitiveLog = (obj) => ({
151
+ ...obj,
152
+ });
153
+ export const GetTranscriptRequestFilterSensitiveLog = (obj) => ({
154
+ ...obj,
155
+ });
156
+ export const AttachmentItemFilterSensitiveLog = (obj) => ({
157
+ ...obj,
158
+ });
159
+ export const ItemFilterSensitiveLog = (obj) => ({
160
+ ...obj,
161
+ });
162
+ export const GetTranscriptResponseFilterSensitiveLog = (obj) => ({
163
+ ...obj,
164
+ });
165
+ export const SendEventRequestFilterSensitiveLog = (obj) => ({
166
+ ...obj,
167
+ });
168
+ export const SendEventResponseFilterSensitiveLog = (obj) => ({
169
+ ...obj,
170
+ });
171
+ export const SendMessageRequestFilterSensitiveLog = (obj) => ({
172
+ ...obj,
173
+ });
174
+ export const SendMessageResponseFilterSensitiveLog = (obj) => ({
175
+ ...obj,
176
+ });
177
+ export const StartAttachmentUploadRequestFilterSensitiveLog = (obj) => ({
178
+ ...obj,
179
+ });
180
+ export const UploadMetadataFilterSensitiveLog = (obj) => ({
181
+ ...obj,
182
+ });
183
+ export const StartAttachmentUploadResponseFilterSensitiveLog = (obj) => ({
184
+ ...obj,
185
+ });
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { GetTranscriptCommand, } from "../commands/GetTranscriptCommand";
3
2
  import { ConnectParticipant } from "../ConnectParticipant";
4
3
  import { ConnectParticipantClient } from "../ConnectParticipantClient";
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 GetTranscriptCommand(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 GetTranscriptCommand(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.getTranscript.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.getTranscript(input, ...args);
32
9
  };
33
- export function paginateGetTranscript(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateGetTranscript(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 ConnectParticipant) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof ConnectParticipantClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected ConnectParticipant | ConnectParticipantClient");
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 paginateGetTranscript_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 ConnectParticipant)) 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 ConnectParticipantClient)) 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 ConnectParticipant | ConnectParticipantClient");
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
  }