waha-shared 1.0.308 → 1.0.309
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/dist/data/areas/areas.json +50 -48
- package/dist/data/areas/areas.schema.json +2 -2
- package/dist/data/areas/areas.zod.d.ts +1 -1
- package/dist/data/areas/areas.zod.js +1 -1
- package/dist/data/areas/index.d.ts +1 -1
- package/dist/data/bibleAudios/bibleAudios.json +581 -314
- package/dist/data/bibleAudios/bibleAudios.schema.json +17 -8
- package/dist/data/bibleAudios/bibleAudios.zod.d.ts +43 -2
- package/dist/data/bibleAudios/bibleAudios.zod.js +16 -7
- package/dist/data/bibleAudios/index.d.ts +2 -1
- package/dist/data/bibleBooks/bibleBooks.json +792 -790
- package/dist/data/bibleStatuses/bibleStatuses.json +8023 -8801
- package/dist/data/bibleStatuses/bibleStatuses.schema.json +6 -0
- package/dist/data/bibleStatuses/bibleStatuses.zod.d.ts +1 -0
- package/dist/data/bibleStatuses/bibleStatuses.zod.js +4 -0
- package/dist/data/bibleStatuses/index.d.ts +1 -0
- package/dist/data/bibleTexts/bibleTexts.json +274 -187
- package/dist/data/bibleTexts/bibleTexts.schema.json +7 -0
- package/dist/data/bibleTexts/bibleTexts.zod.d.ts +28 -0
- package/dist/data/bibleTexts/bibleTexts.zod.js +10 -3
- package/dist/data/bibleTexts/index.d.ts +2 -0
- package/dist/data/clones/clones.json +2 -0
- package/dist/data/countries/countries.json +480 -480
- package/dist/data/countriesAndLanguages/countriesAndLanguages.json +6812 -6810
- package/dist/data/crowdinLanguages/crowdinLanguages.json +1440 -1438
- package/dist/data/crowdinLanguages/crowdinLanguages.schema.json +3 -3
- package/dist/data/crowdinLanguages/crowdinLanguages.zod.d.ts +2 -2
- package/dist/data/crowdinLanguages/crowdinLanguages.zod.js +2 -2
- package/dist/data/crowdinLanguages/index.d.ts +2 -2
- package/dist/data/curriculumFoundations/curriculumFoundations.json +86 -69
- package/dist/data/curriculumOnboarding/curriculumOnboarding.json +34 -0
- package/dist/data/curriculumOnboarding/curriculumOnboarding.schema.json +38 -0
- package/dist/data/curriculumOnboarding/curriculumOnboarding.zod.d.ts +11 -0
- package/dist/data/curriculumOnboarding/curriculumOnboarding.zod.js +18 -0
- package/dist/data/curriculumOnboarding/index.d.ts +9 -0
- package/dist/data/curriculumOnboarding/index.js +7 -0
- package/dist/data/curriculumQuestions/curriculumQuestions.json +194 -192
- package/dist/data/curriculumTopics/curriculumTopics.json +51 -8
- package/dist/data/dblAudioLicenses/dblAudioLicenses.json +450 -421
- package/dist/data/dblTextLicenses/dblTextLicenses.json +1251 -1161
- package/dist/data/firebase.d.ts +1 -0
- package/dist/data/firebase.js +4 -0
- package/dist/data/iosVoiceOverLanguages/iosVoiceOverLanguages.json +1 -1
- package/dist/data/iso6933LanguageCodes/iso6933LanguageCodes.json +1 -1
- package/dist/data/languages/index.d.ts +22 -10
- package/dist/data/languages/languages.json +3295 -2010
- package/dist/data/languages/languages.schema.json +102 -48
- package/dist/data/languages/languages.zod.d.ts +96 -30
- package/dist/data/languages/languages.zod.js +66 -37
- package/dist/data/lessonPauses/index.d.ts +0 -1
- package/dist/data/lessonPauses/lessonPauses.json +2 -3
- package/dist/data/lessonPauses/lessonPauses.schema.json +1 -11
- package/dist/data/lessonPauses/lessonPauses.zod.d.ts +0 -1
- package/dist/data/lessonPauses/lessonPauses.zod.js +0 -3
- package/dist/data/mediaDurations/mediaDurations.json +35288 -6076
- package/dist/data/mediaDurations/mediaDurations.schema.json +1 -1
- package/dist/data/mediaDurations/mediaDurations.zod.js +1 -1
- package/dist/data/notification/index.d.ts +1 -1
- package/dist/data/notification/notification.json +93 -169
- package/dist/data/phoneLanguages/phoneLanguages.json +637 -635
- package/dist/data/questions/questions.json +149 -147
- package/dist/data/releaseNotes/releaseNotes.json +169 -123
- package/dist/data/screenshots/screenshots.json +1 -1
- package/dist/data/scripts/scripts.json +6 -1
- package/dist/data/sets/index.d.ts +3 -3
- package/dist/data/sets/sets.json +1770 -480
- package/dist/data/sets/sets.schema.json +1 -1
- package/dist/data/sets/sets.zod.d.ts +3 -3
- package/dist/data/sets/sets.zod.js +3 -6
- package/dist/data/translationsApp/index.d.ts +1 -0
- package/dist/data/translationsApp/translationsApp.json +1610 -1569
- package/dist/data/translationsApp/translationsApp.schema.json +3 -1
- package/dist/data/translationsApp/translationsApp.zod.d.ts +2 -0
- package/dist/data/translationsApp/translationsApp.zod.js +1 -0
- package/dist/data/translationsFtb/translationsFtb.json +120 -664
- package/dist/data/translationsIntroduction/translationsIntroduction.json +1 -1
- package/dist/data/translationsQuestion/translationsQuestion.json +65 -33
- package/dist/data/translationsSet/translationsSet.json +30181 -19444
- package/dist/data/translationsSet/translationsSet.schema.json +3 -4
- package/dist/data/translationsSet/translationsSet.zod.js +4 -4
- package/dist/data/translationsSolarSpeaker/translationsSolarSpeaker.json +1 -1
- package/dist/data/translationsSpokenQuestion/translationsSpokenQuestion.json +65 -33
- package/dist/data/youtubePlaylists/youtubePlaylists.json +10 -10
- package/dist/data/youtubeVideos/youtubeVideos.json +82 -82
- package/dist/functions/bibleBooks.d.ts +16 -0
- package/dist/functions/bibleBooks.js +101 -0
- package/dist/functions/bibles.d.ts +47 -0
- package/dist/functions/bibles.js +314 -0
- package/dist/functions/languages.d.ts +6 -7
- package/dist/functions/languages.js +58 -53
- package/dist/functions/scripturePassages.d.ts +53 -47
- package/dist/functions/scripturePassages.js +217 -303
- package/dist/functions/sets.d.ts +13 -52
- package/dist/functions/sets.js +195 -205
- package/dist/functions/utils.d.ts +2 -0
- package/dist/functions/utils.js +8 -0
- package/dist/types/bibleChapters.d.ts +2 -2
- package/dist/types/bibleChapters.js +1 -1
- package/dist/types/languages.d.ts +48 -9
- package/dist/types/languages.js +2 -0
- package/dist/types/scripturePassages.d.ts +0 -1
- package/dist/types/scripturePassages.js +0 -1
- package/dist/types/sets.d.ts +28 -11
- package/package.json +1 -1
- package/dist/data/languageAssets/index.d.ts +0 -1
- package/dist/data/languageAssets/index.js +0 -7
- package/dist/data/languageAssets/languageAssets.json +0 -45406
- package/dist/data/languageAssets/languageAssets.schema.json +0 -19
- package/dist/data/languageAssets/languageAssets.zod.d.ts +0 -3
- package/dist/data/languageAssets/languageAssets.zod.js +0 -7
package/dist/functions/sets.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { TranslationsApp } from '../data/translationsApp/translationsApp.zod';
|
|
2
2
|
import type { LanguageInfo, MeetTranslations } from '../types/languages';
|
|
3
|
-
import {
|
|
4
|
-
|
|
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
|
-
|
|
6
|
+
languageId: string;
|
|
9
7
|
t: MeetTranslations & TranslationsApp[string];
|
|
10
8
|
setIds: string[];
|
|
11
9
|
}): SetInfo | undefined;
|
|
12
|
-
export declare function getLessonInfo({ lessonId,
|
|
10
|
+
export declare function getLessonInfo({ lessonId, languageInfo, setInfo, t, useSpokenQuestions, }: {
|
|
13
11
|
lessonId: Lesson['lessonId'] | undefined;
|
|
14
|
-
|
|
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
|
-
*
|
|
24
|
-
* audio duration.
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
27
|
+
export declare function getExpectedLessonDuration({ enrichedSections, lessonInfo, }: {
|
|
28
|
+
enrichedSections: EnrichedSection[];
|
|
62
29
|
lessonInfo: DbsInfo | VideoInfo;
|
|
63
|
-
|
|
64
|
-
totalDuration: number | undefined;
|
|
65
|
-
}): {
|
|
66
|
-
computedLength: number;
|
|
67
|
-
diff: number;
|
|
68
|
-
passed: boolean;
|
|
69
|
-
};
|
|
30
|
+
}): number;
|