musora-content-services 2.33.0 → 2.33.1

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 (46) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/docs/ContentOrganization.html +2 -2
  3. package/docs/Gamification.html +2 -2
  4. package/docs/UserManagementSystem.html +2 -2
  5. package/docs/api_types.js.html +2 -2
  6. package/docs/config.js.html +2 -2
  7. package/docs/content-org_content-org.js.html +2 -2
  8. package/docs/content-org_guided-courses.ts.html +2 -2
  9. package/docs/content-org_playlists-types.js.html +2 -2
  10. package/docs/content-org_playlists.js.html +2 -2
  11. package/docs/content.js.html +2 -2
  12. package/docs/gamification_awards.ts.html +9 -11
  13. package/docs/gamification_gamification.js.html +2 -2
  14. package/docs/global.html +2 -2
  15. package/docs/index.html +2 -2
  16. package/docs/module-Accounts.html +1365 -2
  17. package/docs/module-Awards.html +42 -7
  18. package/docs/module-Config.html +2 -2
  19. package/docs/module-Content-Services-V2.html +2 -2
  20. package/docs/module-GuidedCourses.html +2 -2
  21. package/docs/module-Interests.html +2 -2
  22. package/docs/module-Permissions.html +2 -2
  23. package/docs/module-Playlists.html +2 -2
  24. package/docs/module-Railcontent-Services.html +2 -2
  25. package/docs/module-Sanity-Services.html +2 -2
  26. package/docs/module-Sessions.html +2 -2
  27. package/docs/module-UserActivity.html +4 -4
  28. package/docs/module-UserChat.html +2 -2
  29. package/docs/module-UserManagement.html +2 -2
  30. package/docs/module-UserNotifications.html +2 -2
  31. package/docs/module-UserProfile.html +2 -2
  32. package/docs/railcontent.js.html +2 -2
  33. package/docs/sanity.js.html +2 -2
  34. package/docs/userActivity.js.html +2 -2
  35. package/docs/user_account.ts.html +54 -2
  36. package/docs/user_chat.js.html +2 -2
  37. package/docs/user_interests.js.html +2 -2
  38. package/docs/user_management.js.html +2 -2
  39. package/docs/user_notifications.js.html +2 -2
  40. package/docs/user_permissions.js.html +2 -2
  41. package/docs/user_profile.js.html +2 -2
  42. package/docs/user_sessions.js.html +2 -2
  43. package/docs/user_types.js.html +2 -2
  44. package/docs/user_user-management-system.js.html +2 -2
  45. package/package.json +1 -1
  46. package/src/services/user/account.ts +28 -0
@@ -12,6 +12,10 @@ export interface PasswordResetProps {
12
12
  token: string
13
13
  }
14
14
 
15
+ /**
16
+ * @param {string} email - The email address to check the account status for.
17
+ * @returns {Promise<{requires_setup: boolean}|HttpError>} - A promise that resolves to an object indicating whether account setup is required, or an HttpError if the request fails.
18
+ */
15
19
  export async function status(email: string): Promise<{ requires_setup: boolean } | HttpError> {
16
20
  const httpClient = new HttpClient(globalConfig.baseUrl)
17
21
  const response = await httpClient.get<{ requires_setup: boolean }>(
@@ -20,6 +24,10 @@ export async function status(email: string): Promise<{ requires_setup: boolean }
20
24
  return response
21
25
  }
22
26
 
27
+ /**
28
+ * @param {string} email - The email address to send the account setup email to.
29
+ * @returns {Promise<void|HttpError>} - A promise that resolves when the email is sent or an HttpError if the request fails.
30
+ */
23
31
  export async function sendAccountSetupEmail(email: string): Promise<void | HttpError> {
24
32
  const httpClient = new HttpClient(globalConfig.baseUrl)
25
33
  return httpClient.post<void>(
@@ -28,6 +36,14 @@ export async function sendAccountSetupEmail(email: string): Promise<void | HttpE
28
36
  )
29
37
  }
30
38
 
39
+ /**
40
+ * @param {Object} params - The parameters for setting up the account.
41
+ * @property {string} email - The email address for the account.
42
+ * @property {string} password - The new password for the account.
43
+ * @property {string} passwordConfirmation - The confirmation of the new password.
44
+ * @property {string} token - The token sent to the user's email for verification.
45
+ * @returns {Promise<void|HttpError>} - A promise that resolves when the account setup is complete or an HttpError if the request fails.
46
+ */
31
47
  export async function setupAccount({
32
48
  email,
33
49
  password,
@@ -43,6 +59,10 @@ export async function setupAccount({
43
59
  })
44
60
  }
45
61
 
62
+ /**
63
+ * @param {string} email - The email address to send the password reset email to.
64
+ * @returns {Promise<void|HttpError>} - A promise that resolves when the email change request is made.
65
+ */
46
66
  export async function sendPasswordResetEmail(email: string): Promise<void | HttpError> {
47
67
  const httpClient = new HttpClient(globalConfig.baseUrl)
48
68
  return httpClient.post(`/api/user-management-system/v1/accounts/password/reset-email`, {
@@ -50,6 +70,14 @@ export async function sendPasswordResetEmail(email: string): Promise<void | Http
50
70
  })
51
71
  }
52
72
 
73
+ /**
74
+ * @param {Object} params - The parameters for resetting the password.
75
+ * @property {string} email - The email address for the account.
76
+ * @property {string} password - The new password for the account.
77
+ * @property {string} passwordConfirmation - The confirmation of the new password.
78
+ * @property {string} token - The token sent to the user's email for verification.
79
+ * @returns {Promise<void|HttpError>} - A promise that resolves when the password reset is complete or an HttpError if the request fails.
80
+ */
53
81
  export async function resetPassword({
54
82
  email,
55
83
  password,