@helloao/tools 0.1.0 → 0.3.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.
Files changed (78) hide show
  1. package/dist/cjs/generation/api.cjs +1580 -35
  2. package/dist/cjs/generation/api.cjs.map +3 -3
  3. package/dist/cjs/generation/audio.cjs +55 -8
  4. package/dist/cjs/generation/audio.cjs.map +2 -2
  5. package/dist/cjs/generation/book-order.cjs +1 -1
  6. package/dist/cjs/generation/book-order.cjs.map +2 -2
  7. package/dist/cjs/generation/common-types.cjs +996 -0
  8. package/dist/cjs/generation/common-types.cjs.map +2 -2
  9. package/dist/cjs/generation/dataset.cjs +44 -17
  10. package/dist/cjs/generation/dataset.cjs.map +2 -2
  11. package/dist/cjs/generation/index.cjs +8 -5
  12. package/dist/cjs/generation/index.cjs.map +2 -2
  13. package/dist/cjs/generation/simple.cjs +294 -0
  14. package/dist/cjs/generation/simple.cjs.map +7 -0
  15. package/dist/cjs/index.cjs +4 -4
  16. package/dist/cjs/parser/codex-parser.cjs +3 -3
  17. package/dist/cjs/parser/codex-parser.cjs.map +3 -3
  18. package/dist/cjs/parser/commentary-csv-parser.cjs +14 -3
  19. package/dist/cjs/parser/commentary-csv-parser.cjs.map +3 -3
  20. package/dist/cjs/parser/index.cjs +1 -1
  21. package/dist/cjs/parser/lockman-parser.cjs +334 -0
  22. package/dist/cjs/parser/lockman-parser.cjs.map +7 -0
  23. package/dist/cjs/parser/tyndale-xml-parser.cjs +1 -1
  24. package/dist/cjs/parser/tyndale-xml-parser.cjs.map +1 -1
  25. package/dist/cjs/parser/types.cjs.map +1 -1
  26. package/dist/cjs/parser/usfm-parser.cjs +2 -2
  27. package/dist/cjs/parser/usfm-parser.cjs.map +1 -1
  28. package/dist/cjs/parser/usx-parser.cjs +145 -32
  29. package/dist/cjs/parser/usx-parser.cjs.map +2 -2
  30. package/dist/cjs/parser/words.cjs +187 -0
  31. package/dist/cjs/parser/words.cjs.map +7 -0
  32. package/dist/cjs/utils.cjs +152 -0
  33. package/dist/cjs/utils.cjs.map +3 -3
  34. package/dist/esm/generation/api.js +1527 -35
  35. package/dist/esm/generation/api.js.map +3 -3
  36. package/dist/esm/generation/audio.js +47 -4
  37. package/dist/esm/generation/audio.js.map +2 -2
  38. package/dist/esm/generation/book-order.js +1 -1
  39. package/dist/esm/generation/book-order.js.map +2 -2
  40. package/dist/esm/generation/common-types.js +903 -0
  41. package/dist/esm/generation/common-types.js.map +3 -3
  42. package/dist/esm/generation/dataset.js +35 -10
  43. package/dist/esm/generation/dataset.js.map +2 -2
  44. package/dist/esm/generation/index.js +2 -1
  45. package/dist/esm/generation/index.js.map +2 -2
  46. package/dist/esm/generation/simple.js +260 -0
  47. package/dist/esm/generation/simple.js.map +7 -0
  48. package/dist/esm/parser/codex-parser.js +3 -3
  49. package/dist/esm/parser/codex-parser.js.map +3 -3
  50. package/dist/esm/parser/commentary-csv-parser.js +3 -2
  51. package/dist/esm/parser/commentary-csv-parser.js.map +2 -2
  52. package/dist/esm/parser/lockman-parser.js +306 -0
  53. package/dist/esm/parser/lockman-parser.js.map +7 -0
  54. package/dist/esm/parser/tyndale-xml-parser.js +1 -1
  55. package/dist/esm/parser/tyndale-xml-parser.js.map +1 -1
  56. package/dist/esm/parser/usfm-parser.js +1 -1
  57. package/dist/esm/parser/usfm-parser.js.map +1 -1
  58. package/dist/esm/parser/usx-parser.js +153 -32
  59. package/dist/esm/parser/usx-parser.js.map +2 -2
  60. package/dist/esm/parser/words.js +149 -0
  61. package/dist/esm/parser/words.js.map +7 -0
  62. package/dist/esm/utils.js +138 -0
  63. package/dist/esm/utils.js.map +2 -2
  64. package/dist/types/generation/api.d.ts +8478 -472
  65. package/dist/types/generation/audio.d.ts +5 -0
  66. package/dist/types/generation/common-types.d.ts +1646 -407
  67. package/dist/types/generation/dataset.d.ts +1 -0
  68. package/dist/types/generation/index.d.ts +2 -1
  69. package/dist/types/generation/simple.d.ts +110 -0
  70. package/dist/types/parser/codex-parser.d.ts +18 -138
  71. package/dist/types/parser/commentary-csv-parser.d.ts +1 -1
  72. package/dist/types/parser/lockman-parser.d.ts +14 -0
  73. package/dist/types/parser/tyndale-xml-parser.d.ts +1 -1
  74. package/dist/types/parser/types.d.ts +67 -0
  75. package/dist/types/parser/usx-parser.d.ts +6 -5
  76. package/dist/types/parser/words.d.ts +104 -0
  77. package/dist/types/utils.d.ts +223 -18
  78. package/package.json +7 -4
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
6
10
  var __copyProps = (to, from, except, desc) => {
7
11
  if (from && typeof from === "object" || typeof from === "function") {
8
12
  for (let key of __getOwnPropNames(from))
@@ -13,5 +17,997 @@ var __copyProps = (to, from, except, desc) => {
13
17
  };
14
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
19
  var common_types_exports = {};
20
+ __export(common_types_exports, {
21
+ ChapterContentSchema: () => ChapterContentSchema,
22
+ ChapterDataSchema: () => ChapterDataSchema,
23
+ ChapterFootnoteSchema: () => ChapterFootnoteSchema,
24
+ ChapterHeadingSchema: () => ChapterHeadingSchema,
25
+ ChapterHebrewSubtitleSchema: () => ChapterHebrewSubtitleSchema,
26
+ ChapterLineBreakSchema: () => ChapterLineBreakSchema,
27
+ ChapterVerseSchema: () => ChapterVerseSchema,
28
+ ChapterWordSchema: () => ChapterWordSchema,
29
+ CommentaryBookChapterSchema: () => CommentaryBookChapterSchema,
30
+ CommentaryBookSchema: () => CommentaryBookSchema,
31
+ CommentaryChapterDataSchema: () => CommentaryChapterDataSchema,
32
+ CommentaryProfileSchema: () => CommentaryProfileSchema,
33
+ CommentarySchema: () => CommentarySchema,
34
+ DatasetBookChapterSchema: () => DatasetBookChapterSchema,
35
+ DatasetBookSchema: () => DatasetBookSchema,
36
+ DatasetChapterDataSchema: () => DatasetChapterDataSchema,
37
+ DatasetChapterVerseContentSchema: () => DatasetChapterVerseContentSchema,
38
+ DatasetSchema: () => DatasetSchema,
39
+ FormattedTextSchema: () => FormattedTextSchema,
40
+ InlineHeadingSchema: () => InlineHeadingSchema,
41
+ InlineLineBreakSchema: () => InlineLineBreakSchema,
42
+ ScoredVerseRefSchema: () => ScoredVerseRefSchema,
43
+ SimpleChapterContentSchema: () => SimpleChapterContentSchema,
44
+ SimpleChapterDataSchema: () => SimpleChapterDataSchema,
45
+ SimpleChapterHeadingSchema: () => SimpleChapterHeadingSchema,
46
+ SimpleChapterHebrewSubtitleSchema: () => SimpleChapterHebrewSubtitleSchema,
47
+ SimpleChapterVerseSchema: () => SimpleChapterVerseSchema,
48
+ SimpleChapterWordSchema: () => SimpleChapterWordSchema,
49
+ SimpleCommentaryChapterDataSchema: () => SimpleCommentaryChapterDataSchema,
50
+ SimpleInlineHeadingSchema: () => SimpleInlineHeadingSchema,
51
+ SimplePoemRangeSchema: () => SimplePoemRangeSchema,
52
+ SimpleTextRangeSchema: () => SimpleTextRangeSchema,
53
+ SimpleTranslationBookChapterSchema: () => SimpleTranslationBookChapterSchema,
54
+ SimpleTranslationBookChapterWordsSchema: () => SimpleTranslationBookChapterWordsSchema,
55
+ SimpleVerseFootnoteSchema: () => SimpleVerseFootnoteSchema,
56
+ TranslationBookChapterAudioLinksSchema: () => TranslationBookChapterAudioLinksSchema,
57
+ TranslationBookChapterAudioTimingsSchema: () => TranslationBookChapterAudioTimingsSchema,
58
+ TranslationBookChapterSchema: () => TranslationBookChapterSchema,
59
+ TranslationBookChapterWordsSchema: () => TranslationBookChapterWordsSchema,
60
+ TranslationBookSchema: () => TranslationBookSchema,
61
+ TranslationSchema: () => TranslationSchema,
62
+ VerseFootnoteReferenceSchema: () => VerseFootnoteReferenceSchema
63
+ });
16
64
  module.exports = __toCommonJS(common_types_exports);
65
+ var import_zod = require("zod");
66
+ var import_utils = require("../utils.js");
67
+ const TranslationSchema = import_zod.z.object({
68
+ /**
69
+ * The ID of the translation.
70
+ */
71
+ id: import_zod.z.string().meta({
72
+ description: "The ID of the translation."
73
+ }),
74
+ /**
75
+ * The name of the translation.
76
+ */
77
+ name: import_zod.z.string().meta({
78
+ description: "The name of the translation."
79
+ }),
80
+ /**
81
+ * The website for the translation.
82
+ */
83
+ website: import_zod.z.string().meta({
84
+ description: "The website for the translation."
85
+ }),
86
+ /**
87
+ * The URL that the license for the translation can be found.
88
+ */
89
+ licenseUrl: import_zod.z.string().meta({
90
+ description: "The URL that the license for the translation can be found."
91
+ }),
92
+ /**
93
+ * The API-added notes for the license.
94
+ */
95
+ licenseNotes: import_zod.z.string().nullable().optional().meta({
96
+ description: "The API-added notes for the license."
97
+ }),
98
+ /**
99
+ * The notice that should be displayed when displaying content from the translation.
100
+ */
101
+ licenseNotice: import_zod.z.string().nullable().optional().meta({
102
+ description: "The notice that should be displayed when displaying content from the translation."
103
+ }),
104
+ /**
105
+ * The short name for the translation.
106
+ */
107
+ shortName: import_zod.z.string().optional().meta({
108
+ description: "The short name for the translation."
109
+ }),
110
+ /**
111
+ * The English name for the translation.
112
+ */
113
+ englishName: import_zod.z.string().meta({
114
+ description: "The English name for the translation."
115
+ }),
116
+ /**
117
+ * The ISO 639 3-letter language tag that the translation is primarily in.
118
+ */
119
+ language: import_zod.z.string().meta({
120
+ description: "The ISO 639 3-letter language tag that the translation is primarily in."
121
+ }),
122
+ /**
123
+ * The direction that the language is written in.
124
+ * "ltr" indicates that the text is written from the left side of the page to the right.
125
+ * "rtl" indicates that the text is written from the right side of the page to the left.
126
+ */
127
+ textDirection: import_zod.z.enum(["ltr", "rtl"]).meta({
128
+ description: "The direction that the language is written in. `ltr` indicates that the text is written from the left side of the page to the right. `rtl` indicates that the text is written from the right side of the page to the left."
129
+ })
130
+ });
131
+ const CommentarySchema = import_zod.z.object({
132
+ /**
133
+ * The ID of the commentary.
134
+ */
135
+ id: import_zod.z.string().meta({
136
+ description: "The ID of the commentary."
137
+ }),
138
+ /**
139
+ * The name of the commentary.
140
+ */
141
+ name: import_zod.z.string().meta({
142
+ description: "The name of the commentary."
143
+ }),
144
+ /**
145
+ * The website for the commentary.
146
+ */
147
+ website: import_zod.z.string().meta({
148
+ description: "The website for the commentary."
149
+ }),
150
+ /**
151
+ * The URL that the license for the commentary can be found.
152
+ */
153
+ licenseUrl: import_zod.z.string().meta({
154
+ description: "The URL that the license for the commentary can be found."
155
+ }),
156
+ /**
157
+ * The API-added notes for the license.
158
+ */
159
+ licenseNotes: import_zod.z.string().nullable().optional().meta({
160
+ description: "The API-added notes for the license."
161
+ }),
162
+ /**
163
+ * The english name for the commentary.
164
+ */
165
+ englishName: import_zod.z.string().meta({
166
+ description: "The English name for the commentary."
167
+ }),
168
+ /**
169
+ * The ISO 639 3-letter language tag that the translation is primarily in.
170
+ */
171
+ language: import_zod.z.string().meta({
172
+ description: "The ISO 639 3-letter language tag that the translation is primarily in."
173
+ }),
174
+ /**
175
+ * The direction that the language is written in.
176
+ * "ltr" indicates that the text is written from the left side of the page to the right.
177
+ * "rtl" indicates that the text is written from the right side of the page to the left.
178
+ */
179
+ textDirection: import_zod.z.enum(["ltr", "rtl"]).meta({
180
+ description: "The direction that the language is written in. `ltr` indicates that the text is written from the left side of the page to the right. `rtl` indicates that the text is written from the right side of the page to the left."
181
+ })
182
+ });
183
+ const DatasetSchema = import_zod.z.object({
184
+ /**
185
+ * The ID of the dataset.
186
+ */
187
+ id: import_zod.z.string().meta({
188
+ description: "The ID of the dataset."
189
+ }),
190
+ /**
191
+ * The name of the dataset.
192
+ */
193
+ name: import_zod.z.string().meta({
194
+ description: "The name of the dataset."
195
+ }),
196
+ /**
197
+ * The website for the dataset.
198
+ */
199
+ website: import_zod.z.string().meta({
200
+ description: "The website for the dataset."
201
+ }),
202
+ /**
203
+ * The URL that the license for the dataset can be found.
204
+ */
205
+ licenseUrl: import_zod.z.string().meta({
206
+ description: "The URL that the license for the dataset can be found."
207
+ }),
208
+ /**
209
+ * The API-added notes for the license.
210
+ */
211
+ licenseNotes: import_zod.z.string().nullable().optional().meta({
212
+ description: "The API-added notes for the license."
213
+ }),
214
+ /**
215
+ * The English name for the dataset.
216
+ */
217
+ englishName: import_zod.z.string().meta({
218
+ description: "The English name for the dataset."
219
+ }),
220
+ /**
221
+ * The ISO 639 3-letter language tag that the dataset is primarily in.
222
+ */
223
+ language: import_zod.z.string().meta({
224
+ description: "The ISO 639 3-letter language tag that the dataset is primarily in."
225
+ }),
226
+ /**
227
+ * The direction that the language is written in.
228
+ */
229
+ textDirection: import_zod.z.enum(["ltr", "rtl"]).meta({
230
+ description: "The direction that the language is written in."
231
+ })
232
+ });
233
+ const TranslationBookSchema = import_zod.z.object({
234
+ /**
235
+ * The ID of the book. Should match the USFM book ID.
236
+ */
237
+ id: import_utils.BookIdSchema,
238
+ /**
239
+ * The name that the translation provided for the book.
240
+ */
241
+ name: import_zod.z.string().meta({
242
+ description: "The name that the translation provided for the book."
243
+ }),
244
+ /**
245
+ * The common name for the book.
246
+ */
247
+ commonName: import_zod.z.string().meta({
248
+ description: "The common name for the book."
249
+ }),
250
+ /**
251
+ * The title of the book.
252
+ * This is usually a more descriptive version of the book name.
253
+ * If not available, then one was not provided by the translation.
254
+ */
255
+ title: import_zod.z.string().nullable().meta({
256
+ description: "The title of the book. This is usually a more descriptive version of the book name. If not available, then one was not provided by the translation."
257
+ }),
258
+ /**
259
+ * The numerical order of the book in the translation.
260
+ */
261
+ order: import_zod.z.number().meta({
262
+ description: "The numerical order of the book in the translation."
263
+ }),
264
+ /**
265
+ * Whether the book is an apocryphal book.
266
+ */
267
+ isApocryphal: import_zod.z.boolean().optional().meta({
268
+ description: "Whether the book is an apocryphal book."
269
+ })
270
+ }).meta({
271
+ id: "TranslationBook",
272
+ description: "Defines the schema for information about a book."
273
+ });
274
+ const CommentaryBookSchema = import_zod.z.object({
275
+ /**
276
+ * The ID of the book. Should match the USFM book ID.
277
+ */
278
+ id: import_utils.BookIdSchema,
279
+ /**
280
+ * The name that the commentary provided for the book.
281
+ */
282
+ name: import_zod.z.string().meta({
283
+ description: "The name that the commentary provided for the book."
284
+ }),
285
+ /**
286
+ * The common name for the book.
287
+ */
288
+ commonName: import_zod.z.string().meta({
289
+ description: "The common name for the book."
290
+ }),
291
+ /**
292
+ * The commentary's introduction for the book.
293
+ */
294
+ introduction: import_zod.z.string().nullable().transform((x) => x ?? void 0).optional().pipe(import_zod.z.string().optional()).meta({
295
+ description: "The commentary's introduction for the book. Undefined if the commentary didn't provide an introduction for the book."
296
+ }),
297
+ /**
298
+ * The summary of the commentary's introduction for the book.
299
+ */
300
+ introductionSummary: import_zod.z.string().nullable().transform((x) => x ?? void 0).optional().pipe(import_zod.z.string().optional()).meta({
301
+ description: "The summary of the commentary's introduction for the book. Undefined if the commentary didn't provide a summary for the book."
302
+ }),
303
+ /**
304
+ * The order of the book in the Bible.
305
+ */
306
+ order: import_zod.z.number().meta({
307
+ description: "The order of the book in the Bible."
308
+ })
309
+ }).meta({
310
+ id: "CommentaryBook",
311
+ description: "Defines the schema for information about a book in a commentary."
312
+ });
313
+ const DatasetBookSchema = import_zod.z.object({
314
+ /**
315
+ * The ID of the book. Should match the USFM book ID.
316
+ */
317
+ id: import_utils.BookIdSchema,
318
+ /**
319
+ * The order of the book in the Bible.
320
+ */
321
+ order: import_zod.z.number().meta({
322
+ description: "The order of the book in the Bible."
323
+ })
324
+ }).meta({
325
+ id: "DatasetBook",
326
+ description: "Defines the schema for information about a book in a dataset."
327
+ });
328
+ const DatasetBookChapterSchema = import_zod.z.object({
329
+ /**
330
+ * The data for the chapter.
331
+ */
332
+ chapter: import_zod.z.lazy(() => DatasetChapterDataSchema).meta({
333
+ description: "The data for the chapter."
334
+ })
335
+ }).meta({
336
+ id: "DatasetBookChapter",
337
+ description: "Defines the schema for information about a chapter in a dataset."
338
+ });
339
+ const DatasetChapterDataSchema = import_zod.z.object({
340
+ /**
341
+ * The number of the chapter.
342
+ */
343
+ number: import_zod.z.number().meta({
344
+ description: "The number of the chapter."
345
+ }),
346
+ /**
347
+ * The content of the chapter.
348
+ */
349
+ content: import_zod.z.array(import_zod.z.lazy(() => DatasetChapterVerseContentSchema)).meta({
350
+ description: "The content of the chapter."
351
+ })
352
+ }).meta({
353
+ id: "DatasetChapterData",
354
+ description: "Defines the schema for information about a chapter in a dataset."
355
+ });
356
+ const DatasetChapterVerseContentSchema = import_zod.z.object({
357
+ /**
358
+ * The number of the verse.
359
+ */
360
+ verse: import_zod.z.number().meta({
361
+ description: "The number of the verse."
362
+ }),
363
+ /**
364
+ * The list of references for the verse.
365
+ */
366
+ references: import_zod.z.array(import_zod.z.lazy(() => ScoredVerseRefSchema)).meta({
367
+ description: "The list of references for the verse."
368
+ })
369
+ }).meta({
370
+ id: "DatasetChapterVerseContent",
371
+ description: "Defines the schema for information about a verse in a dataset chapter."
372
+ });
373
+ const ScoredVerseRefSchema = import_utils.VerseRefSchema.extend({
374
+ score: import_zod.z.number().meta({
375
+ description: "The score for the verse reference. The meaning of the score is arbitrary and is determined by the dataset."
376
+ })
377
+ }).meta({
378
+ id: "ScoredVerseRef",
379
+ description: "Defines the schema for information about a verse reference that has an arbitrary score attached to it."
380
+ });
381
+ const CommentaryProfileSchema = import_zod.z.object({
382
+ /**
383
+ * The ID of the profile.
384
+ */
385
+ id: import_zod.z.string().meta({
386
+ description: "The ID of the profile."
387
+ }),
388
+ /**
389
+ * The subject of the profile.
390
+ */
391
+ subject: import_zod.z.string().meta({
392
+ description: "The subject of the profile."
393
+ }),
394
+ /**
395
+ * The Bible reference that the profile is associated with.
396
+ */
397
+ reference: import_utils.VerseRefSchema.nullable().meta({
398
+ description: "The Bible reference that the profile is associated with. Null if the profile isn't associated with a specific Bible reference."
399
+ })
400
+ });
401
+ const TranslationBookChapterSchema = import_zod.z.object({
402
+ /**
403
+ * The information for the chapter.
404
+ */
405
+ chapter: import_zod.z.lazy(() => ChapterDataSchema).meta({
406
+ description: "The information for the chapter."
407
+ }),
408
+ /**
409
+ * The links to different audio versions for the chapter.
410
+ */
411
+ thisChapterAudioLinks: import_zod.z.lazy(() => TranslationBookChapterAudioLinksSchema).meta({
412
+ description: "The links to different audio versions for the chapter."
413
+ }),
414
+ /**
415
+ * The audio timings (per-verse start times, in seconds) for different audio versions for the chapter.
416
+ */
417
+ thisChapterAudioTimings: import_zod.z.lazy(() => TranslationBookChapterAudioTimingsSchema).meta({
418
+ description: "The audio timings (per-verse start times, in seconds) for different audio versions for the chapter."
419
+ }),
420
+ /**
421
+ * The word-level annotations for the chapter's verses.
422
+ * Omitted if the translation doesn't have any word-level annotations for the chapter.
423
+ */
424
+ thisChapterWords: import_zod.z.lazy(() => TranslationBookChapterWordsSchema).optional().meta({
425
+ description: "The word-level annotations (Strong's numbers and related source data) for the chapter's verses. Omitted if the translation doesn't have any word-level annotations for the chapter."
426
+ })
427
+ }).meta({
428
+ id: "TranslationBookChapter",
429
+ description: "Defines the schema for information about a book chapter."
430
+ });
431
+ const CommentaryBookChapterSchema = import_zod.z.object({
432
+ /**
433
+ * The information for the chapter.
434
+ */
435
+ chapter: import_zod.z.lazy(() => CommentaryChapterDataSchema).meta({
436
+ description: "The information for the chapter."
437
+ })
438
+ }).meta({
439
+ id: "CommentaryBookChapter",
440
+ description: "Defines the schema for information about a book chapter in a commentary."
441
+ });
442
+ const TranslationBookChapterAudioLinksSchema = import_zod.z.record(import_zod.z.string(), import_zod.z.string()).meta({
443
+ id: "TranslationBookChapterAudioLinks",
444
+ description: "Defines the schema for the audio links for a book chapter."
445
+ });
446
+ const TranslationBookChapterAudioTimingsSchema = import_zod.z.record(import_zod.z.string(), import_zod.z.array(import_zod.z.number())).meta({
447
+ id: "TranslationBookChapterAudioTimings",
448
+ description: "Defines the schema for the audio timings for a book chapter. Maps a reader ID to the list of times (in seconds) that each verse starts, in verse order."
449
+ });
450
+ const ChapterWordSchema = import_zod.z.object({
451
+ /**
452
+ * The index of the item in the verse's content array that the annotation applies to.
453
+ */
454
+ contentIndex: import_zod.z.number().meta({
455
+ description: "The index of the item in the verse's content array that the annotation applies to."
456
+ }),
457
+ /**
458
+ * The index of the first character of the annotated word.
459
+ */
460
+ start: import_zod.z.number().meta({
461
+ description: "The index of the first character of the annotated word in the content item's text."
462
+ }),
463
+ /**
464
+ * The index after the last character of the annotated word.
465
+ */
466
+ end: import_zod.z.number().meta({
467
+ description: "The index after the last character of the annotated word in the content item's text. That is, text.slice(start, end) is the annotated word."
468
+ }),
469
+ /**
470
+ * The Strong's number(s) for the word.
471
+ */
472
+ strongs: import_zod.z.array(import_zod.z.string()).optional().meta({
473
+ description: "The Strong's number(s) for the word. Omitted if the translation only provided other annotations for the word."
474
+ }),
475
+ /**
476
+ * The dictionary (citation) form of the word.
477
+ */
478
+ lemma: import_zod.z.string().optional().meta({
479
+ description: "The dictionary (citation) form of the word. Omitted if the translation did not provide one."
480
+ }),
481
+ /**
482
+ * The morphology parse code for the word.
483
+ */
484
+ morph: import_zod.z.string().optional().meta({
485
+ description: "The morphology parse code for the word. Omitted if the translation did not provide one."
486
+ }),
487
+ /**
488
+ * The pointer to the word in the source text.
489
+ */
490
+ srcloc: import_zod.z.string().optional().meta({
491
+ description: "The pointer to the word in the source text, in the <sourceName>:<location> format. Omitted if the translation did not provide one."
492
+ }),
493
+ /**
494
+ * Which occurrence of the source word this word is.
495
+ */
496
+ occurrence: import_zod.z.number().optional().meta({
497
+ description: "Which occurrence of the source word this word is. 1-based. Omitted if the translation did not provide one."
498
+ }),
499
+ /**
500
+ * The total number of times that the source word occurs.
501
+ */
502
+ occurrences: import_zod.z.number().optional().meta({
503
+ description: "The total number of times that the source word occurs. Omitted if the translation did not provide one."
504
+ })
505
+ }).meta({
506
+ id: "ChapterWord",
507
+ description: "Defines the schema for a word-level annotation in a chapter. The annotation is anchored to a range of characters in a single item of a verse's content."
508
+ });
509
+ const TranslationBookChapterWordsSchema = import_zod.z.record(import_zod.z.string(), import_zod.z.array(import_zod.z.lazy(() => ChapterWordSchema))).meta({
510
+ id: "TranslationBookChapterWords",
511
+ description: "Defines the schema for the word-level annotations for a book chapter. Maps a verse number to the list of annotated words in the verse, in order."
512
+ });
513
+ const ChapterDataSchema = import_zod.z.object({
514
+ /**
515
+ * The number of the chapter.
516
+ */
517
+ number: import_zod.z.number().meta({
518
+ description: "The number of the chapter."
519
+ }),
520
+ /**
521
+ * The content of the chapter.
522
+ */
523
+ content: import_zod.z.array(import_zod.z.lazy(() => ChapterContentSchema)).meta({
524
+ description: "The content of the chapter."
525
+ }),
526
+ /**
527
+ * The list of footnotes for the chapter.
528
+ */
529
+ footnotes: import_zod.z.array(import_zod.z.lazy(() => ChapterFootnoteSchema)).meta({
530
+ description: "The list of footnotes for the chapter."
531
+ })
532
+ });
533
+ const CommentaryChapterDataSchema = import_zod.z.object({
534
+ /**
535
+ * The number of the chapter.
536
+ */
537
+ number: import_zod.z.number().meta({
538
+ description: "The number of the chapter."
539
+ }),
540
+ /**
541
+ * The introduction that the commentary provided to the chapter.
542
+ * Not all commentaries provide an introduction to a chapter.
543
+ */
544
+ introduction: import_zod.z.string().optional().meta({
545
+ description: "The introduction that the commentary provided to the chapter. Not all commentaries provide an introduction to a chapter."
546
+ }),
547
+ /**
548
+ * The content of the chapter.
549
+ */
550
+ content: import_zod.z.array(import_zod.z.lazy(() => ChapterVerseSchema)).meta({
551
+ description: "The content of the chapter."
552
+ })
553
+ });
554
+ const ChapterHeadingSchema = import_zod.z.object({
555
+ /**
556
+ * Indicates that the content represents a heading.
557
+ */
558
+ type: import_zod.z.literal("heading"),
559
+ /**
560
+ * The content for the heading.
561
+ * If multiple strings are included in the array, they should be concatenated with a space.
562
+ */
563
+ content: import_zod.z.array(import_zod.z.string()).meta({
564
+ description: "The content for the heading. If multiple strings are included in the array, they should be concatenated with a space."
565
+ })
566
+ }).meta({
567
+ id: "ChapterHeading",
568
+ description: "Defines the schema for a heading in a chapter."
569
+ });
570
+ const ChapterLineBreakSchema = import_zod.z.object({
571
+ /**
572
+ * Indicates that the content represents a line break.
573
+ */
574
+ type: import_zod.z.literal("line_break")
575
+ }).meta({
576
+ id: "ChapterLineBreak",
577
+ description: "Defines the schema for a line break in a chapter."
578
+ });
579
+ const ChapterHebrewSubtitleSchema = import_zod.z.object({
580
+ /**
581
+ * Indicates that the content represents a Hebrew Subtitle.
582
+ */
583
+ type: import_zod.z.literal("hebrew_subtitle"),
584
+ /**
585
+ * The list of content that is contained in the subtitle.
586
+ * Each element in the list could be a string, formatted text, or a footnote reference.
587
+ */
588
+ content: import_zod.z.array(
589
+ import_zod.z.union([
590
+ import_zod.z.string(),
591
+ import_zod.z.lazy(() => FormattedTextSchema),
592
+ import_zod.z.lazy(() => VerseFootnoteReferenceSchema)
593
+ ])
594
+ ).meta({
595
+ description: "The content that is contained in the subtitle. Each element in the list could be a string, formatted text, or a footnote reference."
596
+ })
597
+ }).meta({
598
+ id: "ChapterHebrewSubtitle",
599
+ description: "Defines the schema for a Hebrew Subtitle in a chapter."
600
+ });
601
+ const ChapterVerseSchema = import_zod.z.object({
602
+ /**
603
+ * Indicates that the content is a verse.
604
+ */
605
+ type: import_zod.z.literal("verse"),
606
+ /**
607
+ * The number of the verse.
608
+ */
609
+ number: import_zod.z.number().meta({
610
+ description: "The number of the verse."
611
+ }),
612
+ /**
613
+ * The list of content for the verse.
614
+ * Each element in the list could be a string, formatted text, or a footnote reference.
615
+ */
616
+ content: import_zod.z.array(
617
+ import_zod.z.union([
618
+ import_zod.z.string(),
619
+ import_zod.z.lazy(() => FormattedTextSchema),
620
+ import_zod.z.lazy(() => InlineHeadingSchema),
621
+ import_zod.z.lazy(() => InlineLineBreakSchema),
622
+ import_zod.z.lazy(() => VerseFootnoteReferenceSchema)
623
+ ])
624
+ ).meta({
625
+ description: "The list of content for the verse. Each element in the list could be a string, formatted text, or a footnote reference."
626
+ })
627
+ }).meta({
628
+ id: "ChapterVerse",
629
+ description: "Defines the schema for a verse in a chapter."
630
+ });
631
+ const ChapterContentSchema = import_zod.z.discriminatedUnion("type", [
632
+ ChapterHeadingSchema,
633
+ ChapterLineBreakSchema,
634
+ ChapterVerseSchema,
635
+ ChapterHebrewSubtitleSchema
636
+ ]).meta({
637
+ id: "ChapterContent",
638
+ description: "Defines a union type that represents a single piece of chapter content. A piece of chapter content can be one of the following things: A heading, a line break, a verse, or a Hebrew Subtitle."
639
+ });
640
+ const FormattedTextSchema = import_zod.z.object({
641
+ /**
642
+ * The text that is formatted.
643
+ */
644
+ text: import_zod.z.string().meta({
645
+ description: "The text that is formatted."
646
+ }),
647
+ /**
648
+ * Whether the text represents a poem.
649
+ * The number indicates the level of indent.
650
+ *
651
+ * Common in Psalms.
652
+ */
653
+ poem: import_zod.z.number().optional().meta({
654
+ description: "Whether the text represents a poem. The number indicates the level of indent. Common in Psalms."
655
+ }),
656
+ /**
657
+ * Whether the text represents the Words of Jesus.
658
+ */
659
+ wordsOfJesus: import_zod.z.boolean().optional().meta({
660
+ description: "Whether the text represents the Words of Jesus."
661
+ })
662
+ }).meta({
663
+ id: "FormattedText",
664
+ description: "Defines the schema for formatted text. That is, text that is formatted in a particular manner."
665
+ });
666
+ const InlineHeadingSchema = import_zod.z.object({
667
+ /**
668
+ * The text of the heading.
669
+ */
670
+ heading: import_zod.z.string().meta({
671
+ description: "The text of the heading."
672
+ })
673
+ }).meta({
674
+ id: "InlineHeading",
675
+ description: "Defines the schema for a heading that is embedded in a verse."
676
+ });
677
+ const InlineLineBreakSchema = import_zod.z.object({
678
+ lineBreak: import_zod.z.literal(true)
679
+ }).meta({
680
+ id: "InlineLineBreak",
681
+ description: "Defines the schema for a line break that is embedded in a verse."
682
+ });
683
+ const VerseFootnoteReferenceSchema = import_zod.z.object({
684
+ /**
685
+ * The ID of the note.
686
+ */
687
+ noteId: import_zod.z.number().meta({
688
+ description: "The ID of the note."
689
+ })
690
+ }).meta({
691
+ id: "VerseFootnoteReference",
692
+ description: "Defines the schema for a footnote reference in a verse or a Hebrew Subtitle."
693
+ });
694
+ const ChapterFootnoteSchema = import_zod.z.object({
695
+ /**
696
+ * The ID of the note that is referenced.
697
+ */
698
+ noteId: import_zod.z.number().meta({
699
+ description: "The ID of the note that is referenced."
700
+ }),
701
+ /**
702
+ * The text of the footnote.
703
+ */
704
+ text: import_zod.z.string().meta({
705
+ description: "The text of the footnote."
706
+ }),
707
+ /**
708
+ * The verse reference for the footnote.
709
+ */
710
+ reference: import_zod.z.object({
711
+ chapter: import_zod.z.number(),
712
+ verse: import_zod.z.number()
713
+ }).optional().meta({
714
+ description: "The verse reference for the footnote. Undefined if the footnote isn't associated with a specific verse."
715
+ }),
716
+ /**
717
+ * The caller that should be used for the footnote.
718
+ * For footnotes, a "caller" is the character that is used in the text to reference to footnote.
719
+ *
720
+ * For example, in the text:
721
+ * Hello (a) World
722
+ *
723
+ * ----
724
+ * (a) This is a footnote.
725
+ *
726
+ * The "(a)" is the caller.
727
+ *
728
+ * If "+", then the caller should be autogenerated.
729
+ * If null, then the caller should be empty.
730
+ * If a string, then the caller should be that string.
731
+ */
732
+ caller: import_zod.z.union([import_zod.z.literal("+"), import_zod.z.string(), import_zod.z.null()]).meta({
733
+ description: 'The caller that should be used for the footnote. For footnotes, a "caller" is the character that is used in the text to reference to footnote. For example, in the text: Hello (a) World ---- (a) This is a footnote. The "(a)" is the caller. If "+", then the caller should be autogenerated. If null, then the caller should be empty. If a string, then the caller should be that string.'
734
+ })
735
+ }).meta({
736
+ id: "ChapterFootnote",
737
+ description: "Defines the schema for information about a footnote."
738
+ });
739
+ const SimpleTextRangeSchema = import_zod.z.object({
740
+ /**
741
+ * The index of the first character in the range.
742
+ */
743
+ start: import_zod.z.number().meta({
744
+ description: "The index of the first character of the range in the verse text. Measured in UTF-16 code units."
745
+ }),
746
+ /**
747
+ * The index after the last character in the range.
748
+ */
749
+ end: import_zod.z.number().meta({
750
+ description: "The index after the last character of the range in the verse text. Measured in UTF-16 code units."
751
+ })
752
+ }).meta({
753
+ id: "SimpleTextRange",
754
+ description: "Defines the schema for a range of text inside a simplified verse. Ranges are expressed as offsets into the text of the verse that contains them, measured in UTF-16 code units."
755
+ });
756
+ const SimplePoemRangeSchema = SimpleTextRangeSchema.extend({
757
+ /**
758
+ * The level of indent that the poem line should be displayed with.
759
+ */
760
+ level: import_zod.z.number().meta({
761
+ description: "The level of indent that the line of poetry should be displayed with."
762
+ })
763
+ }).meta({
764
+ id: "SimplePoemRange",
765
+ description: "Defines the schema for a range of text inside a simplified verse that represents a line of poetry."
766
+ });
767
+ const SimpleVerseFootnoteSchema = import_zod.z.object({
768
+ /**
769
+ * The ID of the note.
770
+ */
771
+ noteId: import_zod.z.number().meta({
772
+ description: "The ID of the note."
773
+ }),
774
+ /**
775
+ * The index in the verse text that the footnote caller should be inserted at.
776
+ */
777
+ offset: import_zod.z.number().meta({
778
+ description: "The index in the verse text that the footnote caller should be inserted at. Measured in UTF-16 code units."
779
+ }),
780
+ /**
781
+ * The text of the footnote.
782
+ */
783
+ text: import_zod.z.string().meta({
784
+ description: "The text of the footnote."
785
+ }),
786
+ /**
787
+ * The caller that should be used for the footnote.
788
+ * See ChapterFootnote for more information.
789
+ */
790
+ caller: import_zod.z.union([import_zod.z.literal("+"), import_zod.z.string(), import_zod.z.null()]).meta({
791
+ description: 'The caller that should be used for the footnote. If "+", then the caller should be autogenerated. If null, then the caller should be empty. If a string, then the caller should be that string.'
792
+ })
793
+ }).meta({
794
+ id: "SimpleVerseFootnote",
795
+ description: "Defines the schema for a footnote in a simplified verse. Unlike the footnotes in the regular chapter format, simplified footnotes include the position that they occur at in the verse text."
796
+ });
797
+ const SimpleInlineHeadingSchema = import_zod.z.object({
798
+ /**
799
+ * The index in the verse text that the heading occurs at.
800
+ */
801
+ offset: import_zod.z.number().meta({
802
+ description: "The index in the verse text that the heading occurs at. Measured in UTF-16 code units."
803
+ }),
804
+ /**
805
+ * The text of the heading.
806
+ */
807
+ text: import_zod.z.string().meta({
808
+ description: "The text of the heading."
809
+ })
810
+ }).meta({
811
+ id: "SimpleInlineHeading",
812
+ description: "Defines the schema for a heading that is embedded in a simplified verse."
813
+ });
814
+ const SimpleChapterVerseSchema = import_zod.z.object({
815
+ /**
816
+ * Indicates that the content is a verse.
817
+ */
818
+ type: import_zod.z.literal("verse"),
819
+ /**
820
+ * The number of the verse.
821
+ */
822
+ number: import_zod.z.number().meta({
823
+ description: "The number of the verse."
824
+ }),
825
+ /**
826
+ * The text of the verse.
827
+ */
828
+ text: import_zod.z.string().meta({
829
+ description: "The text of the verse. Lines of poetry and line breaks are separated by newline (\\n) characters."
830
+ }),
831
+ /**
832
+ * The footnotes that occur in the verse.
833
+ */
834
+ footnotes: import_zod.z.array(SimpleVerseFootnoteSchema).meta({
835
+ description: "The footnotes that occur in the verse."
836
+ }),
837
+ /**
838
+ * The headings that occur in the verse.
839
+ */
840
+ headings: import_zod.z.array(SimpleInlineHeadingSchema).optional().meta({
841
+ description: "The headings that occur in the middle of the verse. Omitted if the verse contains no inline headings."
842
+ }),
843
+ /**
844
+ * The ranges of text that represent the Words of Jesus.
845
+ */
846
+ wordsOfJesus: import_zod.z.array(SimpleTextRangeSchema).optional().meta({
847
+ description: "The ranges of the verse text that represent the Words of Jesus. Omitted if the verse contains none."
848
+ }),
849
+ /**
850
+ * The ranges of text that represent lines of poetry.
851
+ */
852
+ poem: import_zod.z.array(SimplePoemRangeSchema).optional().meta({
853
+ description: "The ranges of the verse text that represent lines of poetry. Omitted if the verse contains none."
854
+ })
855
+ }).meta({
856
+ id: "SimpleChapterVerse",
857
+ description: "Defines the schema for a verse in a simplified chapter."
858
+ });
859
+ const SimpleChapterHebrewSubtitleSchema = SimpleChapterVerseSchema.omit({
860
+ type: true,
861
+ number: true
862
+ }).extend({
863
+ /**
864
+ * Indicates that the content represents a Hebrew Subtitle.
865
+ */
866
+ type: import_zod.z.literal("hebrew_subtitle")
867
+ }).meta({
868
+ id: "SimpleChapterHebrewSubtitle",
869
+ description: "Defines the schema for a Hebrew Subtitle in a simplified chapter."
870
+ });
871
+ const SimpleChapterHeadingSchema = import_zod.z.object({
872
+ /**
873
+ * Indicates that the content represents a heading.
874
+ */
875
+ type: import_zod.z.literal("heading"),
876
+ /**
877
+ * The text of the heading.
878
+ */
879
+ text: import_zod.z.string().meta({
880
+ description: "The text of the heading."
881
+ })
882
+ }).meta({
883
+ id: "SimpleChapterHeading",
884
+ description: "Defines the schema for a heading in a simplified chapter."
885
+ });
886
+ const SimpleChapterContentSchema = import_zod.z.discriminatedUnion("type", [
887
+ SimpleChapterHeadingSchema,
888
+ ChapterLineBreakSchema,
889
+ SimpleChapterVerseSchema,
890
+ SimpleChapterHebrewSubtitleSchema
891
+ ]).meta({
892
+ id: "SimpleChapterContent",
893
+ description: "Defines a union type that represents a single piece of content in a simplified chapter. A piece of chapter content can be one of the following things: A heading, a line break, a verse, or a Hebrew Subtitle."
894
+ });
895
+ const SimpleChapterDataSchema = import_zod.z.object({
896
+ /**
897
+ * The number of the chapter.
898
+ */
899
+ number: import_zod.z.number().meta({
900
+ description: "The number of the chapter."
901
+ }),
902
+ /**
903
+ * The content of the chapter.
904
+ */
905
+ content: import_zod.z.array(SimpleChapterContentSchema).meta({
906
+ description: "The content of the chapter."
907
+ }),
908
+ /**
909
+ * The footnotes that could not be associated with a verse.
910
+ */
911
+ footnotes: import_zod.z.array(ChapterFootnoteSchema).meta({
912
+ description: "The list of footnotes that could not be associated with a verse. Footnotes that belong to a verse are included on the verse itself, so this list is usually empty."
913
+ })
914
+ }).meta({
915
+ id: "SimpleChapterData",
916
+ description: "Defines the schema for the data in a simplified chapter. Unlike the regular chapter format, each verse contains a single text string and the footnotes/formatting are represented by offsets into that string."
917
+ });
918
+ const SimpleCommentaryChapterDataSchema = import_zod.z.object({
919
+ /**
920
+ * The number of the chapter.
921
+ */
922
+ number: import_zod.z.number().meta({
923
+ description: "The number of the chapter."
924
+ }),
925
+ /**
926
+ * The introduction that the commentary provided to the chapter.
927
+ */
928
+ introduction: import_zod.z.string().optional().meta({
929
+ description: "The introduction that the commentary provided to the chapter. Not all commentaries provide an introduction to a chapter."
930
+ }),
931
+ /**
932
+ * The content of the chapter.
933
+ */
934
+ content: import_zod.z.array(SimpleChapterVerseSchema).meta({
935
+ description: "The content of the chapter."
936
+ })
937
+ }).meta({
938
+ id: "SimpleCommentaryChapterData",
939
+ description: "Defines the schema for the data in a simplified commentary chapter."
940
+ });
941
+ const SimpleTranslationBookChapterSchema = TranslationBookChapterSchema.extend({
942
+ /**
943
+ * The simplified information for the chapter.
944
+ */
945
+ chapter: import_zod.z.lazy(() => SimpleChapterDataSchema).meta({
946
+ description: "The simplified information for the chapter."
947
+ }),
948
+ /**
949
+ * The word-level annotations for the chapter's verses, using the simplified format.
950
+ */
951
+ thisChapterWords: import_zod.z.lazy(() => SimpleTranslationBookChapterWordsSchema).optional().meta({
952
+ description: "The word-level annotations (Strong's numbers and related source data) for the chapter's verses, with their offsets remapped onto the simplified verse text. Omitted if the translation doesn't have any word-level annotations for the chapter."
953
+ })
954
+ }).meta({
955
+ id: "SimpleTranslationBookChapter",
956
+ description: "Defines the schema for information about a book chapter, using the simplified chapter format."
957
+ });
958
+ const SimpleChapterWordSchema = ChapterWordSchema.omit({
959
+ contentIndex: true
960
+ }).meta({
961
+ id: "SimpleChapterWord",
962
+ description: "Defines the schema for a word-level annotation in a simplified chapter. The annotation is anchored to a range of characters in the verse's text."
963
+ });
964
+ const SimpleTranslationBookChapterWordsSchema = import_zod.z.record(import_zod.z.string(), import_zod.z.array(import_zod.z.lazy(() => SimpleChapterWordSchema))).meta({
965
+ id: "SimpleTranslationBookChapterWords",
966
+ description: "Defines the schema for the word-level annotations for a book chapter, using the simplified format. Maps a verse number to the list of annotated words in the verse, in order."
967
+ });
968
+ // Annotate the CommonJS export names for ESM import in node:
969
+ 0 && (module.exports = {
970
+ ChapterContentSchema,
971
+ ChapterDataSchema,
972
+ ChapterFootnoteSchema,
973
+ ChapterHeadingSchema,
974
+ ChapterHebrewSubtitleSchema,
975
+ ChapterLineBreakSchema,
976
+ ChapterVerseSchema,
977
+ ChapterWordSchema,
978
+ CommentaryBookChapterSchema,
979
+ CommentaryBookSchema,
980
+ CommentaryChapterDataSchema,
981
+ CommentaryProfileSchema,
982
+ CommentarySchema,
983
+ DatasetBookChapterSchema,
984
+ DatasetBookSchema,
985
+ DatasetChapterDataSchema,
986
+ DatasetChapterVerseContentSchema,
987
+ DatasetSchema,
988
+ FormattedTextSchema,
989
+ InlineHeadingSchema,
990
+ InlineLineBreakSchema,
991
+ ScoredVerseRefSchema,
992
+ SimpleChapterContentSchema,
993
+ SimpleChapterDataSchema,
994
+ SimpleChapterHeadingSchema,
995
+ SimpleChapterHebrewSubtitleSchema,
996
+ SimpleChapterVerseSchema,
997
+ SimpleChapterWordSchema,
998
+ SimpleCommentaryChapterDataSchema,
999
+ SimpleInlineHeadingSchema,
1000
+ SimplePoemRangeSchema,
1001
+ SimpleTextRangeSchema,
1002
+ SimpleTranslationBookChapterSchema,
1003
+ SimpleTranslationBookChapterWordsSchema,
1004
+ SimpleVerseFootnoteSchema,
1005
+ TranslationBookChapterAudioLinksSchema,
1006
+ TranslationBookChapterAudioTimingsSchema,
1007
+ TranslationBookChapterSchema,
1008
+ TranslationBookChapterWordsSchema,
1009
+ TranslationBookSchema,
1010
+ TranslationSchema,
1011
+ VerseFootnoteReferenceSchema
1012
+ });
17
1013
  //# sourceMappingURL=common-types.cjs.map