waha-shared 1.0.42 → 1.0.43
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.
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { BibleChapter, BibleChapters } from '../types/bibleChapters';
|
|
2
2
|
import type { LanguageInfo } from '../types/languages';
|
|
3
|
-
|
|
4
|
-
passageId: string;
|
|
5
|
-
bibleId: string;
|
|
6
|
-
header: string;
|
|
7
|
-
verses: BibleChapter['verses'][number][];
|
|
8
|
-
}
|
|
3
|
+
import { ScripturePassage } from '../types/scripturePassages';
|
|
9
4
|
/**
|
|
10
5
|
* Condenses a list of USFM passage IDs into a readable string format. Groups
|
|
11
6
|
* consecutive passages from the same book together.
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const BibleVerse: z.ZodObject<{
|
|
3
|
+
text: z.ZodString;
|
|
4
|
+
timings: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodNull]>>;
|
|
5
|
+
uroman: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
6
|
+
verseId: z.ZodString;
|
|
7
|
+
}, "strict", z.ZodTypeAny, {
|
|
8
|
+
verseId: string;
|
|
9
|
+
text: string;
|
|
10
|
+
timings?: [number, number] | null | undefined;
|
|
11
|
+
uroman?: string | null | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
verseId: string;
|
|
14
|
+
text: string;
|
|
15
|
+
timings?: [number, number] | null | undefined;
|
|
16
|
+
uroman?: string | null | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export type BibleVerse = z.infer<typeof BibleVerse>;
|
|
2
19
|
export declare const BibleChapter: z.ZodObject<{
|
|
3
20
|
bookName: z.ZodString;
|
|
4
21
|
chapterId: z.ZodString;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BibleChapters = exports.BibleChapter = void 0;
|
|
3
|
+
exports.BibleChapters = exports.BibleChapter = exports.BibleVerse = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
exports.BibleVerse = zod_1.z
|
|
6
|
+
.object({
|
|
7
|
+
text: zod_1.z.string(),
|
|
8
|
+
timings: zod_1.z.union([zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()]), zod_1.z.null()]).optional(),
|
|
9
|
+
uroman: zod_1.z.union([zod_1.z.string(), zod_1.z.null()]).optional(),
|
|
10
|
+
verseId: zod_1.z
|
|
11
|
+
.string()
|
|
12
|
+
.regex(new RegExp('^(GEN|EXO|LEV|NUM|DEU|JOS|JDG|RUT|1SA|2SA|1KI|2KI|1CH|2CH|EZR|NEH|EST|JOB|PSA|PRO|ECC|SNG|ISA|JER|LAM|EZK|DAN|HOS|JOL|AMO|OBA|JON|MIC|NAM|HAB|ZEP|HAG|ZEC|MAL|MAT|MRK|LUK|JHN|ACT|ROM|1CO|2CO|GAL|EPH|PHP|COL|1TH|2TH|1TI|2TI|TIT|PHM|HEB|JAS|1PE|2PE|1JN|2JN|3JN|JUD|REV)\\.[0-9]+\\.[0-9]+(-[0-9]+)?$')),
|
|
13
|
+
})
|
|
14
|
+
.strict();
|
|
5
15
|
exports.BibleChapter = zod_1.z
|
|
6
16
|
.object({
|
|
7
17
|
bookName: zod_1.z.string(),
|
|
@@ -11,20 +21,7 @@ exports.BibleChapter = zod_1.z
|
|
|
11
21
|
reference: zod_1.z.string().optional(),
|
|
12
22
|
titles: zod_1.z.union([zod_1.z.record(zod_1.z.string()), zod_1.z.null()]).optional(),
|
|
13
23
|
translationId: zod_1.z.string(),
|
|
14
|
-
verses: zod_1.z
|
|
15
|
-
.array(zod_1.z
|
|
16
|
-
.object({
|
|
17
|
-
text: zod_1.z.string(),
|
|
18
|
-
timings: zod_1.z
|
|
19
|
-
.union([zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()]), zod_1.z.null()])
|
|
20
|
-
.optional(),
|
|
21
|
-
uroman: zod_1.z.union([zod_1.z.string(), zod_1.z.null()]).optional(),
|
|
22
|
-
verseId: zod_1.z
|
|
23
|
-
.string()
|
|
24
|
-
.regex(new RegExp('^(GEN|EXO|LEV|NUM|DEU|JOS|JDG|RUT|1SA|2SA|1KI|2KI|1CH|2CH|EZR|NEH|EST|JOB|PSA|PRO|ECC|SNG|ISA|JER|LAM|EZK|DAN|HOS|JOL|AMO|OBA|JON|MIC|NAM|HAB|ZEP|HAG|ZEC|MAL|MAT|MRK|LUK|JHN|ACT|ROM|1CO|2CO|GAL|EPH|PHP|COL|1TH|2TH|1TI|2TI|TIT|PHM|HEB|JAS|1PE|2PE|1JN|2JN|3JN|JUD|REV)\\.[0-9]+\\.[0-9]+(-[0-9]+)?$')),
|
|
25
|
-
})
|
|
26
|
-
.strict())
|
|
27
|
-
.min(1),
|
|
24
|
+
verses: zod_1.z.array(exports.BibleVerse).min(1),
|
|
28
25
|
})
|
|
29
26
|
.strict();
|
|
30
27
|
exports.BibleChapters = zod_1.z.array(exports.BibleChapter);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
export declare const ScripturePassageSchema: z.ZodObject<{
|
|
3
|
+
passageId: z.ZodString;
|
|
4
|
+
bibleId: z.ZodString;
|
|
5
|
+
header: z.ZodString;
|
|
6
|
+
verses: z.ZodArray<z.ZodObject<{
|
|
7
|
+
text: z.ZodString;
|
|
8
|
+
timings: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodNull]>>;
|
|
9
|
+
uroman: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
10
|
+
verseId: z.ZodString;
|
|
11
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
verseId: string;
|
|
13
|
+
text: string;
|
|
14
|
+
timings?: [number, number] | null | undefined;
|
|
15
|
+
uroman?: string | null | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
verseId: string;
|
|
18
|
+
text: string;
|
|
19
|
+
timings?: [number, number] | null | undefined;
|
|
20
|
+
uroman?: string | null | undefined;
|
|
21
|
+
}>, "many">;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
verses: {
|
|
24
|
+
verseId: string;
|
|
25
|
+
text: string;
|
|
26
|
+
timings?: [number, number] | null | undefined;
|
|
27
|
+
uroman?: string | null | undefined;
|
|
28
|
+
}[];
|
|
29
|
+
passageId: string;
|
|
30
|
+
bibleId: string;
|
|
31
|
+
header: string;
|
|
32
|
+
}, {
|
|
33
|
+
verses: {
|
|
34
|
+
verseId: string;
|
|
35
|
+
text: string;
|
|
36
|
+
timings?: [number, number] | null | undefined;
|
|
37
|
+
uroman?: string | null | undefined;
|
|
38
|
+
}[];
|
|
39
|
+
passageId: string;
|
|
40
|
+
bibleId: string;
|
|
41
|
+
header: string;
|
|
42
|
+
}>;
|
|
43
|
+
export type ScripturePassage = z.infer<typeof ScripturePassageSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ScripturePassageSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const bibleChapters_1 = require("./bibleChapters");
|
|
9
|
+
exports.ScripturePassageSchema = zod_1.default.object({
|
|
10
|
+
passageId: zod_1.default.string(),
|
|
11
|
+
bibleId: zod_1.default.string(),
|
|
12
|
+
header: zod_1.default.string(),
|
|
13
|
+
verses: zod_1.default.array(bibleChapters_1.BibleVerse),
|
|
14
|
+
});
|