@aws-sdk/client-cognito-identity-provider 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.
Files changed (124) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +113 -107
  3. package/dist-es/CognitoIdentityProvider.js +406 -413
  4. package/dist-es/CognitoIdentityProviderClient.js +21 -27
  5. package/dist-es/commands/AddCustomAttributesCommand.js +21 -28
  6. package/dist-es/commands/AdminAddUserToGroupCommand.js +22 -29
  7. package/dist-es/commands/AdminConfirmSignUpCommand.js +21 -28
  8. package/dist-es/commands/AdminCreateUserCommand.js +21 -28
  9. package/dist-es/commands/AdminDeleteUserAttributesCommand.js +21 -28
  10. package/dist-es/commands/AdminDeleteUserCommand.js +22 -29
  11. package/dist-es/commands/AdminDisableProviderForUserCommand.js +21 -28
  12. package/dist-es/commands/AdminDisableUserCommand.js +21 -28
  13. package/dist-es/commands/AdminEnableUserCommand.js +21 -28
  14. package/dist-es/commands/AdminForgetDeviceCommand.js +22 -29
  15. package/dist-es/commands/AdminGetDeviceCommand.js +21 -28
  16. package/dist-es/commands/AdminGetUserCommand.js +21 -28
  17. package/dist-es/commands/AdminInitiateAuthCommand.js +21 -28
  18. package/dist-es/commands/AdminLinkProviderForUserCommand.js +21 -28
  19. package/dist-es/commands/AdminListDevicesCommand.js +21 -28
  20. package/dist-es/commands/AdminListGroupsForUserCommand.js +21 -28
  21. package/dist-es/commands/AdminListUserAuthEventsCommand.js +21 -28
  22. package/dist-es/commands/AdminRemoveUserFromGroupCommand.js +22 -29
  23. package/dist-es/commands/AdminResetUserPasswordCommand.js +21 -28
  24. package/dist-es/commands/AdminRespondToAuthChallengeCommand.js +21 -28
  25. package/dist-es/commands/AdminSetUserMFAPreferenceCommand.js +21 -28
  26. package/dist-es/commands/AdminSetUserPasswordCommand.js +21 -28
  27. package/dist-es/commands/AdminSetUserSettingsCommand.js +21 -28
  28. package/dist-es/commands/AdminUpdateAuthEventFeedbackCommand.js +21 -28
  29. package/dist-es/commands/AdminUpdateDeviceStatusCommand.js +21 -28
  30. package/dist-es/commands/AdminUpdateUserAttributesCommand.js +21 -28
  31. package/dist-es/commands/AdminUserGlobalSignOutCommand.js +21 -28
  32. package/dist-es/commands/AssociateSoftwareTokenCommand.js +21 -28
  33. package/dist-es/commands/ChangePasswordCommand.js +21 -28
  34. package/dist-es/commands/ConfirmDeviceCommand.js +21 -28
  35. package/dist-es/commands/ConfirmForgotPasswordCommand.js +21 -28
  36. package/dist-es/commands/ConfirmSignUpCommand.js +21 -28
  37. package/dist-es/commands/CreateGroupCommand.js +21 -28
  38. package/dist-es/commands/CreateIdentityProviderCommand.js +21 -28
  39. package/dist-es/commands/CreateResourceServerCommand.js +21 -28
  40. package/dist-es/commands/CreateUserImportJobCommand.js +21 -28
  41. package/dist-es/commands/CreateUserPoolClientCommand.js +21 -28
  42. package/dist-es/commands/CreateUserPoolCommand.js +21 -28
  43. package/dist-es/commands/CreateUserPoolDomainCommand.js +21 -28
  44. package/dist-es/commands/DeleteGroupCommand.js +22 -29
  45. package/dist-es/commands/DeleteIdentityProviderCommand.js +22 -29
  46. package/dist-es/commands/DeleteResourceServerCommand.js +22 -29
  47. package/dist-es/commands/DeleteUserAttributesCommand.js +21 -28
  48. package/dist-es/commands/DeleteUserCommand.js +22 -29
  49. package/dist-es/commands/DeleteUserPoolClientCommand.js +22 -29
  50. package/dist-es/commands/DeleteUserPoolCommand.js +22 -29
  51. package/dist-es/commands/DeleteUserPoolDomainCommand.js +21 -28
  52. package/dist-es/commands/DescribeIdentityProviderCommand.js +21 -28
  53. package/dist-es/commands/DescribeResourceServerCommand.js +21 -28
  54. package/dist-es/commands/DescribeRiskConfigurationCommand.js +21 -28
  55. package/dist-es/commands/DescribeUserImportJobCommand.js +21 -28
  56. package/dist-es/commands/DescribeUserPoolClientCommand.js +21 -28
  57. package/dist-es/commands/DescribeUserPoolCommand.js +21 -28
  58. package/dist-es/commands/DescribeUserPoolDomainCommand.js +21 -28
  59. package/dist-es/commands/ForgetDeviceCommand.js +22 -29
  60. package/dist-es/commands/ForgotPasswordCommand.js +21 -28
  61. package/dist-es/commands/GetCSVHeaderCommand.js +21 -28
  62. package/dist-es/commands/GetDeviceCommand.js +21 -28
  63. package/dist-es/commands/GetGroupCommand.js +21 -28
  64. package/dist-es/commands/GetIdentityProviderByIdentifierCommand.js +21 -28
  65. package/dist-es/commands/GetSigningCertificateCommand.js +21 -28
  66. package/dist-es/commands/GetUICustomizationCommand.js +21 -28
  67. package/dist-es/commands/GetUserAttributeVerificationCodeCommand.js +21 -28
  68. package/dist-es/commands/GetUserCommand.js +21 -28
  69. package/dist-es/commands/GetUserPoolMfaConfigCommand.js +21 -28
  70. package/dist-es/commands/GlobalSignOutCommand.js +21 -28
  71. package/dist-es/commands/InitiateAuthCommand.js +21 -28
  72. package/dist-es/commands/ListDevicesCommand.js +21 -28
  73. package/dist-es/commands/ListGroupsCommand.js +21 -28
  74. package/dist-es/commands/ListIdentityProvidersCommand.js +21 -28
  75. package/dist-es/commands/ListResourceServersCommand.js +21 -28
  76. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  77. package/dist-es/commands/ListUserImportJobsCommand.js +21 -28
  78. package/dist-es/commands/ListUserPoolClientsCommand.js +21 -28
  79. package/dist-es/commands/ListUserPoolsCommand.js +21 -28
  80. package/dist-es/commands/ListUsersCommand.js +21 -28
  81. package/dist-es/commands/ListUsersInGroupCommand.js +21 -28
  82. package/dist-es/commands/ResendConfirmationCodeCommand.js +21 -28
  83. package/dist-es/commands/RespondToAuthChallengeCommand.js +21 -28
  84. package/dist-es/commands/RevokeTokenCommand.js +21 -28
  85. package/dist-es/commands/SetRiskConfigurationCommand.js +21 -28
  86. package/dist-es/commands/SetUICustomizationCommand.js +21 -28
  87. package/dist-es/commands/SetUserMFAPreferenceCommand.js +21 -28
  88. package/dist-es/commands/SetUserPoolMfaConfigCommand.js +21 -28
  89. package/dist-es/commands/SetUserSettingsCommand.js +21 -28
  90. package/dist-es/commands/SignUpCommand.js +21 -28
  91. package/dist-es/commands/StartUserImportJobCommand.js +21 -28
  92. package/dist-es/commands/StopUserImportJobCommand.js +21 -28
  93. package/dist-es/commands/TagResourceCommand.js +21 -28
  94. package/dist-es/commands/UntagResourceCommand.js +21 -28
  95. package/dist-es/commands/UpdateAuthEventFeedbackCommand.js +21 -28
  96. package/dist-es/commands/UpdateDeviceStatusCommand.js +21 -28
  97. package/dist-es/commands/UpdateGroupCommand.js +21 -28
  98. package/dist-es/commands/UpdateIdentityProviderCommand.js +21 -28
  99. package/dist-es/commands/UpdateResourceServerCommand.js +21 -28
  100. package/dist-es/commands/UpdateUserAttributesCommand.js +21 -28
  101. package/dist-es/commands/UpdateUserPoolClientCommand.js +21 -28
  102. package/dist-es/commands/UpdateUserPoolCommand.js +21 -28
  103. package/dist-es/commands/UpdateUserPoolDomainCommand.js +21 -28
  104. package/dist-es/commands/VerifySoftwareTokenCommand.js +21 -28
  105. package/dist-es/commands/VerifyUserAttributeCommand.js +21 -28
  106. package/dist-es/endpoints.js +8 -8
  107. package/dist-es/models/CognitoIdentityProviderServiceException.js +5 -10
  108. package/dist-es/models/models_0.js +1290 -732
  109. package/dist-es/models/models_1.js +115 -45
  110. package/dist-es/pagination/AdminListGroupsForUserPaginator.js +25 -68
  111. package/dist-es/pagination/AdminListUserAuthEventsPaginator.js +25 -68
  112. package/dist-es/pagination/ListGroupsPaginator.js +25 -68
  113. package/dist-es/pagination/ListIdentityProvidersPaginator.js +25 -68
  114. package/dist-es/pagination/ListResourceServersPaginator.js +25 -68
  115. package/dist-es/pagination/ListUserPoolClientsPaginator.js +25 -68
  116. package/dist-es/pagination/ListUserPoolsPaginator.js +25 -68
  117. package/dist-es/pagination/ListUsersInGroupPaginator.js +25 -68
  118. package/dist-es/pagination/ListUsersPaginator.js +25 -68
  119. package/dist-es/protocols/Aws_json1_1.js +8461 -10552
  120. package/dist-es/runtimeConfig.browser.js +26 -12
  121. package/dist-es/runtimeConfig.js +30 -12
  122. package/dist-es/runtimeConfig.native.js +8 -5
  123. package/dist-es/runtimeConfig.shared.js +8 -11
  124. package/package.json +33 -33
@@ -1,54 +1,124 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
3
2
  import { CognitoIdentityProviderServiceException as __BaseException } from "./CognitoIdentityProviderServiceException";
4
3
  import { AttributeTypeFilterSensitiveLog, UserPoolClientTypeFilterSensitiveLog, } from "./models_0";
5
- var EnableSoftwareTokenMFAException = (function (_super) {
6
- __extends(EnableSoftwareTokenMFAException, _super);
7
- function EnableSoftwareTokenMFAException(opts) {
8
- var _this = _super.call(this, __assign({ name: "EnableSoftwareTokenMFAException", $fault: "client" }, opts)) || this;
9
- _this.name = "EnableSoftwareTokenMFAException";
10
- _this.$fault = "client";
11
- Object.setPrototypeOf(_this, EnableSoftwareTokenMFAException.prototype);
12
- return _this;
4
+ export class EnableSoftwareTokenMFAException extends __BaseException {
5
+ constructor(opts) {
6
+ super({
7
+ name: "EnableSoftwareTokenMFAException",
8
+ $fault: "client",
9
+ ...opts,
10
+ });
11
+ this.name = "EnableSoftwareTokenMFAException";
12
+ this.$fault = "client";
13
+ Object.setPrototypeOf(this, EnableSoftwareTokenMFAException.prototype);
13
14
  }
14
- return EnableSoftwareTokenMFAException;
15
- }(__BaseException));
16
- export { EnableSoftwareTokenMFAException };
15
+ }
17
16
  export var VerifySoftwareTokenResponseType;
18
17
  (function (VerifySoftwareTokenResponseType) {
19
18
  VerifySoftwareTokenResponseType["ERROR"] = "ERROR";
20
19
  VerifySoftwareTokenResponseType["SUCCESS"] = "SUCCESS";
21
20
  })(VerifySoftwareTokenResponseType || (VerifySoftwareTokenResponseType = {}));
22
- export var SignUpResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
23
- export var StartUserImportJobRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
24
- export var StartUserImportJobResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
25
- export var StopUserImportJobRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
26
- export var StopUserImportJobResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
27
- export var TagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
28
- export var TagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
29
- export var UntagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
30
- export var UntagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
31
- export var UpdateAuthEventFeedbackRequestFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Username && { Username: SENSITIVE_STRING })), (obj.FeedbackToken && { FeedbackToken: SENSITIVE_STRING }))); };
32
- export var UpdateAuthEventFeedbackResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
33
- export var UpdateDeviceStatusRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.AccessToken && { AccessToken: SENSITIVE_STRING }))); };
34
- export var UpdateDeviceStatusResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
35
- export var UpdateGroupRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
36
- export var UpdateGroupResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
37
- export var UpdateIdentityProviderRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
38
- export var UpdateIdentityProviderResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
39
- export var UpdateResourceServerRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
40
- export var UpdateResourceServerResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
41
- export var UpdateUserAttributesRequestFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.UserAttributes && {
42
- UserAttributes: obj.UserAttributes.map(function (item) { return AttributeTypeFilterSensitiveLog(item); }),
43
- })), (obj.AccessToken && { AccessToken: SENSITIVE_STRING }))); };
44
- export var UpdateUserAttributesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
45
- export var UpdateUserPoolRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
46
- export var UpdateUserPoolResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
47
- export var UpdateUserPoolClientRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.ClientId && { ClientId: SENSITIVE_STRING }))); };
48
- export var UpdateUserPoolClientResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.UserPoolClient && { UserPoolClient: UserPoolClientTypeFilterSensitiveLog(obj.UserPoolClient) }))); };
49
- export var UpdateUserPoolDomainRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
50
- export var UpdateUserPoolDomainResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
51
- export var VerifySoftwareTokenRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.AccessToken && { AccessToken: SENSITIVE_STRING }))); };
52
- export var VerifySoftwareTokenResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
53
- export var VerifyUserAttributeRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.AccessToken && { AccessToken: SENSITIVE_STRING }))); };
54
- export var VerifyUserAttributeResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
21
+ export const SignUpResponseFilterSensitiveLog = (obj) => ({
22
+ ...obj,
23
+ });
24
+ export const StartUserImportJobRequestFilterSensitiveLog = (obj) => ({
25
+ ...obj,
26
+ });
27
+ export const StartUserImportJobResponseFilterSensitiveLog = (obj) => ({
28
+ ...obj,
29
+ });
30
+ export const StopUserImportJobRequestFilterSensitiveLog = (obj) => ({
31
+ ...obj,
32
+ });
33
+ export const StopUserImportJobResponseFilterSensitiveLog = (obj) => ({
34
+ ...obj,
35
+ });
36
+ export const TagResourceRequestFilterSensitiveLog = (obj) => ({
37
+ ...obj,
38
+ });
39
+ export const TagResourceResponseFilterSensitiveLog = (obj) => ({
40
+ ...obj,
41
+ });
42
+ export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
43
+ ...obj,
44
+ });
45
+ export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
46
+ ...obj,
47
+ });
48
+ export const UpdateAuthEventFeedbackRequestFilterSensitiveLog = (obj) => ({
49
+ ...obj,
50
+ ...(obj.Username && { Username: SENSITIVE_STRING }),
51
+ ...(obj.FeedbackToken && { FeedbackToken: SENSITIVE_STRING }),
52
+ });
53
+ export const UpdateAuthEventFeedbackResponseFilterSensitiveLog = (obj) => ({
54
+ ...obj,
55
+ });
56
+ export const UpdateDeviceStatusRequestFilterSensitiveLog = (obj) => ({
57
+ ...obj,
58
+ ...(obj.AccessToken && { AccessToken: SENSITIVE_STRING }),
59
+ });
60
+ export const UpdateDeviceStatusResponseFilterSensitiveLog = (obj) => ({
61
+ ...obj,
62
+ });
63
+ export const UpdateGroupRequestFilterSensitiveLog = (obj) => ({
64
+ ...obj,
65
+ });
66
+ export const UpdateGroupResponseFilterSensitiveLog = (obj) => ({
67
+ ...obj,
68
+ });
69
+ export const UpdateIdentityProviderRequestFilterSensitiveLog = (obj) => ({
70
+ ...obj,
71
+ });
72
+ export const UpdateIdentityProviderResponseFilterSensitiveLog = (obj) => ({
73
+ ...obj,
74
+ });
75
+ export const UpdateResourceServerRequestFilterSensitiveLog = (obj) => ({
76
+ ...obj,
77
+ });
78
+ export const UpdateResourceServerResponseFilterSensitiveLog = (obj) => ({
79
+ ...obj,
80
+ });
81
+ export const UpdateUserAttributesRequestFilterSensitiveLog = (obj) => ({
82
+ ...obj,
83
+ ...(obj.UserAttributes && {
84
+ UserAttributes: obj.UserAttributes.map((item) => AttributeTypeFilterSensitiveLog(item)),
85
+ }),
86
+ ...(obj.AccessToken && { AccessToken: SENSITIVE_STRING }),
87
+ });
88
+ export const UpdateUserAttributesResponseFilterSensitiveLog = (obj) => ({
89
+ ...obj,
90
+ });
91
+ export const UpdateUserPoolRequestFilterSensitiveLog = (obj) => ({
92
+ ...obj,
93
+ });
94
+ export const UpdateUserPoolResponseFilterSensitiveLog = (obj) => ({
95
+ ...obj,
96
+ });
97
+ export const UpdateUserPoolClientRequestFilterSensitiveLog = (obj) => ({
98
+ ...obj,
99
+ ...(obj.ClientId && { ClientId: SENSITIVE_STRING }),
100
+ });
101
+ export const UpdateUserPoolClientResponseFilterSensitiveLog = (obj) => ({
102
+ ...obj,
103
+ ...(obj.UserPoolClient && { UserPoolClient: UserPoolClientTypeFilterSensitiveLog(obj.UserPoolClient) }),
104
+ });
105
+ export const UpdateUserPoolDomainRequestFilterSensitiveLog = (obj) => ({
106
+ ...obj,
107
+ });
108
+ export const UpdateUserPoolDomainResponseFilterSensitiveLog = (obj) => ({
109
+ ...obj,
110
+ });
111
+ export const VerifySoftwareTokenRequestFilterSensitiveLog = (obj) => ({
112
+ ...obj,
113
+ ...(obj.AccessToken && { AccessToken: SENSITIVE_STRING }),
114
+ });
115
+ export const VerifySoftwareTokenResponseFilterSensitiveLog = (obj) => ({
116
+ ...obj,
117
+ });
118
+ export const VerifyUserAttributeRequestFilterSensitiveLog = (obj) => ({
119
+ ...obj,
120
+ ...(obj.AccessToken && { AccessToken: SENSITIVE_STRING }),
121
+ });
122
+ export const VerifyUserAttributeResponseFilterSensitiveLog = (obj) => ({
123
+ ...obj,
124
+ });
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { CognitoIdentityProvider } from "../CognitoIdentityProvider";
3
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
4
3
  import { AdminListGroupsForUserCommand, } from "../commands/AdminListGroupsForUserCommand";
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 AdminListGroupsForUserCommand(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 AdminListGroupsForUserCommand(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.adminListGroupsForUser.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.adminListGroupsForUser(input, ...args);
32
9
  };
33
- export function paginateAdminListGroupsForUser(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateAdminListGroupsForUser(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["Limit"] = config.pageSize;
17
+ if (config.client instanceof CognitoIdentityProvider) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof CognitoIdentityProviderClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateAdminListGroupsForUser_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["Limit"] = config.pageSize;
50
- if (!(config.client instanceof CognitoIdentityProvider)) 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 CognitoIdentityProviderClient)) 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 CognitoIdentityProvider | CognitoIdentityProviderClient");
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 { CognitoIdentityProvider } from "../CognitoIdentityProvider";
3
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
4
3
  import { AdminListUserAuthEventsCommand, } from "../commands/AdminListUserAuthEventsCommand";
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 AdminListUserAuthEventsCommand(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 AdminListUserAuthEventsCommand(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.adminListUserAuthEvents.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.adminListUserAuthEvents(input, ...args);
32
9
  };
33
- export function paginateAdminListUserAuthEvents(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateAdminListUserAuthEvents(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 CognitoIdentityProvider) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof CognitoIdentityProviderClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateAdminListUserAuthEvents_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 CognitoIdentityProvider)) 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 CognitoIdentityProviderClient)) 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 CognitoIdentityProvider | CognitoIdentityProviderClient");
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 { CognitoIdentityProvider } from "../CognitoIdentityProvider";
3
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
4
3
  import { ListGroupsCommand } from "../commands/ListGroupsCommand";
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 ListGroupsCommand(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 ListGroupsCommand(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.listGroups.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.listGroups(input, ...args);
32
9
  };
33
- export function paginateListGroups(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListGroups(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["Limit"] = config.pageSize;
17
+ if (config.client instanceof CognitoIdentityProvider) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof CognitoIdentityProviderClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateListGroups_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["Limit"] = config.pageSize;
50
- if (!(config.client instanceof CognitoIdentityProvider)) 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 CognitoIdentityProviderClient)) 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 CognitoIdentityProvider | CognitoIdentityProviderClient");
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 { CognitoIdentityProvider } from "../CognitoIdentityProvider";
3
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
4
3
  import { ListIdentityProvidersCommand, } from "../commands/ListIdentityProvidersCommand";
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 ListIdentityProvidersCommand(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 ListIdentityProvidersCommand(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.listIdentityProviders.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.listIdentityProviders(input, ...args);
32
9
  };
33
- export function paginateListIdentityProviders(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListIdentityProviders(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 CognitoIdentityProvider) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof CognitoIdentityProviderClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateListIdentityProviders_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 CognitoIdentityProvider)) 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 CognitoIdentityProviderClient)) 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 CognitoIdentityProvider | CognitoIdentityProviderClient");
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
  }