idea-aws 4.4.17 → 4.4.19

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.
@@ -80,7 +80,7 @@ export declare class Cognito {
80
80
  /**
81
81
  * Change the email address (== username) associated to a user.
82
82
  */
83
- updateEmail(email: string, newEmail: string, userPoolId: string): Promise<void>;
83
+ updateEmail(email: string, newEmail: string, userPoolId: string, globalSignOut?: boolean): Promise<void>;
84
84
  /**
85
85
  * Verify the email address (== username) associated to a user.
86
86
  */
@@ -249,7 +249,7 @@ class Cognito {
249
249
  /**
250
250
  * Change the email address (== username) associated to a user.
251
251
  */
252
- async updateEmail(email, newEmail, userPoolId) {
252
+ async updateEmail(email, newEmail, userPoolId, globalSignOut = false) {
253
253
  if ((0, idea_toolbox_1.isEmpty)(newEmail, 'email'))
254
254
  throw new Error('Invalid new email');
255
255
  const command = new CognitoIP.AdminUpdateUserAttributesCommand({
@@ -261,8 +261,9 @@ class Cognito {
261
261
  ]
262
262
  });
263
263
  await this.client.send(command);
264
- // sign out the user from all its devices and resolve
265
- await this.globalSignOut(newEmail, userPoolId);
264
+ // sign out the user from all its devices
265
+ if (globalSignOut)
266
+ await this.globalSignOut(newEmail, userPoolId);
266
267
  }
267
268
  /**
268
269
  * Verify the email address (== username) associated to a user.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idea-aws",
3
- "version": "4.4.17",
3
+ "version": "4.4.19",
4
4
  "description": "AWS wrappers to use in IDEA's back-ends",
5
5
  "license": "MPL-2.0",
6
6
  "main": "dist/index.js",
@@ -39,7 +39,7 @@
39
39
  "dependencies": {
40
40
  "@aws-lambda-powertools/metrics": "^1.18.1",
41
41
  "@aws-lambda-powertools/tracer": "^1.18.1",
42
- "idea-toolbox": "^7.0.11",
42
+ "idea-toolbox": "^7.1.0",
43
43
  "nanoid": "^3.3.7",
44
44
  "nodemailer": "^6.9.14",
45
45
  "source-map-support": "^0.5.21"