diff --git a/__tests__/__snapshots__/index.js.snap b/__tests__/__snapshots__/index.js.snap
index 151af59b..7994385b 100644
--- a/__tests__/__snapshots__/index.js.snap
+++ b/__tests__/__snapshots__/index.js.snap
@@ -129,6 +129,8 @@ Object {
"updateProfileInit": [Function],
"uploadPhotoDone": [Function],
"uploadPhotoInit": [Function],
+ "verifyMemberNewEmailDone": [Function],
+ "verifyMemberNewEmailInit": [Function],
},
"reviewOpportunity": Object {
"cancelApplicationsDone": [Function],
diff --git a/__tests__/actions/__snapshots__/profile.js.snap b/__tests__/actions/__snapshots__/profile.js.snap
index 47b779ea..6a439578 100644
--- a/__tests__/actions/__snapshots__/profile.js.snap
+++ b/__tests__/actions/__snapshots__/profile.js.snap
@@ -45,6 +45,8 @@ Object {
"updateProfileInit": [Function],
"uploadPhotoDone": [Function],
"uploadPhotoInit": [Function],
+ "verifyMemberNewEmailDone": [Function],
+ "verifyMemberNewEmailInit": [Function],
},
}
`;
diff --git a/__tests__/reducers/__snapshots__/profile.js.snap b/__tests__/reducers/__snapshots__/profile.js.snap
index fcd97829..a76358ad 100644
--- a/__tests__/reducers/__snapshots__/profile.js.snap
+++ b/__tests__/reducers/__snapshots__/profile.js.snap
@@ -41,8 +41,10 @@ Object {
},
],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -82,8 +84,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -130,8 +134,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -173,8 +179,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -212,7 +220,9 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -250,7 +260,9 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -293,8 +305,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -342,8 +356,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -376,6 +392,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -411,6 +429,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -433,6 +453,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -462,6 +484,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -477,6 +501,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -517,8 +543,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -564,8 +592,10 @@ Object {
},
],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -578,6 +608,8 @@ Object {
"loadingError": false,
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -626,8 +658,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -671,8 +705,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -686,6 +722,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -731,8 +769,10 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": false,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -778,8 +818,10 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": false,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -824,8 +866,10 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": false,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -875,8 +919,10 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": true,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -922,9 +968,11 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": false,
+ "updateProfileSuccess": true,
"updatingPassword": false,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -970,9 +1018,11 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": false,
+ "updateProfileSuccess": true,
"updatingPassword": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1011,8 +1061,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1050,8 +1102,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
"updatingProfile": true,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1088,7 +1142,9 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1124,7 +1180,9 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
"uploadingPhoto": true,
+ "verifyError": null,
}
`;
@@ -1169,8 +1227,10 @@ Object {
},
],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1210,8 +1270,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1258,8 +1320,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1301,8 +1365,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1340,7 +1406,9 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1378,7 +1446,9 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1421,8 +1491,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1470,8 +1542,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1504,6 +1578,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -1539,6 +1615,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -1561,6 +1639,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -1590,6 +1670,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -1605,6 +1687,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -1645,8 +1729,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1692,8 +1778,10 @@ Object {
},
],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1706,6 +1794,8 @@ Object {
"loadingError": false,
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -1754,8 +1844,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1799,8 +1891,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": Array [],
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1814,6 +1908,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
+ "verifyError": null,
}
`;
@@ -1859,8 +1955,10 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": false,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1906,8 +2004,10 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": false,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -1952,8 +2052,10 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": false,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -2003,8 +2105,10 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": true,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -2050,9 +2154,11 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": false,
+ "updateProfileSuccess": true,
"updatingPassword": false,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -2098,9 +2204,11 @@ Object {
"skills": Array [],
"stats": null,
"unlinkingExternalAccount": false,
+ "updateProfileSuccess": true,
"updatingPassword": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -2139,8 +2247,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": true,
"updatingProfile": false,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -2178,8 +2288,10 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
"updatingProfile": true,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -2216,7 +2328,9 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
"uploadingPhoto": false,
+ "verifyError": null,
}
`;
@@ -2252,6 +2366,8 @@ Object {
"profileForHandle": "tcscoder",
"skills": null,
"stats": null,
+ "updateProfileSuccess": null,
"uploadingPhoto": true,
+ "verifyError": null,
}
`;
diff --git a/docs/actions.profile.md b/docs/actions.profile.md
index 3b2bb991..528d0612 100644
--- a/docs/actions.profile.md
+++ b/docs/actions.profile.md
@@ -51,13 +51,15 @@ Actions for interactions with profile details API.
* [.saveEmailPreferencesDone(profile, tokenV3, preferences)](#module_actions.profile.saveEmailPreferencesDone) ⇒ Action
* [.updatePasswordInit()](#module_actions.profile.updatePasswordInit) ⇒ Action
* [.updatePasswordDone(profile, tokenV3, newPassword, oldPassword)](#module_actions.profile.updatePasswordDone) ⇒ Action
+ * [.verifyMemberNewEmailInit()](#module_actions.profile.verifyMemberNewEmailInit) ⇒ Action
+ * [.verifyMemberNewEmailDone(handle, tokenV3, emailVerifyToken)](#module_actions.profile.verifyMemberNewEmailDone) ⇒ Action
### actions.profile.loadProfile(handle) ⇒ Action
Creates and action that loads user profile.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
- [ ] This action does not follow the pattern with init/done pairs of
@@ -73,7 +75,7 @@ Creates and action that loads user profile.
### actions.profile.clearProfile() ⇒ Action
Creates and action that clear user profile.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
- [ ] This action does not follow the pattern with init/done pairs of
@@ -84,7 +86,7 @@ Creates and action that clear user profile.
### actions.profile.getAchievementsInit() ⇒ Action
Creates an action that signals beginning of user achievements loading.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
- [ ] This duplicates similar action in [actions.members.md](actions.members.md)!
@@ -94,7 +96,7 @@ Creates an action that signals beginning of user achievements loading.
### actions.profile.getAchievementsDone(handle) ⇒ Action
Creates an action that loads user achievements.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
- [ ] This duplicates similar action in [actions.members.md](actions.members.md)!
@@ -107,7 +109,7 @@ Creates an action that loads user achievements.
### actions.profile.getExternalAccountsInit() ⇒ Action
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
- [ ] To be documented.
@@ -115,7 +117,7 @@ Creates an action that loads user achievements.
### actions.profile.getExternalAccountsDone(handle) ⇒ Action
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
- [ ] To be documented.
@@ -128,7 +130,7 @@ Creates an action that loads user achievements.
### actions.profile.getExternalLinksInit() ⇒ Action
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
- [ ] Figure out what does this action do.
@@ -136,7 +138,7 @@ Creates an action that loads user achievements.
### actions.profile.getExternalLinksDone(handle) ⇒ Action
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
- [ ] Figure out the purpose of this action
@@ -149,7 +151,7 @@ Creates an action that loads user achievements.
### actions.profile.getInfoInit() ⇒ Action
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
- [ ] Figure out the purpose of this action.
@@ -157,7 +159,7 @@ Creates an action that loads user achievements.
### actions.profile.getInfoDone(handle) ⇒ Action
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
- [ ] Figure out the purpose of this action.
@@ -173,13 +175,13 @@ Creates an action that loads user achievements.
Creates an action that signals beginning of loading the member's
skills info.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.getSkillsDone(handle) ⇒ Action
Creates an action that loads member's skills info.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -190,7 +192,7 @@ Creates an action that loads member's skills info.
### actions.profile.getStatsInit() ⇒ Action
Creates an action that signals beginning of loading member's stats.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
- [ ] This is similar to [actions.members.md#module_actions.members.getStatsInit](actions.members.md#module_actions.members.getStatsInit)!
@@ -200,7 +202,7 @@ Creates an action that signals beginning of loading member's stats.
### actions.profile.getStatsDone(handle) ⇒ Action
Creates an action that loads member's stats.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -211,13 +213,13 @@ Creates an action that loads member's stats.
### actions.profile.getLinkedAccountsInit() ⇒ Action
Creates an action that signals beginning of getting linked accounts.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.getLinkedAccountsDone(profile, tokenV3) ⇒ Action
Creates an action that gets linked accounts.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -229,13 +231,13 @@ Creates an action that gets linked accounts.
### actions.profile.getCredentialInit() ⇒ Action
Creates an action that signals beginning of getting credential.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.getCredentialDone(profile, tokenV3) ⇒ Action
Creates an action that gets credential.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -247,13 +249,13 @@ Creates an action that gets credential.
### actions.profile.getEmailPreferencesInit() ⇒ Action
Creates an action that signals beginning of getting email preferences.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.getEmailPreferencesDone(profile, tokenV3) ⇒ Action
Creates an action that gets email preferences.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -265,13 +267,13 @@ Creates an action that gets email preferences.
### actions.profile.uploadPhotoInit() ⇒ Action
Creates an action that signals beginning of uploading user's photo.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.uploadPhotoDone(handle, tokenV3, file) ⇒ Action
Creates an action that uploads user's photo.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -284,19 +286,19 @@ Creates an action that uploads user's photo.
### actions.profile.deletePhotoInit() ⇒ Action
Creates an action that signals beginning of deleting user's photo.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.updateProfileInit() ⇒ Action
Creates an action that signals beginning of updating user's profile.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.updateProfileDone(profile, tokenV3) ⇒ Action
Creates an action that updates user's profile.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -308,13 +310,13 @@ Creates an action that updates user's profile.
### actions.profile.addSkillInit() ⇒ Action
Creates an action that signals beginning of adding user's skill.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.addSkillDone(handle, tokenV3, skill) ⇒ Action
Creates an action that adds user's skill.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -327,13 +329,13 @@ Creates an action that adds user's skill.
### actions.profile.hideSkillInit() ⇒ Action
Creates an action that signals beginning of hiding user's skill.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.hideSkillDone(handle, tokenV3, skill) ⇒ Action
Creates an action that hides user's skill.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -346,13 +348,13 @@ Creates an action that hides user's skill.
### actions.profile.addWebLinkInit() ⇒ Action
Creates an action that signals beginning of adding user's web link.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.addWebLinkDone(handle, tokenV3, webLink) ⇒ Action
Creates an action that adds user's web link.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -365,7 +367,7 @@ Creates an action that adds user's web link.
### actions.profile.deleteWebLinkInit(key) ⇒ Action
Creates an action that signals beginning of deleting user's web link.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -376,7 +378,7 @@ Creates an action that signals beginning of deleting user's web link.
### actions.profile.deleteWebLinkDone(handle, tokenV3, webLink) ⇒ Action
Creates an action that deletes user's web link.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -389,13 +391,13 @@ Creates an action that deletes user's web link.
### actions.profile.linkExternalAccountInit() ⇒ Action
Creates an action that signals beginning of linking external account.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.linkExternalAccountDone(profile, tokenV3, providerType, callbackUrl) ⇒ Action
Creates an action that links external account.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -409,7 +411,7 @@ Creates an action that links external account.
### actions.profile.unlinkExternalAccountInit(providerType) ⇒ Action
Creates an action that signals beginning of unlinking external account.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -420,7 +422,7 @@ Creates an action that signals beginning of unlinking external account.
### actions.profile.unlinkExternalAccountDone(profile, tokenV3, providerType) ⇒ Action
Creates an action that unlinks external account.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -433,13 +435,13 @@ Creates an action that unlinks external account.
### actions.profile.saveEmailPreferencesInit() ⇒ Action
Creates an action that signals beginning of saving email preferences.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.saveEmailPreferencesDone(profile, tokenV3, preferences) ⇒ Action
Creates an action that saves email preferences.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -452,13 +454,13 @@ Creates an action that saves email preferences.
### actions.profile.updatePasswordInit() ⇒ Action
Creates an action that signals beginning of updating user password.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
### actions.profile.updatePasswordDone(profile, tokenV3, newPassword, oldPassword) ⇒ Action
Creates an action that updates user password.
-**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
@@ -467,3 +469,26 @@ Creates an action that updates user password.
| newPassword | String
| The new password |
| oldPassword | String
| The old password |
+
+
+### actions.profile.verifyMemberNewEmailInit() ⇒ Action
+
+Creates an action that signals beginning of verify member new email.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
+
+
+
+### actions.profile.verifyMemberNewEmailDone(handle, tokenV3, emailVerifyToken) ⇒ Action
+Creates an action that verify member new email.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
+
+
+| Param | Type | Description |
+| --- | --- | --- |
+| handle | String
| Topcoder member handle. |
+| tokenV3 | String
| Topcoder auth token v3. |
+| emailVerifyToken | String
| The verify token of new email |
diff --git a/docs/reducers.profile.md b/docs/reducers.profile.md
index 979675c0..43d9ad78 100644
--- a/docs/reducers.profile.md
+++ b/docs/reducers.profile.md
@@ -1,317 +1,491 @@
-
+
-## reducers.profile
-Reducer for Profile API data
+## actions.profile
+Actions for interactions with profile details API.
**Todo**
-- [ ] Document reducer state structure.
-
-
-* [reducers.profile](#module_reducers.profile)
- * _static_
- * [.factory()](#module_reducers.profile.factory) ⇒ Promise
- * _inner_
- * [~onGetAchievementsDone(state, action)](#module_reducers.profile..onGetAchievementsDone) ⇒ Object
- * [~onGetExternalAccountsDone(state, action)](#module_reducers.profile..onGetExternalAccountsDone) ⇒ Object
- * [~onGetExternalLinksDone(state, action)](#module_reducers.profile..onGetExternalLinksDone) ⇒ Object
- * [~onGetInfoDone(state, action)](#module_reducers.profile..onGetInfoDone) ⇒ Object
- * [~onGetSkillsDone(state, action)](#module_reducers.profile..onGetSkillsDone) ⇒ Object
- * [~onGetStatsDone(state, action)](#module_reducers.profile..onGetStatsDone) ⇒ Object
- * [~onGetLinkedAccountsDone(state, action)](#module_reducers.profile..onGetLinkedAccountsDone) ⇒ Object
- * [~onGetCredentialDone(state, action)](#module_reducers.profile..onGetCredentialDone) ⇒ Object
- * [~onGetEmailPreferencesDone(state, action)](#module_reducers.profile..onGetEmailPreferencesDone) ⇒ Object
- * [~onUploadPhotoDone(state, action)](#module_reducers.profile..onUploadPhotoDone) ⇒ Object
- * [~onDeletePhotoDone(state, action)](#module_reducers.profile..onDeletePhotoDone) ⇒ Object
- * [~onUpdateProfileDone(state, action)](#module_reducers.profile..onUpdateProfileDone) ⇒ Object
- * [~onAddSkillDone(state, action)](#module_reducers.profile..onAddSkillDone) ⇒ Object
- * [~onHideSkillDone(state, action)](#module_reducers.profile..onHideSkillDone) ⇒ Object
- * [~onAddWebLinkDone(state, action)](#module_reducers.profile..onAddWebLinkDone) ⇒ Object
- * [~onDeleteWebLinkDone(state, action)](#module_reducers.profile..onDeleteWebLinkDone) ⇒ Object
- * [~onLinkExternalAccountDone(state, action)](#module_reducers.profile..onLinkExternalAccountDone) ⇒ Object
- * [~onUnlinkExternalAccountDone(state, action)](#module_reducers.profile..onUnlinkExternalAccountDone) ⇒ Object
- * [~onSaveEmailPreferencesDone(state, action)](#module_reducers.profile..onSaveEmailPreferencesDone) ⇒ Object
- * [~onUpdatePasswordDone(state, action)](#module_reducers.profile..onUpdatePasswordDone) ⇒ Object
- * [~create(initialState)](#module_reducers.profile..create) ⇒ function
-
-
-
-### reducers.profile.factory() ⇒ Promise
-Factory which creates a new reducer with its initial state tailored to the
-given options object, if specified (for server-side rendering). If options
-object is not specified, it creates just the default reducer. Accepted options are:
-
-**Kind**: static method of [reducers.profile
](#module_reducers.profile)
-**Resolves**: Function(state, action): state
New reducer.
-
-
-### reducers.profile~onGetAchievementsDone(state, action) ⇒ Object
-Handles PROFILE/GET_ACHIEVEMENTS_DONE action.
-
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+- [ ] Some of them repeat actions in [actions.members.md](actions.members.md). The code
+ should be refactored to avoid redundancy.
+
+
+* [actions.profile](#module_actions.profile)
+ * [.loadProfile(handle)](#module_actions.profile.loadProfile) ⇒ Action
+ * [.clearProfile()](#module_actions.profile.clearProfile) ⇒ Action
+ * [.getAchievementsInit()](#module_actions.profile.getAchievementsInit) ⇒ Action
+ * [.getAchievementsDone(handle)](#module_actions.profile.getAchievementsDone) ⇒ Action
+ * [.getExternalAccountsInit()](#module_actions.profile.getExternalAccountsInit) ⇒ Action
+ * [.getExternalAccountsDone(handle)](#module_actions.profile.getExternalAccountsDone) ⇒ Action
+ * [.getExternalLinksInit()](#module_actions.profile.getExternalLinksInit) ⇒ Action
+ * [.getExternalLinksDone(handle)](#module_actions.profile.getExternalLinksDone) ⇒ Action
+ * [.getInfoInit()](#module_actions.profile.getInfoInit) ⇒ Action
+ * [.getInfoDone(handle)](#module_actions.profile.getInfoDone) ⇒ Action
+ * [.getSkillsInit()](#module_actions.profile.getSkillsInit) ⇒ Action
+ * [.getSkillsDone(handle)](#module_actions.profile.getSkillsDone) ⇒ Action
+ * [.getStatsInit()](#module_actions.profile.getStatsInit) ⇒ Action
+ * [.getStatsDone(handle)](#module_actions.profile.getStatsDone) ⇒ Action
+ * [.getLinkedAccountsInit()](#module_actions.profile.getLinkedAccountsInit) ⇒ Action
+ * [.getLinkedAccountsDone(profile, tokenV3)](#module_actions.profile.getLinkedAccountsDone) ⇒ Action
+ * [.getCredentialInit()](#module_actions.profile.getCredentialInit) ⇒ Action
+ * [.getCredentialDone(profile, tokenV3)](#module_actions.profile.getCredentialDone) ⇒ Action
+ * [.getEmailPreferencesInit()](#module_actions.profile.getEmailPreferencesInit) ⇒ Action
+ * [.getEmailPreferencesDone(profile, tokenV3)](#module_actions.profile.getEmailPreferencesDone) ⇒ Action
+ * [.uploadPhotoInit()](#module_actions.profile.uploadPhotoInit) ⇒ Action
+ * [.uploadPhotoDone(handle, tokenV3, file)](#module_actions.profile.uploadPhotoDone) ⇒ Action
+ * [.deletePhotoInit()](#module_actions.profile.deletePhotoInit) ⇒ Action
+ * [.updateProfileInit()](#module_actions.profile.updateProfileInit) ⇒ Action
+ * [.updateProfileDone(profile, tokenV3)](#module_actions.profile.updateProfileDone) ⇒ Action
+ * [.addSkillInit()](#module_actions.profile.addSkillInit) ⇒ Action
+ * [.addSkillDone(handle, tokenV3, skill)](#module_actions.profile.addSkillDone) ⇒ Action
+ * [.hideSkillInit()](#module_actions.profile.hideSkillInit) ⇒ Action
+ * [.hideSkillDone(handle, tokenV3, skill)](#module_actions.profile.hideSkillDone) ⇒ Action
+ * [.addWebLinkInit()](#module_actions.profile.addWebLinkInit) ⇒ Action
+ * [.addWebLinkDone(handle, tokenV3, webLink)](#module_actions.profile.addWebLinkDone) ⇒ Action
+ * [.deleteWebLinkInit(key)](#module_actions.profile.deleteWebLinkInit) ⇒ Action
+ * [.deleteWebLinkDone(handle, tokenV3, webLink)](#module_actions.profile.deleteWebLinkDone) ⇒ Action
+ * [.linkExternalAccountInit()](#module_actions.profile.linkExternalAccountInit) ⇒ Action
+ * [.linkExternalAccountDone(profile, tokenV3, providerType, callbackUrl)](#module_actions.profile.linkExternalAccountDone) ⇒ Action
+ * [.unlinkExternalAccountInit(providerType)](#module_actions.profile.unlinkExternalAccountInit) ⇒ Action
+ * [.unlinkExternalAccountDone(profile, tokenV3, providerType)](#module_actions.profile.unlinkExternalAccountDone) ⇒ Action
+ * [.saveEmailPreferencesInit()](#module_actions.profile.saveEmailPreferencesInit) ⇒ Action
+ * [.saveEmailPreferencesDone(profile, tokenV3, preferences)](#module_actions.profile.saveEmailPreferencesDone) ⇒ Action
+ * [.updatePasswordInit()](#module_actions.profile.updatePasswordInit) ⇒ Action
+ * [.updatePasswordDone(profile, tokenV3, newPassword, oldPassword)](#module_actions.profile.updatePasswordDone) ⇒ Action
+ * [.verifyMemberNewEmailInit()](#module_actions.profile.verifyMemberNewEmailInit) ⇒ Action
+ * [.verifyMemberNewEmailDone(handle, tokenV3, emailVerifyToken)](#module_actions.profile.verifyMemberNewEmailDone) ⇒ Action
+
+
+
+### actions.profile.loadProfile(handle) ⇒ Action
+Creates and action that loads user profile.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
+
+- [ ] This action does not follow the pattern with init/done pairs of
+ actions. Should be improved.
+
+
+| Param | Type | Description |
+| --- | --- | --- |
+| handle | String
| User handle. |
+
+
+
+### actions.profile.clearProfile() ⇒ Action
+Creates and action that clear user profile.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
+
+- [ ] This action does not follow the pattern with init/done pairs of
+ actions. Should be improved.
+
+
+
+### actions.profile.getAchievementsInit() ⇒ Action
+Creates an action that signals beginning of user achievements loading.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
+
+- [ ] This duplicates similar action in [actions.members.md](actions.members.md)!
+
+
+
+### actions.profile.getAchievementsDone(handle) ⇒ Action
+Creates an action that loads user achievements.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
+
+- [ ] This duplicates similar action in [actions.members.md](actions.members.md)!
+
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| handle | String
| User handle. |
+
+
+
+### actions.profile.getExternalAccountsInit() ⇒ Action
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
-
+- [ ] To be documented.
-### reducers.profile~onGetExternalAccountsDone(state, action) ⇒ Object
-Handles PROFILE/GET_EXTERNAL_ACCOUNTS_DONE action.
+
+
+### actions.profile.getExternalAccountsDone(handle) ⇒ Action
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
+
+- [ ] To be documented.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| handle | String
| User handle. |
+
+
+
+### actions.profile.getExternalLinksInit() ⇒ Action
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
+
+- [ ] Figure out what does this action do.
-
+
-### reducers.profile~onGetExternalLinksDone(state, action) ⇒ Object
-Handles PROFILE/GET_EXTERNAL_LINKS_DONE action.
+### actions.profile.getExternalLinksDone(handle) ⇒ Action
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
+
+- [ ] Figure out the purpose of this action
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| handle | String
| User handle. |
+
+
-
+### actions.profile.getInfoInit() ⇒ Action
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
+
+- [ ] Figure out the purpose of this action.
+
+
+
+### actions.profile.getInfoDone(handle) ⇒ Action
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
-### reducers.profile~onGetInfoDone(state, action) ⇒ Object
-Handles PROFILE/GET_INFO_DONE action.
+- [ ] Figure out the purpose of this action.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| handle | String
| User handle. |
-
+
-### reducers.profile~onGetSkillsDone(state, action) ⇒ Object
-Handles PROFILE/GET_SKILLS_DONE action.
+### actions.profile.getSkillsInit() ⇒ Action
+Creates an action that signals beginning of loading the member's
+ skills info.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
+
+### actions.profile.getSkillsDone(handle) ⇒ Action
+Creates an action that loads member's skills info.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| handle | String
| Member handle. |
+
+
+
+### actions.profile.getStatsInit() ⇒ Action
+Creates an action that signals beginning of loading member's stats.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
+
+- [ ] This is similar to [actions.members.md#module_actions.members.getStatsInit](actions.members.md#module_actions.members.getStatsInit)!
-
+
-### reducers.profile~onGetStatsDone(state, action) ⇒ Object
-Handles PROFILE/GET_STATS_DONE action.
+### actions.profile.getStatsDone(handle) ⇒ Action
+Creates an action that loads member's stats.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| handle | String
| Member handle. |
+
+
-
+### actions.profile.getLinkedAccountsInit() ⇒ Action
+Creates an action that signals beginning of getting linked accounts.
-### reducers.profile~onGetLinkedAccountsDone(state, action) ⇒ Object
-Handles PROFILE/GET_LINKED_ACCOUNTS_DONE action.
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+### actions.profile.getLinkedAccountsDone(profile, tokenV3) ⇒ Action
+Creates an action that gets linked accounts.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| profile | Object
| Topcoder member profile. |
+| tokenV3 | String
| Topcoder auth token v3. |
+
+
-
+### actions.profile.getCredentialInit() ⇒ Action
+Creates an action that signals beginning of getting credential.
-### reducers.profile~onGetCredentialDone(state, action) ⇒ Object
-Handles PROFILE/GET_CREDENTIAL_DONE action.
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+### actions.profile.getCredentialDone(profile, tokenV3) ⇒ Action
+Creates an action that gets credential.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| profile | Object
| Topcoder member profile. |
+| tokenV3 | String
| Topcoder auth token v3. |
+
+
+
+### actions.profile.getEmailPreferencesInit() ⇒ Action
+Creates an action that signals beginning of getting email preferences.
-
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
-### reducers.profile~onGetEmailPreferencesDone(state, action) ⇒ Object
-Handles PROFILE/GET_EMAIL_PREFERENCES_DONE action.
+### actions.profile.getEmailPreferencesDone(profile, tokenV3) ⇒ Action
+Creates an action that gets email preferences.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| profile | Object
| Topcoder member profile. |
+| tokenV3 | String
| Topcoder auth token v3. |
+
+
+
+### actions.profile.uploadPhotoInit() ⇒ Action
+Creates an action that signals beginning of uploading user's photo.
-
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
-### reducers.profile~onUploadPhotoDone(state, action) ⇒ Object
-Handles PROFILE/UPLOAD_PHOTO_DONE action.
+### actions.profile.uploadPhotoDone(handle, tokenV3, file) ⇒ Action
+Creates an action that uploads user's photo.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| handle | String
| Topcoder user handle. |
+| tokenV3 | String
| Topcoder auth token v3. |
+| file | String
| The photo file. |
-
+
-### reducers.profile~onDeletePhotoDone(state, action) ⇒ Object
-Handles PROFILE/DELETE_PHOTO_DONE action.
+### actions.profile.deletePhotoInit() ⇒ Action
+Creates an action that signals beginning of deleting user's photo.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
+
+### actions.profile.updateProfileInit() ⇒ Action
+Creates an action that signals beginning of updating user's profile.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
+
+### actions.profile.updateProfileDone(profile, tokenV3) ⇒ Action
+Creates an action that updates user's profile.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| profile | String
| Topcoder user profile. |
+| tokenV3 | String
| Topcoder auth token v3. |
+
+
-
+### actions.profile.addSkillInit() ⇒ Action
+Creates an action that signals beginning of adding user's skill.
-### reducers.profile~onUpdateProfileDone(state, action) ⇒ Object
-Handles PROFILE/UPDATE_PROFILE_DONE action.
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+### actions.profile.addSkillDone(handle, tokenV3, skill) ⇒ Action
+Creates an action that adds user's skill.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| handle | String
| Topcoder user handle. |
+| tokenV3 | String
| Topcoder auth token v3. |
+| skill | Object
| Skill to add. |
+
+
+
+### actions.profile.hideSkillInit() ⇒ Action
+Creates an action that signals beginning of hiding user's skill.
-
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
-### reducers.profile~onAddSkillDone(state, action) ⇒ Object
-Handles PROFILE/ADD_SKILL_DONE action.
+### actions.profile.hideSkillDone(handle, tokenV3, skill) ⇒ Action
+Creates an action that hides user's skill.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| handle | String
| Topcoder user handle. |
+| tokenV3 | String
| Topcoder auth token v3. |
+| skill | Object
| Skill to hide. |
+
+
+
+### actions.profile.addWebLinkInit() ⇒ Action
+Creates an action that signals beginning of adding user's web link.
-
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
-### reducers.profile~onHideSkillDone(state, action) ⇒ Object
-Handles PROFILE/HIDE_SKILL_DONE action.
+### actions.profile.addWebLinkDone(handle, tokenV3, webLink) ⇒ Action
+Creates an action that adds user's web link.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| handle | String
| Topcoder user handle. |
+| tokenV3 | String
| Topcoder auth token v3. |
+| webLink | String
| Web link to add. |
-
+
-### reducers.profile~onAddWebLinkDone(state, action) ⇒ Object
-Handles PROFILE/ADD_WEB_LINK_DONE action.
+### actions.profile.deleteWebLinkInit(key) ⇒ Action
+Creates an action that signals beginning of deleting user's web link.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| key | Object
| Web link key to delete. |
-
+
-### reducers.profile~onDeleteWebLinkDone(state, action) ⇒ Object
-Handles PROFILE/DELETE_WEB_LINK_DONE action.
+### actions.profile.deleteWebLinkDone(handle, tokenV3, webLink) ⇒ Action
+Creates an action that deletes user's web link.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| handle | String
| Topcoder user handle. |
+| tokenV3 | String
| Topcoder auth token v3. |
+| webLink | String
| Web link to delete. |
-
+
-### reducers.profile~onLinkExternalAccountDone(state, action) ⇒ Object
-Handles PROFILE/LINK_EXTERNAL_ACCOUNT_DONE action.
+### actions.profile.linkExternalAccountInit() ⇒ Action
+Creates an action that signals beginning of linking external account.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
+
+### actions.profile.linkExternalAccountDone(profile, tokenV3, providerType, callbackUrl) ⇒ Action
+Creates an action that links external account.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| profile | Object
| Topcoder member handle. |
+| tokenV3 | String
| Topcoder auth token v3. |
+| providerType | String
| The external account service provider |
+| callbackUrl | String
| Optional. The callback url |
-
+
-### reducers.profile~onUnlinkExternalAccountDone(state, action) ⇒ Object
-Handles PROFILE/UNLINK_EXTERNAL_ACCOUNT_DONE action.
+### actions.profile.unlinkExternalAccountInit(providerType) ⇒ Action
+Creates an action that signals beginning of unlinking external account.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| providerType | Object
| External account provider type to delete. |
-
+
-### reducers.profile~onSaveEmailPreferencesDone(state, action) ⇒ Object
-Handles PROFILE/SAVE_EMAIL_PREFERENCES_DONE action.
+### actions.profile.unlinkExternalAccountDone(profile, tokenV3, providerType) ⇒ Action
+Creates an action that unlinks external account.
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| profile | Object
| Topcoder member profile. |
+| tokenV3 | String
| Topcoder auth token v3. |
+| providerType | String
| The external account service provider |
+
+
-
+### actions.profile.saveEmailPreferencesInit() ⇒ Action
+Creates an action that signals beginning of saving email preferences.
-### reducers.profile~onUpdatePasswordDone(state, action) ⇒ Object
-Handles PROFILE/UPDATE_PASSWORD_DONE action.
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: Object
- New state
+### actions.profile.saveEmailPreferencesDone(profile, tokenV3, preferences) ⇒ Action
+Creates an action that saves email preferences.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| state | Object
| |
-| action | Object
| Payload will be JSON from api call |
+| profile | Object
| Topcoder member profile. |
+| tokenV3 | String
| Topcoder auth token v3. |
+| preferences | Object
| The email preferences |
+
+
-
+### actions.profile.updatePasswordInit() ⇒ Action
+Creates an action that signals beginning of updating user password.
-### reducers.profile~create(initialState) ⇒ function
-Creates a new Profile reducer with the specified initial state.
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
-**Kind**: inner method of [reducers.profile
](#module_reducers.profile)
-**Returns**: function
- Profile reducer.
+### actions.profile.updatePasswordDone(profile, tokenV3, newPassword, oldPassword) ⇒ Action
+Creates an action that updates user password.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
| Param | Type | Description |
| --- | --- | --- |
-| initialState | Object
| Optional. Initial state. |
+| profile | Object
| Topcoder member profile. |
+| tokenV3 | String
| Topcoder auth token v3. |
+| newPassword | String
| The new password |
+| oldPassword | String
| The old password |
+
+
+
+### actions.profile.verifyMemberNewEmailInit() ⇒ Action
+Creates an action that signals beginning of verify member new email.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
+
+### actions.profile.verifyMemberNewEmailDone(handle, tokenV3, emailVerifyToken) ⇒ Action
+Creates an action that verify member new email.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
+
+| Param | Type | Description |
+| --- | --- | --- |
+| handle | String
| Topcoder member handle. |
+| tokenV3 | String
| Topcoder auth token v3. |
+| emailVerifyToken | String
| The verify token of new email |
diff --git a/docs/services.members.md b/docs/services.members.md
index 3ecc99b0..e13b9a46 100644
--- a/docs/services.members.md
+++ b/docs/services.members.md
@@ -28,14 +28,15 @@ members via API V3.
* [.getPresignedUrl(userHandle, file)](#module_services.members..MembersService+getPresignedUrl) ⇒ Promise
* [.updateMemberPhoto(S3Response)](#module_services.members..MembersService+updateMemberPhoto) ⇒ Promise
* [.uploadFileToS3(presignedUrlResponse)](#module_services.members..MembersService+uploadFileToS3) ⇒ Promise
+ * [.verifyMemberNewEmail(handle, emailVerifyToken)](#module_services.members..MembersService+verifyMemberNewEmail) ⇒ Promise
### services.members.getService(tokenV3) ⇒ MembersService
Returns a new or existing members service.
-**Kind**: static method of [services.members
](#module_services.members)
-**Returns**: MembersService
- Members service object
+**Kind**: static method of [services.members
](#module_services.members)
+**Returns**: MembersService
- Members service object
| Param | Type | Description |
| --- | --- | --- |
@@ -46,7 +47,7 @@ Returns a new or existing members service.
### services.members~MembersService
Service class.
-**Kind**: inner class of [services.members
](#module_services.members)
+**Kind**: inner class of [services.members
](#module_services.members)
* [~MembersService](#module_services.members..MembersService)
* [new MembersService(tokenV3)](#new_module_services.members..MembersService_new)
@@ -67,6 +68,7 @@ Service class.
* [.getPresignedUrl(userHandle, file)](#module_services.members..MembersService+getPresignedUrl) ⇒ Promise
* [.updateMemberPhoto(S3Response)](#module_services.members..MembersService+updateMemberPhoto) ⇒ Promise
* [.uploadFileToS3(presignedUrlResponse)](#module_services.members..MembersService+uploadFileToS3) ⇒ Promise
+ * [.verifyMemberNewEmail(handle, emailVerifyToken)](#module_services.members..MembersService+verifyMemberNewEmail) ⇒ Promise
@@ -81,8 +83,8 @@ Service class.
#### membersService.getMemberFinances(handle) ⇒ Promise
Gets member's financial information.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the financial information object.
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the financial information object.
| Param | Type | Description |
| --- | --- | --- |
@@ -95,8 +97,8 @@ Gets public information on a member.
This method does not require any authorization.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the data object.
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the data object.
| Param | Type | Description |
| --- | --- | --- |
@@ -107,8 +109,8 @@ This method does not require any authorization.
#### membersService.getExternalAccounts(handle) ⇒ Promise
Gets member external account info.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the stats object.
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the stats object.
| Param | Type |
| --- | --- |
@@ -119,8 +121,8 @@ Gets member external account info.
#### membersService.getExternalLinks(handle) ⇒ Promise
Gets member external links.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the stats object.
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the stats object.
| Param | Type |
| --- | --- |
@@ -131,8 +133,8 @@ Gets member external links.
#### membersService.getSkills(handle) ⇒ Promise
Gets member skills.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the stats object.
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the stats object.
| Param | Type |
| --- | --- |
@@ -143,8 +145,8 @@ Gets member skills.
#### membersService.getStats(handle) ⇒ Promise
Gets member statistics.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the stats object.
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the stats object.
| Param | Type |
| --- | --- |
@@ -155,8 +157,8 @@ Gets member statistics.
#### membersService.getStatsHistory(handle) ⇒ Promise
Gets member statistics history
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the stats object.
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the stats object.
| Param | Type |
| --- | --- |
@@ -167,8 +169,8 @@ Gets member statistics history
#### membersService.getStatsDistribution(handle, track, subTrack) ⇒ Promise
Gets member statistics distribution
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the stats object.
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the stats object.
| Param | Type |
| --- | --- |
@@ -183,8 +185,8 @@ Gets a list of suggested member names for the supplied partial.
WARNING: This method requires v3 authorization.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the api response content
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the api response content
| Param | Type | Description |
| --- | --- | --- |
@@ -195,8 +197,8 @@ WARNING: This method requires v3 authorization.
#### membersService.addWebLink(userHandle, webLink) ⇒ Promise
Adds external web link for member.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the api response content
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the api response content
| Param | Type | Description |
| --- | --- | --- |
@@ -208,8 +210,8 @@ Adds external web link for member.
#### membersService.deleteWebLink(userHandle, webLinkHandle) ⇒ Promise
Deletes external web link for member.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the api response content
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the api response content
| Param | Type | Description |
| --- | --- | --- |
@@ -221,8 +223,8 @@ Deletes external web link for member.
#### membersService.addSkill(handle, skillTagId) ⇒ Promise
Adds user skill.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to operation result
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to operation result
| Param | Type | Description |
| --- | --- | --- |
@@ -234,8 +236,8 @@ Adds user skill.
#### membersService.hideSkill(handle, skillTagId) ⇒ Promise
Hides user skill.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to operation result
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to operation result
| Param | Type | Description |
| --- | --- | --- |
@@ -247,8 +249,8 @@ Hides user skill.
#### membersService.updateMemberProfile(profile) ⇒ Promise
Updates member profile.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the api response content
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the api response content
| Param | Type | Description |
| --- | --- | --- |
@@ -259,8 +261,8 @@ Updates member profile.
#### membersService.getPresignedUrl(userHandle, file) ⇒ Promise
Gets presigned url for member photo file.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the api response content
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the api response content
| Param | Type | Description |
| --- | --- | --- |
@@ -272,8 +274,8 @@ Gets presigned url for member photo file.
#### membersService.updateMemberPhoto(S3Response) ⇒ Promise
Updates member photo.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the api response content
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the api response content
| Param | Type | Description |
| --- | --- | --- |
@@ -284,10 +286,22 @@ Updates member photo.
#### membersService.uploadFileToS3(presignedUrlResponse) ⇒ Promise
Uploads file to S3.
-**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
-**Returns**: Promise
- Resolves to the api response content
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the api response content
| Param | Type | Description |
| --- | --- | --- |
| presignedUrlResponse | Object
| The presigned url response from getPresignedUrl() function. |
+
+
+#### membersService.verifyMemberNewEmail(handle, emailVerifyToken) ⇒ Promise
+Verify member new email.
+
+**Kind**: instance method of [MembersService
](#module_services.members..MembersService)
+**Returns**: Promise
- Resolves to the api response content
+
+| Param | Type | Description |
+| --- | --- | --- |
+| handle | String
| The member handle |
+| emailVerifyToken | String
| The verify token of new email |
diff --git a/src/actions/profile.js b/src/actions/profile.js
index 58dc2cbf..f877b3ab 100644
--- a/src/actions/profile.js
+++ b/src/actions/profile.js
@@ -412,6 +412,28 @@ function updatePasswordDone(profile, tokenV3, newPassword, oldPassword) {
.then(res => ({ data: res, handle: profile.handle }));
}
+/**
+ * @static
+ * @desc Creates an action that signals beginning of verify member new email.
+ * @return {Action}
+ */
+function verifyMemberNewEmailInit() {}
+
+/**
+ * @static
+ * @desc Creates an action that verify member new email.
+ *
+ * @param {Object} handle Topcoder member handle.
+ * @param {String} tokenV3 Topcoder auth token v3.
+ * @param {String} emailVerifyToken The verify token of new email.
+ * @return {Action}
+ */
+function verifyMemberNewEmailDone(handle, tokenV3, emailVerifyToken) {
+ const service = getMembersService(tokenV3);
+ return service.verifyMemberNewEmail(handle, emailVerifyToken)
+ .then(res => ({ data: res }));
+}
+
export default createActions({
PROFILE: {
LOAD_PROFILE: loadProfile,
@@ -456,5 +478,7 @@ export default createActions({
SAVE_EMAIL_PREFERENCES_DONE: saveEmailPreferencesDone,
UPDATE_PASSWORD_INIT: updatePasswordInit,
UPDATE_PASSWORD_DONE: updatePasswordDone,
+ VERIFY_MEMBER_NEW_EMAIL_INIT: verifyMemberNewEmailInit,
+ VERIFY_MEMBER_NEW_EMAIL_DONE: verifyMemberNewEmailDone,
},
});
diff --git a/src/reducers/profile.js b/src/reducers/profile.js
index c2b1610e..c463bf10 100644
--- a/src/reducers/profile.js
+++ b/src/reducers/profile.js
@@ -215,11 +215,17 @@ function onUpdateProfileDone(state, { payload, error }) {
if (error) {
logger.error('Failed to update user profile', payload);
fireErrorMessage('ERROR: Failed to update user profile!');
- return newState;
+ return {
+ ...newState,
+ updateProfileSuccess: false,
+ };
}
if (!newState.info || newState.info.handle !== payload.handle) {
- return newState;
+ return {
+ ...newState,
+ updateProfileSuccess: true,
+ };
}
return {
@@ -228,6 +234,7 @@ function onUpdateProfileDone(state, { payload, error }) {
...newState.info,
...payload,
},
+ updateProfileSuccess: true,
};
}
@@ -425,6 +432,29 @@ function onUpdatePasswordDone(state, { payload, error }) {
return newState;
}
+/**
+ * Handles PROFILE/VERIFY_MEMBER_NEW_EMAIL_DONE action.
+ * @param {Object} state
+ * @param {Object} action Payload will be JSON from api call
+ * @return {Object} New state
+ */
+function onVerifyMemberNewEmailDone(state, { payload, error }) {
+ const newState = { ...state, verifyingEmail: false };
+
+ if (error) {
+ logger.error('Failed to verify member new email', payload);
+ return {
+ ...newState,
+ verifyError: true,
+ };
+ }
+
+ return {
+ ...newState,
+ verifyError: false,
+ };
+}
+
/**
* Creates a new Profile reducer with the specified initial state.
* @param {Object} initialState Optional. Initial state.
@@ -477,6 +507,8 @@ function create(initialState) {
[a.saveEmailPreferencesDone]: onSaveEmailPreferencesDone,
[a.updatePasswordInit]: state => ({ ...state, updatingPassword: true }),
[a.updatePasswordDone]: onUpdatePasswordDone,
+ [a.verifyMemberNewEmailInit]: state => ({ ...state, verifyingEmail: true }),
+ [a.verifyMemberNewEmailDone]: onVerifyMemberNewEmailDone,
}, _.defaults(initialState, {
achievements: null,
copilot: false,
@@ -485,6 +517,8 @@ function create(initialState) {
loadingError: false,
skills: null,
stats: null,
+ verifyError: null,
+ updateProfileSuccess: null,
}));
}
diff --git a/src/services/members.js b/src/services/members.js
index 0e573dc9..84b97f56 100644
--- a/src/services/members.js
+++ b/src/services/members.js
@@ -202,12 +202,8 @@ class MembersService {
* @return {Promise} Resolves to the api response content
*/
async updateMemberProfile(profile) {
- const changeEmail = !!(_.get(profile, 'successUrl') || _.get(profile, 'failUrl'));
- let url = `/members/${profile.handle}`;
- if (changeEmail) {
- url = `${url}?successUrl=${_.get(profile, 'successUrl')}&failUrl=${_.get(profile, 'failUrl')}`;
- }
- const res = await this.private.api.putJson(url, { param: _.omit(profile, ['successUrl', 'failUrl']) });
+ const url = profile.verifyUrl ? `/members/${profile.handle}?verifyUrl=${profile.verifyUrl}` : `/members/${profile.handle}`;
+ const res = await this.private.api.putJson(url, { param: profile.verifyUrl ? _.omit(profile, ['verifyUrl']) : profile });
return getApiResponsePayload(res);
}
@@ -279,6 +275,17 @@ class MembersService {
xhr.send(presignedUrlResponse.file);
});
}
+
+ /**
+ * Verify member new email
+ * @param {String} handle handle Topcoder user handle
+ * @param {String} emailVerifyToken The verify token of new email
+ * @returns {Promise} Resolves to the api response content
+ */
+ async verifyMemberNewEmail(handle, emailVerifyToken) {
+ const res = await this.private.api.get(`/members/${handle}/verify?token=${emailVerifyToken}`);
+ return getApiResponsePayload(res);
+ }
}
let lastInstance = null;