musora-content-services 1.0.7 → 1.0.10
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 +4 -0
- package/README.md +8 -1
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/global.html +1881 -1588
- package/docs/index.html +33 -10
- package/docs/index.js.html +304 -99
- package/docs/scripts/collapse.js +39 -0
- package/docs/scripts/commonNav.js +28 -0
- package/docs/scripts/nav.js +12 -0
- package/docs/scripts/polyfill.js +4 -0
- package/docs/scripts/search.js +99 -265
- package/docs/styles/jsdoc.css +776 -0
- package/docs/styles/prettify.css +80 -0
- package/jest.config.js +198 -0
- package/jsdoc.json +1 -1
- package/package.json +8 -5
- package/src/index.js +190 -49
- package/test/sanityQueryService.test.js +88 -0
package/docs/index.js.html
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
|
|
4
5
|
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
6
|
<title>index.js - Documentation</title>
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
|
|
8
9
|
<script src="scripts/prettify/prettify.js"></script>
|
|
9
10
|
<script src="scripts/prettify/lang-css.js"></script>
|
|
10
11
|
<!--[if lt IE 9]>
|
|
11
12
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
12
13
|
<![endif]-->
|
|
13
|
-
<link type="text/css" rel="stylesheet" href="
|
|
14
|
-
<link type="text/css" rel="stylesheet" href="styles/
|
|
15
|
-
<
|
|
14
|
+
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
|
|
15
|
+
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
|
|
16
|
+
<script src="scripts/nav.js" defer></script>
|
|
17
|
+
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
16
19
|
</head>
|
|
17
20
|
<body>
|
|
18
21
|
|
|
@@ -23,8 +26,11 @@
|
|
|
23
26
|
|
|
24
27
|
<label for="nav-trigger" class="overlay"></label>
|
|
25
28
|
|
|
26
|
-
<nav>
|
|
27
|
-
|
|
29
|
+
<nav >
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#fetchAll">fetchAll</a></li><li><a href="global.html#fetchAllFilterOptions">fetchAllFilterOptions</a></li><li><a href="global.html#fetchAllSongs">fetchAllSongs</a></li><li><a href="global.html#fetchArtists">fetchArtists</a></li><li><a href="global.html#fetchByRailContentId">fetchByRailContentId</a></li><li><a href="global.html#fetchByRailContentIds">fetchByRailContentIds</a></li><li><a href="global.html#fetchChildren">fetchChildren</a></li><li><a href="global.html#fetchLessonContent">fetchLessonContent</a></li><li><a href="global.html#fetchMethodChildren">fetchMethodChildren</a></li><li><a href="global.html#fetchMethodNextLesson">fetchMethodNextLesson</a></li><li><a href="global.html#fetchNewReleases">fetchNewReleases</a></li><li><a href="global.html#fetchNextPreviousLesson">fetchNextPreviousLesson</a></li><li><a href="global.html#fetchPackAll">fetchPackAll</a></li><li><a href="global.html#fetchPackChildren">fetchPackChildren</a></li><li><a href="global.html#fetchRelatedLessons">fetchRelatedLessons</a></li><li><a href="global.html#fetchRelatedSongs">fetchRelatedSongs</a></li><li><a href="global.html#fetchSanity">fetchSanity</a></li><li><a href="global.html#fetchSongArtistCount">fetchSongArtistCount</a></li><li><a href="global.html#fetchSongById">fetchSongById</a></li><li><a href="global.html#fetchSongCount">fetchSongCount</a></li><li><a href="global.html#fetchSongFilterOptions">fetchSongFilterOptions</a></li><li><a href="global.html#fetchUpcomingEvents">fetchUpcomingEvents</a></li><li><a href="global.html#fetchWorkouts">fetchWorkouts</a></li><li><a href="global.html#initializeSanityService">initializeSanityService</a></li></ul>
|
|
33
|
+
|
|
28
34
|
</nav>
|
|
29
35
|
|
|
30
36
|
<div id="main">
|
|
@@ -39,15 +45,40 @@
|
|
|
39
45
|
|
|
40
46
|
<section>
|
|
41
47
|
<article>
|
|
42
|
-
<pre class="prettyprint source linenums"><code>
|
|
48
|
+
<pre class="prettyprint source linenums"><code>let globalConfig = {};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Initializes the Sanity service with the given configuration.
|
|
52
|
+
* This function must be called before using any other functions in this library.
|
|
53
|
+
*
|
|
54
|
+
* @param {Object} config - Configuration object containing Sanity API settings.
|
|
55
|
+
* @param {string} config.token - The API token for authenticating with Sanity.
|
|
56
|
+
* @param {string} config.projectId - The project ID in Sanity.
|
|
57
|
+
* @param {string} config.dataset - The dataset name in Sanity.
|
|
58
|
+
* @param {string} config.version - The API version to use.
|
|
59
|
+
* @param {boolean} [config.debug=false] - Optional flag to enable debug mode, which logs the query and results.
|
|
60
|
+
* @param {boolean} [config.useCachedAPI=true] - Optional flag to disable cached API. *
|
|
61
|
+
* @example
|
|
62
|
+
* // Initialize the Sanity service in your app.js
|
|
63
|
+
* initializeSanityService({
|
|
64
|
+
* token: 'your-sanity-api-token',
|
|
65
|
+
* projectId: 'your-sanity-project-id',
|
|
66
|
+
* dataset: 'your-dataset-name',
|
|
67
|
+
* version: '2021-06-07',
|
|
68
|
+
* debug: true // Optional: Enable debug mode
|
|
69
|
+
* useCachedAPI: true // Optional: Use cached API
|
|
70
|
+
* });
|
|
71
|
+
*/
|
|
72
|
+
function initializeSanityService(config) {
|
|
73
|
+
globalConfig = config;
|
|
74
|
+
}
|
|
43
75
|
|
|
44
76
|
/**
|
|
45
77
|
* Fetch a song by its document ID from Sanity.
|
|
46
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
47
78
|
* @param {string} documentId - The ID of the document to fetch.
|
|
48
79
|
* @returns {Promise<Object|null>} - The fetched song data or null if not found.
|
|
49
80
|
*/
|
|
50
|
-
|
|
81
|
+
async function fetchSongById(documentId) {
|
|
51
82
|
const fields = [
|
|
52
83
|
'title',
|
|
53
84
|
'"thumbnail_url": thumbnail.asset->url',
|
|
@@ -56,6 +87,7 @@ export async function fetchSongById(config, documentId) {
|
|
|
56
87
|
'album',
|
|
57
88
|
'instrumentless',
|
|
58
89
|
'soundslice',
|
|
90
|
+
'railcontent_id',
|
|
59
91
|
'"resources": resource[]{resource_url, resource_name}',
|
|
60
92
|
];
|
|
61
93
|
|
|
@@ -63,32 +95,40 @@ export async function fetchSongById(config, documentId) {
|
|
|
63
95
|
*[_type == "song" && railcontent_id == ${documentId}]{
|
|
64
96
|
${fields.join(', ')}
|
|
65
97
|
}`;
|
|
66
|
-
return fetchSanity(
|
|
98
|
+
return fetchSanity(query, false);
|
|
67
99
|
}
|
|
68
100
|
|
|
69
101
|
/**
|
|
70
102
|
* Fetch all artists with lessons available for a specific brand.
|
|
71
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
72
103
|
* @param {string} brand - The brand for which to fetch artists.
|
|
73
104
|
* @returns {Promise<Object|null>} - The fetched artist data or null if not found.
|
|
74
105
|
*/
|
|
75
|
-
|
|
106
|
+
async function fetchArtists(brand) {
|
|
76
107
|
const query = `
|
|
77
108
|
*[_type == "artist"]{
|
|
78
109
|
name,
|
|
79
110
|
"lessonsCount": count(*[_type == "song" && brand == "${brand}" && references(^._id)])
|
|
80
111
|
}[lessonsCount > 0]`;
|
|
81
|
-
return fetchSanity(
|
|
112
|
+
return fetchSanity(query, true);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Fetch current number of artists for songs within a brand.
|
|
117
|
+
* @param {string} brand - The current brand.
|
|
118
|
+
* @returns {Promise<int|null>} - The fetched count of artists.
|
|
119
|
+
*/
|
|
120
|
+
async function fetchSongArtistCount(brand) {
|
|
121
|
+
const query = `count(*[_type == 'artist']{'lessonsCount': count(*[_type == 'song' && brand == '${brand}' && references(^._id)]._id)}[lessonsCount > 0])`;
|
|
122
|
+
return fetchSanity(query, false);
|
|
82
123
|
}
|
|
83
124
|
|
|
84
125
|
/**
|
|
85
126
|
* Fetch related songs for a specific brand and song ID.
|
|
86
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
87
127
|
* @param {string} brand - The brand for which to fetch related songs.
|
|
88
128
|
* @param {string} songId - The ID of the song to find related songs for.
|
|
89
129
|
* @returns {Promise<Object|null>} - The fetched related songs data or null if not found.
|
|
90
130
|
*/
|
|
91
|
-
|
|
131
|
+
async function fetchRelatedSongs(brand, songId) {
|
|
92
132
|
const query = `
|
|
93
133
|
*[_type == "song" && railcontent_id == ${songId}]{
|
|
94
134
|
"data": array::unique([
|
|
@@ -153,12 +193,11 @@ export async function fetchRelatedSongs(config, brand, songId) {
|
|
|
153
193
|
])[0...10]
|
|
154
194
|
}`;
|
|
155
195
|
|
|
156
|
-
return fetchSanity(
|
|
196
|
+
return fetchSanity(query, true);
|
|
157
197
|
}
|
|
158
198
|
|
|
159
199
|
/**
|
|
160
200
|
* Fetch all songs for a specific brand with pagination and search options.
|
|
161
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
162
201
|
* @param {string} brand - The brand for which to fetch songs.
|
|
163
202
|
* @param {Object} params - Parameters for pagination, filtering, and sorting.
|
|
164
203
|
* @param {number} [params.page=1] - The page number for pagination.
|
|
@@ -169,7 +208,14 @@ export async function fetchRelatedSongs(config, brand, songId) {
|
|
|
169
208
|
* @param {string} [params.groupBy=""] - The field to group the results by.
|
|
170
209
|
* @returns {Promise<Object|null>} - The fetched song data or null if not found.
|
|
171
210
|
*/
|
|
172
|
-
|
|
211
|
+
async function fetchAllSongs(brand, {
|
|
212
|
+
page = 1,
|
|
213
|
+
limit = 10,
|
|
214
|
+
searchTerm = "",
|
|
215
|
+
sort = "-published_on",
|
|
216
|
+
includedFields = [],
|
|
217
|
+
groupBy = ""
|
|
218
|
+
}) {
|
|
173
219
|
console.log('groupBy', groupBy)
|
|
174
220
|
const start = (page - 1) * limit;
|
|
175
221
|
const end = start + limit;
|
|
@@ -287,16 +333,15 @@ export async function fetchAllSongs(config, brand, { page = 1, limit = 10, searc
|
|
|
287
333
|
`;
|
|
288
334
|
}
|
|
289
335
|
|
|
290
|
-
return fetchSanity(
|
|
336
|
+
return fetchSanity(query, false);
|
|
291
337
|
}
|
|
292
338
|
|
|
293
339
|
/**
|
|
294
340
|
* Fetch filter options for a specific brand.
|
|
295
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
296
341
|
* @param {string} brand - The brand for which to fetch filter options.
|
|
297
342
|
* @returns {Promise<Object|null>} - The fetched filter options or null if not found.
|
|
298
343
|
*/
|
|
299
|
-
|
|
344
|
+
async function fetchSongFilterOptions(brand) {
|
|
300
345
|
const query = `
|
|
301
346
|
{
|
|
302
347
|
"difficulty": [
|
|
@@ -317,27 +362,25 @@ export async function fetchFilterOptions(config, brand) {
|
|
|
317
362
|
}
|
|
318
363
|
`;
|
|
319
364
|
|
|
320
|
-
return fetchSanity(
|
|
365
|
+
return fetchSanity(query, false);
|
|
321
366
|
}
|
|
322
367
|
|
|
323
368
|
/**
|
|
324
369
|
* Fetch the total count of songs for a specific brand.
|
|
325
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
326
370
|
* @param {string} brand - The brand for which to fetch the song count.
|
|
327
371
|
* @returns {Promise<number|null>} - The total count of songs or null if an error occurs.
|
|
328
372
|
*/
|
|
329
|
-
|
|
373
|
+
async function fetchSongCount(brand) {
|
|
330
374
|
const query = `count(*[_type == 'song' && brand == "${brand}"])`;
|
|
331
|
-
return fetchSanity(
|
|
375
|
+
return fetchSanity(query, false);
|
|
332
376
|
}
|
|
333
377
|
|
|
334
378
|
/**
|
|
335
379
|
* Fetch the latest workouts for the home page of a specific brand.
|
|
336
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
337
380
|
* @param {string} brand - The brand for which to fetch workouts.
|
|
338
381
|
* @returns {Promise<Object|null>} - The fetched workout data or null if not found.
|
|
339
382
|
*/
|
|
340
|
-
|
|
383
|
+
async function fetchWorkouts(brand) {
|
|
341
384
|
const query = `*[_type == 'workout' && brand == '${brand}'] [0...5] {
|
|
342
385
|
railcontent_id,
|
|
343
386
|
title,
|
|
@@ -349,16 +392,15 @@ export async function fetchWorkouts(config, brand) {
|
|
|
349
392
|
web_url_path,
|
|
350
393
|
published_on
|
|
351
394
|
} | order(published_on desc)[0...5]`
|
|
352
|
-
return fetchSanity(
|
|
395
|
+
return fetchSanity(query, true);
|
|
353
396
|
}
|
|
354
397
|
|
|
355
398
|
/**
|
|
356
399
|
* Fetch the latest new releases for a specific brand.
|
|
357
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
358
400
|
* @param {string} brand - The brand for which to fetch new releases.
|
|
359
401
|
* @returns {Promise<Object|null>} - The fetched new releases data or null if not found.
|
|
360
402
|
*/
|
|
361
|
-
|
|
403
|
+
async function fetchNewReleases(brand) {
|
|
362
404
|
const newTypes = {
|
|
363
405
|
'drumeo': ["drum-fest-international-2022", "spotlight", "the-history-of-electronic-drums", "backstage-secrets", "quick-tips", "question-and-answer", "student-collaborations", "live-streams", "live", "podcasts", "solos", "boot-camps", "gear-guides", "performances", "in-rhythm", "challenges", "on-the-road", "diy-drum-experiments", "rhythmic-adventures-of-captain-carson", "study-the-greats", "rhythms-from-another-planet", "tama-drums", "paiste-cymbals", "behind-the-scenes", "exploring-beats", "sonor-drums", "course", "play-along", "student-focus", "coach-stream", "learning-path-level", "unit", "quick-tips", "live", "question-and-answer", "student-review", "boot-camps", "song", "chords-and-scales", "pack", "podcasts", "workout", "challenge", "challenge-part"],
|
|
364
406
|
'pianote': ["student-review", "student-reviews", "question-and-answer", "course", "play-along", "student-focus", "coach-stream", "learning-path-level", "unit", "quick-tips", "live", "question-and-answer", "student-review", "boot-camps", "song", "chords-and-scales", "pack", "podcasts", "workout", "challenge", "challenge-part"],
|
|
@@ -378,16 +420,15 @@ export async function fetchNewReleases(config, brand) {
|
|
|
378
420
|
web_url_path,
|
|
379
421
|
published_on
|
|
380
422
|
} | order(published_on desc)[0...5]`
|
|
381
|
-
return fetchSanity(
|
|
423
|
+
return fetchSanity(query, true);
|
|
382
424
|
}
|
|
383
425
|
|
|
384
426
|
/**
|
|
385
427
|
* Fetch upcoming events for a specific brand.
|
|
386
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
387
428
|
* @param {string} brand - The brand for which to fetch upcoming events.
|
|
388
429
|
* @returns {Promise<Object|null>} - The fetched upcoming events data or null if not found.
|
|
389
430
|
*/
|
|
390
|
-
|
|
431
|
+
async function fetchUpcomingEvents(brand) {
|
|
391
432
|
const liveTypes = {
|
|
392
433
|
'drumeo': ["drum-fest-international-2022", "spotlight", "the-history-of-electronic-drums", "backstage-secrets", "quick-tips", "question-and-answer", "student-collaborations", "live-streams", "live", "podcasts", "solos", "boot-camps", "gear-guides", "performances", "in-rhythm", "challenges", "on-the-road", "diy-drum-experiments", "rhythmic-adventures-of-captain-carson", "study-the-greats", "rhythms-from-another-planet", "tama-drums", "paiste-cymbals", "behind-the-scenes", "exploring-beats", "sonor-drums", "student-focus", "coach-stream", "live", "question-and-answer", "student-review", "boot-camps", "recording", "pack-bundle-lesson"],
|
|
393
434
|
'pianote': ["student-review", "student-reviews", "question-and-answer", "student-focus", "coach-stream", "live", "question-and-answer", "student-review", "boot-camps", "recording", "pack-bundle-lesson"],
|
|
@@ -409,17 +450,16 @@ export async function fetchUpcomingEvents(config, brand) {
|
|
|
409
450
|
web_url_path,
|
|
410
451
|
published_on
|
|
411
452
|
} | order(published_on asc)[0...5]`;
|
|
412
|
-
return fetchSanity(
|
|
453
|
+
return fetchSanity(query, true);
|
|
413
454
|
}
|
|
414
455
|
|
|
415
456
|
/**
|
|
416
457
|
* Fetch content by a specific Railcontent ID.
|
|
417
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
418
458
|
* @param {string} id - The Railcontent ID of the content to fetch.
|
|
419
459
|
* @returns {Promise<Object|null>} - The fetched content data or null if not found.
|
|
420
460
|
*/
|
|
421
|
-
|
|
422
|
-
const query = `*[railcontent_id
|
|
461
|
+
async function fetchByRailContentId(id) {
|
|
462
|
+
const query = `*[railcontent_id == ${id}]{
|
|
423
463
|
railcontent_id,
|
|
424
464
|
title,
|
|
425
465
|
"image": thumbnail.asset->url,
|
|
@@ -430,16 +470,15 @@ export async function fetchByRailContentId(config, id) {
|
|
|
430
470
|
web_url_path,
|
|
431
471
|
published_on
|
|
432
472
|
}`
|
|
433
|
-
return fetchSanity(
|
|
473
|
+
return fetchSanity(query, false);
|
|
434
474
|
}
|
|
435
475
|
|
|
436
476
|
/**
|
|
437
477
|
* Fetch content by an array of Railcontent IDs.
|
|
438
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
439
478
|
* @param {Array<string>} ids - The array of Railcontent IDs of the content to fetch.
|
|
440
479
|
* @returns {Promise<Array<Object>|null>} - The fetched content data or null if not found.
|
|
441
480
|
*/
|
|
442
|
-
|
|
481
|
+
async function fetchByRailContentIds(ids) {
|
|
443
482
|
const idsString = ids.join(',');
|
|
444
483
|
const query = `*[railcontent_id in [${idsString}]]{
|
|
445
484
|
railcontent_id,
|
|
@@ -452,12 +491,11 @@ export async function fetchByRailContentIds(config, ids) {
|
|
|
452
491
|
web_url_path,
|
|
453
492
|
published_on
|
|
454
493
|
}`
|
|
455
|
-
return fetchSanity(
|
|
494
|
+
return fetchSanity(query, true);
|
|
456
495
|
}
|
|
457
496
|
|
|
458
497
|
/**
|
|
459
498
|
* Fetch all content for a specific brand and type with pagination, search, and grouping options.
|
|
460
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
461
499
|
* @param {string} brand - The brand for which to fetch content.
|
|
462
500
|
* @param {string} type - The content type to fetch (e.g., 'song', 'artist').
|
|
463
501
|
* @param {Object} params - Parameters for pagination, filtering, sorting, and grouping.
|
|
@@ -469,7 +507,14 @@ export async function fetchByRailContentIds(config, ids) {
|
|
|
469
507
|
* @param {string} [params.groupBy=""] - The field to group the results by (e.g., 'artist', 'genre').
|
|
470
508
|
* @returns {Promise<Object|null>} - The fetched content data or null if not found.
|
|
471
509
|
*/
|
|
472
|
-
|
|
510
|
+
async function fetchAll(brand, type, {
|
|
511
|
+
page = 1,
|
|
512
|
+
limit = 10,
|
|
513
|
+
searchTerm = "",
|
|
514
|
+
sort = "-published_on",
|
|
515
|
+
includedFields = [],
|
|
516
|
+
groupBy = ""
|
|
517
|
+
}) {
|
|
473
518
|
const start = (page - 1) * limit;
|
|
474
519
|
const end = start + limit;
|
|
475
520
|
|
|
@@ -514,7 +559,8 @@ export async function fetchAll(config, brand, type, { page = 1, limit = 10, sear
|
|
|
514
559
|
|
|
515
560
|
// Determine the group by clause
|
|
516
561
|
let query = "";
|
|
517
|
-
|
|
562
|
+
let manyReference = true; //TODO: define whether reference is one to one or one to many
|
|
563
|
+
if (groupBy !== "" && !manyReference) {
|
|
518
564
|
query = `
|
|
519
565
|
{
|
|
520
566
|
"total": count(*[_type == '${groupBy}' && count(*[_type == '${type}' && brand == '${brand}' && ^._id == ${groupBy}._ref ]._id) > 0]),
|
|
@@ -539,6 +585,31 @@ export async function fetchAll(config, brand, type, { page = 1, limit = 10, sear
|
|
|
539
585
|
|order(${sortOrder})
|
|
540
586
|
[${start}...${end}]
|
|
541
587
|
}`;
|
|
588
|
+
} else if (groupBy !== "" && manyReference) {
|
|
589
|
+
query = `
|
|
590
|
+
{
|
|
591
|
+
"total": count(*[_type == '${groupBy}' && count(*[_type == '${type}' && brand == '${brand}' && ^._id in ${groupBy}[]._ref]._id)>0]),
|
|
592
|
+
"entity": *[_type == '${groupBy}' && count(*[_type == '${type}' && brand == '${brand}' && ^._id in ${groupBy}[]._ref]._id) > 0]
|
|
593
|
+
{
|
|
594
|
+
'id': _id,
|
|
595
|
+
'type': _type,
|
|
596
|
+
name,
|
|
597
|
+
'head_shot_picture_url': thumbnail_url.asset->url,
|
|
598
|
+
'all_lessons_count': count(*[_type == '${type}' && brand == '${brand}' && ^._id in ${groupBy}[]._ref ]._id),
|
|
599
|
+
'lessons': *[_type == '${type}' && brand == '${brand}' && ^._id in ${groupBy}[]._ref ]{
|
|
600
|
+
railcontent_id,
|
|
601
|
+
title,
|
|
602
|
+
"image": thumbnail.asset->url,
|
|
603
|
+
difficulty,
|
|
604
|
+
difficulty_string,
|
|
605
|
+
web_url_path,
|
|
606
|
+
published_on,
|
|
607
|
+
${groupBy}
|
|
608
|
+
}[0...10]
|
|
609
|
+
}
|
|
610
|
+
|order(${sortOrder})
|
|
611
|
+
[${start}...${end}]
|
|
612
|
+
}`;
|
|
542
613
|
} else {
|
|
543
614
|
query = `
|
|
544
615
|
{
|
|
@@ -556,16 +627,73 @@ export async function fetchAll(config, brand, type, { page = 1, limit = 10, sear
|
|
|
556
627
|
`;
|
|
557
628
|
}
|
|
558
629
|
|
|
559
|
-
return fetchSanity(
|
|
630
|
+
return fetchSanity(query, false);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* Fetches all available filter options based on various criteria such as brand, filters, style, artist, content type, and search term.
|
|
635
|
+
*
|
|
636
|
+
* This function constructs a query to retrieve the total number of results and filter options such as difficulty, instrument type, and genre.
|
|
637
|
+
* The filter options are dynamically generated based on the provided filters, style, artist, and content type.
|
|
638
|
+
*
|
|
639
|
+
* @param {string} brand - The brand for which to fetch the filter options.
|
|
640
|
+
* @param {string} filters - Additional filters to apply to the query, typically in the format of Sanity GROQ queries.
|
|
641
|
+
* @param {string} [style] - Optional style or genre to filter the results. If provided, the query will check if the style exists in the genre array.
|
|
642
|
+
* @param {string} [artist] - Optional artist name to filter the results. If provided, the query will check if the artist's name matches.
|
|
643
|
+
* @param {string} contentType - The content type to fetch (e.g., 'song', 'lesson').
|
|
644
|
+
* @param {string} [term] - Optional search term to match against various fields such as title, album, artist name, and genre.
|
|
645
|
+
*
|
|
646
|
+
* @returns {Promise<Object|null>} - A promise that resolves to an object containing the total results and filter options, or null if the query fails.
|
|
647
|
+
*
|
|
648
|
+
* @example
|
|
649
|
+
* // Example usage:
|
|
650
|
+
* fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
651
|
+
* .then(options => console.log(options))
|
|
652
|
+
* .catch(error => console.error(error));
|
|
653
|
+
*/
|
|
654
|
+
async function fetchAllFilterOptions(
|
|
655
|
+
brand,
|
|
656
|
+
filters,
|
|
657
|
+
style,
|
|
658
|
+
artist,
|
|
659
|
+
contentType,
|
|
660
|
+
term
|
|
661
|
+
){
|
|
662
|
+
const query = `
|
|
663
|
+
{
|
|
664
|
+
"meta": {
|
|
665
|
+
"totalResults": count(*[_type == '${contentType}' && brand == "${brand}" && ${style ? `'${style}' in genre[]->name` : `artist->name == '${artist}'`} ${filters}
|
|
666
|
+
${term ? `&& (title match "${term}" || album match "${term}" || artist->name match "${term}" || genre[]->name match "${term}")` : ''}]),
|
|
667
|
+
"filterOptions": {
|
|
668
|
+
"difficulty": [
|
|
669
|
+
{"type": "Introductory", "count": count(*[_type == '${contentType}' && brand == '${brand}' && ${style ? `'${style}' in genre[]->name` : `artist->name == '${artist}'`} && difficulty_string == "Introductory" ${filters}])},
|
|
670
|
+
{"type": "Beginner", "count": count(*[_type == '${contentType}' && brand == '${brand}' && ${style ? `'${style}' in genre[]->name` : `artist->name == '${artist}'`} && difficulty_string == "Beginner" ${filters}])},
|
|
671
|
+
{"type": "Intermediate", "count": count(*[_type == '${contentType}' && brand == '${brand}' && ${style ? `'${style}' in genre[]->name` : `artist->name == '${artist}'`} && difficulty_string == "Intermediate" ${filters}])},
|
|
672
|
+
{"type": "Advanced", "count": count(*[_type == '${contentType}' && brand == '${brand}' && ${style ? `'${style}' in genre[]->name` : `artist->name == '${artist}'`} && difficulty_string == "Advanced" ${filters}])},
|
|
673
|
+
{"type": "Expert", "count": count(*[_type == '${contentType}' && brand == '${brand}' && ${style ? `'${style}' in genre[]->name` : `artist->name == '${artist}'`} && difficulty_string == "Expert" ${filters}])}
|
|
674
|
+
][count > 0],
|
|
675
|
+
"instrumentless": [
|
|
676
|
+
{"type": "Full Song Only", "count": count(*[_type == '${contentType}' && brand == '${brand}' && ${style ? `'${style}' in genre[]->name` : `artist->name == '${artist}'`} && instrumentless == false ${filters}])},
|
|
677
|
+
{"type": "Instrument Removed", "count": count(*[_type == '${contentType}' && brand == '${brand}' && ${style ? `'${style}' in genre[]->name` : `artist->name == '${artist}'`} && instrumentless == true ${filters}])}
|
|
678
|
+
][count > 0],
|
|
679
|
+
"genre": *[_type == 'genre' && '${contentType}' in filter_types] {
|
|
680
|
+
"type": name,
|
|
681
|
+
"count": count(*[_type == '${contentType}' && brand == "${brand}" && ${style ? `'${style}' in genre[]->name` : `artist->name == '${artist}'`} && references(^._id)])
|
|
682
|
+
}[count > 0]
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
`;
|
|
687
|
+
|
|
688
|
+
return fetchSanity(query, false);
|
|
560
689
|
}
|
|
561
690
|
|
|
562
691
|
/**
|
|
563
692
|
* Fetch children content by Railcontent ID.
|
|
564
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
565
693
|
* @param {string} railcontentId - The Railcontent ID of the parent content.
|
|
566
694
|
* @returns {Promise<Array<Object>|null>} - The fetched children content data or null if not found.
|
|
567
695
|
*/
|
|
568
|
-
|
|
696
|
+
async function fetchChildren(railcontentId) {
|
|
569
697
|
//TODO: Implement getByParentId include sum XP
|
|
570
698
|
const query = `*[_railcontent_id == ${railcontentId}]{
|
|
571
699
|
railcontent_id,
|
|
@@ -578,16 +706,15 @@ export async function fetchChildren(config, railcontentId) {
|
|
|
578
706
|
web_url_path,
|
|
579
707
|
published_on
|
|
580
708
|
} | order(published_on asc)`
|
|
581
|
-
return fetchSanity(
|
|
709
|
+
return fetchSanity(query, true);
|
|
582
710
|
}
|
|
583
711
|
|
|
584
712
|
/**
|
|
585
713
|
* Fetch the next lesson for a specific method by Railcontent ID.
|
|
586
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
587
714
|
* @param {string} railcontentId - The Railcontent ID of the current lesson.
|
|
588
715
|
* @returns {Promise<Object|null>} - The fetched next lesson data or null if not found.
|
|
589
716
|
*/
|
|
590
|
-
|
|
717
|
+
async function fetchMethodNextLesson(railcontentId) {
|
|
591
718
|
//TODO: Implement getNextContentForParentContentForUser
|
|
592
719
|
const query = `*[_railcontent_id == ${railcontentId}]{
|
|
593
720
|
railcontent_id,
|
|
@@ -600,27 +727,25 @@ export async function fetchMethodNextLesson(config, railcontentId) {
|
|
|
600
727
|
web_url_path,
|
|
601
728
|
published_on
|
|
602
729
|
}`
|
|
603
|
-
return fetchSanity(
|
|
730
|
+
return fetchSanity(query, false);
|
|
604
731
|
}
|
|
605
732
|
|
|
606
733
|
/**
|
|
607
734
|
* Fetch all children of a specific method by Railcontent ID.
|
|
608
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
609
735
|
* @param {string} railcontentId - The Railcontent ID of the method.
|
|
610
736
|
* @returns {Promise<Array<Object>|null>} - The fetched children data or null if not found.
|
|
611
737
|
*/
|
|
612
|
-
|
|
738
|
+
async function fetchMethodChildren(railcontentId) {
|
|
613
739
|
//TODO: Implement getByParentId include sum XP
|
|
614
740
|
return fetchChildren(railcontentId);
|
|
615
741
|
}
|
|
616
742
|
|
|
617
743
|
/**
|
|
618
744
|
* Fetch the next and previous lessons for a specific lesson by Railcontent ID.
|
|
619
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
620
745
|
* @param {string} railcontentId - The Railcontent ID of the current lesson.
|
|
621
746
|
* @returns {Promise<Object|null>} - The fetched next and previous lesson data or null if found.
|
|
622
747
|
*/
|
|
623
|
-
|
|
748
|
+
async function fetchNextPreviousLesson(railcontentId) {
|
|
624
749
|
//TODO: Implement getTypeNeighbouringSiblings/getNextAndPreviousLessons
|
|
625
750
|
const query = `*[_railcontent_id == ${railcontentId}]{
|
|
626
751
|
railcontent_id,
|
|
@@ -633,45 +758,69 @@ export async function fetchNextPreviousLesson(config, railcontentId) {
|
|
|
633
758
|
web_url_path,
|
|
634
759
|
published_on
|
|
635
760
|
}`
|
|
636
|
-
return fetchSanity(
|
|
761
|
+
return fetchSanity(query, false);
|
|
637
762
|
}
|
|
638
763
|
|
|
639
764
|
/**
|
|
640
|
-
* Fetch
|
|
641
|
-
* @param {
|
|
642
|
-
* @
|
|
643
|
-
|
|
765
|
+
* Fetch the page data for a specific lesson by Railcontent ID.
|
|
766
|
+
* @param {string} railContentId - The Railcontent ID of the current lesson.
|
|
767
|
+
* @returns {Promise<Object|null>} - The fetched page data or null if found.
|
|
768
|
+
*/
|
|
769
|
+
async function fetchLessonContent(railContentId) {
|
|
770
|
+
const query = `*[railcontent_id == ${railContentId} ]
|
|
771
|
+
{title, published_on,"type":_type, "resources": resource, difficulty, difficulty_string, brand, soundslice, instrumentless, railcontent_id, "id":railcontent_id, slug, artist->,"thumbnail_url":thumbnail.asset->url, "url": web_url_path, soundslice_slug,description,
|
|
772
|
+
"chapters": chapter[]{
|
|
773
|
+
chapter_description,
|
|
774
|
+
chapter_timecode,
|
|
775
|
+
"chapter_thumbnail_url": chapter_thumbnail_url.asset->url
|
|
776
|
+
},
|
|
777
|
+
"coaches": instructor[]-> {
|
|
778
|
+
name,
|
|
779
|
+
"id":_id,
|
|
780
|
+
"coach_profile_image":thumbnail_url.asset->url
|
|
781
|
+
},
|
|
782
|
+
"instructors":instructor[]->name,
|
|
783
|
+
instructor[]->,
|
|
784
|
+
"assignments":assignment[]{
|
|
785
|
+
"id": railcontent_id,
|
|
786
|
+
"soundslice_slug": assignment_soundslice,
|
|
787
|
+
"title": assignment_title,
|
|
788
|
+
"sheet_music_image_url": assignment_sheet_music_image,
|
|
789
|
+
"timecode": assignment_timecode,
|
|
790
|
+
"description": assignment_description
|
|
791
|
+
},
|
|
792
|
+
video}`
|
|
793
|
+
return fetchSanity(query, false);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Fetch related lessons for a specific lesson by RailContent ID and type.
|
|
798
|
+
* @param {string} railContentId - The RailContent ID of the current lesson.
|
|
799
|
+
* @param {string} brand - The current brand.
|
|
644
800
|
* @returns {Promise<Array<Object>|null>} - The fetched related lessons data or null if not found.
|
|
645
801
|
*/
|
|
646
|
-
|
|
647
|
-
let sort = 'published_on'
|
|
648
|
-
if (type == 'rhythmic-adventures-of-captain-carson' ||
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
}
|
|
802
|
+
async function fetchRelatedLessons(railContentId, brand) {
|
|
803
|
+
// let sort = 'published_on'
|
|
804
|
+
// if (type == 'rhythmic-adventures-of-captain-carson' ||
|
|
805
|
+
// type == 'diy-drum-experiments' ||
|
|
806
|
+
// type == 'in-rhythm') {
|
|
807
|
+
// sort = 'sort';
|
|
808
|
+
// }
|
|
653
809
|
//TODO: Implement $this->contentService->getFiltered
|
|
654
|
-
const query = `*[
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
difficulty,
|
|
661
|
-
difficulty_string,
|
|
662
|
-
web_url_path,
|
|
663
|
-
published_on
|
|
664
|
-
} | order(published_on asc)[0...5]`
|
|
665
|
-
return fetchSanity(config, query);
|
|
810
|
+
const query = `*[railcontent_id == ${railContentId} && brand == "${brand}" && references(*[_type=='permission']._id)]{
|
|
811
|
+
"related_lessons" : array::unique([
|
|
812
|
+
...(*[_type=="song" && brand == "${brand}" && references(^.artist->_id)]{_id, "id":railcontent_id, published_on, title, "thumbnail_url":thumbnail.asset->url, difficulty_string, railcontent_id, artist->}[0...11]),
|
|
813
|
+
...(*[_type=="song" && brand == "${brand}" && references(^.genre[]->_id)]{_id, "id":railcontent_id, published_on, title, "thumbnail_url":thumbnail.asset->url, difficulty_string, railcontent_id, artist->}[0...11])
|
|
814
|
+
])|order(published_on, railcontent_id)[0...11]}`;
|
|
815
|
+
return fetchSanity(query, false);
|
|
666
816
|
}
|
|
667
817
|
|
|
668
818
|
/**
|
|
669
819
|
* Fetch all content for a specific pack by Railcontent ID.
|
|
670
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
671
820
|
* @param {string} railcontentId - The Railcontent ID of the pack.
|
|
672
821
|
* @returns {Promise<Array<Object>|null>} - The fetched pack content data or null if not found.
|
|
673
822
|
*/
|
|
674
|
-
|
|
823
|
+
async function fetchPackAll(railcontentId) {
|
|
675
824
|
//TODO: Implement getPacks
|
|
676
825
|
const query = `*[_railcontent_id == ${railcontentId}]{
|
|
677
826
|
railcontent_id,
|
|
@@ -684,38 +833,39 @@ export async function fetchPackAll(config, railcontentId) {
|
|
|
684
833
|
web_url_path,
|
|
685
834
|
published_on
|
|
686
835
|
} | order(published_on asc)[0...5]`
|
|
687
|
-
return fetchSanity(
|
|
836
|
+
return fetchSanity(query, true);
|
|
688
837
|
}
|
|
689
838
|
|
|
690
839
|
/**
|
|
691
840
|
* Fetch all children of a specific pack by Railcontent ID.
|
|
692
|
-
* @param {Object} config - Configuration object containing token, projectId, dataset, version, and debug.
|
|
693
841
|
* @param {string} railcontentId - The Railcontent ID of the pack.
|
|
694
842
|
* @returns {Promise<Array<Object>|null>} - The fetched pack children data or null if not found.
|
|
695
843
|
*/
|
|
696
|
-
|
|
844
|
+
async function fetchPackChildren(railcontentId) {
|
|
697
845
|
return fetchChildren(railcontentId, 'pack');
|
|
698
846
|
}
|
|
699
847
|
|
|
700
848
|
/**
|
|
701
849
|
* Fetch data from the Sanity API based on a provided query.
|
|
702
|
-
* @param {Object} config - Configuration object containing the Sanity API settings.
|
|
703
|
-
* @param {string} config.token - The API token for authenticating with Sanity.
|
|
704
|
-
* @param {string} config.projectId - The project ID in Sanity.
|
|
705
|
-
* @param {string} config.dataset - The dataset name in Sanity.
|
|
706
|
-
* @param {string} config.version - The API version to use.
|
|
707
|
-
* @param {boolean} [config.debug=false] - Flag to enable debug mode, which logs the query and results.
|
|
708
850
|
* @param {string} query - The GROQ query to execute against the Sanity API.
|
|
851
|
+
* @param {boolean} isList - Whether to return an array or single result
|
|
709
852
|
* @returns {Promise<Object|null>} - The first result from the query, or null if an error occurs or no results are found.
|
|
710
853
|
*/
|
|
711
|
-
async function fetchSanity(
|
|
712
|
-
|
|
854
|
+
async function fetchSanity(query, isList) {
|
|
855
|
+
// Check the config object before proceeding
|
|
856
|
+
if (!checkConfig(globalConfig)) {
|
|
857
|
+
return null;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
if (globalConfig.debug) {
|
|
713
861
|
console.log("fetchSanity Query:", query);
|
|
714
862
|
}
|
|
863
|
+
|
|
715
864
|
const encodedQuery = encodeURIComponent(query);
|
|
716
|
-
const
|
|
865
|
+
const api = globalConfig.useCachedAPI ? 'apicdn' : 'api'
|
|
866
|
+
const url = `https://${globalConfig.projectId}.${api}.sanity.io/v${globalConfig.version}/data/query/${globalConfig.dataset}?query=${encodedQuery}`;
|
|
717
867
|
const headers = {
|
|
718
|
-
'Authorization': `Bearer ${token}`,
|
|
868
|
+
'Authorization': `Bearer ${globalConfig.token}`,
|
|
719
869
|
'Content-Type': 'application/json'
|
|
720
870
|
};
|
|
721
871
|
|
|
@@ -723,19 +873,21 @@ async function fetchSanity({ token, projectId, dataset, version, debug = false }
|
|
|
723
873
|
const response = await fetch(url, {headers});
|
|
724
874
|
const result = await response.json();
|
|
725
875
|
if (result.result) {
|
|
726
|
-
if (debug) {
|
|
727
|
-
console.log("fetchSanity Results:", result
|
|
876
|
+
if (globalConfig.debug) {
|
|
877
|
+
console.log("fetchSanity Results:", result);
|
|
728
878
|
}
|
|
729
879
|
return isList ? result.result : result.result[0];
|
|
730
880
|
} else {
|
|
731
881
|
throw new Error('No results found');
|
|
732
882
|
}
|
|
733
883
|
} catch (error) {
|
|
734
|
-
console.error('
|
|
884
|
+
console.error('fetchSanity: Fetch error:', error);
|
|
735
885
|
return null;
|
|
736
886
|
}
|
|
737
887
|
}
|
|
738
888
|
|
|
889
|
+
|
|
890
|
+
//Helper Functions
|
|
739
891
|
function arrayJoinWithQuotes(array, delimiter = ',') {
|
|
740
892
|
const wrapped = array.map(value => `'${value}'`);
|
|
741
893
|
return wrapped.join(delimiter)
|
|
@@ -745,6 +897,53 @@ function getSanityDate(date) {
|
|
|
745
897
|
return date.toISOString();
|
|
746
898
|
}
|
|
747
899
|
|
|
900
|
+
function checkConfig(config) {
|
|
901
|
+
if (!config.token) {
|
|
902
|
+
console.warn('fetchSanity: The "token" property is missing in the config object.');
|
|
903
|
+
return false;
|
|
904
|
+
}
|
|
905
|
+
if (!config.projectId) {
|
|
906
|
+
console.warn('fetchSanity: The "projectId" property is missing in the config object.');
|
|
907
|
+
return false;
|
|
908
|
+
}
|
|
909
|
+
if (!config.dataset) {
|
|
910
|
+
console.warn('fetchSanity: The "dataset" property is missing in the config object.');
|
|
911
|
+
return false;
|
|
912
|
+
}
|
|
913
|
+
if (!config.version) {
|
|
914
|
+
console.warn('fetchSanity: The "version" property is missing in the config object.');
|
|
915
|
+
return false;
|
|
916
|
+
}
|
|
917
|
+
return true;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
//Main
|
|
922
|
+
module.exports = {
|
|
923
|
+
initializeSanityService,
|
|
924
|
+
fetchSongById,
|
|
925
|
+
fetchArtists,
|
|
926
|
+
fetchSongArtistCount,
|
|
927
|
+
fetchRelatedSongs,
|
|
928
|
+
fetchAllSongs,
|
|
929
|
+
fetchSongFilterOptions,
|
|
930
|
+
fetchSongCount,
|
|
931
|
+
fetchWorkouts,
|
|
932
|
+
fetchNewReleases,
|
|
933
|
+
fetchUpcomingEvents,
|
|
934
|
+
fetchByRailContentId,
|
|
935
|
+
fetchByRailContentIds,
|
|
936
|
+
fetchAll,
|
|
937
|
+
fetchAllFilterOptions,
|
|
938
|
+
fetchMethodNextLesson,
|
|
939
|
+
fetchMethodChildren,
|
|
940
|
+
fetchNextPreviousLesson,
|
|
941
|
+
fetchRelatedLessons,
|
|
942
|
+
fetchPackAll,
|
|
943
|
+
fetchPackChildren,
|
|
944
|
+
fetchLessonContent
|
|
945
|
+
};
|
|
946
|
+
|
|
748
947
|
</code></pre>
|
|
749
948
|
</article>
|
|
750
949
|
</section>
|
|
@@ -752,15 +951,21 @@ function getSanityDate(date) {
|
|
|
752
951
|
|
|
753
952
|
|
|
754
953
|
|
|
954
|
+
|
|
955
|
+
|
|
755
956
|
</div>
|
|
756
957
|
|
|
757
958
|
<br class="clear">
|
|
758
959
|
|
|
759
960
|
<footer>
|
|
760
|
-
|
|
961
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Aug 12 2024 14:00:38 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
761
962
|
</footer>
|
|
762
963
|
|
|
763
964
|
<script>prettyPrint();</script>
|
|
965
|
+
<script src="scripts/polyfill.js"></script>
|
|
764
966
|
<script src="scripts/linenumber.js"></script>
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
|
|
765
970
|
</body>
|
|
766
971
|
</html>
|