@stackfactor/client-api 1.1.112 → 1.1.113

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 (2) hide show
  1. package/lib/users.js +29 -0
  2. package/package.json +1 -1
package/lib/users.js CHANGED
@@ -548,6 +548,34 @@ const resetPassword = (email, code, password) => {
548
548
  });
549
549
  };
550
550
 
551
+ /**
552
+ * Send email confirmation code
553
+ * @param {String} email
554
+ * @param {String} token
555
+ * @returns
556
+ */
557
+ const sendEmailConfirmationCode = (email, token) => {
558
+ return new Promise(function (resolve, reject) {
559
+ let postData = {
560
+ email: email,
561
+ };
562
+ let request = client.post(
563
+ "api/v1/users/sendemailconfirmationcode",
564
+ postData,
565
+ {
566
+ headers: { authorization: token },
567
+ }
568
+ );
569
+ request
570
+ .then((response) => {
571
+ resolve(response.data);
572
+ })
573
+ .catch((error) => {
574
+ reject(error);
575
+ });
576
+ });
577
+ };
578
+
551
579
  /**
552
580
  * Send an email to the user indicated by the email address to reset the password. It returns a promise
553
581
  * @param {String} email Email of the user who needs to reset the password
@@ -736,6 +764,7 @@ export default {
736
764
  removeAPIToken,
737
765
  resendInvitationEmails,
738
766
  resetPassword,
767
+ sendEmailConfirmationCode,
739
768
  sendPasswordResetNotification,
740
769
  setUserInformation,
741
770
  updateUserEmail,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.1.112",
3
+ "version": "1.1.113",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {