musora-content-services 2.39.2 → 2.39.4

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,10 @@
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.39.4](https://github.com/railroadmedia/musora-content-services/compare/v2.39.3...v2.39.4) (2025-09-16)
6
+
7
+ ### [2.39.3](https://github.com/railroadmedia/musora-content-services/compare/v2.39.2...v2.39.3) (2025-09-16)
8
+
5
9
  ### [2.39.2](https://github.com/railroadmedia/musora-content-services/compare/v2.39.1...v2.39.2) (2025-09-15)
6
10
 
7
11
  ### [2.39.1](https://github.com/railroadmedia/musora-content-services/compare/v2.39.0...v2.39.1) (2025-09-15)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.39.2",
3
+ "version": "2.39.4",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -12,20 +12,28 @@ import './types.js'
12
12
  const excludeFromGeneratedIndex = []
13
13
 
14
14
  /**
15
- * Authenticates the User.
15
+ * Sends a login request to the User Management System.
16
16
  *
17
- * @param {string} email - User's email
18
- * @param {string} password - User's password
19
- * @param {string|null} deviceName - Device name for the user
20
- * @param {string|null} deviceToken - Firebase token for the device
21
- * @param {string|null} platform - Device platform
17
+ * The request always includes the `X-Client-Platform` header set to `"mobile"`.
18
+ * This header is used by the backend to identify the source client type.
22
19
  *
23
- * @returns {Promise<AuthResponse>} - User data and authentication token
20
+ * @param {string} email - The user's email address.
21
+ * @param {string} password - The user's account password.
22
+ * @param {string|null} [deviceName] - A human-readable identifier for the device (e.g. "iPhone 15").
23
+ * @param {string|null} [deviceToken] - Optional Firebase Cloud Messaging token for push notifications.
24
+ * @param {string|null} [platform] - The device platform (e.g. "ios", "android", "web").
25
+ *
26
+ * @returns {Promise<Response>} - The raw `fetch` Response object.
27
+ * Call `response.json()` to access the API payload, which typically includes:
28
+ * - `token` (string): Access token.
29
+ * - `refresh_token` (string): Refresh token.
30
+ * - `user` (object): Authenticated user data.
24
31
  *
25
32
  * @example
26
- * login('john@doe.com', 'music123')
27
- * .then(content => console.log(content))
28
- * .catch(error => console.error(error));
33
+ * login('john@doe.com', 'music123', 'Pixel 8', 'abc123', 'android')
34
+ * .then(res => res.json())
35
+ * .then(data => console.log(data))
36
+ * .catch(err => console.error(err));
29
37
  */
30
38
  export async function login(email, password, deviceName, deviceToken, platform) {
31
39
  const baseUrl = `${globalConfig.baseUrl}/api/user-management-system`
@@ -51,7 +59,7 @@ export async function loginWithProvider(provider, providerIdToken, deviceToken,
51
59
 
52
60
  try {
53
61
  const response = await fetch(`${baseUrl}/v1/auth/${provider}/mobile`, {
54
- method: 'POST',
62
+ method: 'GET',
55
63
  headers: {
56
64
  'Content-Type': 'application/json',
57
65
  'X-Client-Platform': 'mobile',