@aws-sdk/client-serverlessapplicationrepository 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.
Files changed (29) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist-es/ServerlessApplicationRepository.js +58 -65
  3. package/dist-es/ServerlessApplicationRepositoryClient.js +22 -28
  4. package/dist-es/commands/CreateApplicationCommand.js +21 -28
  5. package/dist-es/commands/CreateApplicationVersionCommand.js +21 -28
  6. package/dist-es/commands/CreateCloudFormationChangeSetCommand.js +21 -28
  7. package/dist-es/commands/CreateCloudFormationTemplateCommand.js +21 -28
  8. package/dist-es/commands/DeleteApplicationCommand.js +22 -29
  9. package/dist-es/commands/GetApplicationCommand.js +21 -28
  10. package/dist-es/commands/GetApplicationPolicyCommand.js +21 -28
  11. package/dist-es/commands/GetCloudFormationTemplateCommand.js +21 -28
  12. package/dist-es/commands/ListApplicationDependenciesCommand.js +21 -28
  13. package/dist-es/commands/ListApplicationVersionsCommand.js +21 -28
  14. package/dist-es/commands/ListApplicationsCommand.js +21 -28
  15. package/dist-es/commands/PutApplicationPolicyCommand.js +21 -28
  16. package/dist-es/commands/UnshareApplicationCommand.js +22 -29
  17. package/dist-es/commands/UpdateApplicationCommand.js +21 -28
  18. package/dist-es/endpoints.js +8 -8
  19. package/dist-es/models/ServerlessApplicationRepositoryServiceException.js +5 -10
  20. package/dist-es/models/models_0.js +186 -115
  21. package/dist-es/pagination/ListApplicationDependenciesPaginator.js +25 -68
  22. package/dist-es/pagination/ListApplicationVersionsPaginator.js +25 -68
  23. package/dist-es/pagination/ListApplicationsPaginator.js +25 -68
  24. package/dist-es/protocols/Aws_restJson1.js +1291 -1704
  25. package/dist-es/runtimeConfig.browser.js +26 -12
  26. package/dist-es/runtimeConfig.js +30 -12
  27. package/dist-es/runtimeConfig.native.js +8 -5
  28. package/dist-es/runtimeConfig.shared.js +8 -11
  29. package/package.json +33 -33
@@ -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-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
- var partitionHash = {
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 var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
144
- return __generator(this, function (_a) {
145
- return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "serverlessrepo", regionHash: regionHash, partitionHash: partitionHash }))];
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
- var ServerlessApplicationRepositoryServiceException = (function (_super) {
4
- __extends(ServerlessApplicationRepositoryServiceException, _super);
5
- function ServerlessApplicationRepositoryServiceException(options) {
6
- var _this = _super.call(this, options) || this;
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
- return ServerlessApplicationRepositoryServiceException;
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
- var BadRequestException = (function (_super) {
11
- __extends(BadRequestException, _super);
12
- function BadRequestException(opts) {
13
- var _this = _super.call(this, __assign({ name: "BadRequestException", $fault: "client" }, opts)) || this;
14
- _this.name = "BadRequestException";
15
- _this.$fault = "client";
16
- Object.setPrototypeOf(_this, BadRequestException.prototype);
17
- _this.ErrorCode = opts.ErrorCode;
18
- _this.Message = opts.Message;
19
- return _this;
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
- return BadRequestException;
22
- }(__BaseException));
23
- export { BadRequestException };
24
- var ConflictException = (function (_super) {
25
- __extends(ConflictException, _super);
26
- function ConflictException(opts) {
27
- var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
28
- _this.name = "ConflictException";
29
- _this.$fault = "client";
30
- Object.setPrototypeOf(_this, ConflictException.prototype);
31
- _this.ErrorCode = opts.ErrorCode;
32
- _this.Message = opts.Message;
33
- return _this;
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
- return ConflictException;
36
- }(__BaseException));
37
- export { ConflictException };
38
- var ForbiddenException = (function (_super) {
39
- __extends(ForbiddenException, _super);
40
- function ForbiddenException(opts) {
41
- var _this = _super.call(this, __assign({ name: "ForbiddenException", $fault: "client" }, opts)) || this;
42
- _this.name = "ForbiddenException";
43
- _this.$fault = "client";
44
- Object.setPrototypeOf(_this, ForbiddenException.prototype);
45
- _this.ErrorCode = opts.ErrorCode;
46
- _this.Message = opts.Message;
47
- return _this;
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
- return ForbiddenException;
50
- }(__BaseException));
51
- export { ForbiddenException };
52
- var InternalServerErrorException = (function (_super) {
53
- __extends(InternalServerErrorException, _super);
54
- function InternalServerErrorException(opts) {
55
- var _this = _super.call(this, __assign({ name: "InternalServerErrorException", $fault: "server" }, opts)) || this;
56
- _this.name = "InternalServerErrorException";
57
- _this.$fault = "server";
58
- Object.setPrototypeOf(_this, InternalServerErrorException.prototype);
59
- _this.ErrorCode = opts.ErrorCode;
60
- _this.Message = opts.Message;
61
- return _this;
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
- return InternalServerErrorException;
64
- }(__BaseException));
65
- export { InternalServerErrorException };
66
- var TooManyRequestsException = (function (_super) {
67
- __extends(TooManyRequestsException, _super);
68
- function TooManyRequestsException(opts) {
69
- var _this = _super.call(this, __assign({ name: "TooManyRequestsException", $fault: "client" }, opts)) || this;
70
- _this.name = "TooManyRequestsException";
71
- _this.$fault = "client";
72
- Object.setPrototypeOf(_this, TooManyRequestsException.prototype);
73
- _this.ErrorCode = opts.ErrorCode;
74
- _this.Message = opts.Message;
75
- return _this;
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
- return TooManyRequestsException;
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
- var NotFoundException = (function (_super) {
87
- __extends(NotFoundException, _super);
88
- function NotFoundException(opts) {
89
- var _this = _super.call(this, __assign({ name: "NotFoundException", $fault: "client" }, opts)) || this;
90
- _this.name = "NotFoundException";
91
- _this.$fault = "client";
92
- Object.setPrototypeOf(_this, NotFoundException.prototype);
93
- _this.ErrorCode = opts.ErrorCode;
94
- _this.Message = opts.Message;
95
- return _this;
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
- return NotFoundException;
98
- }(__BaseException));
99
- export { NotFoundException };
100
- export var ApplicationDependencySummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
101
- export var ApplicationPolicyStatementFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
102
- export var ApplicationSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
103
- export var ParameterDefinitionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
104
- export var ParameterValueFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
105
- export var RollbackTriggerFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
106
- export var TagFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
107
- export var VersionSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
108
- export var CreateApplicationRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
109
- export var VersionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
110
- export var CreateApplicationResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
111
- export var CreateApplicationVersionRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
112
- export var CreateApplicationVersionResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
113
- export var RollbackConfigurationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
114
- export var CreateCloudFormationChangeSetRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
115
- export var CreateCloudFormationChangeSetResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
116
- export var CreateCloudFormationTemplateRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
117
- export var CreateCloudFormationTemplateResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
118
- export var DeleteApplicationRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
119
- export var GetApplicationRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
120
- export var GetApplicationResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
121
- export var GetApplicationPolicyRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
122
- export var GetApplicationPolicyResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
123
- export var GetCloudFormationTemplateRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
124
- export var GetCloudFormationTemplateResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
125
- export var ListApplicationDependenciesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
126
- export var ListApplicationDependenciesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
127
- export var ListApplicationsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
128
- export var ListApplicationsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
129
- export var ListApplicationVersionsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
130
- export var ListApplicationVersionsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
131
- export var PutApplicationPolicyRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
132
- export var PutApplicationPolicyResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
133
- export var UnshareApplicationRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
134
- export var UpdateApplicationRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
135
- export var UpdateApplicationResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
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
- 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 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
- 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.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
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
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 __asyncGenerator(this, arguments, function paginateListApplicationDependencies_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["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
- 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 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
- 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.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
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
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 __asyncGenerator(this, arguments, function paginateListApplicationVersions_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["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
  }