musora-content-services 2.104.7 → 2.104.8
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/.claude/settings.local.json +11 -3
- package/.github/workflows/conventional-commits.yaml +0 -0
- package/.github/workflows/node.js.yml +0 -0
- package/.prettierignore +0 -0
- package/.prettierrc +0 -0
- package/CHANGELOG.md +2 -0
- package/jest.config.js +0 -0
- package/package.json +1 -1
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/services/user/sessions.js +31 -0
- package/test/dataContext.test.js +0 -0
- package/test/localStorageMock.js +0 -0
- package/test/log.js +0 -0
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
3
|
"allow": [
|
|
4
|
-
"Bash(
|
|
5
|
-
"Bash(npm
|
|
4
|
+
"Bash(git show:*)",
|
|
5
|
+
"Bash(npm test:*)",
|
|
6
|
+
"Bash(done)",
|
|
7
|
+
"Bash(for line in 82 108 161 187 215 247 273 299 332 350 372)",
|
|
8
|
+
"Bash(do echo \"Line $line:\")",
|
|
9
|
+
"Bash(git add:*)",
|
|
10
|
+
"Bash(git commit:*)",
|
|
11
|
+
"Bash(git checkout:*)",
|
|
12
|
+
"Bash(git diff:*)"
|
|
6
13
|
],
|
|
7
|
-
"deny": []
|
|
14
|
+
"deny": [],
|
|
15
|
+
"ask": []
|
|
8
16
|
}
|
|
9
17
|
}
|
|
File without changes
|
|
File without changes
|
package/.prettierignore
CHANGED
|
File without changes
|
package/.prettierrc
CHANGED
|
File without changes
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.104.8](https://github.com/railroadmedia/musora-content-services/compare/v2.104.7...v2.104.8) (2025-12-16)
|
|
6
|
+
|
|
5
7
|
### [2.104.7](https://github.com/railroadmedia/musora-content-services/compare/v2.104.6...v2.104.7) (2025-12-16)
|
|
6
8
|
|
|
7
9
|
### [2.104.6](https://github.com/railroadmedia/musora-content-services/compare/v2.104.5...v2.104.6) (2025-12-16)
|
package/jest.config.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -396,6 +396,7 @@ import {
|
|
|
396
396
|
} from './services/user/profile.js';
|
|
397
397
|
|
|
398
398
|
import {
|
|
399
|
+
getAuthKey,
|
|
399
400
|
login,
|
|
400
401
|
loginWithAuthKey,
|
|
401
402
|
logout
|
|
@@ -585,6 +586,7 @@ declare module 'musora-content-services' {
|
|
|
585
586
|
getAllCompletedByIds,
|
|
586
587
|
getAllStarted,
|
|
587
588
|
getAllStartedOrCompleted,
|
|
589
|
+
getAuthKey,
|
|
588
590
|
getAwardStatistics,
|
|
589
591
|
getCompletedAwards,
|
|
590
592
|
getContentAwards,
|
package/src/index.js
CHANGED
|
@@ -400,6 +400,7 @@ import {
|
|
|
400
400
|
} from './services/user/profile.js';
|
|
401
401
|
|
|
402
402
|
import {
|
|
403
|
+
getAuthKey,
|
|
403
404
|
login,
|
|
404
405
|
loginWithAuthKey,
|
|
405
406
|
logout
|
|
@@ -584,6 +585,7 @@ export {
|
|
|
584
585
|
getAllCompletedByIds,
|
|
585
586
|
getAllStarted,
|
|
586
587
|
getAllStartedOrCompleted,
|
|
588
|
+
getAuthKey,
|
|
587
589
|
getAwardStatistics,
|
|
588
590
|
getCompletedAwards,
|
|
589
591
|
getContentAwards,
|
|
@@ -97,6 +97,37 @@ export async function logout() {
|
|
|
97
97
|
})
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* @param {string|null} brand - Optional brand parameter (drumeo, pianote, guitareo, singeo)
|
|
102
|
+
* @returns {Promise<{data: string}>} Temporary auth key valid for 5 minutes
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* getAuthKey('drumeo')
|
|
106
|
+
* .then(response => {
|
|
107
|
+
* const authKey = response.data
|
|
108
|
+
* const webViewUrl = `https://app.musora.com/page?user_id=${userId}&auth_key=${authKey}`
|
|
109
|
+
* })
|
|
110
|
+
* .catch(error => console.error(error));
|
|
111
|
+
*/
|
|
112
|
+
export async function getAuthKey(brand = null) {
|
|
113
|
+
const baseUrl = `${globalConfig.baseUrl}/api/user-management-system`
|
|
114
|
+
const url = brand ? `${baseUrl}/v1/auth-key?brand=${brand}` : `${baseUrl}/v1/auth-key`
|
|
115
|
+
|
|
116
|
+
const response = await fetch(url, {
|
|
117
|
+
method: 'GET',
|
|
118
|
+
headers: {
|
|
119
|
+
Authorization: `Bearer 503154|sArOCAtYT3ejVnCdoZTj8ocEfQbfDWi5GTTtooQ107d93d29`,
|
|
120
|
+
'Content-Type': 'application/json',
|
|
121
|
+
},
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
if (!response.ok) {
|
|
125
|
+
throw new Error(`Failed to get auth key: ${response.status}`)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return response.json()
|
|
129
|
+
}
|
|
130
|
+
|
|
100
131
|
export async function loginWithAuthKey(userId, authKey, deviceName, deviceToken, platform) {
|
|
101
132
|
const baseUrl = `${globalConfig.baseUrl}/api/user-management-system`
|
|
102
133
|
return fetch(`${baseUrl}/v1/sessions/auth-key`, {
|
package/test/dataContext.test.js
CHANGED
|
File without changes
|
package/test/localStorageMock.js
CHANGED
|
File without changes
|
package/test/log.js
CHANGED
|
File without changes
|