@vardario/cognito-client 1.0.1 → 2.0.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/README.md +1 -0
- package/lib/cognito-client.d.ts +30 -10
- package/lib/cognito-client.js +77 -39
- package/lib/error.d.ts +342 -101
- package/lib/error.js +379 -114
- package/package.json +3 -2
package/lib/error.js
CHANGED
|
@@ -1,117 +1,382 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
1
|
+
export var CognitoCommonException;
|
|
2
|
+
(function (CognitoCommonException) {
|
|
3
|
+
CognitoCommonException["Unknown"] = "Unknown";
|
|
4
|
+
})(CognitoCommonException || (CognitoCommonException = {}));
|
|
5
|
+
export var AssociateSoftwareTokenException;
|
|
6
|
+
(function (AssociateSoftwareTokenException) {
|
|
7
|
+
AssociateSoftwareTokenException["ConcurrentModificationException"] = "ConcurrentModificationException";
|
|
8
|
+
AssociateSoftwareTokenException["ForbiddenException"] = "ForbiddenException";
|
|
9
|
+
AssociateSoftwareTokenException["InternalErrorException"] = "InternalErrorException";
|
|
10
|
+
AssociateSoftwareTokenException["InvalidParameterException"] = "InvalidParameterException";
|
|
11
|
+
AssociateSoftwareTokenException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
12
|
+
AssociateSoftwareTokenException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
13
|
+
AssociateSoftwareTokenException["SoftwareTokenMFANotFoundException"] = "SoftwareTokenMFANotFoundException";
|
|
14
|
+
})(AssociateSoftwareTokenException || (AssociateSoftwareTokenException = {}));
|
|
15
|
+
export var ChangePasswordException;
|
|
16
|
+
(function (ChangePasswordException) {
|
|
17
|
+
ChangePasswordException["ForbiddenException"] = "ForbiddenException";
|
|
18
|
+
ChangePasswordException["InternalErrorException"] = "InternalErrorException";
|
|
19
|
+
ChangePasswordException["InvalidParameterException"] = "InvalidParameterException";
|
|
20
|
+
ChangePasswordException["InvalidPasswordException"] = "InvalidPasswordException";
|
|
21
|
+
ChangePasswordException["LimitExceededException"] = "LimitExceededException";
|
|
22
|
+
ChangePasswordException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
23
|
+
ChangePasswordException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
24
|
+
ChangePasswordException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
25
|
+
ChangePasswordException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
26
|
+
ChangePasswordException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
27
|
+
ChangePasswordException["UserNotFoundException"] = "UserNotFoundException";
|
|
28
|
+
})(ChangePasswordException || (ChangePasswordException = {}));
|
|
29
|
+
export var ConfirmDeviceException;
|
|
30
|
+
(function (ConfirmDeviceException) {
|
|
31
|
+
ConfirmDeviceException["ForbiddenException"] = "ForbiddenException";
|
|
32
|
+
ConfirmDeviceException["InternalErrorException"] = "InternalErrorException";
|
|
33
|
+
ConfirmDeviceException["InvalidLambdaResponseException"] = "InvalidLambdaResponseException";
|
|
34
|
+
ConfirmDeviceException["InvalidParameterException"] = "InvalidParameterException";
|
|
35
|
+
ConfirmDeviceException["InvalidPasswordException"] = "InvalidPasswordException";
|
|
36
|
+
ConfirmDeviceException["InvalidUserPoolConfigurationException"] = "InvalidUserPoolConfigurationException";
|
|
37
|
+
ConfirmDeviceException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
38
|
+
ConfirmDeviceException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
39
|
+
ConfirmDeviceException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
40
|
+
ConfirmDeviceException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
41
|
+
ConfirmDeviceException["UsernameExistsException"] = "UsernameExistsException";
|
|
42
|
+
ConfirmDeviceException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
43
|
+
ConfirmDeviceException["UserNotFoundException"] = "UserNotFoundException";
|
|
44
|
+
})(ConfirmDeviceException || (ConfirmDeviceException = {}));
|
|
45
|
+
export var ConfirmForgotPasswordException;
|
|
46
|
+
(function (ConfirmForgotPasswordException) {
|
|
47
|
+
ConfirmForgotPasswordException["CodeMismatchException"] = "CodeMismatchException";
|
|
48
|
+
ConfirmForgotPasswordException["ExpiredCodeException"] = "ExpiredCodeException";
|
|
49
|
+
ConfirmForgotPasswordException["ForbiddenException"] = "ForbiddenException";
|
|
50
|
+
ConfirmForgotPasswordException["InternalErrorException"] = "InternalErrorException";
|
|
51
|
+
ConfirmForgotPasswordException["InvalidLambdaResponseException"] = "InvalidLambdaResponseException";
|
|
52
|
+
ConfirmForgotPasswordException["InvalidParameterException"] = "InvalidParameterException";
|
|
53
|
+
ConfirmForgotPasswordException["InvalidPasswordException"] = "InvalidPasswordException";
|
|
54
|
+
ConfirmForgotPasswordException["LimitExceededException"] = "LimitExceededException";
|
|
55
|
+
ConfirmForgotPasswordException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
56
|
+
ConfirmForgotPasswordException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
57
|
+
ConfirmForgotPasswordException["TooManyFailedAttemptsException"] = "TooManyFailedAttemptsException";
|
|
58
|
+
ConfirmForgotPasswordException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
59
|
+
ConfirmForgotPasswordException["UnexpectedLambdaException"] = "UnexpectedLambdaException";
|
|
60
|
+
ConfirmForgotPasswordException["UserLambdaValidationException"] = "UserLambdaValidationException";
|
|
61
|
+
ConfirmForgotPasswordException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
62
|
+
ConfirmForgotPasswordException["UserNotFoundException"] = "UserNotFoundException";
|
|
63
|
+
})(ConfirmForgotPasswordException || (ConfirmForgotPasswordException = {}));
|
|
64
|
+
export var ConfirmSignUpException;
|
|
65
|
+
(function (ConfirmSignUpException) {
|
|
66
|
+
ConfirmSignUpException["AliasExistsException"] = "AliasExistsException";
|
|
67
|
+
ConfirmSignUpException["CodeMismatchException"] = "CodeMismatchException";
|
|
68
|
+
ConfirmSignUpException["ExpiredCodeException"] = "ExpiredCodeException";
|
|
69
|
+
ConfirmSignUpException["ForbiddenException"] = "ForbiddenException";
|
|
70
|
+
ConfirmSignUpException["InternalErrorException"] = "InternalErrorException";
|
|
71
|
+
ConfirmSignUpException["InvalidLambdaResponseException"] = "InvalidLambdaResponseException";
|
|
72
|
+
ConfirmSignUpException["InvalidParameterException"] = "InvalidParameterException";
|
|
73
|
+
ConfirmSignUpException["LimitExceededException"] = "LimitExceededException";
|
|
74
|
+
ConfirmSignUpException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
75
|
+
ConfirmSignUpException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
76
|
+
ConfirmSignUpException["TooManyFailedAttemptsException"] = "TooManyFailedAttemptsException";
|
|
77
|
+
ConfirmSignUpException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
78
|
+
ConfirmSignUpException["UnexpectedLambdaException"] = "UnexpectedLambdaException";
|
|
79
|
+
ConfirmSignUpException["UserLambdaValidationException"] = "UserLambdaValidationException";
|
|
80
|
+
ConfirmSignUpException["UserNotFoundException"] = "UserNotFoundException";
|
|
81
|
+
})(ConfirmSignUpException || (ConfirmSignUpException = {}));
|
|
82
|
+
export var DeleteUserAttributesException;
|
|
83
|
+
(function (DeleteUserAttributesException) {
|
|
84
|
+
DeleteUserAttributesException["ForbiddenException"] = "ForbiddenException";
|
|
85
|
+
DeleteUserAttributesException["InternalErrorException"] = "InternalErrorException";
|
|
86
|
+
DeleteUserAttributesException["InvalidParameterException"] = "InvalidParameterException";
|
|
87
|
+
DeleteUserAttributesException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
88
|
+
DeleteUserAttributesException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
89
|
+
DeleteUserAttributesException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
90
|
+
DeleteUserAttributesException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
91
|
+
DeleteUserAttributesException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
92
|
+
DeleteUserAttributesException["UserNotFoundException"] = "UserNotFoundException";
|
|
93
|
+
})(DeleteUserAttributesException || (DeleteUserAttributesException = {}));
|
|
94
|
+
export var DeleteUserException;
|
|
95
|
+
(function (DeleteUserException) {
|
|
96
|
+
DeleteUserException["ForbiddenException"] = "ForbiddenException";
|
|
97
|
+
DeleteUserException["InternalErrorException"] = "InternalErrorException";
|
|
98
|
+
DeleteUserException["InvalidParameterException"] = "InvalidParameterException";
|
|
99
|
+
DeleteUserException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
100
|
+
DeleteUserException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
101
|
+
DeleteUserException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
102
|
+
DeleteUserException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
103
|
+
DeleteUserException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
104
|
+
DeleteUserException["UserNotFoundException"] = "UserNotFoundException";
|
|
105
|
+
})(DeleteUserException || (DeleteUserException = {}));
|
|
106
|
+
export var ForgetDeviceException;
|
|
107
|
+
(function (ForgetDeviceException) {
|
|
108
|
+
ForgetDeviceException["ForbiddenException"] = "ForbiddenException";
|
|
109
|
+
ForgetDeviceException["InternalErrorException"] = "InternalErrorException";
|
|
110
|
+
ForgetDeviceException["InvalidParameterException"] = "InvalidParameterException";
|
|
111
|
+
ForgetDeviceException["InvalidUserPoolConfigurationException"] = "InvalidUserPoolConfigurationException";
|
|
112
|
+
ForgetDeviceException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
113
|
+
ForgetDeviceException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
114
|
+
ForgetDeviceException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
115
|
+
ForgetDeviceException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
116
|
+
ForgetDeviceException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
117
|
+
ForgetDeviceException["UserNotFoundException"] = "UserNotFoundException";
|
|
118
|
+
})(ForgetDeviceException || (ForgetDeviceException = {}));
|
|
119
|
+
export var ForgotPasswordException;
|
|
120
|
+
(function (ForgotPasswordException) {
|
|
121
|
+
ForgotPasswordException["CodeDeliveryFailureException"] = "CodeDeliveryFailureException";
|
|
122
|
+
ForgotPasswordException["ForbiddenException"] = "ForbiddenException";
|
|
123
|
+
ForgotPasswordException["InternalErrorException"] = "InternalErrorException";
|
|
124
|
+
ForgotPasswordException["InvalidEmailRoleAccessPolicyException"] = "InvalidEmailRoleAccessPolicyException";
|
|
125
|
+
ForgotPasswordException["InvalidLambdaResponseException"] = "InvalidLambdaResponseException";
|
|
126
|
+
ForgotPasswordException["InvalidParameterException"] = "InvalidParameterException";
|
|
127
|
+
ForgotPasswordException["InvalidSmsRoleAccessPolicyException"] = "InvalidSmsRoleAccessPolicyException";
|
|
128
|
+
ForgotPasswordException["InvalidSmsRoleTrustRelationshipException"] = "InvalidSmsRoleTrustRelationshipException";
|
|
129
|
+
ForgotPasswordException["LimitExceededException"] = "LimitExceededException";
|
|
130
|
+
ForgotPasswordException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
131
|
+
ForgotPasswordException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
132
|
+
ForgotPasswordException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
133
|
+
ForgotPasswordException["UnexpectedLambdaException"] = "UnexpectedLambdaException";
|
|
134
|
+
ForgotPasswordException["UserLambdaValidationException"] = "UserLambdaValidationException";
|
|
135
|
+
ForgotPasswordException["UserNotFoundException"] = "UserNotFoundException";
|
|
136
|
+
})(ForgotPasswordException || (ForgotPasswordException = {}));
|
|
137
|
+
export var GetUserException;
|
|
138
|
+
(function (GetUserException) {
|
|
139
|
+
GetUserException["ForbiddenException"] = "ForbiddenException";
|
|
140
|
+
GetUserException["InternalErrorException"] = "InternalErrorException";
|
|
141
|
+
GetUserException["InvalidParameterException"] = "InvalidParameterException";
|
|
142
|
+
GetUserException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
143
|
+
GetUserException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
144
|
+
GetUserException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
145
|
+
GetUserException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
146
|
+
GetUserException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
147
|
+
GetUserException["UserNotFoundException"] = "UserNotFoundException";
|
|
148
|
+
})(GetUserException || (GetUserException = {}));
|
|
149
|
+
export var GetIdException;
|
|
150
|
+
(function (GetIdException) {
|
|
151
|
+
GetIdException["ExternalServiceException"] = "ExternalServiceException";
|
|
152
|
+
GetIdException["InternalErrorException"] = "InternalErrorException";
|
|
153
|
+
GetIdException["InvalidParameterException"] = "InvalidParameterException";
|
|
154
|
+
GetIdException["LimitExceededException"] = "LimitExceededException";
|
|
155
|
+
GetIdException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
156
|
+
GetIdException["ResourceConflictException"] = "ResourceConflictException";
|
|
157
|
+
GetIdException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
158
|
+
GetIdException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
159
|
+
})(GetIdException || (GetIdException = {}));
|
|
160
|
+
export var GetCredentialsForIdentityException;
|
|
161
|
+
(function (GetCredentialsForIdentityException) {
|
|
162
|
+
GetCredentialsForIdentityException["ExternalServiceException"] = "ExternalServiceException";
|
|
163
|
+
GetCredentialsForIdentityException["InternalErrorException"] = "InternalErrorException";
|
|
164
|
+
GetCredentialsForIdentityException["InvalidIdentityPoolConfigurationException"] = "InvalidIdentityPoolConfigurationException";
|
|
165
|
+
GetCredentialsForIdentityException["InvalidParameterException"] = "InvalidParameterException";
|
|
166
|
+
GetCredentialsForIdentityException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
167
|
+
GetCredentialsForIdentityException["ResourceConflictException"] = "ResourceConflictException";
|
|
168
|
+
GetCredentialsForIdentityException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
169
|
+
GetCredentialsForIdentityException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
170
|
+
})(GetCredentialsForIdentityException || (GetCredentialsForIdentityException = {}));
|
|
171
|
+
export var GetUserAttributeVerificationException;
|
|
172
|
+
(function (GetUserAttributeVerificationException) {
|
|
173
|
+
GetUserAttributeVerificationException["CodeDeliveryFailureException"] = "CodeDeliveryFailureException";
|
|
174
|
+
GetUserAttributeVerificationException["ForbiddenException"] = "ForbiddenException";
|
|
175
|
+
GetUserAttributeVerificationException["InternalErrorException"] = "InternalErrorException";
|
|
176
|
+
GetUserAttributeVerificationException["InvalidEmailRoleAccessPolicyException"] = "InvalidEmailRoleAccessPolicyException";
|
|
177
|
+
GetUserAttributeVerificationException["InvalidLambdaResponseException"] = "InvalidLambdaResponseException";
|
|
178
|
+
GetUserAttributeVerificationException["InvalidParameterException"] = "InvalidParameterException";
|
|
179
|
+
GetUserAttributeVerificationException["InvalidSmsRoleAccessPolicyException"] = "InvalidSmsRoleAccessPolicyException";
|
|
180
|
+
GetUserAttributeVerificationException["InvalidSmsRoleTrustRelationshipException"] = "InvalidSmsRoleTrustRelationshipException";
|
|
181
|
+
GetUserAttributeVerificationException["LimitExceededException"] = "LimitExceededException";
|
|
182
|
+
GetUserAttributeVerificationException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
183
|
+
GetUserAttributeVerificationException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
184
|
+
GetUserAttributeVerificationException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
185
|
+
GetUserAttributeVerificationException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
186
|
+
GetUserAttributeVerificationException["UnexpectedLambdaException"] = "UnexpectedLambdaException";
|
|
187
|
+
GetUserAttributeVerificationException["UserLambdaValidationException"] = "UserLambdaValidationException";
|
|
188
|
+
GetUserAttributeVerificationException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
189
|
+
GetUserAttributeVerificationException["UserNotFoundException"] = "UserNotFoundException";
|
|
190
|
+
})(GetUserAttributeVerificationException || (GetUserAttributeVerificationException = {}));
|
|
191
|
+
export var GlobalSignOutException;
|
|
192
|
+
(function (GlobalSignOutException) {
|
|
193
|
+
GlobalSignOutException["ForbiddenException"] = "ForbiddenException";
|
|
194
|
+
GlobalSignOutException["InternalErrorException"] = "InternalErrorException";
|
|
195
|
+
GlobalSignOutException["InvalidParameterException"] = "InvalidParameterException";
|
|
196
|
+
GlobalSignOutException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
197
|
+
GlobalSignOutException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
198
|
+
GlobalSignOutException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
199
|
+
GlobalSignOutException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
200
|
+
GlobalSignOutException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
201
|
+
})(GlobalSignOutException || (GlobalSignOutException = {}));
|
|
202
|
+
export var InitiateAuthException;
|
|
203
|
+
(function (InitiateAuthException) {
|
|
204
|
+
InitiateAuthException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
205
|
+
InitiateAuthException["ForbiddenException"] = "ForbiddenException";
|
|
206
|
+
InitiateAuthException["InternalErrorException"] = "InternalErrorException";
|
|
207
|
+
InitiateAuthException["InvalidLambdaResponseException"] = "InvalidLambdaResponseException";
|
|
208
|
+
InitiateAuthException["InvalidParameterException"] = "InvalidParameterException";
|
|
209
|
+
InitiateAuthException["InvalidSmsRoleAccessPolicyException"] = "InvalidSmsRoleAccessPolicyException";
|
|
210
|
+
InitiateAuthException["InvalidSmsRoleTrustRelationshipException"] = "InvalidSmsRoleTrustRelationshipException";
|
|
211
|
+
InitiateAuthException["InvalidUserPoolConfigurationException"] = "InvalidUserPoolConfigurationException";
|
|
212
|
+
InitiateAuthException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
213
|
+
InitiateAuthException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
214
|
+
InitiateAuthException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
215
|
+
InitiateAuthException["UnexpectedLambdaException"] = "UnexpectedLambdaException";
|
|
216
|
+
InitiateAuthException["UserLambdaValidationException"] = "UserLambdaValidationException";
|
|
217
|
+
InitiateAuthException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
218
|
+
InitiateAuthException["UserNotFoundException"] = "UserNotFoundException";
|
|
219
|
+
})(InitiateAuthException || (InitiateAuthException = {}));
|
|
220
|
+
export var ResendConfirmationException;
|
|
221
|
+
(function (ResendConfirmationException) {
|
|
222
|
+
ResendConfirmationException["CodeDeliveryFailureException"] = "CodeDeliveryFailureException";
|
|
223
|
+
ResendConfirmationException["ForbiddenException"] = "ForbiddenException";
|
|
224
|
+
ResendConfirmationException["InternalErrorException"] = "InternalErrorException";
|
|
225
|
+
ResendConfirmationException["InvalidEmailRoleAccessPolicyException"] = "InvalidEmailRoleAccessPolicyException";
|
|
226
|
+
ResendConfirmationException["InvalidLambdaResponseException"] = "InvalidLambdaResponseException";
|
|
227
|
+
ResendConfirmationException["InvalidParameterException"] = "InvalidParameterException";
|
|
228
|
+
ResendConfirmationException["InvalidSmsRoleAccessPolicyException"] = "InvalidSmsRoleAccessPolicyException";
|
|
229
|
+
ResendConfirmationException["InvalidSmsRoleTrustRelationshipException"] = "InvalidSmsRoleTrustRelationshipException";
|
|
230
|
+
ResendConfirmationException["LimitExceededException"] = "LimitExceededException";
|
|
231
|
+
ResendConfirmationException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
232
|
+
ResendConfirmationException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
233
|
+
ResendConfirmationException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
234
|
+
ResendConfirmationException["UnexpectedLambdaException"] = "UnexpectedLambdaException";
|
|
235
|
+
ResendConfirmationException["UserLambdaValidationException"] = "UserLambdaValidationException";
|
|
236
|
+
ResendConfirmationException["UserNotFoundException"] = "UserNotFoundException";
|
|
237
|
+
})(ResendConfirmationException || (ResendConfirmationException = {}));
|
|
238
|
+
export var RespondToAuthChallengeException;
|
|
239
|
+
(function (RespondToAuthChallengeException) {
|
|
240
|
+
RespondToAuthChallengeException["AliasExistsException"] = "AliasExistsException";
|
|
241
|
+
RespondToAuthChallengeException["CodeMismatchException"] = "CodeMismatchException";
|
|
242
|
+
RespondToAuthChallengeException["ExpiredCodeException"] = "ExpiredCodeException";
|
|
243
|
+
RespondToAuthChallengeException["ForbiddenException"] = "ForbiddenException";
|
|
244
|
+
RespondToAuthChallengeException["InternalErrorException"] = "InternalErrorException";
|
|
245
|
+
RespondToAuthChallengeException["InvalidLambdaResponseException"] = "InvalidLambdaResponseException";
|
|
246
|
+
RespondToAuthChallengeException["InvalidParameterException"] = "InvalidParameterException";
|
|
247
|
+
RespondToAuthChallengeException["InvalidPasswordException"] = "InvalidPasswordException";
|
|
248
|
+
RespondToAuthChallengeException["InvalidSmsRoleAccessPolicyException"] = "InvalidSmsRoleAccessPolicyException";
|
|
249
|
+
RespondToAuthChallengeException["InvalidSmsRoleTrustRelationshipException"] = "InvalidSmsRoleTrustRelationshipException";
|
|
250
|
+
RespondToAuthChallengeException["InvalidUserPoolConfigurationException"] = "InvalidUserPoolConfigurationException";
|
|
251
|
+
RespondToAuthChallengeException["MFAMethodNotFoundException"] = "MFAMethodNotFoundException";
|
|
252
|
+
RespondToAuthChallengeException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
253
|
+
RespondToAuthChallengeException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
254
|
+
RespondToAuthChallengeException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
255
|
+
RespondToAuthChallengeException["SoftwareTokenMFANotFoundException"] = "SoftwareTokenMFANotFoundException";
|
|
256
|
+
RespondToAuthChallengeException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
257
|
+
RespondToAuthChallengeException["UnexpectedLambdaException"] = "UnexpectedLambdaException";
|
|
258
|
+
RespondToAuthChallengeException["UserLambdaValidationException"] = "UserLambdaValidationException";
|
|
259
|
+
RespondToAuthChallengeException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
260
|
+
RespondToAuthChallengeException["UserNotFoundException"] = "UserNotFoundException";
|
|
261
|
+
})(RespondToAuthChallengeException || (RespondToAuthChallengeException = {}));
|
|
262
|
+
export var SetUserMFAPreferenceException;
|
|
263
|
+
(function (SetUserMFAPreferenceException) {
|
|
264
|
+
SetUserMFAPreferenceException["ForbiddenException"] = "ForbiddenException";
|
|
265
|
+
SetUserMFAPreferenceException["InternalErrorException"] = "InternalErrorException";
|
|
266
|
+
SetUserMFAPreferenceException["InvalidParameterException"] = "InvalidParameterException";
|
|
267
|
+
SetUserMFAPreferenceException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
268
|
+
SetUserMFAPreferenceException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
269
|
+
SetUserMFAPreferenceException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
270
|
+
SetUserMFAPreferenceException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
271
|
+
SetUserMFAPreferenceException["UserNotFoundException"] = "UserNotFoundException";
|
|
272
|
+
})(SetUserMFAPreferenceException || (SetUserMFAPreferenceException = {}));
|
|
273
|
+
export var SignUpException;
|
|
274
|
+
(function (SignUpException) {
|
|
275
|
+
SignUpException["CodeDeliveryFailureException"] = "CodeDeliveryFailureException";
|
|
276
|
+
SignUpException["InternalErrorException"] = "InternalErrorException";
|
|
277
|
+
SignUpException["InvalidEmailRoleAccessPolicyException"] = "InvalidEmailRoleAccessPolicyException";
|
|
278
|
+
SignUpException["InvalidLambdaResponseException"] = "InvalidLambdaResponseException";
|
|
279
|
+
SignUpException["InvalidParameterException"] = "InvalidParameterException";
|
|
280
|
+
SignUpException["InvalidPasswordException"] = "InvalidPasswordException";
|
|
281
|
+
SignUpException["InvalidSmsRoleAccessPolicyException"] = "InvalidSmsRoleAccessPolicyException";
|
|
282
|
+
SignUpException["InvalidSmsRoleTrustRelationshipException"] = "InvalidSmsRoleTrustRelationshipException";
|
|
283
|
+
SignUpException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
284
|
+
SignUpException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
285
|
+
SignUpException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
286
|
+
SignUpException["UnexpectedLambdaException"] = "UnexpectedLambdaException";
|
|
287
|
+
SignUpException["UserLambdaValidationException"] = "UserLambdaValidationException";
|
|
288
|
+
SignUpException["UsernameExistsException"] = "UsernameExistsException";
|
|
289
|
+
})(SignUpException || (SignUpException = {}));
|
|
290
|
+
export var UpdateUserAttributesException;
|
|
291
|
+
(function (UpdateUserAttributesException) {
|
|
292
|
+
UpdateUserAttributesException["AliasExistsException"] = "AliasExistsException";
|
|
293
|
+
UpdateUserAttributesException["CodeDeliveryFailureException"] = "CodeDeliveryFailureException";
|
|
294
|
+
UpdateUserAttributesException["CodeMismatchException"] = "CodeMismatchException";
|
|
295
|
+
UpdateUserAttributesException["ExpiredCodeException"] = "ExpiredCodeException";
|
|
296
|
+
UpdateUserAttributesException["ForbiddenException"] = "ForbiddenException";
|
|
297
|
+
UpdateUserAttributesException["InternalErrorException"] = "InternalErrorException";
|
|
298
|
+
UpdateUserAttributesException["InvalidEmailRoleAccessPolicyException"] = "InvalidEmailRoleAccessPolicyException";
|
|
299
|
+
UpdateUserAttributesException["InvalidLambdaResponseException"] = "InvalidLambdaResponseException";
|
|
300
|
+
UpdateUserAttributesException["InvalidParameterException"] = "InvalidParameterException";
|
|
301
|
+
UpdateUserAttributesException["InvalidSmsRoleAccessPolicyException"] = "InvalidSmsRoleAccessPolicyException";
|
|
302
|
+
UpdateUserAttributesException["InvalidSmsRoleTrustRelationshipException"] = "InvalidSmsRoleTrustRelationshipException";
|
|
303
|
+
UpdateUserAttributesException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
304
|
+
UpdateUserAttributesException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
305
|
+
UpdateUserAttributesException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
306
|
+
UpdateUserAttributesException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
307
|
+
UpdateUserAttributesException["UnexpectedLambdaException"] = "UnexpectedLambdaException";
|
|
308
|
+
UpdateUserAttributesException["UserLambdaValidationException"] = "UserLambdaValidationException";
|
|
309
|
+
UpdateUserAttributesException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
310
|
+
UpdateUserAttributesException["UserNotFoundException"] = "UserNotFoundException";
|
|
311
|
+
})(UpdateUserAttributesException || (UpdateUserAttributesException = {}));
|
|
312
|
+
export var VerifySoftwareTokenException;
|
|
313
|
+
(function (VerifySoftwareTokenException) {
|
|
314
|
+
VerifySoftwareTokenException["CodeMismatchException"] = "CodeMismatchException";
|
|
315
|
+
VerifySoftwareTokenException["EnableSoftwareTokenMFAException"] = "EnableSoftwareTokenMFAException";
|
|
316
|
+
VerifySoftwareTokenException["ForbiddenException"] = "ForbiddenException";
|
|
317
|
+
VerifySoftwareTokenException["InternalErrorException"] = "InternalErrorException";
|
|
318
|
+
VerifySoftwareTokenException["InvalidParameterException"] = "InvalidParameterException";
|
|
319
|
+
VerifySoftwareTokenException["InvalidUserPoolConfigurationException"] = "InvalidUserPoolConfigurationException";
|
|
320
|
+
VerifySoftwareTokenException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
321
|
+
VerifySoftwareTokenException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
322
|
+
VerifySoftwareTokenException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
323
|
+
VerifySoftwareTokenException["SoftwareTokenMFANotFoundException"] = "SoftwareTokenMFANotFoundException";
|
|
324
|
+
VerifySoftwareTokenException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
325
|
+
VerifySoftwareTokenException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
326
|
+
VerifySoftwareTokenException["UserNotFoundException"] = "UserNotFoundException";
|
|
327
|
+
})(VerifySoftwareTokenException || (VerifySoftwareTokenException = {}));
|
|
328
|
+
export var VerifyUserAttributeException;
|
|
329
|
+
(function (VerifyUserAttributeException) {
|
|
330
|
+
VerifyUserAttributeException["AliasExistsException"] = "AliasExistsException";
|
|
331
|
+
VerifyUserAttributeException["CodeMismatchException"] = "CodeMismatchException";
|
|
332
|
+
VerifyUserAttributeException["ExpiredCodeException"] = "ExpiredCodeException";
|
|
333
|
+
VerifyUserAttributeException["ForbiddenException"] = "ForbiddenException";
|
|
334
|
+
VerifyUserAttributeException["InternalErrorException"] = "InternalErrorException";
|
|
335
|
+
VerifyUserAttributeException["InvalidParameterException"] = "InvalidParameterException";
|
|
336
|
+
VerifyUserAttributeException["LimitExceededException"] = "LimitExceededException";
|
|
337
|
+
VerifyUserAttributeException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
338
|
+
VerifyUserAttributeException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
339
|
+
VerifyUserAttributeException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
340
|
+
VerifyUserAttributeException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
341
|
+
VerifyUserAttributeException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
342
|
+
VerifyUserAttributeException["UserNotFoundException"] = "UserNotFoundException";
|
|
343
|
+
})(VerifyUserAttributeException || (VerifyUserAttributeException = {}));
|
|
344
|
+
export var UpdateDeviceStatusException;
|
|
345
|
+
(function (UpdateDeviceStatusException) {
|
|
346
|
+
UpdateDeviceStatusException["ForbiddenException"] = "ForbiddenException";
|
|
347
|
+
UpdateDeviceStatusException["InternalErrorException"] = "InternalErrorException";
|
|
348
|
+
UpdateDeviceStatusException["InvalidParameterException"] = "InvalidParameterException";
|
|
349
|
+
UpdateDeviceStatusException["InvalidUserPoolConfigurationException"] = "InvalidUserPoolConfigurationException";
|
|
350
|
+
UpdateDeviceStatusException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
351
|
+
UpdateDeviceStatusException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
352
|
+
UpdateDeviceStatusException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
353
|
+
UpdateDeviceStatusException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
354
|
+
UpdateDeviceStatusException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
355
|
+
UpdateDeviceStatusException["UserNotFoundException"] = "UserNotFoundException";
|
|
356
|
+
})(UpdateDeviceStatusException || (UpdateDeviceStatusException = {}));
|
|
357
|
+
export var ListDevicesException;
|
|
358
|
+
(function (ListDevicesException) {
|
|
359
|
+
ListDevicesException["ForbiddenException"] = "ForbiddenException";
|
|
360
|
+
ListDevicesException["InternalErrorException"] = "InternalErrorException";
|
|
361
|
+
ListDevicesException["InvalidParameterException"] = "InvalidParameterException";
|
|
362
|
+
ListDevicesException["InvalidUserPoolConfigurationException"] = "InvalidUserPoolConfigurationException";
|
|
363
|
+
ListDevicesException["NotAuthorizedException"] = "NotAuthorizedException";
|
|
364
|
+
ListDevicesException["PasswordResetRequiredException"] = "PasswordResetRequiredException";
|
|
365
|
+
ListDevicesException["ResourceNotFoundException"] = "ResourceNotFoundException";
|
|
366
|
+
ListDevicesException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
367
|
+
ListDevicesException["UserNotConfirmedException"] = "UserNotConfirmedException";
|
|
368
|
+
ListDevicesException["UserNotFoundException"] = "UserNotFoundException";
|
|
369
|
+
})(ListDevicesException || (ListDevicesException = {}));
|
|
370
|
+
export var RevokeTokenException;
|
|
371
|
+
(function (RevokeTokenException) {
|
|
372
|
+
RevokeTokenException["ForbiddenException"] = "ForbiddenException";
|
|
373
|
+
RevokeTokenException["InternalErrorException"] = "InternalErrorException";
|
|
374
|
+
RevokeTokenException["InvalidParameterException"] = "InvalidParameterException";
|
|
375
|
+
RevokeTokenException["TooManyRequestsException"] = "TooManyRequestsException";
|
|
376
|
+
RevokeTokenException["UnauthorizedException"] = "UnauthorizedException";
|
|
377
|
+
RevokeTokenException["UnsupportedOperationException"] = "UnsupportedOperationException";
|
|
378
|
+
RevokeTokenException["UnsupportedTokenTypeException"] = "UnsupportedTokenTypeException";
|
|
379
|
+
})(RevokeTokenException || (RevokeTokenException = {}));
|
|
115
380
|
export class CognitoError extends Error {
|
|
116
381
|
constructor(message, cognitoException) {
|
|
117
382
|
super(message);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vardario/cognito-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sahin Vardar",
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"semantic-release": "^22.0.8",
|
|
46
46
|
"testcontainers": "^10.2.2",
|
|
47
47
|
"typescript": "^5.2.2",
|
|
48
|
-
"vitest": "^0.34.6"
|
|
48
|
+
"vitest": "^0.34.6",
|
|
49
|
+
"vitest-fetch-mock": "^0.2.2"
|
|
49
50
|
},
|
|
50
51
|
"lint-staged": {
|
|
51
52
|
"*": [
|