musora-content-services 2.145.9 → 2.147.0

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,22 @@
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.147.0](https://github.com/railroadmedia/musora-content-services/compare/v2.146.1...v2.147.0) (2026-04-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * Add children to fetchScheduledAndNewReleases for navigateTo calculations ([#901](https://github.com/railroadmedia/musora-content-services/issues/901)) ([3ade1ad](https://github.com/railroadmedia/musora-content-services/commit/3ade1ad400e1dd9e56d245f3a37d77d709a0d4e1))
11
+
12
+ ### [2.146.1](https://github.com/railroadmedia/musora-content-services/compare/v2.146.0...v2.146.1) (2026-04-02)
13
+
14
+ ## [2.146.0](https://github.com/railroadmedia/musora-content-services/compare/v2.145.9...v2.146.0) (2026-04-02)
15
+
16
+
17
+ ### Features
18
+
19
+ * **BEHLPT-18:** remove user from muppet ([#891](https://github.com/railroadmedia/musora-content-services/issues/891)) ([ecdf778](https://github.com/railroadmedia/musora-content-services/commit/ecdf778108f974f59885c3d442c47c90152c5554))
20
+
5
21
  ### [2.145.9](https://github.com/railroadmedia/musora-content-services/compare/v2.145.8...v2.145.9) (2026-04-01)
6
22
 
7
23
  ### [2.145.8](https://github.com/railroadmedia/musora-content-services/compare/v2.145.7...v2.145.8) (2026-04-01)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.145.9",
3
+ "version": "2.147.0",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -72,7 +72,7 @@ export const DEFAULT_FIELDS = [
72
72
  '"grandparent_id": parent_content_data[1].id',
73
73
  'live_event_start_time',
74
74
  'live_event_end_time',
75
- 'enrollment_start_time',
75
+ 'enrollment_start_time',
76
76
  'enrollment_end_time',
77
77
  ]
78
78
 
@@ -677,6 +677,7 @@ export let contentTypeConfig = {
677
677
  'show_in_new_feed',
678
678
  isLiveField()
679
679
  ],
680
+ includeChildFields: true,
680
681
  },
681
682
  }
682
683
 
package/src/index.d.ts CHANGED
@@ -218,6 +218,7 @@ import {
218
218
  createAccount,
219
219
  createInvites,
220
220
  fetchUsersMultiAccountDetails,
221
+ removeUserFromActiveMultiUserAccount,
221
222
  rescindInvite
222
223
  } from './services/multi-user-accounts/multi-user-accounts.ts';
223
224
 
@@ -727,6 +728,7 @@ declare module 'musora-content-services' {
727
728
  registerProgressCallback,
728
729
  removeContentAsInterested,
729
730
  removeContentAsNotInterested,
731
+ removeUserFromActiveMultiUserAccount,
730
732
  removeUserPractice,
731
733
  replyToComment,
732
734
  report,
package/src/index.js CHANGED
@@ -222,6 +222,7 @@ import {
222
222
  createAccount,
223
223
  createInvites,
224
224
  fetchUsersMultiAccountDetails,
225
+ removeUserFromActiveMultiUserAccount,
225
226
  rescindInvite
226
227
  } from './services/multi-user-accounts/multi-user-accounts.ts';
227
228
 
@@ -726,6 +727,7 @@ export {
726
727
  registerProgressCallback,
727
728
  removeContentAsInterested,
728
729
  removeContentAsNotInterested,
730
+ removeUserFromActiveMultiUserAccount,
729
731
  removeUserPractice,
730
732
  replyToComment,
731
733
  report,
@@ -343,21 +343,26 @@ export async function getContentRows(brand, pageName, contentRowSlug = null, {
343
343
  * .then(response => console.log(response))
344
344
  * .catch(error => console.error(error));
345
345
  */
346
- export async function getNewAndUpcoming(brand, {
347
- page = 1,
348
- limit = 10,
349
- } = {}) {
346
+ export async function getNewAndUpcoming(brand, { page = 1, limit = 10 } = {}) {
347
+ const data = await addContextToContent(
348
+ fetchScheduledAndNewReleases,
349
+ brand,
350
+ { page: page, limit: limit },
351
+ {
352
+ addNavigateTo: true,
353
+ addProgressPercentage: true,
354
+ addProgressStatus: true,
355
+ }
356
+ )
350
357
 
351
- const data = await fetchScheduledAndNewReleases(brand, {page: page, limit: limit});
352
358
  if (!data) {
353
- return null;
359
+ return null
354
360
  }
355
361
 
356
362
  return {
357
363
  data: data,
358
- };
364
+ }
359
365
  }
360
-
361
366
  /**
362
367
  * Fetches scheduled content rows for a given brand with optional filtering by content row ID.
363
368
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @module MultiUserAccounts
3
3
  */
4
- import { HttpClient } from '../../infrastructure/http/HttpClient'
4
+ import { HttpClient, DELETE } from '../../infrastructure/http/HttpClient'
5
5
  import { globalConfig } from '../config.js'
6
6
 
7
7
  const baseUrl = `/api/multi-user-accounts/v1`
@@ -75,9 +75,7 @@ export async function createAccount(params: CreateAccountParams): Promise<MultiU
75
75
  */
76
76
  export async function fetchUsersMultiAccountDetails(userId: number): Promise<UsersMultiAccountResponse> {
77
77
  const httpClient = new HttpClient(globalConfig.baseUrl)
78
- const url = `${baseUrl}/${userId}/details`
79
- console.log(url)
80
- return httpClient.get<UsersMultiAccountResponse>(url)
78
+ return httpClient.get<UsersMultiAccountResponse>(`${baseUrl}/${userId}/details`)
81
79
  }
82
80
 
83
81
  /**
@@ -115,3 +113,15 @@ export async function rescindInvite(inviteId: number): Promise<void> {
115
113
  const httpClient = new HttpClient(globalConfig.baseUrl)
116
114
  return httpClient.post<void>(`${baseUrl}/invites/${inviteId}/rescind`, {})
117
115
  }
116
+
117
+
118
+ /**
119
+ * Removes a member from a multi-user account. authorized user must be the primary account owner, or the user passed
120
+ *
121
+ * @param {number} userId - Id of the user to remove
122
+ * @returns {Promise<void|MultiUserAccountResponse>} - Updated MultiUserAccountResponse if account owner, void if active user
123
+ * @throws {HttpError} - If the request fails.
124
+ */
125
+ export async function removeUserFromActiveMultiUserAccount(userId: number): Promise<MultiUserAccountResponse|void> {
126
+ return DELETE(`${globalConfig.baseUrl}${baseUrl}/${userId}/remove`, {})
127
+ }
@@ -2088,7 +2088,7 @@ export async function fetchScheduledAndNewReleases(
2088
2088
 
2089
2089
  const parentsWithoutSong = parentRecentTypes.filter(type => type !== 'song')
2090
2090
 
2091
- const fields = getFieldsForContentType('new-and-scheduled')
2091
+ const fields = await getFieldsForContentTypeWithFilteredChildren('new-and-scheduled')
2092
2092
 
2093
2093
  const lessonFilter = f.combine(
2094
2094
  "show_in_new_feed == true",