musora-content-services 2.122.5 → 2.122.6

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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [2.122.6](https://github.com/railroadmedia/musora-content-services/compare/v2.122.5...v2.122.6) (2026-01-28)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **T3PS-1586:** onboarding recommendation pinning ([#737](https://github.com/railroadmedia/musora-content-services/issues/737)) ([280305b](https://github.com/railroadmedia/musora-content-services/commit/280305b7706ba171752cb54e6d2ee504093b11d1))
11
+
5
12
  ### [2.122.5](https://github.com/railroadmedia/musora-content-services/compare/v2.122.4...v2.122.5) (2026-01-28)
6
13
 
7
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.122.5",
3
+ "version": "2.122.6",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -21,8 +21,8 @@ export const USER_PIN_PROGRESS_KEY = 'user_pin_progress_row'
21
21
  /**
22
22
  * Gets the localStorage key for user pinned progress, scoped by user ID
23
23
  */
24
- function getUserPinProgressKey() {
25
- const userId = globalConfig.sessionConfig?.userId || globalConfig.railcontentConfig?.userId
24
+ export function getUserPinProgressKey(id) {
25
+ const userId = id || globalConfig.sessionConfig?.userId || globalConfig.railcontentConfig?.userId
26
26
  return userId ? `user_pin_progress_row_${userId}` : USER_PIN_PROGRESS_KEY
27
27
  }
28
28
 
@@ -109,6 +109,11 @@ export async function unpinProgressRow(brand) {
109
109
  return response
110
110
  }
111
111
 
112
+ export async function setUserPinnedProgressRow(userId, pinnedData) {
113
+ const key = getUserPinProgressKey(userId)
114
+ await globalConfig.localStorage.setItem(key, JSON.stringify(pinnedData))
115
+ }
116
+
112
117
  async function getUserPinnedItem(brand) {
113
118
  const key = getUserPinProgressKey()
114
119
  const pinnedProgressRaw = await globalConfig.localStorage.getItem(key)
@@ -5,6 +5,7 @@ import { HttpClient } from '../../infrastructure/http/HttpClient'
5
5
  import { HttpError } from '../../infrastructure/http/interfaces/HttpError'
6
6
  import { globalConfig } from '../config.js'
7
7
  import { clearAllCachedData } from '../dataContext.js'
8
+ import { setUserPinnedProgressRow } from '../progress-row/base.js'
8
9
  import { Onboarding } from './onboarding'
9
10
  import { AuthResponse } from './types'
10
11
 
@@ -69,13 +70,20 @@ export async function setupAccount(props: AccountSetupProps): Promise<AccountSet
69
70
  throw new Error('Token is required for non-MA environments')
70
71
  }
71
72
 
72
- return httpClient.post(`/api/user-management-system/v1/accounts`, {
73
- email: props.email,
74
- password: props.password,
75
- password_confirmation: props.passwordConfirmation,
76
- token: props.token,
77
- from: props.from,
78
- })
73
+ const res = await httpClient.post<AccountSetupResponse>(
74
+ `/api/user-management-system/v1/accounts`,
75
+ {
76
+ email: props.email,
77
+ password: props.password,
78
+ password_confirmation: props.passwordConfirmation,
79
+ token: props.token,
80
+ from: props.from,
81
+ }
82
+ )
83
+
84
+ await setUserPinnedProgressRow(res.auth.user?.id, res.auth.user?.brand_pinned_progress || {})
85
+
86
+ return res
79
87
  }
80
88
 
81
89
  /**
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { globalConfig } from '../config.js'
5
5
  import { clearAllCachedData } from '../dataContext.js'
6
- import { USER_PIN_PROGRESS_KEY } from '../progress-row/base.js'
6
+ import { setUserPinnedProgressRow } from '../progress-row/base.js'
7
7
  import './types.js'
8
8
 
9
9
  /**
@@ -51,12 +51,7 @@ export async function login(email, password, deviceName, deviceToken, platform)
51
51
 
52
52
  // TODO: refactor this. I don't think this is the place for it but we need it fixed for the system test
53
53
  if (res.ok) {
54
- const userId = data.user?.id
55
- const userPinKey = userId ? `user_pin_progress_row_${userId}` : USER_PIN_PROGRESS_KEY
56
- await globalConfig.localStorage.setItem(
57
- userPinKey,
58
- JSON.stringify(data.user?.brand_pinned_progress || {})
59
- )
54
+ await setUserPinnedProgressRow(data.user?.id, data.user?.brand_pinned_progress || {})
60
55
  }
61
56
 
62
57
  return data
@@ -38,6 +38,7 @@ export interface User {
38
38
  brand_method_levels: BrandMethodLevels
39
39
  brand_minutes_practiced: BrandTimePracticed
40
40
  brand_seconds_practiced: BrandTimePracticed
41
+ brand_pinned_progress: Record<string, number[]>
41
42
  guitar_playing_since_year: number | null
42
43
  drumeo_onboarding_skip_setup: number
43
44
  pianote_onboarding_skip_setup: number
@@ -1,9 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(rg:*)",
5
- "Bash(npm run lint:*)"
6
- ],
7
- "deny": []
8
- }
9
- }