@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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../generation/common-types.ts"],
4
- "sourcesContent": ["import { z } from 'zod';\r\nimport { BookIdSchema, VerseRef, VerseRefSchema } from '../utils.js';\r\n\r\n/**\r\n * Defines an interface that contains information about a input file.\r\n */\r\nexport type InputFile = InputTranslationFile | InputCommentaryFile;\r\n\r\nexport interface InputFileBase {\r\n name?: string;\r\n content: string;\r\n sha256?: string;\r\n}\r\n\r\nexport type InputFileMetadata =\r\n | InputTranslationMetadata\r\n | InputCommentaryMetadata;\r\n\r\nexport interface InputTranslationFile extends InputFileBase {\r\n fileType: 'usfm' | 'usx' | 'json' | 'lockman';\r\n metadata: InputTranslationMetadata;\r\n}\r\n\r\nexport interface InputCommentaryFile extends InputFileBase {\r\n fileType: 'commentary/csv' | 'commentary/tyndale-xml';\r\n metadata: InputCommentaryMetadata;\r\n}\r\n\r\nexport type OutputFileContent = object | ReadableStream;\r\n\r\n/**\r\n * Defines an interface that contains information about a output file.\r\n */\r\nexport interface OutputFile {\r\n /**\r\n * The path that the file should be stored at.\r\n */\r\n path: string;\r\n\r\n /**\r\n * The content of the file.\r\n */\r\n content: OutputFileContent | (() => Promise<OutputFileContent>);\r\n\r\n /**\r\n * Whether the file can be merged with files of the same name but from other datasets.\r\n */\r\n mergable?: boolean;\r\n}\r\n\r\nexport interface MetadataBase {\r\n /**\r\n * The name of the translation.\r\n */\r\n name: string;\r\n\r\n /**\r\n * The english name of the translation.\r\n */\r\n englishName: string;\r\n\r\n /**\r\n * The website for the translation.\r\n */\r\n website: string;\r\n\r\n /**\r\n * The URL that the license for the translation can be found.\r\n */\r\n licenseUrl: string;\r\n\r\n /**\r\n * The notice that should be displayed when displaying content from the translation.\r\n */\r\n licenseNotice?: string | null;\r\n\r\n /**\r\n * The ISO 639 letter language tag that the translation is primarily in.\r\n */\r\n language: string;\r\n\r\n /**\r\n * The direction that the text is written in.\r\n */\r\n direction: 'ltr' | 'rtl';\r\n}\r\n\r\n/**\r\n * The metadata for a translation that is input into the generator.\r\n */\r\nexport interface InputTranslationMetadata extends MetadataBase {\r\n /**\r\n * The ID of the translation.\r\n */\r\n id: string;\r\n\r\n /**\r\n * The short name for the translation.\r\n */\r\n shortName: string;\r\n}\r\n\r\n/**\r\n * The metadata for a translation that is input into the generator.\r\n */\r\nexport interface InputCommentaryMetadata extends MetadataBase {\r\n /**\r\n * The ID of the commentary.\r\n */\r\n id: string;\r\n}\r\n\r\n/**\r\n * Defines a Zod schema for information about a translation.\r\n */\r\nexport const TranslationSchema = z.object({\r\n /**\r\n * The ID of the translation.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the translation.',\r\n }),\r\n\r\n /**\r\n * The name of the translation.\r\n */\r\n name: z.string().meta({\r\n description: 'The name of the translation.',\r\n }),\r\n\r\n /**\r\n * The website for the translation.\r\n */\r\n website: z.string().meta({\r\n description: 'The website for the translation.',\r\n }),\r\n\r\n /**\r\n * The URL that the license for the translation can be found.\r\n */\r\n licenseUrl: z.string().meta({\r\n description: 'The URL that the license for the translation can be found.',\r\n }),\r\n\r\n /**\r\n * The API-added notes for the license.\r\n */\r\n licenseNotes: z.string().nullable().optional().meta({\r\n description: 'The API-added notes for the license.',\r\n }),\r\n\r\n /**\r\n * The notice that should be displayed when displaying content from the translation.\r\n */\r\n licenseNotice: z.string().nullable().optional().meta({\r\n description: 'The notice that should be displayed when displaying content from the translation.',\r\n }),\r\n\r\n /**\r\n * The short name for the translation.\r\n */\r\n shortName: z.string().optional().meta({\r\n description: 'The short name for the translation.',\r\n }),\r\n\r\n /**\r\n * The English name for the translation.\r\n */\r\n englishName: z.string().meta({\r\n description: 'The English name for the translation.',\r\n }),\r\n\r\n /**\r\n * The ISO 639 3-letter language tag that the translation is primarily in.\r\n */\r\n language: z.string().meta({\r\n description: 'The ISO 639 3-letter language tag that the translation is primarily in.',\r\n }),\r\n\r\n /**\r\n * The direction that the language is written in.\r\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\r\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\r\n */\r\n textDirection: z.enum(['ltr', 'rtl']).meta({\r\n 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.',\r\n }),\r\n});\r\n\r\nexport type Translation = z.infer<typeof TranslationSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a commentary.\r\n */\r\nexport const CommentarySchema = z.object({\r\n /**\r\n * The ID of the commentary.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the commentary.',\r\n }),\r\n\r\n /**\r\n * The name of the commentary.\r\n */\r\n name: z.string().meta({\r\n description: 'The name of the commentary.',\r\n }),\r\n\r\n /**\r\n * The website for the commentary.\r\n */\r\n website: z.string().meta({\r\n description: 'The website for the commentary.',\r\n }),\r\n\r\n /**\r\n * The URL that the license for the commentary can be found.\r\n */\r\n licenseUrl: z.string().meta({\r\n description: 'The URL that the license for the commentary can be found.',\r\n }),\r\n\r\n /**\r\n * The API-added notes for the license.\r\n */\r\n licenseNotes: z.string().nullable().optional().meta({\r\n description: 'The API-added notes for the license.',\r\n }),\r\n\r\n /**\r\n * The english name for the commentary.\r\n */\r\n englishName: z.string().meta({\r\n description: 'The English name for the commentary.',\r\n }),\r\n\r\n /**\r\n * The ISO 639 3-letter language tag that the translation is primarily in.\r\n */\r\n language: z.string().meta({\r\n description: 'The ISO 639 3-letter language tag that the translation is primarily in.',\r\n }),\r\n\r\n /**\r\n * The direction that the language is written in.\r\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\r\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\r\n */\r\n textDirection: z.enum(['ltr', 'rtl']).meta({\r\n 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.',\r\n }),\r\n});\r\n\r\nexport type Commentary = z.infer<typeof CommentarySchema>;\r\n\r\nexport const DatasetSchema = z.object({\r\n /**\r\n * The ID of the dataset.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the dataset.',\r\n }),\r\n\r\n /**\r\n * The name of the dataset.\r\n */\r\n name: z.string().meta({\r\n description: 'The name of the dataset.',\r\n }),\r\n\r\n /**\r\n * The website for the dataset.\r\n */\r\n website: z.string().meta({\r\n description: 'The website for the dataset.',\r\n }),\r\n\r\n /**\r\n * The URL that the license for the dataset can be found.\r\n */\r\n licenseUrl: z.string().meta({\r\n description: 'The URL that the license for the dataset can be found.',\r\n }),\r\n\r\n /**\r\n * The API-added notes for the license.\r\n */\r\n licenseNotes: z.string().nullable().optional().meta({\r\n description: 'The API-added notes for the license.',\r\n }),\r\n\r\n /**\r\n * The English name for the dataset.\r\n */\r\n englishName: z.string().meta({\r\n description: 'The English name for the dataset.',\r\n }),\r\n\r\n /**\r\n * The ISO 639 3-letter language tag that the dataset is primarily in.\r\n */\r\n language: z.string().meta({\r\n description: 'The ISO 639 3-letter language tag that the dataset is primarily in.',\r\n }),\r\n\r\n /**\r\n * The direction that the language is written in.\r\n */\r\n textDirection: z.enum(['ltr', 'rtl']).meta({\r\n description: 'The direction that the language is written in.',\r\n }),\r\n});\r\n\r\nexport type Dataset = z.infer<typeof DatasetSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a book.\r\n */\r\nexport const TranslationBookSchema = z.object({\r\n /**\r\n * The ID of the book. Should match the USFM book ID.\r\n */\r\n id: BookIdSchema,\r\n\r\n /**\r\n * The name that the translation provided for the book.\r\n */\r\n name: z.string().meta({\r\n description: 'The name that the translation provided for the book.',\r\n }),\r\n\r\n /**\r\n * The common name for the book.\r\n */\r\n commonName: z.string().meta({\r\n description: 'The common name for the book.',\r\n }),\r\n\r\n /**\r\n * The title of the book.\r\n * This is usually a more descriptive version of the book name.\r\n * If not available, then one was not provided by the translation.\r\n */\r\n title: z.string().nullable().meta({\r\n 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.',\r\n }),\r\n\r\n /**\r\n * The numerical order of the book in the translation.\r\n */\r\n order: z.number().meta({\r\n description: 'The numerical order of the book in the translation.',\r\n }),\r\n\r\n /**\r\n * Whether the book is an apocryphal book.\r\n */\r\n isApocryphal: z.boolean().optional().meta({\r\n description: 'Whether the book is an apocryphal book.',\r\n }),\r\n}).meta({\r\n id: 'TranslationBook',\r\n description: 'Defines the schema for information about a book.',\r\n});\r\n\r\nexport type TranslationBook = z.infer<typeof TranslationBookSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a book in a commentary.\r\n */\r\nexport const CommentaryBookSchema = z.object({\r\n /**\r\n * The ID of the book. Should match the USFM book ID.\r\n */\r\n id: BookIdSchema,\r\n\r\n /**\r\n * The name that the commentary provided for the book.\r\n */\r\n name: z.string().meta({\r\n description: 'The name that the commentary provided for the book.',\r\n }),\r\n\r\n /**\r\n * The common name for the book.\r\n */\r\n commonName: z.string().meta({\r\n description: 'The common name for the book.',\r\n }),\r\n\r\n /**\r\n * The commentary's introduction for the book.\r\n */\r\n introduction: z.string().optional().meta({\r\n description: 'The commentary\\'s introduction for the book. Undefined if the commentary didn\\'t provide an introduction for the book.',\r\n }),\r\n\r\n /**\r\n * The summary of the commentary's introduction for the book.\r\n */\r\n introductionSummary: z.string().optional().meta({\r\n description: 'The summary of the commentary\\'s introduction for the book. Undefined if the commentary didn\\'t provide a summary for the book.',\r\n }),\r\n\r\n /**\r\n * The order of the book in the Bible.\r\n */\r\n order: z.number().meta({\r\n description: 'The order of the book in the Bible.',\r\n }),\r\n}).meta({\r\n id: \"CommentaryBook\",\r\n description: \"Defines the schema for information about a book in a commentary.\",\r\n});\r\n\r\nexport type CommentaryBook = z.infer<typeof CommentaryBookSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a dataset book.\r\n */\r\nexport const DatasetBookSchema = z.object({\r\n /**\r\n * The ID of the book. Should match the USFM book ID.\r\n */\r\n id: BookIdSchema,\r\n\r\n /**\r\n * The order of the book in the Bible.\r\n */\r\n order: z.number().meta({\r\n description: 'The order of the book in the Bible.',\r\n }),\r\n}).meta({\r\n id: 'DatasetBook',\r\n description: 'Defines the schema for information about a book in a dataset.',\r\n});\r\n\r\nexport type DatasetBook = z.infer<typeof DatasetBookSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a chapter in a dataset.\r\n */\r\nexport const DatasetBookChapterSchema = z.object({\r\n /**\r\n * The data for the chapter.\r\n */\r\n chapter: z.lazy(() => DatasetChapterDataSchema).meta({\r\n description: 'The data for the chapter.',\r\n }),\r\n}).meta({\r\n id: 'DatasetBookChapter',\r\n description: 'Defines the schema for information about a chapter in a dataset.',\r\n});\r\n\r\nexport type DatasetBookChapter = z.infer<typeof DatasetBookChapterSchema>;\r\n\r\nexport const DatasetChapterDataSchema = z.object({\r\n /**\r\n * The number of the chapter.\r\n */\r\n number: z.number().meta({\r\n description: 'The number of the chapter.',\r\n }),\r\n\r\n /**\r\n * The content of the chapter.\r\n */\r\n content: z.array(z.lazy(() => DatasetChapterVerseContentSchema)).meta({\r\n description: 'The content of the chapter.',\r\n }),\r\n}).meta({\r\n id: 'DatasetChapterData',\r\n description: 'Defines the schema for information about a chapter in a dataset.',\r\n});\r\n\r\nexport type DatasetChapterData = z.infer<typeof DatasetChapterDataSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a verse in a dataset chapter.\r\n */\r\nexport const DatasetChapterVerseContentSchema = z.object({\r\n /**\r\n * The number of the verse.\r\n */\r\n verse: z.number().meta({\r\n description: 'The number of the verse.',\r\n }),\r\n\r\n /**\r\n * The list of references for the verse.\r\n */\r\n references: z.array(z.lazy(() => ScoredVerseRefSchema)).meta({\r\n description: 'The list of references for the verse.',\r\n }),\r\n}).meta({\r\n id: 'DatasetChapterVerseContent',\r\n description: 'Defines the schema for information about a verse in a dataset chapter.',\r\n});\r\n\r\nexport type DatasetChapterVerseContent = z.infer<typeof DatasetChapterVerseContentSchema>;\r\n\r\n/**\r\n * Defines an interface that contains information about a verse reference that has an arbitrary score attached to it.\r\n */\r\nexport const ScoredVerseRefSchema = VerseRefSchema.extend({\r\n score: z.number().meta({\r\n description: 'The score for the verse reference. The meaning of the score is arbitrary and is determined by the dataset.',\r\n }),\r\n}).meta({\r\n id: 'ScoredVerseRef',\r\n description: 'Defines the schema for information about a verse reference that has an arbitrary score attached to it.',\r\n});\r\n\r\nexport type ScoredVerseRef = z.infer<typeof ScoredVerseRefSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a profile in a commentary.\r\n */\r\nexport const CommentaryProfileSchema = z.object({\r\n /**\r\n * The ID of the profile.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the profile.',\r\n }),\r\n\r\n /**\r\n * The subject of the profile.\r\n */\r\n subject: z.string().meta({\r\n description: 'The subject of the profile.',\r\n }),\r\n\r\n /**\r\n * The Bible reference that the profile is associated with.\r\n */\r\n reference: VerseRefSchema.nullable().meta({\r\n description: 'The Bible reference that the profile is associated with. Null if the profile isn\\'t associated with a specific Bible reference.',\r\n }),\r\n});\r\n\r\nexport type CommentaryProfile = z.infer<typeof CommentaryProfileSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a book chapter.\r\n */\r\nexport const TranslationBookChapterSchema = z.object({\r\n /**\r\n * The information for the chapter.\r\n */\r\n chapter: z.lazy(() => ChapterDataSchema).meta({\r\n description: 'The information for the chapter.',\r\n }),\r\n\r\n /**\r\n * The links to different audio versions for the chapter.\r\n */\r\n thisChapterAudioLinks: z.lazy(() => TranslationBookChapterAudioLinksSchema).meta({\r\n description: 'The links to different audio versions for the chapter.',\r\n }),\r\n}).meta({\r\n id: 'TranslationBookChapter',\r\n description: 'Defines the schema for information about a book chapter.',\r\n});\r\n\r\nexport type TranslationBookChapter = z.infer<typeof TranslationBookChapterSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a book chapter in a commentary.\r\n */\r\nexport const CommentaryBookChapterSchema = z.object({\r\n /**\r\n * The information for the chapter.\r\n */\r\n chapter: z.lazy(() => CommentaryChapterDataSchema).meta({\r\n description: 'The information for the chapter.',\r\n }),\r\n}).meta({\r\n id: 'CommentaryBookChapter',\r\n description: 'Defines the schema for information about a book chapter in a commentary.',\r\n});\r\n\r\nexport type CommentaryBookChapter = z.infer<typeof CommentaryBookChapterSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for the audio links for a book chapter.\r\n */\r\nexport const TranslationBookChapterAudioLinksSchema = z.record(z.string(), z.string()).meta({\r\n id: 'TranslationBookChapterAudioLinks',\r\n description: 'Defines the schema for the audio links for a book chapter.',\r\n});\r\n\r\nexport type TranslationBookChapterAudioLinks = z.infer<typeof TranslationBookChapterAudioLinksSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about data in a chapter.\r\n */\r\nexport const ChapterDataSchema = z.object({\r\n /**\r\n * The number of the chapter.\r\n */\r\n number: z.number().meta({\r\n description: 'The number of the chapter.',\r\n }),\r\n\r\n /**\r\n * The content of the chapter.\r\n */\r\n content: z.array(z.lazy(() => ChapterContentSchema)).meta({\r\n description: 'The content of the chapter.',\r\n }),\r\n\r\n /**\r\n * The list of footnotes for the chapter.\r\n */\r\n footnotes: z.array(z.lazy(() => ChapterFootnoteSchema)).meta({\r\n description: 'The list of footnotes for the chapter.',\r\n }),\r\n});\r\n\r\nexport type ChapterData = z.infer<typeof ChapterDataSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about data in a chapter in a commentary.\r\n */\r\nexport const CommentaryChapterDataSchema = z.object({\r\n /**\r\n * The number of the chapter.\r\n */\r\n number: z.number().meta({\r\n description: 'The number of the chapter.',\r\n }),\r\n\r\n /**\r\n * The introduction that the commentary provided to the chapter.\r\n * Not all commentaries provide an introduction to a chapter.\r\n */\r\n introduction: z.string().optional().meta({\r\n description: 'The introduction that the commentary provided to the chapter. Not all commentaries provide an introduction to a chapter.',\r\n }),\r\n\r\n /**\r\n * The content of the chapter.\r\n */\r\n content: z.array(z.lazy(() => ChapterVerseSchema)).meta({\r\n description: 'The content of the chapter.',\r\n }),\r\n});\r\n\r\nexport type CommentaryChapterData = z.infer<typeof CommentaryChapterDataSchema>;\r\n\r\n/**\r\n * A Zod schema for a heading in a chapter.\r\n */\r\nexport const ChapterHeadingSchema = z.object({\r\n /**\r\n * Indicates that the content represents a heading.\r\n */\r\n type: z.literal('heading'),\r\n\r\n /**\r\n * The content for the heading.\r\n * If multiple strings are included in the array, they should be concatenated with a space.\r\n */\r\n content: z.array(z.string()).meta({\r\n description: 'The content for the heading. If multiple strings are included in the array, they should be concatenated with a space.',\r\n }),\r\n}).meta({\r\n id: 'ChapterHeading',\r\n description: 'Defines the schema for a heading in a chapter.',\r\n});\r\n\r\nexport type ChapterHeading = z.infer<typeof ChapterHeadingSchema>;\r\n\r\n/**\r\n * A Zod schema for a line break in a chapter.\r\n */\r\nexport const ChapterLineBreakSchema = z.object({\r\n /**\r\n * Indicates that the content represents a line break.\r\n */\r\n type: z.literal('line_break'),\r\n}).meta({\r\n id: 'ChapterLineBreak',\r\n description: 'Defines the schema for a line break in a chapter.',\r\n});\r\n\r\nexport type ChapterLineBreak = z.infer<typeof ChapterLineBreakSchema>;\r\n\r\n/**\r\n * A Zod schema for a Hebrew Subtitle in a chapter.\r\n * These are often used included as informational content that appeared in the original manuscripts.\r\n * For example, Psalms 49 has the Hebrew Subtitle \"To the choirmaster. A Psalm of the Sons of Korah.\"\r\n */\r\nexport const ChapterHebrewSubtitleSchema = z.object({\r\n /**\r\n * Indicates that the content represents a Hebrew Subtitle.\r\n */\r\n type: z.literal('hebrew_subtitle'),\r\n\r\n /**\r\n * The list of content that is contained in the subtitle.\r\n * Each element in the list could be a string, formatted text, or a footnote reference.\r\n */\r\n content: z.array(z.union([\r\n z.string(),\r\n z.lazy(() => FormattedTextSchema),\r\n z.lazy(() => VerseFootnoteReferenceSchema),\r\n ])).meta({\r\n description: 'The content that is contained in the subtitle. Each element in the list could be a string, formatted text, or a footnote reference.',\r\n }),\r\n}).meta({\r\n id: 'ChapterHebrewSubtitle',\r\n description: 'Defines the schema for a Hebrew Subtitle in a chapter.',\r\n});\r\n\r\nexport type ChapterHebrewSubtitle = z.infer<typeof ChapterHebrewSubtitleSchema>;\r\n\r\n/**\r\n * A Zod schema for a verse in a chapter.\r\n */\r\nexport const ChapterVerseSchema = z.object({\r\n /**\r\n * Indicates that the content is a verse.\r\n */\r\n type: z.literal('verse'),\r\n\r\n /**\r\n * The number of the verse.\r\n */\r\n number: z.number().meta({\r\n description: 'The number of the verse.',\r\n }),\r\n\r\n /**\r\n * The list of content for the verse.\r\n * Each element in the list could be a string, formatted text, or a footnote reference.\r\n */\r\n content: z.array(z.union([\r\n z.string(),\r\n z.lazy(() => FormattedTextSchema),\r\n z.lazy(() => InlineHeadingSchema),\r\n z.lazy(() => InlineLineBreakSchema),\r\n z.lazy(() => VerseFootnoteReferenceSchema),\r\n ])).meta({\r\n description: 'The list of content for the verse. Each element in the list could be a string, formatted text, or a footnote reference.',\r\n }),\r\n}).meta({\r\n id: 'ChapterVerse',\r\n description: 'Defines the schema for a verse in a chapter.',\r\n});\r\n\r\nexport type ChapterVerse = z.infer<typeof ChapterVerseSchema>;\r\n\r\n/**\r\n * A union type that represents a single piece of chapter content.\r\n * A piece of chapter content can be one of the following things:\r\n * - A heading.\r\n * - A line break.\r\n * - A verse.\r\n * - A Hebrew Subtitle.\r\n */\r\nexport const ChapterContentSchema = z.discriminatedUnion('type', [\r\n ChapterHeadingSchema,\r\n ChapterLineBreakSchema,\r\n ChapterVerseSchema,\r\n ChapterHebrewSubtitleSchema,\r\n]).meta({\r\n id: 'ChapterContent',\r\n 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.',\r\n});\r\n\r\n/**\r\n * A union type that represents a single piece of chapter content.\r\n * A piece of chapter content can be one of the following things:\r\n * - A heading.\r\n * - A line break.\r\n * - A verse.\r\n * - A Hebrew Subtitle.\r\n */\r\nexport type ChapterContent = z.infer<typeof ChapterContentSchema>;\r\n\r\n/**\r\n * A Zod schema for formatted text. That is, text that is formatted in a particular manner.\r\n */\r\nexport const FormattedTextSchema = z.object({\r\n /**\r\n * The text that is formatted.\r\n */\r\n text: z.string().meta({\r\n description: 'The text that is formatted.',\r\n }),\r\n\r\n /**\r\n * Whether the text represents a poem.\r\n * The number indicates the level of indent.\r\n *\r\n * Common in Psalms.\r\n */\r\n poem: z.number().optional().meta({\r\n description: 'Whether the text represents a poem. The number indicates the level of indent. Common in Psalms.',\r\n }),\r\n\r\n /**\r\n * Whether the text represents the Words of Jesus.\r\n */\r\n wordsOfJesus: z.boolean().optional().meta({\r\n description: 'Whether the text represents the Words of Jesus.',\r\n }),\r\n}).meta({\r\n id: 'FormattedText',\r\n description: 'Defines the schema for formatted text. That is, text that is formatted in a particular manner.',\r\n});\r\n\r\nexport type FormattedText = z.infer<typeof FormattedTextSchema>;\r\n\r\n/**\r\n * A Zod schema for a heading that is embedded in a verse.\r\n */\r\nexport const InlineHeadingSchema = z.object({\r\n /**\r\n * The text of the heading.\r\n */\r\n heading: z.string().meta({\r\n description: 'The text of the heading.',\r\n }),\r\n}).meta({\r\n id: 'InlineHeading',\r\n description: 'Defines the schema for a heading that is embedded in a verse.',\r\n});\r\n\r\nexport type InlineHeading = z.infer<typeof InlineHeadingSchema>;\r\n\r\n/**\r\n * A Zod schema for a line break that is embedded in a verse.\r\n */\r\nexport const InlineLineBreakSchema = z.object({\r\n lineBreak: z.literal(true),\r\n}).meta({\r\n id: 'InlineLineBreak',\r\n description: 'Defines the schema for a line break that is embedded in a verse.',\r\n});\r\n\r\nexport type InlineLineBreak = z.infer<typeof InlineLineBreakSchema>;\r\n\r\n/**\r\n * A Zod schema for a footnote reference in a verse or a Hebrew Subtitle.\r\n */\r\nexport const VerseFootnoteReferenceSchema = z.object({\r\n /**\r\n * The ID of the note.\r\n */\r\n noteId: z.number().meta({\r\n description: 'The ID of the note.',\r\n }),\r\n}).meta({\r\n id: 'VerseFootnoteReference',\r\n description: 'Defines the schema for a footnote reference in a verse or a Hebrew Subtitle.',\r\n});\r\n\r\nexport type VerseFootnoteReference = z.infer<typeof VerseFootnoteReferenceSchema>;\r\n\r\n/**\r\n * A Zod schema for information about a footnote.\r\n */\r\nexport const ChapterFootnoteSchema = z.object({\r\n /**\r\n * The ID of the note that is referenced.\r\n */\r\n noteId: z.number().meta({\r\n description: 'The ID of the note that is referenced.',\r\n }),\r\n\r\n /**\r\n * The text of the footnote.\r\n */\r\n text: z.string().meta({\r\n description: 'The text of the footnote.',\r\n }),\r\n\r\n /**\r\n * The verse reference for the footnote.\r\n */\r\n reference: z.object({\r\n chapter: z.number(),\r\n verse: z.number(),\r\n }).optional().meta({\r\n description: 'The verse reference for the footnote. Undefined if the footnote isn\\'t associated with a specific verse.',\r\n }),\r\n\r\n /**\r\n * The caller that should be used for the footnote.\r\n * For footnotes, a \"caller\" is the character that is used in the text to reference to footnote.\r\n *\r\n * For example, in the text:\r\n * Hello (a) World\r\n *\r\n * ----\r\n * (a) This is a footnote.\r\n *\r\n * The \"(a)\" is the caller.\r\n *\r\n * If \"+\", then the caller should be autogenerated.\r\n * If null, then the caller should be empty.\r\n * If a string, then the caller should be that string.\r\n */\r\n caller: z.union([z.literal('+'), z.string(), z.null()]).meta({\r\n 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.',\r\n }),\r\n}).meta({\r\n id: 'ChapterFootnote',\r\n description: 'Defines the schema for information about a footnote.',\r\n});\r\n\r\nexport type ChapterFootnote = z.infer<typeof ChapterFootnoteSchema>;\r\n"],
5
- "mappings": ";AAAA,SAAS,SAAS;AAClB,SAAS,cAAwB,sBAAsB;AAkHhD,aAAM,oBAAoB,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAItC,IAAI,EAAE,OAAO,EAAE,KAAK;AAAA,IAChB,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,MAAM,EAAE,OAAO,EAAE,KAAK;AAAA,IAClB,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,SAAS,EAAE,OAAO,EAAE,KAAK;AAAA,IACrB,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,YAAY,EAAE,OAAO,EAAE,KAAK;AAAA,IACxB,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK;AAAA,IAChD,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK;AAAA,IACjD,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK;AAAA,IAClC,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,aAAa,EAAE,OAAO,EAAE,KAAK;AAAA,IACzB,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,UAAU,EAAE,OAAO,EAAE,KAAK;AAAA,IACtB,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOD,eAAe,EAAE,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;AAAA;AAAA;AAAA,EAIjD,QAAQ,EAAE,OAAO,EAAE,KAAK;AAAA,IACpB,aAAa;AAAA,EACjB,CAAC;AACL,CAAC,EAAE,KAAK;AAAA,EACJ,IAAI;AAAA,EACJ,aAAa;AACjB,CAAC;AAOM,aAAM,wBAAwB,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAI1C,QAAQ,EAAE,OAAO,EAAE,KAAK;AAAA,IACpB,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,MAAM,EAAE,OAAO,EAAE,KAAK;AAAA,IAClB,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,WAAW,EAAE,OAAO;AAAA,IAChB,SAAS,EAAE,OAAO;AAAA,IAClB,OAAO,EAAE,OAAO;AAAA,EACpB,CAAC,EAAE,SAAS,EAAE,KAAK;AAAA,IACf,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBD,QAAQ,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK;AAAA,IACzD,aAAa;AAAA,EACjB,CAAC;AACL,CAAC,EAAE,KAAK;AAAA,EACJ,IAAI;AAAA,EACJ,aAAa;AACjB,CAAC;",
4
+ "sourcesContent": ["import { z } from 'zod';\r\nimport { BookIdSchema, VerseRef, VerseRefSchema } from '../utils.js';\r\n\r\n/**\r\n * Defines an interface that contains information about a input file.\r\n */\r\nexport type InputFile = InputTranslationFile | InputCommentaryFile;\r\n\r\nexport interface InputFileBase {\r\n name?: string;\r\n content: string;\r\n sha256?: string;\r\n}\r\n\r\nexport type InputFileMetadata =\r\n | InputTranslationMetadata\r\n | InputCommentaryMetadata;\r\n\r\nexport interface InputTranslationFile extends InputFileBase {\r\n fileType: 'usfm' | 'usx' | 'json' | 'lockman';\r\n metadata: InputTranslationMetadata;\r\n}\r\n\r\nexport interface InputCommentaryFile extends InputFileBase {\r\n fileType: 'commentary/csv' | 'commentary/tyndale-xml';\r\n metadata: InputCommentaryMetadata;\r\n}\r\n\r\nexport type OutputFileContent = object | ReadableStream;\r\n\r\n/**\r\n * Defines an interface that contains information about a output file.\r\n */\r\nexport interface OutputFile {\r\n /**\r\n * The path that the file should be stored at.\r\n */\r\n path: string;\r\n\r\n /**\r\n * The content of the file.\r\n */\r\n content: OutputFileContent | (() => Promise<OutputFileContent>);\r\n\r\n /**\r\n * Whether the file can be merged with files of the same name but from other datasets.\r\n */\r\n mergable?: boolean;\r\n}\r\n\r\nexport interface MetadataBase {\r\n /**\r\n * The name of the translation.\r\n */\r\n name: string;\r\n\r\n /**\r\n * The english name of the translation.\r\n */\r\n englishName: string;\r\n\r\n /**\r\n * The website for the translation.\r\n */\r\n website: string;\r\n\r\n /**\r\n * The URL that the license for the translation can be found.\r\n */\r\n licenseUrl: string;\r\n\r\n /**\r\n * The notice that should be displayed when displaying content from the translation.\r\n */\r\n licenseNotice?: string | null;\r\n\r\n /**\r\n * The ISO 639 letter language tag that the translation is primarily in.\r\n */\r\n language: string;\r\n\r\n /**\r\n * The direction that the text is written in.\r\n */\r\n direction: 'ltr' | 'rtl';\r\n}\r\n\r\n/**\r\n * The metadata for a translation that is input into the generator.\r\n */\r\nexport interface InputTranslationMetadata extends MetadataBase {\r\n /**\r\n * The ID of the translation.\r\n */\r\n id: string;\r\n\r\n /**\r\n * The short name for the translation.\r\n */\r\n shortName: string;\r\n}\r\n\r\n/**\r\n * The metadata for a translation that is input into the generator.\r\n */\r\nexport interface InputCommentaryMetadata extends MetadataBase {\r\n /**\r\n * The ID of the commentary.\r\n */\r\n id: string;\r\n}\r\n\r\n/**\r\n * Defines a Zod schema for information about a translation.\r\n */\r\nexport const TranslationSchema = z.object({\r\n /**\r\n * The ID of the translation.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the translation.',\r\n }),\r\n\r\n /**\r\n * The name of the translation.\r\n */\r\n name: z.string().meta({\r\n description: 'The name of the translation.',\r\n }),\r\n\r\n /**\r\n * The website for the translation.\r\n */\r\n website: z.string().meta({\r\n description: 'The website for the translation.',\r\n }),\r\n\r\n /**\r\n * The URL that the license for the translation can be found.\r\n */\r\n licenseUrl: z.string().meta({\r\n description:\r\n 'The URL that the license for the translation can be found.',\r\n }),\r\n\r\n /**\r\n * The API-added notes for the license.\r\n */\r\n licenseNotes: z.string().nullable().optional().meta({\r\n description: 'The API-added notes for the license.',\r\n }),\r\n\r\n /**\r\n * The notice that should be displayed when displaying content from the translation.\r\n */\r\n licenseNotice: z.string().nullable().optional().meta({\r\n description:\r\n 'The notice that should be displayed when displaying content from the translation.',\r\n }),\r\n\r\n /**\r\n * The short name for the translation.\r\n */\r\n shortName: z.string().optional().meta({\r\n description: 'The short name for the translation.',\r\n }),\r\n\r\n /**\r\n * The English name for the translation.\r\n */\r\n englishName: z.string().meta({\r\n description: 'The English name for the translation.',\r\n }),\r\n\r\n /**\r\n * The ISO 639 3-letter language tag that the translation is primarily in.\r\n */\r\n language: z.string().meta({\r\n description:\r\n 'The ISO 639 3-letter language tag that the translation is primarily in.',\r\n }),\r\n\r\n /**\r\n * The direction that the language is written in.\r\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\r\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\r\n */\r\n textDirection: z.enum(['ltr', 'rtl']).meta({\r\n description:\r\n '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.',\r\n }),\r\n});\r\n\r\nexport type Translation = z.infer<typeof TranslationSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a commentary.\r\n */\r\nexport const CommentarySchema = z.object({\r\n /**\r\n * The ID of the commentary.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the commentary.',\r\n }),\r\n\r\n /**\r\n * The name of the commentary.\r\n */\r\n name: z.string().meta({\r\n description: 'The name of the commentary.',\r\n }),\r\n\r\n /**\r\n * The website for the commentary.\r\n */\r\n website: z.string().meta({\r\n description: 'The website for the commentary.',\r\n }),\r\n\r\n /**\r\n * The URL that the license for the commentary can be found.\r\n */\r\n licenseUrl: z.string().meta({\r\n description:\r\n 'The URL that the license for the commentary can be found.',\r\n }),\r\n\r\n /**\r\n * The API-added notes for the license.\r\n */\r\n licenseNotes: z.string().nullable().optional().meta({\r\n description: 'The API-added notes for the license.',\r\n }),\r\n\r\n /**\r\n * The english name for the commentary.\r\n */\r\n englishName: z.string().meta({\r\n description: 'The English name for the commentary.',\r\n }),\r\n\r\n /**\r\n * The ISO 639 3-letter language tag that the translation is primarily in.\r\n */\r\n language: z.string().meta({\r\n description:\r\n 'The ISO 639 3-letter language tag that the translation is primarily in.',\r\n }),\r\n\r\n /**\r\n * The direction that the language is written in.\r\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\r\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\r\n */\r\n textDirection: z.enum(['ltr', 'rtl']).meta({\r\n description:\r\n '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.',\r\n }),\r\n});\r\n\r\nexport type Commentary = z.infer<typeof CommentarySchema>;\r\n\r\nexport const DatasetSchema = z.object({\r\n /**\r\n * The ID of the dataset.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the dataset.',\r\n }),\r\n\r\n /**\r\n * The name of the dataset.\r\n */\r\n name: z.string().meta({\r\n description: 'The name of the dataset.',\r\n }),\r\n\r\n /**\r\n * The website for the dataset.\r\n */\r\n website: z.string().meta({\r\n description: 'The website for the dataset.',\r\n }),\r\n\r\n /**\r\n * The URL that the license for the dataset can be found.\r\n */\r\n licenseUrl: z.string().meta({\r\n description: 'The URL that the license for the dataset can be found.',\r\n }),\r\n\r\n /**\r\n * The API-added notes for the license.\r\n */\r\n licenseNotes: z.string().nullable().optional().meta({\r\n description: 'The API-added notes for the license.',\r\n }),\r\n\r\n /**\r\n * The English name for the dataset.\r\n */\r\n englishName: z.string().meta({\r\n description: 'The English name for the dataset.',\r\n }),\r\n\r\n /**\r\n * The ISO 639 3-letter language tag that the dataset is primarily in.\r\n */\r\n language: z.string().meta({\r\n description:\r\n 'The ISO 639 3-letter language tag that the dataset is primarily in.',\r\n }),\r\n\r\n /**\r\n * The direction that the language is written in.\r\n */\r\n textDirection: z.enum(['ltr', 'rtl']).meta({\r\n description: 'The direction that the language is written in.',\r\n }),\r\n});\r\n\r\nexport type Dataset = z.infer<typeof DatasetSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a book.\r\n */\r\nexport const TranslationBookSchema = z\r\n .object({\r\n /**\r\n * The ID of the book. Should match the USFM book ID.\r\n */\r\n id: BookIdSchema,\r\n\r\n /**\r\n * The name that the translation provided for the book.\r\n */\r\n name: z.string().meta({\r\n description: 'The name that the translation provided for the book.',\r\n }),\r\n\r\n /**\r\n * The common name for the book.\r\n */\r\n commonName: z.string().meta({\r\n description: 'The common name for the book.',\r\n }),\r\n\r\n /**\r\n * The title of the book.\r\n * This is usually a more descriptive version of the book name.\r\n * If not available, then one was not provided by the translation.\r\n */\r\n title: z.string().nullable().meta({\r\n description:\r\n '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.',\r\n }),\r\n\r\n /**\r\n * The numerical order of the book in the translation.\r\n */\r\n order: z.number().meta({\r\n description: 'The numerical order of the book in the translation.',\r\n }),\r\n\r\n /**\r\n * Whether the book is an apocryphal book.\r\n */\r\n isApocryphal: z.boolean().optional().meta({\r\n description: 'Whether the book is an apocryphal book.',\r\n }),\r\n })\r\n .meta({\r\n id: 'TranslationBook',\r\n description: 'Defines the schema for information about a book.',\r\n });\r\n\r\nexport type TranslationBook = z.infer<typeof TranslationBookSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a book in a commentary.\r\n */\r\nexport const CommentaryBookSchema = z\r\n .object({\r\n /**\r\n * The ID of the book. Should match the USFM book ID.\r\n */\r\n id: BookIdSchema,\r\n\r\n /**\r\n * The name that the commentary provided for the book.\r\n */\r\n name: z.string().meta({\r\n description: 'The name that the commentary provided for the book.',\r\n }),\r\n\r\n /**\r\n * The common name for the book.\r\n */\r\n commonName: z.string().meta({\r\n description: 'The common name for the book.',\r\n }),\r\n\r\n /**\r\n * The commentary's introduction for the book.\r\n */\r\n introduction: z\r\n .string()\r\n .nullable()\r\n .transform((x) => x ?? undefined)\r\n .optional()\r\n .pipe(z.string().optional())\r\n .meta({\r\n description:\r\n \"The commentary's introduction for the book. Undefined if the commentary didn't provide an introduction for the book.\",\r\n }),\r\n\r\n /**\r\n * The summary of the commentary's introduction for the book.\r\n */\r\n introductionSummary: z\r\n .string()\r\n .nullable()\r\n .transform((x) => x ?? undefined)\r\n .optional()\r\n .pipe(z.string().optional())\r\n .meta({\r\n description:\r\n \"The summary of the commentary's introduction for the book. Undefined if the commentary didn't provide a summary for the book.\",\r\n }),\r\n\r\n /**\r\n * The order of the book in the Bible.\r\n */\r\n order: z.number().meta({\r\n description: 'The order of the book in the Bible.',\r\n }),\r\n })\r\n .meta({\r\n id: 'CommentaryBook',\r\n description:\r\n 'Defines the schema for information about a book in a commentary.',\r\n });\r\n\r\nexport type CommentaryBook = z.infer<typeof CommentaryBookSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a dataset book.\r\n */\r\nexport const DatasetBookSchema = z\r\n .object({\r\n /**\r\n * The ID of the book. Should match the USFM book ID.\r\n */\r\n id: BookIdSchema,\r\n\r\n /**\r\n * The order of the book in the Bible.\r\n */\r\n order: z.number().meta({\r\n description: 'The order of the book in the Bible.',\r\n }),\r\n })\r\n .meta({\r\n id: 'DatasetBook',\r\n description:\r\n 'Defines the schema for information about a book in a dataset.',\r\n });\r\n\r\nexport type DatasetBook = z.infer<typeof DatasetBookSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a chapter in a dataset.\r\n */\r\nexport const DatasetBookChapterSchema = z\r\n .object({\r\n /**\r\n * The data for the chapter.\r\n */\r\n chapter: z\r\n .lazy(() => DatasetChapterDataSchema)\r\n .meta({\r\n description: 'The data for the chapter.',\r\n }),\r\n })\r\n .meta({\r\n id: 'DatasetBookChapter',\r\n description:\r\n 'Defines the schema for information about a chapter in a dataset.',\r\n });\r\n\r\nexport type DatasetBookChapter = z.infer<typeof DatasetBookChapterSchema>;\r\n\r\nexport const DatasetChapterDataSchema = z\r\n .object({\r\n /**\r\n * The number of the chapter.\r\n */\r\n number: z.number().meta({\r\n description: 'The number of the chapter.',\r\n }),\r\n\r\n /**\r\n * The content of the chapter.\r\n */\r\n content: z.array(z.lazy(() => DatasetChapterVerseContentSchema)).meta({\r\n description: 'The content of the chapter.',\r\n }),\r\n })\r\n .meta({\r\n id: 'DatasetChapterData',\r\n description:\r\n 'Defines the schema for information about a chapter in a dataset.',\r\n });\r\n\r\nexport type DatasetChapterData = z.infer<typeof DatasetChapterDataSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a verse in a dataset chapter.\r\n */\r\nexport const DatasetChapterVerseContentSchema = z\r\n .object({\r\n /**\r\n * The number of the verse.\r\n */\r\n verse: z.number().meta({\r\n description: 'The number of the verse.',\r\n }),\r\n\r\n /**\r\n * The list of references for the verse.\r\n */\r\n references: z.array(z.lazy(() => ScoredVerseRefSchema)).meta({\r\n description: 'The list of references for the verse.',\r\n }),\r\n })\r\n .meta({\r\n id: 'DatasetChapterVerseContent',\r\n description:\r\n 'Defines the schema for information about a verse in a dataset chapter.',\r\n });\r\n\r\nexport type DatasetChapterVerseContent = z.infer<\r\n typeof DatasetChapterVerseContentSchema\r\n>;\r\n\r\n/**\r\n * Defines an interface that contains information about a verse reference that has an arbitrary score attached to it.\r\n */\r\nexport const ScoredVerseRefSchema = VerseRefSchema.extend({\r\n score: z.number().meta({\r\n description:\r\n 'The score for the verse reference. The meaning of the score is arbitrary and is determined by the dataset.',\r\n }),\r\n}).meta({\r\n id: 'ScoredVerseRef',\r\n description:\r\n 'Defines the schema for information about a verse reference that has an arbitrary score attached to it.',\r\n});\r\n\r\nexport type ScoredVerseRef = z.infer<typeof ScoredVerseRefSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for a reference to another entity (person, place, event, or people group) in a dataset.\r\n */\r\n/**\r\n * Defines a Zod schema for the type of an entity in a dataset.\r\n * Matches the collection segment of the entity API paths.\r\n */\r\nexport const DatasetEntityTypeSchema = z\r\n .enum(['people', 'places', 'events', 'groups'])\r\n .meta({\r\n id: 'DatasetEntityType',\r\n description:\r\n '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`.',\r\n });\r\n\r\nexport type DatasetEntityType = z.infer<typeof DatasetEntityTypeSchema>;\r\n\r\nexport const DatasetEntityRefSchema = z\r\n .object({\r\n /**\r\n * The ID of the entity that is being referenced.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the entity that is being referenced.',\r\n }),\r\n\r\n /**\r\n * The type of the entity that is being referenced.\r\n * Matches the collection segment of the entity's API link,\r\n * so the link can be constructed as `/api/d/{dataset}/{type}/{id}.json`.\r\n */\r\n type: DatasetEntityTypeSchema.meta({\r\n description:\r\n \"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`.\",\r\n }),\r\n\r\n /**\r\n * The name of the entity that is being referenced.\r\n */\r\n name: z.string().optional().meta({\r\n description: 'The name of the entity that is being referenced.',\r\n }),\r\n\r\n /**\r\n * The API link for the entity that is being referenced.\r\n * Only present in API responses.\r\n */\r\n apiLink: z.string().optional().meta({\r\n description:\r\n 'The API link for the entity that is being referenced. Relative to the API origin. Only present in API responses.',\r\n }),\r\n })\r\n .meta({\r\n id: 'DatasetEntityRef',\r\n description:\r\n 'Defines the schema for a reference to another entity (person, place, event, or people group) in a dataset.',\r\n });\r\n\r\nexport type DatasetEntityRef = z.infer<typeof DatasetEntityRefSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a person in a dataset.\r\n */\r\nexport const DatasetPersonSchema = z\r\n .object({\r\n /**\r\n * The ID of the person.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the person.',\r\n }),\r\n\r\n /**\r\n * The name of the person.\r\n */\r\n name: z.string().meta({\r\n description: 'The name of the person.',\r\n }),\r\n\r\n /**\r\n * Other names that the person is called by.\r\n */\r\n alsoCalled: z.array(z.string()).optional().meta({\r\n description: 'Other names that the person is called by.',\r\n }),\r\n\r\n /**\r\n * Whether the name of the person is a proper name.\r\n */\r\n isProperName: z.boolean().optional().meta({\r\n description: 'Whether the name of the person is a proper name.',\r\n }),\r\n\r\n /**\r\n * The gender of the person.\r\n */\r\n gender: z.string().optional().meta({\r\n description: 'The gender of the person.',\r\n }),\r\n\r\n /**\r\n * The description of the person.\r\n * Each string is a paragraph.\r\n */\r\n description: z.array(z.string()).optional().meta({\r\n description:\r\n 'The description of the person. Each string is a paragraph.',\r\n }),\r\n\r\n /**\r\n * The year that the person was born.\r\n * Negative numbers are years BC. Positive numbers are years AD.\r\n */\r\n birthYear: z.number().optional().meta({\r\n description:\r\n 'The year that the person was born. Negative numbers are years BC. Positive numbers are years AD.',\r\n }),\r\n\r\n /**\r\n * The year that the person died.\r\n * Negative numbers are years BC. Positive numbers are years AD.\r\n */\r\n deathYear: z.number().optional().meta({\r\n description:\r\n 'The year that the person died. Negative numbers are years BC. Positive numbers are years AD.',\r\n }),\r\n\r\n /**\r\n * The earliest year that the person is mentioned in.\r\n * Negative numbers are years BC. Positive numbers are years AD.\r\n */\r\n minYear: z.number().optional().meta({\r\n description:\r\n 'The earliest year that the person is mentioned in. Negative numbers are years BC. Positive numbers are years AD.',\r\n }),\r\n\r\n /**\r\n * The latest year that the person is mentioned in.\r\n * Negative numbers are years BC. Positive numbers are years AD.\r\n */\r\n maxYear: z.number().optional().meta({\r\n description:\r\n 'The latest year that the person is mentioned in. Negative numbers are years BC. Positive numbers are years AD.',\r\n }),\r\n\r\n /**\r\n * The place that the person was born in.\r\n */\r\n birthPlace: DatasetEntityRefSchema.optional().meta({\r\n description: 'The place that the person was born in.',\r\n }),\r\n\r\n /**\r\n * The place that the person died in.\r\n */\r\n deathPlace: DatasetEntityRefSchema.optional().meta({\r\n description: 'The place that the person died in.',\r\n }),\r\n\r\n /**\r\n * The father(s) of the person.\r\n */\r\n father: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The father(s) of the person.',\r\n }),\r\n\r\n /**\r\n * The mother(s) of the person.\r\n */\r\n mother: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The mother(s) of the person.',\r\n }),\r\n\r\n /**\r\n * The partners (spouses) of the person.\r\n */\r\n partners: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The partners (spouses) of the person.',\r\n }),\r\n\r\n /**\r\n * The children of the person.\r\n */\r\n children: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The children of the person.',\r\n }),\r\n\r\n /**\r\n * The siblings of the person.\r\n */\r\n siblings: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The siblings of the person.',\r\n }),\r\n\r\n /**\r\n * The half-siblings of the person that share the same mother.\r\n */\r\n halfSiblingsSameMother: z\r\n .array(DatasetEntityRefSchema)\r\n .optional()\r\n .meta({\r\n description:\r\n 'The half-siblings of the person that share the same mother.',\r\n }),\r\n\r\n /**\r\n * The half-siblings of the person that share the same father.\r\n */\r\n halfSiblingsSameFather: z\r\n .array(DatasetEntityRefSchema)\r\n .optional()\r\n .meta({\r\n description:\r\n 'The half-siblings of the person that share the same father.',\r\n }),\r\n\r\n /**\r\n * The people groups that the person is a member of.\r\n */\r\n memberOf: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The people groups that the person is a member of.',\r\n }),\r\n\r\n /**\r\n * The events that the person participated in.\r\n */\r\n events: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The events that the person participated in.',\r\n }),\r\n\r\n /**\r\n * The list of Bible references that mention the person.\r\n * Sorted by book order, chapter, and verse.\r\n * Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.\r\n */\r\n references: z.array(VerseRefSchema).meta({\r\n description:\r\n '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`.',\r\n }),\r\n })\r\n .meta({\r\n id: 'DatasetPerson',\r\n description:\r\n 'Defines the schema for information about a person in a dataset.',\r\n });\r\n\r\nexport type DatasetPerson = z.infer<typeof DatasetPersonSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a place in a dataset.\r\n */\r\nexport const DatasetPlaceSchema = z\r\n .object({\r\n /**\r\n * The ID of the place.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the place.',\r\n }),\r\n\r\n /**\r\n * The name of the place.\r\n */\r\n name: z.string().meta({\r\n description: 'The name of the place.',\r\n }),\r\n\r\n /**\r\n * The name of the place as it appears in the King James Version.\r\n */\r\n kjvName: z.string().optional().meta({\r\n description:\r\n 'The name of the place as it appears in the King James Version.',\r\n }),\r\n\r\n /**\r\n * The name of the place as it appears in the English Standard Version.\r\n */\r\n esvName: z.string().optional().meta({\r\n description:\r\n 'The name of the place as it appears in the English Standard Version.',\r\n }),\r\n\r\n /**\r\n * Other names that the place is called by.\r\n */\r\n aliases: z.array(z.string()).optional().meta({\r\n description: 'Other names that the place is called by.',\r\n }),\r\n\r\n /**\r\n * The type of geographical feature that the place is.\r\n * For example, \"City\", \"Region\", \"Mountain\", \"Water\", etc.\r\n */\r\n featureType: z.string().optional().meta({\r\n description:\r\n 'The type of geographical feature that the place is. For example, \"City\", \"Region\", \"Mountain\", \"Water\", etc.',\r\n }),\r\n\r\n /**\r\n * The sub-type of geographical feature that the place is.\r\n */\r\n featureSubType: z.string().optional().meta({\r\n description:\r\n 'The sub-type of geographical feature that the place is.',\r\n }),\r\n\r\n /**\r\n * The latitude of the place.\r\n */\r\n latitude: z.number().optional().meta({\r\n description: 'The latitude of the place.',\r\n }),\r\n\r\n /**\r\n * The longitude of the place.\r\n */\r\n longitude: z.number().optional().meta({\r\n description: 'The longitude of the place.',\r\n }),\r\n\r\n /**\r\n * How precise the latitude and longitude of the place are.\r\n */\r\n precision: z.string().optional().meta({\r\n description:\r\n 'How precise the latitude and longitude of the place are.',\r\n }),\r\n\r\n /**\r\n * The description of the place.\r\n * Each string is a paragraph.\r\n */\r\n description: z.array(z.string()).optional().meta({\r\n description:\r\n 'The description of the place. Each string is a paragraph.',\r\n }),\r\n\r\n /**\r\n * The comment on the place from the dataset authors.\r\n */\r\n comment: z.string().optional().meta({\r\n description: 'The comment on the place from the dataset authors.',\r\n }),\r\n\r\n /**\r\n * The root place for this place.\r\n * For example, the root place of \"Sea of Galilee\" and \"Sea of Tiberias\" is the same body of water.\r\n */\r\n rootPlace: DatasetEntityRefSchema.optional().meta({\r\n description:\r\n 'The root place for this place. Different names for the same geographical location share the same root place.',\r\n }),\r\n\r\n /**\r\n * The place that this place is a duplicate of.\r\n */\r\n duplicateOf: DatasetEntityRefSchema.optional().meta({\r\n description: 'The place that this place is a duplicate of.',\r\n }),\r\n\r\n /**\r\n * The people that have been at the place.\r\n */\r\n people: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The people that have been at the place.',\r\n }),\r\n\r\n /**\r\n * The people that were born at the place.\r\n */\r\n peopleBorn: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The people that were born at the place.',\r\n }),\r\n\r\n /**\r\n * The people that died at the place.\r\n */\r\n peopleDied: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The people that died at the place.',\r\n }),\r\n\r\n /**\r\n * The events that happened at the place.\r\n */\r\n events: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The events that happened at the place.',\r\n }),\r\n\r\n /**\r\n * The list of Bible references that mention the place.\r\n * Sorted by book order, chapter, and verse.\r\n * Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.\r\n */\r\n references: z.array(VerseRefSchema).meta({\r\n description:\r\n '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`.',\r\n }),\r\n })\r\n .meta({\r\n id: 'DatasetPlace',\r\n description:\r\n 'Defines the schema for information about a place in a dataset.',\r\n });\r\n\r\nexport type DatasetPlace = z.infer<typeof DatasetPlaceSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about an event in a dataset.\r\n */\r\nexport const DatasetEventSchema = z\r\n .object({\r\n /**\r\n * The ID of the event.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the event.',\r\n }),\r\n\r\n /**\r\n * The name of the event.\r\n */\r\n name: z.string().meta({\r\n description: 'The name of the event.',\r\n }),\r\n\r\n /**\r\n * The date that the event started at.\r\n * Negative numbers are years BC. Positive numbers are years AD.\r\n * More specific dates use the `YYYY-MM-DD` format.\r\n */\r\n startDate: z.string().optional().meta({\r\n description:\r\n '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.',\r\n }),\r\n\r\n /**\r\n * The duration of the event.\r\n * For example, \"1D\" is one day and \"40Y\" is fourty years.\r\n */\r\n duration: z.string().optional().meta({\r\n description:\r\n 'The duration of the event. For example, \"1D\" is one day and \"40Y\" is fourty years.',\r\n }),\r\n\r\n /**\r\n * The people that participated in the event.\r\n */\r\n participants: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The people that participated in the event.',\r\n }),\r\n\r\n /**\r\n * The places that the event happened at.\r\n */\r\n locations: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The places that the event happened at.',\r\n }),\r\n\r\n /**\r\n * The people groups that participated in the event.\r\n */\r\n groups: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The people groups that participated in the event.',\r\n }),\r\n\r\n /**\r\n * The event that this event is a part of.\r\n */\r\n partOf: DatasetEntityRefSchema.optional().meta({\r\n description: 'The event that this event is a part of.',\r\n }),\r\n\r\n /**\r\n * The event that happened before this event.\r\n */\r\n predecessor: DatasetEntityRefSchema.optional().meta({\r\n description: 'The event that happened before this event.',\r\n }),\r\n\r\n /**\r\n * The list of Bible references that describe the event.\r\n * Sorted by book order, chapter, and verse.\r\n * Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.\r\n */\r\n references: z.array(VerseRefSchema).meta({\r\n description:\r\n '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`.',\r\n }),\r\n })\r\n .meta({\r\n id: 'DatasetEvent',\r\n description:\r\n 'Defines the schema for information about an event in a dataset.',\r\n });\r\n\r\nexport type DatasetEvent = z.infer<typeof DatasetEventSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a people group in a dataset.\r\n */\r\nexport const DatasetPeopleGroupSchema = z\r\n .object({\r\n /**\r\n * The ID of the people group.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the people group.',\r\n }),\r\n\r\n /**\r\n * The name of the people group.\r\n */\r\n name: z.string().meta({\r\n description: 'The name of the people group.',\r\n }),\r\n\r\n /**\r\n * The people that are members of the people group.\r\n */\r\n members: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The people that are members of the people group.',\r\n }),\r\n\r\n /**\r\n * The events that the people group participated in.\r\n */\r\n events: z.array(DatasetEntityRefSchema).optional().meta({\r\n description: 'The events that the people group participated in.',\r\n }),\r\n\r\n /**\r\n * The list of Bible references that mention the people group.\r\n * Sorted by book order, chapter, and verse.\r\n * Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.\r\n */\r\n references: z.array(VerseRefSchema).meta({\r\n description:\r\n '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`.',\r\n }),\r\n })\r\n .meta({\r\n id: 'DatasetPeopleGroup',\r\n description:\r\n 'Defines the schema for information about a people group in a dataset.',\r\n });\r\n\r\nexport type DatasetPeopleGroup = z.infer<typeof DatasetPeopleGroupSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a profile in a commentary.\r\n */\r\nexport const CommentaryProfileSchema = z.object({\r\n /**\r\n * The ID of the profile.\r\n */\r\n id: z.string().meta({\r\n description: 'The ID of the profile.',\r\n }),\r\n\r\n /**\r\n * The subject of the profile.\r\n */\r\n subject: z.string().meta({\r\n description: 'The subject of the profile.',\r\n }),\r\n\r\n /**\r\n * The Bible reference that the profile is associated with.\r\n */\r\n reference: VerseRefSchema.nullable().meta({\r\n description:\r\n \"The Bible reference that the profile is associated with. Null if the profile isn't associated with a specific Bible reference.\",\r\n }),\r\n});\r\n\r\nexport type CommentaryProfile = z.infer<typeof CommentaryProfileSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a book chapter.\r\n */\r\nexport const TranslationBookChapterSchema = z\r\n .object({\r\n /**\r\n * The information for the chapter.\r\n */\r\n chapter: z\r\n .lazy(() => ChapterDataSchema)\r\n .meta({\r\n description: 'The information for the chapter.',\r\n }),\r\n\r\n /**\r\n * The links to different audio versions for the chapter.\r\n */\r\n thisChapterAudioLinks: z\r\n .lazy(() => TranslationBookChapterAudioLinksSchema)\r\n .meta({\r\n description:\r\n 'The links to different audio versions for the chapter.',\r\n }),\r\n\r\n /**\r\n * The audio timings (per-verse start times, in seconds) for different audio versions for the chapter.\r\n */\r\n thisChapterAudioTimings: z\r\n .lazy(() => TranslationBookChapterAudioTimingsSchema)\r\n .meta({\r\n description:\r\n 'The audio timings (per-verse start times, in seconds) for different audio versions for the chapter.',\r\n }),\r\n\r\n /**\r\n * The word-level annotations for the chapter's verses.\r\n * Omitted if the translation doesn't have any word-level annotations for the chapter.\r\n */\r\n thisChapterWords: z\r\n .lazy(() => TranslationBookChapterWordsSchema)\r\n .optional()\r\n .meta({\r\n description:\r\n \"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.\",\r\n }),\r\n })\r\n .meta({\r\n id: 'TranslationBookChapter',\r\n description: 'Defines the schema for information about a book chapter.',\r\n });\r\n\r\nexport type TranslationBookChapter = z.infer<\r\n typeof TranslationBookChapterSchema\r\n>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a book chapter in a commentary.\r\n */\r\nexport const CommentaryBookChapterSchema = z\r\n .object({\r\n /**\r\n * The information for the chapter.\r\n */\r\n chapter: z\r\n .lazy(() => CommentaryChapterDataSchema)\r\n .meta({\r\n description: 'The information for the chapter.',\r\n }),\r\n })\r\n .meta({\r\n id: 'CommentaryBookChapter',\r\n description:\r\n 'Defines the schema for information about a book chapter in a commentary.',\r\n });\r\n\r\nexport type CommentaryBookChapter = z.infer<typeof CommentaryBookChapterSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for the audio links for a book chapter.\r\n */\r\nexport const TranslationBookChapterAudioLinksSchema = z\r\n .record(z.string(), z.string())\r\n .meta({\r\n id: 'TranslationBookChapterAudioLinks',\r\n description:\r\n 'Defines the schema for the audio links for a book chapter.',\r\n });\r\n\r\nexport type TranslationBookChapterAudioLinks = z.infer<\r\n typeof TranslationBookChapterAudioLinksSchema\r\n>;\r\n\r\n/**\r\n * Defines a Zod schema for the audio timings for a book chapter.\r\n * Maps a reader ID to the list of times (in seconds) that each verse starts, in verse order.\r\n */\r\nexport const TranslationBookChapterAudioTimingsSchema = z\r\n .record(z.string(), z.array(z.number()))\r\n .meta({\r\n id: 'TranslationBookChapterAudioTimings',\r\n description:\r\n '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.',\r\n });\r\n\r\nexport type TranslationBookChapterAudioTimings = z.infer<\r\n typeof TranslationBookChapterAudioTimingsSchema\r\n>;\r\n\r\n/**\r\n * Defines a Zod schema for a word-level annotation in a chapter.\r\n *\r\n * The annotation is anchored to a range of characters in a single item of a\r\n * verse's content, so that consumers can highlight exactly the characters that\r\n * it applies to.\r\n */\r\nexport const ChapterWordSchema = z\r\n .object({\r\n /**\r\n * The index of the item in the verse's content array that the annotation applies to.\r\n */\r\n contentIndex: z.number().meta({\r\n description:\r\n \"The index of the item in the verse's content array that the annotation applies to.\",\r\n }),\r\n\r\n /**\r\n * The index of the first character of the annotated word.\r\n */\r\n start: z.number().meta({\r\n description:\r\n \"The index of the first character of the annotated word in the content item's text.\",\r\n }),\r\n\r\n /**\r\n * The index after the last character of the annotated word.\r\n */\r\n end: z.number().meta({\r\n description:\r\n \"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.\",\r\n }),\r\n\r\n /**\r\n * The Strong's number(s) for the word.\r\n */\r\n strongs: z.array(z.string()).optional().meta({\r\n description:\r\n \"The Strong's number(s) for the word. Omitted if the translation only provided other annotations for the word.\",\r\n }),\r\n\r\n /**\r\n * The dictionary (citation) form of the word.\r\n */\r\n lemma: z.string().optional().meta({\r\n description:\r\n 'The dictionary (citation) form of the word. Omitted if the translation did not provide one.',\r\n }),\r\n\r\n /**\r\n * The morphology parse code for the word.\r\n */\r\n morph: z.string().optional().meta({\r\n description:\r\n 'The morphology parse code for the word. Omitted if the translation did not provide one.',\r\n }),\r\n\r\n /**\r\n * The pointer to the word in the source text.\r\n */\r\n srcloc: z.string().optional().meta({\r\n description:\r\n 'The pointer to the word in the source text, in the <sourceName>:<location> format. Omitted if the translation did not provide one.',\r\n }),\r\n\r\n /**\r\n * Which occurrence of the source word this word is.\r\n */\r\n occurrence: z.number().optional().meta({\r\n description:\r\n 'Which occurrence of the source word this word is. 1-based. Omitted if the translation did not provide one.',\r\n }),\r\n\r\n /**\r\n * The total number of times that the source word occurs.\r\n */\r\n occurrences: z.number().optional().meta({\r\n description:\r\n 'The total number of times that the source word occurs. Omitted if the translation did not provide one.',\r\n }),\r\n })\r\n .meta({\r\n id: 'ChapterWord',\r\n description:\r\n \"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.\",\r\n });\r\n\r\nexport type ChapterWord = z.infer<typeof ChapterWordSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for the word-level annotations for a book chapter.\r\n * Maps a verse number to the list of annotated words in the verse, in order.\r\n */\r\nexport const TranslationBookChapterWordsSchema = z\r\n .record(z.string(), z.array(z.lazy(() => ChapterWordSchema)))\r\n .meta({\r\n id: 'TranslationBookChapterWords',\r\n description:\r\n '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.',\r\n });\r\n\r\nexport type TranslationBookChapterWords = z.infer<\r\n typeof TranslationBookChapterWordsSchema\r\n>;\r\n\r\n/**\r\n * Defines a Zod schema for information about data in a chapter.\r\n */\r\nexport const ChapterDataSchema = z.object({\r\n /**\r\n * The number of the chapter.\r\n */\r\n number: z.number().meta({\r\n description: 'The number of the chapter.',\r\n }),\r\n\r\n /**\r\n * The content of the chapter.\r\n */\r\n content: z.array(z.lazy(() => ChapterContentSchema)).meta({\r\n description: 'The content of the chapter.',\r\n }),\r\n\r\n /**\r\n * The list of footnotes for the chapter.\r\n */\r\n footnotes: z.array(z.lazy(() => ChapterFootnoteSchema)).meta({\r\n description: 'The list of footnotes for the chapter.',\r\n }),\r\n});\r\n\r\nexport type ChapterData = z.infer<typeof ChapterDataSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for information about data in a chapter in a commentary.\r\n */\r\nexport const CommentaryChapterDataSchema = z.object({\r\n /**\r\n * The number of the chapter.\r\n */\r\n number: z.number().meta({\r\n description: 'The number of the chapter.',\r\n }),\r\n\r\n /**\r\n * The introduction that the commentary provided to the chapter.\r\n * Not all commentaries provide an introduction to a chapter.\r\n */\r\n introduction: z.string().optional().meta({\r\n description:\r\n 'The introduction that the commentary provided to the chapter. Not all commentaries provide an introduction to a chapter.',\r\n }),\r\n\r\n /**\r\n * The content of the chapter.\r\n */\r\n content: z.array(z.lazy(() => ChapterVerseSchema)).meta({\r\n description: 'The content of the chapter.',\r\n }),\r\n});\r\n\r\nexport type CommentaryChapterData = z.infer<typeof CommentaryChapterDataSchema>;\r\n\r\n/**\r\n * A Zod schema for a heading in a chapter.\r\n */\r\nexport const ChapterHeadingSchema = z\r\n .object({\r\n /**\r\n * Indicates that the content represents a heading.\r\n */\r\n type: z.literal('heading'),\r\n\r\n /**\r\n * The content for the heading.\r\n * If multiple strings are included in the array, they should be concatenated with a space.\r\n */\r\n content: z.array(z.string()).meta({\r\n description:\r\n 'The content for the heading. If multiple strings are included in the array, they should be concatenated with a space.',\r\n }),\r\n })\r\n .meta({\r\n id: 'ChapterHeading',\r\n description: 'Defines the schema for a heading in a chapter.',\r\n });\r\n\r\nexport type ChapterHeading = z.infer<typeof ChapterHeadingSchema>;\r\n\r\n/**\r\n * A Zod schema for a line break in a chapter.\r\n */\r\nexport const ChapterLineBreakSchema = z\r\n .object({\r\n /**\r\n * Indicates that the content represents a line break.\r\n */\r\n type: z.literal('line_break'),\r\n })\r\n .meta({\r\n id: 'ChapterLineBreak',\r\n description: 'Defines the schema for a line break in a chapter.',\r\n });\r\n\r\nexport type ChapterLineBreak = z.infer<typeof ChapterLineBreakSchema>;\r\n\r\n/**\r\n * A Zod schema for a Hebrew Subtitle in a chapter.\r\n * These are often used included as informational content that appeared in the original manuscripts.\r\n * For example, Psalms 49 has the Hebrew Subtitle \"To the choirmaster. A Psalm of the Sons of Korah.\"\r\n */\r\nexport const ChapterHebrewSubtitleSchema = z\r\n .object({\r\n /**\r\n * Indicates that the content represents a Hebrew Subtitle.\r\n */\r\n type: z.literal('hebrew_subtitle'),\r\n\r\n /**\r\n * The list of content that is contained in the subtitle.\r\n * Each element in the list could be a string, formatted text, or a footnote reference.\r\n */\r\n content: z\r\n .array(\r\n z.union([\r\n z.string(),\r\n z.lazy(() => FormattedTextSchema),\r\n z.lazy(() => VerseFootnoteReferenceSchema),\r\n ])\r\n )\r\n .meta({\r\n description:\r\n 'The content that is contained in the subtitle. Each element in the list could be a string, formatted text, or a footnote reference.',\r\n }),\r\n })\r\n .meta({\r\n id: 'ChapterHebrewSubtitle',\r\n description: 'Defines the schema for a Hebrew Subtitle in a chapter.',\r\n });\r\n\r\nexport type ChapterHebrewSubtitle = z.infer<typeof ChapterHebrewSubtitleSchema>;\r\n\r\n/**\r\n * A Zod schema for a verse in a chapter.\r\n */\r\nexport const ChapterVerseSchema = z\r\n .object({\r\n /**\r\n * Indicates that the content is a verse.\r\n */\r\n type: z.literal('verse'),\r\n\r\n /**\r\n * The number of the verse.\r\n */\r\n number: z.number().meta({\r\n description: 'The number of the verse.',\r\n }),\r\n\r\n /**\r\n * The list of content for the verse.\r\n * Each element in the list could be a string, formatted text, or a footnote reference.\r\n */\r\n content: z\r\n .array(\r\n z.union([\r\n z.string(),\r\n z.lazy(() => FormattedTextSchema),\r\n z.lazy(() => InlineHeadingSchema),\r\n z.lazy(() => InlineLineBreakSchema),\r\n z.lazy(() => VerseFootnoteReferenceSchema),\r\n ])\r\n )\r\n .meta({\r\n description:\r\n 'The list of content for the verse. Each element in the list could be a string, formatted text, or a footnote reference.',\r\n }),\r\n })\r\n .meta({\r\n id: 'ChapterVerse',\r\n description: 'Defines the schema for a verse in a chapter.',\r\n });\r\n\r\nexport type ChapterVerse = z.infer<typeof ChapterVerseSchema>;\r\n\r\n/**\r\n * A union type that represents a single piece of chapter content.\r\n * A piece of chapter content can be one of the following things:\r\n * - A heading.\r\n * - A line break.\r\n * - A verse.\r\n * - A Hebrew Subtitle.\r\n */\r\nexport const ChapterContentSchema = z\r\n .discriminatedUnion('type', [\r\n ChapterHeadingSchema,\r\n ChapterLineBreakSchema,\r\n ChapterVerseSchema,\r\n ChapterHebrewSubtitleSchema,\r\n ])\r\n .meta({\r\n id: 'ChapterContent',\r\n description:\r\n '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.',\r\n });\r\n\r\n/**\r\n * A union type that represents a single piece of chapter content.\r\n * A piece of chapter content can be one of the following things:\r\n * - A heading.\r\n * - A line break.\r\n * - A verse.\r\n * - A Hebrew Subtitle.\r\n */\r\nexport type ChapterContent = z.infer<typeof ChapterContentSchema>;\r\n\r\n/**\r\n * A Zod schema for formatted text. That is, text that is formatted in a particular manner.\r\n */\r\nexport const FormattedTextSchema = z\r\n .object({\r\n /**\r\n * The text that is formatted.\r\n */\r\n text: z.string().meta({\r\n description: 'The text that is formatted.',\r\n }),\r\n\r\n /**\r\n * Whether the text represents a poem.\r\n * The number indicates the level of indent.\r\n *\r\n * Common in Psalms.\r\n */\r\n poem: z.number().optional().meta({\r\n description:\r\n 'Whether the text represents a poem. The number indicates the level of indent. Common in Psalms.',\r\n }),\r\n\r\n /**\r\n * Whether the text represents the Words of Jesus.\r\n */\r\n wordsOfJesus: z.boolean().optional().meta({\r\n description: 'Whether the text represents the Words of Jesus.',\r\n }),\r\n })\r\n .meta({\r\n id: 'FormattedText',\r\n description:\r\n 'Defines the schema for formatted text. That is, text that is formatted in a particular manner.',\r\n });\r\n\r\nexport type FormattedText = z.infer<typeof FormattedTextSchema>;\r\n\r\n/**\r\n * A Zod schema for a heading that is embedded in a verse.\r\n */\r\nexport const InlineHeadingSchema = z\r\n .object({\r\n /**\r\n * The text of the heading.\r\n */\r\n heading: z.string().meta({\r\n description: 'The text of the heading.',\r\n }),\r\n })\r\n .meta({\r\n id: 'InlineHeading',\r\n description:\r\n 'Defines the schema for a heading that is embedded in a verse.',\r\n });\r\n\r\nexport type InlineHeading = z.infer<typeof InlineHeadingSchema>;\r\n\r\n/**\r\n * A Zod schema for a line break that is embedded in a verse.\r\n */\r\nexport const InlineLineBreakSchema = z\r\n .object({\r\n lineBreak: z.literal(true),\r\n })\r\n .meta({\r\n id: 'InlineLineBreak',\r\n description:\r\n 'Defines the schema for a line break that is embedded in a verse.',\r\n });\r\n\r\nexport type InlineLineBreak = z.infer<typeof InlineLineBreakSchema>;\r\n\r\n/**\r\n * A Zod schema for a footnote reference in a verse or a Hebrew Subtitle.\r\n */\r\nexport const VerseFootnoteReferenceSchema = z\r\n .object({\r\n /**\r\n * The ID of the note.\r\n */\r\n noteId: z.number().meta({\r\n description: 'The ID of the note.',\r\n }),\r\n })\r\n .meta({\r\n id: 'VerseFootnoteReference',\r\n description:\r\n 'Defines the schema for a footnote reference in a verse or a Hebrew Subtitle.',\r\n });\r\n\r\nexport type VerseFootnoteReference = z.infer<\r\n typeof VerseFootnoteReferenceSchema\r\n>;\r\n\r\n/**\r\n * A Zod schema for information about a footnote.\r\n */\r\nexport const ChapterFootnoteSchema = z\r\n .object({\r\n /**\r\n * The ID of the note that is referenced.\r\n */\r\n noteId: z.number().meta({\r\n description: 'The ID of the note that is referenced.',\r\n }),\r\n\r\n /**\r\n * The text of the footnote.\r\n */\r\n text: z.string().meta({\r\n description: 'The text of the footnote.',\r\n }),\r\n\r\n /**\r\n * The verse reference for the footnote.\r\n */\r\n reference: z\r\n .object({\r\n chapter: z.number(),\r\n verse: z.number(),\r\n })\r\n .optional()\r\n .meta({\r\n description:\r\n \"The verse reference for the footnote. Undefined if the footnote isn't associated with a specific verse.\",\r\n }),\r\n\r\n /**\r\n * The caller that should be used for the footnote.\r\n * For footnotes, a \"caller\" is the character that is used in the text to reference to footnote.\r\n *\r\n * For example, in the text:\r\n * Hello (a) World\r\n *\r\n * ----\r\n * (a) This is a footnote.\r\n *\r\n * The \"(a)\" is the caller.\r\n *\r\n * If \"+\", then the caller should be autogenerated.\r\n * If null, then the caller should be empty.\r\n * If a string, then the caller should be that string.\r\n */\r\n caller: z.union([z.literal('+'), z.string(), z.null()]).meta({\r\n description:\r\n '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.',\r\n }),\r\n })\r\n .meta({\r\n id: 'ChapterFootnote',\r\n description: 'Defines the schema for information about a footnote.',\r\n });\r\n\r\nexport type ChapterFootnote = z.infer<typeof ChapterFootnoteSchema>;\r\n\r\n/**\r\n * A Zod schema for a range of text inside a simplified verse.\r\n *\r\n * Ranges are expressed as offsets into the `text` property of the verse that contains them.\r\n * Offsets are measured in UTF-16 code units, which is what JavaScript's `String.prototype.length`,\r\n * `String.prototype.slice()`, and `String.prototype.substring()` use.\r\n */\r\nexport const SimpleTextRangeSchema = z\r\n .object({\r\n /**\r\n * The index of the first character in the range.\r\n */\r\n start: z.number().meta({\r\n description:\r\n 'The index of the first character of the range in the verse text. Measured in UTF-16 code units.',\r\n }),\r\n\r\n /**\r\n * The index after the last character in the range.\r\n */\r\n end: z.number().meta({\r\n description:\r\n 'The index after the last character of the range in the verse text. Measured in UTF-16 code units.',\r\n }),\r\n })\r\n .meta({\r\n id: 'SimpleTextRange',\r\n description:\r\n '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.',\r\n });\r\n\r\nexport type SimpleTextRange = z.infer<typeof SimpleTextRangeSchema>;\r\n\r\n/**\r\n * A Zod schema for a range of text inside a simplified verse that represents a line of poetry.\r\n */\r\nexport const SimplePoemRangeSchema = SimpleTextRangeSchema.extend({\r\n /**\r\n * The level of indent that the poem line should be displayed with.\r\n */\r\n level: z.number().meta({\r\n description:\r\n 'The level of indent that the line of poetry should be displayed with.',\r\n }),\r\n}).meta({\r\n id: 'SimplePoemRange',\r\n description:\r\n 'Defines the schema for a range of text inside a simplified verse that represents a line of poetry.',\r\n});\r\n\r\nexport type SimplePoemRange = z.infer<typeof SimplePoemRangeSchema>;\r\n\r\n/**\r\n * A Zod schema for a footnote in a simplified verse.\r\n */\r\nexport const SimpleVerseFootnoteSchema = z\r\n .object({\r\n /**\r\n * The ID of the note.\r\n */\r\n noteId: z.number().meta({\r\n description: 'The ID of the note.',\r\n }),\r\n\r\n /**\r\n * The index in the verse text that the footnote caller should be inserted at.\r\n */\r\n offset: z.number().meta({\r\n description:\r\n 'The index in the verse text that the footnote caller should be inserted at. Measured in UTF-16 code units.',\r\n }),\r\n\r\n /**\r\n * The text of the footnote.\r\n */\r\n text: z.string().meta({\r\n description: 'The text of the footnote.',\r\n }),\r\n\r\n /**\r\n * The caller that should be used for the footnote.\r\n * See ChapterFootnote for more information.\r\n */\r\n caller: z.union([z.literal('+'), z.string(), z.null()]).meta({\r\n description:\r\n '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.',\r\n }),\r\n })\r\n .meta({\r\n id: 'SimpleVerseFootnote',\r\n description:\r\n '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.',\r\n });\r\n\r\nexport type SimpleVerseFootnote = z.infer<typeof SimpleVerseFootnoteSchema>;\r\n\r\n/**\r\n * A Zod schema for a heading that is embedded in a simplified verse.\r\n */\r\nexport const SimpleInlineHeadingSchema = z\r\n .object({\r\n /**\r\n * The index in the verse text that the heading occurs at.\r\n */\r\n offset: z.number().meta({\r\n description:\r\n 'The index in the verse text that the heading occurs at. Measured in UTF-16 code units.',\r\n }),\r\n\r\n /**\r\n * The text of the heading.\r\n */\r\n text: z.string().meta({\r\n description: 'The text of the heading.',\r\n }),\r\n })\r\n .meta({\r\n id: 'SimpleInlineHeading',\r\n description:\r\n 'Defines the schema for a heading that is embedded in a simplified verse.',\r\n });\r\n\r\nexport type SimpleInlineHeading = z.infer<typeof SimpleInlineHeadingSchema>;\r\n\r\n/**\r\n * A Zod schema for a verse in a simplified chapter.\r\n */\r\nexport const SimpleChapterVerseSchema = z\r\n .object({\r\n /**\r\n * Indicates that the content is a verse.\r\n */\r\n type: z.literal('verse'),\r\n\r\n /**\r\n * The number of the verse.\r\n */\r\n number: z.number().meta({\r\n description: 'The number of the verse.',\r\n }),\r\n\r\n /**\r\n * The text of the verse.\r\n */\r\n text: z.string().meta({\r\n description:\r\n 'The text of the verse. Lines of poetry and line breaks are separated by newline (\\\\n) characters.',\r\n }),\r\n\r\n /**\r\n * The footnotes that occur in the verse.\r\n */\r\n footnotes: z.array(SimpleVerseFootnoteSchema).meta({\r\n description: 'The footnotes that occur in the verse.',\r\n }),\r\n\r\n /**\r\n * The headings that occur in the verse.\r\n */\r\n headings: z.array(SimpleInlineHeadingSchema).optional().meta({\r\n description:\r\n 'The headings that occur in the middle of the verse. Omitted if the verse contains no inline headings.',\r\n }),\r\n\r\n /**\r\n * The ranges of text that represent the Words of Jesus.\r\n */\r\n wordsOfJesus: z.array(SimpleTextRangeSchema).optional().meta({\r\n description:\r\n 'The ranges of the verse text that represent the Words of Jesus. Omitted if the verse contains none.',\r\n }),\r\n\r\n /**\r\n * The ranges of text that represent lines of poetry.\r\n */\r\n poem: z.array(SimplePoemRangeSchema).optional().meta({\r\n description:\r\n 'The ranges of the verse text that represent lines of poetry. Omitted if the verse contains none.',\r\n }),\r\n })\r\n .meta({\r\n id: 'SimpleChapterVerse',\r\n description: 'Defines the schema for a verse in a simplified chapter.',\r\n });\r\n\r\nexport type SimpleChapterVerse = z.infer<typeof SimpleChapterVerseSchema>;\r\n\r\n/**\r\n * A Zod schema for a Hebrew Subtitle in a simplified chapter.\r\n */\r\nexport const SimpleChapterHebrewSubtitleSchema = SimpleChapterVerseSchema.omit({\r\n type: true,\r\n number: true,\r\n})\r\n .extend({\r\n /**\r\n * Indicates that the content represents a Hebrew Subtitle.\r\n */\r\n type: z.literal('hebrew_subtitle'),\r\n })\r\n .meta({\r\n id: 'SimpleChapterHebrewSubtitle',\r\n description:\r\n 'Defines the schema for a Hebrew Subtitle in a simplified chapter.',\r\n });\r\n\r\nexport type SimpleChapterHebrewSubtitle = z.infer<\r\n typeof SimpleChapterHebrewSubtitleSchema\r\n>;\r\n\r\n/**\r\n * A Zod schema for a heading in a simplified chapter.\r\n */\r\nexport const SimpleChapterHeadingSchema = z\r\n .object({\r\n /**\r\n * Indicates that the content represents a heading.\r\n */\r\n type: z.literal('heading'),\r\n\r\n /**\r\n * The text of the heading.\r\n */\r\n text: z.string().meta({\r\n description: 'The text of the heading.',\r\n }),\r\n })\r\n .meta({\r\n id: 'SimpleChapterHeading',\r\n description:\r\n 'Defines the schema for a heading in a simplified chapter.',\r\n });\r\n\r\nexport type SimpleChapterHeading = z.infer<typeof SimpleChapterHeadingSchema>;\r\n\r\n/**\r\n * A union type that represents a single piece of content in a simplified chapter.\r\n * A piece of chapter content can be one of the following things:\r\n * - A heading.\r\n * - A line break.\r\n * - A verse.\r\n * - A Hebrew Subtitle.\r\n */\r\nexport const SimpleChapterContentSchema = z\r\n .discriminatedUnion('type', [\r\n SimpleChapterHeadingSchema,\r\n ChapterLineBreakSchema,\r\n SimpleChapterVerseSchema,\r\n SimpleChapterHebrewSubtitleSchema,\r\n ])\r\n .meta({\r\n id: 'SimpleChapterContent',\r\n description:\r\n '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.',\r\n });\r\n\r\nexport type SimpleChapterContent = z.infer<typeof SimpleChapterContentSchema>;\r\n\r\n/**\r\n * A Zod schema for the data in a simplified chapter.\r\n */\r\nexport const SimpleChapterDataSchema = z\r\n .object({\r\n /**\r\n * The number of the chapter.\r\n */\r\n number: z.number().meta({\r\n description: 'The number of the chapter.',\r\n }),\r\n\r\n /**\r\n * The content of the chapter.\r\n */\r\n content: z.array(SimpleChapterContentSchema).meta({\r\n description: 'The content of the chapter.',\r\n }),\r\n\r\n /**\r\n * The footnotes that could not be associated with a verse.\r\n */\r\n footnotes: z.array(ChapterFootnoteSchema).meta({\r\n description:\r\n '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.',\r\n }),\r\n })\r\n .meta({\r\n id: 'SimpleChapterData',\r\n description:\r\n '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.',\r\n });\r\n\r\nexport type SimpleChapterData = z.infer<typeof SimpleChapterDataSchema>;\r\n\r\n/**\r\n * A Zod schema for the data in a simplified commentary chapter.\r\n */\r\nexport const SimpleCommentaryChapterDataSchema = z\r\n .object({\r\n /**\r\n * The number of the chapter.\r\n */\r\n number: z.number().meta({\r\n description: 'The number of the chapter.',\r\n }),\r\n\r\n /**\r\n * The introduction that the commentary provided to the chapter.\r\n */\r\n introduction: z.string().optional().meta({\r\n description:\r\n 'The introduction that the commentary provided to the chapter. Not all commentaries provide an introduction to a chapter.',\r\n }),\r\n\r\n /**\r\n * The content of the chapter.\r\n */\r\n content: z.array(SimpleChapterVerseSchema).meta({\r\n description: 'The content of the chapter.',\r\n }),\r\n })\r\n .meta({\r\n id: 'SimpleCommentaryChapterData',\r\n description:\r\n 'Defines the schema for the data in a simplified commentary chapter.',\r\n });\r\n\r\nexport type SimpleCommentaryChapterData = z.infer<\r\n typeof SimpleCommentaryChapterDataSchema\r\n>;\r\n\r\n/**\r\n * Defines a Zod schema for information about a book chapter, using the simplified\r\n * chapter format.\r\n */\r\nexport const SimpleTranslationBookChapterSchema =\r\n TranslationBookChapterSchema.extend({\r\n /**\r\n * The simplified information for the chapter.\r\n */\r\n chapter: z\r\n .lazy(() => SimpleChapterDataSchema)\r\n .meta({\r\n description: 'The simplified information for the chapter.',\r\n }),\r\n\r\n /**\r\n * The word-level annotations for the chapter's verses, using the simplified format.\r\n */\r\n thisChapterWords: z\r\n .lazy(() => SimpleTranslationBookChapterWordsSchema)\r\n .optional()\r\n .meta({\r\n description:\r\n \"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.\",\r\n }),\r\n }).meta({\r\n id: 'SimpleTranslationBookChapter',\r\n description:\r\n 'Defines the schema for information about a book chapter, using the simplified chapter format.',\r\n });\r\n\r\nexport type SimpleTranslationBookChapter = z.infer<\r\n typeof SimpleTranslationBookChapterSchema\r\n>;\r\n\r\n/**\r\n * A Zod schema for a word-level annotation in a simplified chapter.\r\n *\r\n * Unlike the regular annotations, these are anchored to a range of characters in the\r\n * text of a verse, since the simplified format replaces the verse's content array with\r\n * a single string.\r\n */\r\nexport const SimpleChapterWordSchema = ChapterWordSchema.omit({\r\n contentIndex: true,\r\n}).meta({\r\n id: 'SimpleChapterWord',\r\n description:\r\n \"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.\",\r\n});\r\n\r\nexport type SimpleChapterWord = z.infer<typeof SimpleChapterWordSchema>;\r\n\r\n/**\r\n * Defines a Zod schema for the word-level annotations for a book chapter, using the\r\n * simplified format.\r\n * Maps a verse number to the list of annotated words in the verse, in order.\r\n */\r\nexport const SimpleTranslationBookChapterWordsSchema = z\r\n .record(z.string(), z.array(z.lazy(() => SimpleChapterWordSchema)))\r\n .meta({\r\n id: 'SimpleTranslationBookChapterWords',\r\n description:\r\n '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.',\r\n });\r\n\r\nexport type SimpleTranslationBookChapterWords = z.infer<\r\n typeof SimpleTranslationBookChapterWordsSchema\r\n>;\r\n"],
5
+ "mappings": ";AAAA,SAAS,SAAS;AAClB,SAAS,cAAwB,sBAAsB;AAkHhD,aAAM,oBAAoB,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAItC,IAAI,EAAE,OAAO,EAAE,KAAK;AAAA,IAChB,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,MAAM,EAAE,OAAO,EAAE,KAAK;AAAA,IAClB,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,SAAS,EAAE,OAAO,EAAE,KAAK;AAAA,IACrB,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,YAAY,EAAE,OAAO,EAAE,KAAK;AAAA,IACxB,aACI;AAAA,EACR,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK;AAAA,IAChD,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKD,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK;AAAA,IACjD,aACI;AAAA,EACR,CAAC;AAAA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AAAA;AAAA;AAAA;AAAA,EAKD,SAAS,EAAE,MAAM,wBAAwB,EAAE,KAAK;AAAA,IAC5C,aAAa;AAAA,EACjB,CAAC;AACL,CAAC,EACA,KAAK;AAAA,EACF,IAAI;AAAA,EACJ,aACI;AACR,CAAC;AAUE,aAAM,qCACT,6BAA6B,OAAO;AAAA;AAAA;AAAA;AAAA,EAIhC,SAAS,EACJ,KAAK,MAAM,uBAAuB,EAClC,KAAK;AAAA,IACF,aAAa;AAAA,EACjB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKL,kBAAkB,EACb,KAAK,MAAM,uCAAuC,EAClD,SAAS,EACT,KAAK;AAAA,IACF,aACI;AAAA,EACR,CAAC;AACT,CAAC,EAAE,KAAK;AAAA,EACJ,IAAI;AAAA,EACJ,aACI;AACR,CAAC;AAaE,aAAM,0BAA0B,kBAAkB,KAAK;AAAA,EAC1D,cAAc;AAClB,CAAC,EAAE,KAAK;AAAA,EACJ,IAAI;AAAA,EACJ,aACI;AACR,CAAC;AASM,aAAM,0CAA0C,EAClD,OAAO,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,KAAK,MAAM,uBAAuB,CAAC,CAAC,EACjE,KAAK;AAAA,EACF,IAAI;AAAA,EACJ,aACI;AACR,CAAC;",
6
6
  "names": []
7
7
  }
@@ -6,7 +6,7 @@ import {
6
6
  bookOrderMap,
7
7
  apocryphaBooks
8
8
  } from "./book-order.js";
9
- import { omit, sortBy, sortedIndexBy } from "lodash";
9
+ import { omit, sortBy, sortedIndexBy } from "es-toolkit/compat";
10
10
  import { getAudioUrlsForChapter } from "./audio.js";
11
11
  import { CodexParser } from "../parser/codex-parser.js";
12
12
  import { CommentaryCsvParser } from "../parser/commentary-csv-parser.js";
@@ -140,7 +140,11 @@ export function generateDataset(files, parser = new globalThis.DOMParser(), book
140
140
  translation.id,
141
141
  id,
142
142
  content.number
143
- )
143
+ ),
144
+ thisChapterAudioTimings: {},
145
+ // Word annotations are kept out of the chapter itself so
146
+ // that they can be published as a separate file.
147
+ ...content.words ? { thisChapterWords: content.words } : {}
144
148
  });
145
149
  }
146
150
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../generation/dataset.ts"],
4
- "sourcesContent": ["import { UsfmParser } from '../parser/usfm-parser.js';\r\nimport { USXParser } from '../parser/usx-parser.js';\r\nimport {\r\n Commentary,\r\n CommentaryBook,\r\n CommentaryBookChapter,\r\n CommentaryChapterData,\r\n CommentaryProfile,\r\n InputCommentaryFile,\r\n InputFile,\r\n InputFileBase,\r\n InputTranslationFile,\r\n MetadataBase,\r\n Translation,\r\n TranslationBook,\r\n TranslationBookChapter,\r\n Dataset as CommonDataset,\r\n DatasetBook,\r\n DatasetBookChapter,\r\n} from './common-types.js';\r\nimport {\r\n bookIdMap as defaultBookIdMap,\r\n bookOrderMap,\r\n apocryphaBooks,\r\n} from './book-order.js';\r\nimport { omit, sortBy, sortedIndexBy } from 'lodash';\r\nimport { getAudioUrlsForChapter } from './audio.js';\r\nimport { CodexParser } from '../parser/codex-parser.js';\r\nimport { CommentaryCsvParser } from '../parser/commentary-csv-parser.js';\r\nimport {\r\n CommentaryParseTree,\r\n ParseMessage,\r\n ParseTree,\r\n} from '../parser/types.js';\r\nimport { TyndaleXmlParser } from '../parser/tyndale-xml-parser.js';\r\nimport { getLogger } from '../log.js';\r\nimport { LockmanParser } from '../parser/lockman-parser.js';\r\nimport { BookId } from '../utils.js';\r\n\r\nexport const DATASET_VERSION = 1;\r\n\r\n/**\r\n * Defines an interface that contains generated dataset info.\r\n */\r\nexport interface DatasetOutput {\r\n /**\r\n * The list of translations that are available in the dataset.\r\n */\r\n translations: DatasetTranslation[];\r\n\r\n /**\r\n * The list of commentaries that are available in the dataset.\r\n */\r\n commentaries: DatasetCommentary[];\r\n\r\n /**\r\n * The list of datasets that are available in the dataset.\r\n */\r\n datasets?: DatasetDataset[];\r\n\r\n parseMessages?: {\r\n [key: string]: ParseMessage[];\r\n };\r\n}\r\n\r\n/**\r\n * Defines a translation that is used in the dataset.\r\n */\r\nexport interface DatasetTranslation extends Translation {\r\n /**\r\n * The list of books that are available for the translation.\r\n */\r\n books: DatasetTranslationBook[];\r\n}\r\n\r\n/**\r\n * Defines a commentary that is used in the dataset.\r\n */\r\nexport interface DatasetCommentary extends Commentary {\r\n /**\r\n * The list of books that are available for the commentary.\r\n */\r\n books: DatasetCommentaryBook[];\r\n\r\n /**\r\n * The list of profiles that are available for the commentary.\r\n */\r\n profiles: DatasetCommentaryProfile[];\r\n}\r\n\r\n/**\r\n * Defines a translation book that is used in the dataset.\r\n */\r\nexport interface DatasetTranslationBook extends TranslationBook {\r\n /**\r\n * The list of chapters that are available for the book.\r\n */\r\n chapters: TranslationBookChapter[];\r\n}\r\n\r\n/**\r\n * Defines a commentary book that is used in the dataset.\r\n */\r\nexport interface DatasetCommentaryBook extends CommentaryBook {\r\n /**\r\n * The list of chapters that are available for the book.\r\n */\r\n chapters: CommentaryBookChapter[];\r\n}\r\n\r\nexport interface DatasetCommentaryProfile extends CommentaryProfile {\r\n /**\r\n * The contents of the profile.\r\n */\r\n content: string[];\r\n}\r\n\r\nexport interface DatasetDataset extends CommonDataset {\r\n books: DatasetDatasetBook[];\r\n}\r\n\r\nexport interface DatasetDatasetBook extends DatasetBook {\r\n chapters: DatasetBookChapter[];\r\n}\r\n\r\n/**\r\n * Generates a list of output files from the given list of input files.\r\n * @param file The list of files.\r\n * @param parser The parser to use for parsing the files.\r\n * @param bookMap The map of book IDs to names. If undefined, then a default map will be used.\r\n */\r\nexport function generateDataset(\r\n files: InputFile[],\r\n parser: DOMParser = new globalThis.DOMParser(),\r\n bookMap?: Map<string, { commonName: string }> | undefined\r\n): DatasetOutput {\r\n const logger = getLogger();\r\n let output: DatasetOutput = {\r\n translations: [],\r\n commentaries: [],\r\n };\r\n\r\n let usfmParser = new UsfmParser();\r\n let usxParser = new USXParser(parser);\r\n let codexParser = new CodexParser(parser);\r\n let csvCommentaryParser = new CommentaryCsvParser();\r\n let tyndaleXmlParser = new TyndaleXmlParser(parser);\r\n let lockmanParser = new LockmanParser();\r\n\r\n let parsedTranslations = new Map<string, DatasetTranslation>();\r\n let parsedCommentaries = new Map<string, DatasetCommentary>();\r\n\r\n const unknownLanguages = new Set<string>();\r\n for (let file of files) {\r\n try {\r\n let parser:\r\n | UsfmParser\r\n | USXParser\r\n | CodexParser\r\n | CommentaryCsvParser\r\n | TyndaleXmlParser\r\n | LockmanParser;\r\n if (file.fileType === 'usfm') {\r\n parser = usfmParser;\r\n } else if (file.fileType === 'usx') {\r\n parser = usxParser;\r\n } else if (file.fileType === 'json') {\r\n parser = codexParser;\r\n } else if (file.fileType === 'commentary/csv') {\r\n parser = csvCommentaryParser;\r\n } else if (file.fileType === 'commentary/tyndale-xml') {\r\n parser = tyndaleXmlParser;\r\n } else if (file.fileType === 'lockman') {\r\n parser = lockmanParser;\r\n } else {\r\n logger.warn(\r\n '[generate] File does not have a valid type!',\r\n file.name\r\n );\r\n continue;\r\n }\r\n\r\n const parsed:\r\n | ParseTree\r\n | CommentaryParseTree\r\n | (ParseTree | CommentaryParseTree)[] = parser.parse(\r\n file.content\r\n );\r\n\r\n if (Array.isArray(parsed)) {\r\n for (let p of parsed) {\r\n logParseMessages(p, file);\r\n if (p.type === 'root') {\r\n addTranslationTree(file as InputTranslationFile, p);\r\n } else {\r\n addCommentaryTree(file as InputCommentaryFile, p);\r\n }\r\n }\r\n } else {\r\n logParseMessages(parsed, file);\r\n if (parsed.type === 'root') {\r\n addTranslationTree(file as InputTranslationFile, parsed);\r\n } else {\r\n addCommentaryTree(file as InputCommentaryFile, parsed);\r\n }\r\n }\r\n } catch (err) {\r\n logger.error(\r\n `[generate] Error occurred while parsing ${file.name}`,\r\n err\r\n );\r\n }\r\n }\r\n\r\n function logParseMessages(\r\n parsed: ParseTree | CommentaryParseTree,\r\n file: InputFile\r\n ) {\r\n if ('parseMessages' in parsed && parsed.parseMessages && file.name) {\r\n const messages = (output.parseMessages =\r\n output.parseMessages || {});\r\n messages[file.name] = parsed.parseMessages;\r\n }\r\n }\r\n\r\n function addTranslationTree(file: InputTranslationFile, parsed: ParseTree) {\r\n const id = parsed.id;\r\n\r\n if (!id) {\r\n logger.warn(\r\n '[generate] File does not have a valid book ID!',\r\n file.name,\r\n id\r\n );\r\n return;\r\n }\r\n\r\n const order = bookOrderMap.get(id);\r\n\r\n if (typeof order !== 'number') {\r\n logger.warn('[generate] Book does not have an order!', id);\r\n return;\r\n }\r\n\r\n const isApocryphal = apocryphaBooks.has(id);\r\n\r\n const bookName = getBookNames(file, file.metadata, id);\r\n\r\n let translation = parsedTranslations.get(file.metadata.id);\r\n\r\n if (!translation) {\r\n translation = {\r\n ...omit(file.metadata, 'direction'),\r\n textDirection: file.metadata.direction,\r\n books: [],\r\n };\r\n output.translations.push(translation);\r\n parsedTranslations.set(file.metadata.id, translation);\r\n }\r\n\r\n const name =\r\n parsed.header ??\r\n (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ??\r\n parsed.title ??\r\n bookName?.bookName?.commonName;\r\n\r\n if (!name) {\r\n logger.warn('[generate] Book does not have a name!', file.name, id);\r\n return;\r\n }\r\n\r\n const commonName =\r\n (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ??\r\n parsed.header ??\r\n parsed.title ??\r\n bookName?.bookName?.commonName ??\r\n id;\r\n\r\n const book: DatasetTranslationBook = {\r\n id: id as BookId,\r\n name,\r\n commonName,\r\n title: parsed.title ?? null,\r\n order,\r\n chapters: [],\r\n };\r\n\r\n if (isApocryphal) {\r\n book.isApocryphal = true;\r\n }\r\n\r\n for (let content of parsed.content) {\r\n if (content.type === 'chapter') {\r\n book.chapters.push({\r\n chapter: {\r\n number: content.number,\r\n content: content.content,\r\n footnotes: content.footnotes,\r\n },\r\n thisChapterAudioLinks: getAudioUrlsForChapter(\r\n translation.id,\r\n id,\r\n content.number\r\n ),\r\n });\r\n }\r\n }\r\n\r\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\r\n\r\n const index = sortedIndexBy(translation.books, book, (b) => b.order);\r\n translation.books.splice(index, 0, book);\r\n }\r\n\r\n function addCommentaryTree(\r\n file: InputCommentaryFile,\r\n parsed: CommentaryParseTree\r\n ) {\r\n let commentary = parsedCommentaries.get(file.metadata.id);\r\n\r\n if (!commentary) {\r\n commentary = {\r\n ...omit(file.metadata, 'direction'),\r\n textDirection: file.metadata.direction,\r\n books: [],\r\n profiles: [],\r\n };\r\n output.commentaries.push(commentary);\r\n parsedCommentaries.set(file.metadata.id, commentary);\r\n }\r\n\r\n for (let parsedBook of parsed.books) {\r\n let book = commentary.books.find((b) => b.id === parsedBook.book);\r\n if (book && book.introduction && parsedBook.introduction) {\r\n logger.warn(\r\n '[generate] Book already exists in commentary!',\r\n file.name,\r\n parsedBook.book\r\n );\r\n continue;\r\n }\r\n\r\n if (!book) {\r\n const name = getBookNames(file, file.metadata, parsedBook.book);\r\n book = {\r\n id: parsedBook.book as BookId,\r\n order: bookOrderMap.get(parsedBook.book) ?? -1,\r\n commonName: name?.bookName?.commonName ?? parsedBook.book,\r\n name: name?.bookName?.commonName ?? parsedBook.book,\r\n chapters: [],\r\n };\r\n }\r\n\r\n if (parsedBook.introduction) {\r\n book.introduction = parsedBook.introduction;\r\n }\r\n\r\n if (parsedBook.introductionSummary && !book.introductionSummary) {\r\n book.introductionSummary = parsedBook.introductionSummary;\r\n }\r\n\r\n for (let chapter of parsedBook.chapters) {\r\n let data: CommentaryChapterData = {\r\n number: chapter.number,\r\n content: chapter.verses,\r\n };\r\n\r\n if (chapter.introduction) {\r\n data.introduction = chapter.introduction;\r\n }\r\n\r\n book.chapters.push({\r\n chapter: data,\r\n });\r\n }\r\n\r\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\r\n commentary.books.push(book);\r\n }\r\n\r\n if (parsed.profiles) {\r\n for (let profile of parsed.profiles) {\r\n const existing = commentary.profiles.find(\r\n (p) => p.id === profile.id\r\n );\r\n if (existing) {\r\n logger.warn(\r\n '[generate] Profile already exists in commentary!',\r\n file.name,\r\n profile.id\r\n );\r\n continue;\r\n }\r\n\r\n const datasetProfile: DatasetCommentaryProfile = {\r\n id: profile.id,\r\n subject: profile.subject,\r\n reference: profile.reference,\r\n content: profile.content,\r\n };\r\n\r\n commentary.profiles.push(datasetProfile);\r\n }\r\n }\r\n\r\n commentary.books = sortBy(commentary.books, (b) => b.order);\r\n commentary.profiles = sortBy(commentary.profiles, (p) => p.id);\r\n }\r\n\r\n function getBookNames(\r\n file: InputFileBase,\r\n metadata: MetadataBase,\r\n id: string\r\n ) {\r\n let exactMatch = true;\r\n let map = bookMap;\r\n if (!map) {\r\n map = defaultBookIdMap.get(metadata.language);\r\n\r\n if (!map) {\r\n if (!unknownLanguages.has(metadata.language)) {\r\n logger.warn(\r\n '[generate] File does not have a known language!',\r\n file.name,\r\n metadata.language\r\n );\r\n unknownLanguages.add(metadata.language);\r\n }\r\n\r\n logger.warn(\r\n '[generate] Using English book map for unknown language! This might result in outputting english book names.'\r\n );\r\n exactMatch = false;\r\n map = defaultBookIdMap.get('en');\r\n }\r\n }\r\n\r\n const bookName = map?.get(id);\r\n\r\n if (!!map && !bookName) {\r\n logger.warn(\r\n '[generate] Book name not found for ID!',\r\n file.name,\r\n id\r\n );\r\n return null;\r\n }\r\n\r\n return {\r\n exactMatch,\r\n bookName,\r\n };\r\n }\r\n\r\n return output;\r\n}\r\n"],
5
- "mappings": ";AAAA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAmB1B;AAAA,EACI,aAAa;AAAA,EACb;AAAA,EACA;AAAA,OACG;AACP,SAAS,MAAM,QAAQ,qBAAqB;AAC5C,SAAS,8BAA8B;AACvC,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AAMpC,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAGvB,aAAM,kBAAkB;AA4FxB,gBAAS,gBACZ,OACA,SAAoB,IAAI,WAAW,UAAU,GAC7C,SACa;AACb,QAA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A,UACnB,SAAS,QAAQ;AAAA,QACrB;AAEA,mBAAW,SAAS,KAAK,cAAc;AAAA,MAC3C;AAAA,IACJ;AAEA,eAAW,QAAQ,OAAO,WAAW,OAAO,CAAC,MAAM,EAAE,KAAK;AAC1D,eAAW,WAAW,OAAO,WAAW,UAAU,CAAC,MAAM,EAAE,EAAE;AAAA,EACjE;AAEA,WAAS,aACL,MACA,UACA,IACF;AACE,QAAI,aAAa;AACjB,QAAI,MAAM;AACV,QAAI,CAAC,KAAK;AACN,YAAM,iBAAiB,IAAI,SAAS,QAAQ;AAE5C,UAAI,CAAC,KAAK;AACN,YAAI,CAAC,iBAAiB,IAAI,SAAS,QAAQ,GAAG;AAC1C,iBAAO;AAAA,YACH;AAAA,YACA,KAAK;AAAA,YACL,SAAS;AAAA,UACb;AACA,2BAAiB,IAAI,SAAS,QAAQ;AAAA,QAC1C;AAEA,eAAO;AAAA,UACH;AAAA,QACJ;AACA,qBAAa;AACb,cAAM,iBAAiB,IAAI,IAAI;AAAA,MACnC;AAAA,IACJ;AAEA,UAAM,WAAW,KAAK,IAAI,EAAE;AAE5B,QAAI,CAAC,CAAC,OAAO,CAAC,UAAU;AACpB,aAAO;AAAA,QACH;AAAA,QACA,KAAK;AAAA,QACL;AAAA,MACJ;AACA,aAAO;AAAA,IACX;AAEA,WAAO;AAAA,MACH;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAEA,SAAO;AACX;",
4
+ "sourcesContent": ["import { UsfmParser } from '../parser/usfm-parser.js';\r\nimport { USXParser } from '../parser/usx-parser.js';\r\nimport {\r\n Commentary,\r\n CommentaryBook,\r\n CommentaryBookChapter,\r\n CommentaryChapterData,\r\n CommentaryProfile,\r\n InputCommentaryFile,\r\n InputFile,\r\n InputFileBase,\r\n InputTranslationFile,\r\n MetadataBase,\r\n Translation,\r\n TranslationBook,\r\n TranslationBookChapter,\r\n Dataset as CommonDataset,\r\n DatasetBook,\r\n DatasetBookChapter,\r\n DatasetPerson,\r\n DatasetPlace,\r\n DatasetEvent,\r\n DatasetPeopleGroup,\r\n} from './common-types.js';\r\nimport {\r\n bookIdMap as defaultBookIdMap,\r\n bookOrderMap,\r\n apocryphaBooks,\r\n} from './book-order.js';\r\nimport { omit, sortBy, sortedIndexBy } from 'es-toolkit/compat';\r\nimport { getAudioUrlsForChapter } from './audio.js';\r\nimport { CodexParser } from '../parser/codex-parser.js';\r\nimport { CommentaryCsvParser } from '../parser/commentary-csv-parser.js';\r\nimport {\r\n CommentaryParseTree,\r\n ParseMessage,\r\n ParseTree,\r\n} from '../parser/types.js';\r\nimport { TyndaleXmlParser } from '../parser/tyndale-xml-parser.js';\r\nimport { getLogger } from '../log.js';\r\nimport { LockmanParser } from '../parser/lockman-parser.js';\r\nimport { BookId } from '../utils.js';\r\n\r\nexport const DATASET_VERSION = 1;\r\n\r\n/**\r\n * Defines an interface that contains generated dataset info.\r\n */\r\nexport interface DatasetOutput {\r\n /**\r\n * The list of translations that are available in the dataset.\r\n */\r\n translations: DatasetTranslation[];\r\n\r\n /**\r\n * The list of commentaries that are available in the dataset.\r\n */\r\n commentaries: DatasetCommentary[];\r\n\r\n /**\r\n * The list of datasets that are available in the dataset.\r\n */\r\n datasets?: DatasetDataset[];\r\n\r\n parseMessages?: {\r\n [key: string]: ParseMessage[];\r\n };\r\n}\r\n\r\n/**\r\n * Defines a translation that is used in the dataset.\r\n */\r\nexport interface DatasetTranslation extends Translation {\r\n /**\r\n * The list of books that are available for the translation.\r\n */\r\n books: DatasetTranslationBook[];\r\n}\r\n\r\n/**\r\n * Defines a commentary that is used in the dataset.\r\n */\r\nexport interface DatasetCommentary extends Commentary {\r\n /**\r\n * The list of books that are available for the commentary.\r\n */\r\n books: DatasetCommentaryBook[];\r\n\r\n /**\r\n * The list of profiles that are available for the commentary.\r\n */\r\n profiles: DatasetCommentaryProfile[];\r\n}\r\n\r\n/**\r\n * Defines a translation book that is used in the dataset.\r\n */\r\nexport interface DatasetTranslationBook extends TranslationBook {\r\n /**\r\n * The list of chapters that are available for the book.\r\n */\r\n chapters: TranslationBookChapter[];\r\n}\r\n\r\n/**\r\n * Defines a commentary book that is used in the dataset.\r\n */\r\nexport interface DatasetCommentaryBook extends CommentaryBook {\r\n /**\r\n * The list of chapters that are available for the book.\r\n */\r\n chapters: CommentaryBookChapter[];\r\n}\r\n\r\nexport interface DatasetCommentaryProfile extends CommentaryProfile {\r\n /**\r\n * The contents of the profile.\r\n */\r\n content: string[];\r\n}\r\n\r\nexport interface DatasetDataset extends CommonDataset {\r\n books: DatasetDatasetBook[];\r\n\r\n /**\r\n * The list of people that are contained in the dataset.\r\n */\r\n people?: DatasetPerson[];\r\n\r\n /**\r\n * The list of places that are contained in the dataset.\r\n */\r\n places?: DatasetPlace[];\r\n\r\n /**\r\n * The list of events that are contained in the dataset.\r\n */\r\n events?: DatasetEvent[];\r\n\r\n /**\r\n * The list of people groups that are contained in the dataset.\r\n */\r\n peopleGroups?: DatasetPeopleGroup[];\r\n}\r\n\r\nexport interface DatasetDatasetBook extends DatasetBook {\r\n chapters: DatasetBookChapter[];\r\n}\r\n\r\n/**\r\n * Generates a list of output files from the given list of input files.\r\n * @param file The list of files.\r\n * @param parser The parser to use for parsing the files.\r\n * @param bookMap The map of book IDs to names. If undefined, then a default map will be used.\r\n */\r\nexport function generateDataset(\r\n files: InputFile[],\r\n parser: DOMParser = new globalThis.DOMParser(),\r\n bookMap?: Map<string, { commonName: string }> | undefined\r\n): DatasetOutput {\r\n const logger = getLogger();\r\n let output: DatasetOutput = {\r\n translations: [],\r\n commentaries: [],\r\n };\r\n\r\n let usfmParser = new UsfmParser();\r\n let usxParser = new USXParser(parser);\r\n let codexParser = new CodexParser(parser);\r\n let csvCommentaryParser = new CommentaryCsvParser();\r\n let tyndaleXmlParser = new TyndaleXmlParser(parser);\r\n let lockmanParser = new LockmanParser();\r\n\r\n let parsedTranslations = new Map<string, DatasetTranslation>();\r\n let parsedCommentaries = new Map<string, DatasetCommentary>();\r\n\r\n const unknownLanguages = new Set<string>();\r\n for (let file of files) {\r\n try {\r\n let parser:\r\n | UsfmParser\r\n | USXParser\r\n | CodexParser\r\n | CommentaryCsvParser\r\n | TyndaleXmlParser\r\n | LockmanParser;\r\n if (file.fileType === 'usfm') {\r\n parser = usfmParser;\r\n } else if (file.fileType === 'usx') {\r\n parser = usxParser;\r\n } else if (file.fileType === 'json') {\r\n parser = codexParser;\r\n } else if (file.fileType === 'commentary/csv') {\r\n parser = csvCommentaryParser;\r\n } else if (file.fileType === 'commentary/tyndale-xml') {\r\n parser = tyndaleXmlParser;\r\n } else if (file.fileType === 'lockman') {\r\n parser = lockmanParser;\r\n } else {\r\n logger.warn(\r\n '[generate] File does not have a valid type!',\r\n file.name\r\n );\r\n continue;\r\n }\r\n\r\n const parsed:\r\n | ParseTree\r\n | CommentaryParseTree\r\n | (ParseTree | CommentaryParseTree)[] = parser.parse(\r\n file.content\r\n );\r\n\r\n if (Array.isArray(parsed)) {\r\n for (let p of parsed) {\r\n logParseMessages(p, file);\r\n if (p.type === 'root') {\r\n addTranslationTree(file as InputTranslationFile, p);\r\n } else {\r\n addCommentaryTree(file as InputCommentaryFile, p);\r\n }\r\n }\r\n } else {\r\n logParseMessages(parsed, file);\r\n if (parsed.type === 'root') {\r\n addTranslationTree(file as InputTranslationFile, parsed);\r\n } else {\r\n addCommentaryTree(file as InputCommentaryFile, parsed);\r\n }\r\n }\r\n } catch (err) {\r\n logger.error(\r\n `[generate] Error occurred while parsing ${file.name}`,\r\n err\r\n );\r\n }\r\n }\r\n\r\n function logParseMessages(\r\n parsed: ParseTree | CommentaryParseTree,\r\n file: InputFile\r\n ) {\r\n if ('parseMessages' in parsed && parsed.parseMessages && file.name) {\r\n const messages = (output.parseMessages =\r\n output.parseMessages || {});\r\n messages[file.name] = parsed.parseMessages;\r\n }\r\n }\r\n\r\n function addTranslationTree(file: InputTranslationFile, parsed: ParseTree) {\r\n const id = parsed.id;\r\n\r\n if (!id) {\r\n logger.warn(\r\n '[generate] File does not have a valid book ID!',\r\n file.name,\r\n id\r\n );\r\n return;\r\n }\r\n\r\n const order = bookOrderMap.get(id);\r\n\r\n if (typeof order !== 'number') {\r\n logger.warn('[generate] Book does not have an order!', id);\r\n return;\r\n }\r\n\r\n const isApocryphal = apocryphaBooks.has(id);\r\n\r\n const bookName = getBookNames(file, file.metadata, id);\r\n\r\n let translation = parsedTranslations.get(file.metadata.id);\r\n\r\n if (!translation) {\r\n translation = {\r\n ...omit(file.metadata, 'direction'),\r\n textDirection: file.metadata.direction,\r\n books: [],\r\n };\r\n output.translations.push(translation);\r\n parsedTranslations.set(file.metadata.id, translation);\r\n }\r\n\r\n const name =\r\n parsed.header ??\r\n (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ??\r\n parsed.title ??\r\n bookName?.bookName?.commonName;\r\n\r\n if (!name) {\r\n logger.warn('[generate] Book does not have a name!', file.name, id);\r\n return;\r\n }\r\n\r\n const commonName =\r\n (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ??\r\n parsed.header ??\r\n parsed.title ??\r\n bookName?.bookName?.commonName ??\r\n id;\r\n\r\n const book: DatasetTranslationBook = {\r\n id: id as BookId,\r\n name,\r\n commonName,\r\n title: parsed.title ?? null,\r\n order,\r\n chapters: [],\r\n };\r\n\r\n if (isApocryphal) {\r\n book.isApocryphal = true;\r\n }\r\n\r\n for (let content of parsed.content) {\r\n if (content.type === 'chapter') {\r\n book.chapters.push({\r\n chapter: {\r\n number: content.number,\r\n content: content.content,\r\n footnotes: content.footnotes,\r\n },\r\n thisChapterAudioLinks: getAudioUrlsForChapter(\r\n translation.id,\r\n id,\r\n content.number\r\n ),\r\n thisChapterAudioTimings: {},\r\n\r\n // Word annotations are kept out of the chapter itself so\r\n // that they can be published as a separate file.\r\n ...(content.words\r\n ? { thisChapterWords: content.words }\r\n : {}),\r\n });\r\n }\r\n }\r\n\r\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\r\n\r\n const index = sortedIndexBy(translation.books, book, (b) => b.order);\r\n translation.books.splice(index, 0, book);\r\n }\r\n\r\n function addCommentaryTree(\r\n file: InputCommentaryFile,\r\n parsed: CommentaryParseTree\r\n ) {\r\n let commentary = parsedCommentaries.get(file.metadata.id);\r\n\r\n if (!commentary) {\r\n commentary = {\r\n ...omit(file.metadata, 'direction'),\r\n textDirection: file.metadata.direction,\r\n books: [],\r\n profiles: [],\r\n };\r\n output.commentaries.push(commentary);\r\n parsedCommentaries.set(file.metadata.id, commentary);\r\n }\r\n\r\n for (let parsedBook of parsed.books) {\r\n let book = commentary.books.find((b) => b.id === parsedBook.book);\r\n if (book && book.introduction && parsedBook.introduction) {\r\n logger.warn(\r\n '[generate] Book already exists in commentary!',\r\n file.name,\r\n parsedBook.book\r\n );\r\n continue;\r\n }\r\n\r\n if (!book) {\r\n const name = getBookNames(file, file.metadata, parsedBook.book);\r\n book = {\r\n id: parsedBook.book as BookId,\r\n order: bookOrderMap.get(parsedBook.book) ?? -1,\r\n commonName: name?.bookName?.commonName ?? parsedBook.book,\r\n name: name?.bookName?.commonName ?? parsedBook.book,\r\n chapters: [],\r\n };\r\n }\r\n\r\n if (parsedBook.introduction) {\r\n book.introduction = parsedBook.introduction;\r\n }\r\n\r\n if (parsedBook.introductionSummary && !book.introductionSummary) {\r\n book.introductionSummary = parsedBook.introductionSummary;\r\n }\r\n\r\n for (let chapter of parsedBook.chapters) {\r\n let data: CommentaryChapterData = {\r\n number: chapter.number,\r\n content: chapter.verses,\r\n };\r\n\r\n if (chapter.introduction) {\r\n data.introduction = chapter.introduction;\r\n }\r\n\r\n book.chapters.push({\r\n chapter: data,\r\n });\r\n }\r\n\r\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\r\n commentary.books.push(book);\r\n }\r\n\r\n if (parsed.profiles) {\r\n for (let profile of parsed.profiles) {\r\n const existing = commentary.profiles.find(\r\n (p) => p.id === profile.id\r\n );\r\n if (existing) {\r\n logger.warn(\r\n '[generate] Profile already exists in commentary!',\r\n file.name,\r\n profile.id\r\n );\r\n continue;\r\n }\r\n\r\n const datasetProfile: DatasetCommentaryProfile = {\r\n id: profile.id,\r\n subject: profile.subject,\r\n reference: profile.reference,\r\n content: profile.content,\r\n };\r\n\r\n commentary.profiles.push(datasetProfile);\r\n }\r\n }\r\n\r\n commentary.books = sortBy(commentary.books, (b) => b.order);\r\n commentary.profiles = sortBy(commentary.profiles, (p) => p.id);\r\n }\r\n\r\n function getBookNames(\r\n file: InputFileBase,\r\n metadata: MetadataBase,\r\n id: string\r\n ) {\r\n let exactMatch = true;\r\n let map = bookMap;\r\n if (!map) {\r\n map = defaultBookIdMap.get(metadata.language);\r\n\r\n if (!map) {\r\n if (!unknownLanguages.has(metadata.language)) {\r\n logger.warn(\r\n '[generate] File does not have a known language!',\r\n file.name,\r\n metadata.language\r\n );\r\n unknownLanguages.add(metadata.language);\r\n }\r\n\r\n logger.warn(\r\n '[generate] Using English book map for unknown language! This might result in outputting english book names.'\r\n );\r\n exactMatch = false;\r\n map = defaultBookIdMap.get('en');\r\n }\r\n }\r\n\r\n const bookName = map?.get(id);\r\n\r\n if (!!map && !bookName) {\r\n logger.warn(\r\n '[generate] Book name not found for ID!',\r\n file.name,\r\n id\r\n );\r\n return null;\r\n }\r\n\r\n return {\r\n exactMatch,\r\n bookName,\r\n };\r\n }\r\n\r\n return output;\r\n}\r\n"],
5
+ "mappings": ";AAAA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAuB1B;AAAA,EACI,aAAa;AAAA,EACb;AAAA,EACA;AAAA,OACG;AACP,SAAS,MAAM,QAAQ,qBAAqB;AAC5C,SAAS,8BAA8B;AACvC,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AAMpC,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAGvB,aAAM,kBAAkB;AAgHxB,gBAAS,gBACZ,OACA,SAAoB,IAAI,WAAW,UAAU,GAC7C,SACa;AACb,QAAM,SAAS,UAAU;AACzB,MAAI,SAAwB;AAAA,IACxB,cA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AQ;AAAA,UACZ,SAAS,QAAQ;AAAA,UACjB,WAAW,QAAQ;AAAA,UACnB,SAAS,QAAQ;AAAA,QACrB;AAEA,mBAAW,SAAS,KAAK,cAAc;AAAA,MAC3C;AAAA,IACJ;AAEA,eAAW,QAAQ,OAAO,WAAW,OAAO,CAAC,MAAM,EAAE,KAAK;AAC1D,eAAW,WAAW,OAAO,WAAW,UAAU,CAAC,MAAM,EAAE,EAAE;AAAA,EACjE;AAEA,WAAS,aACL,MACA,UACA,IACF;AACE,QAAI,aAAa;AACjB,QAAI,MAAM;AACV,QAAI,CAAC,KAAK;AACN,YAAM,iBAAiB,IAAI,SAAS,QAAQ;AAE5C,UAAI,CAAC,KAAK;AACN,YAAI,CAAC,iBAAiB,IAAI,SAAS,QAAQ,GAAG;AAC1C,iBAAO;AAAA,YACH;AAAA,YACA,KAAK;AAAA,YACL,SAAS;AAAA,UACb;AACA,2BAAiB,IAAI,SAAS,QAAQ;AAAA,QAC1C;AAEA,eAAO;AAAA,UACH;AAAA,QACJ;AACA,qBAAa;AACb,cAAM,iBAAiB,IAAI,IAAI;AAAA,MACnC;AAAA,IACJ;AAEA,UAAM,WAAW,KAAK,IAAI,EAAE;AAE5B,QAAI,CAAC,CAAC,OAAO,CAAC,UAAU;AACpB,aAAO;AAAA,QACH;AAAA,QACA,KAAK;AAAA,QACL;AAAA,MACJ;AACA,aAAO;AAAA,IACX;AAEA,WAAO;AAAA,MACH;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAEA,SAAO;AACX;",
6
6
  "names": ["parser"]
7
7
  }
@@ -3,6 +3,7 @@ import * as api from "./api.js";
3
3
  import * as audio from "./audio.js";
4
4
  import * as dataset from "./dataset.js";
5
5
  import * as bookOrder from "./book-order.js";
6
+ import * as simple from "./simple.js";
6
7
  export * from "./common-types.js";
7
- export { api, audio, dataset, bookOrder };
8
+ export { api, audio, dataset, bookOrder, simple };
8
9
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../generation/index.ts"],
4
- "sourcesContent": ["import * as api from './api.js';\r\nimport * as audio from './audio.js';\r\nimport * as dataset from './dataset.js';\r\nimport * as bookOrder from './book-order.js';\r\nexport * from './common-types.js';\r\n\r\nexport { api, audio, dataset, bookOrder };\r\n"],
5
- "mappings": ";AAAA,YAAY,SAAS;AACrB,YAAY,WAAW;AACvB,YAAY,aAAa;AACzB,YAAY,eAAe;AAC3B,cAAc;AAEd,SAAS,KAAK,OAAO,SAAS;",
4
+ "sourcesContent": ["import * as api from './api.js';\r\nimport * as audio from './audio.js';\r\nimport * as dataset from './dataset.js';\r\nimport * as bookOrder from './book-order.js';\r\nimport * as simple from './simple.js';\r\nexport * from './common-types.js';\r\n\r\nexport { api, audio, dataset, bookOrder, simple };\r\n"],
5
+ "mappings": ";AAAA,YAAY,SAAS;AACrB,YAAY,WAAW;AACvB,YAAY,aAAa;AACzB,YAAY,eAAe;AAC3B,YAAY,YAAY;AACxB,cAAc;AAEd,SAAS,KAAK,OAAO,SAAS,WAAW;",
6
6
  "names": []
7
7
  }