musora-content-services 2.163.0 → 2.164.5

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.
@@ -1,12 +1,46 @@
1
1
  {
2
2
  "permissions": {
3
3
  "allow": [
4
- "Bash(rg:*)",
5
- "Bash(npm run lint:*)",
6
- "Bash(ls:*)",
4
+ "Bash(npx jest *)",
5
+ "Bash(npx tsc *)",
6
+ "Skill(counselors)",
7
+ "Bash(counselors ls *)",
8
+ "Bash(counselors groups *)",
9
+ "Bash(counselors run *)",
7
10
  "Bash(npm test *)",
8
- "Bash(npx jest *)"
9
- ],
10
- "deny": []
11
- }
11
+ "Bash(gh pr *)",
12
+ "Bash(gh api *)",
13
+ "Bash(mkdir -p /tmp/pr-review-v2)",
14
+ "Read(//tmp/pr-review-v2/**)",
15
+ "Bash(cat /home/alesevero/railenvironment/applications/musora-content-services/AGENTS.md)",
16
+ "Bash(echo \"no AGENTS.md\")",
17
+ "Bash(echo \"exit=$?\")",
18
+ "Bash(git checkout *)",
19
+ "Skill(pr)",
20
+ "Skill(create-decision)",
21
+ "mcp__github__pull_request_read",
22
+ "mcp__github__push_files"
23
+ ]
24
+ },
25
+ "model": "sonnet",
26
+ "enabledMcpjsonServers": [
27
+ "atlassian",
28
+ "figma",
29
+ "google-workspace",
30
+ "snowflake",
31
+ "aws",
32
+ "hex",
33
+ "sanity",
34
+ "mysql",
35
+ "slack",
36
+ "langfuse",
37
+ "chrome-devtools",
38
+ "railway",
39
+ "github",
40
+ "asana"
41
+ ],
42
+ "disabledMcpjsonServers": [
43
+ "nightwatch"
44
+ ],
45
+ "effortLevel": "medium"
12
46
  }
@@ -19,7 +19,7 @@ jobs:
19
19
  - name: Run unit tests
20
20
  run: npm test -- --coverage
21
21
  - name: Upload coverage to Codecov
22
- uses: codecov/codecov-action@v5
22
+ uses: codecov/codecov-action@v4
23
23
  with:
24
24
  token: ${{ secrets.CODECOV_TOKEN }}
25
25
  slug: railroadmedia/musora-content-services
@@ -39,7 +39,7 @@ jobs:
39
39
  - name: Run integration tests
40
40
  run: npm run test:integration
41
41
  - name: Upload coverage to Codecov
42
- uses: codecov/codecov-action@v5
42
+ uses: codecov/codecov-action@v4
43
43
  with:
44
44
  token: ${{ secrets.CODECOV_TOKEN }}
45
45
  slug: railroadmedia/musora-content-services
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
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.164.5](https://github.com/railroadmedia/musora-content-services/compare/v2.164.4...v2.164.5) (2026-06-10)
6
+
7
+ ### [2.164.4](https://github.com/railroadmedia/musora-content-services/compare/v2.164.3...v2.164.4) (2026-06-10)
8
+
9
+ ### [2.164.3](https://github.com/railroadmedia/musora-content-services/compare/v2.164.2...v2.164.3) (2026-06-10)
10
+
11
+ ### [2.164.2](https://github.com/railroadmedia/musora-content-services/compare/v2.164.1...v2.164.2) (2026-06-10)
12
+
13
+ ### [2.164.1](https://github.com/railroadmedia/musora-content-services/compare/v2.164.0...v2.164.1) (2026-06-10)
14
+
15
+ ## [2.164.0](https://github.com/railroadmedia/musora-content-services/compare/v2.160.5...v2.164.0) (2026-06-10)
16
+
17
+
18
+ ### Features
19
+
20
+ * add helper for FE/MA method progress card (free method) ([#987](https://github.com/railroadmedia/musora-content-services/issues/987)) ([ce8e491](https://github.com/railroadmedia/musora-content-services/commit/ce8e49128d54ec4c3b36261eb0e550b152c3041a))
21
+ * add need access logic branch for LPs ([#993](https://github.com/railroadmedia/musora-content-services/issues/993)) ([1d935aa](https://github.com/railroadmedia/musora-content-services/commit/1d935aaf147b45cd01bc1d438424f5322991aa69))
22
+ * **BEHLTP-106:** membership data upgrade ([#973](https://github.com/railroadmedia/musora-content-services/issues/973)) ([e1e0611](https://github.com/railroadmedia/musora-content-services/commit/e1e0611c13bdf4be920eb28cca1f15f912930d24))
23
+ * **TP-1195:** optimize live event loading ([#971](https://github.com/railroadmedia/musora-content-services/issues/971)) ([8daa616](https://github.com/railroadmedia/musora-content-services/commit/8daa6160c5bc1ee005093719beef1dd9e83ac3c8))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * dont set resume-time to null ([#992](https://github.com/railroadmedia/musora-content-services/issues/992)) ([d7f0f3e](https://github.com/railroadmedia/musora-content-services/commit/d7f0f3e6aab53dcb332a9c149dd0a33f95bc1d75))
29
+ * **MU2-1487:** fetchAll to by pass permissions filter ([#991](https://github.com/railroadmedia/musora-content-services/issues/991)) ([39f38ca](https://github.com/railroadmedia/musora-content-services/commit/39f38cad21b97591eae113c32212b1fdc76be035))
30
+ * Replace PUT with PATCH ([a74a007](https://github.com/railroadmedia/musora-content-services/commit/a74a007efdc19fed98a882db5bf15741d95b89d0))
31
+
5
32
  ## [2.163.0](https://github.com/railroadmedia/musora-content-services/compare/v2.162.1...v2.163.0) (2026-06-04)
6
33
 
7
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.163.0",
3
+ "version": "2.164.5",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.d.ts CHANGED
@@ -460,6 +460,11 @@ import {
460
460
  fetchCustomerPayments
461
461
  } from './services/user/payments.ts';
462
462
 
463
+ import {
464
+ fetchPlayerSettings,
465
+ updatePlayerSettings
466
+ } from './services/user/playerSettings.ts';
467
+
463
468
  import {
464
469
  deleteProfilePicture,
465
470
  otherStats,
@@ -624,6 +629,7 @@ declare module 'musora-content-services' {
624
629
  fetchPackData,
625
630
  fetchParentChildRelationshipsFor,
626
631
  fetchPlayAlongsCount,
632
+ fetchPlayerSettings,
627
633
  fetchPlaylist,
628
634
  fetchPlaylistItems,
629
635
  fetchPost,
@@ -841,6 +847,7 @@ declare module 'musora-content-services' {
841
847
  updateMultiUserAccount,
842
848
  updateNotificationSetting,
843
849
  updateOnboarding,
850
+ updatePlayerSettings,
844
851
  updatePlaylist,
845
852
  updatePost,
846
853
  updatePracticeNotes,
package/src/index.js CHANGED
@@ -464,6 +464,11 @@ import {
464
464
  fetchCustomerPayments
465
465
  } from './services/user/payments.ts';
466
466
 
467
+ import {
468
+ fetchPlayerSettings,
469
+ updatePlayerSettings
470
+ } from './services/user/playerSettings.ts';
471
+
467
472
  import {
468
473
  deleteProfilePicture,
469
474
  otherStats,
@@ -623,6 +628,7 @@ export {
623
628
  fetchPackData,
624
629
  fetchParentChildRelationshipsFor,
625
630
  fetchPlayAlongsCount,
631
+ fetchPlayerSettings,
626
632
  fetchPlaylist,
627
633
  fetchPlaylistItems,
628
634
  fetchPost,
@@ -840,6 +846,7 @@ export {
840
846
  updateMultiUserAccount,
841
847
  updateNotificationSetting,
842
848
  updateOnboarding,
849
+ updatePlayerSettings,
843
850
  updatePlaylist,
844
851
  updatePost,
845
852
  updatePracticeNotes,
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @module PlayerSettings
3
+ */
4
+ import { HttpClient } from '../../infrastructure/http/HttpClient'
5
+ import { globalConfig } from '../config.js'
6
+ import type { PlayerSettings, UpdatePlayerSettingsData } from './types'
7
+
8
+ const baseUrl = '/api/user-management-system/v1/user/player-settings'
9
+
10
+ /**
11
+ * @returns {Promise<PlayerSettings>}
12
+ * @throws {HttpError}
13
+ */
14
+ export async function fetchPlayerSettings(): Promise<PlayerSettings> {
15
+ const httpClient = new HttpClient(globalConfig.baseUrl, globalConfig.sessionConfig.token)
16
+ return httpClient.get<PlayerSettings>(baseUrl)
17
+ }
18
+
19
+ /**
20
+ * @param {UpdatePlayerSettingsData} data
21
+ * @returns {Promise<PlayerSettings>}
22
+ * @throws {HttpError}
23
+ */
24
+ export async function updatePlayerSettings(data: UpdatePlayerSettingsData): Promise<PlayerSettings> {
25
+ const httpClient = new HttpClient(globalConfig.baseUrl, globalConfig.sessionConfig.token)
26
+ return httpClient.patch<PlayerSettings>(baseUrl, data)
27
+ }
@@ -96,6 +96,20 @@ export interface AuthResponse {
96
96
  user: User
97
97
  }
98
98
 
99
+ export interface PlayerSettings {
100
+ auto_play: boolean
101
+ auto_next: boolean
102
+ auto_complete: boolean
103
+ playlist_auto_next: boolean
104
+ }
105
+
106
+ export interface UpdatePlayerSettingsData {
107
+ auto_play?: boolean
108
+ auto_next?: boolean
109
+ auto_complete?: boolean
110
+ playlist_auto_next?: boolean
111
+ }
112
+
99
113
  export interface StreakDTO {
100
114
  type: 'week' | 'day'
101
115
  length: number
@@ -0,0 +1,73 @@
1
+ import { HttpClient } from '../../src/infrastructure/http/HttpClient'
2
+ import { fetchPlayerSettings, updatePlayerSettings } from '../../src/services/user/playerSettings'
3
+ import type { PlayerSettings } from '../../src/services/user/types'
4
+
5
+ jest.mock('../../src/infrastructure/http/HttpClient')
6
+
7
+ const mockPlayerSettings: PlayerSettings = {
8
+ auto_play: true,
9
+ auto_next: true,
10
+ auto_complete: true,
11
+ playlist_auto_next: true,
12
+ }
13
+
14
+ describe('playerSettings', () => {
15
+ let mockGet: jest.Mock
16
+ let mockPatch: jest.Mock
17
+
18
+ beforeEach(() => {
19
+ mockGet = jest.fn().mockResolvedValue(mockPlayerSettings)
20
+ mockPatch = jest.fn().mockResolvedValue(mockPlayerSettings)
21
+ ;(HttpClient as jest.Mock).mockImplementation(() => ({
22
+ get: mockGet,
23
+ patch: mockPatch,
24
+ }))
25
+ })
26
+
27
+ afterEach(() => {
28
+ jest.clearAllMocks()
29
+ })
30
+
31
+ describe('fetchPlayerSettings', () => {
32
+ test('calls GET on the correct endpoint', async () => {
33
+ await fetchPlayerSettings()
34
+ expect(mockGet).toHaveBeenCalledWith('/api/user-management-system/v1/user/player-settings')
35
+ })
36
+
37
+ test('returns the player settings from the API', async () => {
38
+ const result = await fetchPlayerSettings()
39
+ expect(result).toEqual(mockPlayerSettings)
40
+ })
41
+ })
42
+
43
+ describe('updatePlayerSettings', () => {
44
+ test('calls PATCH on the correct endpoint with provided data', async () => {
45
+ await updatePlayerSettings({ auto_next: false })
46
+ expect(mockPatch).toHaveBeenCalledWith(
47
+ '/api/user-management-system/v1/user/player-settings',
48
+ { auto_next: false }
49
+ )
50
+ })
51
+
52
+ test('sends only the provided fields (partial update)', async () => {
53
+ await updatePlayerSettings({ playlist_auto_next: false })
54
+ expect(mockPatch).toHaveBeenCalledWith(
55
+ expect.any(String),
56
+ { playlist_auto_next: false }
57
+ )
58
+ })
59
+
60
+ test('sends all fields when all are provided', async () => {
61
+ const allFields = { auto_play: false, auto_next: false, auto_complete: false, playlist_auto_next: false }
62
+ await updatePlayerSettings(allFields)
63
+ expect(mockPatch).toHaveBeenCalledWith(expect.any(String), allFields)
64
+ })
65
+
66
+ test('returns the updated player settings from the API', async () => {
67
+ const updated = { ...mockPlayerSettings, auto_next: false }
68
+ mockPatch.mockResolvedValue(updated)
69
+ const result = await updatePlayerSettings({ auto_next: false })
70
+ expect(result).toEqual(updated)
71
+ })
72
+ })
73
+ })