@aws-sdk/client-support 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/Support.js +58 -65
- package/dist-es/SupportClient.js +22 -28
- package/dist-es/commands/AddAttachmentsToSetCommand.js +21 -28
- package/dist-es/commands/AddCommunicationToCaseCommand.js +21 -28
- package/dist-es/commands/CreateCaseCommand.js +21 -28
- package/dist-es/commands/DescribeAttachmentCommand.js +21 -28
- package/dist-es/commands/DescribeCasesCommand.js +21 -28
- package/dist-es/commands/DescribeCommunicationsCommand.js +21 -28
- package/dist-es/commands/DescribeServicesCommand.js +21 -28
- package/dist-es/commands/DescribeSeverityLevelsCommand.js +21 -28
- package/dist-es/commands/DescribeTrustedAdvisorCheckRefreshStatusesCommand.js +21 -28
- package/dist-es/commands/DescribeTrustedAdvisorCheckResultCommand.js +21 -28
- package/dist-es/commands/DescribeTrustedAdvisorCheckSummariesCommand.js +21 -28
- package/dist-es/commands/DescribeTrustedAdvisorChecksCommand.js +21 -28
- package/dist-es/commands/RefreshTrustedAdvisorCheckCommand.js +21 -28
- package/dist-es/commands/ResolveCaseCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/SupportServiceException.js +5 -10
- package/dist-es/models/models_0.js +231 -144
- package/dist-es/pagination/DescribeCasesPaginator.js +25 -68
- package/dist-es/pagination/DescribeCommunicationsPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +950 -1212
- 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/dist-es/endpoints.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { getRegionInfo } from "@aws-sdk/config-resolver";
|
|
3
|
-
|
|
2
|
+
const regionHash = {
|
|
4
3
|
"aws-cn-global": {
|
|
5
4
|
variants: [
|
|
6
5
|
{
|
|
@@ -47,7 +46,7 @@ var regionHash = {
|
|
|
47
46
|
signingRegion: "us-gov-west-1",
|
|
48
47
|
},
|
|
49
48
|
};
|
|
50
|
-
|
|
49
|
+
const partitionHash = {
|
|
51
50
|
aws: {
|
|
52
51
|
regions: [
|
|
53
52
|
"af-south-1",
|
|
@@ -168,8 +167,9 @@ var partitionHash = {
|
|
|
168
167
|
],
|
|
169
168
|
},
|
|
170
169
|
};
|
|
171
|
-
export
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
170
|
+
export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
|
|
171
|
+
...options,
|
|
172
|
+
signingService: "support",
|
|
173
|
+
regionHash,
|
|
174
|
+
partitionHash,
|
|
175
|
+
});
|
|
@@ -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, SupportServiceException.prototype);
|
|
8
|
-
return _this;
|
|
2
|
+
export class SupportServiceException extends __ServiceException {
|
|
3
|
+
constructor(options) {
|
|
4
|
+
super(options);
|
|
5
|
+
Object.setPrototypeOf(this, SupportServiceException.prototype);
|
|
9
6
|
}
|
|
10
|
-
|
|
11
|
-
}(__ServiceException));
|
|
12
|
-
export { SupportServiceException };
|
|
7
|
+
}
|
|
@@ -1,154 +1,241 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
1
|
import { SupportServiceException as __BaseException } from "./SupportServiceException";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
export class AttachmentLimitExceeded extends __BaseException {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
super({
|
|
5
|
+
name: "AttachmentLimitExceeded",
|
|
6
|
+
$fault: "client",
|
|
7
|
+
...opts,
|
|
8
|
+
});
|
|
9
|
+
this.name = "AttachmentLimitExceeded";
|
|
10
|
+
this.$fault = "client";
|
|
11
|
+
Object.setPrototypeOf(this, AttachmentLimitExceeded.prototype);
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
}
|
|
14
|
+
export class AttachmentSetExpired extends __BaseException {
|
|
15
|
+
constructor(opts) {
|
|
16
|
+
super({
|
|
17
|
+
name: "AttachmentSetExpired",
|
|
18
|
+
$fault: "client",
|
|
19
|
+
...opts,
|
|
20
|
+
});
|
|
21
|
+
this.name = "AttachmentSetExpired";
|
|
22
|
+
this.$fault = "client";
|
|
23
|
+
Object.setPrototypeOf(this, AttachmentSetExpired.prototype);
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
}
|
|
26
|
+
export class AttachmentSetIdNotFound extends __BaseException {
|
|
27
|
+
constructor(opts) {
|
|
28
|
+
super({
|
|
29
|
+
name: "AttachmentSetIdNotFound",
|
|
30
|
+
$fault: "client",
|
|
31
|
+
...opts,
|
|
32
|
+
});
|
|
33
|
+
this.name = "AttachmentSetIdNotFound";
|
|
34
|
+
this.$fault = "client";
|
|
35
|
+
Object.setPrototypeOf(this, AttachmentSetIdNotFound.prototype);
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
}
|
|
38
|
+
export class AttachmentSetSizeLimitExceeded extends __BaseException {
|
|
39
|
+
constructor(opts) {
|
|
40
|
+
super({
|
|
41
|
+
name: "AttachmentSetSizeLimitExceeded",
|
|
42
|
+
$fault: "client",
|
|
43
|
+
...opts,
|
|
44
|
+
});
|
|
45
|
+
this.name = "AttachmentSetSizeLimitExceeded";
|
|
46
|
+
this.$fault = "client";
|
|
47
|
+
Object.setPrototypeOf(this, AttachmentSetSizeLimitExceeded.prototype);
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
49
|
+
}
|
|
50
|
+
export class InternalServerError extends __BaseException {
|
|
51
|
+
constructor(opts) {
|
|
52
|
+
super({
|
|
53
|
+
name: "InternalServerError",
|
|
54
|
+
$fault: "server",
|
|
55
|
+
...opts,
|
|
56
|
+
});
|
|
57
|
+
this.name = "InternalServerError";
|
|
58
|
+
this.$fault = "server";
|
|
59
|
+
Object.setPrototypeOf(this, InternalServerError.prototype);
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
61
|
+
}
|
|
62
|
+
export class CaseIdNotFound extends __BaseException {
|
|
63
|
+
constructor(opts) {
|
|
64
|
+
super({
|
|
65
|
+
name: "CaseIdNotFound",
|
|
66
|
+
$fault: "client",
|
|
67
|
+
...opts,
|
|
68
|
+
});
|
|
69
|
+
this.name = "CaseIdNotFound";
|
|
70
|
+
this.$fault = "client";
|
|
71
|
+
Object.setPrototypeOf(this, CaseIdNotFound.prototype);
|
|
71
72
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
}
|
|
74
|
+
export class AttachmentIdNotFound extends __BaseException {
|
|
75
|
+
constructor(opts) {
|
|
76
|
+
super({
|
|
77
|
+
name: "AttachmentIdNotFound",
|
|
78
|
+
$fault: "client",
|
|
79
|
+
...opts,
|
|
80
|
+
});
|
|
81
|
+
this.name = "AttachmentIdNotFound";
|
|
82
|
+
this.$fault = "client";
|
|
83
|
+
Object.setPrototypeOf(this, AttachmentIdNotFound.prototype);
|
|
83
84
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
85
|
+
}
|
|
86
|
+
export class CaseCreationLimitExceeded extends __BaseException {
|
|
87
|
+
constructor(opts) {
|
|
88
|
+
super({
|
|
89
|
+
name: "CaseCreationLimitExceeded",
|
|
90
|
+
$fault: "client",
|
|
91
|
+
...opts,
|
|
92
|
+
});
|
|
93
|
+
this.name = "CaseCreationLimitExceeded";
|
|
94
|
+
this.$fault = "client";
|
|
95
|
+
Object.setPrototypeOf(this, CaseCreationLimitExceeded.prototype);
|
|
95
96
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
97
|
+
}
|
|
98
|
+
export class DescribeAttachmentLimitExceeded extends __BaseException {
|
|
99
|
+
constructor(opts) {
|
|
100
|
+
super({
|
|
101
|
+
name: "DescribeAttachmentLimitExceeded",
|
|
102
|
+
$fault: "client",
|
|
103
|
+
...opts,
|
|
104
|
+
});
|
|
105
|
+
this.name = "DescribeAttachmentLimitExceeded";
|
|
106
|
+
this.$fault = "client";
|
|
107
|
+
Object.setPrototypeOf(this, DescribeAttachmentLimitExceeded.prototype);
|
|
107
108
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
export
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
export
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
export
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
export
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
export
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
export
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
export
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
export
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
export
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
export
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
export
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
export
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
export
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
export
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
export
|
|
109
|
+
}
|
|
110
|
+
export const AttachmentFilterSensitiveLog = (obj) => ({
|
|
111
|
+
...obj,
|
|
112
|
+
});
|
|
113
|
+
export const AddAttachmentsToSetRequestFilterSensitiveLog = (obj) => ({
|
|
114
|
+
...obj,
|
|
115
|
+
});
|
|
116
|
+
export const AddAttachmentsToSetResponseFilterSensitiveLog = (obj) => ({
|
|
117
|
+
...obj,
|
|
118
|
+
});
|
|
119
|
+
export const AddCommunicationToCaseRequestFilterSensitiveLog = (obj) => ({
|
|
120
|
+
...obj,
|
|
121
|
+
});
|
|
122
|
+
export const AddCommunicationToCaseResponseFilterSensitiveLog = (obj) => ({
|
|
123
|
+
...obj,
|
|
124
|
+
});
|
|
125
|
+
export const AttachmentDetailsFilterSensitiveLog = (obj) => ({
|
|
126
|
+
...obj,
|
|
127
|
+
});
|
|
128
|
+
export const CreateCaseRequestFilterSensitiveLog = (obj) => ({
|
|
129
|
+
...obj,
|
|
130
|
+
});
|
|
131
|
+
export const CreateCaseResponseFilterSensitiveLog = (obj) => ({
|
|
132
|
+
...obj,
|
|
133
|
+
});
|
|
134
|
+
export const DescribeAttachmentRequestFilterSensitiveLog = (obj) => ({
|
|
135
|
+
...obj,
|
|
136
|
+
});
|
|
137
|
+
export const DescribeAttachmentResponseFilterSensitiveLog = (obj) => ({
|
|
138
|
+
...obj,
|
|
139
|
+
});
|
|
140
|
+
export const DescribeCasesRequestFilterSensitiveLog = (obj) => ({
|
|
141
|
+
...obj,
|
|
142
|
+
});
|
|
143
|
+
export const CommunicationFilterSensitiveLog = (obj) => ({
|
|
144
|
+
...obj,
|
|
145
|
+
});
|
|
146
|
+
export const RecentCaseCommunicationsFilterSensitiveLog = (obj) => ({
|
|
147
|
+
...obj,
|
|
148
|
+
});
|
|
149
|
+
export const CaseDetailsFilterSensitiveLog = (obj) => ({
|
|
150
|
+
...obj,
|
|
151
|
+
});
|
|
152
|
+
export const DescribeCasesResponseFilterSensitiveLog = (obj) => ({
|
|
153
|
+
...obj,
|
|
154
|
+
});
|
|
155
|
+
export const DescribeCommunicationsRequestFilterSensitiveLog = (obj) => ({
|
|
156
|
+
...obj,
|
|
157
|
+
});
|
|
158
|
+
export const DescribeCommunicationsResponseFilterSensitiveLog = (obj) => ({
|
|
159
|
+
...obj,
|
|
160
|
+
});
|
|
161
|
+
export const DescribeServicesRequestFilterSensitiveLog = (obj) => ({
|
|
162
|
+
...obj,
|
|
163
|
+
});
|
|
164
|
+
export const CategoryFilterSensitiveLog = (obj) => ({
|
|
165
|
+
...obj,
|
|
166
|
+
});
|
|
167
|
+
export const ServiceFilterSensitiveLog = (obj) => ({
|
|
168
|
+
...obj,
|
|
169
|
+
});
|
|
170
|
+
export const DescribeServicesResponseFilterSensitiveLog = (obj) => ({
|
|
171
|
+
...obj,
|
|
172
|
+
});
|
|
173
|
+
export const DescribeSeverityLevelsRequestFilterSensitiveLog = (obj) => ({
|
|
174
|
+
...obj,
|
|
175
|
+
});
|
|
176
|
+
export const SeverityLevelFilterSensitiveLog = (obj) => ({
|
|
177
|
+
...obj,
|
|
178
|
+
});
|
|
179
|
+
export const DescribeSeverityLevelsResponseFilterSensitiveLog = (obj) => ({
|
|
180
|
+
...obj,
|
|
181
|
+
});
|
|
182
|
+
export const DescribeTrustedAdvisorCheckRefreshStatusesRequestFilterSensitiveLog = (obj) => ({
|
|
183
|
+
...obj,
|
|
184
|
+
});
|
|
185
|
+
export const TrustedAdvisorCheckRefreshStatusFilterSensitiveLog = (obj) => ({
|
|
186
|
+
...obj,
|
|
187
|
+
});
|
|
188
|
+
export const DescribeTrustedAdvisorCheckRefreshStatusesResponseFilterSensitiveLog = (obj) => ({
|
|
189
|
+
...obj,
|
|
190
|
+
});
|
|
191
|
+
export const DescribeTrustedAdvisorCheckResultRequestFilterSensitiveLog = (obj) => ({
|
|
192
|
+
...obj,
|
|
193
|
+
});
|
|
194
|
+
export const TrustedAdvisorCostOptimizingSummaryFilterSensitiveLog = (obj) => ({
|
|
195
|
+
...obj,
|
|
196
|
+
});
|
|
197
|
+
export const TrustedAdvisorCategorySpecificSummaryFilterSensitiveLog = (obj) => ({
|
|
198
|
+
...obj,
|
|
199
|
+
});
|
|
200
|
+
export const TrustedAdvisorResourceDetailFilterSensitiveLog = (obj) => ({
|
|
201
|
+
...obj,
|
|
202
|
+
});
|
|
203
|
+
export const TrustedAdvisorResourcesSummaryFilterSensitiveLog = (obj) => ({
|
|
204
|
+
...obj,
|
|
205
|
+
});
|
|
206
|
+
export const TrustedAdvisorCheckResultFilterSensitiveLog = (obj) => ({
|
|
207
|
+
...obj,
|
|
208
|
+
});
|
|
209
|
+
export const DescribeTrustedAdvisorCheckResultResponseFilterSensitiveLog = (obj) => ({
|
|
210
|
+
...obj,
|
|
211
|
+
});
|
|
212
|
+
export const DescribeTrustedAdvisorChecksRequestFilterSensitiveLog = (obj) => ({
|
|
213
|
+
...obj,
|
|
214
|
+
});
|
|
215
|
+
export const TrustedAdvisorCheckDescriptionFilterSensitiveLog = (obj) => ({
|
|
216
|
+
...obj,
|
|
217
|
+
});
|
|
218
|
+
export const DescribeTrustedAdvisorChecksResponseFilterSensitiveLog = (obj) => ({
|
|
219
|
+
...obj,
|
|
220
|
+
});
|
|
221
|
+
export const DescribeTrustedAdvisorCheckSummariesRequestFilterSensitiveLog = (obj) => ({
|
|
222
|
+
...obj,
|
|
223
|
+
});
|
|
224
|
+
export const TrustedAdvisorCheckSummaryFilterSensitiveLog = (obj) => ({
|
|
225
|
+
...obj,
|
|
226
|
+
});
|
|
227
|
+
export const DescribeTrustedAdvisorCheckSummariesResponseFilterSensitiveLog = (obj) => ({
|
|
228
|
+
...obj,
|
|
229
|
+
});
|
|
230
|
+
export const RefreshTrustedAdvisorCheckRequestFilterSensitiveLog = (obj) => ({
|
|
231
|
+
...obj,
|
|
232
|
+
});
|
|
233
|
+
export const RefreshTrustedAdvisorCheckResponseFilterSensitiveLog = (obj) => ({
|
|
234
|
+
...obj,
|
|
235
|
+
});
|
|
236
|
+
export const ResolveCaseRequestFilterSensitiveLog = (obj) => ({
|
|
237
|
+
...obj,
|
|
238
|
+
});
|
|
239
|
+
export const ResolveCaseResponseFilterSensitiveLog = (obj) => ({
|
|
240
|
+
...obj,
|
|
241
|
+
});
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { DescribeCasesCommand, } from "../commands/DescribeCasesCommand";
|
|
3
2
|
import { Support } from "../Support";
|
|
4
3
|
import { SupportClient } from "../SupportClient";
|
|
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 DescribeCasesCommand(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 DescribeCasesCommand(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.describeCases.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.describeCases(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateDescribeCases(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateDescribeCases(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 Support) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof SupportClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected Support | SupportClient");
|
|
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 Support)) 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 SupportClient)) 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 Support | SupportClient");
|
|
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,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { DescribeCommunicationsCommand, } from "../commands/DescribeCommunicationsCommand";
|
|
3
2
|
import { Support } from "../Support";
|
|
4
3
|
import { SupportClient } from "../SupportClient";
|
|
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 DescribeCommunicationsCommand(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 DescribeCommunicationsCommand(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.describeCommunications.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.describeCommunications(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateDescribeCommunications(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateDescribeCommunications(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 Support) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof SupportClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected Support | SupportClient");
|
|
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 Support)) 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 SupportClient)) 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 Support | SupportClient");
|
|
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
|
}
|