@aws-sdk/client-serverlessapplicationrepository 3.181.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 +8 -0
- package/dist-es/ServerlessApplicationRepository.js +58 -65
- package/dist-es/ServerlessApplicationRepositoryClient.js +22 -28
- package/dist-es/commands/CreateApplicationCommand.js +21 -28
- package/dist-es/commands/CreateApplicationVersionCommand.js +21 -28
- package/dist-es/commands/CreateCloudFormationChangeSetCommand.js +21 -28
- package/dist-es/commands/CreateCloudFormationTemplateCommand.js +21 -28
- package/dist-es/commands/DeleteApplicationCommand.js +22 -29
- package/dist-es/commands/GetApplicationCommand.js +21 -28
- package/dist-es/commands/GetApplicationPolicyCommand.js +21 -28
- package/dist-es/commands/GetCloudFormationTemplateCommand.js +21 -28
- package/dist-es/commands/ListApplicationDependenciesCommand.js +21 -28
- package/dist-es/commands/ListApplicationVersionsCommand.js +21 -28
- package/dist-es/commands/ListApplicationsCommand.js +21 -28
- package/dist-es/commands/PutApplicationPolicyCommand.js +21 -28
- package/dist-es/commands/UnshareApplicationCommand.js +22 -29
- package/dist-es/commands/UpdateApplicationCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ServerlessApplicationRepositoryServiceException.js +5 -10
- package/dist-es/models/models_0.js +186 -115
- package/dist-es/pagination/ListApplicationDependenciesPaginator.js +25 -68
- package/dist-es/pagination/ListApplicationVersionsPaginator.js +25 -68
- package/dist-es/pagination/ListApplicationsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1291 -1704
- 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
|
"us-gov-east-1": {
|
|
5
4
|
variants: [
|
|
6
5
|
{
|
|
@@ -20,7 +19,7 @@ var regionHash = {
|
|
|
20
19
|
signingRegion: "us-gov-west-1",
|
|
21
20
|
},
|
|
22
21
|
};
|
|
23
|
-
|
|
22
|
+
const partitionHash = {
|
|
24
23
|
aws: {
|
|
25
24
|
regions: [
|
|
26
25
|
"af-south-1",
|
|
@@ -140,8 +139,9 @@ var partitionHash = {
|
|
|
140
139
|
],
|
|
141
140
|
},
|
|
142
141
|
};
|
|
143
|
-
export
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
|
|
143
|
+
...options,
|
|
144
|
+
signingService: "serverlessrepo",
|
|
145
|
+
regionHash,
|
|
146
|
+
partitionHash,
|
|
147
|
+
});
|
|
@@ -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, ServerlessApplicationRepositoryServiceException.prototype);
|
|
8
|
-
return _this;
|
|
2
|
+
export class ServerlessApplicationRepositoryServiceException extends __ServiceException {
|
|
3
|
+
constructor(options) {
|
|
4
|
+
super(options);
|
|
5
|
+
Object.setPrototypeOf(this, ServerlessApplicationRepositoryServiceException.prototype);
|
|
9
6
|
}
|
|
10
|
-
|
|
11
|
-
}(__ServiceException));
|
|
12
|
-
export { ServerlessApplicationRepositoryServiceException };
|
|
7
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
1
|
import { ServerlessApplicationRepositoryServiceException as __BaseException } from "./ServerlessApplicationRepositoryServiceException";
|
|
3
2
|
export var Capability;
|
|
4
3
|
(function (Capability) {
|
|
@@ -7,129 +6,201 @@ export var Capability;
|
|
|
7
6
|
Capability["CAPABILITY_NAMED_IAM"] = "CAPABILITY_NAMED_IAM";
|
|
8
7
|
Capability["CAPABILITY_RESOURCE_POLICY"] = "CAPABILITY_RESOURCE_POLICY";
|
|
9
8
|
})(Capability || (Capability = {}));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
export class BadRequestException extends __BaseException {
|
|
10
|
+
constructor(opts) {
|
|
11
|
+
super({
|
|
12
|
+
name: "BadRequestException",
|
|
13
|
+
$fault: "client",
|
|
14
|
+
...opts,
|
|
15
|
+
});
|
|
16
|
+
this.name = "BadRequestException";
|
|
17
|
+
this.$fault = "client";
|
|
18
|
+
Object.setPrototypeOf(this, BadRequestException.prototype);
|
|
19
|
+
this.ErrorCode = opts.ErrorCode;
|
|
20
|
+
this.Message = opts.Message;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
}
|
|
23
|
+
export class ConflictException extends __BaseException {
|
|
24
|
+
constructor(opts) {
|
|
25
|
+
super({
|
|
26
|
+
name: "ConflictException",
|
|
27
|
+
$fault: "client",
|
|
28
|
+
...opts,
|
|
29
|
+
});
|
|
30
|
+
this.name = "ConflictException";
|
|
31
|
+
this.$fault = "client";
|
|
32
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
33
|
+
this.ErrorCode = opts.ErrorCode;
|
|
34
|
+
this.Message = opts.Message;
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
}
|
|
37
|
+
export class ForbiddenException extends __BaseException {
|
|
38
|
+
constructor(opts) {
|
|
39
|
+
super({
|
|
40
|
+
name: "ForbiddenException",
|
|
41
|
+
$fault: "client",
|
|
42
|
+
...opts,
|
|
43
|
+
});
|
|
44
|
+
this.name = "ForbiddenException";
|
|
45
|
+
this.$fault = "client";
|
|
46
|
+
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
47
|
+
this.ErrorCode = opts.ErrorCode;
|
|
48
|
+
this.Message = opts.Message;
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
}
|
|
51
|
+
export class InternalServerErrorException extends __BaseException {
|
|
52
|
+
constructor(opts) {
|
|
53
|
+
super({
|
|
54
|
+
name: "InternalServerErrorException",
|
|
55
|
+
$fault: "server",
|
|
56
|
+
...opts,
|
|
57
|
+
});
|
|
58
|
+
this.name = "InternalServerErrorException";
|
|
59
|
+
this.$fault = "server";
|
|
60
|
+
Object.setPrototypeOf(this, InternalServerErrorException.prototype);
|
|
61
|
+
this.ErrorCode = opts.ErrorCode;
|
|
62
|
+
this.Message = opts.Message;
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
}
|
|
65
|
+
export class TooManyRequestsException extends __BaseException {
|
|
66
|
+
constructor(opts) {
|
|
67
|
+
super({
|
|
68
|
+
name: "TooManyRequestsException",
|
|
69
|
+
$fault: "client",
|
|
70
|
+
...opts,
|
|
71
|
+
});
|
|
72
|
+
this.name = "TooManyRequestsException";
|
|
73
|
+
this.$fault = "client";
|
|
74
|
+
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
|
|
75
|
+
this.ErrorCode = opts.ErrorCode;
|
|
76
|
+
this.Message = opts.Message;
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
-
}(__BaseException));
|
|
79
|
-
export { TooManyRequestsException };
|
|
78
|
+
}
|
|
80
79
|
export var Status;
|
|
81
80
|
(function (Status) {
|
|
82
81
|
Status["ACTIVE"] = "ACTIVE";
|
|
83
82
|
Status["EXPIRED"] = "EXPIRED";
|
|
84
83
|
Status["PREPARING"] = "PREPARING";
|
|
85
84
|
})(Status || (Status = {}));
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
85
|
+
export class NotFoundException extends __BaseException {
|
|
86
|
+
constructor(opts) {
|
|
87
|
+
super({
|
|
88
|
+
name: "NotFoundException",
|
|
89
|
+
$fault: "client",
|
|
90
|
+
...opts,
|
|
91
|
+
});
|
|
92
|
+
this.name = "NotFoundException";
|
|
93
|
+
this.$fault = "client";
|
|
94
|
+
Object.setPrototypeOf(this, NotFoundException.prototype);
|
|
95
|
+
this.ErrorCode = opts.ErrorCode;
|
|
96
|
+
this.Message = opts.Message;
|
|
96
97
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
export
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
export
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
export
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
export
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
export
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
export
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
export
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
export
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
export
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
export
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
export
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
export
|
|
135
|
-
|
|
98
|
+
}
|
|
99
|
+
export const ApplicationDependencySummaryFilterSensitiveLog = (obj) => ({
|
|
100
|
+
...obj,
|
|
101
|
+
});
|
|
102
|
+
export const ApplicationPolicyStatementFilterSensitiveLog = (obj) => ({
|
|
103
|
+
...obj,
|
|
104
|
+
});
|
|
105
|
+
export const ApplicationSummaryFilterSensitiveLog = (obj) => ({
|
|
106
|
+
...obj,
|
|
107
|
+
});
|
|
108
|
+
export const ParameterDefinitionFilterSensitiveLog = (obj) => ({
|
|
109
|
+
...obj,
|
|
110
|
+
});
|
|
111
|
+
export const ParameterValueFilterSensitiveLog = (obj) => ({
|
|
112
|
+
...obj,
|
|
113
|
+
});
|
|
114
|
+
export const RollbackTriggerFilterSensitiveLog = (obj) => ({
|
|
115
|
+
...obj,
|
|
116
|
+
});
|
|
117
|
+
export const TagFilterSensitiveLog = (obj) => ({
|
|
118
|
+
...obj,
|
|
119
|
+
});
|
|
120
|
+
export const VersionSummaryFilterSensitiveLog = (obj) => ({
|
|
121
|
+
...obj,
|
|
122
|
+
});
|
|
123
|
+
export const CreateApplicationRequestFilterSensitiveLog = (obj) => ({
|
|
124
|
+
...obj,
|
|
125
|
+
});
|
|
126
|
+
export const VersionFilterSensitiveLog = (obj) => ({
|
|
127
|
+
...obj,
|
|
128
|
+
});
|
|
129
|
+
export const CreateApplicationResponseFilterSensitiveLog = (obj) => ({
|
|
130
|
+
...obj,
|
|
131
|
+
});
|
|
132
|
+
export const CreateApplicationVersionRequestFilterSensitiveLog = (obj) => ({
|
|
133
|
+
...obj,
|
|
134
|
+
});
|
|
135
|
+
export const CreateApplicationVersionResponseFilterSensitiveLog = (obj) => ({
|
|
136
|
+
...obj,
|
|
137
|
+
});
|
|
138
|
+
export const RollbackConfigurationFilterSensitiveLog = (obj) => ({
|
|
139
|
+
...obj,
|
|
140
|
+
});
|
|
141
|
+
export const CreateCloudFormationChangeSetRequestFilterSensitiveLog = (obj) => ({
|
|
142
|
+
...obj,
|
|
143
|
+
});
|
|
144
|
+
export const CreateCloudFormationChangeSetResponseFilterSensitiveLog = (obj) => ({
|
|
145
|
+
...obj,
|
|
146
|
+
});
|
|
147
|
+
export const CreateCloudFormationTemplateRequestFilterSensitiveLog = (obj) => ({
|
|
148
|
+
...obj,
|
|
149
|
+
});
|
|
150
|
+
export const CreateCloudFormationTemplateResponseFilterSensitiveLog = (obj) => ({
|
|
151
|
+
...obj,
|
|
152
|
+
});
|
|
153
|
+
export const DeleteApplicationRequestFilterSensitiveLog = (obj) => ({
|
|
154
|
+
...obj,
|
|
155
|
+
});
|
|
156
|
+
export const GetApplicationRequestFilterSensitiveLog = (obj) => ({
|
|
157
|
+
...obj,
|
|
158
|
+
});
|
|
159
|
+
export const GetApplicationResponseFilterSensitiveLog = (obj) => ({
|
|
160
|
+
...obj,
|
|
161
|
+
});
|
|
162
|
+
export const GetApplicationPolicyRequestFilterSensitiveLog = (obj) => ({
|
|
163
|
+
...obj,
|
|
164
|
+
});
|
|
165
|
+
export const GetApplicationPolicyResponseFilterSensitiveLog = (obj) => ({
|
|
166
|
+
...obj,
|
|
167
|
+
});
|
|
168
|
+
export const GetCloudFormationTemplateRequestFilterSensitiveLog = (obj) => ({
|
|
169
|
+
...obj,
|
|
170
|
+
});
|
|
171
|
+
export const GetCloudFormationTemplateResponseFilterSensitiveLog = (obj) => ({
|
|
172
|
+
...obj,
|
|
173
|
+
});
|
|
174
|
+
export const ListApplicationDependenciesRequestFilterSensitiveLog = (obj) => ({
|
|
175
|
+
...obj,
|
|
176
|
+
});
|
|
177
|
+
export const ListApplicationDependenciesResponseFilterSensitiveLog = (obj) => ({
|
|
178
|
+
...obj,
|
|
179
|
+
});
|
|
180
|
+
export const ListApplicationsRequestFilterSensitiveLog = (obj) => ({
|
|
181
|
+
...obj,
|
|
182
|
+
});
|
|
183
|
+
export const ListApplicationsResponseFilterSensitiveLog = (obj) => ({
|
|
184
|
+
...obj,
|
|
185
|
+
});
|
|
186
|
+
export const ListApplicationVersionsRequestFilterSensitiveLog = (obj) => ({
|
|
187
|
+
...obj,
|
|
188
|
+
});
|
|
189
|
+
export const ListApplicationVersionsResponseFilterSensitiveLog = (obj) => ({
|
|
190
|
+
...obj,
|
|
191
|
+
});
|
|
192
|
+
export const PutApplicationPolicyRequestFilterSensitiveLog = (obj) => ({
|
|
193
|
+
...obj,
|
|
194
|
+
});
|
|
195
|
+
export const PutApplicationPolicyResponseFilterSensitiveLog = (obj) => ({
|
|
196
|
+
...obj,
|
|
197
|
+
});
|
|
198
|
+
export const UnshareApplicationRequestFilterSensitiveLog = (obj) => ({
|
|
199
|
+
...obj,
|
|
200
|
+
});
|
|
201
|
+
export const UpdateApplicationRequestFilterSensitiveLog = (obj) => ({
|
|
202
|
+
...obj,
|
|
203
|
+
});
|
|
204
|
+
export const UpdateApplicationResponseFilterSensitiveLog = (obj) => ({
|
|
205
|
+
...obj,
|
|
206
|
+
});
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { ListApplicationDependenciesCommand, } from "../commands/ListApplicationDependenciesCommand";
|
|
3
2
|
import { ServerlessApplicationRepository } from "../ServerlessApplicationRepository";
|
|
4
3
|
import { ServerlessApplicationRepositoryClient } from "../ServerlessApplicationRepositoryClient";
|
|
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 ListApplicationDependenciesCommand(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 ListApplicationDependenciesCommand(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.listApplicationDependencies.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.listApplicationDependencies(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateListApplicationDependencies(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateListApplicationDependencies(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["MaxItems"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ServerlessApplicationRepository) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ServerlessApplicationRepositoryClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ServerlessApplicationRepository | ServerlessApplicationRepositoryClient");
|
|
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["MaxItems"] = config.pageSize;
|
|
50
|
-
if (!(config.client instanceof ServerlessApplicationRepository)) 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 ServerlessApplicationRepositoryClient)) 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 ServerlessApplicationRepository | ServerlessApplicationRepositoryClient");
|
|
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 { ListApplicationVersionsCommand, } from "../commands/ListApplicationVersionsCommand";
|
|
3
2
|
import { ServerlessApplicationRepository } from "../ServerlessApplicationRepository";
|
|
4
3
|
import { ServerlessApplicationRepositoryClient } from "../ServerlessApplicationRepositoryClient";
|
|
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 ListApplicationVersionsCommand(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 ListApplicationVersionsCommand(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.listApplicationVersions.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.listApplicationVersions(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateListApplicationVersions(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateListApplicationVersions(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["MaxItems"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ServerlessApplicationRepository) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ServerlessApplicationRepositoryClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ServerlessApplicationRepository | ServerlessApplicationRepositoryClient");
|
|
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["MaxItems"] = config.pageSize;
|
|
50
|
-
if (!(config.client instanceof ServerlessApplicationRepository)) 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 ServerlessApplicationRepositoryClient)) 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 ServerlessApplicationRepository | ServerlessApplicationRepositoryClient");
|
|
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
|
}
|