musora-content-services 2.78.0 → 2.79.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 (68) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/docs/ContentOrganization.html +2 -2
  3. package/docs/Forums.html +2 -2
  4. package/docs/Gamification.html +2 -2
  5. package/docs/TestUser.html +2 -2
  6. package/docs/UserManagementSystem.html +2 -2
  7. package/docs/api_types.js.html +2 -2
  8. package/docs/config.js.html +2 -2
  9. package/docs/content-org_content-org.js.html +2 -2
  10. package/docs/content-org_guided-courses.ts.html +2 -2
  11. package/docs/content-org_learning-paths.ts.html +106 -13
  12. package/docs/content-org_playlists-types.js.html +2 -2
  13. package/docs/content-org_playlists.js.html +2 -2
  14. package/docs/content.js.html +2 -2
  15. package/docs/forums_categories.ts.html +2 -2
  16. package/docs/forums_forums.ts.html +2 -2
  17. package/docs/forums_posts.ts.html +22 -3
  18. package/docs/forums_threads.ts.html +16 -3
  19. package/docs/gamification_awards.ts.html +26 -12
  20. package/docs/gamification_gamification.js.html +2 -2
  21. package/docs/global.html +2 -2
  22. package/docs/index.html +2 -2
  23. package/docs/liveTesting.ts.html +2 -2
  24. package/docs/module-Accounts.html +10 -10
  25. package/docs/module-Awards.html +106 -6
  26. package/docs/module-Config.html +2 -2
  27. package/docs/module-Content-Services-V2.html +2 -2
  28. package/docs/module-Forums.html +731 -89
  29. package/docs/module-GuidedCourses.html +2 -2
  30. package/docs/module-Interests.html +2 -2
  31. package/docs/module-LearningPaths.html +640 -12
  32. package/docs/module-Onboarding.html +2 -2
  33. package/docs/module-Payments.html +2 -2
  34. package/docs/module-Permissions.html +2 -2
  35. package/docs/module-Playlists.html +2 -2
  36. package/docs/module-ProgressRow.html +2 -2
  37. package/docs/module-Railcontent-Services.html +2 -2
  38. package/docs/module-Sanity-Services.html +29 -29
  39. package/docs/module-Sessions.html +2 -2
  40. package/docs/module-UserActivity.html +2 -2
  41. package/docs/module-UserChat.html +2 -2
  42. package/docs/module-UserManagement.html +2 -2
  43. package/docs/module-UserMemberships.html +2 -2
  44. package/docs/module-UserNotifications.html +2 -2
  45. package/docs/module-UserProfile.html +2 -2
  46. package/docs/progress-row_method-card.js.html +8 -7
  47. package/docs/railcontent.js.html +2 -2
  48. package/docs/sanity.js.html +5 -3
  49. package/docs/userActivity.js.html +2 -2
  50. package/docs/user_account.ts.html +5 -11
  51. package/docs/user_chat.js.html +2 -2
  52. package/docs/user_interests.js.html +2 -2
  53. package/docs/user_management.js.html +2 -2
  54. package/docs/user_memberships.ts.html +2 -2
  55. package/docs/user_notifications.js.html +2 -2
  56. package/docs/user_onboarding.ts.html +2 -2
  57. package/docs/user_payments.ts.html +2 -2
  58. package/docs/user_permissions.js.html +2 -2
  59. package/docs/user_profile.js.html +2 -2
  60. package/docs/user_sessions.js.html +2 -2
  61. package/docs/user_types.js.html +2 -2
  62. package/docs/user_user-management-system.js.html +2 -2
  63. package/package.json +1 -1
  64. package/src/services/content-org/learning-paths.ts +35 -21
  65. package/src/services/contentAggregator.js +8 -5
  66. package/src/services/forums/categories.ts +1 -1
  67. package/src/services/gamification/awards.ts +24 -10
  68. package/src/services/user/account.ts +3 -9
@@ -39,6 +39,7 @@ export interface AccountSetupProps {
39
39
  token?: string
40
40
  revenuecatAppUserId?: string
41
41
  deviceName?: string
42
+ from?: string
42
43
  }
43
44
 
44
45
  /**
@@ -56,23 +57,16 @@ export interface AccountSetupProps {
56
57
  */
57
58
  export async function setupAccount(props: AccountSetupProps): Promise<void> {
58
59
  const httpClient = new HttpClient(globalConfig.baseUrl)
59
- if (!globalConfig.isMA && !props.token) {
60
+ if ((!globalConfig.isMA || props.from === 'mobile-ios-app') && !props.token) {
60
61
  throw new Error('Token is required for non-MA environments')
61
62
  }
62
63
 
63
- // NOTE: remove deviceName temporarily. It will be required late
64
- // if (globalConfig.isMA && (!props.deviceName || !props.revenuecatAppUserId)) {
65
- if (globalConfig.isMA && !props.revenuecatAppUserId) {
66
- throw new Error('Device name and RevenueCat App User ID are required for MA environments')
67
- }
68
-
69
64
  return httpClient.post(`/api/user-management-system/v1/accounts`, {
70
65
  email: props.email,
71
66
  password: props.password,
72
67
  password_confirmation: props.passwordConfirmation,
73
68
  token: props.token,
74
- revenuecat_origin_app_user_id: props.revenuecatAppUserId,
75
- device_name: props.deviceName,
69
+ from: props.from,
76
70
  })
77
71
  }
78
72