@helloao/tools 0.2.0 → 0.4.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 (81) hide show
  1. package/dist/cjs/generation/api.cjs +2213 -216
  2. package/dist/cjs/generation/api.cjs.map +3 -3
  3. package/dist/cjs/generation/audio.cjs +5 -5
  4. package/dist/cjs/generation/audio.cjs.map +1 -1
  5. package/dist/cjs/generation/book-order.cjs.map +1 -1
  6. package/dist/cjs/generation/common-types.cjs +782 -14
  7. package/dist/cjs/generation/common-types.cjs.map +2 -2
  8. package/dist/cjs/generation/dataset.cjs +13 -9
  9. package/dist/cjs/generation/dataset.cjs.map +2 -2
  10. package/dist/cjs/generation/index.cjs +8 -5
  11. package/dist/cjs/generation/index.cjs.map +2 -2
  12. package/dist/cjs/generation/simple.cjs +294 -0
  13. package/dist/cjs/generation/simple.cjs.map +7 -0
  14. package/dist/cjs/generation/theographic.cjs +446 -0
  15. package/dist/cjs/generation/theographic.cjs.map +7 -0
  16. package/dist/cjs/index.cjs +4 -4
  17. package/dist/cjs/index.cjs.map +1 -1
  18. package/dist/cjs/log.cjs.map +1 -1
  19. package/dist/cjs/parser/codex-parser.cjs +3 -3
  20. package/dist/cjs/parser/codex-parser.cjs.map +3 -3
  21. package/dist/cjs/parser/commentary-csv-parser.cjs +14 -3
  22. package/dist/cjs/parser/commentary-csv-parser.cjs.map +3 -3
  23. package/dist/cjs/parser/index.cjs +1 -1
  24. package/dist/cjs/parser/iterators.cjs.map +1 -1
  25. package/dist/cjs/parser/lockman-parser.cjs +1 -1
  26. package/dist/cjs/parser/lockman-parser.cjs.map +1 -1
  27. package/dist/cjs/parser/tyndale-xml-parser.cjs +1 -1
  28. package/dist/cjs/parser/tyndale-xml-parser.cjs.map +1 -1
  29. package/dist/cjs/parser/types.cjs.map +1 -1
  30. package/dist/cjs/parser/usfm-parser.cjs +2 -2
  31. package/dist/cjs/parser/usfm-parser.cjs.map +1 -1
  32. package/dist/cjs/parser/usx-parser.cjs +122 -26
  33. package/dist/cjs/parser/usx-parser.cjs.map +2 -2
  34. package/dist/cjs/parser/words.cjs +187 -0
  35. package/dist/cjs/parser/words.cjs.map +7 -0
  36. package/dist/cjs/utils.cjs +1 -1
  37. package/dist/esm/generation/api.js +2155 -214
  38. package/dist/esm/generation/api.js.map +3 -3
  39. package/dist/esm/generation/audio.js +1 -1
  40. package/dist/esm/generation/audio.js.map +1 -1
  41. package/dist/esm/generation/book-order.js.map +1 -1
  42. package/dist/esm/generation/common-types.js +738 -14
  43. package/dist/esm/generation/common-types.js.map +2 -2
  44. package/dist/esm/generation/dataset.js +6 -2
  45. package/dist/esm/generation/dataset.js.map +2 -2
  46. package/dist/esm/generation/index.js +2 -1
  47. package/dist/esm/generation/index.js.map +2 -2
  48. package/dist/esm/generation/simple.js +260 -0
  49. package/dist/esm/generation/simple.js.map +7 -0
  50. package/dist/esm/generation/theographic.js +412 -0
  51. package/dist/esm/generation/theographic.js.map +7 -0
  52. package/dist/esm/index.js.map +1 -1
  53. package/dist/esm/log.js.map +1 -1
  54. package/dist/esm/parser/codex-parser.js +3 -3
  55. package/dist/esm/parser/codex-parser.js.map +3 -3
  56. package/dist/esm/parser/commentary-csv-parser.js +3 -2
  57. package/dist/esm/parser/commentary-csv-parser.js.map +2 -2
  58. package/dist/esm/parser/iterators.js.map +1 -1
  59. package/dist/esm/parser/lockman-parser.js +1 -1
  60. package/dist/esm/parser/lockman-parser.js.map +1 -1
  61. package/dist/esm/parser/tyndale-xml-parser.js +1 -1
  62. package/dist/esm/parser/tyndale-xml-parser.js.map +1 -1
  63. package/dist/esm/parser/usfm-parser.js +1 -1
  64. package/dist/esm/parser/usfm-parser.js.map +1 -1
  65. package/dist/esm/parser/usx-parser.js +130 -26
  66. package/dist/esm/parser/usx-parser.js.map +2 -2
  67. package/dist/esm/parser/words.js +149 -0
  68. package/dist/esm/parser/words.js.map +7 -0
  69. package/dist/types/generation/api.d.ts +9006 -1101
  70. package/dist/types/generation/common-types.d.ts +1318 -106
  71. package/dist/types/generation/dataset.d.ts +17 -1
  72. package/dist/types/generation/index.d.ts +2 -1
  73. package/dist/types/generation/simple.d.ts +110 -0
  74. package/dist/types/generation/theographic.d.ts +64 -0
  75. package/dist/types/parser/commentary-csv-parser.d.ts +1 -1
  76. package/dist/types/parser/lockman-parser.d.ts +1 -1
  77. package/dist/types/parser/tyndale-xml-parser.d.ts +1 -1
  78. package/dist/types/parser/types.d.ts +63 -0
  79. package/dist/types/parser/usx-parser.d.ts +6 -5
  80. package/dist/types/parser/words.d.ts +104 -0
  81. package/package.json +3 -2
@@ -25,6 +25,7 @@ __export(common_types_exports, {
25
25
  ChapterHebrewSubtitleSchema: () => ChapterHebrewSubtitleSchema,
26
26
  ChapterLineBreakSchema: () => ChapterLineBreakSchema,
27
27
  ChapterVerseSchema: () => ChapterVerseSchema,
28
+ ChapterWordSchema: () => ChapterWordSchema,
28
29
  CommentaryBookChapterSchema: () => CommentaryBookChapterSchema,
29
30
  CommentaryBookSchema: () => CommentaryBookSchema,
30
31
  CommentaryChapterDataSchema: () => CommentaryChapterDataSchema,
@@ -34,13 +35,34 @@ __export(common_types_exports, {
34
35
  DatasetBookSchema: () => DatasetBookSchema,
35
36
  DatasetChapterDataSchema: () => DatasetChapterDataSchema,
36
37
  DatasetChapterVerseContentSchema: () => DatasetChapterVerseContentSchema,
38
+ DatasetEntityRefSchema: () => DatasetEntityRefSchema,
39
+ DatasetEntityTypeSchema: () => DatasetEntityTypeSchema,
40
+ DatasetEventSchema: () => DatasetEventSchema,
41
+ DatasetPeopleGroupSchema: () => DatasetPeopleGroupSchema,
42
+ DatasetPersonSchema: () => DatasetPersonSchema,
43
+ DatasetPlaceSchema: () => DatasetPlaceSchema,
37
44
  DatasetSchema: () => DatasetSchema,
38
45
  FormattedTextSchema: () => FormattedTextSchema,
39
46
  InlineHeadingSchema: () => InlineHeadingSchema,
40
47
  InlineLineBreakSchema: () => InlineLineBreakSchema,
41
48
  ScoredVerseRefSchema: () => ScoredVerseRefSchema,
49
+ SimpleChapterContentSchema: () => SimpleChapterContentSchema,
50
+ SimpleChapterDataSchema: () => SimpleChapterDataSchema,
51
+ SimpleChapterHeadingSchema: () => SimpleChapterHeadingSchema,
52
+ SimpleChapterHebrewSubtitleSchema: () => SimpleChapterHebrewSubtitleSchema,
53
+ SimpleChapterVerseSchema: () => SimpleChapterVerseSchema,
54
+ SimpleChapterWordSchema: () => SimpleChapterWordSchema,
55
+ SimpleCommentaryChapterDataSchema: () => SimpleCommentaryChapterDataSchema,
56
+ SimpleInlineHeadingSchema: () => SimpleInlineHeadingSchema,
57
+ SimplePoemRangeSchema: () => SimplePoemRangeSchema,
58
+ SimpleTextRangeSchema: () => SimpleTextRangeSchema,
59
+ SimpleTranslationBookChapterSchema: () => SimpleTranslationBookChapterSchema,
60
+ SimpleTranslationBookChapterWordsSchema: () => SimpleTranslationBookChapterWordsSchema,
61
+ SimpleVerseFootnoteSchema: () => SimpleVerseFootnoteSchema,
42
62
  TranslationBookChapterAudioLinksSchema: () => TranslationBookChapterAudioLinksSchema,
63
+ TranslationBookChapterAudioTimingsSchema: () => TranslationBookChapterAudioTimingsSchema,
43
64
  TranslationBookChapterSchema: () => TranslationBookChapterSchema,
65
+ TranslationBookChapterWordsSchema: () => TranslationBookChapterWordsSchema,
44
66
  TranslationBookSchema: () => TranslationBookSchema,
45
67
  TranslationSchema: () => TranslationSchema,
46
68
  VerseFootnoteReferenceSchema: () => VerseFootnoteReferenceSchema
@@ -275,13 +297,13 @@ const CommentaryBookSchema = import_zod.z.object({
275
297
  /**
276
298
  * The commentary's introduction for the book.
277
299
  */
278
- introduction: import_zod.z.string().optional().meta({
300
+ introduction: import_zod.z.string().nullable().transform((x) => x ?? void 0).optional().pipe(import_zod.z.string().optional()).meta({
279
301
  description: "The commentary's introduction for the book. Undefined if the commentary didn't provide an introduction for the book."
280
302
  }),
281
303
  /**
282
304
  * The summary of the commentary's introduction for the book.
283
305
  */
284
- introductionSummary: import_zod.z.string().optional().meta({
306
+ introductionSummary: import_zod.z.string().nullable().transform((x) => x ?? void 0).optional().pipe(import_zod.z.string().optional()).meta({
285
307
  description: "The summary of the commentary's introduction for the book. Undefined if the commentary didn't provide a summary for the book."
286
308
  }),
287
309
  /**
@@ -362,6 +384,417 @@ const ScoredVerseRefSchema = import_utils.VerseRefSchema.extend({
362
384
  id: "ScoredVerseRef",
363
385
  description: "Defines the schema for information about a verse reference that has an arbitrary score attached to it."
364
386
  });
387
+ const DatasetEntityTypeSchema = import_zod.z.enum(["people", "places", "events", "groups"]).meta({
388
+ id: "DatasetEntityType",
389
+ description: "The type of an entity in a dataset. Matches the collection segment of the entity API paths, so the API link for an entity can be constructed as `/api/d/{dataset}/{type}/{id}.json`."
390
+ });
391
+ const DatasetEntityRefSchema = import_zod.z.object({
392
+ /**
393
+ * The ID of the entity that is being referenced.
394
+ */
395
+ id: import_zod.z.string().meta({
396
+ description: "The ID of the entity that is being referenced."
397
+ }),
398
+ /**
399
+ * The type of the entity that is being referenced.
400
+ * Matches the collection segment of the entity's API link,
401
+ * so the link can be constructed as `/api/d/{dataset}/{type}/{id}.json`.
402
+ */
403
+ type: DatasetEntityTypeSchema.meta({
404
+ description: "The type of the entity that is being referenced. Matches the collection segment of the entity's API link, so the link can be constructed as `/api/d/{dataset}/{type}/{id}.json`."
405
+ }),
406
+ /**
407
+ * The name of the entity that is being referenced.
408
+ */
409
+ name: import_zod.z.string().optional().meta({
410
+ description: "The name of the entity that is being referenced."
411
+ }),
412
+ /**
413
+ * The API link for the entity that is being referenced.
414
+ * Only present in API responses.
415
+ */
416
+ apiLink: import_zod.z.string().optional().meta({
417
+ description: "The API link for the entity that is being referenced. Relative to the API origin. Only present in API responses."
418
+ })
419
+ }).meta({
420
+ id: "DatasetEntityRef",
421
+ description: "Defines the schema for a reference to another entity (person, place, event, or people group) in a dataset."
422
+ });
423
+ const DatasetPersonSchema = import_zod.z.object({
424
+ /**
425
+ * The ID of the person.
426
+ */
427
+ id: import_zod.z.string().meta({
428
+ description: "The ID of the person."
429
+ }),
430
+ /**
431
+ * The name of the person.
432
+ */
433
+ name: import_zod.z.string().meta({
434
+ description: "The name of the person."
435
+ }),
436
+ /**
437
+ * Other names that the person is called by.
438
+ */
439
+ alsoCalled: import_zod.z.array(import_zod.z.string()).optional().meta({
440
+ description: "Other names that the person is called by."
441
+ }),
442
+ /**
443
+ * Whether the name of the person is a proper name.
444
+ */
445
+ isProperName: import_zod.z.boolean().optional().meta({
446
+ description: "Whether the name of the person is a proper name."
447
+ }),
448
+ /**
449
+ * The gender of the person.
450
+ */
451
+ gender: import_zod.z.string().optional().meta({
452
+ description: "The gender of the person."
453
+ }),
454
+ /**
455
+ * The description of the person.
456
+ * Each string is a paragraph.
457
+ */
458
+ description: import_zod.z.array(import_zod.z.string()).optional().meta({
459
+ description: "The description of the person. Each string is a paragraph."
460
+ }),
461
+ /**
462
+ * The year that the person was born.
463
+ * Negative numbers are years BC. Positive numbers are years AD.
464
+ */
465
+ birthYear: import_zod.z.number().optional().meta({
466
+ description: "The year that the person was born. Negative numbers are years BC. Positive numbers are years AD."
467
+ }),
468
+ /**
469
+ * The year that the person died.
470
+ * Negative numbers are years BC. Positive numbers are years AD.
471
+ */
472
+ deathYear: import_zod.z.number().optional().meta({
473
+ description: "The year that the person died. Negative numbers are years BC. Positive numbers are years AD."
474
+ }),
475
+ /**
476
+ * The earliest year that the person is mentioned in.
477
+ * Negative numbers are years BC. Positive numbers are years AD.
478
+ */
479
+ minYear: import_zod.z.number().optional().meta({
480
+ description: "The earliest year that the person is mentioned in. Negative numbers are years BC. Positive numbers are years AD."
481
+ }),
482
+ /**
483
+ * The latest year that the person is mentioned in.
484
+ * Negative numbers are years BC. Positive numbers are years AD.
485
+ */
486
+ maxYear: import_zod.z.number().optional().meta({
487
+ description: "The latest year that the person is mentioned in. Negative numbers are years BC. Positive numbers are years AD."
488
+ }),
489
+ /**
490
+ * The place that the person was born in.
491
+ */
492
+ birthPlace: DatasetEntityRefSchema.optional().meta({
493
+ description: "The place that the person was born in."
494
+ }),
495
+ /**
496
+ * The place that the person died in.
497
+ */
498
+ deathPlace: DatasetEntityRefSchema.optional().meta({
499
+ description: "The place that the person died in."
500
+ }),
501
+ /**
502
+ * The father(s) of the person.
503
+ */
504
+ father: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
505
+ description: "The father(s) of the person."
506
+ }),
507
+ /**
508
+ * The mother(s) of the person.
509
+ */
510
+ mother: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
511
+ description: "The mother(s) of the person."
512
+ }),
513
+ /**
514
+ * The partners (spouses) of the person.
515
+ */
516
+ partners: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
517
+ description: "The partners (spouses) of the person."
518
+ }),
519
+ /**
520
+ * The children of the person.
521
+ */
522
+ children: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
523
+ description: "The children of the person."
524
+ }),
525
+ /**
526
+ * The siblings of the person.
527
+ */
528
+ siblings: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
529
+ description: "The siblings of the person."
530
+ }),
531
+ /**
532
+ * The half-siblings of the person that share the same mother.
533
+ */
534
+ halfSiblingsSameMother: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
535
+ description: "The half-siblings of the person that share the same mother."
536
+ }),
537
+ /**
538
+ * The half-siblings of the person that share the same father.
539
+ */
540
+ halfSiblingsSameFather: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
541
+ description: "The half-siblings of the person that share the same father."
542
+ }),
543
+ /**
544
+ * The people groups that the person is a member of.
545
+ */
546
+ memberOf: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
547
+ description: "The people groups that the person is a member of."
548
+ }),
549
+ /**
550
+ * The events that the person participated in.
551
+ */
552
+ events: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
553
+ description: "The events that the person participated in."
554
+ }),
555
+ /**
556
+ * The list of Bible references that mention the person.
557
+ * Sorted by book order, chapter, and verse.
558
+ * Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.
559
+ */
560
+ references: import_zod.z.array(import_utils.VerseRefSchema).meta({
561
+ description: "The list of Bible references that mention the person. Sorted by book order, chapter, and verse. Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`."
562
+ })
563
+ }).meta({
564
+ id: "DatasetPerson",
565
+ description: "Defines the schema for information about a person in a dataset."
566
+ });
567
+ const DatasetPlaceSchema = import_zod.z.object({
568
+ /**
569
+ * The ID of the place.
570
+ */
571
+ id: import_zod.z.string().meta({
572
+ description: "The ID of the place."
573
+ }),
574
+ /**
575
+ * The name of the place.
576
+ */
577
+ name: import_zod.z.string().meta({
578
+ description: "The name of the place."
579
+ }),
580
+ /**
581
+ * The name of the place as it appears in the King James Version.
582
+ */
583
+ kjvName: import_zod.z.string().optional().meta({
584
+ description: "The name of the place as it appears in the King James Version."
585
+ }),
586
+ /**
587
+ * The name of the place as it appears in the English Standard Version.
588
+ */
589
+ esvName: import_zod.z.string().optional().meta({
590
+ description: "The name of the place as it appears in the English Standard Version."
591
+ }),
592
+ /**
593
+ * Other names that the place is called by.
594
+ */
595
+ aliases: import_zod.z.array(import_zod.z.string()).optional().meta({
596
+ description: "Other names that the place is called by."
597
+ }),
598
+ /**
599
+ * The type of geographical feature that the place is.
600
+ * For example, "City", "Region", "Mountain", "Water", etc.
601
+ */
602
+ featureType: import_zod.z.string().optional().meta({
603
+ description: 'The type of geographical feature that the place is. For example, "City", "Region", "Mountain", "Water", etc.'
604
+ }),
605
+ /**
606
+ * The sub-type of geographical feature that the place is.
607
+ */
608
+ featureSubType: import_zod.z.string().optional().meta({
609
+ description: "The sub-type of geographical feature that the place is."
610
+ }),
611
+ /**
612
+ * The latitude of the place.
613
+ */
614
+ latitude: import_zod.z.number().optional().meta({
615
+ description: "The latitude of the place."
616
+ }),
617
+ /**
618
+ * The longitude of the place.
619
+ */
620
+ longitude: import_zod.z.number().optional().meta({
621
+ description: "The longitude of the place."
622
+ }),
623
+ /**
624
+ * How precise the latitude and longitude of the place are.
625
+ */
626
+ precision: import_zod.z.string().optional().meta({
627
+ description: "How precise the latitude and longitude of the place are."
628
+ }),
629
+ /**
630
+ * The description of the place.
631
+ * Each string is a paragraph.
632
+ */
633
+ description: import_zod.z.array(import_zod.z.string()).optional().meta({
634
+ description: "The description of the place. Each string is a paragraph."
635
+ }),
636
+ /**
637
+ * The comment on the place from the dataset authors.
638
+ */
639
+ comment: import_zod.z.string().optional().meta({
640
+ description: "The comment on the place from the dataset authors."
641
+ }),
642
+ /**
643
+ * The root place for this place.
644
+ * For example, the root place of "Sea of Galilee" and "Sea of Tiberias" is the same body of water.
645
+ */
646
+ rootPlace: DatasetEntityRefSchema.optional().meta({
647
+ description: "The root place for this place. Different names for the same geographical location share the same root place."
648
+ }),
649
+ /**
650
+ * The place that this place is a duplicate of.
651
+ */
652
+ duplicateOf: DatasetEntityRefSchema.optional().meta({
653
+ description: "The place that this place is a duplicate of."
654
+ }),
655
+ /**
656
+ * The people that have been at the place.
657
+ */
658
+ people: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
659
+ description: "The people that have been at the place."
660
+ }),
661
+ /**
662
+ * The people that were born at the place.
663
+ */
664
+ peopleBorn: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
665
+ description: "The people that were born at the place."
666
+ }),
667
+ /**
668
+ * The people that died at the place.
669
+ */
670
+ peopleDied: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
671
+ description: "The people that died at the place."
672
+ }),
673
+ /**
674
+ * The events that happened at the place.
675
+ */
676
+ events: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
677
+ description: "The events that happened at the place."
678
+ }),
679
+ /**
680
+ * The list of Bible references that mention the place.
681
+ * Sorted by book order, chapter, and verse.
682
+ * Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.
683
+ */
684
+ references: import_zod.z.array(import_utils.VerseRefSchema).meta({
685
+ description: "The list of Bible references that mention the place. Sorted by book order, chapter, and verse. Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`."
686
+ })
687
+ }).meta({
688
+ id: "DatasetPlace",
689
+ description: "Defines the schema for information about a place in a dataset."
690
+ });
691
+ const DatasetEventSchema = import_zod.z.object({
692
+ /**
693
+ * The ID of the event.
694
+ */
695
+ id: import_zod.z.string().meta({
696
+ description: "The ID of the event."
697
+ }),
698
+ /**
699
+ * The name of the event.
700
+ */
701
+ name: import_zod.z.string().meta({
702
+ description: "The name of the event."
703
+ }),
704
+ /**
705
+ * The date that the event started at.
706
+ * Negative numbers are years BC. Positive numbers are years AD.
707
+ * More specific dates use the `YYYY-MM-DD` format.
708
+ */
709
+ startDate: import_zod.z.string().optional().meta({
710
+ description: "The date that the event started at. Negative numbers are years BC. Positive numbers are years AD. More specific dates use the `YYYY-MM-DD` format."
711
+ }),
712
+ /**
713
+ * The duration of the event.
714
+ * For example, "1D" is one day and "40Y" is fourty years.
715
+ */
716
+ duration: import_zod.z.string().optional().meta({
717
+ description: 'The duration of the event. For example, "1D" is one day and "40Y" is fourty years.'
718
+ }),
719
+ /**
720
+ * The people that participated in the event.
721
+ */
722
+ participants: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
723
+ description: "The people that participated in the event."
724
+ }),
725
+ /**
726
+ * The places that the event happened at.
727
+ */
728
+ locations: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
729
+ description: "The places that the event happened at."
730
+ }),
731
+ /**
732
+ * The people groups that participated in the event.
733
+ */
734
+ groups: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
735
+ description: "The people groups that participated in the event."
736
+ }),
737
+ /**
738
+ * The event that this event is a part of.
739
+ */
740
+ partOf: DatasetEntityRefSchema.optional().meta({
741
+ description: "The event that this event is a part of."
742
+ }),
743
+ /**
744
+ * The event that happened before this event.
745
+ */
746
+ predecessor: DatasetEntityRefSchema.optional().meta({
747
+ description: "The event that happened before this event."
748
+ }),
749
+ /**
750
+ * The list of Bible references that describe the event.
751
+ * Sorted by book order, chapter, and verse.
752
+ * Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.
753
+ */
754
+ references: import_zod.z.array(import_utils.VerseRefSchema).meta({
755
+ description: "The list of Bible references that describe the event. Sorted by book order, chapter, and verse. Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`."
756
+ })
757
+ }).meta({
758
+ id: "DatasetEvent",
759
+ description: "Defines the schema for information about an event in a dataset."
760
+ });
761
+ const DatasetPeopleGroupSchema = import_zod.z.object({
762
+ /**
763
+ * The ID of the people group.
764
+ */
765
+ id: import_zod.z.string().meta({
766
+ description: "The ID of the people group."
767
+ }),
768
+ /**
769
+ * The name of the people group.
770
+ */
771
+ name: import_zod.z.string().meta({
772
+ description: "The name of the people group."
773
+ }),
774
+ /**
775
+ * The people that are members of the people group.
776
+ */
777
+ members: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
778
+ description: "The people that are members of the people group."
779
+ }),
780
+ /**
781
+ * The events that the people group participated in.
782
+ */
783
+ events: import_zod.z.array(DatasetEntityRefSchema).optional().meta({
784
+ description: "The events that the people group participated in."
785
+ }),
786
+ /**
787
+ * The list of Bible references that mention the people group.
788
+ * Sorted by book order, chapter, and verse.
789
+ * Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.
790
+ */
791
+ references: import_zod.z.array(import_utils.VerseRefSchema).meta({
792
+ description: "The list of Bible references that mention the people group. Sorted by book order, chapter, and verse. Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`."
793
+ })
794
+ }).meta({
795
+ id: "DatasetPeopleGroup",
796
+ description: "Defines the schema for information about a people group in a dataset."
797
+ });
365
798
  const CommentaryProfileSchema = import_zod.z.object({
366
799
  /**
367
800
  * The ID of the profile.
@@ -394,6 +827,19 @@ const TranslationBookChapterSchema = import_zod.z.object({
394
827
  */
395
828
  thisChapterAudioLinks: import_zod.z.lazy(() => TranslationBookChapterAudioLinksSchema).meta({
396
829
  description: "The links to different audio versions for the chapter."
830
+ }),
831
+ /**
832
+ * The audio timings (per-verse start times, in seconds) for different audio versions for the chapter.
833
+ */
834
+ thisChapterAudioTimings: import_zod.z.lazy(() => TranslationBookChapterAudioTimingsSchema).meta({
835
+ description: "The audio timings (per-verse start times, in seconds) for different audio versions for the chapter."
836
+ }),
837
+ /**
838
+ * The word-level annotations for the chapter's verses.
839
+ * Omitted if the translation doesn't have any word-level annotations for the chapter.
840
+ */
841
+ thisChapterWords: import_zod.z.lazy(() => TranslationBookChapterWordsSchema).optional().meta({
842
+ 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."
397
843
  })
398
844
  }).meta({
399
845
  id: "TranslationBookChapter",
@@ -414,6 +860,73 @@ const TranslationBookChapterAudioLinksSchema = import_zod.z.record(import_zod.z.
414
860
  id: "TranslationBookChapterAudioLinks",
415
861
  description: "Defines the schema for the audio links for a book chapter."
416
862
  });
863
+ const TranslationBookChapterAudioTimingsSchema = import_zod.z.record(import_zod.z.string(), import_zod.z.array(import_zod.z.number())).meta({
864
+ id: "TranslationBookChapterAudioTimings",
865
+ 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."
866
+ });
867
+ const ChapterWordSchema = import_zod.z.object({
868
+ /**
869
+ * The index of the item in the verse's content array that the annotation applies to.
870
+ */
871
+ contentIndex: import_zod.z.number().meta({
872
+ description: "The index of the item in the verse's content array that the annotation applies to."
873
+ }),
874
+ /**
875
+ * The index of the first character of the annotated word.
876
+ */
877
+ start: import_zod.z.number().meta({
878
+ description: "The index of the first character of the annotated word in the content item's text."
879
+ }),
880
+ /**
881
+ * The index after the last character of the annotated word.
882
+ */
883
+ end: import_zod.z.number().meta({
884
+ 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."
885
+ }),
886
+ /**
887
+ * The Strong's number(s) for the word.
888
+ */
889
+ strongs: import_zod.z.array(import_zod.z.string()).optional().meta({
890
+ description: "The Strong's number(s) for the word. Omitted if the translation only provided other annotations for the word."
891
+ }),
892
+ /**
893
+ * The dictionary (citation) form of the word.
894
+ */
895
+ lemma: import_zod.z.string().optional().meta({
896
+ description: "The dictionary (citation) form of the word. Omitted if the translation did not provide one."
897
+ }),
898
+ /**
899
+ * The morphology parse code for the word.
900
+ */
901
+ morph: import_zod.z.string().optional().meta({
902
+ description: "The morphology parse code for the word. Omitted if the translation did not provide one."
903
+ }),
904
+ /**
905
+ * The pointer to the word in the source text.
906
+ */
907
+ srcloc: import_zod.z.string().optional().meta({
908
+ description: "The pointer to the word in the source text, in the <sourceName>:<location> format. Omitted if the translation did not provide one."
909
+ }),
910
+ /**
911
+ * Which occurrence of the source word this word is.
912
+ */
913
+ occurrence: import_zod.z.number().optional().meta({
914
+ description: "Which occurrence of the source word this word is. 1-based. Omitted if the translation did not provide one."
915
+ }),
916
+ /**
917
+ * The total number of times that the source word occurs.
918
+ */
919
+ occurrences: import_zod.z.number().optional().meta({
920
+ description: "The total number of times that the source word occurs. Omitted if the translation did not provide one."
921
+ })
922
+ }).meta({
923
+ id: "ChapterWord",
924
+ 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."
925
+ });
926
+ const TranslationBookChapterWordsSchema = import_zod.z.record(import_zod.z.string(), import_zod.z.array(import_zod.z.lazy(() => ChapterWordSchema))).meta({
927
+ id: "TranslationBookChapterWords",
928
+ 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."
929
+ });
417
930
  const ChapterDataSchema = import_zod.z.object({
418
931
  /**
419
932
  * The number of the chapter.
@@ -489,11 +1002,13 @@ const ChapterHebrewSubtitleSchema = import_zod.z.object({
489
1002
  * The list of content that is contained in the subtitle.
490
1003
  * Each element in the list could be a string, formatted text, or a footnote reference.
491
1004
  */
492
- content: import_zod.z.array(import_zod.z.union([
493
- import_zod.z.string(),
494
- import_zod.z.lazy(() => FormattedTextSchema),
495
- import_zod.z.lazy(() => VerseFootnoteReferenceSchema)
496
- ])).meta({
1005
+ content: import_zod.z.array(
1006
+ import_zod.z.union([
1007
+ import_zod.z.string(),
1008
+ import_zod.z.lazy(() => FormattedTextSchema),
1009
+ import_zod.z.lazy(() => VerseFootnoteReferenceSchema)
1010
+ ])
1011
+ ).meta({
497
1012
  description: "The content that is contained in the subtitle. Each element in the list could be a string, formatted text, or a footnote reference."
498
1013
  })
499
1014
  }).meta({
@@ -515,13 +1030,15 @@ const ChapterVerseSchema = import_zod.z.object({
515
1030
  * The list of content for the verse.
516
1031
  * Each element in the list could be a string, formatted text, or a footnote reference.
517
1032
  */
518
- content: import_zod.z.array(import_zod.z.union([
519
- import_zod.z.string(),
520
- import_zod.z.lazy(() => FormattedTextSchema),
521
- import_zod.z.lazy(() => InlineHeadingSchema),
522
- import_zod.z.lazy(() => InlineLineBreakSchema),
523
- import_zod.z.lazy(() => VerseFootnoteReferenceSchema)
524
- ])).meta({
1033
+ content: import_zod.z.array(
1034
+ import_zod.z.union([
1035
+ import_zod.z.string(),
1036
+ import_zod.z.lazy(() => FormattedTextSchema),
1037
+ import_zod.z.lazy(() => InlineHeadingSchema),
1038
+ import_zod.z.lazy(() => InlineLineBreakSchema),
1039
+ import_zod.z.lazy(() => VerseFootnoteReferenceSchema)
1040
+ ])
1041
+ ).meta({
525
1042
  description: "The list of content for the verse. Each element in the list could be a string, formatted text, or a footnote reference."
526
1043
  })
527
1044
  }).meta({
@@ -636,6 +1153,235 @@ const ChapterFootnoteSchema = import_zod.z.object({
636
1153
  id: "ChapterFootnote",
637
1154
  description: "Defines the schema for information about a footnote."
638
1155
  });
1156
+ const SimpleTextRangeSchema = import_zod.z.object({
1157
+ /**
1158
+ * The index of the first character in the range.
1159
+ */
1160
+ start: import_zod.z.number().meta({
1161
+ description: "The index of the first character of the range in the verse text. Measured in UTF-16 code units."
1162
+ }),
1163
+ /**
1164
+ * The index after the last character in the range.
1165
+ */
1166
+ end: import_zod.z.number().meta({
1167
+ description: "The index after the last character of the range in the verse text. Measured in UTF-16 code units."
1168
+ })
1169
+ }).meta({
1170
+ id: "SimpleTextRange",
1171
+ 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."
1172
+ });
1173
+ const SimplePoemRangeSchema = SimpleTextRangeSchema.extend({
1174
+ /**
1175
+ * The level of indent that the poem line should be displayed with.
1176
+ */
1177
+ level: import_zod.z.number().meta({
1178
+ description: "The level of indent that the line of poetry should be displayed with."
1179
+ })
1180
+ }).meta({
1181
+ id: "SimplePoemRange",
1182
+ description: "Defines the schema for a range of text inside a simplified verse that represents a line of poetry."
1183
+ });
1184
+ const SimpleVerseFootnoteSchema = import_zod.z.object({
1185
+ /**
1186
+ * The ID of the note.
1187
+ */
1188
+ noteId: import_zod.z.number().meta({
1189
+ description: "The ID of the note."
1190
+ }),
1191
+ /**
1192
+ * The index in the verse text that the footnote caller should be inserted at.
1193
+ */
1194
+ offset: import_zod.z.number().meta({
1195
+ description: "The index in the verse text that the footnote caller should be inserted at. Measured in UTF-16 code units."
1196
+ }),
1197
+ /**
1198
+ * The text of the footnote.
1199
+ */
1200
+ text: import_zod.z.string().meta({
1201
+ description: "The text of the footnote."
1202
+ }),
1203
+ /**
1204
+ * The caller that should be used for the footnote.
1205
+ * See ChapterFootnote for more information.
1206
+ */
1207
+ caller: import_zod.z.union([import_zod.z.literal("+"), import_zod.z.string(), import_zod.z.null()]).meta({
1208
+ 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.'
1209
+ })
1210
+ }).meta({
1211
+ id: "SimpleVerseFootnote",
1212
+ 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."
1213
+ });
1214
+ const SimpleInlineHeadingSchema = import_zod.z.object({
1215
+ /**
1216
+ * The index in the verse text that the heading occurs at.
1217
+ */
1218
+ offset: import_zod.z.number().meta({
1219
+ description: "The index in the verse text that the heading occurs at. Measured in UTF-16 code units."
1220
+ }),
1221
+ /**
1222
+ * The text of the heading.
1223
+ */
1224
+ text: import_zod.z.string().meta({
1225
+ description: "The text of the heading."
1226
+ })
1227
+ }).meta({
1228
+ id: "SimpleInlineHeading",
1229
+ description: "Defines the schema for a heading that is embedded in a simplified verse."
1230
+ });
1231
+ const SimpleChapterVerseSchema = import_zod.z.object({
1232
+ /**
1233
+ * Indicates that the content is a verse.
1234
+ */
1235
+ type: import_zod.z.literal("verse"),
1236
+ /**
1237
+ * The number of the verse.
1238
+ */
1239
+ number: import_zod.z.number().meta({
1240
+ description: "The number of the verse."
1241
+ }),
1242
+ /**
1243
+ * The text of the verse.
1244
+ */
1245
+ text: import_zod.z.string().meta({
1246
+ description: "The text of the verse. Lines of poetry and line breaks are separated by newline (\\n) characters."
1247
+ }),
1248
+ /**
1249
+ * The footnotes that occur in the verse.
1250
+ */
1251
+ footnotes: import_zod.z.array(SimpleVerseFootnoteSchema).meta({
1252
+ description: "The footnotes that occur in the verse."
1253
+ }),
1254
+ /**
1255
+ * The headings that occur in the verse.
1256
+ */
1257
+ headings: import_zod.z.array(SimpleInlineHeadingSchema).optional().meta({
1258
+ description: "The headings that occur in the middle of the verse. Omitted if the verse contains no inline headings."
1259
+ }),
1260
+ /**
1261
+ * The ranges of text that represent the Words of Jesus.
1262
+ */
1263
+ wordsOfJesus: import_zod.z.array(SimpleTextRangeSchema).optional().meta({
1264
+ description: "The ranges of the verse text that represent the Words of Jesus. Omitted if the verse contains none."
1265
+ }),
1266
+ /**
1267
+ * The ranges of text that represent lines of poetry.
1268
+ */
1269
+ poem: import_zod.z.array(SimplePoemRangeSchema).optional().meta({
1270
+ description: "The ranges of the verse text that represent lines of poetry. Omitted if the verse contains none."
1271
+ })
1272
+ }).meta({
1273
+ id: "SimpleChapterVerse",
1274
+ description: "Defines the schema for a verse in a simplified chapter."
1275
+ });
1276
+ const SimpleChapterHebrewSubtitleSchema = SimpleChapterVerseSchema.omit({
1277
+ type: true,
1278
+ number: true
1279
+ }).extend({
1280
+ /**
1281
+ * Indicates that the content represents a Hebrew Subtitle.
1282
+ */
1283
+ type: import_zod.z.literal("hebrew_subtitle")
1284
+ }).meta({
1285
+ id: "SimpleChapterHebrewSubtitle",
1286
+ description: "Defines the schema for a Hebrew Subtitle in a simplified chapter."
1287
+ });
1288
+ const SimpleChapterHeadingSchema = import_zod.z.object({
1289
+ /**
1290
+ * Indicates that the content represents a heading.
1291
+ */
1292
+ type: import_zod.z.literal("heading"),
1293
+ /**
1294
+ * The text of the heading.
1295
+ */
1296
+ text: import_zod.z.string().meta({
1297
+ description: "The text of the heading."
1298
+ })
1299
+ }).meta({
1300
+ id: "SimpleChapterHeading",
1301
+ description: "Defines the schema for a heading in a simplified chapter."
1302
+ });
1303
+ const SimpleChapterContentSchema = import_zod.z.discriminatedUnion("type", [
1304
+ SimpleChapterHeadingSchema,
1305
+ ChapterLineBreakSchema,
1306
+ SimpleChapterVerseSchema,
1307
+ SimpleChapterHebrewSubtitleSchema
1308
+ ]).meta({
1309
+ id: "SimpleChapterContent",
1310
+ 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."
1311
+ });
1312
+ const SimpleChapterDataSchema = import_zod.z.object({
1313
+ /**
1314
+ * The number of the chapter.
1315
+ */
1316
+ number: import_zod.z.number().meta({
1317
+ description: "The number of the chapter."
1318
+ }),
1319
+ /**
1320
+ * The content of the chapter.
1321
+ */
1322
+ content: import_zod.z.array(SimpleChapterContentSchema).meta({
1323
+ description: "The content of the chapter."
1324
+ }),
1325
+ /**
1326
+ * The footnotes that could not be associated with a verse.
1327
+ */
1328
+ footnotes: import_zod.z.array(ChapterFootnoteSchema).meta({
1329
+ 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."
1330
+ })
1331
+ }).meta({
1332
+ id: "SimpleChapterData",
1333
+ 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."
1334
+ });
1335
+ const SimpleCommentaryChapterDataSchema = import_zod.z.object({
1336
+ /**
1337
+ * The number of the chapter.
1338
+ */
1339
+ number: import_zod.z.number().meta({
1340
+ description: "The number of the chapter."
1341
+ }),
1342
+ /**
1343
+ * The introduction that the commentary provided to the chapter.
1344
+ */
1345
+ introduction: import_zod.z.string().optional().meta({
1346
+ description: "The introduction that the commentary provided to the chapter. Not all commentaries provide an introduction to a chapter."
1347
+ }),
1348
+ /**
1349
+ * The content of the chapter.
1350
+ */
1351
+ content: import_zod.z.array(SimpleChapterVerseSchema).meta({
1352
+ description: "The content of the chapter."
1353
+ })
1354
+ }).meta({
1355
+ id: "SimpleCommentaryChapterData",
1356
+ description: "Defines the schema for the data in a simplified commentary chapter."
1357
+ });
1358
+ const SimpleTranslationBookChapterSchema = TranslationBookChapterSchema.extend({
1359
+ /**
1360
+ * The simplified information for the chapter.
1361
+ */
1362
+ chapter: import_zod.z.lazy(() => SimpleChapterDataSchema).meta({
1363
+ description: "The simplified information for the chapter."
1364
+ }),
1365
+ /**
1366
+ * The word-level annotations for the chapter's verses, using the simplified format.
1367
+ */
1368
+ thisChapterWords: import_zod.z.lazy(() => SimpleTranslationBookChapterWordsSchema).optional().meta({
1369
+ 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."
1370
+ })
1371
+ }).meta({
1372
+ id: "SimpleTranslationBookChapter",
1373
+ description: "Defines the schema for information about a book chapter, using the simplified chapter format."
1374
+ });
1375
+ const SimpleChapterWordSchema = ChapterWordSchema.omit({
1376
+ contentIndex: true
1377
+ }).meta({
1378
+ id: "SimpleChapterWord",
1379
+ 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."
1380
+ });
1381
+ const SimpleTranslationBookChapterWordsSchema = import_zod.z.record(import_zod.z.string(), import_zod.z.array(import_zod.z.lazy(() => SimpleChapterWordSchema))).meta({
1382
+ id: "SimpleTranslationBookChapterWords",
1383
+ 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."
1384
+ });
639
1385
  // Annotate the CommonJS export names for ESM import in node:
640
1386
  0 && (module.exports = {
641
1387
  ChapterContentSchema,
@@ -645,6 +1391,7 @@ const ChapterFootnoteSchema = import_zod.z.object({
645
1391
  ChapterHebrewSubtitleSchema,
646
1392
  ChapterLineBreakSchema,
647
1393
  ChapterVerseSchema,
1394
+ ChapterWordSchema,
648
1395
  CommentaryBookChapterSchema,
649
1396
  CommentaryBookSchema,
650
1397
  CommentaryChapterDataSchema,
@@ -654,13 +1401,34 @@ const ChapterFootnoteSchema = import_zod.z.object({
654
1401
  DatasetBookSchema,
655
1402
  DatasetChapterDataSchema,
656
1403
  DatasetChapterVerseContentSchema,
1404
+ DatasetEntityRefSchema,
1405
+ DatasetEntityTypeSchema,
1406
+ DatasetEventSchema,
1407
+ DatasetPeopleGroupSchema,
1408
+ DatasetPersonSchema,
1409
+ DatasetPlaceSchema,
657
1410
  DatasetSchema,
658
1411
  FormattedTextSchema,
659
1412
  InlineHeadingSchema,
660
1413
  InlineLineBreakSchema,
661
1414
  ScoredVerseRefSchema,
1415
+ SimpleChapterContentSchema,
1416
+ SimpleChapterDataSchema,
1417
+ SimpleChapterHeadingSchema,
1418
+ SimpleChapterHebrewSubtitleSchema,
1419
+ SimpleChapterVerseSchema,
1420
+ SimpleChapterWordSchema,
1421
+ SimpleCommentaryChapterDataSchema,
1422
+ SimpleInlineHeadingSchema,
1423
+ SimplePoemRangeSchema,
1424
+ SimpleTextRangeSchema,
1425
+ SimpleTranslationBookChapterSchema,
1426
+ SimpleTranslationBookChapterWordsSchema,
1427
+ SimpleVerseFootnoteSchema,
662
1428
  TranslationBookChapterAudioLinksSchema,
1429
+ TranslationBookChapterAudioTimingsSchema,
663
1430
  TranslationBookChapterSchema,
1431
+ TranslationBookChapterWordsSchema,
664
1432
  TranslationBookSchema,
665
1433
  TranslationSchema,
666
1434
  VerseFootnoteReferenceSchema