musora-content-services 1.0.20 → 1.0.21

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 (71) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/docs/config.js.html +124 -0
  3. package/docs/index.html +2 -2
  4. package/docs/module-Config.html +669 -0
  5. package/docs/module-Railcontent-Services.html +751 -0
  6. package/docs/{global.html → module-Sanity-Services.html} +52 -501
  7. package/docs/railcontent.js.html +178 -0
  8. package/docs/sanity.js.html +994 -0
  9. package/jsdoc.json +1 -1
  10. package/package.json +1 -1
  11. package/publish.sh +0 -0
  12. package/src/index.d.ts +2 -2
  13. package/src/index.js +32 -909
  14. package/src/services/config.js +52 -0
  15. package/src/services/railcontent.js +106 -0
  16. package/src/services/sanity.js +922 -0
  17. package/test/sanityQueryService.test.js +2 -2
  18. package/docs/data/search.json +0 -1
  19. package/docs/fonts/Inconsolata-Regular.ttf +0 -0
  20. package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
  21. package/docs/fonts/OpenSans-Bold-webfont.svg +0 -1830
  22. package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
  23. package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  24. package/docs/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  25. package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  26. package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
  27. package/docs/fonts/OpenSans-Italic-webfont.svg +0 -1830
  28. package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
  29. package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
  30. package/docs/fonts/OpenSans-Light-webfont.svg +0 -1831
  31. package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
  32. package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  33. package/docs/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  34. package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  35. package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
  36. package/docs/fonts/OpenSans-Regular-webfont.svg +0 -1831
  37. package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
  38. package/docs/fonts/OpenSans-Regular.ttf +0 -0
  39. package/docs/fonts/OpenSans-Semibold-webfont.eot +0 -0
  40. package/docs/fonts/OpenSans-Semibold-webfont.svg +0 -1830
  41. package/docs/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  42. package/docs/fonts/OpenSans-Semibold-webfont.woff +0 -0
  43. package/docs/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  44. package/docs/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
  45. package/docs/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  46. package/docs/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  47. package/docs/fonts/WorkSans-Bold.ttf +0 -0
  48. package/docs/index.js.html +0 -1122
  49. package/docs/scripts/core.js +0 -726
  50. package/docs/scripts/core.min.js +0 -23
  51. package/docs/scripts/resize.js +0 -90
  52. package/docs/scripts/search.min.js +0 -6
  53. package/docs/scripts/third-party/Apache-License-2.0.txt +0 -202
  54. package/docs/scripts/third-party/fuse.js +0 -9
  55. package/docs/scripts/third-party/hljs-line-num-original.js +0 -369
  56. package/docs/scripts/third-party/hljs-line-num.js +0 -1
  57. package/docs/scripts/third-party/hljs-original.js +0 -5171
  58. package/docs/scripts/third-party/hljs.js +0 -1
  59. package/docs/scripts/third-party/popper.js +0 -5
  60. package/docs/scripts/third-party/tippy.js +0 -1
  61. package/docs/scripts/third-party/tocbot.js +0 -672
  62. package/docs/scripts/third-party/tocbot.min.js +0 -1
  63. package/docs/styles/clean-jsdoc-theme-base.css +0 -1159
  64. package/docs/styles/clean-jsdoc-theme-dark.css +0 -412
  65. package/docs/styles/clean-jsdoc-theme-light.css +0 -482
  66. package/docs/styles/clean-jsdoc-theme-scrollbar.css +0 -30
  67. package/docs/styles/clean-jsdoc-theme-without-scrollbar.min.css +0 -1
  68. package/docs/styles/clean-jsdoc-theme.min.css +0 -1
  69. package/docs/styles/jsdoc-default.css +0 -692
  70. package/docs/styles/prettify-jsdoc.css +0 -111
  71. package/docs/styles/prettify-tomorrow.css +0 -132
@@ -0,0 +1,751 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>Railcontent-Services - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
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">
19
+ </head>
20
+ <body>
21
+
22
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
23
+ <label for="nav-trigger" class="navicon-button x">
24
+ <div class="navicon"></div>
25
+ </label>
26
+
27
+ <label for="nav-trigger" class="overlay"></label>
28
+
29
+ <nav >
30
+
31
+
32
+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Config.html">Config</a><ul class='methods'><li data-type='method'><a href="module-Config.html#~initializeService">initializeService</a></li></ul></li><li><a href="module-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</a></li></ul></li><li><a href="module-Sanity-Services.html">Sanity-Services</a><ul class='methods'><li data-type='method'><a href="module-Sanity-Services.html#.fetchAll">fetchAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllFilterOptions">fetchAllFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonContent">fetchLessonContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLiveEvent">fetchLiveEvent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNewReleases">fetchNewReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNextPreviousLesson">fetchNextPreviousLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedLessons">fetchRelatedLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedSongs">fetchRelatedSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSanity">fetchSanity</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
33
+
34
+ </nav>
35
+
36
+ <div id="main">
37
+
38
+ <h1 class="page-title">Railcontent-Services</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+
48
+ <header>
49
+
50
+
51
+
52
+ </header>
53
+
54
+ <article>
55
+
56
+ <div class="container-overview">
57
+
58
+
59
+
60
+
61
+
62
+ </div>
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+ <h3 class="subsection-title">Methods</h3>
81
+
82
+
83
+
84
+
85
+
86
+
87
+ <h4 class="name" id=".fetchAllCompletedStates"><span class="type-signature type-signature-static">(static) </span>fetchAllCompletedStates<span class="signature">(userId, contentIds, token)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <dl class="details">
95
+
96
+ <dt class="tag-description">Description:</dt>
97
+ <dd class="tag-description"><ul class="dummy"><li>Fetches the completion status for multiple songs for the current user.</li></ul></dd>
98
+
99
+
100
+
101
+ <dt class="tag-source">Source:</dt>
102
+ <dd class="tag-source"><ul class="dummy"><li>
103
+ <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line51">line 51</a>
104
+ </li></ul></dd>
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ </dl>
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <h5 class="h5-examples">Example</h5>
149
+
150
+ <pre class="prettyprint"><code>fetchAllCompletedStates('user123', ['song456', 'song789'], 'csrf-token')
151
+ .then(statuses => console.log(statuses))
152
+ .catch(error => console.error(error));</code></pre>
153
+
154
+
155
+
156
+
157
+ <h5 class="h5-parameters">Parameters:</h5>
158
+
159
+
160
+ <table class="params">
161
+ <thead>
162
+ <tr>
163
+
164
+ <th>Name</th>
165
+
166
+
167
+ <th>Type</th>
168
+
169
+
170
+
171
+
172
+
173
+ <th class="last">Description</th>
174
+ </tr>
175
+ </thead>
176
+
177
+ <tbody>
178
+
179
+
180
+ <tr>
181
+
182
+ <td class="name"><code>userId</code></td>
183
+
184
+
185
+ <td class="type">
186
+
187
+
188
+ <span class="param-type">string</span>
189
+
190
+
191
+
192
+
193
+ </td>
194
+
195
+
196
+
197
+
198
+
199
+ <td class="description last">The ID of the current user.</td>
200
+ </tr>
201
+
202
+
203
+
204
+ <tr>
205
+
206
+ <td class="name"><code>contentIds</code></td>
207
+
208
+
209
+ <td class="type">
210
+
211
+
212
+ <span class="param-type">Array.&lt;string></span>
213
+
214
+
215
+
216
+
217
+ </td>
218
+
219
+
220
+
221
+
222
+
223
+ <td class="description last">An array of content IDs to check.</td>
224
+ </tr>
225
+
226
+
227
+
228
+ <tr>
229
+
230
+ <td class="name"><code>token</code></td>
231
+
232
+
233
+ <td class="type">
234
+
235
+
236
+ <span class="param-type">string</span>
237
+
238
+
239
+
240
+
241
+ </td>
242
+
243
+
244
+
245
+
246
+
247
+ <td class="description last">The CSRF token for authentication.</td>
248
+ </tr>
249
+
250
+
251
+ </tbody>
252
+ </table>
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+ <h5 class="h5-returns">Returns:</h5>
270
+
271
+
272
+ <div class="param-desc">
273
+ - Returns an object containing completion statuses keyed by content ID, or null if an error occurs.
274
+ </div>
275
+
276
+
277
+
278
+ <dl class="param-type">
279
+ <dt>
280
+ Type
281
+ </dt>
282
+ <dd>
283
+
284
+ <span class="param-type">Promise.&lt;(Object|null)></span>
285
+
286
+
287
+
288
+ </dd>
289
+ </dl>
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+ <h4 class="name" id=".fetchCurrentSongComplete"><span class="type-signature type-signature-static">(static) </span>fetchCurrentSongComplete<span class="signature">(userId, content_id, token)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
301
+
302
+
303
+
304
+
305
+
306
+
307
+ <dl class="details">
308
+
309
+ <dt class="tag-description">Description:</dt>
310
+ <dd class="tag-description"><ul class="dummy"><li>Fetches the completion status of a specific song for the current user.</li></ul></dd>
311
+
312
+
313
+
314
+ <dt class="tag-source">Source:</dt>
315
+ <dd class="tag-source"><ul class="dummy"><li>
316
+ <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line19">line 19</a>
317
+ </li></ul></dd>
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+ </dl>
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+ <h5 class="h5-examples">Example</h5>
362
+
363
+ <pre class="prettyprint"><code>fetchCurrentSongComplete('user123', 'song456', 'csrf-token')
364
+ .then(status => console.log(status))
365
+ .catch(error => console.error(error));</code></pre>
366
+
367
+
368
+
369
+
370
+ <h5 class="h5-parameters">Parameters:</h5>
371
+
372
+
373
+ <table class="params">
374
+ <thead>
375
+ <tr>
376
+
377
+ <th>Name</th>
378
+
379
+
380
+ <th>Type</th>
381
+
382
+
383
+
384
+
385
+
386
+ <th class="last">Description</th>
387
+ </tr>
388
+ </thead>
389
+
390
+ <tbody>
391
+
392
+
393
+ <tr>
394
+
395
+ <td class="name"><code>userId</code></td>
396
+
397
+
398
+ <td class="type">
399
+
400
+
401
+ <span class="param-type">string</span>
402
+
403
+
404
+
405
+
406
+ </td>
407
+
408
+
409
+
410
+
411
+
412
+ <td class="description last">The ID of the current user.</td>
413
+ </tr>
414
+
415
+
416
+
417
+ <tr>
418
+
419
+ <td class="name"><code>content_id</code></td>
420
+
421
+
422
+ <td class="type">
423
+
424
+
425
+ <span class="param-type">string</span>
426
+
427
+
428
+
429
+
430
+ </td>
431
+
432
+
433
+
434
+
435
+
436
+ <td class="description last">The ID of the song content to check.</td>
437
+ </tr>
438
+
439
+
440
+
441
+ <tr>
442
+
443
+ <td class="name"><code>token</code></td>
444
+
445
+
446
+ <td class="type">
447
+
448
+
449
+ <span class="param-type">string</span>
450
+
451
+
452
+
453
+
454
+ </td>
455
+
456
+
457
+
458
+
459
+
460
+ <td class="description last">The CSRF token for authentication.</td>
461
+ </tr>
462
+
463
+
464
+ </tbody>
465
+ </table>
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+ <h5 class="h5-returns">Returns:</h5>
483
+
484
+
485
+ <div class="param-desc">
486
+ - Returns the completion status object if found, otherwise null.
487
+ </div>
488
+
489
+
490
+
491
+ <dl class="param-type">
492
+ <dt>
493
+ Type
494
+ </dt>
495
+ <dd>
496
+
497
+ <span class="param-type">Promise.&lt;(Object|null)></span>
498
+
499
+
500
+
501
+ </dd>
502
+ </dl>
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+ <h4 class="name" id=".fetchSongsInProgress"><span class="type-signature type-signature-static">(static) </span>fetchSongsInProgress<span class="signature">(userId, brand, token)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
514
+
515
+
516
+
517
+
518
+
519
+
520
+ <dl class="details">
521
+
522
+ <dt class="tag-description">Description:</dt>
523
+ <dd class="tag-description"><ul class="dummy"><li>Fetches a list of songs that are currently in progress for the current user.</li></ul></dd>
524
+
525
+
526
+
527
+ <dt class="tag-source">Source:</dt>
528
+ <dd class="tag-source"><ul class="dummy"><li>
529
+ <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line85">line 85</a>
530
+ </li></ul></dd>
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+ </dl>
563
+
564
+
565
+
566
+
567
+
568
+
569
+
570
+
571
+
572
+
573
+
574
+ <h5 class="h5-examples">Example</h5>
575
+
576
+ <pre class="prettyprint"><code>fetchSongsInProgress('user123', 'drumeo', 'csrf-token')
577
+ .then(songs => console.log(songs))
578
+ .catch(error => console.error(error));</code></pre>
579
+
580
+
581
+
582
+
583
+ <h5 class="h5-parameters">Parameters:</h5>
584
+
585
+
586
+ <table class="params">
587
+ <thead>
588
+ <tr>
589
+
590
+ <th>Name</th>
591
+
592
+
593
+ <th>Type</th>
594
+
595
+
596
+
597
+
598
+
599
+ <th class="last">Description</th>
600
+ </tr>
601
+ </thead>
602
+
603
+ <tbody>
604
+
605
+
606
+ <tr>
607
+
608
+ <td class="name"><code>userId</code></td>
609
+
610
+
611
+ <td class="type">
612
+
613
+
614
+ <span class="param-type">string</span>
615
+
616
+
617
+
618
+
619
+ </td>
620
+
621
+
622
+
623
+
624
+
625
+ <td class="description last">The ID of the current user.</td>
626
+ </tr>
627
+
628
+
629
+
630
+ <tr>
631
+
632
+ <td class="name"><code>brand</code></td>
633
+
634
+
635
+ <td class="type">
636
+
637
+
638
+ <span class="param-type">string</span>
639
+
640
+
641
+
642
+
643
+ </td>
644
+
645
+
646
+
647
+
648
+
649
+ <td class="description last">The brand associated with the songs.</td>
650
+ </tr>
651
+
652
+
653
+
654
+ <tr>
655
+
656
+ <td class="name"><code>token</code></td>
657
+
658
+
659
+ <td class="type">
660
+
661
+
662
+ <span class="param-type">string</span>
663
+
664
+
665
+
666
+
667
+ </td>
668
+
669
+
670
+
671
+
672
+
673
+ <td class="description last">The CSRF token for authentication.</td>
674
+ </tr>
675
+
676
+
677
+ </tbody>
678
+ </table>
679
+
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+
695
+ <h5 class="h5-returns">Returns:</h5>
696
+
697
+
698
+ <div class="param-desc">
699
+ - Returns an object containing in-progress songs if found, otherwise null.
700
+ </div>
701
+
702
+
703
+
704
+ <dl class="param-type">
705
+ <dt>
706
+ Type
707
+ </dt>
708
+ <dd>
709
+
710
+ <span class="param-type">Promise.&lt;(Object|null)></span>
711
+
712
+
713
+
714
+ </dd>
715
+ </dl>
716
+
717
+
718
+
719
+
720
+
721
+
722
+
723
+
724
+
725
+
726
+
727
+ </article>
728
+
729
+ </section>
730
+
731
+
732
+
733
+
734
+
735
+
736
+ </div>
737
+
738
+ <br class="clear">
739
+
740
+ <footer>
741
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 02:49:16 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
742
+ </footer>
743
+
744
+ <script>prettyPrint();</script>
745
+ <script src="scripts/polyfill.js"></script>
746
+ <script src="scripts/linenumber.js"></script>
747
+
748
+
749
+
750
+ </body>
751
+ </html>