musora-content-services 2.67.1 → 2.69.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 +16 -0
- package/docs/ContentOrganization.html +2 -2
- package/docs/Forums.html +2 -2
- package/docs/Gamification.html +2 -2
- package/docs/TestUser.html +260 -0
- 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 +2 -2
- 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 +4 -3
- package/docs/forums_threads.ts.html +2 -2
- package/docs/gamification_awards.ts.html +2 -2
- package/docs/gamification_gamification.js.html +2 -2
- package/docs/global.html +233 -2
- package/docs/index.html +2 -2
- package/docs/liveTesting.ts.html +102 -0
- package/docs/module-Accounts.html +2 -2
- package/docs/module-Awards.html +2 -2
- package/docs/module-Config.html +2 -2
- package/docs/module-Content-Services-V2.html +2 -2
- package/docs/module-Forums.html +8 -8
- package/docs/module-GuidedCourses.html +2 -2
- package/docs/module-Interests.html +2 -2
- 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-Railcontent-Services.html +2 -2
- package/docs/module-Sanity-Services.html +2 -2
- 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/railcontent.js.html +2 -2
- package/docs/sanity.js.html +2 -2
- package/docs/userActivity.js.html +2 -2
- package/docs/user_account.ts.html +2 -2
- 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/jsdoc.json +1 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +75 -12
- package/src/contentTypeConfig.js +23 -3
- package/src/index.d.ts +5 -0
- package/src/index.js +5 -0
- package/src/services/forums/posts.ts +2 -1
- package/src/services/liveTesting.ts +30 -0
- package/.claude/settings.local.json +0 -8
|
@@ -132,6 +132,7 @@ export async function fetchCommunityGuidelines(brand: string): Promise<ForumPost
|
|
|
132
132
|
export interface SearchParams {
|
|
133
133
|
page?: number,
|
|
134
134
|
limit?: number,
|
|
135
|
+
category_id?: number,
|
|
135
136
|
/** Sort order: "-published_on" (default), "published_on", or "mine". */
|
|
136
137
|
sort?: '-published_on' | string,
|
|
137
138
|
term: string
|
|
@@ -147,7 +148,7 @@ export interface SearchParams {
|
|
|
147
148
|
*/
|
|
148
149
|
export async function search(
|
|
149
150
|
brand: string,
|
|
150
|
-
params: SearchParams
|
|
151
|
+
params: SearchParams
|
|
151
152
|
): Promise<PaginatedResponse<ForumPost>> {
|
|
152
153
|
const httpClient = new HttpClient(globalConfig.baseUrl)
|
|
153
154
|
const queryObj: Record<string, string> = { brand, ...Object.fromEntries(
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { HttpClient } from '../infrastructure/http/HttpClient'
|
|
2
|
+
import { HttpError } from '../infrastructure/http/interfaces/HttpError'
|
|
3
|
+
import { globalConfig } from './config.js'
|
|
4
|
+
|
|
5
|
+
export interface CreateTestUserProps {
|
|
6
|
+
productId?: number
|
|
7
|
+
createdAt?: Date
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @interface TestUser - Represents a test user object.
|
|
12
|
+
* @property {User} user - The user object containing user details.
|
|
13
|
+
* @property {string} brand - The brand associated with the test user.
|
|
14
|
+
* @property {string} verificationToken - The verification token for the test user.
|
|
15
|
+
*/
|
|
16
|
+
export interface TestUser {
|
|
17
|
+
user: object
|
|
18
|
+
brand: string
|
|
19
|
+
verificationToken: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param {CreateTestUserProps} props - The parameters for creating a test user.
|
|
24
|
+
* @property {number} [productId] - The product ID to associate with the test user.
|
|
25
|
+
* @property {Date} [createdAt] - The creation date for the test user.
|
|
26
|
+
*/
|
|
27
|
+
export function createTestUser(props: CreateTestUserProps): Promise<void> {
|
|
28
|
+
const httpClient = new HttpClient(globalConfig.baseUrl)
|
|
29
|
+
return httpClient.post<void>(`/api/testing/users/create`, props)
|
|
30
|
+
}
|