waha-shared 1.0.433 → 1.0.435
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/translationsApp/translationsApp.zod.js +3 -1
- package/dist/data/youtubePlaylists/youtubePlaylists.json +1 -0
- package/dist/data/youtubeVideos/youtubeVideos.json +10 -0
- package/dist/functions/bibles.d.ts +3 -1
- package/dist/functions/bibles.js +3 -1
- package/dist/functions/crowdin.d.ts +3 -1
- package/dist/functions/crowdin.js +3 -1
- package/dist/functions/ffmpeg.d.ts +2 -1
- package/dist/functions/ffmpeg.js +6 -3
- package/dist/functions/languages.js +2 -1
- package/dist/functions/scripturePassages.d.ts +4 -3
- package/dist/functions/scripturePassages.js +4 -3
- package/dist/types/articles.js +1 -17
- package/dist/types/languages.d.ts +3 -1
- package/dist/types/microLessons.d.ts +42 -0
- package/dist/types/microLessons.js +1 -0
- package/dist/types/webContent.d.ts +14 -0
- package/dist/types/webContent.js +18 -1
- package/package.json +1 -1
|
@@ -324,7 +324,9 @@ exports.LanguageTranslationsApp = zod_1.z.object({
|
|
|
324
324
|
none: zod_1.z.string().optional(),
|
|
325
325
|
highlight_verse: zod_1.z.string().optional(),
|
|
326
326
|
no_text_available: zod_1.z.string(),
|
|
327
|
-
// These are trickier strings and will take some time to localize.
|
|
327
|
+
// These are trickier strings and will take some time to localize.
|
|
328
|
+
// onboarding.tsx is set up to default to the old onboarding if strings for
|
|
329
|
+
// the new onboarding are not localized.
|
|
328
330
|
join_others_discovering: zod_1.z.string().optional(),
|
|
329
331
|
people_shared_last_week: zod_1.z.string().optional(),
|
|
330
332
|
onboarding_dbs_intro_heading: zod_1.z.string().optional(),
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"ayl.ara": "PLmYe5bjfx6-mvIl81POPbi5A1QT2BmmRz",
|
|
12
12
|
"cmn.cmn": "PLmYe5bjfx6-mhvF8nrsysq_2VJGdQBarG",
|
|
13
13
|
"eng.eng": "PLmYe5bjfx6-mBdkOHuFGOQwLSSuEWGNDu",
|
|
14
|
+
"esp.esp": "PLOTUvw1_OkDk",
|
|
14
15
|
"fra.fra": "PLmYe5bjfx6-k7iW8fj_OxQ2hQVPLzTmQw",
|
|
15
16
|
"hic.hin": "PLmYe5bjfx6-lB1PZvMDqr5sMlGMd4gc4i",
|
|
16
17
|
"hin.hin": "PLmYe5bjfx6-kfiKDmKGKFTKLcJZwMSGli",
|
|
@@ -83,6 +83,16 @@
|
|
|
83
83
|
"eng.eng.03.009.008.1080.mp4": "MPnjSJ13JwA",
|
|
84
84
|
"eng.eng.03.009.009.1080.mp4": "tPiFeIfr-m8",
|
|
85
85
|
"eng.eng.03.009.010.1080.mp4": "MRTQ0gACv04",
|
|
86
|
+
"esp.03.009.001.mp4": "Y87uCj7h710",
|
|
87
|
+
"esp.03.009.002.mp4": "WVxGU-JJ0jM",
|
|
88
|
+
"esp.03.009.003.mp4": "3FnLcwvAoDw",
|
|
89
|
+
"esp.esp.03.009.004.1080.mp4": "KQ1bhIl14BU",
|
|
90
|
+
"esp.esp.03.009.005.1080.mp4": "uP2LI1nxSSo",
|
|
91
|
+
"esp.esp.03.009.006.1080.mp4": "F_ti1Lw_qBg",
|
|
92
|
+
"esp.esp.03.009.007.1080.mp4": "ic7Rf-hlagA",
|
|
93
|
+
"esp.esp.03.009.008.1080.mp4": "Qt-T1JEsrv0",
|
|
94
|
+
"esp.esp.03.009.009.1080.mp4": "gHKnI3hOUKE",
|
|
95
|
+
"esp.esp.03.009.010.1080.mp4": "YpXFzA9i0VA",
|
|
86
96
|
"fra.03.009.001.mp4": "WUKOlWoOZ_c",
|
|
87
97
|
"fra.03.009.002.mp4": "MndcXkkwNmo",
|
|
88
98
|
"fra.03.009.003.mp4": "oMvtBpAx5es",
|
|
@@ -6,7 +6,9 @@ export declare function replaceBibleWith({ modifiers, lessonCategory, passageId,
|
|
|
6
6
|
lessonCategory: SetCategory | undefined;
|
|
7
7
|
passageId: string;
|
|
8
8
|
}): string | undefined;
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Determines whether a lesson/passage meet the requirements for concatenating.
|
|
11
|
+
*/
|
|
10
12
|
export declare function shouldConcatBibleWith({ modifier, lessonCategory, passageId, }: {
|
|
11
13
|
modifier: BibleModifier;
|
|
12
14
|
lessonCategory: SetCategory;
|
package/dist/functions/bibles.js
CHANGED
|
@@ -71,7 +71,9 @@ function replaceBibleWith({ modifiers, lessonCategory, passageId, }) {
|
|
|
71
71
|
}
|
|
72
72
|
return undefined;
|
|
73
73
|
}
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Determines whether a lesson/passage meet the requirements for concatenating.
|
|
76
|
+
*/
|
|
75
77
|
function shouldConcatBibleWith({ modifier, lessonCategory, passageId, }) {
|
|
76
78
|
if (modifier.action === 'replace')
|
|
77
79
|
return false;
|
|
@@ -23,6 +23,8 @@ interface DownloadTranslationsParams {
|
|
|
23
23
|
/** The Crowdin personal access token to use for authentication. */
|
|
24
24
|
token: string;
|
|
25
25
|
}
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Downloads translations from Crowdin for a given project ID and source path.
|
|
28
|
+
*/
|
|
27
29
|
export declare function downloadTranslations({ projectId, translationsFolder, token, }: DownloadTranslationsParams): void;
|
|
28
30
|
export {};
|
|
@@ -13,7 +13,9 @@ exports.crowdinProjectIds = {
|
|
|
13
13
|
app: '549537',
|
|
14
14
|
dmc: '663528',
|
|
15
15
|
};
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Downloads translations from Crowdin for a given project ID and source path.
|
|
18
|
+
*/
|
|
17
19
|
function downloadTranslations({ projectId, translationsFolder, token, }) {
|
|
18
20
|
(0, node_child_process_1.spawnSync)([
|
|
19
21
|
'npx @crowdin/cli download translations',
|
|
@@ -74,7 +74,8 @@ export declare const VIDEO_AUDIO_ENCODE_ARGS: string[];
|
|
|
74
74
|
* ffmpegOverride: ({ args }) => {
|
|
75
75
|
* const out = args[args.length - 1]
|
|
76
76
|
* const yflag = args[args.length - 2]
|
|
77
|
-
* return [...args.slice(0, -2), ...VIDEO_REMOTION_OVERRIDE_ARGS,
|
|
77
|
+
* return [...args.slice(0, -2), ...VIDEO_REMOTION_OVERRIDE_ARGS,
|
|
78
|
+
* yflag, out]
|
|
78
79
|
* },
|
|
79
80
|
* ...
|
|
80
81
|
* })
|
package/dist/functions/ffmpeg.js
CHANGED
|
@@ -44,7 +44,8 @@ async function concatAudio(files, output) {
|
|
|
44
44
|
// Use the concat demuxer to join multiple input files
|
|
45
45
|
'-f',
|
|
46
46
|
'concat',
|
|
47
|
-
// Allow absolute paths and paths outside the working directory in the list
|
|
47
|
+
// Allow absolute paths and paths outside the working directory in the list
|
|
48
|
+
// file
|
|
48
49
|
'-safe',
|
|
49
50
|
'0',
|
|
50
51
|
// Input: the generated list file containing paths to all audio segments
|
|
@@ -89,7 +90,8 @@ async function generateSilence(duration, output) {
|
|
|
89
90
|
/** Extract an audio segment from a file by start/end times (seconds). */
|
|
90
91
|
async function extractAudioSegment({ endTime, input, output, startTime, }) {
|
|
91
92
|
await exec('ffmpeg', [
|
|
92
|
-
// Seek to this start time (seconds) before reading input — placed before
|
|
93
|
+
// Seek to this start time (seconds) before reading input — placed before
|
|
94
|
+
// -i for fast seeking
|
|
93
95
|
'-ss',
|
|
94
96
|
String(startTime),
|
|
95
97
|
// Duration: read this many seconds of audio (endTime - startTime)
|
|
@@ -242,7 +244,8 @@ exports.VIDEO_AUDIO_ENCODE_ARGS = [
|
|
|
242
244
|
* ffmpegOverride: ({ args }) => {
|
|
243
245
|
* const out = args[args.length - 1]
|
|
244
246
|
* const yflag = args[args.length - 2]
|
|
245
|
-
* return [...args.slice(0, -2), ...VIDEO_REMOTION_OVERRIDE_ARGS,
|
|
247
|
+
* return [...args.slice(0, -2), ...VIDEO_REMOTION_OVERRIDE_ARGS,
|
|
248
|
+
* yflag, out]
|
|
246
249
|
* },
|
|
247
250
|
* ...
|
|
248
251
|
* })
|
|
@@ -144,7 +144,8 @@ function getInitialAppInterfaceLanguage(userPhoneLanguages) {
|
|
|
144
144
|
continue;
|
|
145
145
|
// Step 2: search through alternatives to find the best option.
|
|
146
146
|
for (const alternative of phoneLanguage.alternatives) {
|
|
147
|
-
// If the alternative is a valid waha app interface language, we've
|
|
147
|
+
// If the alternative is a valid waha app interface language, we've
|
|
148
|
+
// found a match.
|
|
148
149
|
if (languages_1.languages.some((wahaLanguage) => wahaLanguage.appInterface !== undefined &&
|
|
149
150
|
isLanguageAvailable(wahaLanguage.status) &&
|
|
150
151
|
wahaLanguage.languageId === alternative.threeLetterId))
|
|
@@ -18,8 +18,8 @@ export declare function getChapterUrl(params: GetChapterUrlParams): string;
|
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* ["GEN.1.1-GEN.1.25"] -> "Genesis 1: 1-25"
|
|
21
|
-
* ["GEN.1.1-GEN.1.25", "GEN.2.4-GEN.2.7", "EXO.3.3-EXO.3.25"] -> "Genesis 1:
|
|
22
|
-
* ["JHN.1.1"] -> "John 1: 1"
|
|
21
|
+
* ["GEN.1.1-GEN.1.25", "GEN.2.4-GEN.2.7", "EXO.3.3-EXO.3.25"] -> "Genesis 1:
|
|
22
|
+
* 1-25, 2: 4-7, Exodus 3: 3-25" ["JHN.1.1"] -> "John 1: 1"
|
|
23
23
|
*/
|
|
24
24
|
export declare function getPassagesString(passages: Array<{
|
|
25
25
|
passageId: string;
|
|
@@ -46,7 +46,8 @@ export type RawChapterFetcher = (params: {
|
|
|
46
46
|
* - If the chapter is not in `availableTextChapters` nor
|
|
47
47
|
* `availableTimingsChapters`, synthesize a one-verse placeholder without
|
|
48
48
|
* calling the underlying fetcher.
|
|
49
|
-
* - If a fetched chapter is timings-only (verses exist but none have text),
|
|
49
|
+
* - If a fetched chapter is timings-only (verses exist but none have text),
|
|
50
|
+
* patch
|
|
50
51
|
* verse 1's text with `noTextAvailableString` so downstream consumers can
|
|
51
52
|
* render something.
|
|
52
53
|
*/
|
|
@@ -55,8 +55,8 @@ function extractVersesFromChapter(chapter, startVerse, endVerse) {
|
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
57
57
|
* ["GEN.1.1-GEN.1.25"] -> "Genesis 1: 1-25"
|
|
58
|
-
* ["GEN.1.1-GEN.1.25", "GEN.2.4-GEN.2.7", "EXO.3.3-EXO.3.25"] -> "Genesis 1:
|
|
59
|
-
* ["JHN.1.1"] -> "John 1: 1"
|
|
58
|
+
* ["GEN.1.1-GEN.1.25", "GEN.2.4-GEN.2.7", "EXO.3.3-EXO.3.25"] -> "Genesis 1:
|
|
59
|
+
* 1-25, 2: 4-7, Exodus 3: 3-25" ["JHN.1.1"] -> "John 1: 1"
|
|
60
60
|
*/
|
|
61
61
|
function getPassagesString(passages) {
|
|
62
62
|
const parts = [];
|
|
@@ -87,7 +87,8 @@ function getPassagesString(passages) {
|
|
|
87
87
|
* - If the chapter is not in `availableTextChapters` nor
|
|
88
88
|
* `availableTimingsChapters`, synthesize a one-verse placeholder without
|
|
89
89
|
* calling the underlying fetcher.
|
|
90
|
-
* - If a fetched chapter is timings-only (verses exist but none have text),
|
|
90
|
+
* - If a fetched chapter is timings-only (verses exist but none have text),
|
|
91
|
+
* patch
|
|
91
92
|
* verse 1's text with `noTextAvailableString` so downstream consumers can
|
|
92
93
|
* render something.
|
|
93
94
|
*/
|
package/dist/types/articles.js
CHANGED
|
@@ -17,23 +17,7 @@ exports.Article = v4_1.default.object({
|
|
|
17
17
|
platform: webContent_1.Platform,
|
|
18
18
|
audio: webContent_1.Audio,
|
|
19
19
|
video: webContent_1.Video,
|
|
20
|
-
impactStoryRegion:
|
|
21
|
-
.enum([
|
|
22
|
-
'North America',
|
|
23
|
-
'Latin America and the Caribbean',
|
|
24
|
-
'Middle East/North Africa',
|
|
25
|
-
'Sub-Saharan Africa',
|
|
26
|
-
'Western Europe',
|
|
27
|
-
'Eastern Europe',
|
|
28
|
-
'Western Asia',
|
|
29
|
-
'Southern Asia',
|
|
30
|
-
'Central Asia',
|
|
31
|
-
'Southeast Asia',
|
|
32
|
-
'Eastern Asia',
|
|
33
|
-
'Oceania',
|
|
34
|
-
])
|
|
35
|
-
.optional()
|
|
36
|
-
.describe('If this article is an impact story that should show up on the dashboard, select the region it is associated with.'),
|
|
20
|
+
impactStoryRegion: webContent_1.ImpactStoryRegion,
|
|
37
21
|
});
|
|
38
22
|
exports.ResponseArticle = v4_1.default.object({
|
|
39
23
|
id: v4_1.default.string(),
|
|
@@ -70,7 +70,9 @@ export interface LanguageInfo extends Omit<Language, 'bible' | 'bibleFallbacks'
|
|
|
70
70
|
setIds: string[];
|
|
71
71
|
/** The question sets available for this language. */
|
|
72
72
|
questionSets: CurriculumQuestions[number]['questionSets'];
|
|
73
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* The pauses that this language uses between different pieces of a lesson.
|
|
75
|
+
*/
|
|
74
76
|
lessonPauses: LessonPauses;
|
|
75
77
|
/**
|
|
76
78
|
* A list of all bible ids used for a language, including bible fallbacks and
|
|
@@ -39,6 +39,20 @@ export declare const MicroLesson: z.ZodObject<{
|
|
|
39
39
|
"Descubriendo a Dios": "Descubriendo a Dios";
|
|
40
40
|
}>;
|
|
41
41
|
campaign: z.ZodOptional<z.ZodString>;
|
|
42
|
+
impactStoryRegion: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
"North America": "North America";
|
|
44
|
+
"Latin America and the Caribbean": "Latin America and the Caribbean";
|
|
45
|
+
"Middle East/North Africa": "Middle East/North Africa";
|
|
46
|
+
"Sub-Saharan Africa": "Sub-Saharan Africa";
|
|
47
|
+
"Western Europe": "Western Europe";
|
|
48
|
+
"Eastern Europe": "Eastern Europe";
|
|
49
|
+
"Western Asia": "Western Asia";
|
|
50
|
+
"Southern Asia": "Southern Asia";
|
|
51
|
+
"Central Asia": "Central Asia";
|
|
52
|
+
"Southeast Asia": "Southeast Asia";
|
|
53
|
+
"Eastern Asia": "Eastern Asia";
|
|
54
|
+
Oceania: "Oceania";
|
|
55
|
+
}>>;
|
|
42
56
|
pages: z.ZodArray<z.ZodObject<{
|
|
43
57
|
heading: z.ZodString;
|
|
44
58
|
body: z.ZodOptional<z.ZodString>;
|
|
@@ -114,6 +128,20 @@ export declare const ResponseMicroLesson: z.ZodObject<{
|
|
|
114
128
|
"Descubriendo a Dios": "Descubriendo a Dios";
|
|
115
129
|
}>;
|
|
116
130
|
campaign: z.ZodOptional<z.ZodString>;
|
|
131
|
+
impactStoryRegion: z.ZodOptional<z.ZodEnum<{
|
|
132
|
+
"North America": "North America";
|
|
133
|
+
"Latin America and the Caribbean": "Latin America and the Caribbean";
|
|
134
|
+
"Middle East/North Africa": "Middle East/North Africa";
|
|
135
|
+
"Sub-Saharan Africa": "Sub-Saharan Africa";
|
|
136
|
+
"Western Europe": "Western Europe";
|
|
137
|
+
"Eastern Europe": "Eastern Europe";
|
|
138
|
+
"Western Asia": "Western Asia";
|
|
139
|
+
"Southern Asia": "Southern Asia";
|
|
140
|
+
"Central Asia": "Central Asia";
|
|
141
|
+
"Southeast Asia": "Southeast Asia";
|
|
142
|
+
"Eastern Asia": "Eastern Asia";
|
|
143
|
+
Oceania: "Oceania";
|
|
144
|
+
}>>;
|
|
117
145
|
pages: z.ZodArray<z.ZodObject<{
|
|
118
146
|
heading: z.ZodString;
|
|
119
147
|
body: z.ZodOptional<z.ZodString>;
|
|
@@ -191,6 +219,20 @@ export declare const MicroLessonsResponse: z.ZodObject<{
|
|
|
191
219
|
"Descubriendo a Dios": "Descubriendo a Dios";
|
|
192
220
|
}>;
|
|
193
221
|
campaign: z.ZodOptional<z.ZodString>;
|
|
222
|
+
impactStoryRegion: z.ZodOptional<z.ZodEnum<{
|
|
223
|
+
"North America": "North America";
|
|
224
|
+
"Latin America and the Caribbean": "Latin America and the Caribbean";
|
|
225
|
+
"Middle East/North Africa": "Middle East/North Africa";
|
|
226
|
+
"Sub-Saharan Africa": "Sub-Saharan Africa";
|
|
227
|
+
"Western Europe": "Western Europe";
|
|
228
|
+
"Eastern Europe": "Eastern Europe";
|
|
229
|
+
"Western Asia": "Western Asia";
|
|
230
|
+
"Southern Asia": "Southern Asia";
|
|
231
|
+
"Central Asia": "Central Asia";
|
|
232
|
+
"Southeast Asia": "Southeast Asia";
|
|
233
|
+
"Eastern Asia": "Eastern Asia";
|
|
234
|
+
Oceania: "Oceania";
|
|
235
|
+
}>>;
|
|
194
236
|
pages: z.ZodArray<z.ZodObject<{
|
|
195
237
|
heading: z.ZodString;
|
|
196
238
|
body: z.ZodOptional<z.ZodString>;
|
|
@@ -34,3 +34,17 @@ export declare const Category: z.ZodEnum<{
|
|
|
34
34
|
"Secretos para hacer disc\u00EDpulos": "Secretos para hacer discípulos";
|
|
35
35
|
"Descubriendo a Dios": "Descubriendo a Dios";
|
|
36
36
|
}>;
|
|
37
|
+
export declare const ImpactStoryRegion: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
"North America": "North America";
|
|
39
|
+
"Latin America and the Caribbean": "Latin America and the Caribbean";
|
|
40
|
+
"Middle East/North Africa": "Middle East/North Africa";
|
|
41
|
+
"Sub-Saharan Africa": "Sub-Saharan Africa";
|
|
42
|
+
"Western Europe": "Western Europe";
|
|
43
|
+
"Eastern Europe": "Eastern Europe";
|
|
44
|
+
"Western Asia": "Western Asia";
|
|
45
|
+
"Southern Asia": "Southern Asia";
|
|
46
|
+
"Central Asia": "Central Asia";
|
|
47
|
+
"Southeast Asia": "Southeast Asia";
|
|
48
|
+
"Eastern Asia": "Eastern Asia";
|
|
49
|
+
Oceania: "Oceania";
|
|
50
|
+
}>>;
|
package/dist/types/webContent.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Category = exports.Video = exports.Audio = exports.Platform = exports.SeekerFriendly = exports.IsDraft = exports.Date = void 0;
|
|
6
|
+
exports.ImpactStoryRegion = exports.Category = exports.Video = exports.Audio = exports.Platform = exports.SeekerFriendly = exports.IsDraft = exports.Date = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
exports.Date = zod_1.default.coerce
|
|
9
9
|
.date()
|
|
@@ -59,3 +59,20 @@ exports.Category = zod_1.default.enum([
|
|
|
59
59
|
'Secretos para hacer discípulos', // Disciple Making Secrets
|
|
60
60
|
'Descubriendo a Dios', // Discovering God
|
|
61
61
|
]);
|
|
62
|
+
exports.ImpactStoryRegion = zod_1.default
|
|
63
|
+
.enum([
|
|
64
|
+
'North America',
|
|
65
|
+
'Latin America and the Caribbean',
|
|
66
|
+
'Middle East/North Africa',
|
|
67
|
+
'Sub-Saharan Africa',
|
|
68
|
+
'Western Europe',
|
|
69
|
+
'Eastern Europe',
|
|
70
|
+
'Western Asia',
|
|
71
|
+
'Southern Asia',
|
|
72
|
+
'Central Asia',
|
|
73
|
+
'Southeast Asia',
|
|
74
|
+
'Eastern Asia',
|
|
75
|
+
'Oceania',
|
|
76
|
+
])
|
|
77
|
+
.optional()
|
|
78
|
+
.describe('If this content should show up on the dashboard, select the region it is associated with.');
|