waha-shared 1.0.211 → 1.0.213
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.schema.json +53 -19
- package/dist/data/areas/areas.zod.d.ts +12 -15
- package/dist/data/aslTimestamps/aslTimestamps.schema.json +11 -18
- package/dist/data/aslTimestamps/aslTimestamps.zod.d.ts +34 -4
- package/dist/data/bibleAudios/bibleAudios.schema.json +11 -14
- package/dist/data/bibleAudios/bibleAudios.zod.d.ts +15 -11
- package/dist/data/bibleAudios/bibleAudios.zod.js +4 -5
- package/dist/data/bibleAudios/index.d.ts +2 -5
- package/dist/data/bibleBooks/bibleBooks.schema.json +50 -71
- package/dist/data/bibleBooks/bibleBooks.zod.d.ts +51 -5
- package/dist/data/bibleBooks/index.d.ts +2 -2
- package/dist/data/bibleChaptersList/bibleChaptersList.schema.json +2 -5
- package/dist/data/bibleChaptersList/bibleChaptersList.zod.d.ts +1 -1
- package/dist/data/bibleStatuses/bibleStatuses.json +110 -2
- package/dist/data/bibleStatuses/bibleStatuses.schema.json +40 -46
- package/dist/data/bibleStatuses/bibleStatuses.zod.d.ts +25 -5
- package/dist/data/bibleStatuses/bibleStatuses.zod.js +27 -2
- package/dist/data/bibleTexts/bibleTexts.schema.json +24 -40
- package/dist/data/bibleTexts/bibleTexts.zod.d.ts +39 -11
- package/dist/data/bibleTexts/index.d.ts +3 -3
- package/dist/data/clones/clones.schema.json +26 -27
- package/dist/data/clones/clones.zod.d.ts +24 -2
- package/dist/data/clones/clones.zod.js +1 -1
- package/dist/data/clones/index.d.ts +3 -3
- package/dist/data/countries/countries.schema.json +90 -91
- package/dist/data/countries/countries.zod.d.ts +88 -19
- package/dist/data/countries/countries.zod.js +138 -49
- package/dist/data/countriesAndLanguages/countriesAndLanguages.schema.json +8 -19
- package/dist/data/countriesAndLanguages/countriesAndLanguages.zod.d.ts +28 -2
- package/dist/data/countriesAndLanguages/index.d.ts +2 -2
- package/dist/data/crowdinLanguages/crowdinLanguages.schema.json +4 -13
- package/dist/data/crowdinLanguages/crowdinLanguages.zod.d.ts +13 -1
- package/dist/data/crowdinLanguages/index.d.ts +1 -1
- package/dist/data/curriculumFoundations/curriculumFoundations.schema.json +8 -16
- package/dist/data/curriculumFoundations/curriculumFoundations.zod.d.ts +10 -2
- package/dist/data/curriculumQuestions/curriculumQuestions.schema.json +13 -24
- package/dist/data/curriculumQuestions/curriculumQuestions.zod.d.ts +23 -3
- package/dist/data/curriculumTopics/curriculumTopics.schema.json +8 -16
- package/dist/data/curriculumTopics/curriculumTopics.zod.d.ts +10 -2
- package/dist/data/iosVoiceOverLanguages/iosVoiceOverLanguages.schema.json +2 -5
- package/dist/data/iosVoiceOverLanguages/iosVoiceOverLanguages.zod.d.ts +1 -1
- package/dist/data/iso6933LanguageCodes/iso6933LanguageCodes.schema.json +2 -8
- package/dist/data/iso6933LanguageCodes/iso6933LanguageCodes.zod.js +1 -1
- package/dist/data/languageAssets/languageAssets.json +37702 -0
- package/dist/data/languageAssets/languageAssets.schema.json +12 -15
- package/dist/data/languageAssets/languageAssets.zod.d.ts +1 -1
- package/dist/data/languageAssets/languageAssets.zod.js +43 -3
- package/dist/data/languages/index.d.ts +4 -8
- package/dist/data/languages/languages.json +1 -1
- package/dist/data/languages/languages.schema.json +89 -136
- package/dist/data/languages/languages.zod.d.ts +116 -194
- package/dist/data/languages/languages.zod.js +1 -7
- package/dist/data/mediaDurations/mediaDurations.schema.json +14 -21
- package/dist/data/mediaDurations/mediaDurations.zod.d.ts +1 -1
- package/dist/data/mediaDurations/mediaDurations.zod.js +41 -3
- package/dist/data/notification/notification.schema.json +57 -67
- package/dist/data/notification/notification.zod.d.ts +39 -15
- package/dist/data/notification/notification.zod.js +134 -4
- package/dist/data/numeralMaps/numeralMaps.schema.json +62 -62
- package/dist/data/numeralMaps/numeralMaps.zod.d.ts +46 -2
- package/dist/data/numeralMaps/numeralMaps.zod.js +64 -14
- package/dist/data/phoneLanguages/index.d.ts +1 -1
- package/dist/data/phoneLanguages/phoneLanguages.schema.json +8 -18
- package/dist/data/phoneLanguages/phoneLanguages.zod.d.ts +22 -2
- package/dist/data/questions/index.d.ts +1 -1
- package/dist/data/questions/questions.schema.json +11 -11
- package/dist/data/questions/questions.zod.d.ts +14 -6
- package/dist/data/releaseNotes/index.d.ts +1 -1
- package/dist/data/releaseNotes/releaseNotes.schema.json +11 -23
- package/dist/data/releaseNotes/releaseNotes.zod.d.ts +9 -1
- package/dist/data/releaseNotes/releaseNotes.zod.js +1 -1
- package/dist/data/screenshots/screenshots.schema.json +6 -12
- package/dist/data/screenshots/screenshots.zod.d.ts +5 -1
- package/dist/data/scripts/scripts.schema.json +4 -11
- package/dist/data/scripts/scripts.zod.d.ts +7 -1
- package/dist/data/sets/index.d.ts +2 -2
- package/dist/data/sets/sets.schema.json +22 -25
- package/dist/data/sets/sets.zod.d.ts +39 -61
- package/dist/data/specialIds/specialIds.schema.json +1 -5
- package/dist/data/specialIds/specialIds.zod.d.ts +41 -11
- package/dist/data/translationsApp/index.d.ts +9 -9
- package/dist/data/translationsApp/translationsApp.json +1 -0
- package/dist/data/translationsApp/translationsApp.schema.json +668 -667
- package/dist/data/translationsApp/translationsApp.zod.d.ts +631 -1
- package/dist/data/translationsApp/translationsApp.zod.js +2 -2
- package/dist/data/translationsFtb/translationsFtb.json +884 -0
- package/dist/data/translationsFtb/translationsFtb.schema.json +149 -147
- package/dist/data/translationsFtb/translationsFtb.zod.d.ts +135 -1
- package/dist/data/translationsFtb/translationsFtb.zod.js +1 -1
- package/dist/data/translationsIntroduction/translationsIntroduction.schema.json +18 -15
- package/dist/data/translationsIntroduction/translationsIntroduction.zod.d.ts +160 -2
- package/dist/data/translationsIntroduction/translationsIntroduction.zod.js +1 -1
- package/dist/data/translationsQuestion/translationsQuestion.json +480 -0
- package/dist/data/translationsQuestion/translationsQuestion.schema.json +14 -9
- package/dist/data/translationsQuestion/translationsQuestion.zod.js +1 -1
- package/dist/data/translationsSet/translationsSet.json +20694 -11135
- package/dist/data/translationsSet/translationsSet.schema.json +56 -52
- package/dist/data/translationsSet/translationsSet.zod.d.ts +19 -1
- package/dist/data/translationsSet/translationsSet.zod.js +4 -4
- package/dist/data/translationsSolarSpeaker/translationsSolarSpeaker.schema.json +100 -98
- package/dist/data/translationsSolarSpeaker/translationsSolarSpeaker.zod.d.ts +87 -1
- package/dist/data/translationsSolarSpeaker/translationsSolarSpeaker.zod.js +1 -1
- package/dist/data/translationsSpokenQuestion/translationsSpokenQuestion.json +480 -0
- package/dist/data/translationsSpokenQuestion/translationsSpokenQuestion.schema.json +23 -18
- package/dist/data/translationsSpokenQuestion/translationsSpokenQuestion.zod.js +1 -1
- package/dist/data/youtubePlaylists/youtubePlaylists.schema.json +2 -9
- package/dist/data/youtubePlaylists/youtubePlaylists.zod.js +1 -1
- package/dist/data/youtubeVideos/youtubeVideos.schema.json +2 -9
- package/dist/data/youtubeVideos/youtubeVideos.zod.js +1 -1
- package/dist/types/analytics.d.ts +1 -14
- package/dist/types/articles.d.ts +344 -94
- package/dist/types/articles.js +13 -13
- package/dist/types/bibleChapters.d.ts +91 -13
- package/dist/types/bibleChapters.js +1 -1
- package/dist/types/feedback.d.ts +41 -3
- package/dist/types/feedback.js +1 -1
- package/dist/types/microLessons.d.ts +869 -70
- package/dist/types/microLessons.js +29 -29
- package/dist/types/notifications.d.ts +119 -19
- package/dist/types/scripturePassages.d.ts +34 -4
- package/dist/types/users.d.ts +776 -221
- package/dist/types/users.js +1 -2
- package/dist/types/webContent.d.ts +20 -8
- package/package.json +3 -3
|
@@ -1,21 +1,45 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const Notification: z.ZodObject<{
|
|
3
|
-
title: z.ZodRecord<z.ZodString, z.ZodString
|
|
4
|
-
body: z.ZodRecord<z.ZodString, z.ZodString
|
|
3
|
+
title: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNever]>>, Record<string, string>, Record<string, string>>;
|
|
4
|
+
body: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNever]>>, Record<string, string>, Record<string, string>>;
|
|
5
5
|
actionUrl: z.ZodOptional<z.ZodString>;
|
|
6
|
-
countriesToNotSendTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
|
-
countriesToSendTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
|
-
faithJourney: z.ZodOptional<z.ZodEnum<
|
|
9
|
-
all: "all";
|
|
10
|
-
seekers: "seekers";
|
|
11
|
-
believers: "believers";
|
|
12
|
-
}>>;
|
|
6
|
+
countriesToNotSendTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
countriesToSendTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8
|
+
faithJourney: z.ZodOptional<z.ZodEnum<["all", "seekers", "believers"]>>;
|
|
13
9
|
imageUrl: z.ZodOptional<z.ZodString>;
|
|
14
|
-
meetLanguages: z.ZodOptional<z.ZodUnion<
|
|
10
|
+
meetLanguages: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodArray<z.ZodString, "many">]>>;
|
|
15
11
|
minCompletions: z.ZodOptional<z.ZodNumber>;
|
|
16
|
-
pushBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString
|
|
17
|
-
pushTitle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString
|
|
18
|
-
pushTokens: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
-
verified: z.ZodArray<z.ZodString>;
|
|
20
|
-
}, z.
|
|
12
|
+
pushBody: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNever]>>, Record<string, string>, Record<string, string>>>;
|
|
13
|
+
pushTitle: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNever]>>, Record<string, string>, Record<string, string>>>;
|
|
14
|
+
pushTokens: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15
|
+
verified: z.ZodArray<z.ZodString, "many">;
|
|
16
|
+
}, "strict", z.ZodTypeAny, {
|
|
17
|
+
title: Record<string, string>;
|
|
18
|
+
body: Record<string, string>;
|
|
19
|
+
verified: string[];
|
|
20
|
+
actionUrl?: string | undefined;
|
|
21
|
+
countriesToNotSendTo?: string[] | undefined;
|
|
22
|
+
countriesToSendTo?: string[] | undefined;
|
|
23
|
+
faithJourney?: "all" | "seekers" | "believers" | undefined;
|
|
24
|
+
imageUrl?: string | undefined;
|
|
25
|
+
meetLanguages?: string[] | "all" | undefined;
|
|
26
|
+
minCompletions?: number | undefined;
|
|
27
|
+
pushBody?: Record<string, string> | undefined;
|
|
28
|
+
pushTitle?: Record<string, string> | undefined;
|
|
29
|
+
pushTokens?: string[] | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
title: Record<string, string>;
|
|
32
|
+
body: Record<string, string>;
|
|
33
|
+
verified: string[];
|
|
34
|
+
actionUrl?: string | undefined;
|
|
35
|
+
countriesToNotSendTo?: string[] | undefined;
|
|
36
|
+
countriesToSendTo?: string[] | undefined;
|
|
37
|
+
faithJourney?: "all" | "seekers" | "believers" | undefined;
|
|
38
|
+
imageUrl?: string | undefined;
|
|
39
|
+
meetLanguages?: string[] | "all" | undefined;
|
|
40
|
+
minCompletions?: number | undefined;
|
|
41
|
+
pushBody?: Record<string, string> | undefined;
|
|
42
|
+
pushTitle?: Record<string, string> | undefined;
|
|
43
|
+
pushTokens?: string[] | undefined;
|
|
44
|
+
}>;
|
|
21
45
|
export type Notification = z.infer<typeof Notification>;
|
|
@@ -4,8 +4,74 @@ exports.Notification = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.Notification = zod_1.z
|
|
6
6
|
.object({
|
|
7
|
-
title: zod_1.z
|
|
8
|
-
|
|
7
|
+
title: zod_1.z
|
|
8
|
+
.record(zod_1.z.union([zod_1.z.string(), zod_1.z.never()]))
|
|
9
|
+
.superRefine((value, ctx) => {
|
|
10
|
+
for (const key in value) {
|
|
11
|
+
let evaluated = false;
|
|
12
|
+
if (key.match(new RegExp('^[a-z]{3}$'))) {
|
|
13
|
+
evaluated = true;
|
|
14
|
+
const result = zod_1.z.string().safeParse(value[key]);
|
|
15
|
+
if (!result.success) {
|
|
16
|
+
ctx.addIssue({
|
|
17
|
+
path: [...ctx.path, key],
|
|
18
|
+
code: 'custom',
|
|
19
|
+
message: `Invalid input: Key matching regex /${key}/ must match schema`,
|
|
20
|
+
params: {
|
|
21
|
+
issues: result.error.issues,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (!evaluated) {
|
|
27
|
+
const result = zod_1.z.never().safeParse(value[key]);
|
|
28
|
+
if (!result.success) {
|
|
29
|
+
ctx.addIssue({
|
|
30
|
+
path: [...ctx.path, key],
|
|
31
|
+
code: 'custom',
|
|
32
|
+
message: `Invalid input: must match catchall schema`,
|
|
33
|
+
params: {
|
|
34
|
+
issues: result.error.issues,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}),
|
|
41
|
+
body: zod_1.z
|
|
42
|
+
.record(zod_1.z.union([zod_1.z.string(), zod_1.z.never()]))
|
|
43
|
+
.superRefine((value, ctx) => {
|
|
44
|
+
for (const key in value) {
|
|
45
|
+
let evaluated = false;
|
|
46
|
+
if (key.match(new RegExp('^[a-z]{3}$'))) {
|
|
47
|
+
evaluated = true;
|
|
48
|
+
const result = zod_1.z.string().safeParse(value[key]);
|
|
49
|
+
if (!result.success) {
|
|
50
|
+
ctx.addIssue({
|
|
51
|
+
path: [...ctx.path, key],
|
|
52
|
+
code: 'custom',
|
|
53
|
+
message: `Invalid input: Key matching regex /${key}/ must match schema`,
|
|
54
|
+
params: {
|
|
55
|
+
issues: result.error.issues,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (!evaluated) {
|
|
61
|
+
const result = zod_1.z.never().safeParse(value[key]);
|
|
62
|
+
if (!result.success) {
|
|
63
|
+
ctx.addIssue({
|
|
64
|
+
path: [...ctx.path, key],
|
|
65
|
+
code: 'custom',
|
|
66
|
+
message: `Invalid input: must match catchall schema`,
|
|
67
|
+
params: {
|
|
68
|
+
issues: result.error.issues,
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}),
|
|
9
75
|
actionUrl: zod_1.z
|
|
10
76
|
.string()
|
|
11
77
|
.regex(new RegExp('^(https://|waha://).+$'))
|
|
@@ -30,10 +96,74 @@ exports.Notification = zod_1.z
|
|
|
30
96
|
.optional(),
|
|
31
97
|
minCompletions: zod_1.z.number().int().optional(),
|
|
32
98
|
pushBody: zod_1.z
|
|
33
|
-
.record(zod_1.z.
|
|
99
|
+
.record(zod_1.z.union([zod_1.z.string(), zod_1.z.never()]))
|
|
100
|
+
.superRefine((value, ctx) => {
|
|
101
|
+
for (const key in value) {
|
|
102
|
+
let evaluated = false;
|
|
103
|
+
if (key.match(new RegExp('^[a-z]{3}$'))) {
|
|
104
|
+
evaluated = true;
|
|
105
|
+
const result = zod_1.z.string().safeParse(value[key]);
|
|
106
|
+
if (!result.success) {
|
|
107
|
+
ctx.addIssue({
|
|
108
|
+
path: [...ctx.path, key],
|
|
109
|
+
code: 'custom',
|
|
110
|
+
message: `Invalid input: Key matching regex /${key}/ must match schema`,
|
|
111
|
+
params: {
|
|
112
|
+
issues: result.error.issues,
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (!evaluated) {
|
|
118
|
+
const result = zod_1.z.never().safeParse(value[key]);
|
|
119
|
+
if (!result.success) {
|
|
120
|
+
ctx.addIssue({
|
|
121
|
+
path: [...ctx.path, key],
|
|
122
|
+
code: 'custom',
|
|
123
|
+
message: `Invalid input: must match catchall schema`,
|
|
124
|
+
params: {
|
|
125
|
+
issues: result.error.issues,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
})
|
|
34
132
|
.optional(),
|
|
35
133
|
pushTitle: zod_1.z
|
|
36
|
-
.record(zod_1.z.
|
|
134
|
+
.record(zod_1.z.union([zod_1.z.string(), zod_1.z.never()]))
|
|
135
|
+
.superRefine((value, ctx) => {
|
|
136
|
+
for (const key in value) {
|
|
137
|
+
let evaluated = false;
|
|
138
|
+
if (key.match(new RegExp('^[a-z]{3}$'))) {
|
|
139
|
+
evaluated = true;
|
|
140
|
+
const result = zod_1.z.string().safeParse(value[key]);
|
|
141
|
+
if (!result.success) {
|
|
142
|
+
ctx.addIssue({
|
|
143
|
+
path: [...ctx.path, key],
|
|
144
|
+
code: 'custom',
|
|
145
|
+
message: `Invalid input: Key matching regex /${key}/ must match schema`,
|
|
146
|
+
params: {
|
|
147
|
+
issues: result.error.issues,
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (!evaluated) {
|
|
153
|
+
const result = zod_1.z.never().safeParse(value[key]);
|
|
154
|
+
if (!result.success) {
|
|
155
|
+
ctx.addIssue({
|
|
156
|
+
path: [...ctx.path, key],
|
|
157
|
+
code: 'custom',
|
|
158
|
+
message: `Invalid input: must match catchall schema`,
|
|
159
|
+
params: {
|
|
160
|
+
issues: result.error.issues,
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
})
|
|
37
167
|
.optional(),
|
|
38
168
|
pushTokens: zod_1.z
|
|
39
169
|
.array(zod_1.z.string())
|
|
@@ -6,71 +6,71 @@
|
|
|
6
6
|
"type": "string"
|
|
7
7
|
},
|
|
8
8
|
"data": {
|
|
9
|
-
"
|
|
9
|
+
"title": "Numeral Maps",
|
|
10
|
+
"description": "Maps of numeral systems with digits 0-9 to their corresponding characters",
|
|
10
11
|
"type": "object",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
12
|
+
"patternProperties": {
|
|
13
|
+
"^.*$": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"description": "A numeral system mapping",
|
|
16
|
+
"properties": {
|
|
17
|
+
"0": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Character representation of digit 0"
|
|
20
|
+
},
|
|
21
|
+
"1": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Character representation of digit 1"
|
|
24
|
+
},
|
|
25
|
+
"2": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Character representation of digit 2"
|
|
28
|
+
},
|
|
29
|
+
"3": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Character representation of digit 3"
|
|
32
|
+
},
|
|
33
|
+
"4": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Character representation of digit 4"
|
|
36
|
+
},
|
|
37
|
+
"5": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Character representation of digit 5"
|
|
40
|
+
},
|
|
41
|
+
"6": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "Character representation of digit 6"
|
|
44
|
+
},
|
|
45
|
+
"7": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "Character representation of digit 7"
|
|
48
|
+
},
|
|
49
|
+
"8": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "Character representation of digit 8"
|
|
52
|
+
},
|
|
53
|
+
"9": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "Character representation of digit 9"
|
|
56
|
+
}
|
|
52
57
|
},
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
"8",
|
|
68
|
-
"9"
|
|
69
|
-
],
|
|
70
|
-
"additionalProperties": false,
|
|
71
|
-
"description": "A numeral system mapping"
|
|
58
|
+
"required": [
|
|
59
|
+
"0",
|
|
60
|
+
"1",
|
|
61
|
+
"2",
|
|
62
|
+
"3",
|
|
63
|
+
"4",
|
|
64
|
+
"5",
|
|
65
|
+
"6",
|
|
66
|
+
"7",
|
|
67
|
+
"8",
|
|
68
|
+
"9"
|
|
69
|
+
],
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
}
|
|
72
72
|
},
|
|
73
|
-
"
|
|
73
|
+
"additionalProperties": false
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"required": [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const NumeralMaps: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2
|
+
export declare const NumeralMaps: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
3
3
|
'0': z.ZodString;
|
|
4
4
|
'1': z.ZodString;
|
|
5
5
|
'2': z.ZodString;
|
|
@@ -10,5 +10,49 @@ export declare const NumeralMaps: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
10
10
|
'7': z.ZodString;
|
|
11
11
|
'8': z.ZodString;
|
|
12
12
|
'9': z.ZodString;
|
|
13
|
-
}, z.
|
|
13
|
+
}, "strict", z.ZodTypeAny, {
|
|
14
|
+
'0': string;
|
|
15
|
+
'1': string;
|
|
16
|
+
'2': string;
|
|
17
|
+
'3': string;
|
|
18
|
+
'4': string;
|
|
19
|
+
'5': string;
|
|
20
|
+
'6': string;
|
|
21
|
+
'7': string;
|
|
22
|
+
'8': string;
|
|
23
|
+
'9': string;
|
|
24
|
+
}, {
|
|
25
|
+
'0': string;
|
|
26
|
+
'1': string;
|
|
27
|
+
'2': string;
|
|
28
|
+
'3': string;
|
|
29
|
+
'4': string;
|
|
30
|
+
'5': string;
|
|
31
|
+
'6': string;
|
|
32
|
+
'7': string;
|
|
33
|
+
'8': string;
|
|
34
|
+
'9': string;
|
|
35
|
+
}>, z.ZodNever]>>, Record<string, {
|
|
36
|
+
'0': string;
|
|
37
|
+
'1': string;
|
|
38
|
+
'2': string;
|
|
39
|
+
'3': string;
|
|
40
|
+
'4': string;
|
|
41
|
+
'5': string;
|
|
42
|
+
'6': string;
|
|
43
|
+
'7': string;
|
|
44
|
+
'8': string;
|
|
45
|
+
'9': string;
|
|
46
|
+
}>, Record<string, {
|
|
47
|
+
'0': string;
|
|
48
|
+
'1': string;
|
|
49
|
+
'2': string;
|
|
50
|
+
'3': string;
|
|
51
|
+
'4': string;
|
|
52
|
+
'5': string;
|
|
53
|
+
'6': string;
|
|
54
|
+
'7': string;
|
|
55
|
+
'8': string;
|
|
56
|
+
'9': string;
|
|
57
|
+
}>>;
|
|
14
58
|
export type NumeralMaps = z.infer<typeof NumeralMaps>;
|
|
@@ -3,19 +3,69 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NumeralMaps = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.NumeralMaps = zod_1.z
|
|
6
|
-
.record(zod_1.z.
|
|
7
|
-
.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
.record(zod_1.z.union([
|
|
7
|
+
zod_1.z
|
|
8
|
+
.object({
|
|
9
|
+
'0': zod_1.z.string().describe('Character representation of digit 0'),
|
|
10
|
+
'1': zod_1.z.string().describe('Character representation of digit 1'),
|
|
11
|
+
'2': zod_1.z.string().describe('Character representation of digit 2'),
|
|
12
|
+
'3': zod_1.z.string().describe('Character representation of digit 3'),
|
|
13
|
+
'4': zod_1.z.string().describe('Character representation of digit 4'),
|
|
14
|
+
'5': zod_1.z.string().describe('Character representation of digit 5'),
|
|
15
|
+
'6': zod_1.z.string().describe('Character representation of digit 6'),
|
|
16
|
+
'7': zod_1.z.string().describe('Character representation of digit 7'),
|
|
17
|
+
'8': zod_1.z.string().describe('Character representation of digit 8'),
|
|
18
|
+
'9': zod_1.z.string().describe('Character representation of digit 9'),
|
|
19
|
+
})
|
|
20
|
+
.strict()
|
|
21
|
+
.describe('A numeral system mapping'),
|
|
22
|
+
zod_1.z.never(),
|
|
23
|
+
]))
|
|
24
|
+
.superRefine((value, ctx) => {
|
|
25
|
+
for (const key in value) {
|
|
26
|
+
let evaluated = false;
|
|
27
|
+
if (key.match(new RegExp('^.*$'))) {
|
|
28
|
+
evaluated = true;
|
|
29
|
+
const result = zod_1.z
|
|
30
|
+
.object({
|
|
31
|
+
'0': zod_1.z.string().describe('Character representation of digit 0'),
|
|
32
|
+
'1': zod_1.z.string().describe('Character representation of digit 1'),
|
|
33
|
+
'2': zod_1.z.string().describe('Character representation of digit 2'),
|
|
34
|
+
'3': zod_1.z.string().describe('Character representation of digit 3'),
|
|
35
|
+
'4': zod_1.z.string().describe('Character representation of digit 4'),
|
|
36
|
+
'5': zod_1.z.string().describe('Character representation of digit 5'),
|
|
37
|
+
'6': zod_1.z.string().describe('Character representation of digit 6'),
|
|
38
|
+
'7': zod_1.z.string().describe('Character representation of digit 7'),
|
|
39
|
+
'8': zod_1.z.string().describe('Character representation of digit 8'),
|
|
40
|
+
'9': zod_1.z.string().describe('Character representation of digit 9'),
|
|
41
|
+
})
|
|
42
|
+
.strict()
|
|
43
|
+
.describe('A numeral system mapping')
|
|
44
|
+
.safeParse(value[key]);
|
|
45
|
+
if (!result.success) {
|
|
46
|
+
ctx.addIssue({
|
|
47
|
+
path: [...ctx.path, key],
|
|
48
|
+
code: 'custom',
|
|
49
|
+
message: `Invalid input: Key matching regex /${key}/ must match schema`,
|
|
50
|
+
params: {
|
|
51
|
+
issues: result.error.issues,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (!evaluated) {
|
|
57
|
+
const result = zod_1.z.never().safeParse(value[key]);
|
|
58
|
+
if (!result.success) {
|
|
59
|
+
ctx.addIssue({
|
|
60
|
+
path: [...ctx.path, key],
|
|
61
|
+
code: 'custom',
|
|
62
|
+
message: `Invalid input: must match catchall schema`,
|
|
63
|
+
params: {
|
|
64
|
+
issues: result.error.issues,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
18
70
|
})
|
|
19
|
-
.strict()
|
|
20
|
-
.describe('A numeral system mapping'))
|
|
21
71
|
.describe('Maps of numeral systems with digits 0-9 to their corresponding characters');
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"type": "string"
|
|
7
7
|
},
|
|
8
8
|
"data": {
|
|
9
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10
9
|
"type": "array",
|
|
11
10
|
"items": {
|
|
12
11
|
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
13
|
"properties": {
|
|
14
14
|
"twoLetterId": {
|
|
15
15
|
"type": "string",
|
|
@@ -21,8 +21,10 @@
|
|
|
21
21
|
},
|
|
22
22
|
"alternatives": {
|
|
23
23
|
"type": "array",
|
|
24
|
+
"description": "Alternative language options that can be used for this phone language",
|
|
24
25
|
"items": {
|
|
25
26
|
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
26
28
|
"properties": {
|
|
27
29
|
"exonym": {
|
|
28
30
|
"type": "string",
|
|
@@ -33,26 +35,14 @@
|
|
|
33
35
|
"description": "Three-letter ISO 639-3 language code"
|
|
34
36
|
}
|
|
35
37
|
},
|
|
36
|
-
"required": [
|
|
37
|
-
|
|
38
|
-
"threeLetterId"
|
|
39
|
-
],
|
|
40
|
-
"additionalProperties": false
|
|
41
|
-
},
|
|
42
|
-
"description": "Alternative language options that can be used for this phone language"
|
|
38
|
+
"required": ["exonym", "threeLetterId"]
|
|
39
|
+
}
|
|
43
40
|
}
|
|
44
41
|
},
|
|
45
|
-
"required": [
|
|
46
|
-
"twoLetterId",
|
|
47
|
-
"exonym",
|
|
48
|
-
"alternatives"
|
|
49
|
-
],
|
|
50
|
-
"additionalProperties": false
|
|
42
|
+
"required": ["twoLetterId", "exonym", "alternatives"]
|
|
51
43
|
}
|
|
52
44
|
}
|
|
53
45
|
},
|
|
54
|
-
"required": [
|
|
55
|
-
|
|
56
|
-
"data"
|
|
57
|
-
]
|
|
46
|
+
"required": ["data"],
|
|
47
|
+
"description": "Mapping of phone language codes to alternative language options"
|
|
58
48
|
}
|
|
@@ -5,6 +5,26 @@ export declare const PhoneLanguages: z.ZodArray<z.ZodObject<{
|
|
|
5
5
|
alternatives: z.ZodArray<z.ZodObject<{
|
|
6
6
|
exonym: z.ZodString;
|
|
7
7
|
threeLetterId: z.ZodString;
|
|
8
|
-
}, z.
|
|
9
|
-
|
|
8
|
+
}, "strict", z.ZodTypeAny, {
|
|
9
|
+
exonym: string;
|
|
10
|
+
threeLetterId: string;
|
|
11
|
+
}, {
|
|
12
|
+
exonym: string;
|
|
13
|
+
threeLetterId: string;
|
|
14
|
+
}>, "many">;
|
|
15
|
+
}, "strict", z.ZodTypeAny, {
|
|
16
|
+
exonym: string;
|
|
17
|
+
twoLetterId: string;
|
|
18
|
+
alternatives: {
|
|
19
|
+
exonym: string;
|
|
20
|
+
threeLetterId: string;
|
|
21
|
+
}[];
|
|
22
|
+
}, {
|
|
23
|
+
exonym: string;
|
|
24
|
+
twoLetterId: string;
|
|
25
|
+
alternatives: {
|
|
26
|
+
exonym: string;
|
|
27
|
+
threeLetterId: string;
|
|
28
|
+
}[];
|
|
29
|
+
}>, "many">;
|
|
10
30
|
export type PhoneLanguages = z.infer<typeof PhoneLanguages>;
|
|
@@ -6,33 +6,32 @@
|
|
|
6
6
|
"type": "string"
|
|
7
7
|
},
|
|
8
8
|
"data": {
|
|
9
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10
|
-
"type": "array",
|
|
11
9
|
"items": {
|
|
12
|
-
"type": "object",
|
|
13
10
|
"properties": {
|
|
14
11
|
"questionId": {
|
|
15
12
|
"type": "string"
|
|
16
13
|
},
|
|
17
14
|
"name": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
15
|
+
"description": "A shorthand name for the question so the question can be identified more easily.",
|
|
16
|
+
"type": "string"
|
|
20
17
|
},
|
|
21
18
|
"comment": {
|
|
22
19
|
"type": "string"
|
|
23
20
|
},
|
|
24
21
|
"hasBeep": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
22
|
+
"description": "Whether or not the question should have a beep after, which indicates whether or not the group should pause and discuss.",
|
|
23
|
+
"type": "boolean"
|
|
27
24
|
},
|
|
28
25
|
"music": {
|
|
29
|
-
"
|
|
26
|
+
"description": "The type of music used for the question. All types use the same music file. This determines where the music will be in the question and for how long.",
|
|
30
27
|
"enum": [
|
|
31
28
|
"outroLong",
|
|
32
29
|
"outroShort",
|
|
33
30
|
"intro"
|
|
34
31
|
],
|
|
35
|
-
"
|
|
32
|
+
"type": [
|
|
33
|
+
"string"
|
|
34
|
+
]
|
|
36
35
|
}
|
|
37
36
|
},
|
|
38
37
|
"required": [
|
|
@@ -41,8 +40,9 @@
|
|
|
41
40
|
"comment",
|
|
42
41
|
"hasBeep"
|
|
43
42
|
],
|
|
44
|
-
"
|
|
45
|
-
}
|
|
43
|
+
"type": "object"
|
|
44
|
+
},
|
|
45
|
+
"type": "array"
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"required": [
|