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.
Files changed (68) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/docs/ContentOrganization.html +2 -2
  3. package/docs/Forums.html +2 -2
  4. package/docs/Gamification.html +2 -2
  5. package/docs/TestUser.html +260 -0
  6. package/docs/UserManagementSystem.html +2 -2
  7. package/docs/api_types.js.html +2 -2
  8. package/docs/config.js.html +2 -2
  9. package/docs/content-org_content-org.js.html +2 -2
  10. package/docs/content-org_guided-courses.ts.html +2 -2
  11. package/docs/content-org_learning-paths.ts.html +2 -2
  12. package/docs/content-org_playlists-types.js.html +2 -2
  13. package/docs/content-org_playlists.js.html +2 -2
  14. package/docs/content.js.html +2 -2
  15. package/docs/forums_categories.ts.html +2 -2
  16. package/docs/forums_forums.ts.html +2 -2
  17. package/docs/forums_posts.ts.html +4 -3
  18. package/docs/forums_threads.ts.html +2 -2
  19. package/docs/gamification_awards.ts.html +2 -2
  20. package/docs/gamification_gamification.js.html +2 -2
  21. package/docs/global.html +233 -2
  22. package/docs/index.html +2 -2
  23. package/docs/liveTesting.ts.html +102 -0
  24. package/docs/module-Accounts.html +2 -2
  25. package/docs/module-Awards.html +2 -2
  26. package/docs/module-Config.html +2 -2
  27. package/docs/module-Content-Services-V2.html +2 -2
  28. package/docs/module-Forums.html +8 -8
  29. package/docs/module-GuidedCourses.html +2 -2
  30. package/docs/module-Interests.html +2 -2
  31. package/docs/module-Onboarding.html +2 -2
  32. package/docs/module-Payments.html +2 -2
  33. package/docs/module-Permissions.html +2 -2
  34. package/docs/module-Playlists.html +2 -2
  35. package/docs/module-Railcontent-Services.html +2 -2
  36. package/docs/module-Sanity-Services.html +2 -2
  37. package/docs/module-Sessions.html +2 -2
  38. package/docs/module-UserActivity.html +2 -2
  39. package/docs/module-UserChat.html +2 -2
  40. package/docs/module-UserManagement.html +2 -2
  41. package/docs/module-UserMemberships.html +2 -2
  42. package/docs/module-UserNotifications.html +2 -2
  43. package/docs/module-UserProfile.html +2 -2
  44. package/docs/railcontent.js.html +2 -2
  45. package/docs/sanity.js.html +2 -2
  46. package/docs/userActivity.js.html +2 -2
  47. package/docs/user_account.ts.html +2 -2
  48. package/docs/user_chat.js.html +2 -2
  49. package/docs/user_interests.js.html +2 -2
  50. package/docs/user_management.js.html +2 -2
  51. package/docs/user_memberships.ts.html +2 -2
  52. package/docs/user_notifications.js.html +2 -2
  53. package/docs/user_onboarding.ts.html +2 -2
  54. package/docs/user_payments.ts.html +2 -2
  55. package/docs/user_permissions.js.html +2 -2
  56. package/docs/user_profile.js.html +2 -2
  57. package/docs/user_sessions.js.html +2 -2
  58. package/docs/user_types.js.html +2 -2
  59. package/docs/user_user-management-system.js.html +2 -2
  60. package/jsdoc.json +1 -0
  61. package/package.json +1 -1
  62. package/src/contentMetaData.js +75 -12
  63. package/src/contentTypeConfig.js +23 -3
  64. package/src/index.d.ts +5 -0
  65. package/src/index.js +5 -0
  66. package/src/services/forums/posts.ts +2 -1
  67. package/src/services/liveTesting.ts +30 -0
  68. 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
+ }
@@ -1,8 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(rg:*)"
5
- ],
6
- "deny": []
7
- }
8
- }