@youversion/platform-react-ui 1.10.0 → 1.12.0
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/index.cjs +506 -291
- package/dist/index.js +506 -291
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -575,12 +575,12 @@ var NEVER = Object.freeze({
|
|
|
575
575
|
// @__NO_SIDE_EFFECTS__
|
|
576
576
|
function $constructor(name, initializer3, params) {
|
|
577
577
|
function init(inst, def) {
|
|
578
|
-
var
|
|
578
|
+
var _a4;
|
|
579
579
|
Object.defineProperty(inst, "_zod", {
|
|
580
580
|
value: inst._zod ?? {},
|
|
581
581
|
enumerable: false
|
|
582
582
|
});
|
|
583
|
-
(
|
|
583
|
+
(_a4 = inst._zod).traits ?? (_a4.traits = /* @__PURE__ */ new Set());
|
|
584
584
|
inst._zod.traits.add(name);
|
|
585
585
|
initializer3(inst, def);
|
|
586
586
|
for (const k in _.prototype) {
|
|
@@ -595,10 +595,10 @@ function $constructor(name, initializer3, params) {
|
|
|
595
595
|
}
|
|
596
596
|
Object.defineProperty(Definition, "name", { value: name });
|
|
597
597
|
function _(def) {
|
|
598
|
-
var
|
|
598
|
+
var _a4;
|
|
599
599
|
const inst = params?.Parent ? new Definition() : this;
|
|
600
600
|
init(inst, def);
|
|
601
|
-
(
|
|
601
|
+
(_a4 = inst._zod).deferred ?? (_a4.deferred = []);
|
|
602
602
|
for (const fn of inst._zod.deferred) {
|
|
603
603
|
fn();
|
|
604
604
|
}
|
|
@@ -1171,8 +1171,8 @@ function aborted(x, startIndex = 0) {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
function prefixIssues(path, issues) {
|
|
1173
1173
|
return issues.map((iss) => {
|
|
1174
|
-
var
|
|
1175
|
-
(
|
|
1174
|
+
var _a4;
|
|
1175
|
+
(_a4 = iss).path ?? (_a4.path = []);
|
|
1176
1176
|
iss.path.unshift(path);
|
|
1177
1177
|
return iss;
|
|
1178
1178
|
});
|
|
@@ -1336,7 +1336,7 @@ function formatError(error46, mapper = (issue2) => issue2.message) {
|
|
|
1336
1336
|
function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
1337
1337
|
const result = { errors: [] };
|
|
1338
1338
|
const processError = (error47, path = []) => {
|
|
1339
|
-
var
|
|
1339
|
+
var _a4, _b;
|
|
1340
1340
|
for (const issue2 of error47.issues) {
|
|
1341
1341
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1342
1342
|
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
@@ -1357,7 +1357,7 @@ function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
|
1357
1357
|
const terminal = i === fullpath.length - 1;
|
|
1358
1358
|
if (typeof el === "string") {
|
|
1359
1359
|
curr.properties ?? (curr.properties = {});
|
|
1360
|
-
(
|
|
1360
|
+
(_a4 = curr.properties)[el] ?? (_a4[el] = { errors: [] });
|
|
1361
1361
|
curr = curr.properties[el];
|
|
1362
1362
|
} else {
|
|
1363
1363
|
curr.items ?? (curr.items = []);
|
|
@@ -1646,10 +1646,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
1646
1646
|
|
|
1647
1647
|
// ../../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.js
|
|
1648
1648
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
1649
|
-
var
|
|
1649
|
+
var _a4;
|
|
1650
1650
|
inst._zod ?? (inst._zod = {});
|
|
1651
1651
|
inst._zod.def = def;
|
|
1652
|
-
(
|
|
1652
|
+
(_a4 = inst._zod).onattach ?? (_a4.onattach = []);
|
|
1653
1653
|
});
|
|
1654
1654
|
var numericOriginMap = {
|
|
1655
1655
|
number: "number",
|
|
@@ -1715,8 +1715,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
1715
1715
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1716
1716
|
$ZodCheck.init(inst, def);
|
|
1717
1717
|
inst._zod.onattach.push((inst2) => {
|
|
1718
|
-
var
|
|
1719
|
-
(
|
|
1718
|
+
var _a4;
|
|
1719
|
+
(_a4 = inst2._zod.bag).multipleOf ?? (_a4.multipleOf = def.value);
|
|
1720
1720
|
});
|
|
1721
1721
|
inst._zod.check = (payload) => {
|
|
1722
1722
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -1843,9 +1843,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1843
1843
|
};
|
|
1844
1844
|
});
|
|
1845
1845
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1846
|
-
var
|
|
1846
|
+
var _a4;
|
|
1847
1847
|
$ZodCheck.init(inst, def);
|
|
1848
|
-
(
|
|
1848
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1849
1849
|
const val = payload.value;
|
|
1850
1850
|
return !nullish(val) && val.size !== void 0;
|
|
1851
1851
|
});
|
|
@@ -1871,9 +1871,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
1871
1871
|
};
|
|
1872
1872
|
});
|
|
1873
1873
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1874
|
-
var
|
|
1874
|
+
var _a4;
|
|
1875
1875
|
$ZodCheck.init(inst, def);
|
|
1876
|
-
(
|
|
1876
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1877
1877
|
const val = payload.value;
|
|
1878
1878
|
return !nullish(val) && val.size !== void 0;
|
|
1879
1879
|
});
|
|
@@ -1899,9 +1899,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
1899
1899
|
};
|
|
1900
1900
|
});
|
|
1901
1901
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
1902
|
-
var
|
|
1902
|
+
var _a4;
|
|
1903
1903
|
$ZodCheck.init(inst, def);
|
|
1904
|
-
(
|
|
1904
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1905
1905
|
const val = payload.value;
|
|
1906
1906
|
return !nullish(val) && val.size !== void 0;
|
|
1907
1907
|
});
|
|
@@ -1929,9 +1929,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
1929
1929
|
};
|
|
1930
1930
|
});
|
|
1931
1931
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1932
|
-
var
|
|
1932
|
+
var _a4;
|
|
1933
1933
|
$ZodCheck.init(inst, def);
|
|
1934
|
-
(
|
|
1934
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1935
1935
|
const val = payload.value;
|
|
1936
1936
|
return !nullish(val) && val.length !== void 0;
|
|
1937
1937
|
});
|
|
@@ -1958,9 +1958,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
1958
1958
|
};
|
|
1959
1959
|
});
|
|
1960
1960
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
1961
|
-
var
|
|
1961
|
+
var _a4;
|
|
1962
1962
|
$ZodCheck.init(inst, def);
|
|
1963
|
-
(
|
|
1963
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1964
1964
|
const val = payload.value;
|
|
1965
1965
|
return !nullish(val) && val.length !== void 0;
|
|
1966
1966
|
});
|
|
@@ -1987,9 +1987,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
1987
1987
|
};
|
|
1988
1988
|
});
|
|
1989
1989
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
1990
|
-
var
|
|
1990
|
+
var _a4;
|
|
1991
1991
|
$ZodCheck.init(inst, def);
|
|
1992
|
-
(
|
|
1992
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1993
1993
|
const val = payload.value;
|
|
1994
1994
|
return !nullish(val) && val.length !== void 0;
|
|
1995
1995
|
});
|
|
@@ -2018,7 +2018,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2018
2018
|
};
|
|
2019
2019
|
});
|
|
2020
2020
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2021
|
-
var
|
|
2021
|
+
var _a4, _b;
|
|
2022
2022
|
$ZodCheck.init(inst, def);
|
|
2023
2023
|
inst._zod.onattach.push((inst2) => {
|
|
2024
2024
|
const bag = inst2._zod.bag;
|
|
@@ -2029,7 +2029,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
2029
2029
|
}
|
|
2030
2030
|
});
|
|
2031
2031
|
if (def.pattern)
|
|
2032
|
-
(
|
|
2032
|
+
(_a4 = inst._zod).check ?? (_a4.check = (payload) => {
|
|
2033
2033
|
def.pattern.lastIndex = 0;
|
|
2034
2034
|
if (def.pattern.test(payload.value))
|
|
2035
2035
|
return;
|
|
@@ -2231,7 +2231,7 @@ var version = {
|
|
|
2231
2231
|
|
|
2232
2232
|
// ../../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.js
|
|
2233
2233
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2234
|
-
var
|
|
2234
|
+
var _a4;
|
|
2235
2235
|
inst ?? (inst = {});
|
|
2236
2236
|
inst._zod.def = def;
|
|
2237
2237
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2246,7 +2246,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
2248
2248
|
if (checks.length === 0) {
|
|
2249
|
-
(
|
|
2249
|
+
(_a4 = inst._zod).deferred ?? (_a4.deferred = []);
|
|
2250
2250
|
inst._zod.deferred?.push(() => {
|
|
2251
2251
|
inst._zod.run = inst._zod.parse;
|
|
2252
2252
|
});
|
|
@@ -10687,7 +10687,7 @@ var JSONSchemaGenerator = class {
|
|
|
10687
10687
|
this.seen = /* @__PURE__ */ new Map();
|
|
10688
10688
|
}
|
|
10689
10689
|
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
10690
|
-
var
|
|
10690
|
+
var _a4;
|
|
10691
10691
|
const def = schema._zod.def;
|
|
10692
10692
|
const formatMap = {
|
|
10693
10693
|
guid: "uuid",
|
|
@@ -11196,7 +11196,7 @@ var JSONSchemaGenerator = class {
|
|
|
11196
11196
|
delete result.schema.default;
|
|
11197
11197
|
}
|
|
11198
11198
|
if (this.io === "input" && result.schema._prefault)
|
|
11199
|
-
(
|
|
11199
|
+
(_a4 = result.schema).default ?? (_a4.default = result.schema._prefault);
|
|
11200
11200
|
delete result.schema._prefault;
|
|
11201
11201
|
const _result = this.seen.get(schema);
|
|
11202
11202
|
return _result.schema;
|
|
@@ -12768,20 +12768,400 @@ var ApiClient = class {
|
|
|
12768
12768
|
});
|
|
12769
12769
|
}
|
|
12770
12770
|
};
|
|
12771
|
-
var
|
|
12771
|
+
var BOOK_IDS = [
|
|
12772
|
+
"GEN",
|
|
12773
|
+
"EXO",
|
|
12774
|
+
"LEV",
|
|
12775
|
+
"NUM",
|
|
12776
|
+
"DEU",
|
|
12777
|
+
"JOS",
|
|
12778
|
+
"JDG",
|
|
12779
|
+
"RUT",
|
|
12780
|
+
"1SA",
|
|
12781
|
+
"2SA",
|
|
12782
|
+
"1KI",
|
|
12783
|
+
"2KI",
|
|
12784
|
+
"1CH",
|
|
12785
|
+
"2CH",
|
|
12786
|
+
"EZR",
|
|
12787
|
+
"NEH",
|
|
12788
|
+
"EST",
|
|
12789
|
+
"JOB",
|
|
12790
|
+
"PSA",
|
|
12791
|
+
"PRO",
|
|
12792
|
+
"ECC",
|
|
12793
|
+
"SNG",
|
|
12794
|
+
"ISA",
|
|
12795
|
+
"JER",
|
|
12796
|
+
"LAM",
|
|
12797
|
+
"EZK",
|
|
12798
|
+
"DAN",
|
|
12799
|
+
"HOS",
|
|
12800
|
+
"JOL",
|
|
12801
|
+
"AMO",
|
|
12802
|
+
"OBA",
|
|
12803
|
+
"JON",
|
|
12804
|
+
"MIC",
|
|
12805
|
+
"NAM",
|
|
12806
|
+
"HAB",
|
|
12807
|
+
"ZEP",
|
|
12808
|
+
"HAG",
|
|
12809
|
+
"ZEC",
|
|
12810
|
+
"MAL",
|
|
12811
|
+
"MAT",
|
|
12812
|
+
"MRK",
|
|
12813
|
+
"LUK",
|
|
12814
|
+
"JHN",
|
|
12815
|
+
"ACT",
|
|
12816
|
+
"ROM",
|
|
12817
|
+
"1CO",
|
|
12818
|
+
"2CO",
|
|
12819
|
+
"GAL",
|
|
12820
|
+
"EPH",
|
|
12821
|
+
"PHP",
|
|
12822
|
+
"COL",
|
|
12823
|
+
"1TH",
|
|
12824
|
+
"2TH",
|
|
12825
|
+
"1TI",
|
|
12826
|
+
"2TI",
|
|
12827
|
+
"TIT",
|
|
12828
|
+
"PHM",
|
|
12829
|
+
"HEB",
|
|
12830
|
+
"JAS",
|
|
12831
|
+
"1PE",
|
|
12832
|
+
"2PE",
|
|
12833
|
+
"1JN",
|
|
12834
|
+
"2JN",
|
|
12835
|
+
"3JN",
|
|
12836
|
+
"JUD",
|
|
12837
|
+
"REV",
|
|
12838
|
+
// dc (Apocrypha) books
|
|
12839
|
+
"TOB",
|
|
12840
|
+
"JDT",
|
|
12841
|
+
"ESG",
|
|
12842
|
+
"WIS",
|
|
12843
|
+
"SIR",
|
|
12844
|
+
"BAR",
|
|
12845
|
+
"LJE",
|
|
12846
|
+
"S3Y",
|
|
12847
|
+
"SUS",
|
|
12848
|
+
"BEL",
|
|
12849
|
+
"1MA",
|
|
12850
|
+
"2MA",
|
|
12851
|
+
"3MA",
|
|
12852
|
+
"4MA",
|
|
12853
|
+
"1ES",
|
|
12854
|
+
"2ES",
|
|
12855
|
+
"MAN",
|
|
12856
|
+
"PS2",
|
|
12857
|
+
"ODA",
|
|
12858
|
+
"PSS",
|
|
12859
|
+
"3ES",
|
|
12860
|
+
"EZA",
|
|
12861
|
+
"5EZ",
|
|
12862
|
+
"6EZ",
|
|
12863
|
+
"DAG",
|
|
12864
|
+
"PS3",
|
|
12865
|
+
"2BA",
|
|
12866
|
+
"LBA",
|
|
12867
|
+
"JUB",
|
|
12868
|
+
"ENO",
|
|
12869
|
+
"1MQ",
|
|
12870
|
+
"2MQ",
|
|
12871
|
+
"3MQ",
|
|
12872
|
+
"REP",
|
|
12873
|
+
"4BA",
|
|
12874
|
+
"LAO",
|
|
12875
|
+
// Luke-Acts combo, treated canonically as New Testament
|
|
12876
|
+
"LKA"
|
|
12877
|
+
];
|
|
12878
|
+
var BOOK_CANON = {
|
|
12879
|
+
GEN: "old_testament",
|
|
12880
|
+
EXO: "old_testament",
|
|
12881
|
+
LEV: "old_testament",
|
|
12882
|
+
NUM: "old_testament",
|
|
12883
|
+
DEU: "old_testament",
|
|
12884
|
+
JOS: "old_testament",
|
|
12885
|
+
JDG: "old_testament",
|
|
12886
|
+
RUT: "old_testament",
|
|
12887
|
+
"1SA": "old_testament",
|
|
12888
|
+
"2SA": "old_testament",
|
|
12889
|
+
"1KI": "old_testament",
|
|
12890
|
+
"2KI": "old_testament",
|
|
12891
|
+
"1CH": "old_testament",
|
|
12892
|
+
"2CH": "old_testament",
|
|
12893
|
+
EZR: "old_testament",
|
|
12894
|
+
NEH: "old_testament",
|
|
12895
|
+
EST: "old_testament",
|
|
12896
|
+
JOB: "old_testament",
|
|
12897
|
+
PSA: "old_testament",
|
|
12898
|
+
PRO: "old_testament",
|
|
12899
|
+
ECC: "old_testament",
|
|
12900
|
+
SNG: "old_testament",
|
|
12901
|
+
ISA: "old_testament",
|
|
12902
|
+
JER: "old_testament",
|
|
12903
|
+
LAM: "old_testament",
|
|
12904
|
+
EZK: "old_testament",
|
|
12905
|
+
DAN: "old_testament",
|
|
12906
|
+
HOS: "old_testament",
|
|
12907
|
+
JOL: "old_testament",
|
|
12908
|
+
AMO: "old_testament",
|
|
12909
|
+
OBA: "old_testament",
|
|
12910
|
+
JON: "old_testament",
|
|
12911
|
+
MIC: "old_testament",
|
|
12912
|
+
NAM: "old_testament",
|
|
12913
|
+
HAB: "old_testament",
|
|
12914
|
+
ZEP: "old_testament",
|
|
12915
|
+
HAG: "old_testament",
|
|
12916
|
+
ZEC: "old_testament",
|
|
12917
|
+
MAL: "old_testament",
|
|
12918
|
+
MAT: "new_testament",
|
|
12919
|
+
MRK: "new_testament",
|
|
12920
|
+
LUK: "new_testament",
|
|
12921
|
+
JHN: "new_testament",
|
|
12922
|
+
ACT: "new_testament",
|
|
12923
|
+
ROM: "new_testament",
|
|
12924
|
+
"1CO": "new_testament",
|
|
12925
|
+
"2CO": "new_testament",
|
|
12926
|
+
GAL: "new_testament",
|
|
12927
|
+
EPH: "new_testament",
|
|
12928
|
+
PHP: "new_testament",
|
|
12929
|
+
COL: "new_testament",
|
|
12930
|
+
"1TH": "new_testament",
|
|
12931
|
+
"2TH": "new_testament",
|
|
12932
|
+
"1TI": "new_testament",
|
|
12933
|
+
"2TI": "new_testament",
|
|
12934
|
+
TIT: "new_testament",
|
|
12935
|
+
PHM: "new_testament",
|
|
12936
|
+
HEB: "new_testament",
|
|
12937
|
+
JAS: "new_testament",
|
|
12938
|
+
"1PE": "new_testament",
|
|
12939
|
+
"2PE": "new_testament",
|
|
12940
|
+
"1JN": "new_testament",
|
|
12941
|
+
"2JN": "new_testament",
|
|
12942
|
+
"3JN": "new_testament",
|
|
12943
|
+
JUD: "new_testament",
|
|
12944
|
+
REV: "new_testament",
|
|
12945
|
+
TOB: "deuterocanon",
|
|
12946
|
+
JDT: "deuterocanon",
|
|
12947
|
+
ESG: "deuterocanon",
|
|
12948
|
+
WIS: "deuterocanon",
|
|
12949
|
+
SIR: "deuterocanon",
|
|
12950
|
+
BAR: "deuterocanon",
|
|
12951
|
+
LJE: "deuterocanon",
|
|
12952
|
+
S3Y: "deuterocanon",
|
|
12953
|
+
SUS: "deuterocanon",
|
|
12954
|
+
BEL: "deuterocanon",
|
|
12955
|
+
"1MA": "deuterocanon",
|
|
12956
|
+
"2MA": "deuterocanon",
|
|
12957
|
+
"3MA": "deuterocanon",
|
|
12958
|
+
"4MA": "deuterocanon",
|
|
12959
|
+
"1ES": "deuterocanon",
|
|
12960
|
+
"2ES": "deuterocanon",
|
|
12961
|
+
MAN: "deuterocanon",
|
|
12962
|
+
PS2: "deuterocanon",
|
|
12963
|
+
ODA: "deuterocanon",
|
|
12964
|
+
PSS: "deuterocanon",
|
|
12965
|
+
"3ES": "deuterocanon",
|
|
12966
|
+
EZA: "deuterocanon",
|
|
12967
|
+
"5EZ": "deuterocanon",
|
|
12968
|
+
"6EZ": "deuterocanon",
|
|
12969
|
+
DAG: "deuterocanon",
|
|
12970
|
+
PS3: "deuterocanon",
|
|
12971
|
+
"2BA": "deuterocanon",
|
|
12972
|
+
LBA: "deuterocanon",
|
|
12973
|
+
JUB: "deuterocanon",
|
|
12974
|
+
ENO: "deuterocanon",
|
|
12975
|
+
"1MQ": "deuterocanon",
|
|
12976
|
+
"2MQ": "deuterocanon",
|
|
12977
|
+
"3MQ": "deuterocanon",
|
|
12978
|
+
REP: "deuterocanon",
|
|
12979
|
+
"4BA": "deuterocanon",
|
|
12980
|
+
LAO: "deuterocanon",
|
|
12981
|
+
LKA: "new_testament"
|
|
12982
|
+
// Luke-Acts combo, treated canonically as New Testament
|
|
12983
|
+
};
|
|
12984
|
+
var BibleVerseSchema = external_exports.object({
|
|
12985
|
+
/** Verse identifier (e.g., "1") */
|
|
12986
|
+
id: external_exports.string(),
|
|
12987
|
+
/** Passage identifier (e.g., "MAT.1.1") */
|
|
12988
|
+
passage_id: external_exports.string(),
|
|
12989
|
+
/** Verse Number (e.g., "1") */
|
|
12990
|
+
title: external_exports.string()
|
|
12991
|
+
});
|
|
12992
|
+
var BibleChapterSchema = external_exports.object({
|
|
12993
|
+
/** Chapter identifier (e.g., "1") */
|
|
12994
|
+
id: external_exports.string(),
|
|
12995
|
+
/** Passage identifier (e.g., "MAT.1") */
|
|
12996
|
+
passage_id: external_exports.string(),
|
|
12997
|
+
/** Chapter title (e.g., "1") */
|
|
12998
|
+
title: external_exports.string(),
|
|
12999
|
+
/** Array of verses */
|
|
13000
|
+
verses: external_exports.array(BibleVerseSchema).optional()
|
|
13001
|
+
});
|
|
13002
|
+
var CanonSchema = external_exports.enum(["old_testament", "new_testament", "deuterocanon"]);
|
|
13003
|
+
var BibleBookIntroSchema = external_exports.object({
|
|
13004
|
+
/** Intro identifier */
|
|
13005
|
+
id: external_exports.string(),
|
|
13006
|
+
/** Intro passage identifier */
|
|
13007
|
+
passage_id: external_exports.string(),
|
|
13008
|
+
/** Intro title */
|
|
13009
|
+
title: external_exports.string()
|
|
13010
|
+
});
|
|
13011
|
+
var BookUsfmSchema = external_exports.union([
|
|
13012
|
+
...BOOK_IDS.map((id) => external_exports.literal(id)),
|
|
13013
|
+
external_exports.string().length(3)
|
|
13014
|
+
]);
|
|
13015
|
+
var BibleBookSchema = external_exports.object({
|
|
13016
|
+
/** Book identifier (e.g., "MAT") */
|
|
13017
|
+
id: BookUsfmSchema,
|
|
13018
|
+
/** Book title (e.g., "Genesis") */
|
|
13019
|
+
title: external_exports.string(),
|
|
13020
|
+
/** Full Book title (e.g., "The First Book of Moses, Commonly Called Genesis") */
|
|
13021
|
+
full_title: external_exports.string(),
|
|
13022
|
+
/** Book abbreviation (e.g., "Gen") */
|
|
13023
|
+
abbreviation: external_exports.string().optional(),
|
|
13024
|
+
/** Canonical section (new_testament, old_testament, deuterocanon) */
|
|
13025
|
+
canon: CanonSchema,
|
|
13026
|
+
/** Intro metadata (optional) */
|
|
13027
|
+
intro: BibleBookIntroSchema.optional(),
|
|
13028
|
+
/** Array of chapter identifiers (e.g., ["GEN.1", "GEN.2", "GEN.3"]) */
|
|
13029
|
+
chapters: external_exports.array(BibleChapterSchema).optional()
|
|
13030
|
+
});
|
|
13031
|
+
var BibleIndexVerseSchema = external_exports.object({
|
|
13032
|
+
/** Verse identifier */
|
|
13033
|
+
id: external_exports.string(),
|
|
13034
|
+
/** Verse title */
|
|
13035
|
+
title: external_exports.string()
|
|
13036
|
+
});
|
|
13037
|
+
var BibleIndexChapterSchema = external_exports.object({
|
|
13038
|
+
/** Chapter identifier */
|
|
13039
|
+
id: external_exports.string(),
|
|
13040
|
+
/** Chapter title */
|
|
13041
|
+
title: external_exports.string(),
|
|
13042
|
+
/** Array of verses in this chapter */
|
|
13043
|
+
verses: external_exports.array(BibleIndexVerseSchema)
|
|
13044
|
+
});
|
|
13045
|
+
var BibleIndexBookSchema = external_exports.object({
|
|
13046
|
+
/** Book identifier */
|
|
13047
|
+
id: BookUsfmSchema,
|
|
13048
|
+
/** Book title */
|
|
13049
|
+
title: external_exports.string(),
|
|
13050
|
+
/** Full book title */
|
|
13051
|
+
full_title: external_exports.string(),
|
|
13052
|
+
/** Book abbreviation */
|
|
13053
|
+
abbreviation: external_exports.string(),
|
|
13054
|
+
/** Canonical section */
|
|
13055
|
+
canon: CanonSchema,
|
|
13056
|
+
/** Array of chapters in this book */
|
|
13057
|
+
chapters: external_exports.array(BibleIndexChapterSchema)
|
|
13058
|
+
});
|
|
13059
|
+
var _BibleIndexSchema = external_exports.object({
|
|
13060
|
+
/** Text direction (e.g., "ltr") */
|
|
13061
|
+
text_direction: external_exports.string(),
|
|
13062
|
+
/** Array of books with chapters and verses */
|
|
13063
|
+
books: external_exports.array(BibleIndexBookSchema)
|
|
13064
|
+
});
|
|
13065
|
+
var _HighlightSchema = external_exports.object({
|
|
13066
|
+
/** Bible version identifier */
|
|
13067
|
+
version_id: external_exports.number().int().positive(),
|
|
13068
|
+
/** Passage identifier (e.g., "MAT.1.1") */
|
|
13069
|
+
passage_id: external_exports.string(),
|
|
13070
|
+
/** Hex color code (6 digits, no #) */
|
|
13071
|
+
color: external_exports.string().regex(/^[0-9a-f]{6}$/)
|
|
13072
|
+
});
|
|
13073
|
+
var _CreateHighlightSchema = external_exports.object({
|
|
13074
|
+
/** Bible version identifier */
|
|
13075
|
+
version_id: external_exports.number().int().positive(),
|
|
13076
|
+
/** Passage identifier (e.g., "MAT.1.1") */
|
|
13077
|
+
passage_id: external_exports.string(),
|
|
13078
|
+
/** Hex color code (6 digits, no #) */
|
|
13079
|
+
color: external_exports.string().regex(/^[0-9a-f]{6}$/)
|
|
13080
|
+
});
|
|
13081
|
+
var LanguageSchema = external_exports.object({
|
|
13082
|
+
/** BCP 47 language identifier (e.g., "en") */
|
|
13083
|
+
id: external_exports.string().regex(/^[a-z]{2,3}(?:-[A-Z][a-z]{3})?$/, "BCP 47 id limited to language or language+script"),
|
|
13084
|
+
/** ISO 639 language code */
|
|
13085
|
+
language: external_exports.string().regex(/^[a-z]{2,3}$/, "ISO 639 canonical language subtag"),
|
|
13086
|
+
/** ISO 15924 script code (e.g., "Latn") */
|
|
13087
|
+
script: external_exports.string().regex(/^[A-Z][a-z]{3}$/, 'Script must match ISO 15924 format (e.g., "Latn")').nullable().optional(),
|
|
13088
|
+
/** Script name (e.g., "Latin") */
|
|
13089
|
+
script_name: external_exports.string().nullable().optional(),
|
|
13090
|
+
/** Language aliases */
|
|
13091
|
+
aliases: external_exports.array(external_exports.string()).optional(),
|
|
13092
|
+
/** Display names for different locales */
|
|
13093
|
+
display_names: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
13094
|
+
/** Available scripts for this language (e.g., ["Cyrl", "Latn"]) */
|
|
13095
|
+
scripts: external_exports.array(external_exports.string().regex(/^[A-Z][a-z]{3}$/, "ISO 15924 script code")).optional(),
|
|
13096
|
+
/** Language variants (e.g., ["1996", "fonipa"]) */
|
|
13097
|
+
variants: external_exports.array(external_exports.string()).optional(),
|
|
13098
|
+
/** ISO 3166-1 alpha-2 country codes (e.g., ["RS", "BA", "ME"]) */
|
|
13099
|
+
countries: external_exports.array(external_exports.string().regex(/^[A-Z]{2}$/, "ISO 3166-1 alpha-2 country code")).optional(),
|
|
13100
|
+
/** Text direction (ltr or rtl) */
|
|
13101
|
+
text_direction: external_exports.enum(["ltr", "rtl"]).optional(),
|
|
13102
|
+
/** Writing population count */
|
|
13103
|
+
writing_population: external_exports.number().int().optional(),
|
|
13104
|
+
/** Speaking population count */
|
|
13105
|
+
speaking_population: external_exports.number().int().optional(),
|
|
13106
|
+
/** Default Bible version ID for this language */
|
|
13107
|
+
default_bible_id: external_exports.number().int().nullable().optional()
|
|
13108
|
+
});
|
|
13109
|
+
var BiblePassageSchema = external_exports.object({
|
|
13110
|
+
/** Passage identifier (e.g., "MAT.1.1") */
|
|
13111
|
+
id: external_exports.string(),
|
|
13112
|
+
/** Passage content text */
|
|
13113
|
+
content: external_exports.string(),
|
|
13114
|
+
/** Human-readable reference (e.g., "Matthew 1:1") */
|
|
13115
|
+
reference: external_exports.string()
|
|
13116
|
+
});
|
|
13117
|
+
var BibleVersionSchema = external_exports.object({
|
|
13118
|
+
/** Bible version identifier */
|
|
13119
|
+
id: external_exports.number().int(),
|
|
13120
|
+
/** Bible version abbreviation */
|
|
13121
|
+
abbreviation: external_exports.string(),
|
|
13122
|
+
/** Long copyright text */
|
|
13123
|
+
promotional_content: external_exports.string().nullable().optional(),
|
|
13124
|
+
/** Short copyright text */
|
|
13125
|
+
copyright: external_exports.string().nullable().optional(),
|
|
13126
|
+
/** Bible information text */
|
|
13127
|
+
info: external_exports.string().nullable().optional(),
|
|
13128
|
+
/** Publisher URL */
|
|
13129
|
+
publisher_url: external_exports.url().nullable().optional(),
|
|
13130
|
+
/** Language tag (e.g., "en") */
|
|
13131
|
+
language_tag: external_exports.string(),
|
|
13132
|
+
/** Localized abbreviation */
|
|
13133
|
+
localized_abbreviation: external_exports.string(),
|
|
13134
|
+
/** Localized title */
|
|
13135
|
+
localized_title: external_exports.string(),
|
|
13136
|
+
/** Organization ID of publisher */
|
|
13137
|
+
organization_id: external_exports.string().nullable().optional(),
|
|
13138
|
+
/** Full title */
|
|
13139
|
+
title: external_exports.string(),
|
|
13140
|
+
/** Array of book identifiers (e.g., ["GEN", "EXO", "LEV"]) */
|
|
13141
|
+
books: external_exports.array(BookUsfmSchema),
|
|
13142
|
+
/** YouVersion deep link URL */
|
|
13143
|
+
youversion_deep_link: external_exports.url()
|
|
13144
|
+
});
|
|
13145
|
+
var VOTDSchema = external_exports.object({
|
|
13146
|
+
/** Day of year (1-366) */
|
|
13147
|
+
day: external_exports.number().int().min(1).max(366),
|
|
13148
|
+
/** Passage identifier (e.g., "JHN.3.16") */
|
|
13149
|
+
passage_id: external_exports.string()
|
|
13150
|
+
});
|
|
13151
|
+
var _UserSchema = external_exports.object({
|
|
13152
|
+
avatar_url: external_exports.string(),
|
|
13153
|
+
first_name: external_exports.string(),
|
|
13154
|
+
id: external_exports.uuid(),
|
|
13155
|
+
last_name: external_exports.string()
|
|
13156
|
+
});
|
|
13157
|
+
var _a;
|
|
13158
|
+
var BibleClient = (_a = class {
|
|
12772
13159
|
/**
|
|
12773
13160
|
* Creates a new BibleClient instance.
|
|
12774
13161
|
* @param client The API client to use for requests.
|
|
12775
13162
|
*/
|
|
12776
13163
|
constructor(client) {
|
|
12777
13164
|
__publicField(this, "client");
|
|
12778
|
-
// Validation schemas
|
|
12779
|
-
__publicField(this, "versionIdSchema", external_exports.number().int().positive("Version ID must be a positive integer"));
|
|
12780
|
-
__publicField(this, "bookSchema", external_exports.string().trim().min(3, "Book ID must be exactly 3 characters").max(3, "Book ID must be exactly 3 characters"));
|
|
12781
|
-
__publicField(this, "chapterSchema", external_exports.number().int("Chapter must be an integer").positive("Chapter must be a positive integer"));
|
|
12782
|
-
__publicField(this, "verseSchema", external_exports.number().int("Verse must be an integer").positive("Verse must be a positive integer"));
|
|
12783
|
-
__publicField(this, "languageRangesSchema", external_exports.string().trim().min(1, "Language ranges must be a non-empty string"));
|
|
12784
|
-
__publicField(this, "booleanSchema", external_exports.boolean());
|
|
12785
13165
|
this.client = client;
|
|
12786
13166
|
}
|
|
12787
13167
|
/**
|
|
@@ -12793,21 +13173,26 @@ var BibleClient = class {
|
|
|
12793
13173
|
*/
|
|
12794
13174
|
async getVersions(language_ranges, license_id, options) {
|
|
12795
13175
|
const languageRangeArray = Array.isArray(language_ranges) ? language_ranges : [language_ranges];
|
|
12796
|
-
const parsedLanguageRanges = external_exports.array(
|
|
13176
|
+
const parsedLanguageRanges = external_exports.array(_a.languageRangesSchema).nonempty("At least one language range is required").parse(languageRangeArray);
|
|
12797
13177
|
const params = {
|
|
12798
13178
|
"language_ranges[]": parsedLanguageRanges
|
|
12799
13179
|
};
|
|
12800
|
-
if (license_id
|
|
13180
|
+
if (license_id) {
|
|
12801
13181
|
params.license_id = license_id;
|
|
12802
13182
|
}
|
|
12803
|
-
|
|
12804
|
-
|
|
12805
|
-
pageSizeSchema.parse(options.page_size);
|
|
13183
|
+
_a.GetVersionsOptionsSchema.parse(options);
|
|
13184
|
+
if (options?.page_size) {
|
|
12806
13185
|
params.page_size = options.page_size;
|
|
12807
13186
|
}
|
|
12808
|
-
if (options?.
|
|
13187
|
+
if (options?.fields) {
|
|
13188
|
+
params["fields[]"] = options.fields;
|
|
13189
|
+
}
|
|
13190
|
+
if (options?.page_token) {
|
|
12809
13191
|
params.page_token = options.page_token;
|
|
12810
13192
|
}
|
|
13193
|
+
if (options?.all_available) {
|
|
13194
|
+
params.all_available = "true";
|
|
13195
|
+
}
|
|
12811
13196
|
return this.client.get(`/v1/bibles`, params);
|
|
12812
13197
|
}
|
|
12813
13198
|
/**
|
|
@@ -12816,7 +13201,7 @@ var BibleClient = class {
|
|
|
12816
13201
|
* @returns The requested BibleVersion object.
|
|
12817
13202
|
*/
|
|
12818
13203
|
async getVersion(id) {
|
|
12819
|
-
|
|
13204
|
+
_a.versionIdSchema.parse(id);
|
|
12820
13205
|
return this.client.get(`/v1/bibles/${id}`);
|
|
12821
13206
|
}
|
|
12822
13207
|
/**
|
|
@@ -12828,7 +13213,7 @@ var BibleClient = class {
|
|
|
12828
13213
|
* available in the Bible version.
|
|
12829
13214
|
*/
|
|
12830
13215
|
async getBooks(versionId, canon) {
|
|
12831
|
-
|
|
13216
|
+
_a.versionIdSchema.parse(versionId);
|
|
12832
13217
|
return this.client.get(`/v1/bibles/${versionId}/books`, {
|
|
12833
13218
|
...canon && { canon }
|
|
12834
13219
|
});
|
|
@@ -12842,8 +13227,8 @@ var BibleClient = class {
|
|
|
12842
13227
|
* available. Use the `passage_id` with `getPassage()` to fetch intro content.
|
|
12843
13228
|
*/
|
|
12844
13229
|
async getBook(versionId, book) {
|
|
12845
|
-
|
|
12846
|
-
|
|
13230
|
+
_a.versionIdSchema.parse(versionId);
|
|
13231
|
+
_a.bookSchema.parse(book);
|
|
12847
13232
|
return this.client.get(`/v1/bibles/${versionId}/books/${book}`);
|
|
12848
13233
|
}
|
|
12849
13234
|
/**
|
|
@@ -12853,8 +13238,8 @@ var BibleClient = class {
|
|
|
12853
13238
|
* @returns An array of BibleChapter objects.
|
|
12854
13239
|
*/
|
|
12855
13240
|
async getChapters(versionId, book) {
|
|
12856
|
-
|
|
12857
|
-
|
|
13241
|
+
_a.versionIdSchema.parse(versionId);
|
|
13242
|
+
_a.bookSchema.parse(book);
|
|
12858
13243
|
return this.client.get(
|
|
12859
13244
|
`/v1/bibles/${versionId}/books/${book}/chapters`
|
|
12860
13245
|
);
|
|
@@ -12867,9 +13252,9 @@ var BibleClient = class {
|
|
|
12867
13252
|
* @returns The requested BibleChapter object.
|
|
12868
13253
|
*/
|
|
12869
13254
|
async getChapter(versionId, book, chapter) {
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
13255
|
+
_a.versionIdSchema.parse(versionId);
|
|
13256
|
+
_a.bookSchema.parse(book);
|
|
13257
|
+
_a.chapterSchema.parse(chapter);
|
|
12873
13258
|
return this.client.get(
|
|
12874
13259
|
`/v1/bibles/${versionId}/books/${book}/chapters/${chapter}`
|
|
12875
13260
|
);
|
|
@@ -12882,9 +13267,9 @@ var BibleClient = class {
|
|
|
12882
13267
|
* @returns An array of BibleVerse objects.
|
|
12883
13268
|
*/
|
|
12884
13269
|
async getVerses(versionId, book, chapter) {
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
13270
|
+
_a.versionIdSchema.parse(versionId);
|
|
13271
|
+
_a.bookSchema.parse(book);
|
|
13272
|
+
_a.chapterSchema.parse(chapter);
|
|
12888
13273
|
return this.client.get(
|
|
12889
13274
|
`/v1/bibles/${versionId}/books/${book}/chapters/${chapter}/verses`
|
|
12890
13275
|
);
|
|
@@ -12898,10 +13283,10 @@ var BibleClient = class {
|
|
|
12898
13283
|
* @returns The requested BibleVerse object.
|
|
12899
13284
|
*/
|
|
12900
13285
|
async getVerse(versionId, book, chapter, verse) {
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
|
|
12904
|
-
|
|
13286
|
+
_a.versionIdSchema.parse(versionId);
|
|
13287
|
+
_a.bookSchema.parse(book);
|
|
13288
|
+
_a.chapterSchema.parse(chapter);
|
|
13289
|
+
_a.verseSchema.parse(verse);
|
|
12905
13290
|
return this.client.get(
|
|
12906
13291
|
`/v1/bibles/${versionId}/books/${book}/chapters/${chapter}/verses/${verse}`
|
|
12907
13292
|
);
|
|
@@ -12928,12 +13313,12 @@ var BibleClient = class {
|
|
|
12928
13313
|
* ```
|
|
12929
13314
|
*/
|
|
12930
13315
|
async getPassage(versionId, usfm, format = "html", include_headings, include_notes) {
|
|
12931
|
-
|
|
13316
|
+
_a.versionIdSchema.parse(versionId);
|
|
12932
13317
|
if (include_headings !== void 0) {
|
|
12933
|
-
|
|
13318
|
+
_a.booleanSchema.parse(include_headings);
|
|
12934
13319
|
}
|
|
12935
13320
|
if (include_notes !== void 0) {
|
|
12936
|
-
|
|
13321
|
+
_a.booleanSchema.parse(include_notes);
|
|
12937
13322
|
}
|
|
12938
13323
|
const params = {
|
|
12939
13324
|
format
|
|
@@ -12952,7 +13337,7 @@ var BibleClient = class {
|
|
|
12952
13337
|
* @returns The BibleIndex object containing full hierarchy of books, chapters, and verses.
|
|
12953
13338
|
*/
|
|
12954
13339
|
async getIndex(versionId) {
|
|
12955
|
-
|
|
13340
|
+
_a.versionIdSchema.parse(versionId);
|
|
12956
13341
|
return this.client.get(`/v1/bibles/${versionId}/index`);
|
|
12957
13342
|
}
|
|
12958
13343
|
/**
|
|
@@ -12980,19 +13365,32 @@ var BibleClient = class {
|
|
|
12980
13365
|
daySchema.parse(day);
|
|
12981
13366
|
return this.client.get(`/v1/verse_of_the_days/${day}`);
|
|
12982
13367
|
}
|
|
12983
|
-
}
|
|
12984
|
-
|
|
13368
|
+
}, // Validation schemas
|
|
13369
|
+
__publicField(_a, "versionIdSchema", external_exports.number().int().positive("Version ID must be a positive integer")), __publicField(_a, "bookSchema", external_exports.string().trim().min(3, "Book ID must be exactly 3 characters").max(3, "Book ID must be exactly 3 characters")), __publicField(_a, "chapterSchema", external_exports.number().int("Chapter must be an integer").positive("Chapter must be a positive integer")), __publicField(_a, "verseSchema", external_exports.number().int("Verse must be an integer").positive("Verse must be a positive integer")), __publicField(_a, "languageRangesSchema", external_exports.string().trim().min(1, "Language ranges must be a non-empty string")), __publicField(_a, "booleanSchema", external_exports.boolean()), __publicField(_a, "GetVersionsOptionsSchema", external_exports.object({
|
|
13370
|
+
page_size: external_exports.union([external_exports.number().int().positive(), external_exports.literal("*")]).optional(),
|
|
13371
|
+
page_token: external_exports.string().optional(),
|
|
13372
|
+
fields: external_exports.array(BibleVersionSchema.keyof()).optional(),
|
|
13373
|
+
all_available: external_exports.boolean().optional()
|
|
13374
|
+
}).optional().refine(
|
|
13375
|
+
(data) => {
|
|
13376
|
+
if (data?.page_size === "*") {
|
|
13377
|
+
return data.fields && data.fields.length >= 1 && data.fields.length <= 3;
|
|
13378
|
+
}
|
|
13379
|
+
return true;
|
|
13380
|
+
},
|
|
13381
|
+
{
|
|
13382
|
+
message: 'page_size="*" required 1-3 fields to be specified',
|
|
13383
|
+
path: ["page_size", "fields"]
|
|
13384
|
+
}
|
|
13385
|
+
)), _a);
|
|
13386
|
+
var _a2;
|
|
13387
|
+
var LanguagesClient = (_a2 = class {
|
|
12985
13388
|
/**
|
|
12986
13389
|
* Creates a new LanguagesClient instance.
|
|
12987
13390
|
* @param client The API client to use for requests.
|
|
12988
13391
|
*/
|
|
12989
13392
|
constructor(client) {
|
|
12990
13393
|
__publicField(this, "client");
|
|
12991
|
-
__publicField(this, "languageIdSchema", external_exports.string().trim().min(1, "Language ID must be a non-empty string").regex(
|
|
12992
|
-
/^[a-z]{2,3}(?:-[A-Z][a-z]{3})?$/,
|
|
12993
|
-
"Language ID must match BCP 47 format (language or language+script)"
|
|
12994
|
-
));
|
|
12995
|
-
__publicField(this, "countrySchema", external_exports.string().trim().length(2, "Country code must be a 2-character ISO 3166-1 alpha-2 code").toUpperCase());
|
|
12996
13394
|
this.client = client;
|
|
12997
13395
|
}
|
|
12998
13396
|
/**
|
|
@@ -13003,12 +13401,23 @@ var LanguagesClient = class {
|
|
|
13003
13401
|
async getLanguages(options = {}) {
|
|
13004
13402
|
const params = {};
|
|
13005
13403
|
if (options.country !== void 0) {
|
|
13006
|
-
const country =
|
|
13404
|
+
const country = _a2.countrySchema.parse(options.country);
|
|
13007
13405
|
params.country = country;
|
|
13008
13406
|
}
|
|
13407
|
+
if (options.fields !== void 0) {
|
|
13408
|
+
const fieldsSchema = external_exports.array(LanguageSchema.keyof());
|
|
13409
|
+
fieldsSchema.parse(options.fields);
|
|
13410
|
+
params["fields[]"] = options.fields;
|
|
13411
|
+
}
|
|
13009
13412
|
if (options.page_size !== void 0) {
|
|
13010
|
-
const pageSizeSchema = external_exports.number().int().positive();
|
|
13413
|
+
const pageSizeSchema = external_exports.union([external_exports.number().int().positive(), external_exports.literal("*")]);
|
|
13011
13414
|
pageSizeSchema.parse(options.page_size);
|
|
13415
|
+
if (options.page_size === "*") {
|
|
13416
|
+
const fieldsCount = options.fields?.length ?? 0;
|
|
13417
|
+
if (fieldsCount < 1 || fieldsCount > 3) {
|
|
13418
|
+
throw new Error('page_size="*" requires 1-3 fields to be specified');
|
|
13419
|
+
}
|
|
13420
|
+
}
|
|
13012
13421
|
params.page_size = options.page_size;
|
|
13013
13422
|
}
|
|
13014
13423
|
if (options.page_token !== void 0) {
|
|
@@ -13022,12 +13431,31 @@ var LanguagesClient = class {
|
|
|
13022
13431
|
* @returns The requested Language object.
|
|
13023
13432
|
*/
|
|
13024
13433
|
async getLanguage(languageId) {
|
|
13025
|
-
|
|
13434
|
+
_a2.languageIdSchema.parse(languageId);
|
|
13026
13435
|
return this.client.get(`/v1/languages/${languageId}`);
|
|
13027
13436
|
}
|
|
13028
|
-
}
|
|
13029
|
-
|
|
13030
|
-
|
|
13437
|
+
}, __publicField(_a2, "languageIdSchema", external_exports.string().trim().min(1, "Language ID must be a non-empty string").regex(
|
|
13438
|
+
/^[a-z]{2,3}(?:-[A-Z][a-z]{3})?$/,
|
|
13439
|
+
"Language ID must match BCP 47 format (language or language+script)"
|
|
13440
|
+
)), __publicField(_a2, "countrySchema", external_exports.string().trim().length(2, "Country code must be a 2-character ISO 3166-1 alpha-2 code").toUpperCase()), __publicField(_a2, "GetLanguagesOptionsSchema", external_exports.object({
|
|
13441
|
+
page_size: external_exports.union([external_exports.number(), external_exports.literal("*")]).optional(),
|
|
13442
|
+
fields: external_exports.array(LanguageSchema.keyof()).optional(),
|
|
13443
|
+
page_token: external_exports.string().optional(),
|
|
13444
|
+
country: _a2.countrySchema
|
|
13445
|
+
}).refine(
|
|
13446
|
+
(data) => {
|
|
13447
|
+
if (data.page_size === "*") {
|
|
13448
|
+
return data.fields && data.fields?.length >= 1 && data.fields?.length <= 3;
|
|
13449
|
+
}
|
|
13450
|
+
return true;
|
|
13451
|
+
},
|
|
13452
|
+
{
|
|
13453
|
+
message: 'page_size="*" required 1-3 fields to be specified',
|
|
13454
|
+
path: ["page_size", "fields"]
|
|
13455
|
+
}
|
|
13456
|
+
)), _a2);
|
|
13457
|
+
var _a3;
|
|
13458
|
+
var YouVersionPlatformConfiguration = (_a3 = class {
|
|
13031
13459
|
static getOrSetInstallationId() {
|
|
13032
13460
|
if (typeof window === "undefined") {
|
|
13033
13461
|
return "";
|
|
@@ -13111,7 +13539,7 @@ var YouVersionPlatformConfiguration = (_a = class {
|
|
|
13111
13539
|
static set expiryDateKey(value) {
|
|
13112
13540
|
this._expiryDateKey = value;
|
|
13113
13541
|
}
|
|
13114
|
-
}, __publicField(
|
|
13542
|
+
}, __publicField(_a3, "_appKey", null), __publicField(_a3, "_installationId", null), __publicField(_a3, "_apiHost", "api.youversion.com"), __publicField(_a3, "_refreshTokenKey", null), __publicField(_a3, "_expiryDateKey", null), _a3);
|
|
13115
13543
|
var HighlightsClient = class {
|
|
13116
13544
|
/**
|
|
13117
13545
|
* Creates a new HighlightsClient instance.
|
|
@@ -13734,219 +14162,6 @@ var YouVersionAPI = class {
|
|
|
13734
14162
|
return request;
|
|
13735
14163
|
}
|
|
13736
14164
|
};
|
|
13737
|
-
var BOOK_IDS = [
|
|
13738
|
-
"GEN",
|
|
13739
|
-
"EXO",
|
|
13740
|
-
"LEV",
|
|
13741
|
-
"NUM",
|
|
13742
|
-
"DEU",
|
|
13743
|
-
"JOS",
|
|
13744
|
-
"JDG",
|
|
13745
|
-
"RUT",
|
|
13746
|
-
"1SA",
|
|
13747
|
-
"2SA",
|
|
13748
|
-
"1KI",
|
|
13749
|
-
"2KI",
|
|
13750
|
-
"1CH",
|
|
13751
|
-
"2CH",
|
|
13752
|
-
"EZR",
|
|
13753
|
-
"NEH",
|
|
13754
|
-
"EST",
|
|
13755
|
-
"JOB",
|
|
13756
|
-
"PSA",
|
|
13757
|
-
"PRO",
|
|
13758
|
-
"ECC",
|
|
13759
|
-
"SNG",
|
|
13760
|
-
"ISA",
|
|
13761
|
-
"JER",
|
|
13762
|
-
"LAM",
|
|
13763
|
-
"EZK",
|
|
13764
|
-
"DAN",
|
|
13765
|
-
"HOS",
|
|
13766
|
-
"JOL",
|
|
13767
|
-
"AMO",
|
|
13768
|
-
"OBA",
|
|
13769
|
-
"JON",
|
|
13770
|
-
"MIC",
|
|
13771
|
-
"NAM",
|
|
13772
|
-
"HAB",
|
|
13773
|
-
"ZEP",
|
|
13774
|
-
"HAG",
|
|
13775
|
-
"ZEC",
|
|
13776
|
-
"MAL",
|
|
13777
|
-
"MAT",
|
|
13778
|
-
"MRK",
|
|
13779
|
-
"LUK",
|
|
13780
|
-
"JHN",
|
|
13781
|
-
"ACT",
|
|
13782
|
-
"ROM",
|
|
13783
|
-
"1CO",
|
|
13784
|
-
"2CO",
|
|
13785
|
-
"GAL",
|
|
13786
|
-
"EPH",
|
|
13787
|
-
"PHP",
|
|
13788
|
-
"COL",
|
|
13789
|
-
"1TH",
|
|
13790
|
-
"2TH",
|
|
13791
|
-
"1TI",
|
|
13792
|
-
"2TI",
|
|
13793
|
-
"TIT",
|
|
13794
|
-
"PHM",
|
|
13795
|
-
"HEB",
|
|
13796
|
-
"JAS",
|
|
13797
|
-
"1PE",
|
|
13798
|
-
"2PE",
|
|
13799
|
-
"1JN",
|
|
13800
|
-
"2JN",
|
|
13801
|
-
"3JN",
|
|
13802
|
-
"JUD",
|
|
13803
|
-
"REV",
|
|
13804
|
-
// dc (Apocrypha) books
|
|
13805
|
-
"TOB",
|
|
13806
|
-
"JDT",
|
|
13807
|
-
"ESG",
|
|
13808
|
-
"WIS",
|
|
13809
|
-
"SIR",
|
|
13810
|
-
"BAR",
|
|
13811
|
-
"LJE",
|
|
13812
|
-
"S3Y",
|
|
13813
|
-
"SUS",
|
|
13814
|
-
"BEL",
|
|
13815
|
-
"1MA",
|
|
13816
|
-
"2MA",
|
|
13817
|
-
"3MA",
|
|
13818
|
-
"4MA",
|
|
13819
|
-
"1ES",
|
|
13820
|
-
"2ES",
|
|
13821
|
-
"MAN",
|
|
13822
|
-
"PS2",
|
|
13823
|
-
"ODA",
|
|
13824
|
-
"PSS",
|
|
13825
|
-
"3ES",
|
|
13826
|
-
"EZA",
|
|
13827
|
-
"5EZ",
|
|
13828
|
-
"6EZ",
|
|
13829
|
-
"DAG",
|
|
13830
|
-
"PS3",
|
|
13831
|
-
"2BA",
|
|
13832
|
-
"LBA",
|
|
13833
|
-
"JUB",
|
|
13834
|
-
"ENO",
|
|
13835
|
-
"1MQ",
|
|
13836
|
-
"2MQ",
|
|
13837
|
-
"3MQ",
|
|
13838
|
-
"REP",
|
|
13839
|
-
"4BA",
|
|
13840
|
-
"LAO",
|
|
13841
|
-
// Luke-Acts combo, treated canonically as New Testament
|
|
13842
|
-
"LKA"
|
|
13843
|
-
];
|
|
13844
|
-
var BOOK_CANON = {
|
|
13845
|
-
GEN: "old_testament",
|
|
13846
|
-
EXO: "old_testament",
|
|
13847
|
-
LEV: "old_testament",
|
|
13848
|
-
NUM: "old_testament",
|
|
13849
|
-
DEU: "old_testament",
|
|
13850
|
-
JOS: "old_testament",
|
|
13851
|
-
JDG: "old_testament",
|
|
13852
|
-
RUT: "old_testament",
|
|
13853
|
-
"1SA": "old_testament",
|
|
13854
|
-
"2SA": "old_testament",
|
|
13855
|
-
"1KI": "old_testament",
|
|
13856
|
-
"2KI": "old_testament",
|
|
13857
|
-
"1CH": "old_testament",
|
|
13858
|
-
"2CH": "old_testament",
|
|
13859
|
-
EZR: "old_testament",
|
|
13860
|
-
NEH: "old_testament",
|
|
13861
|
-
EST: "old_testament",
|
|
13862
|
-
JOB: "old_testament",
|
|
13863
|
-
PSA: "old_testament",
|
|
13864
|
-
PRO: "old_testament",
|
|
13865
|
-
ECC: "old_testament",
|
|
13866
|
-
SNG: "old_testament",
|
|
13867
|
-
ISA: "old_testament",
|
|
13868
|
-
JER: "old_testament",
|
|
13869
|
-
LAM: "old_testament",
|
|
13870
|
-
EZK: "old_testament",
|
|
13871
|
-
DAN: "old_testament",
|
|
13872
|
-
HOS: "old_testament",
|
|
13873
|
-
JOL: "old_testament",
|
|
13874
|
-
AMO: "old_testament",
|
|
13875
|
-
OBA: "old_testament",
|
|
13876
|
-
JON: "old_testament",
|
|
13877
|
-
MIC: "old_testament",
|
|
13878
|
-
NAM: "old_testament",
|
|
13879
|
-
HAB: "old_testament",
|
|
13880
|
-
ZEP: "old_testament",
|
|
13881
|
-
HAG: "old_testament",
|
|
13882
|
-
ZEC: "old_testament",
|
|
13883
|
-
MAL: "old_testament",
|
|
13884
|
-
MAT: "new_testament",
|
|
13885
|
-
MRK: "new_testament",
|
|
13886
|
-
LUK: "new_testament",
|
|
13887
|
-
JHN: "new_testament",
|
|
13888
|
-
ACT: "new_testament",
|
|
13889
|
-
ROM: "new_testament",
|
|
13890
|
-
"1CO": "new_testament",
|
|
13891
|
-
"2CO": "new_testament",
|
|
13892
|
-
GAL: "new_testament",
|
|
13893
|
-
EPH: "new_testament",
|
|
13894
|
-
PHP: "new_testament",
|
|
13895
|
-
COL: "new_testament",
|
|
13896
|
-
"1TH": "new_testament",
|
|
13897
|
-
"2TH": "new_testament",
|
|
13898
|
-
"1TI": "new_testament",
|
|
13899
|
-
"2TI": "new_testament",
|
|
13900
|
-
TIT: "new_testament",
|
|
13901
|
-
PHM: "new_testament",
|
|
13902
|
-
HEB: "new_testament",
|
|
13903
|
-
JAS: "new_testament",
|
|
13904
|
-
"1PE": "new_testament",
|
|
13905
|
-
"2PE": "new_testament",
|
|
13906
|
-
"1JN": "new_testament",
|
|
13907
|
-
"2JN": "new_testament",
|
|
13908
|
-
"3JN": "new_testament",
|
|
13909
|
-
JUD: "new_testament",
|
|
13910
|
-
REV: "new_testament",
|
|
13911
|
-
TOB: "deuterocanon",
|
|
13912
|
-
JDT: "deuterocanon",
|
|
13913
|
-
ESG: "deuterocanon",
|
|
13914
|
-
WIS: "deuterocanon",
|
|
13915
|
-
SIR: "deuterocanon",
|
|
13916
|
-
BAR: "deuterocanon",
|
|
13917
|
-
LJE: "deuterocanon",
|
|
13918
|
-
S3Y: "deuterocanon",
|
|
13919
|
-
SUS: "deuterocanon",
|
|
13920
|
-
BEL: "deuterocanon",
|
|
13921
|
-
"1MA": "deuterocanon",
|
|
13922
|
-
"2MA": "deuterocanon",
|
|
13923
|
-
"3MA": "deuterocanon",
|
|
13924
|
-
"4MA": "deuterocanon",
|
|
13925
|
-
"1ES": "deuterocanon",
|
|
13926
|
-
"2ES": "deuterocanon",
|
|
13927
|
-
MAN: "deuterocanon",
|
|
13928
|
-
PS2: "deuterocanon",
|
|
13929
|
-
ODA: "deuterocanon",
|
|
13930
|
-
PSS: "deuterocanon",
|
|
13931
|
-
"3ES": "deuterocanon",
|
|
13932
|
-
EZA: "deuterocanon",
|
|
13933
|
-
"5EZ": "deuterocanon",
|
|
13934
|
-
"6EZ": "deuterocanon",
|
|
13935
|
-
DAG: "deuterocanon",
|
|
13936
|
-
PS3: "deuterocanon",
|
|
13937
|
-
"2BA": "deuterocanon",
|
|
13938
|
-
LBA: "deuterocanon",
|
|
13939
|
-
JUB: "deuterocanon",
|
|
13940
|
-
ENO: "deuterocanon",
|
|
13941
|
-
"1MQ": "deuterocanon",
|
|
13942
|
-
"2MQ": "deuterocanon",
|
|
13943
|
-
"3MQ": "deuterocanon",
|
|
13944
|
-
REP: "deuterocanon",
|
|
13945
|
-
"4BA": "deuterocanon",
|
|
13946
|
-
LAO: "deuterocanon",
|
|
13947
|
-
LKA: "new_testament"
|
|
13948
|
-
// Luke-Acts combo, treated canonically as New Testament
|
|
13949
|
-
};
|
|
13950
14165
|
|
|
13951
14166
|
// src/components/icons/info.tsx
|
|
13952
14167
|
var import_jsx_runtime = require("react/jsx-runtime");
|