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.
- package/CHANGELOG.md +19 -0
- package/docs/ContentOrganization.html +2 -2
- package/docs/Forums.html +2 -2
- package/docs/Gamification.html +2 -2
- package/docs/TestUser.html +2 -2
- package/docs/UserManagementSystem.html +2 -2
- package/docs/api_types.js.html +2 -2
- package/docs/config.js.html +2 -2
- package/docs/content-org_content-org.js.html +2 -2
- package/docs/content-org_guided-courses.ts.html +2 -2
- package/docs/content-org_learning-paths.ts.html +106 -13
- package/docs/content-org_playlists-types.js.html +2 -2
- package/docs/content-org_playlists.js.html +2 -2
- package/docs/content.js.html +2 -2
- package/docs/forums_categories.ts.html +2 -2
- package/docs/forums_forums.ts.html +2 -2
- package/docs/forums_posts.ts.html +22 -3
- package/docs/forums_threads.ts.html +16 -3
- package/docs/gamification_awards.ts.html +26 -12
- package/docs/gamification_gamification.js.html +2 -2
- package/docs/global.html +2 -2
- package/docs/index.html +2 -2
- package/docs/liveTesting.ts.html +2 -2
- package/docs/module-Accounts.html +10 -10
- package/docs/module-Awards.html +106 -6
- package/docs/module-Config.html +2 -2
- package/docs/module-Content-Services-V2.html +2 -2
- package/docs/module-Forums.html +731 -89
- package/docs/module-GuidedCourses.html +2 -2
- package/docs/module-Interests.html +2 -2
- package/docs/module-LearningPaths.html +640 -12
- package/docs/module-Onboarding.html +2 -2
- package/docs/module-Payments.html +2 -2
- package/docs/module-Permissions.html +2 -2
- package/docs/module-Playlists.html +2 -2
- package/docs/module-ProgressRow.html +2 -2
- package/docs/module-Railcontent-Services.html +2 -2
- package/docs/module-Sanity-Services.html +29 -29
- package/docs/module-Sessions.html +2 -2
- package/docs/module-UserActivity.html +2 -2
- package/docs/module-UserChat.html +2 -2
- package/docs/module-UserManagement.html +2 -2
- package/docs/module-UserMemberships.html +2 -2
- package/docs/module-UserNotifications.html +2 -2
- package/docs/module-UserProfile.html +2 -2
- package/docs/progress-row_method-card.js.html +8 -7
- package/docs/railcontent.js.html +2 -2
- package/docs/sanity.js.html +5 -3
- package/docs/userActivity.js.html +2 -2
- package/docs/user_account.ts.html +5 -11
- package/docs/user_chat.js.html +2 -2
- package/docs/user_interests.js.html +2 -2
- package/docs/user_management.js.html +2 -2
- package/docs/user_memberships.ts.html +2 -2
- package/docs/user_notifications.js.html +2 -2
- package/docs/user_onboarding.ts.html +2 -2
- package/docs/user_payments.ts.html +2 -2
- package/docs/user_permissions.js.html +2 -2
- package/docs/user_profile.js.html +2 -2
- package/docs/user_sessions.js.html +2 -2
- package/docs/user_types.js.html +2 -2
- package/docs/user_user-management-system.js.html +2 -2
- package/package.json +1 -1
- package/src/services/content-org/learning-paths.ts +35 -21
- package/src/services/contentAggregator.js +8 -5
- package/src/services/forums/categories.ts +1 -1
- package/src/services/gamification/awards.ts +24 -10
- 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
|
-
|
|
75
|
-
device_name: props.deviceName,
|
|
69
|
+
from: props.from,
|
|
76
70
|
})
|
|
77
71
|
}
|
|
78
72
|
|