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,669 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>Config - 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">Config</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="~initializeService"><span class="type-signature type-signature-inner">(inner) </span>initializeService<span class="signature">(config)</span><span class="type-signature"></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>Initializes the service with the given configuration.
98
+ This function must be called before using any other functions in this library.</li></ul></dd>
99
+
100
+
101
+
102
+ <dt class="tag-source">Source:</dt>
103
+ <dd class="tag-source"><ul class="dummy"><li>
104
+ <a href="config.js.html">config.js</a>, <a href="config.js.html#line43">line 43</a>
105
+ </li></ul></dd>
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
+
137
+ </dl>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <h5 class="h5-examples">Example</h5>
150
+
151
+ <pre class="prettyprint"><code>// Initialize the service in your app.js
152
+ initializeService({
153
+ sanityConfig: {
154
+ token: 'your-sanity-api-token',
155
+ projectId: 'your-sanity-project-id',
156
+ dataset: 'your-dataset-name',
157
+ version: '2021-06-07',
158
+ debug: true,
159
+ useCachedAPI: false
160
+ },
161
+ railcontentConfig: {
162
+ token: 'your-user-api-token',
163
+ userId: 'current-user-id'
164
+ }
165
+ });</code></pre>
166
+
167
+
168
+
169
+
170
+ <h5 class="h5-parameters">Parameters:</h5>
171
+
172
+
173
+ <table class="params">
174
+ <thead>
175
+ <tr>
176
+
177
+ <th>Name</th>
178
+
179
+
180
+ <th>Type</th>
181
+
182
+
183
+
184
+
185
+
186
+ <th class="last">Description</th>
187
+ </tr>
188
+ </thead>
189
+
190
+ <tbody>
191
+
192
+
193
+ <tr>
194
+
195
+ <td class="name"><code>config</code></td>
196
+
197
+
198
+ <td class="type">
199
+
200
+
201
+ <span class="param-type">Object</span>
202
+
203
+
204
+
205
+
206
+ </td>
207
+
208
+
209
+
210
+
211
+
212
+ <td class="description last">Configuration object containing API settings.
213
+ <h6>Properties</h6>
214
+
215
+
216
+ <table class="params">
217
+ <thead>
218
+ <tr>
219
+
220
+ <th>Name</th>
221
+
222
+
223
+ <th>Type</th>
224
+
225
+
226
+
227
+
228
+
229
+ <th class="last">Description</th>
230
+ </tr>
231
+ </thead>
232
+
233
+ <tbody>
234
+
235
+
236
+ <tr>
237
+
238
+ <td class="name"><code>sanityConfig</code></td>
239
+
240
+
241
+ <td class="type">
242
+
243
+
244
+ <span class="param-type">Object</span>
245
+
246
+
247
+
248
+
249
+ </td>
250
+
251
+
252
+
253
+
254
+
255
+ <td class="description last">Configuration for Sanity API.
256
+ <h6>Properties</h6>
257
+
258
+
259
+ <table class="params">
260
+ <thead>
261
+ <tr>
262
+
263
+ <th>Name</th>
264
+
265
+
266
+ <th>Type</th>
267
+
268
+
269
+ <th>Attributes</th>
270
+
271
+
272
+
273
+ <th>Default</th>
274
+
275
+
276
+ <th class="last">Description</th>
277
+ </tr>
278
+ </thead>
279
+
280
+ <tbody>
281
+
282
+
283
+ <tr>
284
+
285
+ <td class="name"><code>token</code></td>
286
+
287
+
288
+ <td class="type">
289
+
290
+
291
+ <span class="param-type">string</span>
292
+
293
+
294
+
295
+
296
+ </td>
297
+
298
+
299
+ <td class="attributes">
300
+
301
+
302
+
303
+
304
+
305
+ </td>
306
+
307
+
308
+
309
+ <td class="default">
310
+
311
+ </td>
312
+
313
+
314
+ <td class="description last">The API token for authenticating with Sanity.</td>
315
+ </tr>
316
+
317
+
318
+
319
+ <tr>
320
+
321
+ <td class="name"><code>projectId</code></td>
322
+
323
+
324
+ <td class="type">
325
+
326
+
327
+ <span class="param-type">string</span>
328
+
329
+
330
+
331
+
332
+ </td>
333
+
334
+
335
+ <td class="attributes">
336
+
337
+
338
+
339
+
340
+
341
+ </td>
342
+
343
+
344
+
345
+ <td class="default">
346
+
347
+ </td>
348
+
349
+
350
+ <td class="description last">The project ID in Sanity.</td>
351
+ </tr>
352
+
353
+
354
+
355
+ <tr>
356
+
357
+ <td class="name"><code>dataset</code></td>
358
+
359
+
360
+ <td class="type">
361
+
362
+
363
+ <span class="param-type">string</span>
364
+
365
+
366
+
367
+
368
+ </td>
369
+
370
+
371
+ <td class="attributes">
372
+
373
+
374
+
375
+
376
+
377
+ </td>
378
+
379
+
380
+
381
+ <td class="default">
382
+
383
+ </td>
384
+
385
+
386
+ <td class="description last">The dataset name in Sanity.</td>
387
+ </tr>
388
+
389
+
390
+
391
+ <tr>
392
+
393
+ <td class="name"><code>version</code></td>
394
+
395
+
396
+ <td class="type">
397
+
398
+
399
+ <span class="param-type">string</span>
400
+
401
+
402
+
403
+
404
+ </td>
405
+
406
+
407
+ <td class="attributes">
408
+
409
+
410
+
411
+
412
+
413
+ </td>
414
+
415
+
416
+
417
+ <td class="default">
418
+
419
+ </td>
420
+
421
+
422
+ <td class="description last">The API version to use.</td>
423
+ </tr>
424
+
425
+
426
+
427
+ <tr>
428
+
429
+ <td class="name"><code>debug</code></td>
430
+
431
+
432
+ <td class="type">
433
+
434
+
435
+ <span class="param-type">boolean</span>
436
+
437
+
438
+
439
+
440
+ </td>
441
+
442
+
443
+ <td class="attributes">
444
+
445
+ &lt;optional><br>
446
+
447
+
448
+
449
+
450
+
451
+ </td>
452
+
453
+
454
+
455
+ <td class="default">
456
+
457
+ <code>false</code>
458
+
459
+ </td>
460
+
461
+
462
+ <td class="description last">Optional flag to enable debug mode.</td>
463
+ </tr>
464
+
465
+
466
+
467
+ <tr>
468
+
469
+ <td class="name"><code>useCachedAPI</code></td>
470
+
471
+
472
+ <td class="type">
473
+
474
+
475
+ <span class="param-type">boolean</span>
476
+
477
+
478
+
479
+
480
+ </td>
481
+
482
+
483
+ <td class="attributes">
484
+
485
+ &lt;optional><br>
486
+
487
+
488
+
489
+
490
+
491
+ </td>
492
+
493
+
494
+
495
+ <td class="default">
496
+
497
+ <code>true</code>
498
+
499
+ </td>
500
+
501
+
502
+ <td class="description last">Optional flag to enable or disable the use of the cached API.</td>
503
+ </tr>
504
+
505
+
506
+ </tbody>
507
+ </table>
508
+
509
+ </td>
510
+ </tr>
511
+
512
+
513
+
514
+ <tr>
515
+
516
+ <td class="name"><code>railcontentConfig</code></td>
517
+
518
+
519
+ <td class="type">
520
+
521
+
522
+ <span class="param-type">Object</span>
523
+
524
+
525
+
526
+
527
+ </td>
528
+
529
+
530
+
531
+
532
+
533
+ <td class="description last">Configuration for user services.
534
+ <h6>Properties</h6>
535
+
536
+
537
+ <table class="params">
538
+ <thead>
539
+ <tr>
540
+
541
+ <th>Name</th>
542
+
543
+
544
+ <th>Type</th>
545
+
546
+
547
+
548
+
549
+
550
+ <th class="last">Description</th>
551
+ </tr>
552
+ </thead>
553
+
554
+ <tbody>
555
+
556
+
557
+ <tr>
558
+
559
+ <td class="name"><code>token</code></td>
560
+
561
+
562
+ <td class="type">
563
+
564
+
565
+ <span class="param-type">string</span>
566
+
567
+
568
+
569
+
570
+ </td>
571
+
572
+
573
+
574
+
575
+
576
+ <td class="description last">The token for authenticating user-specific requests.</td>
577
+ </tr>
578
+
579
+
580
+
581
+ <tr>
582
+
583
+ <td class="name"><code>userId</code></td>
584
+
585
+
586
+ <td class="type">
587
+
588
+
589
+ <span class="param-type">string</span>
590
+
591
+
592
+
593
+
594
+ </td>
595
+
596
+
597
+
598
+
599
+
600
+ <td class="description last">The user ID for fetching user-specific data.</td>
601
+ </tr>
602
+
603
+
604
+ </tbody>
605
+ </table>
606
+
607
+ </td>
608
+ </tr>
609
+
610
+
611
+ </tbody>
612
+ </table>
613
+
614
+ </td>
615
+ </tr>
616
+
617
+
618
+ </tbody>
619
+ </table>
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+ </article>
646
+
647
+ </section>
648
+
649
+
650
+
651
+
652
+
653
+
654
+ </div>
655
+
656
+ <br class="clear">
657
+
658
+ <footer>
659
+ 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.
660
+ </footer>
661
+
662
+ <script>prettyPrint();</script>
663
+ <script src="scripts/polyfill.js"></script>
664
+ <script src="scripts/linenumber.js"></script>
665
+
666
+
667
+
668
+ </body>
669
+ </html>