musora-content-services 1.0.118 → 1.0.119

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 (53) hide show
  1. package/.github/workflows/node.js.yml +0 -0
  2. package/CHANGELOG.md +2 -0
  3. package/README.md +0 -0
  4. package/babel.config.js +0 -0
  5. package/docs/config.js.html +2 -1
  6. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  7. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  8. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  9. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  10. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  12. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  13. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  14. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  15. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  16. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  17. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  18. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  24. package/docs/index.html +1 -1
  25. package/docs/module-Config.html +42 -2
  26. package/docs/module-Railcontent-Services.html +1 -1
  27. package/docs/module-Sanity-Services.html +153 -48
  28. package/docs/railcontent.js.html +25 -13
  29. package/docs/sanity.js.html +183 -84
  30. package/docs/scripts/collapse.js +0 -0
  31. package/docs/scripts/commonNav.js +0 -0
  32. package/docs/scripts/linenumber.js +0 -0
  33. package/docs/scripts/nav.js +0 -0
  34. package/docs/scripts/polyfill.js +0 -0
  35. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  36. package/docs/scripts/prettify/lang-css.js +0 -0
  37. package/docs/scripts/prettify/prettify.js +0 -0
  38. package/docs/scripts/search.js +0 -0
  39. package/docs/styles/jsdoc.css +0 -0
  40. package/docs/styles/prettify.css +0 -0
  41. package/jest.config.js +0 -0
  42. package/jsdoc.json +0 -0
  43. package/package.json +1 -1
  44. package/src/contentMetaData.js +0 -0
  45. package/src/filterBuilder.js +0 -0
  46. package/src/index.d.ts +0 -0
  47. package/src/index.js +0 -0
  48. package/src/services/config.js +0 -0
  49. package/src/services/userContext.js +0 -0
  50. package/test/localStorageMock.js +0 -0
  51. package/test/log.js +0 -0
  52. package/test/userContext.test.js +0 -0
  53. package/tools/generate-index.js +0 -0
@@ -100,7 +100,7 @@
100
100
 
101
101
  <dt class="tag-source">Source:</dt>
102
102
  <dd class="tag-source"><ul class="dummy"><li>
103
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line454">line 454</a>
103
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line457">line 457</a>
104
104
  </li></ul></dd>
105
105
 
106
106
 
@@ -714,7 +714,7 @@ The filter options are dynamically generated based on the provided filters, styl
714
714
 
715
715
  <dt class="tag-source">Source:</dt>
716
716
  <dd class="tag-source"><ul class="dummy"><li>
717
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line599">line 599</a>
717
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line595">line 595</a>
718
718
  </li></ul></dd>
719
719
 
720
720
 
@@ -1090,7 +1090,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
1090
1090
 
1091
1091
  <dt class="tag-source">Source:</dt>
1092
1092
  <dd class="tag-source"><ul class="dummy"><li>
1093
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line973">line 973</a>
1093
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line966">line 966</a>
1094
1094
  </li></ul></dd>
1095
1095
 
1096
1096
 
@@ -1344,7 +1344,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
1344
1344
 
1345
1345
  <dt class="tag-source">Source:</dt>
1346
1346
  <dd class="tag-source"><ul class="dummy"><li>
1347
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line180">line 180</a>
1347
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line184">line 184</a>
1348
1348
  </li></ul></dd>
1349
1349
 
1350
1350
 
@@ -1810,7 +1810,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
1810
1810
 
1811
1811
  <dt class="tag-source">Source:</dt>
1812
1812
  <dd class="tag-source"><ul class="dummy"><li>
1813
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1183">line 1183</a>
1813
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1178">line 1178</a>
1814
1814
  </li></ul></dd>
1815
1815
 
1816
1816
 
@@ -2023,7 +2023,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
2023
2023
 
2024
2024
  <dt class="tag-source">Source:</dt>
2025
2025
  <dd class="tag-source"><ul class="dummy"><li>
2026
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line58">line 58</a>
2026
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line62">line 62</a>
2027
2027
  </li></ul></dd>
2028
2028
 
2029
2029
 
@@ -2188,7 +2188,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
2188
2188
 
2189
2189
  <dt class="tag-source">Source:</dt>
2190
2190
  <dd class="tag-source"><ul class="dummy"><li>
2191
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line389">line 389</a>
2191
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line392">line 392</a>
2192
2192
  </li></ul></dd>
2193
2193
 
2194
2194
 
@@ -2377,7 +2377,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
2377
2377
 
2378
2378
  <dt class="tag-source">Source:</dt>
2379
2379
  <dd class="tag-source"><ul class="dummy"><li>
2380
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line414">line 414</a>
2380
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line417">line 417</a>
2381
2381
  </li></ul></dd>
2382
2382
 
2383
2383
 
@@ -2586,7 +2586,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
2586
2586
 
2587
2587
  <dt class="tag-source">Source:</dt>
2588
2588
  <dd class="tag-source"><ul class="dummy"><li>
2589
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1144">line 1144</a>
2589
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1139">line 1139</a>
2590
2590
  </li></ul></dd>
2591
2591
 
2592
2592
 
@@ -2752,7 +2752,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
2752
2752
 
2753
2753
  <dt class="tag-source">Source:</dt>
2754
2754
  <dd class="tag-source"><ul class="dummy"><li>
2755
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1319">line 1319</a>
2755
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1357">line 1357</a>
2756
2756
  </li></ul></dd>
2757
2757
 
2758
2758
 
@@ -2917,7 +2917,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
2917
2917
 
2918
2918
  <dt class="tag-source">Source:</dt>
2919
2919
  <dd class="tag-source"><ul class="dummy"><li>
2920
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1067">line 1067</a>
2920
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1062">line 1062</a>
2921
2921
  </li></ul></dd>
2922
2922
 
2923
2923
 
@@ -3082,7 +3082,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
3082
3082
 
3083
3083
  <dt class="tag-source">Source:</dt>
3084
3084
  <dd class="tag-source"><ul class="dummy"><li>
3085
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line647">line 647</a>
3085
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line642">line 642</a>
3086
3086
  </li></ul></dd>
3087
3087
 
3088
3088
 
@@ -3284,7 +3284,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
3284
3284
 
3285
3285
  <dt class="tag-source">Source:</dt>
3286
3286
  <dd class="tag-source"><ul class="dummy"><li>
3287
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1095">line 1095</a>
3287
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1090">line 1090</a>
3288
3288
  </li></ul></dd>
3289
3289
 
3290
3290
 
@@ -3449,7 +3449,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
3449
3449
 
3450
3450
  <dt class="tag-source">Source:</dt>
3451
3451
  <dd class="tag-source"><ul class="dummy"><li>
3452
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1129">line 1129</a>
3452
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1124">line 1124</a>
3453
3453
  </li></ul></dd>
3454
3454
 
3455
3455
 
@@ -3614,7 +3614,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
3614
3614
 
3615
3615
  <dt class="tag-source">Source:</dt>
3616
3616
  <dd class="tag-source"><ul class="dummy"><li>
3617
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line693">line 693</a>
3617
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line688">line 688</a>
3618
3618
  </li></ul></dd>
3619
3619
 
3620
3620
 
@@ -3772,7 +3772,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
3772
3772
 
3773
3773
  <dt class="tag-source">Source:</dt>
3774
3774
  <dd class="tag-source"><ul class="dummy"><li>
3775
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1224">line 1224</a>
3775
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1219">line 1219</a>
3776
3776
  </li></ul></dd>
3777
3777
 
3778
3778
 
@@ -3985,7 +3985,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
3985
3985
 
3986
3986
  <dt class="tag-source">Source:</dt>
3987
3987
  <dd class="tag-source"><ul class="dummy"><li>
3988
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line866">line 866</a>
3988
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line859">line 859</a>
3989
3989
  </li></ul></dd>
3990
3990
 
3991
3991
 
@@ -4144,13 +4144,13 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
4144
4144
  <dl class="details">
4145
4145
 
4146
4146
  <dt class="tag-description">Description:</dt>
4147
- <dd class="tag-description"><ul class="dummy"><li>Fetch metadata from the contentTypeConfig.js based on brand and type.</li></ul></dd>
4147
+ <dd class="tag-description"><ul class="dummy"><li>Fetch metadata from the contentMetaData.js based on brand and type.</li></ul></dd>
4148
4148
 
4149
4149
 
4150
4150
 
4151
4151
  <dt class="tag-source">Source:</dt>
4152
4152
  <dd class="tag-source"><ul class="dummy"><li>
4153
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1369">line 1369</a>
4153
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1407">line 1407</a>
4154
4154
  </li></ul></dd>
4155
4155
 
4156
4156
 
@@ -4335,7 +4335,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
4335
4335
 
4336
4336
  <dt class="tag-source">Source:</dt>
4337
4337
  <dd class="tag-source"><ul class="dummy"><li>
4338
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line713">line 713</a>
4338
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line708">line 708</a>
4339
4339
  </li></ul></dd>
4340
4340
 
4341
4341
 
@@ -4517,7 +4517,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
4517
4517
 
4518
4518
  <dt class="tag-source">Source:</dt>
4519
4519
  <dd class="tag-source"><ul class="dummy"><li>
4520
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line751">line 751</a>
4520
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line746">line 746</a>
4521
4521
  </li></ul></dd>
4522
4522
 
4523
4523
 
@@ -4675,7 +4675,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
4675
4675
 
4676
4676
  <dt class="tag-source">Source:</dt>
4677
4677
  <dd class="tag-source"><ul class="dummy"><li>
4678
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line805">line 805</a>
4678
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line800">line 800</a>
4679
4679
  </li></ul></dd>
4680
4680
 
4681
4681
 
@@ -4833,7 +4833,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
4833
4833
 
4834
4834
  <dt class="tag-source">Source:</dt>
4835
4835
  <dd class="tag-source"><ul class="dummy"><li>
4836
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line772">line 772</a>
4836
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line767">line 767</a>
4837
4837
  </li></ul></dd>
4838
4838
 
4839
4839
 
@@ -5015,7 +5015,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
5015
5015
 
5016
5016
  <dt class="tag-source">Source:</dt>
5017
5017
  <dd class="tag-source"><ul class="dummy"><li>
5018
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line789">line 789</a>
5018
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line784">line 784</a>
5019
5019
  </li></ul></dd>
5020
5020
 
5021
5021
 
@@ -5204,7 +5204,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
5204
5204
 
5205
5205
  <dt class="tag-source">Source:</dt>
5206
5206
  <dd class="tag-source"><ul class="dummy"><li>
5207
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line681">line 681</a>
5207
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line676">line 676</a>
5208
5208
  </li></ul></dd>
5209
5209
 
5210
5210
 
@@ -5362,7 +5362,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
5362
5362
 
5363
5363
  <dt class="tag-source">Source:</dt>
5364
5364
  <dd class="tag-source"><ul class="dummy"><li>
5365
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line262">line 262</a>
5365
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line265">line 265</a>
5366
5366
  </li></ul></dd>
5367
5367
 
5368
5368
 
@@ -5520,7 +5520,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
5520
5520
 
5521
5521
  <dt class="tag-source">Source:</dt>
5522
5522
  <dd class="tag-source"><ul class="dummy"><li>
5523
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line840">line 840</a>
5523
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line833">line 833</a>
5524
5524
  </li></ul></dd>
5525
5525
 
5526
5526
 
@@ -5678,7 +5678,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
5678
5678
 
5679
5679
  <dt class="tag-source">Source:</dt>
5680
5680
  <dd class="tag-source"><ul class="dummy"><li>
5681
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line993">line 993</a>
5681
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line988">line 988</a>
5682
5682
  </li></ul></dd>
5683
5683
 
5684
5684
 
@@ -5836,7 +5836,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
5836
5836
 
5837
5837
  <dt class="tag-source">Source:</dt>
5838
5838
  <dd class="tag-source"><ul class="dummy"><li>
5839
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1053">line 1053</a>
5839
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1048">line 1048</a>
5840
5840
  </li></ul></dd>
5841
5841
 
5842
5842
 
@@ -5998,7 +5998,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
5998
5998
 
5999
5999
  <dt class="tag-source">Source:</dt>
6000
6000
  <dd class="tag-source"><ul class="dummy"><li>
6001
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line664">line 664</a>
6001
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line659">line 659</a>
6002
6002
  </li></ul></dd>
6003
6003
 
6004
6004
 
@@ -6150,7 +6150,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
6150
6150
 
6151
6151
  <dt class="tag-source">Source:</dt>
6152
6152
  <dd class="tag-source"><ul class="dummy"><li>
6153
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line926">line 926</a>
6153
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line919">line 919</a>
6154
6154
  </li></ul></dd>
6155
6155
 
6156
6156
 
@@ -6332,7 +6332,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
6332
6332
 
6333
6333
  <dt class="tag-source">Source:</dt>
6334
6334
  <dd class="tag-source"><ul class="dummy"><li>
6335
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line948">line 948</a>
6335
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line941">line 941</a>
6336
6336
  </li></ul></dd>
6337
6337
 
6338
6338
 
@@ -6497,7 +6497,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
6497
6497
 
6498
6498
  <dt class="tag-source">Source:</dt>
6499
6499
  <dd class="tag-source"><ul class="dummy"><li>
6500
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line90">line 90</a>
6500
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line94">line 94</a>
6501
6501
  </li></ul></dd>
6502
6502
 
6503
6503
 
@@ -6670,7 +6670,7 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
6670
6670
 
6671
6671
 
6672
6672
 
6673
- <h4 class="name" id=".fetchSanity"><span class="type-signature type-signature-static">(static) </span>fetchSanity<span class="signature">(query, isList)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
6673
+ <h4 class="name" id=".fetchSanity"><span class="type-signature type-signature-static">(static) </span>fetchSanity<span class="signature">(query, isList, customPostProcess<span class="signature-attributes">opt</span>, processNeedAccess<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;(*|null)>}</span></h4>
6674
6674
 
6675
6675
 
6676
6676
 
@@ -6679,14 +6679,11 @@ It's an ongoing discussion (Aug 2024), but it's been included here if necessary<
6679
6679
 
6680
6680
  <dl class="details">
6681
6681
 
6682
- <dt class="tag-description">Description:</dt>
6683
- <dd class="tag-description"><ul class="dummy"><li>Fetch data from the Sanity API based on a provided query.</li></ul></dd>
6684
-
6685
6682
 
6686
6683
 
6687
6684
  <dt class="tag-source">Source:</dt>
6688
6685
  <dd class="tag-source"><ul class="dummy"><li>
6689
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1268">line 1268</a>
6686
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1264">line 1264</a>
6690
6687
  </li></ul></dd>
6691
6688
 
6692
6689
 
@@ -6754,8 +6751,12 @@ fetchSanity(query, true)
6754
6751
  <th>Type</th>
6755
6752
 
6756
6753
 
6754
+ <th>Attributes</th>
6755
+
6757
6756
 
6758
6757
 
6758
+ <th>Default</th>
6759
+
6759
6760
 
6760
6761
  <th class="last">Description</th>
6761
6762
  </tr>
@@ -6780,7 +6781,19 @@ fetchSanity(query, true)
6780
6781
  </td>
6781
6782
 
6782
6783
 
6784
+ <td class="attributes">
6785
+
6786
+
6787
+
6783
6788
 
6789
+
6790
+ </td>
6791
+
6792
+
6793
+
6794
+ <td class="default">
6795
+
6796
+ </td>
6784
6797
 
6785
6798
 
6786
6799
  <td class="description last">The GROQ query to execute against the Sanity API.</td>
@@ -6804,13 +6817,105 @@ fetchSanity(query, true)
6804
6817
  </td>
6805
6818
 
6806
6819
 
6820
+ <td class="attributes">
6821
+
6807
6822
 
6823
+
6824
+
6825
+
6826
+ </td>
6827
+
6828
+
6829
+
6830
+ <td class="default">
6831
+
6832
+ </td>
6808
6833
 
6809
6834
 
6810
6835
  <td class="description last">Whether to return an array or a single result.</td>
6811
6836
  </tr>
6812
6837
 
6813
6838
 
6839
+
6840
+ <tr>
6841
+
6842
+ <td class="name"><code>customPostProcess</code></td>
6843
+
6844
+
6845
+ <td class="type">
6846
+
6847
+
6848
+ <span class="param-type">function</span>
6849
+
6850
+
6851
+
6852
+
6853
+ </td>
6854
+
6855
+
6856
+ <td class="attributes">
6857
+
6858
+ &lt;optional><br>
6859
+
6860
+
6861
+
6862
+
6863
+
6864
+ </td>
6865
+
6866
+
6867
+
6868
+ <td class="default">
6869
+
6870
+ <code>null</code>
6871
+
6872
+ </td>
6873
+
6874
+
6875
+ <td class="description last">custom post process callback</td>
6876
+ </tr>
6877
+
6878
+
6879
+
6880
+ <tr>
6881
+
6882
+ <td class="name"><code>processNeedAccess</code></td>
6883
+
6884
+
6885
+ <td class="type">
6886
+
6887
+
6888
+ <span class="param-type">boolean</span>
6889
+
6890
+
6891
+
6892
+
6893
+ </td>
6894
+
6895
+
6896
+ <td class="attributes">
6897
+
6898
+ &lt;optional><br>
6899
+
6900
+
6901
+
6902
+
6903
+
6904
+ </td>
6905
+
6906
+
6907
+
6908
+ <td class="default">
6909
+
6910
+ <code>true</code>
6911
+
6912
+ </td>
6913
+
6914
+
6915
+ <td class="description last">execute the needs_access callback</td>
6916
+ </tr>
6917
+
6918
+
6814
6919
  </tbody>
6815
6920
  </table>
6816
6921
 
@@ -6844,7 +6949,7 @@ fetchSanity(query, true)
6844
6949
  </dt>
6845
6950
  <dd>
6846
6951
 
6847
- <span class="param-type">Promise.&lt;(Object|null)></span>
6952
+ <span class="param-type">Promise.&lt;(*|null)></span>
6848
6953
 
6849
6954
 
6850
6955
 
@@ -6876,7 +6981,7 @@ fetchSanity(query, true)
6876
6981
 
6877
6982
  <dt class="tag-source">Source:</dt>
6878
6983
  <dd class="tag-source"><ul class="dummy"><li>
6879
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line352">line 352</a>
6984
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line355">line 355</a>
6880
6985
  </li></ul></dd>
6881
6986
 
6882
6987
 
@@ -7044,7 +7149,7 @@ fetchSanity(query, true)
7044
7149
 
7045
7150
  <dt class="tag-source">Source:</dt>
7046
7151
  <dd class="tag-source"><ul class="dummy"><li>
7047
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1344">line 1344</a>
7152
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line1382">line 1382</a>
7048
7153
  </li></ul></dd>
7049
7154
 
7050
7155
 
@@ -7186,7 +7291,7 @@ fetchSanity(query, true)
7186
7291
 
7187
7292
  <dt class="tag-source">Source:</dt>
7188
7293
  <dd class="tag-source"><ul class="dummy"><li>
7189
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line73">line 73</a>
7294
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line77">line 77</a>
7190
7295
  </li></ul></dd>
7191
7296
 
7192
7297
 
@@ -7344,7 +7449,7 @@ fetchSanity(query, true)
7344
7449
 
7345
7450
  <dt class="tag-source">Source:</dt>
7346
7451
  <dd class="tag-source"><ul class="dummy"><li>
7347
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line34">line 34</a>
7452
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line38">line 38</a>
7348
7453
  </li></ul></dd>
7349
7454
 
7350
7455
 
@@ -7509,7 +7614,7 @@ fetchSanity(query, true)
7509
7614
 
7510
7615
  <dt class="tag-source">Source:</dt>
7511
7616
  <dd class="tag-source"><ul class="dummy"><li>
7512
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line231">line 231</a>
7617
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line234">line 234</a>
7513
7618
  </li></ul></dd>
7514
7619
 
7515
7620
 
@@ -7667,7 +7772,7 @@ fetchSanity(query, true)
7667
7772
 
7668
7773
  <dt class="tag-source">Source:</dt>
7669
7774
  <dd class="tag-source"><ul class="dummy"><li>
7670
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line202">line 202</a>
7775
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line206">line 206</a>
7671
7776
  </li></ul></dd>
7672
7777
 
7673
7778
 
@@ -7832,7 +7937,7 @@ fetchSanity(query, true)
7832
7937
 
7833
7938
  <dt class="tag-source">Source:</dt>
7834
7939
  <dd class="tag-source"><ul class="dummy"><li>
7835
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line308">line 308</a>
7940
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line311">line 311</a>
7836
7941
  </li></ul></dd>
7837
7942
 
7838
7943
 
@@ -8002,7 +8107,7 @@ It also includes completion status and progress percentage for each workout by f
8002
8107
 
8003
8108
  <dt class="tag-source">Source:</dt>
8004
8109
  <dd class="tag-source"><ul class="dummy"><li>
8005
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line249">line 249</a>
8110
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line252">line 252</a>
8006
8111
  </li></ul></dd>
8007
8112
 
8008
8113
 
@@ -8166,7 +8271,7 @@ It also includes completion status and progress percentage for each workout by f
8166
8271
  <br class="clear">
8167
8272
 
8168
8273
  <footer>
8169
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Sep 24 2024 20:13:55 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
8274
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Sep 27 2024 21:58:51 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
8170
8275
  </footer>
8171
8276
 
8172
8277
  <script>prettyPrint();</script>
@@ -301,15 +301,6 @@ export async function fetchContentPageUserData(contentId) {
301
301
  }
302
302
  }
303
303
 
304
- function fetchAbsolute(url, params) {
305
- if(globalConfig.railcontentConfig.baseUrl) {
306
- if (url.startsWith('/')) {
307
- return fetch(globalConfig.railcontentConfig.baseUrl + url, params)
308
- }
309
- }
310
- return fetch(url, params);
311
- }
312
-
313
304
  export async function fetchUserContext() {
314
305
  let url = `/content/user_data_all`;
315
306
  const headers = {
@@ -317,7 +308,7 @@ export async function fetchUserContext() {
317
308
  'X-CSRF-TOKEN': globalConfig.railcontentConfig.token
318
309
  };
319
310
  try {
320
- const response = await fetch(url, {headers});
311
+ const response = await fetchAbsolute(url, {headers});
321
312
  const result = await response.json();
322
313
  if (result) {
323
314
  console.log('fetchUserContext', result);
@@ -331,13 +322,25 @@ export async function fetchUserContext() {
331
322
  }
332
323
  }
333
324
 
325
+ export async function fetchUserPermissions() {
326
+ //TODO: Should be investigate why throw 500 errors on MA
327
+ return [];
328
+ let url = `/content/user_data_permissions`;
329
+ const headers = {
330
+ 'Content-Type': 'application/json',
331
+ 'X-CSRF-TOKEN': globalConfig.railcontentConfig.token
332
+ };
333
+ // in the case of an unauthorized user, we return empty permissions
334
+ return fetchHandler(url, 'get') ?? [];
335
+ }
336
+
334
337
  export async function fetchHandler(url, method = "get") {
335
338
  const headers = {
336
339
  'Content-Type': 'application/json',
337
340
  'X-CSRF-TOKEN': globalConfig.railcontentConfig.token
338
341
  };
339
342
  try {
340
- const response = await fetch(url, {method, headers});
343
+ const response = await fetchAbsolute(url, {method, headers});
341
344
  const result = await response.json();
342
345
  if (result) {
343
346
  return result;
@@ -346,8 +349,8 @@ export async function fetchHandler(url, method = "get") {
346
349
  }
347
350
  } catch (error) {
348
351
  console.error('Fetch error:', error);
349
- return null;
350
352
  }
353
+ return null;
351
354
  }
352
355
 
353
356
  export async function fetchLikeContent(contentId) {
@@ -358,6 +361,15 @@ export async function fetchLikeContent(contentId) {
358
361
  export async function fetchUnlikeContent(contentId) {
359
362
  let url = `/content/${contentId}/unlike`;
360
363
  return await fetchHandler(url, "post");
364
+ }
365
+
366
+ function fetchAbsolute(url, params) {
367
+ if(globalConfig.railcontentConfig.baseUrl) {
368
+ if (url.startsWith('/')) {
369
+ return fetch(globalConfig.railcontentConfig.baseUrl + url, params)
370
+ }
371
+ }
372
+ return fetch(url, params);
361
373
  }</code></pre>
362
374
  </article>
363
375
  </section>
@@ -372,7 +384,7 @@ export async function fetchUnlikeContent(contentId) {
372
384
  <br class="clear">
373
385
 
374
386
  <footer>
375
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Sep 24 2024 20:13:55 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
387
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Sep 27 2024 21:58:51 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
376
388
  </footer>
377
389
 
378
390
  <script>prettyPrint();</script>