musora-content-services 1.0.14 → 1.0.16

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
+ ### [1.0.16](https://github.com/railroadmedia/musora-content-services/compare/v1.0.15...v1.0.16) (2024-08-13)
6
+
7
+ ### [1.0.15](https://github.com/railroadmedia/musora-content-services/compare/v1.0.14...v1.0.15) (2024-08-13)
8
+
5
9
  ### [1.0.14](https://github.com/railroadmedia/musora-content-services/compare/v1.0.13...v1.0.14) (2024-08-13)
6
10
 
7
11
  ### [1.0.13](https://github.com/railroadmedia/musora-content-services/compare/v1.0.12...v1.0.13) (2024-08-13)
package/docs/global.html CHANGED
@@ -146,7 +146,7 @@
146
146
 
147
147
  <dt class="tag-source">Source:</dt>
148
148
  <dd class="tag-source"><ul class="dummy"><li>
149
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line538">line 538</a>
149
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line542">line 542</a>
150
150
  </li></ul></dd>
151
151
 
152
152
 
@@ -639,7 +639,7 @@ The filter options are dynamically generated based on the provided filters, styl
639
639
 
640
640
  <dt class="tag-source">Source:</dt>
641
641
  <dd class="tag-source"><ul class="dummy"><li>
642
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line682">line 682</a>
642
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line686">line 686</a>
643
643
  </li></ul></dd>
644
644
 
645
645
 
@@ -1612,7 +1612,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
1612
1612
 
1613
1613
  <dt class="tag-source">Source:</dt>
1614
1614
  <dd class="tag-source"><ul class="dummy"><li>
1615
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line471">line 471</a>
1615
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line475">line 475</a>
1616
1616
  </li></ul></dd>
1617
1617
 
1618
1618
 
@@ -1777,7 +1777,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
1777
1777
 
1778
1778
  <dt class="tag-source">Source:</dt>
1779
1779
  <dd class="tag-source"><ul class="dummy"><li>
1780
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line497">line 497</a>
1780
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line501">line 501</a>
1781
1781
  </li></ul></dd>
1782
1782
 
1783
1783
 
@@ -1942,7 +1942,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
1942
1942
 
1943
1943
  <dt class="tag-source">Source:</dt>
1944
1944
  <dd class="tag-source"><ul class="dummy"><li>
1945
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line724">line 724</a>
1945
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line728">line 728</a>
1946
1946
  </li></ul></dd>
1947
1947
 
1948
1948
 
@@ -2100,7 +2100,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
2100
2100
 
2101
2101
  <dt class="tag-source">Source:</dt>
2102
2102
  <dd class="tag-source"><ul class="dummy"><li>
2103
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line802">line 802</a>
2103
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line806">line 806</a>
2104
2104
  </li></ul></dd>
2105
2105
 
2106
2106
 
@@ -2265,7 +2265,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
2265
2265
 
2266
2266
  <dt class="tag-source">Source:</dt>
2267
2267
  <dd class="tag-source"><ul class="dummy"><li>
2268
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line766">line 766</a>
2268
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line770">line 770</a>
2269
2269
  </li></ul></dd>
2270
2270
 
2271
2271
 
@@ -2423,7 +2423,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
2423
2423
 
2424
2424
  <dt class="tag-source">Source:</dt>
2425
2425
  <dd class="tag-source"><ul class="dummy"><li>
2426
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line745">line 745</a>
2426
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line749">line 749</a>
2427
2427
  </li></ul></dd>
2428
2428
 
2429
2429
 
@@ -2739,7 +2739,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
2739
2739
 
2740
2740
  <dt class="tag-source">Source:</dt>
2741
2741
  <dd class="tag-source"><ul class="dummy"><li>
2742
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line776">line 776</a>
2742
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line780">line 780</a>
2743
2743
  </li></ul></dd>
2744
2744
 
2745
2745
 
@@ -2897,7 +2897,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
2897
2897
 
2898
2898
  <dt class="tag-source">Source:</dt>
2899
2899
  <dd class="tag-source"><ul class="dummy"><li>
2900
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line856">line 856</a>
2900
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line860">line 860</a>
2901
2901
  </li></ul></dd>
2902
2902
 
2903
2903
 
@@ -3055,7 +3055,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
3055
3055
 
3056
3056
  <dt class="tag-source">Source:</dt>
3057
3057
  <dd class="tag-source"><ul class="dummy"><li>
3058
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line882">line 882</a>
3058
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line886">line 886</a>
3059
3059
  </li></ul></dd>
3060
3060
 
3061
3061
 
@@ -3220,7 +3220,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
3220
3220
 
3221
3221
  <dt class="tag-source">Source:</dt>
3222
3222
  <dd class="tag-source"><ul class="dummy"><li>
3223
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line835">line 835</a>
3223
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line839">line 839</a>
3224
3224
  </li></ul></dd>
3225
3225
 
3226
3226
 
@@ -3591,7 +3591,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
3591
3591
 
3592
3592
  <dt class="tag-source">Source:</dt>
3593
3593
  <dd class="tag-source"><ul class="dummy"><li>
3594
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line899">line 899</a>
3594
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line903">line 903</a>
3595
3595
  </li></ul></dd>
3596
3596
 
3597
3597
 
@@ -4427,7 +4427,7 @@ fetchSanity(query, true)
4427
4427
 
4428
4428
  <dt class="tag-source">Source:</dt>
4429
4429
  <dd class="tag-source"><ul class="dummy"><li>
4430
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line435">line 435</a>
4430
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line437">line 437</a>
4431
4431
  </li></ul></dd>
4432
4432
 
4433
4433
 
@@ -5160,7 +5160,7 @@ initializeSanityService({
5160
5160
  <br class="clear">
5161
5161
 
5162
5162
  <footer>
5163
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Aug 13 2024 03:05:39 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
5163
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Aug 13 2024 03:55:03 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
5164
5164
  </footer>
5165
5165
 
5166
5166
  <script>prettyPrint();</script>
package/docs/index.html CHANGED
@@ -103,7 +103,7 @@ Run the following to execute the tests</p>
103
103
  <br class="clear">
104
104
 
105
105
  <footer>
106
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Aug 13 2024 03:05:39 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
106
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Aug 13 2024 03:55:03 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
107
107
  </footer>
108
108
 
109
109
  <script>prettyPrint();</script>
@@ -425,7 +425,7 @@ async function fetchSongCount(brand) {
425
425
  */
426
426
  async function fetchWorkouts(brand) {
427
427
  const query = `*[_type == 'workout' &amp;&amp; brand == '${brand}'] [0...5] {
428
- railcontent_id,
428
+ "id": railcontent_id,
429
429
  title,
430
430
  "image": thumbnail.asset->url,
431
431
  "artist_name": instructor[0]->name,
@@ -455,15 +455,17 @@ async function fetchNewReleases(brand) {
455
455
  };
456
456
  const typesString = arrayJoinWithQuotes(newTypes[brand] ?? newTypes['default']);
457
457
  const query = `*[_type in [${typesString}] &amp;&amp; brand == '${brand}'] | order(releaseDate desc) [0...5] {
458
- railcontent_id,
458
+ "id": railcontent_id,
459
459
  title,
460
460
  "image": thumbnail.asset->url,
461
- "artist_name": artist->name,
462
- artist,
461
+ "artist_name": instructor[0]->name,
462
+ "artists": instructor[]->name,
463
463
  difficulty,
464
464
  difficulty_string,
465
+ length_in_seconds,
466
+ published_on,
467
+ "type": _type,
465
468
  web_url_path,
466
- published_on
467
469
  } | order(published_on desc)[0...5]`
468
470
  return fetchSanity(query, true);
469
471
  }
@@ -491,15 +493,17 @@ async function fetchUpcomingEvents(brand) {
491
493
  const now = getSanityDate(new Date());
492
494
  //TODO: status = 'scheduled' is this handled in sanity?
493
495
  const query = `*[_type in [${typesString}] &amp;&amp; brand == '${brand}' &amp;&amp; published_on > '${now}']{
494
- railcontent_id,
496
+ "id": railcontent_id,
495
497
  title,
496
498
  "image": thumbnail.asset->url,
497
- "artist_name": artist->name,
498
- artist,
499
+ "artist_name": instructor[0]->name,
500
+ "artists": instructor[]->name,
499
501
  difficulty,
500
502
  difficulty_string,
503
+ length_in_seconds,
504
+ published_on,
505
+ "type": _type,
501
506
  web_url_path,
502
- published_on
503
507
  } | order(published_on asc)[0...5]`;
504
508
  return fetchSanity(query, true);
505
509
  }
@@ -1049,7 +1053,7 @@ module.exports = {
1049
1053
  <br class="clear">
1050
1054
 
1051
1055
  <footer>
1052
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Aug 13 2024 03:05:39 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1056
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Aug 13 2024 03:55:03 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1053
1057
  </footer>
1054
1058
 
1055
1059
  <script>prettyPrint();</script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -378,7 +378,7 @@ async function fetchSongCount(brand) {
378
378
  */
379
379
  async function fetchWorkouts(brand) {
380
380
  const query = `*[_type == 'workout' && brand == '${brand}'] [0...5] {
381
- railcontent_id,
381
+ "id": railcontent_id,
382
382
  title,
383
383
  "image": thumbnail.asset->url,
384
384
  "artist_name": instructor[0]->name,
@@ -408,15 +408,17 @@ async function fetchNewReleases(brand) {
408
408
  };
409
409
  const typesString = arrayJoinWithQuotes(newTypes[brand] ?? newTypes['default']);
410
410
  const query = `*[_type in [${typesString}] && brand == '${brand}'] | order(releaseDate desc) [0...5] {
411
- railcontent_id,
411
+ "id": railcontent_id,
412
412
  title,
413
413
  "image": thumbnail.asset->url,
414
- "artist_name": artist->name,
415
- artist,
414
+ "artist_name": instructor[0]->name,
415
+ "artists": instructor[]->name,
416
416
  difficulty,
417
417
  difficulty_string,
418
+ length_in_seconds,
419
+ published_on,
420
+ "type": _type,
418
421
  web_url_path,
419
- published_on
420
422
  } | order(published_on desc)[0...5]`
421
423
  return fetchSanity(query, true);
422
424
  }
@@ -444,15 +446,17 @@ async function fetchUpcomingEvents(brand) {
444
446
  const now = getSanityDate(new Date());
445
447
  //TODO: status = 'scheduled' is this handled in sanity?
446
448
  const query = `*[_type in [${typesString}] && brand == '${brand}' && published_on > '${now}']{
447
- railcontent_id,
449
+ "id": railcontent_id,
448
450
  title,
449
451
  "image": thumbnail.asset->url,
450
- "artist_name": artist->name,
451
- artist,
452
+ "artist_name": instructor[0]->name,
453
+ "artists": instructor[]->name,
452
454
  difficulty,
453
455
  difficulty_string,
456
+ length_in_seconds,
457
+ published_on,
458
+ "type": _type,
454
459
  web_url_path,
455
- published_on
456
460
  } | order(published_on asc)[0...5]`;
457
461
  return fetchSanity(query, true);
458
462
  }