@aws-sdk/client-cognito-identity-provider 3.398.0 → 3.403.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 (39) hide show
  1. package/dist-cjs/commands/AssociateSoftwareTokenCommand.js +0 -2
  2. package/dist-cjs/commands/ConfirmDeviceCommand.js +0 -2
  3. package/dist-cjs/commands/ForgetDeviceCommand.js +0 -2
  4. package/dist-cjs/commands/GetDeviceCommand.js +0 -2
  5. package/dist-cjs/commands/GlobalSignOutCommand.js +0 -2
  6. package/dist-cjs/commands/ListDevicesCommand.js +0 -2
  7. package/dist-cjs/commands/RevokeTokenCommand.js +0 -2
  8. package/dist-cjs/commands/SetUserMFAPreferenceCommand.js +0 -2
  9. package/dist-cjs/commands/UpdateAuthEventFeedbackCommand.js +0 -2
  10. package/dist-cjs/commands/UpdateDeviceStatusCommand.js +0 -2
  11. package/dist-cjs/commands/VerifySoftwareTokenCommand.js +1 -3
  12. package/dist-cjs/endpoint/ruleset.js +1 -1
  13. package/dist-cjs/models/models_0.js +22 -2
  14. package/dist-cjs/models/models_1.js +9 -1
  15. package/dist-es/commands/AssociateSoftwareTokenCommand.js +0 -2
  16. package/dist-es/commands/ConfirmDeviceCommand.js +0 -2
  17. package/dist-es/commands/ForgetDeviceCommand.js +0 -2
  18. package/dist-es/commands/GetDeviceCommand.js +0 -2
  19. package/dist-es/commands/GlobalSignOutCommand.js +0 -2
  20. package/dist-es/commands/ListDevicesCommand.js +0 -2
  21. package/dist-es/commands/RevokeTokenCommand.js +0 -2
  22. package/dist-es/commands/SetUserMFAPreferenceCommand.js +0 -2
  23. package/dist-es/commands/UpdateAuthEventFeedbackCommand.js +0 -2
  24. package/dist-es/commands/UpdateDeviceStatusCommand.js +0 -2
  25. package/dist-es/commands/VerifySoftwareTokenCommand.js +2 -4
  26. package/dist-es/endpoint/ruleset.js +1 -1
  27. package/dist-es/models/models_0.js +19 -0
  28. package/dist-es/models/models_1.js +7 -0
  29. package/dist-types/commands/AdminCreateUserCommand.d.ts +60 -0
  30. package/dist-types/commands/AdminUpdateUserAttributesCommand.d.ts +2 -1
  31. package/dist-types/commands/CreateUserPoolClientCommand.d.ts +128 -0
  32. package/dist-types/commands/CreateUserPoolCommand.d.ts +456 -0
  33. package/dist-types/commands/InitiateAuthCommand.d.ts +37 -0
  34. package/dist-types/commands/ListUsersCommand.d.ts +76 -0
  35. package/dist-types/models/models_0.d.ts +18 -5
  36. package/dist-types/models/models_1.d.ts +4 -0
  37. package/dist-types/ts3.4/models/models_0.d.ts +3 -0
  38. package/dist-types/ts3.4/models/models_1.d.ts +3 -0
  39. package/package.json +1 -1
@@ -773,6 +773,7 @@ export const AuthenticationResultTypeFilterSensitiveLog = (obj) => ({
773
773
  });
774
774
  export const AdminInitiateAuthResponseFilterSensitiveLog = (obj) => ({
775
775
  ...obj,
776
+ ...(obj.Session && { Session: SENSITIVE_STRING }),
776
777
  ...(obj.AuthenticationResult && {
777
778
  AuthenticationResult: AuthenticationResultTypeFilterSensitiveLog(obj.AuthenticationResult),
778
779
  }),
@@ -803,9 +804,12 @@ export const AdminResetUserPasswordRequestFilterSensitiveLog = (obj) => ({
803
804
  export const AdminRespondToAuthChallengeRequestFilterSensitiveLog = (obj) => ({
804
805
  ...obj,
805
806
  ...(obj.ClientId && { ClientId: SENSITIVE_STRING }),
807
+ ...(obj.ChallengeResponses && { ChallengeResponses: SENSITIVE_STRING }),
808
+ ...(obj.Session && { Session: SENSITIVE_STRING }),
806
809
  });
807
810
  export const AdminRespondToAuthChallengeResponseFilterSensitiveLog = (obj) => ({
808
811
  ...obj,
812
+ ...(obj.Session && { Session: SENSITIVE_STRING }),
809
813
  ...(obj.AuthenticationResult && {
810
814
  AuthenticationResult: AuthenticationResultTypeFilterSensitiveLog(obj.AuthenticationResult),
811
815
  }),
@@ -845,10 +849,12 @@ export const AdminUserGlobalSignOutRequestFilterSensitiveLog = (obj) => ({
845
849
  export const AssociateSoftwareTokenRequestFilterSensitiveLog = (obj) => ({
846
850
  ...obj,
847
851
  ...(obj.AccessToken && { AccessToken: SENSITIVE_STRING }),
852
+ ...(obj.Session && { Session: SENSITIVE_STRING }),
848
853
  });
849
854
  export const AssociateSoftwareTokenResponseFilterSensitiveLog = (obj) => ({
850
855
  ...obj,
851
856
  ...(obj.SecretCode && { SecretCode: SENSITIVE_STRING }),
857
+ ...(obj.Session && { Session: SENSITIVE_STRING }),
852
858
  });
853
859
  export const ChangePasswordRequestFilterSensitiveLog = (obj) => ({
854
860
  ...obj,
@@ -860,18 +866,23 @@ export const ConfirmDeviceRequestFilterSensitiveLog = (obj) => ({
860
866
  ...obj,
861
867
  ...(obj.AccessToken && { AccessToken: SENSITIVE_STRING }),
862
868
  });
869
+ export const UserContextDataTypeFilterSensitiveLog = (obj) => ({
870
+ ...obj,
871
+ });
863
872
  export const ConfirmForgotPasswordRequestFilterSensitiveLog = (obj) => ({
864
873
  ...obj,
865
874
  ...(obj.ClientId && { ClientId: SENSITIVE_STRING }),
866
875
  ...(obj.SecretHash && { SecretHash: SENSITIVE_STRING }),
867
876
  ...(obj.Username && { Username: SENSITIVE_STRING }),
868
877
  ...(obj.Password && { Password: SENSITIVE_STRING }),
878
+ ...(obj.UserContextData && { UserContextData: SENSITIVE_STRING }),
869
879
  });
870
880
  export const ConfirmSignUpRequestFilterSensitiveLog = (obj) => ({
871
881
  ...obj,
872
882
  ...(obj.ClientId && { ClientId: SENSITIVE_STRING }),
873
883
  ...(obj.SecretHash && { SecretHash: SENSITIVE_STRING }),
874
884
  ...(obj.Username && { Username: SENSITIVE_STRING }),
885
+ ...(obj.UserContextData && { UserContextData: SENSITIVE_STRING }),
875
886
  });
876
887
  export const UserPoolClientTypeFilterSensitiveLog = (obj) => ({
877
888
  ...obj,
@@ -922,6 +933,7 @@ export const ForgotPasswordRequestFilterSensitiveLog = (obj) => ({
922
933
  ...obj,
923
934
  ...(obj.ClientId && { ClientId: SENSITIVE_STRING }),
924
935
  ...(obj.SecretHash && { SecretHash: SENSITIVE_STRING }),
936
+ ...(obj.UserContextData && { UserContextData: SENSITIVE_STRING }),
925
937
  ...(obj.Username && { Username: SENSITIVE_STRING }),
926
938
  });
927
939
  export const GetDeviceRequestFilterSensitiveLog = (obj) => ({
@@ -967,9 +979,11 @@ export const InitiateAuthRequestFilterSensitiveLog = (obj) => ({
967
979
  ...obj,
968
980
  ...(obj.AuthParameters && { AuthParameters: SENSITIVE_STRING }),
969
981
  ...(obj.ClientId && { ClientId: SENSITIVE_STRING }),
982
+ ...(obj.UserContextData && { UserContextData: SENSITIVE_STRING }),
970
983
  });
971
984
  export const InitiateAuthResponseFilterSensitiveLog = (obj) => ({
972
985
  ...obj,
986
+ ...(obj.Session && { Session: SENSITIVE_STRING }),
973
987
  ...(obj.AuthenticationResult && {
974
988
  AuthenticationResult: AuthenticationResultTypeFilterSensitiveLog(obj.AuthenticationResult),
975
989
  }),
@@ -1003,14 +1017,19 @@ export const ResendConfirmationCodeRequestFilterSensitiveLog = (obj) => ({
1003
1017
  ...obj,
1004
1018
  ...(obj.ClientId && { ClientId: SENSITIVE_STRING }),
1005
1019
  ...(obj.SecretHash && { SecretHash: SENSITIVE_STRING }),
1020
+ ...(obj.UserContextData && { UserContextData: SENSITIVE_STRING }),
1006
1021
  ...(obj.Username && { Username: SENSITIVE_STRING }),
1007
1022
  });
1008
1023
  export const RespondToAuthChallengeRequestFilterSensitiveLog = (obj) => ({
1009
1024
  ...obj,
1010
1025
  ...(obj.ClientId && { ClientId: SENSITIVE_STRING }),
1026
+ ...(obj.Session && { Session: SENSITIVE_STRING }),
1027
+ ...(obj.ChallengeResponses && { ChallengeResponses: SENSITIVE_STRING }),
1028
+ ...(obj.UserContextData && { UserContextData: SENSITIVE_STRING }),
1011
1029
  });
1012
1030
  export const RespondToAuthChallengeResponseFilterSensitiveLog = (obj) => ({
1013
1031
  ...obj,
1032
+ ...(obj.Session && { Session: SENSITIVE_STRING }),
1014
1033
  ...(obj.AuthenticationResult && {
1015
1034
  AuthenticationResult: AuthenticationResultTypeFilterSensitiveLog(obj.AuthenticationResult),
1016
1035
  }),
@@ -49,6 +49,7 @@ export const SignUpRequestFilterSensitiveLog = (obj) => ({
49
49
  ...(obj.ValidationData && {
50
50
  ValidationData: obj.ValidationData.map((item) => AttributeTypeFilterSensitiveLog(item)),
51
51
  }),
52
+ ...(obj.UserContextData && { UserContextData: SENSITIVE_STRING }),
52
53
  });
53
54
  export const UpdateAuthEventFeedbackRequestFilterSensitiveLog = (obj) => ({
54
55
  ...obj,
@@ -77,6 +78,12 @@ export const UpdateUserPoolClientResponseFilterSensitiveLog = (obj) => ({
77
78
  export const VerifySoftwareTokenRequestFilterSensitiveLog = (obj) => ({
78
79
  ...obj,
79
80
  ...(obj.AccessToken && { AccessToken: SENSITIVE_STRING }),
81
+ ...(obj.Session && { Session: SENSITIVE_STRING }),
82
+ ...(obj.UserCode && { UserCode: SENSITIVE_STRING }),
83
+ });
84
+ export const VerifySoftwareTokenResponseFilterSensitiveLog = (obj) => ({
85
+ ...obj,
86
+ ...(obj.Session && { Session: SENSITIVE_STRING }),
80
87
  });
81
88
  export const VerifyUserAttributeRequestFilterSensitiveLog = (obj) => ({
82
89
  ...obj,
@@ -195,6 +195,66 @@ export interface AdminCreateUserCommandOutput extends AdminCreateUserResponse, _
195
195
  * @throws {@link CognitoIdentityProviderServiceException}
196
196
  * <p>Base exception class for all service exceptions from CognitoIdentityProvider service.</p>
197
197
  *
198
+ * @example An AdminCreateUser request for for a test user named John.
199
+ * ```javascript
200
+ * // This request submits a value for all possible parameters for AdminCreateUser.
201
+ * const input = {
202
+ * "DesiredDeliveryMediums": [
203
+ * "SMS"
204
+ * ],
205
+ * "MessageAction": "SUPPRESS",
206
+ * "TemporaryPassword": "This-is-my-test-99!",
207
+ * "UserAttributes": [
208
+ * {
209
+ * "Name": "name",
210
+ * "Value": "John"
211
+ * },
212
+ * {
213
+ * "Name": "phone_number",
214
+ * "Value": "+12065551212"
215
+ * },
216
+ * {
217
+ * "Name": "email",
218
+ * "Value": "testuser@example.com"
219
+ * }
220
+ * ],
221
+ * "UserPoolId": "us-east-1_EXAMPLE",
222
+ * "Username": "testuser"
223
+ * };
224
+ * const command = new AdminCreateUserCommand(input);
225
+ * const response = await client.send(command);
226
+ * /* response ==
227
+ * {
228
+ * "User": {
229
+ * "Attributes": [
230
+ * {
231
+ * "Name": "sub",
232
+ * "Value": "d16b4aa8-8633-4abd-93b3-5062a8e1b5f8"
233
+ * },
234
+ * {
235
+ * "Name": "name",
236
+ * "Value": "John"
237
+ * },
238
+ * {
239
+ * "Name": "phone_number",
240
+ * "Value": "+12065551212"
241
+ * },
242
+ * {
243
+ * "Name": "email",
244
+ * "Value": "testuser@example.com"
245
+ * }
246
+ * ],
247
+ * "Enabled": true,
248
+ * "UserCreateDate": 1689980857.949,
249
+ * "UserLastModifiedDate": 1689980857.949,
250
+ * "UserStatus": "FORCE_CHANGE_PASSWORD",
251
+ * "Username": "testuser"
252
+ * }
253
+ * }
254
+ * *\/
255
+ * // example id: an-admincreateuser-request-for-for-a-test-user-named-john-1689980900481
256
+ * ```
257
+ *
198
258
  */
199
259
  export declare class AdminCreateUserCommand extends $Command<AdminCreateUserCommandInput, AdminCreateUserCommandOutput, CognitoIdentityProviderClientResolvedConfig> {
200
260
  readonly input: AdminCreateUserCommandInput;
@@ -41,7 +41,8 @@ export interface AdminUpdateUserAttributesCommandOutput extends AdminUpdateUserA
41
41
  * Developer Guide</i>.</p>
42
42
  * </note>
43
43
  * <p>Updates the specified user's attributes, including developer attributes, as an
44
- * administrator. Works on any user.</p>
44
+ * administrator. Works on any user. To delete an attribute from your user, submit the
45
+ * attribute in your API request with a blank value.</p>
45
46
  * <p>For custom attributes, you must prepend the <code>custom:</code> prefix to the
46
47
  * attribute name.</p>
47
48
  * <p>In addition to updating user attributes, this API can also be used to mark phone and
@@ -202,6 +202,134 @@ export interface CreateUserPoolClientCommandOutput extends CreateUserPoolClientR
202
202
  * @throws {@link CognitoIdentityProviderServiceException}
203
203
  * <p>Base exception class for all service exceptions from CognitoIdentityProvider service.</p>
204
204
  *
205
+ * @example Example user pool app client with email and username sign-in
206
+ * ```javascript
207
+ * // The following example creates an app client with all configurable properties set to an example value. The resulting user pool client connects to an analytics client, allows sign-in with username and password, and has two external identity providers associated with it.
208
+ * const input = {
209
+ * "AccessTokenValidity": 6,
210
+ * "AllowedOAuthFlows": [
211
+ * "code"
212
+ * ],
213
+ * "AllowedOAuthFlowsUserPoolClient": true,
214
+ * "AllowedOAuthScopes": [
215
+ * "aws.cognito.signin.user.admin",
216
+ * "openid"
217
+ * ],
218
+ * "AnalyticsConfiguration": {
219
+ * "ApplicationId": "d70b2ba36a8c4dc5a04a0451a31a1e12",
220
+ * "ExternalId": "my-external-id",
221
+ * "RoleArn": "arn:aws:iam::123456789012:role/test-cognitouserpool-role",
222
+ * "UserDataShared": true
223
+ * },
224
+ * "CallbackURLs": [
225
+ * "https://example.com",
226
+ * "http://localhost",
227
+ * "myapp://example"
228
+ * ],
229
+ * "ClientName": "my-test-app-client",
230
+ * "DefaultRedirectURI": "https://example.com",
231
+ * "ExplicitAuthFlows": [
232
+ * "ALLOW_ADMIN_USER_PASSWORD_AUTH",
233
+ * "ALLOW_USER_PASSWORD_AUTH",
234
+ * "ALLOW_REFRESH_TOKEN_AUTH"
235
+ * ],
236
+ * "GenerateSecret": true,
237
+ * "IdTokenValidity": 6,
238
+ * "LogoutURLs": [
239
+ * "https://example.com/logout"
240
+ * ],
241
+ * "PreventUserExistenceErrors": "ENABLED",
242
+ * "ReadAttributes": [
243
+ * "email",
244
+ * "address",
245
+ * "preferred_username"
246
+ * ],
247
+ * "RefreshTokenValidity": 6,
248
+ * "SupportedIdentityProviders": [
249
+ * "SignInWithApple",
250
+ * "MySSO"
251
+ * ],
252
+ * "TokenValidityUnits": {
253
+ * "AccessToken": "hours",
254
+ * "IdToken": "minutes",
255
+ * "RefreshToken": "days"
256
+ * },
257
+ * "UserPoolId": "us-east-1_EXAMPLE",
258
+ * "WriteAttributes": [
259
+ * "family_name",
260
+ * "email"
261
+ * ]
262
+ * };
263
+ * const command = new CreateUserPoolClientCommand(input);
264
+ * const response = await client.send(command);
265
+ * /* response ==
266
+ * {
267
+ * "UserPoolClient": {
268
+ * "AccessTokenValidity": 6,
269
+ * "AllowedOAuthFlows": [
270
+ * "code"
271
+ * ],
272
+ * "AllowedOAuthFlowsUserPoolClient": true,
273
+ * "AllowedOAuthScopes": [
274
+ * "aws.cognito.signin.user.admin",
275
+ * "openid"
276
+ * ],
277
+ * "AnalyticsConfiguration": {
278
+ * "ApplicationId": "d70b2ba36a8c4dc5a04a0451a31a1e12",
279
+ * "ExternalId": "my-external-id",
280
+ * "RoleArn": "arn:aws:iam::123456789012:role/test-cognitouserpool-role",
281
+ * "UserDataShared": true
282
+ * },
283
+ * "AuthSessionValidity": 3,
284
+ * "CallbackURLs": [
285
+ * "https://example.com",
286
+ * "http://localhost",
287
+ * "myapp://example"
288
+ * ],
289
+ * "ClientId": "26cb2c60kq7nbmas7rbme9b6pp",
290
+ * "ClientName": "my-test-app-client",
291
+ * "ClientSecret": "13ka4h7u28d9oo44tqpq9djqsfvhvu8rk4d2ighvpu0k8fj1c2r9",
292
+ * "CreationDate": 1689885426.107,
293
+ * "DefaultRedirectURI": "https://example.com",
294
+ * "EnablePropagateAdditionalUserContextData": false,
295
+ * "EnableTokenRevocation": true,
296
+ * "ExplicitAuthFlows": [
297
+ * "ALLOW_USER_PASSWORD_AUTH",
298
+ * "ALLOW_ADMIN_USER_PASSWORD_AUTH",
299
+ * "ALLOW_REFRESH_TOKEN_AUTH"
300
+ * ],
301
+ * "IdTokenValidity": 6,
302
+ * "LastModifiedDate": 1689885426.107,
303
+ * "LogoutURLs": [
304
+ * "https://example.com/logout"
305
+ * ],
306
+ * "PreventUserExistenceErrors": "ENABLED",
307
+ * "ReadAttributes": [
308
+ * "address",
309
+ * "preferred_username",
310
+ * "email"
311
+ * ],
312
+ * "RefreshTokenValidity": 6,
313
+ * "SupportedIdentityProviders": [
314
+ * "SignInWithApple",
315
+ * "MySSO"
316
+ * ],
317
+ * "TokenValidityUnits": {
318
+ * "AccessToken": "hours",
319
+ * "IdToken": "minutes",
320
+ * "RefreshToken": "days"
321
+ * },
322
+ * "UserPoolId": "us-east-1_EXAMPLE",
323
+ * "WriteAttributes": [
324
+ * "family_name",
325
+ * "email"
326
+ * ]
327
+ * }
328
+ * }
329
+ * *\/
330
+ * // example id: example-user-pool-app-client-with-email-and-username-sign-in-1689885750745
331
+ * ```
332
+ *
205
333
  */
206
334
  export declare class CreateUserPoolClientCommand extends $Command<CreateUserPoolClientCommandInput, CreateUserPoolClientCommandOutput, CognitoIdentityProviderClientResolvedConfig> {
207
335
  readonly input: CreateUserPoolClientCommandInput;