waha-shared 1.0.308 → 1.0.310

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 (110) hide show
  1. package/dist/data/areas/areas.json +50 -48
  2. package/dist/data/areas/areas.schema.json +2 -2
  3. package/dist/data/areas/areas.zod.d.ts +1 -1
  4. package/dist/data/areas/areas.zod.js +1 -1
  5. package/dist/data/areas/index.d.ts +1 -1
  6. package/dist/data/bibleAudios/bibleAudios.json +597 -314
  7. package/dist/data/bibleAudios/bibleAudios.schema.json +17 -8
  8. package/dist/data/bibleAudios/bibleAudios.zod.d.ts +43 -2
  9. package/dist/data/bibleAudios/bibleAudios.zod.js +16 -7
  10. package/dist/data/bibleAudios/index.d.ts +2 -1
  11. package/dist/data/bibleBooks/bibleBooks.json +792 -790
  12. package/dist/data/bibleStatuses/bibleStatuses.json +8302 -8711
  13. package/dist/data/bibleStatuses/bibleStatuses.schema.json +6 -0
  14. package/dist/data/bibleStatuses/bibleStatuses.zod.d.ts +1 -0
  15. package/dist/data/bibleStatuses/bibleStatuses.zod.js +4 -0
  16. package/dist/data/bibleStatuses/index.d.ts +1 -0
  17. package/dist/data/bibleTexts/bibleTexts.json +285 -187
  18. package/dist/data/bibleTexts/bibleTexts.schema.json +7 -0
  19. package/dist/data/bibleTexts/bibleTexts.zod.d.ts +28 -0
  20. package/dist/data/bibleTexts/bibleTexts.zod.js +10 -3
  21. package/dist/data/bibleTexts/index.d.ts +2 -0
  22. package/dist/data/clones/clones.json +2 -0
  23. package/dist/data/countries/countries.json +480 -480
  24. package/dist/data/countriesAndLanguages/countriesAndLanguages.json +6812 -6810
  25. package/dist/data/crowdinLanguages/crowdinLanguages.json +1440 -1438
  26. package/dist/data/crowdinLanguages/crowdinLanguages.schema.json +3 -3
  27. package/dist/data/crowdinLanguages/crowdinLanguages.zod.d.ts +2 -2
  28. package/dist/data/crowdinLanguages/crowdinLanguages.zod.js +2 -2
  29. package/dist/data/crowdinLanguages/index.d.ts +2 -2
  30. package/dist/data/curriculumFoundations/curriculumFoundations.json +86 -69
  31. package/dist/data/curriculumOnboarding/curriculumOnboarding.json +34 -0
  32. package/dist/data/curriculumOnboarding/curriculumOnboarding.schema.json +38 -0
  33. package/dist/data/curriculumOnboarding/curriculumOnboarding.zod.d.ts +11 -0
  34. package/dist/data/curriculumOnboarding/curriculumOnboarding.zod.js +18 -0
  35. package/dist/data/curriculumOnboarding/index.d.ts +9 -0
  36. package/dist/data/curriculumOnboarding/index.js +7 -0
  37. package/dist/data/curriculumQuestions/curriculumQuestions.json +194 -192
  38. package/dist/data/curriculumTopics/curriculumTopics.json +51 -8
  39. package/dist/data/dblAudioLicenses/dblAudioLicenses.json +450 -421
  40. package/dist/data/dblTextLicenses/dblTextLicenses.json +1251 -1161
  41. package/dist/data/firebase.d.ts +1 -0
  42. package/dist/data/firebase.js +4 -0
  43. package/dist/data/iosVoiceOverLanguages/iosVoiceOverLanguages.json +1 -1
  44. package/dist/data/iso6933LanguageCodes/iso6933LanguageCodes.json +1 -1
  45. package/dist/data/languages/index.d.ts +22 -10
  46. package/dist/data/languages/languages.json +3299 -2012
  47. package/dist/data/languages/languages.schema.json +102 -48
  48. package/dist/data/languages/languages.zod.d.ts +96 -30
  49. package/dist/data/languages/languages.zod.js +66 -37
  50. package/dist/data/lessonPauses/index.d.ts +0 -1
  51. package/dist/data/lessonPauses/lessonPauses.json +2 -3
  52. package/dist/data/lessonPauses/lessonPauses.schema.json +1 -11
  53. package/dist/data/lessonPauses/lessonPauses.zod.d.ts +0 -1
  54. package/dist/data/lessonPauses/lessonPauses.zod.js +0 -3
  55. package/dist/data/mediaDurations/mediaDurations.json +35797 -6076
  56. package/dist/data/mediaDurations/mediaDurations.schema.json +1 -1
  57. package/dist/data/mediaDurations/mediaDurations.zod.js +1 -1
  58. package/dist/data/notification/index.d.ts +1 -1
  59. package/dist/data/notification/notification.json +93 -169
  60. package/dist/data/phoneLanguages/phoneLanguages.json +637 -635
  61. package/dist/data/questions/questions.json +149 -147
  62. package/dist/data/releaseNotes/releaseNotes.json +176 -123
  63. package/dist/data/screenshots/screenshots.json +1 -1
  64. package/dist/data/scripts/scripts.json +6 -1
  65. package/dist/data/sets/index.d.ts +3 -3
  66. package/dist/data/sets/sets.json +1770 -480
  67. package/dist/data/sets/sets.schema.json +1 -1
  68. package/dist/data/sets/sets.zod.d.ts +3 -3
  69. package/dist/data/sets/sets.zod.js +3 -6
  70. package/dist/data/translationsApp/index.d.ts +1 -0
  71. package/dist/data/translationsApp/translationsApp.json +1610 -1569
  72. package/dist/data/translationsApp/translationsApp.schema.json +3 -1
  73. package/dist/data/translationsApp/translationsApp.zod.d.ts +2 -0
  74. package/dist/data/translationsApp/translationsApp.zod.js +1 -0
  75. package/dist/data/translationsFtb/translationsFtb.json +120 -664
  76. package/dist/data/translationsIntroduction/translationsIntroduction.json +1 -1
  77. package/dist/data/translationsQuestion/translationsQuestion.json +65 -33
  78. package/dist/data/translationsSet/translationsSet.json +30139 -19402
  79. package/dist/data/translationsSet/translationsSet.schema.json +3 -4
  80. package/dist/data/translationsSet/translationsSet.zod.js +4 -4
  81. package/dist/data/translationsSolarSpeaker/translationsSolarSpeaker.json +1 -1
  82. package/dist/data/translationsSpokenQuestion/translationsSpokenQuestion.json +65 -33
  83. package/dist/data/youtubePlaylists/youtubePlaylists.json +10 -10
  84. package/dist/data/youtubeVideos/youtubeVideos.json +82 -82
  85. package/dist/functions/bibleBooks.d.ts +16 -0
  86. package/dist/functions/bibleBooks.js +101 -0
  87. package/dist/functions/bibles.d.ts +47 -0
  88. package/dist/functions/bibles.js +315 -0
  89. package/dist/functions/languages.d.ts +6 -7
  90. package/dist/functions/languages.js +58 -53
  91. package/dist/functions/scripturePassages.d.ts +53 -47
  92. package/dist/functions/scripturePassages.js +217 -303
  93. package/dist/functions/sets.d.ts +13 -52
  94. package/dist/functions/sets.js +195 -205
  95. package/dist/functions/utils.d.ts +2 -0
  96. package/dist/functions/utils.js +8 -0
  97. package/dist/types/bibleChapters.d.ts +2 -2
  98. package/dist/types/bibleChapters.js +1 -1
  99. package/dist/types/languages.d.ts +48 -9
  100. package/dist/types/languages.js +2 -0
  101. package/dist/types/scripturePassages.d.ts +0 -1
  102. package/dist/types/scripturePassages.js +0 -1
  103. package/dist/types/sets.d.ts +28 -11
  104. package/package.json +1 -1
  105. package/dist/data/languageAssets/index.d.ts +0 -1
  106. package/dist/data/languageAssets/index.js +0 -7
  107. package/dist/data/languageAssets/languageAssets.json +0 -45406
  108. package/dist/data/languageAssets/languageAssets.schema.json +0 -19
  109. package/dist/data/languageAssets/languageAssets.zod.d.ts +0 -3
  110. package/dist/data/languageAssets/languageAssets.zod.js +0 -7
@@ -1,17 +1,15 @@
1
1
  import { TranslationsApp } from '../data/translationsApp/translationsApp.zod';
2
2
  import type { LanguageInfo, MeetTranslations } from '../types/languages';
3
- import { ScripturePassage } from '../types/scripturePassages';
4
- import { DbsInfo, Lesson, LessonInfo, SetInfo, VideoInfo } from '../types/sets';
5
- export declare const firebaseUrl = "https://firebasestorage.googleapis.com/v0/b/waha-app-db.appspot.com/o/";
6
- export declare function getSetInfo({ setId, meetLanguageId, setIds, t, }: {
3
+ import { DbsInfo, EnrichedSection, Lesson, LessonInfo, SetInfo, VideoInfo } from '../types/sets';
4
+ export declare function getSetInfo({ setId, languageId, setIds, t, }: {
7
5
  setId: string;
8
- meetLanguageId: string;
6
+ languageId: string;
9
7
  t: MeetTranslations & TranslationsApp[string];
10
8
  setIds: string[];
11
9
  }): SetInfo | undefined;
12
- export declare function getLessonInfo({ lessonId, meetLanguageInfo, setInfo, t, useSpokenQuestions, }: {
10
+ export declare function getLessonInfo({ lessonId, languageInfo, setInfo, t, useSpokenQuestions, }: {
13
11
  lessonId: Lesson['lessonId'] | undefined;
14
- meetLanguageInfo: LanguageInfo;
12
+ languageInfo: LanguageInfo;
15
13
  setInfo?: SetInfo;
16
14
  t: MeetTranslations & TranslationsApp[string];
17
15
  useSpokenQuestions?: boolean;
@@ -20,50 +18,13 @@ export declare function convertSToString(time: number): string;
20
18
  /** Determines whether a lesson should be visible in Waha. */
21
19
  export declare function shouldShowLesson(lessonInfo: LessonInfo | undefined, languageInfo: LanguageInfo): boolean;
22
20
  /**
23
- * Calculate start times for each section based on question durations and total
24
- * audio duration. Must be called after audio is loaded to get accurate total
25
- * duration.
26
- */
27
- export declare function calculateSectionTimings({ languageInfo, thisLesson, totalDuration, normalizedScripture, supportsVerseHighlight, }: {
28
- thisLesson: DbsInfo | VideoInfo;
29
- totalDuration: number;
30
- languageInfo: LanguageInfo;
31
- normalizedScripture: Array<ScripturePassage | undefined>;
32
- /**
33
- * Determine if the timings are valid to be used for section timings.
34
- *
35
- * Supports verse highlight example:
36
- *
37
- * - GEN.1.1-GEN.1.10 -> 83
38
- * - GEN.2.1-GEN.2.4 -> 100
39
- * - GEN.2.7-GEN.2.10 -> 120
40
- *
41
- * Doesn't support verse highlight example:
42
- *
43
- * - GEN.1.1-GEN.1.10 -> 83
44
- * - GEN.2.1-GEN.2.4 -> undefined
45
- * - GEN.2.7-GEN.2.10 -> undefined
46
- *
47
- * First passage is always valid because its start time is simply the length
48
- * of the previous audio. Subsequent passages require good verse timing data.
49
- */
50
- supportsVerseHighlight: boolean;
51
- }): Map<string, number>;
52
- /**
53
- * Checks if pre-normalized verse timings for given scripture are valid. Does
54
- * this by comparing the real duration of the full lesson mp3 file with the
55
- * calculated duration based on individual question durations and verse timing
56
- * data from bible chapter documents. For lessons generated programmatically
57
- * with recent systems, they should be nearly identical. For older lessons that
58
- * were made by hand, they may be off. If they're too off, they will be flagged
59
- * as invalid and the lesson will default to not using verse timings.
21
+ * Validates that the computed lesson duration (from section lengths) matches
22
+ * the actual audio file duration. Sections must be enriched (all have `length`)
23
+ * via {@link enrichSections} before calling this.
24
+ *
25
+ * @returns The difference between the computed length and the total duration.
60
26
  */
61
- export declare function getSupportsVerseHighlight({ lessonInfo, scripture, totalDuration, }: {
27
+ export declare function getExpectedLessonDuration({ enrichedSections, lessonInfo, }: {
28
+ enrichedSections: EnrichedSection[];
62
29
  lessonInfo: DbsInfo | VideoInfo;
63
- scripture: Array<ScripturePassage | undefined>;
64
- totalDuration: number | undefined;
65
- }): {
66
- computedLength: number;
67
- diff: number;
68
- passed: boolean;
69
- };
30
+ }): number;