waha-shared 1.0.1 → 1.0.2
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/README.md +2 -2
- package/dist/data/bibleAudios.d.ts +8 -0
- package/dist/data/bibleAudios.js +8 -0
- package/dist/data/bibleAudios.json +394 -0
- package/dist/data/bibleResources/bibleBooks.d.ts +3 -0
- package/dist/data/bibleResources/bibleBooks.js +7 -0
- package/dist/data/bibleResources/bibleBooks.json +6071 -0
- package/dist/data/bibleResources/bibleChaptersList.d.ts +2 -0
- package/dist/data/bibleResources/bibleChaptersList.js +8 -0
- package/dist/data/bibleResources/bibleChaptersList.json +1191 -0
- package/dist/data/bibleStatuses.d.ts +7 -0
- package/dist/data/bibleStatuses.js +8 -0
- package/dist/data/bibleStatuses.json +9196 -0
- package/dist/data/bibleTexts.d.ts +16 -0
- package/dist/data/bibleTexts.js +8 -0
- package/dist/data/bibleTexts.json +527 -0
- package/dist/data/countryResources/areas.d.ts +3 -0
- package/dist/data/countryResources/areas.js +7 -0
- package/dist/data/countryResources/areas.json +74 -0
- package/dist/data/countryResources/countries.d.ts +3 -0
- package/dist/data/countryResources/countries.js +7 -0
- package/dist/data/countryResources/countries.json +3362 -0
- package/dist/data/foundationsCurriculums.d.ts +5 -0
- package/dist/data/foundationsCurriculums.js +8 -0
- package/dist/data/foundationsCurriculums.json +130 -0
- package/dist/data/languageResources/countriesAndLanguages.d.ts +13 -0
- package/dist/data/languageResources/countriesAndLanguages.js +7 -0
- package/dist/data/languageResources/countriesAndLanguages.json +11718 -0
- package/dist/data/languageResources/phoneLanguages.d.ts +11 -0
- package/dist/data/languageResources/phoneLanguages.js +7 -0
- package/dist/data/languageResources/phoneLanguages.json +1532 -0
- package/dist/data/languages.d.ts +45 -0
- package/dist/data/languages.js +8 -0
- package/dist/data/languages.json +7045 -0
- package/dist/data/mediaDurations.d.ts +6 -0
- package/dist/data/mediaDurations.js +8 -0
- package/dist/data/mediaDurations.json +32364 -0
- package/dist/data/notification.d.ts +16 -0
- package/dist/data/notification.js +8 -0
- package/dist/data/notification.json +69 -0
- package/dist/data/numeralMaps.d.ts +13 -0
- package/dist/data/numeralMaps.js +8 -0
- package/dist/data/numeralMaps.json +26 -0
- package/dist/data/questions.d.ts +8 -0
- package/dist/data/questions.js +8 -0
- package/dist/data/questions.json +317 -0
- package/dist/data/questionsCurriculums.d.ts +8 -0
- package/dist/data/questionsCurriculums.js +8 -0
- package/dist/data/questionsCurriculums.json +753 -0
- package/dist/data/releaseNotes.d.ts +6 -0
- package/dist/data/releaseNotes.js +8 -0
- package/dist/data/releaseNotes.json +2381 -0
- package/dist/data/screenshots.d.ts +5 -0
- package/dist/data/screenshots.js +8 -0
- package/dist/data/screenshots.json +17 -0
- package/dist/data/sets.d.ts +14 -0
- package/dist/data/sets.js +8 -0
- package/dist/data/sets.json +12258 -0
- package/dist/data/specialIds.d.ts +18 -0
- package/dist/data/specialIds.js +7 -0
- package/dist/data/specialIds.json +72 -0
- package/dist/data/topicsCurriculums.d.ts +5 -0
- package/dist/data/topicsCurriculums.js +8 -0
- package/dist/data/topicsCurriculums.json +131 -0
- package/dist/data/typescript/appTranslations.d.ts +915 -0
- package/dist/data/typescript/appTranslations.js +315 -0
- package/dist/data/typescript/areas.d.ts +18 -0
- package/dist/data/typescript/areas.js +42 -0
- package/dist/data/typescript/aslTimestamps.d.ts +43 -0
- package/dist/data/typescript/aslTimestamps.js +31 -0
- package/dist/data/typescript/bibleAudioAvailableChapters.d.ts +3 -0
- package/dist/data/typescript/bibleAudioAvailableChapters.js +36 -0
- package/dist/data/typescript/bibleAudios.d.ts +21 -0
- package/dist/data/typescript/bibleAudios.js +23 -0
- package/dist/data/typescript/bibleBookNames.d.ts +3 -0
- package/dist/data/typescript/bibleBookNames.js +98 -0
- package/dist/data/typescript/bibleBooks.d.ts +69 -0
- package/dist/data/typescript/bibleBooks.js +56 -0
- package/dist/data/typescript/bibleChapters.d.ts +49 -0
- package/dist/data/typescript/bibleChapters.js +29 -0
- package/dist/data/typescript/bibleStatuses.d.ts +28 -0
- package/dist/data/typescript/bibleStatuses.js +39 -0
- package/dist/data/typescript/bibleTextAvailableChapters.d.ts +3 -0
- package/dist/data/typescript/bibleTextAvailableChapters.js +36 -0
- package/dist/data/typescript/bibleTexts.d.ts +53 -0
- package/dist/data/typescript/bibleTexts.js +54 -0
- package/dist/data/typescript/clones.d.ts +36 -0
- package/dist/data/typescript/clones.js +28 -0
- package/dist/data/typescript/countries.d.ts +98 -0
- package/dist/data/typescript/countries.js +149 -0
- package/dist/data/typescript/foundationsCurriculums.d.ts +12 -0
- package/dist/data/typescript/foundationsCurriculums.js +12 -0
- package/dist/data/typescript/introductionTranslations.d.ts +202 -0
- package/dist/data/typescript/introductionTranslations.js +53 -0
- package/dist/data/typescript/languages.d.ts +148 -0
- package/dist/data/typescript/languages.js +302 -0
- package/dist/data/typescript/mediaDurations.d.ts +23 -0
- package/dist/data/typescript/mediaDurations.js +72 -0
- package/dist/data/typescript/notification.d.ts +45 -0
- package/dist/data/typescript/notification.js +176 -0
- package/dist/data/typescript/numeralMaps.d.ts +58 -0
- package/dist/data/typescript/numeralMaps.js +71 -0
- package/dist/data/typescript/questionTranslations.d.ts +3 -0
- package/dist/data/typescript/questionTranslations.js +5 -0
- package/dist/data/typescript/questions.d.ts +21 -0
- package/dist/data/typescript/questions.js +18 -0
- package/dist/data/typescript/questionsCurriculums.d.ts +27 -0
- package/dist/data/typescript/questionsCurriculums.js +19 -0
- package/dist/data/typescript/releaseNotes.d.ts +15 -0
- package/dist/data/typescript/releaseNotes.js +9 -0
- package/dist/data/typescript/screenshots.d.ts +12 -0
- package/dist/data/typescript/screenshots.js +49 -0
- package/dist/data/typescript/setTranslations.d.ts +27 -0
- package/dist/data/typescript/setTranslations.js +32 -0
- package/dist/data/typescript/sets.d.ts +49 -0
- package/dist/data/typescript/sets.js +88 -0
- package/dist/data/typescript/topicsCurriculums.d.ts +12 -0
- package/dist/data/typescript/topicsCurriculums.js +12 -0
- package/dist/data/youtube/videos.d.ts +2 -0
- package/dist/data/youtube/videos.js +7 -0
- package/dist/data/youtube/videos.json +262 -0
- package/dist/functions/activeCampaign.d.ts +8 -0
- package/dist/functions/activeCampaign.js +97 -0
- package/dist/functions/bibleChapterUtils.d.ts +15 -0
- package/dist/functions/bibleChapterUtils.js +231 -0
- package/dist/functions/crowdin.d.ts +24 -0
- package/dist/functions/crowdin.js +34 -0
- package/dist/functions/languages.d.ts +24 -0
- package/dist/functions/languages.js +212 -0
- package/dist/functions/scripturePassages.d.ts +47 -0
- package/dist/functions/scripturePassages.js +261 -0
- package/dist/functions/sets.d.ts +30 -0
- package/dist/functions/sets.js +371 -0
- package/dist/translations/appTranslations.d.ts +306 -0
- package/dist/translations/appTranslations.js +8 -0
- package/dist/translations/appTranslations.json +10239 -0
- package/dist/translations/introductionTranslations.d.ts +43 -0
- package/dist/translations/introductionTranslations.js +8 -0
- package/dist/translations/introductionTranslations.json +422 -0
- package/dist/translations/questionTranslations.d.ts +2 -0
- package/dist/translations/questionTranslations.js +8 -0
- package/dist/translations/questionTranslations.json +1472 -0
- package/dist/translations/setTranslations.d.ts +10 -0
- package/dist/translations/setTranslations.js +8 -0
- package/dist/translations/setTranslations.json +30257 -0
- package/dist/types/analytics.d.ts +119 -0
- package/dist/types/analytics.js +2 -0
- package/dist/types/completions.d.ts +8 -0
- package/dist/types/completions.js +2 -0
- package/dist/types/feedback.d.ts +60 -0
- package/dist/types/feedback.js +27 -0
- package/dist/types/languages.d.ts +31 -0
- package/dist/types/languages.js +2 -0
- package/dist/types/notifications.d.ts +128 -0
- package/dist/types/notifications.js +30 -0
- package/dist/types/sets.d.ts +70 -0
- package/dist/types/sets.js +10 -0
- package/dist/types/users.d.ts +765 -0
- package/dist/types/users.js +137 -0
- package/package.json +2 -2
- package/.DS_Store +0 -0
- package/__init__.py +0 -0
- package/copy.ts +0 -37
- package/data/README.md +0 -45
- package/data/__init__.py +0 -0
- package/data/aslTimestamps.json +0 -192788
- package/data/bibleAudios.json +0 -394
- package/data/bibleAudios.ts +0 -4
- package/data/bibleResources/audioBibleLicenses.json +0 -6235
- package/data/bibleResources/bibleBooks.json +0 -6071
- package/data/bibleResources/bibleBooks.ts +0 -4
- package/data/bibleResources/bibleChaptersList.json +0 -1191
- package/data/bibleResources/bibleChaptersList.ts +0 -4
- package/data/bibleResources/textBibleLicenses.json +0 -14603
- package/data/bibleStatuses.json +0 -9196
- package/data/bibleStatuses.ts +0 -4
- package/data/bibleTexts.json +0 -527
- package/data/bibleTexts.ts +0 -4
- package/data/clones.json +0 -13
- package/data/countryResources/areas.json +0 -74
- package/data/countryResources/areas.ts +0 -4
- package/data/countryResources/countries.json +0 -3362
- package/data/countryResources/countries.ts +0 -4
- package/data/foundationsCurriculums.json +0 -130
- package/data/foundationsCurriculums.ts +0 -4
- package/data/languageResources/countriesAndLanguages.json +0 -11718
- package/data/languageResources/countriesAndLanguages.ts +0 -16
- package/data/languageResources/crowdinLanguages.json +0 -2172
- package/data/languageResources/iosVoiceOverLanguages.json +0 -64
- package/data/languageResources/iso6933LanguageCodes.json +0 -7927
- package/data/languageResources/mmsLanguages.json +0 -28164
- package/data/languageResources/phoneLanguages.json +0 -1532
- package/data/languageResources/phoneLanguages.ts +0 -14
- package/data/languages.json +0 -7045
- package/data/languages.ts +0 -4
- package/data/mediaDurations.json +0 -32364
- package/data/mediaDurations.ts +0 -4
- package/data/notification.json +0 -69
- package/data/notification.ts +0 -4
- package/data/numeralMaps.json +0 -26
- package/data/numeralMaps.ts +0 -4
- package/data/orphanedBibleTexts.json +0 -2747
- package/data/questions.json +0 -317
- package/data/questions.ts +0 -4
- package/data/questionsCurriculums.json +0 -753
- package/data/questionsCurriculums.ts +0 -4
- package/data/releaseNotes.json +0 -2381
- package/data/releaseNotes.ts +0 -4
- package/data/schemas/appTranslations.schema.json +0 -802
- package/data/schemas/areas.schema.json +0 -76
- package/data/schemas/aslTimestamps.schema.json +0 -59
- package/data/schemas/bibleAudios.schema.json +0 -37
- package/data/schemas/bibleBooks.schema.json +0 -112
- package/data/schemas/bibleChapters.schema.json +0 -61
- package/data/schemas/bibleStatuses.schema.json +0 -41
- package/data/schemas/bibleTexts.schema.json +0 -60
- package/data/schemas/clones.schema.json +0 -63
- package/data/schemas/countries.schema.json +0 -84
- package/data/schemas/foundationsCurriculums.schema.json +0 -20
- package/data/schemas/introductionTranslations.schema.json +0 -101
- package/data/schemas/languages.schema.json +0 -365
- package/data/schemas/mediaDurations.schema.json +0 -41
- package/data/schemas/notification.schema.json +0 -111
- package/data/schemas/numeralMaps.schema.json +0 -57
- package/data/schemas/questionTranslations.schema.json +0 -20
- package/data/schemas/questions.schema.json +0 -29
- package/data/schemas/questionsCurriculums.schema.json +0 -34
- package/data/schemas/releaseNotes.schema.json +0 -21
- package/data/schemas/screenshots.schema.json +0 -23
- package/data/schemas/setTranslations.schema.json +0 -70
- package/data/schemas/sets.schema.json +0 -109
- package/data/schemas/topicsCurriculums.schema.json +0 -20
- package/data/screenshots.json +0 -17
- package/data/screenshots.ts +0 -4
- package/data/sets.json +0 -12258
- package/data/sets.ts +0 -4
- package/data/specialIds.json +0 -72
- package/data/specialIds.ts +0 -19
- package/data/timings/som.json +0 -9150
- package/data/topicsCurriculums.json +0 -131
- package/data/topicsCurriculums.ts +0 -4
- package/data/typescript/appTranslations.ts +0 -322
- package/data/typescript/areas.ts +0 -45
- package/data/typescript/aslTimestamps.ts +0 -36
- package/data/typescript/bibleAudioAvailableChapters.ts +0 -35
- package/data/typescript/bibleAudios.ts +0 -32
- package/data/typescript/bibleBookNames.ts +0 -97
- package/data/typescript/bibleBooks.ts +0 -63
- package/data/typescript/bibleChapters.ts +0 -40
- package/data/typescript/bibleStatuses.ts +0 -54
- package/data/typescript/bibleTextAvailableChapters.ts +0 -35
- package/data/typescript/bibleTexts.ts +0 -63
- package/data/typescript/clones.ts +0 -35
- package/data/typescript/countries.ts +0 -152
- package/data/typescript/foundationsCurriculums.ts +0 -15
- package/data/typescript/introductionTranslations.ts +0 -60
- package/data/typescript/languages.ts +0 -369
- package/data/typescript/mediaDurations.ts +0 -89
- package/data/typescript/notification.ts +0 -189
- package/data/typescript/numeralMaps.ts +0 -74
- package/data/typescript/questionTranslations.ts +0 -6
- package/data/typescript/questions.ts +0 -25
- package/data/typescript/questionsCurriculums.ts +0 -26
- package/data/typescript/releaseNotes.ts +0 -10
- package/data/typescript/screenshots.ts +0 -52
- package/data/typescript/setTranslations.ts +0 -39
- package/data/typescript/sets.ts +0 -105
- package/data/typescript/topicsCurriculums.ts +0 -15
- package/data/youtube/playlists.json +0 -28
- package/data/youtube/videos.json +0 -262
- package/data/youtube/videos.ts +0 -2
- package/functions/activeCampaign.ts +0 -127
- package/functions/bibleChapterUtils.ts +0 -241
- package/functions/crowdin.ts +0 -51
- package/functions/languages.ts +0 -284
- package/functions/scripturePassages.ts +0 -368
- package/functions/sets.ts +0 -495
- package/translations/appTranslations.json +0 -10239
- package/translations/appTranslations.ts +0 -4
- package/translations/introductionTranslations.json +0 -422
- package/translations/introductionTranslations.ts +0 -4
- package/translations/questionTranslations.json +0 -1472
- package/translations/questionTranslations.ts +0 -4
- package/translations/setTranslations.json +0 -30257
- package/translations/setTranslations.ts +0 -4
- package/translations/spokenQuestionTranslations.json +0 -1472
- package/types/analytics.ts +0 -147
- package/types/completions.ts +0 -9
- package/types/feedback.ts +0 -27
- package/types/languages.ts +0 -37
- package/types/notifications.ts +0 -37
- package/types/sets.ts +0 -84
- package/types/users.ts +0 -162
|
@@ -1,369 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
|
|
3
|
-
export const languages = z.array(
|
|
4
|
-
z
|
|
5
|
-
.object({
|
|
6
|
-
languageId: z
|
|
7
|
-
.string()
|
|
8
|
-
.describe(
|
|
9
|
-
"A 3 letter id used to represent a language in Waha. Use the standard ISO 693-3 id found in data/iso6933LanguageCodes.json. If the language isn't there, use a unique custom 3 letter id that isn't already taken and add it to that file so it doesn't get taken by another language."
|
|
10
|
-
),
|
|
11
|
-
exonym: z
|
|
12
|
-
.string()
|
|
13
|
-
.describe(
|
|
14
|
-
'The name of a language in English, i.e. "Spanish". This helps Waha team members identify the language.'
|
|
15
|
-
),
|
|
16
|
-
appInterface: z.boolean(),
|
|
17
|
-
bcpLanguageId: z
|
|
18
|
-
.string()
|
|
19
|
-
.describe(
|
|
20
|
-
"A language ID used for iOS's screen reader support. Should be in BCP 47 format. Should only be included if language is supported by iOS's screen reader. List of supported languages can be found here: https://www.apple.com/ios/feature-availability/"
|
|
21
|
-
)
|
|
22
|
-
.optional(),
|
|
23
|
-
bible: z
|
|
24
|
-
.string()
|
|
25
|
-
.describe(
|
|
26
|
-
'Determines what scripture translation this language will use.'
|
|
27
|
-
)
|
|
28
|
-
.optional(),
|
|
29
|
-
bibleFallback: z
|
|
30
|
-
.string()
|
|
31
|
-
.describe(
|
|
32
|
-
"Bible to use as a fallback if a chapter isn't available in the main bible. For example, if a language has only an NT bible available, specify a translation that has the OT available here to use for OT passages."
|
|
33
|
-
)
|
|
34
|
-
.optional(),
|
|
35
|
-
countries: z
|
|
36
|
-
.array(z.string())
|
|
37
|
-
.describe(
|
|
38
|
-
"A list of country ids that this language is spoken in. This gets added automatically by the script found in scripts/mapCountriesToLanguages.ts which uses shared/data/languageResources/countriesAndLanguages.json to generate a list of countries where the language is spoken. This is used for determing the recommended list of meet languages based on the user's country location."
|
|
39
|
-
)
|
|
40
|
-
.optional(),
|
|
41
|
-
crowdinId: z
|
|
42
|
-
.string()
|
|
43
|
-
.describe(
|
|
44
|
-
"The Id of this language in Crowdin. For language's that crowdin supports, this can be found in <https://developer.crowdin.com/language-codes>. Otherwise, it will be a custom id created at the time the language was added to crowdin."
|
|
45
|
-
)
|
|
46
|
-
.optional(),
|
|
47
|
-
curriculum: z
|
|
48
|
-
.object({
|
|
49
|
-
foundations: z
|
|
50
|
-
.string()
|
|
51
|
-
.describe(
|
|
52
|
-
'The id for the foundations curriculum for this language.'
|
|
53
|
-
),
|
|
54
|
-
questions: z
|
|
55
|
-
.string()
|
|
56
|
-
.describe(
|
|
57
|
-
'The id for the foundations curriculum for this language.'
|
|
58
|
-
),
|
|
59
|
-
topics: z
|
|
60
|
-
.union([z.string(), z.null()])
|
|
61
|
-
.describe(
|
|
62
|
-
'The id for the foundations curriculum for this language.'
|
|
63
|
-
),
|
|
64
|
-
})
|
|
65
|
-
.strict()
|
|
66
|
-
.describe(
|
|
67
|
-
'Determines what curriculums this language will use for its various content. Each must be linked to objects in data/foundationsCurriculums.json, data/topicsCurriculums.json , or data/questionsCurriculums.json.'
|
|
68
|
-
),
|
|
69
|
-
dmCourseStatus: z
|
|
70
|
-
.enum(['notStarted', 'inProgress', 'testing', 'launched'])
|
|
71
|
-
.describe("The status of this language's disciple making course."),
|
|
72
|
-
endonym: z
|
|
73
|
-
.string()
|
|
74
|
-
.regex(new RegExp('^.+$'))
|
|
75
|
-
.describe(
|
|
76
|
-
'The name of the language in its native language and script, e.g. "Español"'
|
|
77
|
-
)
|
|
78
|
-
.optional(),
|
|
79
|
-
gdmcStatus: z
|
|
80
|
-
.enum(['notStarted', 'inProgress', 'testing', 'launched'])
|
|
81
|
-
.describe("The status of this language's growing as a dmc sets."),
|
|
82
|
-
givingId: z
|
|
83
|
-
.string()
|
|
84
|
-
.describe(
|
|
85
|
-
"This is a designation id with FundraiseUp that will be tacked onto the end of waha's giving url. It's used to open waha's giving page and designate the donation to this language. It can be found in the big table of designation ids here: https://dashboard.fundraiseup.com/ABJRDUBH/settings/designations"
|
|
86
|
-
)
|
|
87
|
-
.optional(),
|
|
88
|
-
hideDonateButton: z
|
|
89
|
-
.boolean()
|
|
90
|
-
.describe(
|
|
91
|
-
'Whether or not to hide the donate button in the app when this language is selected as the meet language.'
|
|
92
|
-
)
|
|
93
|
-
.optional(),
|
|
94
|
-
introBridge: z
|
|
95
|
-
.string()
|
|
96
|
-
.describe(
|
|
97
|
-
'The language id of the language that will be used as the bridge language for the intro content.'
|
|
98
|
-
)
|
|
99
|
-
.optional(),
|
|
100
|
-
likelyAppInterfacePair: z
|
|
101
|
-
.string()
|
|
102
|
-
.describe(
|
|
103
|
-
'The language id of the language that is most likely to be used as the app interface language for this language.'
|
|
104
|
-
)
|
|
105
|
-
.optional(),
|
|
106
|
-
mmsLanguageId: z
|
|
107
|
-
.string()
|
|
108
|
-
.describe(
|
|
109
|
-
'Id of a supported MMS language for running forced alignment.'
|
|
110
|
-
)
|
|
111
|
-
.optional(),
|
|
112
|
-
notes: z
|
|
113
|
-
.string()
|
|
114
|
-
.describe(
|
|
115
|
-
'Any notes about this language that might be helpful for Waha team members.'
|
|
116
|
-
)
|
|
117
|
-
.optional(),
|
|
118
|
-
pm: z
|
|
119
|
-
.string()
|
|
120
|
-
.describe(
|
|
121
|
-
"The id of the project manager for this language. This is the person who is responsible for the language's content and progress."
|
|
122
|
-
)
|
|
123
|
-
.optional(),
|
|
124
|
-
questionSource: z
|
|
125
|
-
.enum(['recorded', 'mms', 'elevenLabs', 'unknown'])
|
|
126
|
-
.describe(
|
|
127
|
-
'The source for question audio generation for this language.'
|
|
128
|
-
),
|
|
129
|
-
script: z
|
|
130
|
-
.enum([
|
|
131
|
-
'arabic',
|
|
132
|
-
'bengali',
|
|
133
|
-
'burmese',
|
|
134
|
-
'chinese',
|
|
135
|
-
'cyrillic',
|
|
136
|
-
'devanagari',
|
|
137
|
-
'geez',
|
|
138
|
-
'georgian',
|
|
139
|
-
'greek',
|
|
140
|
-
'gujarati',
|
|
141
|
-
'gurmukhi',
|
|
142
|
-
'hebrew',
|
|
143
|
-
'japanese',
|
|
144
|
-
'kannada',
|
|
145
|
-
'khmer',
|
|
146
|
-
'korean',
|
|
147
|
-
'latin',
|
|
148
|
-
'malayalam',
|
|
149
|
-
'tamil',
|
|
150
|
-
'telugu',
|
|
151
|
-
'thai',
|
|
152
|
-
'uyghur',
|
|
153
|
-
])
|
|
154
|
-
.describe(
|
|
155
|
-
'The script that a language uses. Each script has a specific font so that we can display all scripts correctly.'
|
|
156
|
-
),
|
|
157
|
-
speakersPrimary: z
|
|
158
|
-
.number()
|
|
159
|
-
.describe(
|
|
160
|
-
'The number of speakers of this language who speak it as their first language.'
|
|
161
|
-
)
|
|
162
|
-
.optional(),
|
|
163
|
-
speakersSecondary: z
|
|
164
|
-
.number()
|
|
165
|
-
.describe(
|
|
166
|
-
'The number of speakers of this language who speak it as a second language.'
|
|
167
|
-
)
|
|
168
|
-
.optional(),
|
|
169
|
-
speakersTotal: z
|
|
170
|
-
.number()
|
|
171
|
-
.describe('The total number of speakers of this language worldwide.')
|
|
172
|
-
.optional(),
|
|
173
|
-
specialThanks: z.any().optional(),
|
|
174
|
-
status: z
|
|
175
|
-
.enum(['notStarted', 'inProgress', 'testing', 'launched'])
|
|
176
|
-
.describe(
|
|
177
|
-
"The overall status of this language. Determines whether or not the language will show up in the app. Only language's marked `launched` will be selectable in Waha."
|
|
178
|
-
),
|
|
179
|
-
storeIdAndroid: z
|
|
180
|
-
.enum([
|
|
181
|
-
'af',
|
|
182
|
-
'sq',
|
|
183
|
-
'am',
|
|
184
|
-
'ar',
|
|
185
|
-
'hy-AM',
|
|
186
|
-
'az-AZ',
|
|
187
|
-
'bn-BD',
|
|
188
|
-
'eu-ES',
|
|
189
|
-
'be',
|
|
190
|
-
'bg',
|
|
191
|
-
'my-MM',
|
|
192
|
-
'ca',
|
|
193
|
-
'zh-HK',
|
|
194
|
-
'zh-CN',
|
|
195
|
-
'zh-TW',
|
|
196
|
-
'hr',
|
|
197
|
-
'cs-CZ',
|
|
198
|
-
'da-DK',
|
|
199
|
-
'nl-NL',
|
|
200
|
-
'en-AU',
|
|
201
|
-
'en-CA',
|
|
202
|
-
'en-GB',
|
|
203
|
-
'en-IN',
|
|
204
|
-
'en-SG',
|
|
205
|
-
'en-US',
|
|
206
|
-
'en-ZA',
|
|
207
|
-
'et',
|
|
208
|
-
'fil',
|
|
209
|
-
'fi-FI',
|
|
210
|
-
'fr-CA',
|
|
211
|
-
'fr-FR',
|
|
212
|
-
'gl-ES',
|
|
213
|
-
'ka-GE',
|
|
214
|
-
'de-DE',
|
|
215
|
-
'el-GR',
|
|
216
|
-
'gu',
|
|
217
|
-
'iw-IL',
|
|
218
|
-
'hi-IN',
|
|
219
|
-
'hu-HU',
|
|
220
|
-
'is-IS',
|
|
221
|
-
'id',
|
|
222
|
-
'it-IT',
|
|
223
|
-
'ja-JP',
|
|
224
|
-
'kn-IN',
|
|
225
|
-
'kk',
|
|
226
|
-
'km-KH',
|
|
227
|
-
'ko-KR',
|
|
228
|
-
'ky-KG',
|
|
229
|
-
'lo-LA',
|
|
230
|
-
'lv',
|
|
231
|
-
'lt',
|
|
232
|
-
'mk-MK',
|
|
233
|
-
'ms-MY',
|
|
234
|
-
'ms',
|
|
235
|
-
'ml-IN',
|
|
236
|
-
'mr-IN',
|
|
237
|
-
'mn-MN',
|
|
238
|
-
'ne-NP',
|
|
239
|
-
'no-NO',
|
|
240
|
-
'fa',
|
|
241
|
-
'fa-AE',
|
|
242
|
-
'fa-AF',
|
|
243
|
-
'fa-IR',
|
|
244
|
-
'pl-PL',
|
|
245
|
-
'pt-BR',
|
|
246
|
-
'pt-PT',
|
|
247
|
-
'pa',
|
|
248
|
-
'ro',
|
|
249
|
-
'rm',
|
|
250
|
-
'ru-RU',
|
|
251
|
-
'sr',
|
|
252
|
-
'si-LK',
|
|
253
|
-
'sk',
|
|
254
|
-
'sl',
|
|
255
|
-
'es-419',
|
|
256
|
-
'es-ES',
|
|
257
|
-
'es-US',
|
|
258
|
-
'sw',
|
|
259
|
-
'sv-SE',
|
|
260
|
-
'ta-IN',
|
|
261
|
-
'te-IN',
|
|
262
|
-
'th',
|
|
263
|
-
'tr-TR',
|
|
264
|
-
'uk',
|
|
265
|
-
'ur',
|
|
266
|
-
'vi',
|
|
267
|
-
'zu',
|
|
268
|
-
])
|
|
269
|
-
.describe(
|
|
270
|
-
"The id of this language in the play store, if it's supported.\nAfrikaans:af\nAlbanian:sq\nAmharic:am\nArabic:ar\nArmenian:hy-AM\nAzerbaijani:az-AZ\nBangla:bn-BD\nBasque:eu-ES\nBelarusian:be\nBulgarian:bg\nBurmese:my-MM\nCatalan:ca\nChinese (Hong Kong):zh-HK\nChinese (Simplified):zh-CN\nChinese (Traditional):zh-TW\nCroatian:hr\nCzech:cs-CZ\nDanish:da-DK\nDutch:nl-NL\nEnglish (Australia):en-AU\nEnglish (Canada):en-CA\nEnglish (United Kingdom):en-GB\nEnglish:en-IN\nEnglish (US):en-US\nEnglish:en-SG\nEnglish:en-ZA\nEstonian:et\nFilipino:fil\nFinnish:fi-FI\nFrench (Canada):fr-CA\nFrench (France):fr-FR\nGalician:gl-ES\nGeorgian:ka-GE\nGerman:de-DE\nGreek:el-GR\nGujarati:gu\nHebrew:iw-IL\nHindi:hi-IN\nHungarian:hu-HU\nIcelandic:is-IS\nIndonesian:id\nItalian:it-IT\nJapanese:ja-JP\nKannada:kn-IN\nKazakh:kk\nKhmer:km-KH\nKorean:ko-KR\nKyrgyz:ky-KG\nLao:lo-LA\nLatvian:lv\nLithuanian:lt\nMacedonian:mk-MK\nMalay (Malaysia):ms-MY\nMalay:ms\nMalayalam:ml-IN\nMarathi:mr-IN\nMongolian:mn-MN\nNepali:ne-NP\nNorwegian:no-NO\nPersian:fa\nPersian:fa-AE\nPersian:fa-AF\nPersian:fa-IR\nPolish:pl-PL\nPortuguese (Brazil):pt-BR\nPortuguese (Portugal):pt-PT\nPunjabi:pa\nRomanian:ro\nRomansh:rm\nRussian:ru-RU\nSerbian:sr\nSinhala:si-LK\nSlovak:sk\nSlovenian:sl\nSpanish (Latin America):es-419\nSpanish (Spain):es-ES\nSpanish (United States):es-US\nSwahili:sw\nSwedish:sv-SE\nTamil:ta-IN\nTelugu:te-IN\nThai:th\nTurkish:tr-TR\nUkrainian:uk\nUrdu:ur\nVietnamese:vi\nZulu:zu"
|
|
271
|
-
)
|
|
272
|
-
.optional(),
|
|
273
|
-
storeIdIos: z
|
|
274
|
-
.enum([
|
|
275
|
-
'ar-SA',
|
|
276
|
-
'ca',
|
|
277
|
-
'cs',
|
|
278
|
-
'da',
|
|
279
|
-
'de-DE',
|
|
280
|
-
'el',
|
|
281
|
-
'en-AU',
|
|
282
|
-
'en-CA',
|
|
283
|
-
'en-GB',
|
|
284
|
-
'en-US',
|
|
285
|
-
'es-ES',
|
|
286
|
-
'es-MX',
|
|
287
|
-
'fi',
|
|
288
|
-
'fr-CA',
|
|
289
|
-
'fr-FR',
|
|
290
|
-
'he',
|
|
291
|
-
'hi',
|
|
292
|
-
'hr',
|
|
293
|
-
'hu',
|
|
294
|
-
'id',
|
|
295
|
-
'it',
|
|
296
|
-
'ja',
|
|
297
|
-
'ko',
|
|
298
|
-
'ms',
|
|
299
|
-
'nl-NL',
|
|
300
|
-
'no',
|
|
301
|
-
'pl',
|
|
302
|
-
'pt-BR',
|
|
303
|
-
'pt-PT',
|
|
304
|
-
'ro',
|
|
305
|
-
'ru',
|
|
306
|
-
'sk',
|
|
307
|
-
'sv',
|
|
308
|
-
'th',
|
|
309
|
-
'tr',
|
|
310
|
-
'uk',
|
|
311
|
-
'vi',
|
|
312
|
-
'zh-Hans',
|
|
313
|
-
'zh-Hant',
|
|
314
|
-
])
|
|
315
|
-
.describe(
|
|
316
|
-
"The id of this language in the app store, if it's supported.\nArabic:ar-SA\nCatalan:ca\nChinese (Simplified):zh-Hans\nChinese (Traditional):zh-Hant\nCroatian:hr\nCzech:cs\nDanish:da\nDutch:nl-NL\nEnglish (Australia):en-AU\nEnglish (Canada):en-CA\nEnglish (U.K.):en-GB\nEnglish (U.S.):en-US\nFinnish:fi\nFrench:fr-FR\nFrench (Canada):fr-CA\nGerman:de-DE\nGreek:el\nHebrew:he\nHindi:hi\nHungarian:hu\nIndonesian:id\nItalian:it\nJapanese:ja\nKorean:ko\nMalay:ms\nNorwegian:no \nPolish:pl\nPortuguese (Brazil):pt-BR\nPortuguese (Portugal):pt-PT\nRomanian:ro\nRussian:ru\nSlovak:sk\nSpanish (Mexico):es-MX\nSpanish (Spain):es-ES\nSwedish:sv\nThai:th\nTurkish:tr\nUkrainian:uk\nVietnamese:vi"
|
|
317
|
-
)
|
|
318
|
-
.optional(),
|
|
319
|
-
supportsSolarSpeakers: z
|
|
320
|
-
.boolean()
|
|
321
|
-
.describe('Whether or not this language supports solar speakers.')
|
|
322
|
-
.optional(),
|
|
323
|
-
titles: z
|
|
324
|
-
.string()
|
|
325
|
-
.describe(
|
|
326
|
-
"This is the language of the language's story set and lesson titles. Often, this will be the same as the language itself. Occasionally, this is not the case, such as all of the Arabic languages using standard Arabic as their titles language."
|
|
327
|
-
)
|
|
328
|
-
.optional(),
|
|
329
|
-
unsupportedDbsSets: z
|
|
330
|
-
.array(z.string())
|
|
331
|
-
.describe(
|
|
332
|
-
'A list of foundations or topics (01.x or 02.x) set ids that are not supported in this language. See data/sets.json for a list of set ids.'
|
|
333
|
-
)
|
|
334
|
-
.optional(),
|
|
335
|
-
uuid: z
|
|
336
|
-
.string()
|
|
337
|
-
.describe(
|
|
338
|
-
'A unique identifier for this language. Can be generated at <https://www.uuidgenerator.net>.'
|
|
339
|
-
),
|
|
340
|
-
videoBridgeLanguage: z
|
|
341
|
-
.string()
|
|
342
|
-
.describe(
|
|
343
|
-
"If the language is not doing the dmc videos, or if the dmc videos are in progress, you can specify one or more bridge languages that will be used in the meantime. If a language does not have a launched dm course and if they don't specify any bridge languages, the training content will not be available in the app."
|
|
344
|
-
)
|
|
345
|
-
.optional(),
|
|
346
|
-
web: z
|
|
347
|
-
.object({
|
|
348
|
-
name: z
|
|
349
|
-
.string()
|
|
350
|
-
.describe(
|
|
351
|
-
"The name of the language to display in the website's language switcher."
|
|
352
|
-
),
|
|
353
|
-
code: z
|
|
354
|
-
.string()
|
|
355
|
-
.describe(
|
|
356
|
-
"The html standard code used to represent the language on the web. Allows the website to associate the user's browser language with this Waha language."
|
|
357
|
-
),
|
|
358
|
-
status: z
|
|
359
|
-
.enum(['notStarted', 'inProgress', 'testing', 'launched'])
|
|
360
|
-
.describe(
|
|
361
|
-
"The status of this language's website localization on https://waha.app."
|
|
362
|
-
),
|
|
363
|
-
})
|
|
364
|
-
.strict()
|
|
365
|
-
.optional(),
|
|
366
|
-
})
|
|
367
|
-
.strict()
|
|
368
|
-
)
|
|
369
|
-
export type Languages = z.infer<typeof languages>
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
|
|
3
|
-
export const mediaDurations = z
|
|
4
|
-
.record(
|
|
5
|
-
z.union([
|
|
6
|
-
z
|
|
7
|
-
.object({
|
|
8
|
-
questions: z.record(
|
|
9
|
-
z
|
|
10
|
-
.number()
|
|
11
|
-
.gte(0)
|
|
12
|
-
.describe('Duration of question audio file in seconds')
|
|
13
|
-
),
|
|
14
|
-
ftbs: z.record(
|
|
15
|
-
z.number().gte(0).describe('Duration of ftb audio file in seconds')
|
|
16
|
-
),
|
|
17
|
-
lessons: z.record(
|
|
18
|
-
z
|
|
19
|
-
.number()
|
|
20
|
-
.gte(0)
|
|
21
|
-
.describe('Duration of lesson audio file in seconds')
|
|
22
|
-
),
|
|
23
|
-
})
|
|
24
|
-
.strict()
|
|
25
|
-
.describe(
|
|
26
|
-
'Language code (3-letter ISO code) containing media file durations'
|
|
27
|
-
),
|
|
28
|
-
z.never(),
|
|
29
|
-
])
|
|
30
|
-
)
|
|
31
|
-
.superRefine((value, ctx) => {
|
|
32
|
-
for (const key in value) {
|
|
33
|
-
let evaluated = false
|
|
34
|
-
if (key.match(new RegExp('^[a-z]{3}$'))) {
|
|
35
|
-
evaluated = true
|
|
36
|
-
const result = z
|
|
37
|
-
.object({
|
|
38
|
-
questions: z.record(
|
|
39
|
-
z
|
|
40
|
-
.number()
|
|
41
|
-
.gte(0)
|
|
42
|
-
.describe('Duration of question audio file in seconds')
|
|
43
|
-
),
|
|
44
|
-
ftbs: z.record(
|
|
45
|
-
z
|
|
46
|
-
.number()
|
|
47
|
-
.gte(0)
|
|
48
|
-
.describe('Duration of ftb audio file in seconds')
|
|
49
|
-
),
|
|
50
|
-
lessons: z.record(
|
|
51
|
-
z
|
|
52
|
-
.number()
|
|
53
|
-
.gte(0)
|
|
54
|
-
.describe('Duration of lesson audio file in seconds')
|
|
55
|
-
),
|
|
56
|
-
})
|
|
57
|
-
.strict()
|
|
58
|
-
.describe(
|
|
59
|
-
'Language code (3-letter ISO code) containing media file durations'
|
|
60
|
-
)
|
|
61
|
-
.safeParse(value[key])
|
|
62
|
-
if (!result.success) {
|
|
63
|
-
ctx.addIssue({
|
|
64
|
-
path: [...ctx.path, key],
|
|
65
|
-
code: 'custom',
|
|
66
|
-
message: `Invalid input: Key matching regex /${key}/ must match schema`,
|
|
67
|
-
params: {
|
|
68
|
-
issues: result.error.issues,
|
|
69
|
-
},
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
if (!evaluated) {
|
|
74
|
-
const result = z.never().safeParse(value[key])
|
|
75
|
-
if (!result.success) {
|
|
76
|
-
ctx.addIssue({
|
|
77
|
-
path: [...ctx.path, key],
|
|
78
|
-
code: 'custom',
|
|
79
|
-
message: `Invalid input: must match catchall schema`,
|
|
80
|
-
params: {
|
|
81
|
-
issues: result.error.issues,
|
|
82
|
-
},
|
|
83
|
-
})
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
})
|
|
88
|
-
.describe('Schema for media duration data organized by language code')
|
|
89
|
-
export type MediaDurations = z.infer<typeof mediaDurations>
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
|
|
3
|
-
export const notification = z
|
|
4
|
-
.object({
|
|
5
|
-
title: z
|
|
6
|
-
.record(z.union([z.string(), z.never()]))
|
|
7
|
-
.superRefine((value, ctx) => {
|
|
8
|
-
for (const key in value) {
|
|
9
|
-
let evaluated = false
|
|
10
|
-
if (key.match(new RegExp('^[a-z]{3}$'))) {
|
|
11
|
-
evaluated = true
|
|
12
|
-
const result = z.string().safeParse(value[key])
|
|
13
|
-
if (!result.success) {
|
|
14
|
-
ctx.addIssue({
|
|
15
|
-
path: [...ctx.path, key],
|
|
16
|
-
code: 'custom',
|
|
17
|
-
message: `Invalid input: Key matching regex /${key}/ must match schema`,
|
|
18
|
-
params: {
|
|
19
|
-
issues: result.error.issues,
|
|
20
|
-
},
|
|
21
|
-
})
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
if (!evaluated) {
|
|
25
|
-
const result = z.never().safeParse(value[key])
|
|
26
|
-
if (!result.success) {
|
|
27
|
-
ctx.addIssue({
|
|
28
|
-
path: [...ctx.path, key],
|
|
29
|
-
code: 'custom',
|
|
30
|
-
message: `Invalid input: must match catchall schema`,
|
|
31
|
-
params: {
|
|
32
|
-
issues: result.error.issues,
|
|
33
|
-
},
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}),
|
|
39
|
-
body: z
|
|
40
|
-
.record(z.union([z.string(), z.never()]))
|
|
41
|
-
.superRefine((value, ctx) => {
|
|
42
|
-
for (const key in value) {
|
|
43
|
-
let evaluated = false
|
|
44
|
-
if (key.match(new RegExp('^[a-z]{3}$'))) {
|
|
45
|
-
evaluated = true
|
|
46
|
-
const result = z.string().safeParse(value[key])
|
|
47
|
-
if (!result.success) {
|
|
48
|
-
ctx.addIssue({
|
|
49
|
-
path: [...ctx.path, key],
|
|
50
|
-
code: 'custom',
|
|
51
|
-
message: `Invalid input: Key matching regex /${key}/ must match schema`,
|
|
52
|
-
params: {
|
|
53
|
-
issues: result.error.issues,
|
|
54
|
-
},
|
|
55
|
-
})
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
if (!evaluated) {
|
|
59
|
-
const result = z.never().safeParse(value[key])
|
|
60
|
-
if (!result.success) {
|
|
61
|
-
ctx.addIssue({
|
|
62
|
-
path: [...ctx.path, key],
|
|
63
|
-
code: 'custom',
|
|
64
|
-
message: `Invalid input: must match catchall schema`,
|
|
65
|
-
params: {
|
|
66
|
-
issues: result.error.issues,
|
|
67
|
-
},
|
|
68
|
-
})
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}),
|
|
73
|
-
actionUrl: z
|
|
74
|
-
.string()
|
|
75
|
-
.regex(new RegExp('^(https://|waha://).+$'))
|
|
76
|
-
.describe(
|
|
77
|
-
"Where to navigate to when a user clicks the CTA. If a waha web url is given, the link will navigate to a screen in the app. If not, it will open an in-app browser.\n@example\n// Would navigate to the English DM course in the app.\n'https://web.waha.app/set?set-id=03.009&meet-language=eng'\n@example\n// Would open up the in-app browser to the waha giving page.\n'https://waha.app/give-from-app?form=give'"
|
|
78
|
-
)
|
|
79
|
-
.optional(),
|
|
80
|
-
countriesToNotSendTo: z
|
|
81
|
-
.array(z.string())
|
|
82
|
-
.describe(
|
|
83
|
-
'Users in any country EXCEPT these will receive the notification. Cannot be defined with `countriesToSendTo`.'
|
|
84
|
-
)
|
|
85
|
-
.optional(),
|
|
86
|
-
countriesToSendTo: z
|
|
87
|
-
.array(z.string())
|
|
88
|
-
.describe(
|
|
89
|
-
"Only users who have logged activity in the specified countries will receive the notification. To send to users in all countries, don't include this key. Cannot be defined with `countriesToNotSendTo`."
|
|
90
|
-
)
|
|
91
|
-
.optional(),
|
|
92
|
-
faithJourney: z
|
|
93
|
-
.enum(['all', 'seekers', 'believers'])
|
|
94
|
-
.describe(
|
|
95
|
-
'Only users who match the specified faith journey status will receive the notification. To send to all users regardless of faith journey, use "all".'
|
|
96
|
-
)
|
|
97
|
-
.optional(),
|
|
98
|
-
imageUrl: z.string().regex(new RegExp('^https://.+$')).optional(),
|
|
99
|
-
meetLanguages: z
|
|
100
|
-
.union([z.literal('all'), z.array(z.string())])
|
|
101
|
-
.describe(
|
|
102
|
-
'Only users who have the specified meet languages as favorites will receive the notification. To send to users across all meet languages, use "all".'
|
|
103
|
-
)
|
|
104
|
-
.optional(),
|
|
105
|
-
minCompletions: z.number().int().optional(),
|
|
106
|
-
pushBody: z
|
|
107
|
-
.record(z.union([z.string(), z.never()]))
|
|
108
|
-
.superRefine((value, ctx) => {
|
|
109
|
-
for (const key in value) {
|
|
110
|
-
let evaluated = false
|
|
111
|
-
if (key.match(new RegExp('^[a-z]{3}$'))) {
|
|
112
|
-
evaluated = true
|
|
113
|
-
const result = z.string().safeParse(value[key])
|
|
114
|
-
if (!result.success) {
|
|
115
|
-
ctx.addIssue({
|
|
116
|
-
path: [...ctx.path, key],
|
|
117
|
-
code: 'custom',
|
|
118
|
-
message: `Invalid input: Key matching regex /${key}/ must match schema`,
|
|
119
|
-
params: {
|
|
120
|
-
issues: result.error.issues,
|
|
121
|
-
},
|
|
122
|
-
})
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
if (!evaluated) {
|
|
126
|
-
const result = z.never().safeParse(value[key])
|
|
127
|
-
if (!result.success) {
|
|
128
|
-
ctx.addIssue({
|
|
129
|
-
path: [...ctx.path, key],
|
|
130
|
-
code: 'custom',
|
|
131
|
-
message: `Invalid input: must match catchall schema`,
|
|
132
|
-
params: {
|
|
133
|
-
issues: result.error.issues,
|
|
134
|
-
},
|
|
135
|
-
})
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
})
|
|
140
|
-
.optional(),
|
|
141
|
-
pushTitle: z
|
|
142
|
-
.record(z.union([z.string(), z.never()]))
|
|
143
|
-
.superRefine((value, ctx) => {
|
|
144
|
-
for (const key in value) {
|
|
145
|
-
let evaluated = false
|
|
146
|
-
if (key.match(new RegExp('^[a-z]{3}$'))) {
|
|
147
|
-
evaluated = true
|
|
148
|
-
const result = z.string().safeParse(value[key])
|
|
149
|
-
if (!result.success) {
|
|
150
|
-
ctx.addIssue({
|
|
151
|
-
path: [...ctx.path, key],
|
|
152
|
-
code: 'custom',
|
|
153
|
-
message: `Invalid input: Key matching regex /${key}/ must match schema`,
|
|
154
|
-
params: {
|
|
155
|
-
issues: result.error.issues,
|
|
156
|
-
},
|
|
157
|
-
})
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
if (!evaluated) {
|
|
161
|
-
const result = z.never().safeParse(value[key])
|
|
162
|
-
if (!result.success) {
|
|
163
|
-
ctx.addIssue({
|
|
164
|
-
path: [...ctx.path, key],
|
|
165
|
-
code: 'custom',
|
|
166
|
-
message: `Invalid input: must match catchall schema`,
|
|
167
|
-
params: {
|
|
168
|
-
issues: result.error.issues,
|
|
169
|
-
},
|
|
170
|
-
})
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
})
|
|
175
|
-
.optional(),
|
|
176
|
-
pushTokens: z
|
|
177
|
-
.array(z.string())
|
|
178
|
-
.describe(
|
|
179
|
-
'List of push tokens to send the notification to. If not provided, the notification will be sent to all users who match the other criteria. If provided, the other filters will be ignored.'
|
|
180
|
-
)
|
|
181
|
-
.optional(),
|
|
182
|
-
verified: z
|
|
183
|
-
.array(z.string())
|
|
184
|
-
.describe(
|
|
185
|
-
"List of languages that have had their translation verified. These languages will NOT show the 'translated by AI' message in the app. English should never be included, as its translations are always verified."
|
|
186
|
-
),
|
|
187
|
-
})
|
|
188
|
-
.strict()
|
|
189
|
-
export type Notification = z.infer<typeof notification>
|