waha-shared 1.0.397 → 1.0.398
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/languages/languages.json +3 -3
- package/dist/data/languages/languages.schema.json +25 -7
- package/dist/data/languages/languages.zod.d.ts +2 -0
- package/dist/data/languages/languages.zod.js +15 -36
- package/dist/data/translationsApp/translationsApp.json +80 -0
- package/dist/functions/bibles.js +8 -4
- package/dist/functions/ffmpeg.js +15 -8
- package/dist/functions/languages.d.ts +3 -3
- package/dist/functions/scripturePassages.js +5 -3
- package/dist/functions/sets.d.ts +2 -1
- package/dist/types/analytics.d.ts +6 -5
- package/dist/types/articles.d.ts +7 -7
- package/dist/types/articles.js +14 -14
- package/dist/types/feedback.d.ts +2 -2
- package/dist/types/feedback.js +2 -2
- package/dist/types/location.d.ts +2 -2
- package/dist/types/location.js +2 -2
- package/dist/types/microLessons.d.ts +12 -12
- package/dist/types/microLessons.js +21 -20
- package/dist/types/notifications.d.ts +4 -4
- package/dist/types/notifications.js +3 -3
- package/dist/types/scripturePassages.d.ts +2 -2
- package/dist/types/scripturePassages.js +2 -2
- package/dist/types/sets.d.ts +2 -2
- package/dist/types/stoplight.d.ts +2 -2
- package/dist/types/stoplight.js +2 -2
- package/dist/types/users.d.ts +23 -22
- package/dist/types/users.js +29 -29
- package/dist/types/webContent.d.ts +7 -7
- package/dist/types/webContent.js +8 -8
- package/package.json +1 -1
package/dist/functions/bibles.js
CHANGED
|
@@ -198,8 +198,10 @@ function expandOptimizedChapters(optimizedChapters) {
|
|
|
198
198
|
// Check if we need OT/NT expansion
|
|
199
199
|
const hasOT = includedSet.has('OT');
|
|
200
200
|
const hasNT = includedSet.has('NT');
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
/**
|
|
202
|
+
* If we have both OT and NT, return all chapters but exclude optional
|
|
203
|
+
* chapters unless they are explicitly listed in the optimized list
|
|
204
|
+
*/
|
|
203
205
|
if (hasOT && hasNT) {
|
|
204
206
|
return bibleChaptersList_1.bibleChaptersList.filter((c) => !exports.OPTIONAL_CHAPTERS.has(c) || includedSet.has(c));
|
|
205
207
|
}
|
|
@@ -217,8 +219,10 @@ function expandOptimizedChapters(optimizedChapters) {
|
|
|
217
219
|
includedBooks.add(entry);
|
|
218
220
|
}
|
|
219
221
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
+
/**
|
|
223
|
+
* Filter bibleChaptersList to only include relevant chapters This maintains
|
|
224
|
+
* canonical order without needing to sort
|
|
225
|
+
*/
|
|
222
226
|
const result = [];
|
|
223
227
|
for (const chapter of bibleChaptersList_1.bibleChaptersList) {
|
|
224
228
|
// Check if this specific chapter is included
|
package/dist/functions/ffmpeg.js
CHANGED
|
@@ -50,10 +50,13 @@ async function concatAudio(files, output) {
|
|
|
50
50
|
// Input: the generated list file containing paths to all audio segments
|
|
51
51
|
'-i',
|
|
52
52
|
listFile,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
/**
|
|
54
|
+
* FFmpeg 8.0 introduced stricter AVFrame buffer alignment requirements for
|
|
55
|
+
* libmp3lame. The concat demuxer produces frames that don't meet this new
|
|
56
|
+
* padding requirement, causing "inadequate AVFrame plane padding" errors.
|
|
57
|
+
* aresample forces frames to be reallocated with proper alignment as a
|
|
58
|
+
* workaround.
|
|
59
|
+
*/
|
|
57
60
|
'-af',
|
|
58
61
|
'aresample=resampler=swr',
|
|
59
62
|
...CODEC,
|
|
@@ -95,8 +98,10 @@ async function extractAudioSegment({ endTime, input, output, startTime, }) {
|
|
|
95
98
|
// Input audio file to extract from
|
|
96
99
|
'-i',
|
|
97
100
|
input,
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
/**
|
|
102
|
+
* FFmpeg 8.0 workaround: force frame reallocation to satisfy libmp3lame's
|
|
103
|
+
* stricter AVFrame buffer alignment requirements (see concatAudio).
|
|
104
|
+
*/
|
|
100
105
|
'-af',
|
|
101
106
|
'aresample=resampler=swr',
|
|
102
107
|
...CODEC,
|
|
@@ -269,8 +274,10 @@ async function mixAudioWithMusic({ music, narration, output, targetDuration, })
|
|
|
269
274
|
const filterComplex = [
|
|
270
275
|
`[0:a]volume=1.0[a1]`,
|
|
271
276
|
`[1:a]atrim=0:${minDuration},volume=0.1[a2]`,
|
|
272
|
-
|
|
273
|
-
|
|
277
|
+
/**
|
|
278
|
+
* Duration=first keeps narration length; normalize=0 preserves its volume.
|
|
279
|
+
* apad pads the mix with silence to the exact target duration.
|
|
280
|
+
*/
|
|
274
281
|
`[a1][a2]amix=inputs=2:duration=first:dropout_transition=0:normalize=0,apad=whole_dur=${targetDuration}`,
|
|
275
282
|
].join(';');
|
|
276
283
|
await exec('ffmpeg', [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Language } from '../data/languages/languages.zod';
|
|
1
|
+
import type { Language, LanguageId } from '../data/languages/languages.zod';
|
|
2
2
|
import type { TranslationsApp } from '../data/translationsApp/translationsApp.zod';
|
|
3
3
|
import type { LanguageInfo, MeetTranslations } from '../types/languages';
|
|
4
|
-
export declare function getLanguageInfo(languageId:
|
|
4
|
+
export declare function getLanguageInfo(languageId: LanguageId, options?: {
|
|
5
5
|
includeInProgressDmcSets?: boolean;
|
|
6
6
|
}): LanguageInfo;
|
|
7
7
|
export declare function getInitialAppInterfaceLanguage(userPhoneLanguages: Array<string | null>): Language['languageId'];
|
|
@@ -11,5 +11,5 @@ export declare function numerals(text: string, scriptName: string): string;
|
|
|
11
11
|
* These values are not the name of the font necessarily, but the identifier of
|
|
12
12
|
* the font which can be found by inspecting the font in an app like Font Book.
|
|
13
13
|
*/
|
|
14
|
-
export declare function getAppTranslations(appLanguageId:
|
|
14
|
+
export declare function getAppTranslations(appLanguageId: LanguageId): TranslationsApp[string];
|
|
15
15
|
export declare function getMeetTranslations(meetLanguageInfo: LanguageInfo): MeetTranslations;
|
|
@@ -268,9 +268,11 @@ function enrichSections(lessonInfo, scripture) {
|
|
|
268
268
|
currentTime += length ?? 0;
|
|
269
269
|
return { ...section, length: length ?? 0, startTime, ignoreTimings };
|
|
270
270
|
});
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
/**
|
|
272
|
+
* Backward pass: compute application section start times from the end of the
|
|
273
|
+
* lesson file, so they are always correct even if story durations are
|
|
274
|
+
* slightly off.
|
|
275
|
+
*/
|
|
274
276
|
const path = lessonInfo.type === 'dbs' ? lessonInfo.fullPath : lessonInfo.videoPath;
|
|
275
277
|
const totalDuration = (0, utils_1.getCachedDuration)(path);
|
|
276
278
|
if (totalDuration) {
|
package/dist/functions/sets.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type LanguageId } from '../data/languages/languages.zod';
|
|
1
2
|
import { TranslationsApp } from '../data/translationsApp/translationsApp.zod';
|
|
2
3
|
import type { AppTranslations, LanguageInfo, MeetTranslations } from '../types/languages';
|
|
3
4
|
import { DbsInfo, EnrichedSection, Lesson, LessonInfo, SetInfo, VideoInfo, type Section } from '../types/sets';
|
|
4
5
|
export declare function getSetInfo({ setId, languageId, setIds, t, }: {
|
|
5
6
|
setId: string;
|
|
6
|
-
languageId:
|
|
7
|
+
languageId: LanguageId;
|
|
7
8
|
t: MeetTranslations & TranslationsApp[string];
|
|
8
9
|
setIds: string[];
|
|
9
10
|
}): SetInfo | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
+
import type { LanguageId } from '../data/languages/languages.zod';
|
|
2
3
|
import { StoplightOption } from './stoplight';
|
|
3
4
|
import type { ArticleSession, BibleSession, WahaShareContent } from './users';
|
|
4
5
|
export interface BaseEventParams {
|
|
5
|
-
meetLanguageId:
|
|
6
|
-
appInterfaceLanguageId:
|
|
6
|
+
meetLanguageId: LanguageId;
|
|
7
|
+
appInterfaceLanguageId: LanguageId;
|
|
7
8
|
favorites: string;
|
|
8
9
|
pathname: string;
|
|
9
10
|
bible: string;
|
|
@@ -69,7 +70,7 @@ type Misc = {
|
|
|
69
70
|
} | {
|
|
70
71
|
name: 'ClearStorage';
|
|
71
72
|
payload: {
|
|
72
|
-
languageToClear:
|
|
73
|
+
languageToClear: LanguageId;
|
|
73
74
|
};
|
|
74
75
|
} | {
|
|
75
76
|
name: 'RequestCode';
|
|
@@ -110,14 +111,14 @@ type Misc = {
|
|
|
110
111
|
payload: {
|
|
111
112
|
ipCountry: string;
|
|
112
113
|
phoneCountry: string;
|
|
113
|
-
languages:
|
|
114
|
+
languages: LanguageId[];
|
|
114
115
|
};
|
|
115
116
|
} | {
|
|
116
117
|
name: 'ChangeInitialLanguages';
|
|
117
118
|
payload: {
|
|
118
119
|
ipCountry: string;
|
|
119
120
|
phoneCountry: string;
|
|
120
|
-
languages:
|
|
121
|
+
languages: LanguageId[];
|
|
121
122
|
};
|
|
122
123
|
} | {
|
|
123
124
|
name: 'AskForReview';
|
package/dist/types/articles.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const Article: z.ZodObject<{
|
|
3
3
|
title: z.ZodString;
|
|
4
4
|
author: z.ZodOptional<z.ZodString>;
|
|
5
5
|
category: z.ZodEnum<{
|
|
@@ -53,8 +53,8 @@ export declare const ArticleSchema: z.ZodObject<{
|
|
|
53
53
|
Oceania: "Oceania";
|
|
54
54
|
}>>;
|
|
55
55
|
}, z.core.$strip>;
|
|
56
|
-
export type Article = z.infer<typeof
|
|
57
|
-
export declare const
|
|
56
|
+
export type Article = z.infer<typeof Article>;
|
|
57
|
+
export declare const ResponseArticle: z.ZodObject<{
|
|
58
58
|
id: z.ZodString;
|
|
59
59
|
data: z.ZodObject<{
|
|
60
60
|
title: z.ZodString;
|
|
@@ -112,8 +112,8 @@ export declare const ResponseArticleSchema: z.ZodObject<{
|
|
|
112
112
|
}, z.core.$strip>;
|
|
113
113
|
body: z.ZodString;
|
|
114
114
|
}, z.core.$strip>;
|
|
115
|
-
export type ResponseArticle = z.infer<typeof
|
|
116
|
-
export declare const
|
|
115
|
+
export type ResponseArticle = z.infer<typeof ResponseArticle>;
|
|
116
|
+
export declare const ArticlesResponse: z.ZodObject<{
|
|
117
117
|
data: z.ZodArray<z.ZodObject<{
|
|
118
118
|
id: z.ZodString;
|
|
119
119
|
data: z.ZodObject<{
|
|
@@ -173,7 +173,7 @@ export declare const ArticlesResponseSchema: z.ZodObject<{
|
|
|
173
173
|
body: z.ZodString;
|
|
174
174
|
}, z.core.$strip>>;
|
|
175
175
|
}, z.core.$strip>;
|
|
176
|
-
export declare const
|
|
176
|
+
export declare const ArticleLanguagesResponse: z.ZodObject<{
|
|
177
177
|
data: z.ZodArray<z.ZodString>;
|
|
178
178
|
}, z.core.$strip>;
|
|
179
|
-
export type ArticleCategory = z.infer<typeof
|
|
179
|
+
export type ArticleCategory = z.infer<typeof Article>['category'];
|
package/dist/types/articles.js
CHANGED
|
@@ -3,20 +3,20 @@ 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.
|
|
6
|
+
exports.ArticleLanguagesResponse = exports.ArticlesResponse = exports.ResponseArticle = exports.Article = void 0;
|
|
7
7
|
const v4_1 = __importDefault(require("zod/v4"));
|
|
8
8
|
const webContent_1 = require("./webContent");
|
|
9
|
-
exports.
|
|
9
|
+
exports.Article = v4_1.default.object({
|
|
10
10
|
title: v4_1.default.string(),
|
|
11
11
|
author: v4_1.default.string().optional(),
|
|
12
|
-
category: webContent_1.
|
|
12
|
+
category: webContent_1.Category,
|
|
13
13
|
image: v4_1.default.string().optional(),
|
|
14
|
-
date: webContent_1.
|
|
15
|
-
isDraft: webContent_1.
|
|
16
|
-
seekerFriendly: webContent_1.
|
|
17
|
-
platform: webContent_1.
|
|
18
|
-
audio: webContent_1.
|
|
19
|
-
video: webContent_1.
|
|
14
|
+
date: webContent_1.Date,
|
|
15
|
+
isDraft: webContent_1.IsDraft,
|
|
16
|
+
seekerFriendly: webContent_1.SeekerFriendly,
|
|
17
|
+
platform: webContent_1.Platform,
|
|
18
|
+
audio: webContent_1.Audio,
|
|
19
|
+
video: webContent_1.Video,
|
|
20
20
|
impactStoryRegion: v4_1.default
|
|
21
21
|
.enum([
|
|
22
22
|
'North America',
|
|
@@ -35,14 +35,14 @@ exports.ArticleSchema = v4_1.default.object({
|
|
|
35
35
|
.optional()
|
|
36
36
|
.describe('If this article is an impact story that should show up on the dashboard, select the region it is associated with.'),
|
|
37
37
|
});
|
|
38
|
-
exports.
|
|
38
|
+
exports.ResponseArticle = v4_1.default.object({
|
|
39
39
|
id: v4_1.default.string(),
|
|
40
|
-
data: exports.
|
|
40
|
+
data: exports.Article,
|
|
41
41
|
body: v4_1.default.string(),
|
|
42
42
|
});
|
|
43
|
-
exports.
|
|
44
|
-
data: v4_1.default.array(exports.
|
|
43
|
+
exports.ArticlesResponse = v4_1.default.object({
|
|
44
|
+
data: v4_1.default.array(exports.ResponseArticle),
|
|
45
45
|
});
|
|
46
|
-
exports.
|
|
46
|
+
exports.ArticleLanguagesResponse = v4_1.default.object({
|
|
47
47
|
data: v4_1.default.array(v4_1.default.string()),
|
|
48
48
|
});
|
package/dist/types/feedback.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const Feedback: z.ZodObject<{
|
|
3
3
|
language: z.ZodString;
|
|
4
4
|
appVersion: z.ZodString;
|
|
5
5
|
OS: z.ZodString;
|
|
@@ -19,4 +19,4 @@ export declare const FeedbackSchema: z.ZodObject<{
|
|
|
19
19
|
godDone: z.ZodOptional<z.ZodString>;
|
|
20
20
|
findOut: z.ZodOptional<z.ZodString>;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
|
-
export type Feedback = z.infer<typeof
|
|
22
|
+
export type Feedback = z.infer<typeof Feedback>;
|
package/dist/types/feedback.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Feedback = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
exports.
|
|
5
|
+
exports.Feedback = zod_1.z.object({
|
|
6
6
|
language: zod_1.z.string(),
|
|
7
7
|
appVersion: zod_1.z.string(),
|
|
8
8
|
OS: zod_1.z.string(),
|
package/dist/types/location.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const WahaUserLocation: z.ZodObject<{
|
|
3
3
|
city: z.ZodOptional<z.ZodString>;
|
|
4
4
|
country: z.ZodOptional<z.ZodString>;
|
|
5
5
|
region: z.ZodOptional<z.ZodString>;
|
|
6
6
|
}, z.core.$strip>;
|
|
7
|
-
export type WahaUserLocation = z.infer<typeof
|
|
7
|
+
export type WahaUserLocation = z.infer<typeof WahaUserLocation>;
|
package/dist/types/location.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.WahaUserLocation = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
exports.
|
|
5
|
+
exports.WahaUserLocation = zod_1.z.object({
|
|
6
6
|
city: zod_1.z.string().optional(),
|
|
7
7
|
country: zod_1.z.string().optional(),
|
|
8
8
|
region: zod_1.z.string().optional(),
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import z from 'zod/v4';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const MicroLessonRadioButton: z.ZodObject<{
|
|
3
3
|
heading: z.ZodOptional<z.ZodString>;
|
|
4
4
|
body: z.ZodOptional<z.ZodString>;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
|
-
export type MicroLessonRadioButton = z.infer<typeof
|
|
7
|
-
export declare const
|
|
6
|
+
export type MicroLessonRadioButton = z.infer<typeof MicroLessonRadioButton>;
|
|
7
|
+
export declare const MicroLessonCtaButton: z.ZodObject<{
|
|
8
8
|
show: z.ZodBoolean;
|
|
9
9
|
label: z.ZodString;
|
|
10
10
|
href: z.ZodString;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
|
-
export type MicroLessonCtaButton = z.infer<typeof
|
|
13
|
-
export declare const
|
|
12
|
+
export type MicroLessonCtaButton = z.infer<typeof MicroLessonCtaButton>;
|
|
13
|
+
export declare const MicroLesson: z.ZodObject<{
|
|
14
14
|
title: z.ZodString;
|
|
15
15
|
subtitle: z.ZodOptional<z.ZodString>;
|
|
16
16
|
date: z.ZodCoercedDate<unknown>;
|
|
@@ -82,8 +82,8 @@ export declare const MicroLessonSchema: z.ZodObject<{
|
|
|
82
82
|
}, z.core.$strip>>;
|
|
83
83
|
}, z.core.$strip>>;
|
|
84
84
|
}, z.core.$strip>;
|
|
85
|
-
export type MicroLesson = z.infer<typeof
|
|
86
|
-
export declare const
|
|
85
|
+
export type MicroLesson = z.infer<typeof MicroLesson>;
|
|
86
|
+
export declare const ResponseMicroLesson: z.ZodObject<{
|
|
87
87
|
id: z.ZodString;
|
|
88
88
|
data: z.ZodObject<{
|
|
89
89
|
title: z.ZodString;
|
|
@@ -158,7 +158,7 @@ export declare const ResponseMicroLessonSchema: z.ZodObject<{
|
|
|
158
158
|
}, z.core.$strip>>;
|
|
159
159
|
}, z.core.$strip>;
|
|
160
160
|
}, z.core.$strip>;
|
|
161
|
-
export type ResponseMicroLesson = z.infer<typeof
|
|
161
|
+
export type ResponseMicroLesson = z.infer<typeof ResponseMicroLesson>;
|
|
162
162
|
export declare const MicroLessonsResponse: z.ZodObject<{
|
|
163
163
|
data: z.ZodArray<z.ZodObject<{
|
|
164
164
|
id: z.ZodString;
|
|
@@ -236,7 +236,7 @@ export declare const MicroLessonsResponse: z.ZodObject<{
|
|
|
236
236
|
}, z.core.$strip>;
|
|
237
237
|
}, z.core.$strip>>;
|
|
238
238
|
}, z.core.$strip>;
|
|
239
|
-
export declare const
|
|
239
|
+
export declare const MicroLessonSubmission: z.ZodObject<{
|
|
240
240
|
city: z.ZodOptional<z.ZodString>;
|
|
241
241
|
country: z.ZodOptional<z.ZodString>;
|
|
242
242
|
region: z.ZodOptional<z.ZodString>;
|
|
@@ -253,8 +253,8 @@ export declare const MicroLessonSubmissionSchema: z.ZodObject<{
|
|
|
253
253
|
android: "android";
|
|
254
254
|
}>;
|
|
255
255
|
}, z.core.$strip>;
|
|
256
|
-
export type MicroLessonSubmission = z.infer<typeof
|
|
257
|
-
export declare const
|
|
256
|
+
export type MicroLessonSubmission = z.infer<typeof MicroLessonSubmission>;
|
|
257
|
+
export declare const MicroLessonLanguagesResponse: z.ZodObject<{
|
|
258
258
|
data: z.ZodArray<z.ZodString>;
|
|
259
259
|
}, z.core.$strip>;
|
|
260
|
-
export type MicroLessonCategory = z.infer<typeof
|
|
260
|
+
export type MicroLessonCategory = z.infer<typeof MicroLesson>['category'];
|
|
@@ -3,34 +3,35 @@ 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.
|
|
6
|
+
exports.MicroLessonLanguagesResponse = exports.MicroLessonSubmission = exports.MicroLessonsResponse = exports.ResponseMicroLesson = exports.MicroLesson = exports.MicroLessonCtaButton = exports.MicroLessonRadioButton = void 0;
|
|
7
7
|
const v4_1 = __importDefault(require("zod/v4"));
|
|
8
|
+
const languages_zod_1 = require("../data/languages/languages.zod");
|
|
8
9
|
const location_1 = require("./location");
|
|
9
10
|
const webContent_1 = require("./webContent");
|
|
10
|
-
exports.
|
|
11
|
+
exports.MicroLessonRadioButton = v4_1.default
|
|
11
12
|
.object({
|
|
12
13
|
heading: v4_1.default.string().optional(),
|
|
13
14
|
body: v4_1.default.string().optional(),
|
|
14
15
|
})
|
|
15
16
|
.describe('A single radio button option for a micro lesson page. Heading will show in bold and body will show in regular, gray text.');
|
|
16
|
-
exports.
|
|
17
|
+
exports.MicroLessonCtaButton = v4_1.default
|
|
17
18
|
.object({
|
|
18
19
|
show: v4_1.default.boolean(),
|
|
19
20
|
label: v4_1.default.string(),
|
|
20
21
|
href: v4_1.default.string(),
|
|
21
22
|
})
|
|
22
23
|
.describe('A call-to-action button that will appear at the bottom of a micro lesson page.');
|
|
23
|
-
exports.
|
|
24
|
+
exports.MicroLesson = v4_1.default.object({
|
|
24
25
|
title: v4_1.default.string(),
|
|
25
26
|
subtitle: v4_1.default.string().optional(),
|
|
26
|
-
date: webContent_1.
|
|
27
|
-
isDraft: webContent_1.
|
|
28
|
-
seekerFriendly: webContent_1.
|
|
29
|
-
platform: webContent_1.
|
|
27
|
+
date: webContent_1.Date,
|
|
28
|
+
isDraft: webContent_1.IsDraft,
|
|
29
|
+
seekerFriendly: webContent_1.SeekerFriendly,
|
|
30
|
+
platform: webContent_1.Platform,
|
|
30
31
|
image: v4_1.default
|
|
31
32
|
.string()
|
|
32
33
|
.describe("Cover image for the micro lesson. Will display on the micro lesson's card."),
|
|
33
|
-
category: webContent_1.
|
|
34
|
+
category: webContent_1.Category,
|
|
34
35
|
campaign: v4_1.default
|
|
35
36
|
.string()
|
|
36
37
|
.optional()
|
|
@@ -53,8 +54,8 @@ exports.MicroLessonSchema = v4_1.default.object({
|
|
|
53
54
|
.string()
|
|
54
55
|
.optional()
|
|
55
56
|
.describe('The image to display on the page. This will appear full width and below the heading.'),
|
|
56
|
-
audio: webContent_1.
|
|
57
|
-
video: webContent_1.
|
|
57
|
+
audio: webContent_1.Audio,
|
|
58
|
+
video: webContent_1.Video,
|
|
58
59
|
textInput: v4_1.default
|
|
59
60
|
.object({
|
|
60
61
|
show: v4_1.default
|
|
@@ -75,9 +76,9 @@ exports.MicroLessonSchema = v4_1.default.object({
|
|
|
75
76
|
})
|
|
76
77
|
.describe('Options for the text input field of the page.')
|
|
77
78
|
.optional(),
|
|
78
|
-
ctaButton: exports.
|
|
79
|
-
radioButtons: v4_1.default.array(exports.
|
|
80
|
-
platform: webContent_1.
|
|
79
|
+
ctaButton: exports.MicroLessonCtaButton.optional(),
|
|
80
|
+
radioButtons: v4_1.default.array(exports.MicroLessonRadioButton).optional(),
|
|
81
|
+
platform: webContent_1.Platform.optional(),
|
|
81
82
|
notification: v4_1.default
|
|
82
83
|
.object({
|
|
83
84
|
title: v4_1.default.string(),
|
|
@@ -92,23 +93,23 @@ exports.MicroLessonSchema = v4_1.default.object({
|
|
|
92
93
|
.describe('A single page of the micro lesson.'))
|
|
93
94
|
.describe('The pages that make up the micro lesson. The last page is the completion page and will always have a button redirecting the user back.'),
|
|
94
95
|
});
|
|
95
|
-
exports.
|
|
96
|
+
exports.ResponseMicroLesson = v4_1.default.object({
|
|
96
97
|
id: v4_1.default.string(),
|
|
97
|
-
data: exports.
|
|
98
|
+
data: exports.MicroLesson,
|
|
98
99
|
});
|
|
99
100
|
exports.MicroLessonsResponse = v4_1.default.object({
|
|
100
|
-
data: v4_1.default.array(exports.
|
|
101
|
+
data: v4_1.default.array(exports.ResponseMicroLesson),
|
|
101
102
|
});
|
|
102
|
-
exports.
|
|
103
|
+
exports.MicroLessonSubmission = location_1.WahaUserLocation.extend({
|
|
103
104
|
microLessonId: v4_1.default.string(),
|
|
104
105
|
userId: v4_1.default.string(),
|
|
105
106
|
microLessonTitle: v4_1.default.string(),
|
|
106
|
-
languageId:
|
|
107
|
+
languageId: languages_zod_1.LanguageId,
|
|
107
108
|
campaign: v4_1.default.string().optional(),
|
|
108
109
|
timeStarted: v4_1.default.number(),
|
|
109
110
|
timeSubmitted: v4_1.default.number(),
|
|
110
111
|
platform: v4_1.default.enum(['ios', 'android', 'web']),
|
|
111
112
|
});
|
|
112
|
-
exports.
|
|
113
|
+
exports.MicroLessonLanguagesResponse = v4_1.default.object({
|
|
113
114
|
data: v4_1.default.array(v4_1.default.string()),
|
|
114
115
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const PushNotificationPayload: z.ZodObject<{
|
|
3
3
|
actionUrl: z.ZodOptional<z.ZodString>;
|
|
4
4
|
title: z.ZodString;
|
|
5
5
|
body: z.ZodString;
|
|
@@ -10,8 +10,8 @@ export declare const PushNotificationPayloadSchema: z.ZodObject<{
|
|
|
10
10
|
wahaUserId: z.ZodOptional<z.ZodString>;
|
|
11
11
|
date: z.ZodString;
|
|
12
12
|
}, z.core.$strip>;
|
|
13
|
-
export type PushNotificationPayload = z.infer<typeof
|
|
14
|
-
export declare const
|
|
13
|
+
export type PushNotificationPayload = z.infer<typeof PushNotificationPayload>;
|
|
14
|
+
export declare const PushNotificationRecord: z.ZodObject<{
|
|
15
15
|
date: z.ZodString;
|
|
16
16
|
notification: z.ZodObject<{
|
|
17
17
|
title: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -35,4 +35,4 @@ export declare const PushNotificationRecordSchema: z.ZodObject<{
|
|
|
35
35
|
receivedTokens: z.ZodArray<z.ZodString>;
|
|
36
36
|
receivedUserIds: z.ZodArray<z.ZodString>;
|
|
37
37
|
}, z.core.$strip>;
|
|
38
|
-
export type PushNotificationRecord = z.infer<typeof
|
|
38
|
+
export type PushNotificationRecord = z.infer<typeof PushNotificationRecord>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PushNotificationRecord = exports.PushNotificationPayload = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const notification_zod_1 = require("../data/notification/notification.zod");
|
|
6
|
-
exports.
|
|
6
|
+
exports.PushNotificationPayload = zod_1.z.object({
|
|
7
7
|
/** Optional URL to open when the primary notification action is taken. */
|
|
8
8
|
actionUrl: notification_zod_1.ActionUrl.optional(),
|
|
9
9
|
/**
|
|
@@ -35,7 +35,7 @@ exports.PushNotificationPayloadSchema = zod_1.z.object({
|
|
|
35
35
|
*/
|
|
36
36
|
date: zod_1.z.string(),
|
|
37
37
|
});
|
|
38
|
-
exports.
|
|
38
|
+
exports.PushNotificationRecord = zod_1.z.object({
|
|
39
39
|
date: zod_1.z.string(),
|
|
40
40
|
notification: notification_zod_1.Notification,
|
|
41
41
|
receivedTokens: zod_1.z.array(zod_1.z.string()),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const ScripturePassage: z.ZodObject<{
|
|
3
3
|
passageId: z.ZodString;
|
|
4
4
|
bibleId: z.ZodString;
|
|
5
5
|
verses: z.ZodArray<z.ZodObject<{
|
|
@@ -9,4 +9,4 @@ export declare const ScripturePassageSchema: z.ZodObject<{
|
|
|
9
9
|
verseId: z.ZodString;
|
|
10
10
|
}, z.core.$strict>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
|
-
export type ScripturePassage = z.infer<typeof
|
|
12
|
+
export type ScripturePassage = z.infer<typeof ScripturePassage>;
|
|
@@ -3,10 +3,10 @@ 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.
|
|
6
|
+
exports.ScripturePassage = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
const bibleChapters_1 = require("./bibleChapters");
|
|
9
|
-
exports.
|
|
9
|
+
exports.ScripturePassage = zod_1.default.object({
|
|
10
10
|
passageId: zod_1.default.string(),
|
|
11
11
|
bibleId: zod_1.default.string(),
|
|
12
12
|
verses: zod_1.default.array(bibleChapters_1.BibleVerse),
|
package/dist/types/sets.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type SetCategory } from '../data/languages/languages.zod';
|
|
1
|
+
import { type LanguageId, type SetCategory } from '../data/languages/languages.zod';
|
|
2
2
|
import { type Sets } from '../data/sets/sets.zod';
|
|
3
3
|
import { LanguageInfo } from './languages';
|
|
4
4
|
export type Set = Sets[number];
|
|
5
5
|
export type Lesson = Sets[number]['lessons'][number];
|
|
6
6
|
export interface SetInfo extends Set {
|
|
7
|
-
languageId:
|
|
7
|
+
languageId: LanguageId;
|
|
8
8
|
category: SetCategory;
|
|
9
9
|
setNumber: string;
|
|
10
10
|
setTitle?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const StoplightOption: z.ZodEnum<{
|
|
3
3
|
red: "red";
|
|
4
4
|
yellow: "yellow";
|
|
5
5
|
green: "green";
|
|
6
6
|
}>;
|
|
7
|
-
export type StoplightOption = z.infer<typeof
|
|
7
|
+
export type StoplightOption = z.infer<typeof StoplightOption>;
|
package/dist/types/stoplight.js
CHANGED
|
@@ -3,6 +3,6 @@ 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.
|
|
6
|
+
exports.StoplightOption = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
exports.
|
|
8
|
+
exports.StoplightOption = zod_1.default.enum(['red', 'yellow', 'green']);
|