@aws-sdk/client-ivschat 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.
@@ -1,157 +1,208 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { IvschatServiceException as __BaseException } from "./IvschatServiceException";
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
- 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);
11
12
  }
12
- return AccessDeniedException;
13
- }(__BaseException));
14
- export { AccessDeniedException };
13
+ }
15
14
  export var ChatTokenCapability;
16
15
  (function (ChatTokenCapability) {
17
16
  ChatTokenCapability["DELETE_MESSAGE"] = "DELETE_MESSAGE";
18
17
  ChatTokenCapability["DISCONNECT_USER"] = "DISCONNECT_USER";
19
18
  ChatTokenCapability["SEND_MESSAGE"] = "SEND_MESSAGE";
20
19
  })(ChatTokenCapability || (ChatTokenCapability = {}));
21
- var PendingVerification = (function (_super) {
22
- __extends(PendingVerification, _super);
23
- function PendingVerification(opts) {
24
- var _this = _super.call(this, __assign({ name: "PendingVerification", $fault: "client" }, opts)) || this;
25
- _this.name = "PendingVerification";
26
- _this.$fault = "client";
27
- Object.setPrototypeOf(_this, PendingVerification.prototype);
28
- return _this;
20
+ export class PendingVerification extends __BaseException {
21
+ constructor(opts) {
22
+ super({
23
+ name: "PendingVerification",
24
+ $fault: "client",
25
+ ...opts,
26
+ });
27
+ this.name = "PendingVerification";
28
+ this.$fault = "client";
29
+ Object.setPrototypeOf(this, PendingVerification.prototype);
29
30
  }
30
- return PendingVerification;
31
- }(__BaseException));
32
- export { PendingVerification };
31
+ }
33
32
  export var ResourceType;
34
33
  (function (ResourceType) {
35
34
  ResourceType["ROOM"] = "ROOM";
36
35
  })(ResourceType || (ResourceType = {}));
37
- var ResourceNotFoundException = (function (_super) {
38
- __extends(ResourceNotFoundException, _super);
39
- function ResourceNotFoundException(opts) {
40
- var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
41
- _this.name = "ResourceNotFoundException";
42
- _this.$fault = "client";
43
- Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
44
- _this.resourceId = opts.resourceId;
45
- _this.resourceType = opts.resourceType;
46
- return _this;
36
+ export class ResourceNotFoundException extends __BaseException {
37
+ constructor(opts) {
38
+ super({
39
+ name: "ResourceNotFoundException",
40
+ $fault: "client",
41
+ ...opts,
42
+ });
43
+ this.name = "ResourceNotFoundException";
44
+ this.$fault = "client";
45
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
46
+ this.resourceId = opts.resourceId;
47
+ this.resourceType = opts.resourceType;
47
48
  }
48
- return ResourceNotFoundException;
49
- }(__BaseException));
50
- export { ResourceNotFoundException };
49
+ }
51
50
  export var ValidationExceptionReason;
52
51
  (function (ValidationExceptionReason) {
53
52
  ValidationExceptionReason["FIELD_VALIDATION_FAILED"] = "FIELD_VALIDATION_FAILED";
54
53
  ValidationExceptionReason["OTHER"] = "OTHER";
55
54
  ValidationExceptionReason["UNKNOWN_OPERATION"] = "UNKNOWN_OPERATION";
56
55
  })(ValidationExceptionReason || (ValidationExceptionReason = {}));
57
- var ValidationException = (function (_super) {
58
- __extends(ValidationException, _super);
59
- function ValidationException(opts) {
60
- var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
61
- _this.name = "ValidationException";
62
- _this.$fault = "client";
63
- Object.setPrototypeOf(_this, ValidationException.prototype);
64
- _this.reason = opts.reason;
65
- _this.fieldList = opts.fieldList;
66
- return _this;
56
+ export class ValidationException extends __BaseException {
57
+ constructor(opts) {
58
+ super({
59
+ name: "ValidationException",
60
+ $fault: "client",
61
+ ...opts,
62
+ });
63
+ this.name = "ValidationException";
64
+ this.$fault = "client";
65
+ Object.setPrototypeOf(this, ValidationException.prototype);
66
+ this.reason = opts.reason;
67
+ this.fieldList = opts.fieldList;
67
68
  }
68
- return ValidationException;
69
- }(__BaseException));
70
- export { ValidationException };
71
- var ConflictException = (function (_super) {
72
- __extends(ConflictException, _super);
73
- function ConflictException(opts) {
74
- var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
75
- _this.name = "ConflictException";
76
- _this.$fault = "client";
77
- Object.setPrototypeOf(_this, ConflictException.prototype);
78
- _this.resourceId = opts.resourceId;
79
- _this.resourceType = opts.resourceType;
80
- return _this;
69
+ }
70
+ export class ConflictException extends __BaseException {
71
+ constructor(opts) {
72
+ super({
73
+ name: "ConflictException",
74
+ $fault: "client",
75
+ ...opts,
76
+ });
77
+ this.name = "ConflictException";
78
+ this.$fault = "client";
79
+ Object.setPrototypeOf(this, ConflictException.prototype);
80
+ this.resourceId = opts.resourceId;
81
+ this.resourceType = opts.resourceType;
81
82
  }
82
- return ConflictException;
83
- }(__BaseException));
84
- export { ConflictException };
83
+ }
85
84
  export var FallbackResult;
86
85
  (function (FallbackResult) {
87
86
  FallbackResult["ALLOW"] = "ALLOW";
88
87
  FallbackResult["DENY"] = "DENY";
89
88
  })(FallbackResult || (FallbackResult = {}));
90
- var ServiceQuotaExceededException = (function (_super) {
91
- __extends(ServiceQuotaExceededException, _super);
92
- function ServiceQuotaExceededException(opts) {
93
- var _this = _super.call(this, __assign({ name: "ServiceQuotaExceededException", $fault: "client" }, opts)) || this;
94
- _this.name = "ServiceQuotaExceededException";
95
- _this.$fault = "client";
96
- Object.setPrototypeOf(_this, ServiceQuotaExceededException.prototype);
97
- _this.resourceId = opts.resourceId;
98
- _this.resourceType = opts.resourceType;
99
- _this.limit = opts.limit;
100
- return _this;
89
+ export class ServiceQuotaExceededException extends __BaseException {
90
+ constructor(opts) {
91
+ super({
92
+ name: "ServiceQuotaExceededException",
93
+ $fault: "client",
94
+ ...opts,
95
+ });
96
+ this.name = "ServiceQuotaExceededException";
97
+ this.$fault = "client";
98
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
99
+ this.resourceId = opts.resourceId;
100
+ this.resourceType = opts.resourceType;
101
+ this.limit = opts.limit;
101
102
  }
102
- return ServiceQuotaExceededException;
103
- }(__BaseException));
104
- export { ServiceQuotaExceededException };
105
- var ThrottlingException = (function (_super) {
106
- __extends(ThrottlingException, _super);
107
- function ThrottlingException(opts) {
108
- var _this = _super.call(this, __assign({ name: "ThrottlingException", $fault: "client" }, opts)) || this;
109
- _this.name = "ThrottlingException";
110
- _this.$fault = "client";
111
- Object.setPrototypeOf(_this, ThrottlingException.prototype);
112
- _this.resourceId = opts.resourceId;
113
- _this.resourceType = opts.resourceType;
114
- _this.limit = opts.limit;
115
- return _this;
103
+ }
104
+ export class ThrottlingException extends __BaseException {
105
+ constructor(opts) {
106
+ super({
107
+ name: "ThrottlingException",
108
+ $fault: "client",
109
+ ...opts,
110
+ });
111
+ this.name = "ThrottlingException";
112
+ this.$fault = "client";
113
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
114
+ this.resourceId = opts.resourceId;
115
+ this.resourceType = opts.resourceType;
116
+ this.limit = opts.limit;
116
117
  }
117
- return ThrottlingException;
118
- }(__BaseException));
119
- export { ThrottlingException };
120
- var InternalServerException = (function (_super) {
121
- __extends(InternalServerException, _super);
122
- function InternalServerException(opts) {
123
- var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
124
- _this.name = "InternalServerException";
125
- _this.$fault = "server";
126
- Object.setPrototypeOf(_this, InternalServerException.prototype);
127
- return _this;
118
+ }
119
+ export class InternalServerException extends __BaseException {
120
+ constructor(opts) {
121
+ super({
122
+ name: "InternalServerException",
123
+ $fault: "server",
124
+ ...opts,
125
+ });
126
+ this.name = "InternalServerException";
127
+ this.$fault = "server";
128
+ Object.setPrototypeOf(this, InternalServerException.prototype);
128
129
  }
129
- return InternalServerException;
130
- }(__BaseException));
131
- export { InternalServerException };
132
- export var CreateChatTokenRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
133
- export var CreateChatTokenResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
134
- export var ValidationExceptionFieldFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
135
- export var MessageReviewHandlerFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
136
- export var CreateRoomRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
137
- export var CreateRoomResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
138
- export var DeleteMessageRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
139
- export var DeleteMessageResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
140
- export var DeleteRoomRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
141
- export var DisconnectUserRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
142
- export var DisconnectUserResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
143
- export var GetRoomRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
144
- export var GetRoomResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
145
- export var ListRoomsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
146
- export var RoomSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
147
- export var ListRoomsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
148
- export var ListTagsForResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
149
- export var ListTagsForResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
150
- export var SendEventRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
151
- export var SendEventResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
152
- export var TagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
153
- export var TagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
154
- export var UntagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
155
- export var UntagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
156
- export var UpdateRoomRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
157
- export var UpdateRoomResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
130
+ }
131
+ export const CreateChatTokenRequestFilterSensitiveLog = (obj) => ({
132
+ ...obj,
133
+ });
134
+ export const CreateChatTokenResponseFilterSensitiveLog = (obj) => ({
135
+ ...obj,
136
+ });
137
+ export const ValidationExceptionFieldFilterSensitiveLog = (obj) => ({
138
+ ...obj,
139
+ });
140
+ export const MessageReviewHandlerFilterSensitiveLog = (obj) => ({
141
+ ...obj,
142
+ });
143
+ export const CreateRoomRequestFilterSensitiveLog = (obj) => ({
144
+ ...obj,
145
+ });
146
+ export const CreateRoomResponseFilterSensitiveLog = (obj) => ({
147
+ ...obj,
148
+ });
149
+ export const DeleteMessageRequestFilterSensitiveLog = (obj) => ({
150
+ ...obj,
151
+ });
152
+ export const DeleteMessageResponseFilterSensitiveLog = (obj) => ({
153
+ ...obj,
154
+ });
155
+ export const DeleteRoomRequestFilterSensitiveLog = (obj) => ({
156
+ ...obj,
157
+ });
158
+ export const DisconnectUserRequestFilterSensitiveLog = (obj) => ({
159
+ ...obj,
160
+ });
161
+ export const DisconnectUserResponseFilterSensitiveLog = (obj) => ({
162
+ ...obj,
163
+ });
164
+ export const GetRoomRequestFilterSensitiveLog = (obj) => ({
165
+ ...obj,
166
+ });
167
+ export const GetRoomResponseFilterSensitiveLog = (obj) => ({
168
+ ...obj,
169
+ });
170
+ export const ListRoomsRequestFilterSensitiveLog = (obj) => ({
171
+ ...obj,
172
+ });
173
+ export const RoomSummaryFilterSensitiveLog = (obj) => ({
174
+ ...obj,
175
+ });
176
+ export const ListRoomsResponseFilterSensitiveLog = (obj) => ({
177
+ ...obj,
178
+ });
179
+ export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
180
+ ...obj,
181
+ });
182
+ export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
183
+ ...obj,
184
+ });
185
+ export const SendEventRequestFilterSensitiveLog = (obj) => ({
186
+ ...obj,
187
+ });
188
+ export const SendEventResponseFilterSensitiveLog = (obj) => ({
189
+ ...obj,
190
+ });
191
+ export const TagResourceRequestFilterSensitiveLog = (obj) => ({
192
+ ...obj,
193
+ });
194
+ export const TagResourceResponseFilterSensitiveLog = (obj) => ({
195
+ ...obj,
196
+ });
197
+ export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
198
+ ...obj,
199
+ });
200
+ export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
201
+ ...obj,
202
+ });
203
+ export const UpdateRoomRequestFilterSensitiveLog = (obj) => ({
204
+ ...obj,
205
+ });
206
+ export const UpdateRoomResponseFilterSensitiveLog = (obj) => ({
207
+ ...obj,
208
+ });
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListRoomsCommand } from "../commands/ListRoomsCommand";
3
2
  import { Ivschat } from "../Ivschat";
4
3
  import { IvschatClient } from "../IvschatClient";
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 ListRoomsCommand(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 ListRoomsCommand(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.listRooms.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.listRooms(input, ...args);
32
9
  };
33
- export function paginateListRooms(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListRooms(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 Ivschat) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof IvschatClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected Ivschat | IvschatClient");
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 paginateListRooms_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 Ivschat)) 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 IvschatClient)) 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 Ivschat | IvschatClient");
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
  }