@helloao/cli 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cli.cjs +750 -54
- package/dist/cjs/index.cjs +706 -43
- package/dist/esm/index.js +559 -37
- package/dist/esm/index.js.map +3 -3
- package/dist/types/actions.d.ts +16 -0
- package/dist/types/db.d.ts +26 -6
- package/dist/types/files.d.ts +7 -0
- package/migrations/20251028135135_add_datasets/migration.sql +72 -0
- package/migrations/20251028144932_fix_dataset_types/migration.sql +50 -0
- package/package.json +2 -2
- package/prisma-gen/edge.js +60 -4
- package/prisma-gen/index-browser.js +56 -1
- package/prisma-gen/index.d.ts +14386 -5389
- package/prisma-gen/index.js +60 -4
- package/prisma-gen/wasm.js +56 -1
- package/schema.prisma +104 -0
package/dist/cjs/cli.cjs
CHANGED
|
@@ -5627,6 +5627,51 @@ var require_prisma_gen = __commonJS({
|
|
|
5627
5627
|
sha256: "sha256",
|
|
5628
5628
|
verseNumber: "verseNumber"
|
|
5629
5629
|
};
|
|
5630
|
+
exports2.Prisma.DatasetScalarFieldEnum = {
|
|
5631
|
+
id: "id",
|
|
5632
|
+
name: "name",
|
|
5633
|
+
website: "website",
|
|
5634
|
+
licenseUrl: "licenseUrl",
|
|
5635
|
+
licenseNotes: "licenseNotes",
|
|
5636
|
+
englishName: "englishName",
|
|
5637
|
+
language: "language",
|
|
5638
|
+
textDirection: "textDirection",
|
|
5639
|
+
sha256: "sha256"
|
|
5640
|
+
};
|
|
5641
|
+
exports2.Prisma.DatasetBookScalarFieldEnum = {
|
|
5642
|
+
id: "id",
|
|
5643
|
+
datasetId: "datasetId",
|
|
5644
|
+
order: "order",
|
|
5645
|
+
numberOfChapters: "numberOfChapters",
|
|
5646
|
+
sha256: "sha256"
|
|
5647
|
+
};
|
|
5648
|
+
exports2.Prisma.DatasetChapterScalarFieldEnum = {
|
|
5649
|
+
number: "number",
|
|
5650
|
+
bookId: "bookId",
|
|
5651
|
+
datasetId: "datasetId",
|
|
5652
|
+
json: "json",
|
|
5653
|
+
sha256: "sha256"
|
|
5654
|
+
};
|
|
5655
|
+
exports2.Prisma.DatasetChapterVerseScalarFieldEnum = {
|
|
5656
|
+
number: "number",
|
|
5657
|
+
chapterNumber: "chapterNumber",
|
|
5658
|
+
bookId: "bookId",
|
|
5659
|
+
datasetId: "datasetId",
|
|
5660
|
+
contentJson: "contentJson",
|
|
5661
|
+
sha256: "sha256"
|
|
5662
|
+
};
|
|
5663
|
+
exports2.Prisma.DatasetReferenceScalarFieldEnum = {
|
|
5664
|
+
id: "id",
|
|
5665
|
+
datasetId: "datasetId",
|
|
5666
|
+
bookId: "bookId",
|
|
5667
|
+
chapterNumber: "chapterNumber",
|
|
5668
|
+
verseNumber: "verseNumber",
|
|
5669
|
+
referenceBookId: "referenceBookId",
|
|
5670
|
+
referenceChapter: "referenceChapter",
|
|
5671
|
+
referenceVerse: "referenceVerse",
|
|
5672
|
+
endVerseNumber: "endVerseNumber",
|
|
5673
|
+
score: "score"
|
|
5674
|
+
};
|
|
5630
5675
|
exports2.Prisma.SortOrder = {
|
|
5631
5676
|
asc: "asc",
|
|
5632
5677
|
desc: "desc"
|
|
@@ -5649,7 +5694,12 @@ var require_prisma_gen = __commonJS({
|
|
|
5649
5694
|
ChapterAudioUrl: "ChapterAudioUrl",
|
|
5650
5695
|
ChapterVerse: "ChapterVerse",
|
|
5651
5696
|
CommentaryChapterVerse: "CommentaryChapterVerse",
|
|
5652
|
-
ChapterFootnote: "ChapterFootnote"
|
|
5697
|
+
ChapterFootnote: "ChapterFootnote",
|
|
5698
|
+
Dataset: "Dataset",
|
|
5699
|
+
DatasetBook: "DatasetBook",
|
|
5700
|
+
DatasetChapter: "DatasetChapter",
|
|
5701
|
+
DatasetChapterVerse: "DatasetChapterVerse",
|
|
5702
|
+
DatasetReference: "DatasetReference"
|
|
5653
5703
|
};
|
|
5654
5704
|
var config2 = {
|
|
5655
5705
|
"generator": {
|
|
@@ -5686,6 +5736,7 @@ var require_prisma_gen = __commonJS({
|
|
|
5686
5736
|
"db"
|
|
5687
5737
|
],
|
|
5688
5738
|
"activeProvider": "sqlite",
|
|
5739
|
+
"postinstall": false,
|
|
5689
5740
|
"inlineDatasources": {
|
|
5690
5741
|
"db": {
|
|
5691
5742
|
"url": {
|
|
@@ -5694,8 +5745,8 @@ var require_prisma_gen = __commonJS({
|
|
|
5694
5745
|
}
|
|
5695
5746
|
}
|
|
5696
5747
|
},
|
|
5697
|
-
"inlineSchema": 'datasource db {\n provider = "sqlite"\n url = "file:../../bible-api.dev.db"\n}\n\ngenerator client {\n provider = "prisma-client-js"\n output = "./prisma-gen"\n}\n\nmodel Translation {\n id String @id\n name String\n website String\n licenseUrl String\n licenseNotes String?\n shortName String?\n englishName String\n language String\n textDirection String\n\n // The SHA-256 hash of the translation\n // includes everything about the translation, including the books, chapters, verses, footnotes, etc.\n sha256 String?\n\n books Book[]\n chapters Chapter[]\n verses ChapterVerse[]\n footnotes ChapterFootnote[]\n audioUrls ChapterAudioUrl[]\n}\n\nmodel Commentary {\n id String @id\n name String\n website String\n licenseUrl String\n licenseNotes String?\n englishName String\n language String\n textDirection String\n\n // The SHA-256 hash of the translation\n // includes everything about the translation, including the books, chapters, verses, footnotes, etc.\n sha256 String?\n\n books CommentaryBook[]\n chapters CommentaryChapter[]\n verses CommentaryChapterVerse[]\n profiles CommentaryProfile[]\n}\n\n// The ebible.org source for a particular translation\n// Contains metadata that is useful for managing downloads\nmodel EBibleSource {\n id String @id\n\n // The URL to the USFM zip file download\n usfmZipUrl String?\n // The ETag of the downloaded USFM zip file\n usfmZipEtag String?\n\n languageCode String\n title String\n shortTitle String?\n textDirection String?\n redistributable Boolean\n description String\n copyright String\n FCBHID String\n updateDate DateTime\n sourceDate DateTime\n\n oldTestamentBooks Int\n oldTestamentChapters Int\n oldTestamentVerses Int\n newTestamentBooks Int\n newTestamentChapters Int\n newTestamentVerses Int\n apocryphaBooks Int\n apocryphaChapters Int\n apocryphaVerses Int\n\n // The ID of the translation that the source is for\n translationId String\n\n // The date that the source was downloaded\n usfmDownloadDate DateTime?\n\n // The path that the USFM was downloaded to\n usfmDownloadPath String?\n\n // The SHA-256 hash of the source\n // Can be used to determine if the source has changed\n sha256 String?\n}\n\n// Files that were input into the API generator\nmodel InputFile {\n // The ID of the translation that the file is for\n translationId String\n\n // The name of the file\n name String\n\n format String\n\n // The SHA-256 hash of the file\n sha256 String\n\n sizeInBytes Int\n\n @@id([translationId, name])\n}\n\nmodel InputFileWarning {\n // The name of the file\n name String\n\n // The type of the warning\n type String\n\n // The message of the warning\n message String\n\n @@id([name, type, message])\n}\n\nmodel Book {\n id String\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n name String\n commonName String\n title String?\n order Int\n\n numberOfChapters Int\n\n isApocryphal Boolean? // Whether the book is an apocryphal book\n\n // The SHA-256 hash of the book\n sha256 String?\n\n chapters Chapter[]\n verses ChapterVerse[]\n footnotes ChapterFootnote[]\n audioUrls ChapterAudioUrl[]\n\n @@id([translationId, id])\n}\n\nmodel CommentaryBook {\n id String\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n name String\n commonName String\n introduction String?\n introductionSummary String?\n order Int\n\n numberOfChapters Int\n\n // The SHA-256 hash of the book\n sha256 String?\n\n chapters CommentaryChapter[]\n verses CommentaryChapterVerse[]\n\n @@id([commentaryId, id])\n}\n\nmodel CommentaryProfile {\n id String\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n subject String\n content String\n\n referenceBook String?\n referenceChapter Int?\n referenceVerse Int?\n referenceEndChapter Int?\n referenceEndVerse Int?\n\n json String // The JSON of the profile\n\n // The SHA-256 hash of the profile\n sha256 String?\n\n @@id([commentaryId, id])\n}\n\nmodel Chapter {\n number Int\n\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n json String // The JSON of the chapter\n\n // The SHA-256 hash of the chapter\n sha256 String?\n\n verses ChapterVerse[]\n footnotes ChapterFootnote[]\n audioUrls ChapterAudioUrl[]\n\n @@id([translationId, bookId, number])\n}\n\nmodel CommentaryChapter {\n number Int\n\n bookId String\n book CommentaryBook @relation(fields: [commentaryId, bookId], references: [commentaryId, id])\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n introduction String?\n json String // The JSON of the chapter\n\n // The SHA-256 hash of the chapter\n sha256 String?\n\n verses CommentaryChapterVerse[]\n\n @@id([commentaryId, bookId, number])\n}\n\nmodel ChapterAudioUrl {\n number Int\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n chapter Chapter @relation(fields: [translationId, bookId, number], references: [translationId, bookId, number])\n\n reader String\n url String\n\n @@id([translationId, bookId, number, reader])\n}\n\nmodel ChapterVerse {\n number Int\n\n chapterNumber Int\n chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])\n\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n text String // The text of the verse\n contentJson String // The JSON of the verse content\n\n // The SHA-256 hash of the verse\n sha256 String?\n\n footnotes ChapterFootnote[]\n\n @@id([translationId, bookId, chapterNumber, number])\n}\n\nmodel CommentaryChapterVerse {\n number Int\n\n chapterNumber Int\n chapter CommentaryChapter @relation(fields: [commentaryId, bookId, chapterNumber], references: [commentaryId, bookId, number])\n\n bookId String\n book CommentaryBook @relation(fields: [commentaryId, bookId], references: [commentaryId, id])\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n text String // The text of the verse\n contentJson String // The JSON of the verse content\n\n // The SHA-256 hash of the verse\n sha256 String?\n\n @@id([commentaryId, bookId, chapterNumber, number])\n}\n\nmodel ChapterFootnote {\n id Int\n\n chapterNumber Int\n chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])\n\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n text String\n\n // The SHA-256 hash of the footnote\n sha256 String?\n\n verseNumber Int?\n verse ChapterVerse? @relation(fields: [translationId, bookId, chapterNumber, verseNumber], references: [translationId, bookId, chapterNumber, number])\n\n @@id([translationId, bookId, chapterNumber, id])\n}\n',
|
|
5698
|
-
"inlineSchemaHash": "
|
|
5748
|
+
"inlineSchema": 'datasource db {\n provider = "sqlite"\n url = "file:../../bible-api.dev.db"\n}\n\ngenerator client {\n provider = "prisma-client-js"\n output = "./prisma-gen"\n}\n\nmodel Translation {\n id String @id\n name String\n website String\n licenseUrl String\n licenseNotes String?\n shortName String?\n englishName String\n language String\n textDirection String\n\n // The SHA-256 hash of the translation\n // includes everything about the translation, including the books, chapters, verses, footnotes, etc.\n sha256 String?\n\n books Book[]\n chapters Chapter[]\n verses ChapterVerse[]\n footnotes ChapterFootnote[]\n audioUrls ChapterAudioUrl[]\n}\n\nmodel Commentary {\n id String @id\n name String\n website String\n licenseUrl String\n licenseNotes String?\n englishName String\n language String\n textDirection String\n\n // The SHA-256 hash of the translation\n // includes everything about the translation, including the books, chapters, verses, footnotes, etc.\n sha256 String?\n\n books CommentaryBook[]\n chapters CommentaryChapter[]\n verses CommentaryChapterVerse[]\n profiles CommentaryProfile[]\n}\n\n// The ebible.org source for a particular translation\n// Contains metadata that is useful for managing downloads\nmodel EBibleSource {\n id String @id\n\n // The URL to the USFM zip file download\n usfmZipUrl String?\n // The ETag of the downloaded USFM zip file\n usfmZipEtag String?\n\n languageCode String\n title String\n shortTitle String?\n textDirection String?\n redistributable Boolean\n description String\n copyright String\n FCBHID String\n updateDate DateTime\n sourceDate DateTime\n\n oldTestamentBooks Int\n oldTestamentChapters Int\n oldTestamentVerses Int\n newTestamentBooks Int\n newTestamentChapters Int\n newTestamentVerses Int\n apocryphaBooks Int\n apocryphaChapters Int\n apocryphaVerses Int\n\n // The ID of the translation that the source is for\n translationId String\n\n // The date that the source was downloaded\n usfmDownloadDate DateTime?\n\n // The path that the USFM was downloaded to\n usfmDownloadPath String?\n\n // The SHA-256 hash of the source\n // Can be used to determine if the source has changed\n sha256 String?\n}\n\n// Files that were input into the API generator\nmodel InputFile {\n // The ID of the translation that the file is for\n translationId String\n\n // The name of the file\n name String\n\n format String\n\n // The SHA-256 hash of the file\n sha256 String\n\n sizeInBytes Int\n\n @@id([translationId, name])\n}\n\nmodel InputFileWarning {\n // The name of the file\n name String\n\n // The type of the warning\n type String\n\n // The message of the warning\n message String\n\n @@id([name, type, message])\n}\n\nmodel Book {\n id String\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n name String\n commonName String\n title String?\n order Int\n\n numberOfChapters Int\n\n isApocryphal Boolean? // Whether the book is an apocryphal book\n\n // The SHA-256 hash of the book\n sha256 String?\n\n chapters Chapter[]\n verses ChapterVerse[]\n footnotes ChapterFootnote[]\n audioUrls ChapterAudioUrl[]\n\n @@id([translationId, id])\n}\n\nmodel CommentaryBook {\n id String\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n name String\n commonName String\n introduction String?\n introductionSummary String?\n order Int\n\n numberOfChapters Int\n\n // The SHA-256 hash of the book\n sha256 String?\n\n chapters CommentaryChapter[]\n verses CommentaryChapterVerse[]\n\n @@id([commentaryId, id])\n}\n\nmodel CommentaryProfile {\n id String\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n subject String\n content String\n\n referenceBook String?\n referenceChapter Int?\n referenceVerse Int?\n referenceEndChapter Int?\n referenceEndVerse Int?\n\n json String // The JSON of the profile\n\n // The SHA-256 hash of the profile\n sha256 String?\n\n @@id([commentaryId, id])\n}\n\nmodel Chapter {\n number Int\n\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n json String // The JSON of the chapter\n\n // The SHA-256 hash of the chapter\n sha256 String?\n\n verses ChapterVerse[]\n footnotes ChapterFootnote[]\n audioUrls ChapterAudioUrl[]\n\n @@id([translationId, bookId, number])\n}\n\nmodel CommentaryChapter {\n number Int\n\n bookId String\n book CommentaryBook @relation(fields: [commentaryId, bookId], references: [commentaryId, id])\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n introduction String?\n json String // The JSON of the chapter\n\n // The SHA-256 hash of the chapter\n sha256 String?\n\n verses CommentaryChapterVerse[]\n\n @@id([commentaryId, bookId, number])\n}\n\nmodel ChapterAudioUrl {\n number Int\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n chapter Chapter @relation(fields: [translationId, bookId, number], references: [translationId, bookId, number])\n\n reader String\n url String\n\n @@id([translationId, bookId, number, reader])\n}\n\nmodel ChapterVerse {\n number Int\n\n chapterNumber Int\n chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])\n\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n text String // The text of the verse\n contentJson String // The JSON of the verse content\n\n // The SHA-256 hash of the verse\n sha256 String?\n\n footnotes ChapterFootnote[]\n\n @@id([translationId, bookId, chapterNumber, number])\n}\n\nmodel CommentaryChapterVerse {\n number Int\n\n chapterNumber Int\n chapter CommentaryChapter @relation(fields: [commentaryId, bookId, chapterNumber], references: [commentaryId, bookId, number])\n\n bookId String\n book CommentaryBook @relation(fields: [commentaryId, bookId], references: [commentaryId, id])\n\n commentaryId String\n commentary Commentary @relation(fields: [commentaryId], references: [id])\n\n text String // The text of the verse\n contentJson String // The JSON of the verse content\n\n // The SHA-256 hash of the verse\n sha256 String?\n\n @@id([commentaryId, bookId, chapterNumber, number])\n}\n\nmodel ChapterFootnote {\n id Int\n\n chapterNumber Int\n chapter Chapter @relation(fields: [translationId, bookId, chapterNumber], references: [translationId, bookId, number])\n\n bookId String\n book Book @relation(fields: [translationId, bookId], references: [translationId, id])\n\n translationId String\n translation Translation @relation(fields: [translationId], references: [id])\n\n text String\n\n // The SHA-256 hash of the footnote\n sha256 String?\n\n verseNumber Int?\n verse ChapterVerse? @relation(fields: [translationId, bookId, chapterNumber, verseNumber], references: [translationId, bookId, chapterNumber, number])\n\n @@id([translationId, bookId, chapterNumber, id])\n}\n\nmodel Dataset {\n id String @id\n name String\n website String\n licenseUrl String\n licenseNotes String?\n englishName String\n language String\n textDirection String\n\n sha256 String?\n\n books DatasetBook[]\n chapters DatasetChapter[]\n verses DatasetChapterVerse[]\n references DatasetReference[]\n}\n\nmodel DatasetBook {\n id String\n\n datasetId String\n dataset Dataset @relation(fields: [datasetId], references: [id])\n\n order Int\n\n numberOfChapters Int\n\n // The SHA-256 hash of the book\n sha256 String?\n\n chapters DatasetChapter[]\n verses DatasetChapterVerse[]\n references DatasetReference[]\n\n @@id([datasetId, id])\n}\n\nmodel DatasetChapter {\n number Int\n\n bookId String\n book DatasetBook @relation(fields: [datasetId, bookId], references: [datasetId, id])\n\n datasetId String\n dataset Dataset @relation(fields: [datasetId], references: [id])\n\n json String // The JSON of the chapter\n\n // The SHA-256 hash of the chapter\n sha256 String?\n\n verses DatasetChapterVerse[]\n references DatasetReference[]\n\n @@id([datasetId, bookId, number])\n}\n\nmodel DatasetChapterVerse {\n number Int\n\n chapterNumber Int\n chapter DatasetChapter @relation(fields: [datasetId, bookId, chapterNumber], references: [datasetId, bookId, number])\n\n bookId String\n book DatasetBook @relation(fields: [datasetId, bookId], references: [datasetId, id])\n\n datasetId String\n dataset Dataset @relation(fields: [datasetId], references: [id])\n\n contentJson String // The JSON of the verse content\n\n // The SHA-256 hash of the verse\n sha256 String?\n\n references DatasetReference[]\n\n @@id([datasetId, bookId, chapterNumber, number])\n}\n\nmodel DatasetReference {\n id Int @id @default(autoincrement())\n\n datasetId String\n dataset Dataset @relation(fields: [datasetId], references: [id])\n\n bookId String\n book DatasetBook @relation(fields: [datasetId, bookId], references: [datasetId, id])\n\n chapterNumber Int\n chapter DatasetChapter @relation(fields: [datasetId, bookId, chapterNumber], references: [datasetId, bookId, number])\n\n verseNumber Int\n verse DatasetChapterVerse @relation(fields: [datasetId, bookId, chapterNumber, verseNumber], references: [datasetId, bookId, chapterNumber, number])\n\n referenceBookId String\n referenceChapter Int\n referenceVerse Int\n\n endVerseNumber Int?\n score Int?\n}\n',
|
|
5749
|
+
"inlineSchemaHash": "7a10a7fbc4f723508362c0cc38d7d07c19ce68e1db29be580483fe78ade713d3",
|
|
5699
5750
|
"copyEngine": true
|
|
5700
5751
|
};
|
|
5701
5752
|
var fs2 = require("fs");
|
|
@@ -5711,7 +5762,7 @@ var require_prisma_gen = __commonJS({
|
|
|
5711
5762
|
config2.dirname = path6.join(process.cwd(), alternativePath);
|
|
5712
5763
|
config2.isBundled = true;
|
|
5713
5764
|
}
|
|
5714
|
-
config2.runtimeDataModel = JSON.parse('{"models":{"Translation":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"website","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseUrl","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseNotes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"shortName","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"englishName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"language","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"books","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterVerseToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterFootnoteToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"ChapterAudioUrlToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Commentary":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"website","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseUrl","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseNotes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"englishName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"language","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"books","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryToCommentaryBook","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryToCommentaryChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"profiles","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryProfile","relationName":"CommentaryToCommentaryProfile","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"EBibleSource":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"usfmZipUrl","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"usfmZipEtag","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"languageCode","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"title","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"shortTitle","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"redistributable","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Boolean","isGenerated":false,"isUpdatedAt":false},{"name":"description","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"copyright","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"FCBHID","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"updateDate","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","isGenerated":false,"isUpdatedAt":false},{"name":"sourceDate","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","isGenerated":false,"isUpdatedAt":false},{"name":"oldTestamentBooks","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"oldTestamentChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"oldTestamentVerses","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"newTestamentBooks","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"newTestamentChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"newTestamentVerses","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"apocryphaBooks","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"apocryphaChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"apocryphaVerses","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"usfmDownloadDate","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","isGenerated":false,"isUpdatedAt":false},{"name":"usfmDownloadPath","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"InputFile":{"dbName":null,"fields":[{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"format","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sizeInBytes","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","name"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"InputFileWarning":{"dbName":null,"fields":[{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"type","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"message","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["name","type","message"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Book":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"BookToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commonName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"title","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"order","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"numberOfChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"isApocryphal","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Boolean","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"BookToChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"BookToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"BookToChapterFootnote","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"BookToChapterAudioUrl","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryBook":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryBook","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commonName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"introduction","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"introductionSummary","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"order","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"numberOfChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryBookToCommentaryChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryBookToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryProfile":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryProfile","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"subject","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"content","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"referenceBook","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"referenceChapter","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceVerse","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceEndChapter","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceEndVerse","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Chapter":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapter","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterToChapterFootnote","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"ChapterToChapterAudioUrl","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryChapter":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryBookToCommentaryChapter","relationFromFields":["commentaryId","bookId"],"relationToFields":["commentaryId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryChapter","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"introduction","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryChapterToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","bookId","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterAudioUrl":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterAudioUrl","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterAudioUrlToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterAudioUrl","relationFromFields":["translationId","bookId","number"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"reader","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"url","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","number","reader"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterVerse":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterVerse","relationFromFields":["translationId","bookId","chapterNumber"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterVerse","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterVerseToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"contentJson","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterFootnoteToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","chapterNumber","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryChapterVerse":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryChapterToCommentaryChapterVerse","relationFromFields":["commentaryId","bookId","chapterNumber"],"relationToFields":["commentaryId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryBookToCommentaryChapterVerse","relationFromFields":["commentaryId","bookId"],"relationToFields":["commentaryId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryChapterVerse","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"contentJson","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","bookId","chapterNumber","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterFootnote":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterFootnote","relationFromFields":["translationId","bookId","chapterNumber"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterFootnote","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterFootnoteToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verseNumber","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"verse","kind":"object","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterFootnoteToChapterVerse","relationFromFields":["translationId","bookId","chapterNumber","verseNumber"],"relationToFields":["translationId","bookId","chapterNumber","number"],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","chapterNumber","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false}},"enums":{},"types":{}}');
|
|
5765
|
+
config2.runtimeDataModel = JSON.parse('{"models":{"Translation":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"website","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseUrl","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseNotes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"shortName","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"englishName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"language","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"books","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterVerseToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterFootnoteToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"ChapterAudioUrlToTranslation","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Commentary":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"website","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseUrl","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseNotes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"englishName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"language","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"books","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryToCommentaryBook","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryToCommentaryChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"profiles","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryProfile","relationName":"CommentaryToCommentaryProfile","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"EBibleSource":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"usfmZipUrl","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"usfmZipEtag","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"languageCode","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"title","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"shortTitle","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"redistributable","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Boolean","isGenerated":false,"isUpdatedAt":false},{"name":"description","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"copyright","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"FCBHID","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"updateDate","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","isGenerated":false,"isUpdatedAt":false},{"name":"sourceDate","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","isGenerated":false,"isUpdatedAt":false},{"name":"oldTestamentBooks","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"oldTestamentChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"oldTestamentVerses","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"newTestamentBooks","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"newTestamentChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"newTestamentVerses","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"apocryphaBooks","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"apocryphaChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"apocryphaVerses","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"usfmDownloadDate","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","isGenerated":false,"isUpdatedAt":false},{"name":"usfmDownloadPath","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"InputFile":{"dbName":null,"fields":[{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"format","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sizeInBytes","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","name"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"InputFileWarning":{"dbName":null,"fields":[{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"type","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"message","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["name","type","message"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Book":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"BookToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commonName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"title","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"order","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"numberOfChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"isApocryphal","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Boolean","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"BookToChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"BookToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"BookToChapterFootnote","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"BookToChapterAudioUrl","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryBook":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryBook","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commonName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"introduction","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"introductionSummary","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"order","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"numberOfChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryBookToCommentaryChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryBookToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryProfile":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryProfile","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"subject","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"content","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"referenceBook","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"referenceChapter","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceVerse","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceEndChapter","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceEndVerse","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Chapter":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapter","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterToChapterFootnote","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"audioUrls","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterAudioUrl","relationName":"ChapterToChapterAudioUrl","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryChapter":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryBookToCommentaryChapter","relationFromFields":["commentaryId","bookId"],"relationToFields":["commentaryId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryChapter","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"introduction","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapterVerse","relationName":"CommentaryChapterToCommentaryChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","bookId","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterAudioUrl":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterAudioUrl","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterAudioUrlToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterAudioUrl","relationFromFields":["translationId","bookId","number"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"reader","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"url","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","number","reader"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterVerse":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterVerse","relationFromFields":["translationId","bookId","chapterNumber"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterVerse","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterVerseToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"contentJson","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"footnotes","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterFootnote","relationName":"ChapterFootnoteToChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","chapterNumber","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"CommentaryChapterVerse":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryChapter","relationName":"CommentaryChapterToCommentaryChapterVerse","relationFromFields":["commentaryId","bookId","chapterNumber"],"relationToFields":["commentaryId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"CommentaryBook","relationName":"CommentaryBookToCommentaryChapterVerse","relationFromFields":["commentaryId","bookId"],"relationToFields":["commentaryId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"commentaryId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"commentary","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Commentary","relationName":"CommentaryToCommentaryChapterVerse","relationFromFields":["commentaryId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"contentJson","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["commentaryId","bookId","chapterNumber","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"ChapterFootnote":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Chapter","relationName":"ChapterToChapterFootnote","relationFromFields":["translationId","bookId","chapterNumber"],"relationToFields":["translationId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Book","relationName":"BookToChapterFootnote","relationFromFields":["translationId","bookId"],"relationToFields":["translationId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"translationId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"translation","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Translation","relationName":"ChapterFootnoteToTranslation","relationFromFields":["translationId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"text","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verseNumber","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"verse","kind":"object","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ChapterVerse","relationName":"ChapterFootnoteToChapterVerse","relationFromFields":["translationId","bookId","chapterNumber","verseNumber"],"relationToFields":["translationId","bookId","chapterNumber","number"],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["translationId","bookId","chapterNumber","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"Dataset":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"website","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseUrl","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"licenseNotes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"englishName","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"language","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"textDirection","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"books","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetBook","relationName":"DatasetToDatasetBook","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetChapter","relationName":"DatasetToDatasetChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetChapterVerse","relationName":"DatasetToDatasetChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"references","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetReference","relationName":"DatasetToDatasetReference","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"DatasetBook":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"datasetId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"dataset","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Dataset","relationName":"DatasetToDatasetBook","relationFromFields":["datasetId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"order","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"numberOfChapters","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"chapters","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetChapter","relationName":"DatasetBookToDatasetChapter","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetChapterVerse","relationName":"DatasetBookToDatasetChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"references","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetReference","relationName":"DatasetBookToDatasetReference","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["datasetId","id"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"DatasetChapter":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetBook","relationName":"DatasetBookToDatasetChapter","relationFromFields":["datasetId","bookId"],"relationToFields":["datasetId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"datasetId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"dataset","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Dataset","relationName":"DatasetToDatasetChapter","relationFromFields":["datasetId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"json","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"verses","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetChapterVerse","relationName":"DatasetChapterToDatasetChapterVerse","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"references","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetReference","relationName":"DatasetChapterToDatasetReference","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["datasetId","bookId","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"DatasetChapterVerse":{"dbName":null,"fields":[{"name":"number","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetChapter","relationName":"DatasetChapterToDatasetChapterVerse","relationFromFields":["datasetId","bookId","chapterNumber"],"relationToFields":["datasetId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetBook","relationName":"DatasetBookToDatasetChapterVerse","relationFromFields":["datasetId","bookId"],"relationToFields":["datasetId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"datasetId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"dataset","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Dataset","relationName":"DatasetToDatasetChapterVerse","relationFromFields":["datasetId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"contentJson","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"sha256","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"references","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetReference","relationName":"DatasetChapterVerseToDatasetReference","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":{"name":null,"fields":["datasetId","bookId","chapterNumber","number"]},"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false},"DatasetReference":{"dbName":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"Int","default":{"name":"autoincrement","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"datasetId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"dataset","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Dataset","relationName":"DatasetToDatasetReference","relationFromFields":["datasetId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"bookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"book","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetBook","relationName":"DatasetBookToDatasetReference","relationFromFields":["datasetId","bookId"],"relationToFields":["datasetId","id"],"isGenerated":false,"isUpdatedAt":false},{"name":"chapterNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"chapter","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetChapter","relationName":"DatasetChapterToDatasetReference","relationFromFields":["datasetId","bookId","chapterNumber"],"relationToFields":["datasetId","bookId","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"verseNumber","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"verse","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DatasetChapterVerse","relationName":"DatasetChapterVerseToDatasetReference","relationFromFields":["datasetId","bookId","chapterNumber","verseNumber"],"relationToFields":["datasetId","bookId","chapterNumber","number"],"isGenerated":false,"isUpdatedAt":false},{"name":"referenceBookId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","isGenerated":false,"isUpdatedAt":false},{"name":"referenceChapter","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"referenceVerse","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"endVerseNumber","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false},{"name":"score","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false}},"enums":{},"types":{}}');
|
|
5715
5766
|
defineDmmfProperty2(exports2.Prisma, config2.runtimeDataModel);
|
|
5716
5767
|
config2.engineWasm = void 0;
|
|
5717
5768
|
var { warnEnvConflicts: warnEnvConflicts2 } = require_library();
|
|
@@ -5959,14 +6010,16 @@ function getBookId(book) {
|
|
|
5959
6010
|
return null;
|
|
5960
6011
|
}
|
|
5961
6012
|
var KNOWN_SKIPPED_VERSES = /* @__PURE__ */ new Set([
|
|
6013
|
+
"MAT 12:47",
|
|
5962
6014
|
"MAT 17:21",
|
|
5963
6015
|
"MAT 18:11",
|
|
5964
6016
|
"MAT 23:14",
|
|
5965
|
-
"
|
|
5966
|
-
"
|
|
5967
|
-
"
|
|
5968
|
-
"
|
|
6017
|
+
"MRK 7:16",
|
|
6018
|
+
"MRK 9:44",
|
|
6019
|
+
"MRK 9:46",
|
|
6020
|
+
"MRK 11:26",
|
|
5969
6021
|
"LUK 17:36",
|
|
6022
|
+
"LUK 23:17",
|
|
5970
6023
|
"JHN 5:4",
|
|
5971
6024
|
"ACT 8:37",
|
|
5972
6025
|
"ACT 15:34",
|
|
@@ -6029,19 +6082,23 @@ function generateApiForDataset(dataset, options = {}) {
|
|
|
6029
6082
|
};
|
|
6030
6083
|
let translationChapters = [];
|
|
6031
6084
|
for (let { chapters, ...book } of books) {
|
|
6085
|
+
const firstChapterNumber = chapters[0].chapter.number;
|
|
6086
|
+
const lastChapterNumber = chapters[chapters.length - 1].chapter.number;
|
|
6032
6087
|
const apiBook = {
|
|
6033
6088
|
...book,
|
|
6089
|
+
firstChapterNumber,
|
|
6034
6090
|
firstChapterApiLink: bookChapterApiLink(
|
|
6035
6091
|
translation.id,
|
|
6036
6092
|
getBookLink(book),
|
|
6037
|
-
|
|
6093
|
+
firstChapterNumber,
|
|
6038
6094
|
"json",
|
|
6039
6095
|
apiPathPrefix
|
|
6040
6096
|
),
|
|
6097
|
+
lastChapterNumber,
|
|
6041
6098
|
lastChapterApiLink: bookChapterApiLink(
|
|
6042
6099
|
translation.id,
|
|
6043
6100
|
getBookLink(book),
|
|
6044
|
-
|
|
6101
|
+
lastChapterNumber,
|
|
6045
6102
|
"json",
|
|
6046
6103
|
apiPathPrefix
|
|
6047
6104
|
),
|
|
@@ -6166,22 +6223,26 @@ function generateApiForDataset(dataset, options = {}) {
|
|
|
6166
6223
|
};
|
|
6167
6224
|
let commentaryChapters = [];
|
|
6168
6225
|
for (let { chapters, ...book } of books) {
|
|
6226
|
+
const firstChapterNumber = chapters[0]?.chapter.number ?? null;
|
|
6227
|
+
const lastChapterNumber = chapters[chapters.length - 1]?.chapter.number ?? null;
|
|
6169
6228
|
const apiBook = {
|
|
6170
6229
|
...book,
|
|
6171
|
-
|
|
6230
|
+
firstChapterNumber,
|
|
6231
|
+
firstChapterApiLink: firstChapterNumber ? bookCommentaryChapterApiLink(
|
|
6172
6232
|
commentary.id,
|
|
6173
6233
|
getBookLink(book),
|
|
6174
|
-
|
|
6234
|
+
firstChapterNumber,
|
|
6175
6235
|
"json",
|
|
6176
6236
|
apiPathPrefix
|
|
6177
|
-
),
|
|
6178
|
-
|
|
6237
|
+
) : null,
|
|
6238
|
+
lastChapterNumber,
|
|
6239
|
+
lastChapterApiLink: lastChapterNumber ? bookCommentaryChapterApiLink(
|
|
6179
6240
|
commentary.id,
|
|
6180
6241
|
getBookLink(book),
|
|
6181
|
-
|
|
6242
|
+
lastChapterNumber,
|
|
6182
6243
|
"json",
|
|
6183
6244
|
apiPathPrefix
|
|
6184
|
-
),
|
|
6245
|
+
) : null,
|
|
6185
6246
|
numberOfChapters: chapters.length,
|
|
6186
6247
|
totalNumberOfVerses: 0
|
|
6187
6248
|
};
|
|
@@ -6268,6 +6329,115 @@ function generateApiForDataset(dataset, options = {}) {
|
|
|
6268
6329
|
api.commentaryBooks.push(commentaryBooks);
|
|
6269
6330
|
api.commentaryProfiles.push(commentaryProfiles);
|
|
6270
6331
|
}
|
|
6332
|
+
for (let { books, ...datasetInfo } of dataset.datasets ?? []) {
|
|
6333
|
+
const apiDataset = {
|
|
6334
|
+
...datasetInfo,
|
|
6335
|
+
availableFormats: ["json"],
|
|
6336
|
+
listOfBooksApiLink: listOfDatasetBooksApiLink(
|
|
6337
|
+
datasetInfo.id,
|
|
6338
|
+
apiPathPrefix
|
|
6339
|
+
),
|
|
6340
|
+
numberOfBooks: books.length,
|
|
6341
|
+
totalNumberOfChapters: 0,
|
|
6342
|
+
totalNumberOfVerses: 0,
|
|
6343
|
+
totalNumberOfReferences: 0,
|
|
6344
|
+
languageName: getNativeName2 ? getNativeName2(datasetInfo.language) ?? void 0 : void 0,
|
|
6345
|
+
languageEnglishName: getEnglishName2 ? getEnglishName2(datasetInfo.language) ?? void 0 : void 0
|
|
6346
|
+
};
|
|
6347
|
+
const datasetBooks = {
|
|
6348
|
+
dataset: apiDataset,
|
|
6349
|
+
books: []
|
|
6350
|
+
};
|
|
6351
|
+
let datasetChapters = [];
|
|
6352
|
+
for (let { chapters, ...book } of books) {
|
|
6353
|
+
const firstChapterNumber = chapters[0]?.chapter.number ?? null;
|
|
6354
|
+
const lastChapterNumber = chapters[chapters.length - 1]?.chapter.number ?? null;
|
|
6355
|
+
const apiBook = {
|
|
6356
|
+
...book,
|
|
6357
|
+
firstChapterNumber,
|
|
6358
|
+
firstChapterApiLink: bookDatasetChapterApiLink(
|
|
6359
|
+
datasetInfo.id,
|
|
6360
|
+
book.id,
|
|
6361
|
+
firstChapterNumber,
|
|
6362
|
+
"json",
|
|
6363
|
+
apiPathPrefix
|
|
6364
|
+
),
|
|
6365
|
+
lastChapterNumber,
|
|
6366
|
+
lastChapterApiLink: bookDatasetChapterApiLink(
|
|
6367
|
+
datasetInfo.id,
|
|
6368
|
+
book.id,
|
|
6369
|
+
lastChapterNumber,
|
|
6370
|
+
"json",
|
|
6371
|
+
apiPathPrefix
|
|
6372
|
+
),
|
|
6373
|
+
numberOfChapters: chapters.length,
|
|
6374
|
+
totalNumberOfVerses: 0,
|
|
6375
|
+
totalNumberOfReferences: 0
|
|
6376
|
+
};
|
|
6377
|
+
for (let { chapter } of chapters) {
|
|
6378
|
+
const apiBookChapter = {
|
|
6379
|
+
dataset: apiDataset,
|
|
6380
|
+
book: apiBook,
|
|
6381
|
+
chapter,
|
|
6382
|
+
thisChapterLink: bookDatasetChapterApiLink(
|
|
6383
|
+
datasetInfo.id,
|
|
6384
|
+
book.id,
|
|
6385
|
+
chapter.number,
|
|
6386
|
+
"json",
|
|
6387
|
+
apiPathPrefix
|
|
6388
|
+
),
|
|
6389
|
+
nextChapterApiLink: null,
|
|
6390
|
+
previousChapterApiLink: null,
|
|
6391
|
+
numberOfVerses: chapter.content.length,
|
|
6392
|
+
numberOfReferences: 0
|
|
6393
|
+
};
|
|
6394
|
+
for (let verse of chapter.content) {
|
|
6395
|
+
apiBookChapter.numberOfReferences += verse.references.length;
|
|
6396
|
+
}
|
|
6397
|
+
apiBook.totalNumberOfVerses += apiBookChapter.numberOfVerses;
|
|
6398
|
+
apiBook.totalNumberOfReferences += apiBookChapter.numberOfReferences;
|
|
6399
|
+
datasetChapters.push(apiBookChapter);
|
|
6400
|
+
if (!api.datasetBookChapters) {
|
|
6401
|
+
api.datasetBookChapters = [];
|
|
6402
|
+
}
|
|
6403
|
+
api.datasetBookChapters.push(apiBookChapter);
|
|
6404
|
+
}
|
|
6405
|
+
datasetBooks.books.push(apiBook);
|
|
6406
|
+
apiDataset.totalNumberOfChapters += apiBook.numberOfChapters;
|
|
6407
|
+
apiDataset.totalNumberOfVerses += apiBook.totalNumberOfVerses;
|
|
6408
|
+
apiDataset.totalNumberOfReferences += apiBook.totalNumberOfReferences;
|
|
6409
|
+
}
|
|
6410
|
+
for (let i = 0; i < datasetChapters.length; i++) {
|
|
6411
|
+
if (i > 0) {
|
|
6412
|
+
datasetChapters[i].previousChapterApiLink = bookDatasetChapterApiLink(
|
|
6413
|
+
datasetInfo.id,
|
|
6414
|
+
datasetChapters[i - 1].book.id,
|
|
6415
|
+
datasetChapters[i - 1].chapter.number,
|
|
6416
|
+
"json",
|
|
6417
|
+
apiPathPrefix
|
|
6418
|
+
);
|
|
6419
|
+
}
|
|
6420
|
+
if (i < datasetChapters.length - 1) {
|
|
6421
|
+
datasetChapters[i].nextChapterApiLink = bookDatasetChapterApiLink(
|
|
6422
|
+
datasetInfo.id,
|
|
6423
|
+
datasetChapters[i + 1].book.id,
|
|
6424
|
+
datasetChapters[i + 1].chapter.number,
|
|
6425
|
+
"json",
|
|
6426
|
+
apiPathPrefix
|
|
6427
|
+
);
|
|
6428
|
+
}
|
|
6429
|
+
}
|
|
6430
|
+
if (!api.availableDatasets) {
|
|
6431
|
+
api.availableDatasets = {
|
|
6432
|
+
datasets: []
|
|
6433
|
+
};
|
|
6434
|
+
}
|
|
6435
|
+
api.availableDatasets.datasets.push(apiDataset);
|
|
6436
|
+
if (!api.datasetBooks) {
|
|
6437
|
+
api.datasetBooks = [];
|
|
6438
|
+
}
|
|
6439
|
+
api.datasetBooks.push(datasetBooks);
|
|
6440
|
+
}
|
|
6271
6441
|
return api;
|
|
6272
6442
|
function getBookLink(book) {
|
|
6273
6443
|
return useCommonName ? book.commonName : book.id;
|
|
@@ -6327,6 +6497,29 @@ function generateFilesForApi(api) {
|
|
|
6327
6497
|
for (let bookChapter of api.commentaryBookChapters) {
|
|
6328
6498
|
files.push(jsonFile(bookChapter.thisChapterLink, bookChapter));
|
|
6329
6499
|
}
|
|
6500
|
+
if (api.availableDatasets) {
|
|
6501
|
+
files.push(
|
|
6502
|
+
jsonFile(
|
|
6503
|
+
`${api.pathPrefix}/api/available_datasets.json`,
|
|
6504
|
+
api.availableDatasets,
|
|
6505
|
+
true
|
|
6506
|
+
)
|
|
6507
|
+
);
|
|
6508
|
+
}
|
|
6509
|
+
if (api.datasetBooks) {
|
|
6510
|
+
for (let datasetBook of api.datasetBooks) {
|
|
6511
|
+
files.push(
|
|
6512
|
+
jsonFile(datasetBook.dataset.listOfBooksApiLink, datasetBook)
|
|
6513
|
+
);
|
|
6514
|
+
}
|
|
6515
|
+
}
|
|
6516
|
+
if (api.datasetBookChapters) {
|
|
6517
|
+
for (let datasetBookChapter of api.datasetBookChapters) {
|
|
6518
|
+
files.push(
|
|
6519
|
+
jsonFile(datasetBookChapter.thisChapterLink, datasetBookChapter)
|
|
6520
|
+
);
|
|
6521
|
+
}
|
|
6522
|
+
}
|
|
6330
6523
|
return files;
|
|
6331
6524
|
}
|
|
6332
6525
|
async function* generateOutputFilesFromDatasets(datasets, options) {
|
|
@@ -6342,6 +6535,9 @@ function listOfBooksApiLink(translationId, prefix = "") {
|
|
|
6342
6535
|
function listOfCommentaryBooksApiLink(commentaryId, prefix = "") {
|
|
6343
6536
|
return `${prefix}/api/c/${commentaryId}/books.json`;
|
|
6344
6537
|
}
|
|
6538
|
+
function listOfDatasetBooksApiLink(datasetId, prefix = "") {
|
|
6539
|
+
return `${prefix}/api/d/${datasetId}/books.json`;
|
|
6540
|
+
}
|
|
6345
6541
|
function bookChapterApiLink(translationId, commonName, chapterNumber, extension, prefix = "") {
|
|
6346
6542
|
return `${prefix}/api/${translationId}/${replaceSpacesWithUnderscores(
|
|
6347
6543
|
commonName
|
|
@@ -6357,6 +6553,11 @@ function bookChapterAudioApiLink(translationId, bookId, chapterNumber, reader, p
|
|
|
6357
6553
|
bookId
|
|
6358
6554
|
)}/${chapterNumber}.${reader}.mp3`;
|
|
6359
6555
|
}
|
|
6556
|
+
function bookDatasetChapterApiLink(translationId, commonName, chapterNumber, extension, prefix = "") {
|
|
6557
|
+
return `${prefix}/api/d/${translationId}/${replaceSpacesWithUnderscores(
|
|
6558
|
+
commonName
|
|
6559
|
+
)}/${chapterNumber}.${extension}`;
|
|
6560
|
+
}
|
|
6360
6561
|
function profilesCommentaryApiLink(translationId, extension, prefix = "") {
|
|
6361
6562
|
return `${prefix}/api/c/${translationId}/profiles.${extension}`;
|
|
6362
6563
|
}
|
|
@@ -12999,6 +13200,81 @@ async function loadCommentaryFiles(commentary) {
|
|
|
12999
13200
|
}
|
|
13000
13201
|
return await Promise.all(promises);
|
|
13001
13202
|
}
|
|
13203
|
+
async function loadDatasetsFromDirectory(dir) {
|
|
13204
|
+
const logger2 = log_exports.getLogger();
|
|
13205
|
+
let datasets = [];
|
|
13206
|
+
const apiDir = path2.resolve(dir, "api");
|
|
13207
|
+
const availableDatasets = JSON.parse(
|
|
13208
|
+
await (0, import_promises3.readFile)(path2.resolve(apiDir, "available_datasets.json"), "utf-8")
|
|
13209
|
+
);
|
|
13210
|
+
datasets.push(
|
|
13211
|
+
...availableDatasets.datasets.map((d) => ({
|
|
13212
|
+
...d,
|
|
13213
|
+
books: []
|
|
13214
|
+
}))
|
|
13215
|
+
);
|
|
13216
|
+
for (let dataset of datasets) {
|
|
13217
|
+
const datasetDir = path2.resolve(apiDir, "d", dataset.id);
|
|
13218
|
+
const booksList = await (0, import_promises3.readdir)(datasetDir);
|
|
13219
|
+
for (let bookId of booksList) {
|
|
13220
|
+
if (bookId === "books.json") {
|
|
13221
|
+
continue;
|
|
13222
|
+
}
|
|
13223
|
+
const id2 = getBookId(bookId);
|
|
13224
|
+
if (!id2) {
|
|
13225
|
+
logger2.warn(`Unknown book directory: ${bookId}`);
|
|
13226
|
+
continue;
|
|
13227
|
+
}
|
|
13228
|
+
const book = {
|
|
13229
|
+
id: id2,
|
|
13230
|
+
chapters: [],
|
|
13231
|
+
order: bookOrderMap.get(id2)
|
|
13232
|
+
};
|
|
13233
|
+
dataset.books.push(book);
|
|
13234
|
+
const bookDir = path2.resolve(datasetDir, bookId);
|
|
13235
|
+
const chapters = await (0, import_promises3.readdir)(bookDir);
|
|
13236
|
+
for (let chapterFile of chapters) {
|
|
13237
|
+
const chapterJson = JSON.parse(
|
|
13238
|
+
await (0, import_promises3.readFile)(path2.resolve(bookDir, chapterFile), "utf-8")
|
|
13239
|
+
);
|
|
13240
|
+
if (chapterJson.chapter) {
|
|
13241
|
+
book.chapters.push({
|
|
13242
|
+
chapter: chapterJson.chapter
|
|
13243
|
+
});
|
|
13244
|
+
} else if (chapterJson.content) {
|
|
13245
|
+
const chapterNumber = parseInt(
|
|
13246
|
+
(0, import_path.basename)(chapterFile, (0, import_path.extname)(chapterFile))
|
|
13247
|
+
);
|
|
13248
|
+
if (isNaN(chapterNumber)) {
|
|
13249
|
+
logger2.warn(`Unknown chapter format: ${chapterFile}`);
|
|
13250
|
+
continue;
|
|
13251
|
+
}
|
|
13252
|
+
book.chapters.push({
|
|
13253
|
+
chapter: {
|
|
13254
|
+
number: chapterNumber,
|
|
13255
|
+
content: chapterJson.content.map((c) => ({
|
|
13256
|
+
verse: c.verse,
|
|
13257
|
+
references: (c.references ?? []).map(
|
|
13258
|
+
(ref) => ({
|
|
13259
|
+
book: ref.book,
|
|
13260
|
+
chapter: ref.chapter,
|
|
13261
|
+
verse: ref.verse,
|
|
13262
|
+
endVerse: ref.endVerse,
|
|
13263
|
+
score: ref.score ?? ref.votes
|
|
13264
|
+
})
|
|
13265
|
+
)
|
|
13266
|
+
}))
|
|
13267
|
+
}
|
|
13268
|
+
});
|
|
13269
|
+
} else {
|
|
13270
|
+
logger2.warn(`Unknown chapter format: ${chapterFile}`);
|
|
13271
|
+
continue;
|
|
13272
|
+
}
|
|
13273
|
+
}
|
|
13274
|
+
}
|
|
13275
|
+
}
|
|
13276
|
+
return datasets;
|
|
13277
|
+
}
|
|
13002
13278
|
async function loadTranslationMetadata(translation) {
|
|
13003
13279
|
const logger2 = log_exports.getLogger();
|
|
13004
13280
|
const metadataTs = path2.resolve(translation, "metadata.ts");
|
|
@@ -13231,14 +13507,23 @@ async function importFileBatch(db, files, parser, overwrite) {
|
|
|
13231
13507
|
);
|
|
13232
13508
|
logger2.log("Generated", output.translations.length, "translations");
|
|
13233
13509
|
logger2.log("Generated", output.commentaries.length, "commentaries");
|
|
13510
|
+
importDatasetOutput(db, output);
|
|
13511
|
+
insertFileMetadata(db, changedFiles);
|
|
13512
|
+
}
|
|
13513
|
+
function importDatasetOutput(db, output) {
|
|
13514
|
+
const logger2 = log_exports.getLogger();
|
|
13234
13515
|
insertTranslations(db, output.translations);
|
|
13235
13516
|
updateTranslationHashes(db, output.translations);
|
|
13236
13517
|
insertCommentaries(db, output.commentaries);
|
|
13237
13518
|
updateCommentaryHashes(db, output.commentaries);
|
|
13238
|
-
|
|
13519
|
+
insertDatasets(db, output.datasets ?? []);
|
|
13520
|
+
updateDatasetHashes(db, output.datasets ?? []);
|
|
13239
13521
|
insertWarningMetadata(db, output.parseMessages);
|
|
13240
13522
|
logger2.log(`Inserted ${output.translations.length} translations into DB`);
|
|
13241
13523
|
logger2.log(`Inserted ${output.commentaries.length} commentaries into DB`);
|
|
13524
|
+
if (output.datasets) {
|
|
13525
|
+
logger2.log(`Inserted ${output.datasets.length} datasets into DB`);
|
|
13526
|
+
}
|
|
13242
13527
|
logger2.log(
|
|
13243
13528
|
`Produced ${output.parseMessages?.length ?? 0} warnings/errors.`
|
|
13244
13529
|
);
|
|
@@ -13951,6 +14236,248 @@ function updateCommentaryHashes(db, commentaries) {
|
|
|
13951
14236
|
updateCommentaries();
|
|
13952
14237
|
logger2.log(`Updated.`);
|
|
13953
14238
|
}
|
|
14239
|
+
function insertDatasets(db, datasets) {
|
|
14240
|
+
const translationUpsert = db.prepare(`INSERT INTO Dataset(
|
|
14241
|
+
id,
|
|
14242
|
+
name,
|
|
14243
|
+
language,
|
|
14244
|
+
textDirection,
|
|
14245
|
+
licenseUrl,
|
|
14246
|
+
licenseNotes,
|
|
14247
|
+
website,
|
|
14248
|
+
englishName
|
|
14249
|
+
) VALUES (
|
|
14250
|
+
@id,
|
|
14251
|
+
@name,
|
|
14252
|
+
@language,
|
|
14253
|
+
@textDirection,
|
|
14254
|
+
@licenseUrl,
|
|
14255
|
+
@licenseNotes,
|
|
14256
|
+
@website,
|
|
14257
|
+
@englishName
|
|
14258
|
+
) ON CONFLICT(id) DO
|
|
14259
|
+
UPDATE SET
|
|
14260
|
+
name=excluded.name,
|
|
14261
|
+
language=excluded.language,
|
|
14262
|
+
textDirection=excluded.textDirection,
|
|
14263
|
+
licenseUrl=excluded.licenseUrl,
|
|
14264
|
+
licenseNotes=excluded.licenseNotes,
|
|
14265
|
+
website=excluded.website,
|
|
14266
|
+
englishName=excluded.englishName;`);
|
|
14267
|
+
const insertManyTranslations = db.transaction(
|
|
14268
|
+
(datasets2) => {
|
|
14269
|
+
for (let dataset of datasets2) {
|
|
14270
|
+
translationUpsert.run({
|
|
14271
|
+
id: dataset.id,
|
|
14272
|
+
name: dataset.name,
|
|
14273
|
+
language: dataset.language,
|
|
14274
|
+
textDirection: dataset.textDirection,
|
|
14275
|
+
licenseUrl: dataset.licenseUrl,
|
|
14276
|
+
licenseNotes: dataset.licenseNotes,
|
|
14277
|
+
website: dataset.website,
|
|
14278
|
+
englishName: dataset.englishName
|
|
14279
|
+
});
|
|
14280
|
+
}
|
|
14281
|
+
}
|
|
14282
|
+
);
|
|
14283
|
+
insertManyTranslations(datasets);
|
|
14284
|
+
const deleteReferences = db.prepare(`DELETE FROM DatasetReference
|
|
14285
|
+
WHERE datasetId = @datasetId;`);
|
|
14286
|
+
for (let dataset of datasets) {
|
|
14287
|
+
deleteReferences.run({
|
|
14288
|
+
datasetId: dataset.id
|
|
14289
|
+
});
|
|
14290
|
+
insertDatasetBooks(db, dataset, dataset.books);
|
|
14291
|
+
}
|
|
14292
|
+
}
|
|
14293
|
+
function insertDatasetBooks(db, dataset, datasetBooks) {
|
|
14294
|
+
const bookUpsert = db.prepare(`INSERT INTO DatasetBook(
|
|
14295
|
+
id,
|
|
14296
|
+
datasetId,
|
|
14297
|
+
numberOfChapters,
|
|
14298
|
+
\`order\`
|
|
14299
|
+
) VALUES (
|
|
14300
|
+
@id,
|
|
14301
|
+
@datasetId,
|
|
14302
|
+
@numberOfChapters,
|
|
14303
|
+
@bookOrder
|
|
14304
|
+
) ON CONFLICT(id,datasetId) DO
|
|
14305
|
+
UPDATE SET
|
|
14306
|
+
numberOfChapters=excluded.numberOfChapters;`);
|
|
14307
|
+
const insertMany = db.transaction((books) => {
|
|
14308
|
+
for (let book of books) {
|
|
14309
|
+
if (!book) {
|
|
14310
|
+
continue;
|
|
14311
|
+
}
|
|
14312
|
+
bookUpsert.run({
|
|
14313
|
+
id: book.id,
|
|
14314
|
+
datasetId: dataset.id,
|
|
14315
|
+
numberOfChapters: book.chapters.length,
|
|
14316
|
+
bookOrder: book.order ?? 9999
|
|
14317
|
+
});
|
|
14318
|
+
}
|
|
14319
|
+
});
|
|
14320
|
+
insertMany(datasetBooks);
|
|
14321
|
+
for (let book of datasetBooks) {
|
|
14322
|
+
insertDatasetContent(db, dataset, book, book.chapters);
|
|
14323
|
+
}
|
|
14324
|
+
}
|
|
14325
|
+
function insertDatasetContent(db, dataset, book, chapters) {
|
|
14326
|
+
const logger2 = log_exports.getLogger();
|
|
14327
|
+
const chapterUpsert = db.prepare(`INSERT INTO DatasetChapter(
|
|
14328
|
+
datasetId,
|
|
14329
|
+
bookId,
|
|
14330
|
+
number,
|
|
14331
|
+
json
|
|
14332
|
+
) VALUES (
|
|
14333
|
+
@datasetId,
|
|
14334
|
+
@bookId,
|
|
14335
|
+
@number,
|
|
14336
|
+
@json
|
|
14337
|
+
) ON CONFLICT(datasetId,bookId,number) DO
|
|
14338
|
+
UPDATE SET
|
|
14339
|
+
json=excluded.json;`);
|
|
14340
|
+
const verseUpsert = db.prepare(`INSERT INTO DatasetChapterVerse(
|
|
14341
|
+
datasetId,
|
|
14342
|
+
bookId,
|
|
14343
|
+
chapterNumber,
|
|
14344
|
+
number,
|
|
14345
|
+
contentJson
|
|
14346
|
+
) VALUES (
|
|
14347
|
+
@datasetId,
|
|
14348
|
+
@bookId,
|
|
14349
|
+
@chapterNumber,
|
|
14350
|
+
@number,
|
|
14351
|
+
@contentJson
|
|
14352
|
+
) ON CONFLICT(datasetId,bookId,chapterNumber,number) DO
|
|
14353
|
+
UPDATE SET
|
|
14354
|
+
contentJson=excluded.contentJson;`);
|
|
14355
|
+
const referenceInsert = db.prepare(`INSERT INTO DatasetReference(
|
|
14356
|
+
datasetId,
|
|
14357
|
+
bookId,
|
|
14358
|
+
chapterNumber,
|
|
14359
|
+
verseNumber,
|
|
14360
|
+
referenceBookId,
|
|
14361
|
+
referenceChapter,
|
|
14362
|
+
referenceVerse,
|
|
14363
|
+
endVerseNumber,
|
|
14364
|
+
score
|
|
14365
|
+
) VALUES (
|
|
14366
|
+
@datasetId,
|
|
14367
|
+
@bookId,
|
|
14368
|
+
@chapterNumber,
|
|
14369
|
+
@verseNumber,
|
|
14370
|
+
@referenceBookId,
|
|
14371
|
+
@referenceChapter,
|
|
14372
|
+
@referenceVerse,
|
|
14373
|
+
@endVerseNumber,
|
|
14374
|
+
@score
|
|
14375
|
+
);`);
|
|
14376
|
+
const insertChaptersAndVerses = db.transaction(() => {
|
|
14377
|
+
for (let chapter of chapters) {
|
|
14378
|
+
chapterUpsert.run({
|
|
14379
|
+
datasetId: dataset.id,
|
|
14380
|
+
bookId: book.id,
|
|
14381
|
+
number: chapter.chapter.number,
|
|
14382
|
+
json: JSON.stringify(chapter.chapter)
|
|
14383
|
+
});
|
|
14384
|
+
for (let verse of chapter.chapter.content) {
|
|
14385
|
+
verseUpsert.run({
|
|
14386
|
+
datasetId: dataset.id,
|
|
14387
|
+
bookId: book.id,
|
|
14388
|
+
chapterNumber: chapter.chapter.number,
|
|
14389
|
+
number: verse.verse,
|
|
14390
|
+
contentJson: JSON.stringify(verse)
|
|
14391
|
+
});
|
|
14392
|
+
for (let ref of verse.references) {
|
|
14393
|
+
referenceInsert.run({
|
|
14394
|
+
datasetId: dataset.id,
|
|
14395
|
+
bookId: book.id,
|
|
14396
|
+
chapterNumber: chapter.chapter.number,
|
|
14397
|
+
verseNumber: verse.verse,
|
|
14398
|
+
referenceBookId: ref.book,
|
|
14399
|
+
referenceChapter: ref.chapter,
|
|
14400
|
+
referenceVerse: ref.verse,
|
|
14401
|
+
endVerseNumber: ref.endVerse ?? null,
|
|
14402
|
+
score: ref.score ?? null
|
|
14403
|
+
});
|
|
14404
|
+
}
|
|
14405
|
+
}
|
|
14406
|
+
}
|
|
14407
|
+
});
|
|
14408
|
+
insertChaptersAndVerses();
|
|
14409
|
+
}
|
|
14410
|
+
function updateDatasetHashes(db, datasets) {
|
|
14411
|
+
const logger2 = log_exports.getLogger();
|
|
14412
|
+
logger2.log(`Updating hashes for ${datasets.length} datasets.`);
|
|
14413
|
+
const updateTranslationHash = db.prepare(
|
|
14414
|
+
`UPDATE Dataset SET sha256 = @sha256 WHERE id = @datasetId;`
|
|
14415
|
+
);
|
|
14416
|
+
const updateBookHash = db.prepare(
|
|
14417
|
+
`UPDATE DatasetBook SET sha256 = @sha256 WHERE datasetId = @datasetId AND id = @bookId;`
|
|
14418
|
+
);
|
|
14419
|
+
const updateChapterHash = db.prepare(
|
|
14420
|
+
`UPDATE DatasetChapter SET sha256 = @sha256 WHERE datasetId = @datasetId AND bookId = @bookId AND number = @chapterNumber;`
|
|
14421
|
+
);
|
|
14422
|
+
const getBooks = db.prepare(
|
|
14423
|
+
"SELECT * FROM DatasetBook WHERE datasetId = ?;"
|
|
14424
|
+
);
|
|
14425
|
+
const getChapters = db.prepare(
|
|
14426
|
+
"SELECT * FROM DatasetChapter WHERE datasetId = @datasetId AND bookId = @bookId;"
|
|
14427
|
+
);
|
|
14428
|
+
for (let dataset of datasets) {
|
|
14429
|
+
const commentarySha = (0, import_hash2.sha256)().update(dataset.id).update(dataset.name).update(dataset.language).update(dataset.licenseUrl).update(dataset.textDirection).update(dataset.website).update(dataset.englishName);
|
|
14430
|
+
const books = getBooks.all(dataset.id);
|
|
14431
|
+
for (let book of books) {
|
|
14432
|
+
const chapters = getChapters.all({
|
|
14433
|
+
datasetId: dataset.id,
|
|
14434
|
+
bookId: book.id
|
|
14435
|
+
});
|
|
14436
|
+
const bookSha = (0, import_hash2.sha256)().update(book.datasetId).update(book.id).update(book.numberOfChapters).update(book.order);
|
|
14437
|
+
for (let chapter of chapters) {
|
|
14438
|
+
const hash2 = (0, import_hash2.sha256)().update(chapter.datasetId).update(chapter.bookId).update(chapter.number).update(chapter.json).digest("hex");
|
|
14439
|
+
chapter.sha256 = hash2;
|
|
14440
|
+
bookSha.update(hash2);
|
|
14441
|
+
}
|
|
14442
|
+
const updateChapters = db.transaction(() => {
|
|
14443
|
+
for (let chapter of chapters) {
|
|
14444
|
+
updateChapterHash.run({
|
|
14445
|
+
sha256: chapter.sha256,
|
|
14446
|
+
datasetId: chapter.datasetId,
|
|
14447
|
+
bookId: chapter.bookId,
|
|
14448
|
+
chapterNumber: chapter.number
|
|
14449
|
+
});
|
|
14450
|
+
}
|
|
14451
|
+
});
|
|
14452
|
+
updateChapters();
|
|
14453
|
+
const bookHash = bookSha.digest("hex");
|
|
14454
|
+
book.sha256 = bookHash;
|
|
14455
|
+
commentarySha.update(bookHash);
|
|
14456
|
+
}
|
|
14457
|
+
const updateBooks = db.transaction(() => {
|
|
14458
|
+
for (let book of books) {
|
|
14459
|
+
updateBookHash.run({
|
|
14460
|
+
sha256: book.sha256,
|
|
14461
|
+
datasetId: book.datasetId,
|
|
14462
|
+
bookId: book.id
|
|
14463
|
+
});
|
|
14464
|
+
}
|
|
14465
|
+
});
|
|
14466
|
+
updateBooks();
|
|
14467
|
+
const hash = commentarySha.digest("hex");
|
|
14468
|
+
dataset.sha256 = hash;
|
|
14469
|
+
}
|
|
14470
|
+
const updateDatasets = db.transaction(() => {
|
|
14471
|
+
for (let dataset of datasets) {
|
|
14472
|
+
updateTranslationHash.run({
|
|
14473
|
+
sha256: dataset.sha256,
|
|
14474
|
+
datasetId: dataset.id
|
|
14475
|
+
});
|
|
14476
|
+
}
|
|
14477
|
+
});
|
|
14478
|
+
updateDatasets();
|
|
14479
|
+
logger2.log(`Updated.`);
|
|
14480
|
+
}
|
|
13954
14481
|
function getDbPathFromDir(dir) {
|
|
13955
14482
|
dir = dir || process.cwd();
|
|
13956
14483
|
return import_path2.default.resolve(dir, "bible-api.db");
|
|
@@ -13961,8 +14488,9 @@ function getDbPath(p) {
|
|
|
13961
14488
|
}
|
|
13962
14489
|
return getDbPathFromDir(process.cwd());
|
|
13963
14490
|
}
|
|
13964
|
-
function
|
|
13965
|
-
const dbPath =
|
|
14491
|
+
function getPrismaDb(path6) {
|
|
14492
|
+
const dbPath = getDbPath(path6);
|
|
14493
|
+
console.log("Opening database at", dbPath);
|
|
13966
14494
|
const prisma = new import_prisma_gen.PrismaClient({
|
|
13967
14495
|
datasources: {
|
|
13968
14496
|
db: {
|
|
@@ -13972,12 +14500,13 @@ function getPrismaDbFromDir(dir) {
|
|
|
13972
14500
|
});
|
|
13973
14501
|
return prisma;
|
|
13974
14502
|
}
|
|
13975
|
-
async function
|
|
13976
|
-
const dbPath =
|
|
13977
|
-
const db = await
|
|
14503
|
+
async function getDb(path6) {
|
|
14504
|
+
const dbPath = getDbPath(path6);
|
|
14505
|
+
const db = await getDbFromPath(dbPath);
|
|
13978
14506
|
return db;
|
|
13979
14507
|
}
|
|
13980
|
-
async function
|
|
14508
|
+
async function getDbFromPath(dbPath) {
|
|
14509
|
+
console.log("Opening database at", dbPath);
|
|
13981
14510
|
const logger2 = log_exports.getLogger();
|
|
13982
14511
|
const migrationsPath = await getMigrationsPath();
|
|
13983
14512
|
if (!migrationsPath) {
|
|
@@ -14032,6 +14561,7 @@ async function getDb(dbPath) {
|
|
|
14032
14561
|
async function* loadDatasets(db, perBatch = 50, translationsToLoad) {
|
|
14033
14562
|
yield* loadTranslationDatasets(db, perBatch, translationsToLoad);
|
|
14034
14563
|
yield* loadCommentaryDatasets(db, perBatch, translationsToLoad);
|
|
14564
|
+
yield* loadDatasetDatasets(db, perBatch, translationsToLoad);
|
|
14035
14565
|
}
|
|
14036
14566
|
async function* loadTranslationDatasets(db, translationsPerBatch = 50, translationsToLoad) {
|
|
14037
14567
|
const logger2 = log_exports.getLogger();
|
|
@@ -14232,6 +14762,84 @@ async function* loadCommentaryDatasets(db, perBatch = 50, commentariesToLoad) {
|
|
|
14232
14762
|
offset += pageSize;
|
|
14233
14763
|
}
|
|
14234
14764
|
}
|
|
14765
|
+
async function* loadDatasetDatasets(db, perBatch = 50, datasetsToLoad) {
|
|
14766
|
+
const logger2 = log_exports.getLogger();
|
|
14767
|
+
let offset = 0;
|
|
14768
|
+
let pageSize = perBatch;
|
|
14769
|
+
logger2.log("Generating dataset datasets in batches of", pageSize);
|
|
14770
|
+
const totalDatasets = await db.dataset.count();
|
|
14771
|
+
const totalBatches = Math.ceil(totalDatasets / pageSize);
|
|
14772
|
+
let batchNumber = 1;
|
|
14773
|
+
while (true) {
|
|
14774
|
+
logger2.log("Generating dataset batch", batchNumber, "of", totalBatches);
|
|
14775
|
+
batchNumber++;
|
|
14776
|
+
const datasetQuery = {
|
|
14777
|
+
skip: offset,
|
|
14778
|
+
take: pageSize
|
|
14779
|
+
};
|
|
14780
|
+
if (datasetsToLoad && datasetsToLoad.length > 0) {
|
|
14781
|
+
datasetQuery.where = {
|
|
14782
|
+
id: {
|
|
14783
|
+
in: datasetsToLoad
|
|
14784
|
+
}
|
|
14785
|
+
};
|
|
14786
|
+
}
|
|
14787
|
+
const datasets = await db.dataset.findMany(datasetQuery);
|
|
14788
|
+
if (datasets.length <= 0) {
|
|
14789
|
+
break;
|
|
14790
|
+
}
|
|
14791
|
+
const output = {
|
|
14792
|
+
translations: [],
|
|
14793
|
+
commentaries: [],
|
|
14794
|
+
datasets: []
|
|
14795
|
+
};
|
|
14796
|
+
for (let dataset of datasets) {
|
|
14797
|
+
const datasetDataset = {
|
|
14798
|
+
...dataset,
|
|
14799
|
+
textDirection: dataset.textDirection,
|
|
14800
|
+
books: []
|
|
14801
|
+
};
|
|
14802
|
+
output.datasets.push(datasetDataset);
|
|
14803
|
+
const books = await db.datasetBook.findMany({
|
|
14804
|
+
where: {
|
|
14805
|
+
datasetId: dataset.id
|
|
14806
|
+
},
|
|
14807
|
+
orderBy: {
|
|
14808
|
+
order: "asc"
|
|
14809
|
+
}
|
|
14810
|
+
});
|
|
14811
|
+
for (let book of books) {
|
|
14812
|
+
const chapters = await db.datasetChapter.findMany({
|
|
14813
|
+
where: {
|
|
14814
|
+
datasetId: dataset.id,
|
|
14815
|
+
bookId: book.id
|
|
14816
|
+
},
|
|
14817
|
+
orderBy: {
|
|
14818
|
+
number: "asc"
|
|
14819
|
+
}
|
|
14820
|
+
});
|
|
14821
|
+
const bookChapters = chapters.map(
|
|
14822
|
+
(chapter) => {
|
|
14823
|
+
const bookChapter = {
|
|
14824
|
+
chapter: JSON.parse(chapter.json)
|
|
14825
|
+
};
|
|
14826
|
+
for (let verse of bookChapter.chapter.content) {
|
|
14827
|
+
verse.references.sort((a, b2) => b2.score - a.score);
|
|
14828
|
+
}
|
|
14829
|
+
return bookChapter;
|
|
14830
|
+
}
|
|
14831
|
+
);
|
|
14832
|
+
const datasetBook = {
|
|
14833
|
+
...book,
|
|
14834
|
+
chapters: bookChapters
|
|
14835
|
+
};
|
|
14836
|
+
datasetDataset.books.push(datasetBook);
|
|
14837
|
+
}
|
|
14838
|
+
}
|
|
14839
|
+
yield output;
|
|
14840
|
+
offset += pageSize;
|
|
14841
|
+
}
|
|
14842
|
+
}
|
|
14235
14843
|
function serializeDatasets(datasets, options = {}) {
|
|
14236
14844
|
return serializeOutputFiles(
|
|
14237
14845
|
generateOutputFilesFromDatasets(datasets, {
|
|
@@ -14898,6 +15506,25 @@ async function initDb(dbPath, options) {
|
|
|
14898
15506
|
CREATE TABLE "CommentaryChapterVerse" AS SELECT * FROM source.CommentaryChapterVerse
|
|
14899
15507
|
INNER JOIN source.Commentary ON source.Commentary.id = source.CommentaryChapterVerse.commentaryId
|
|
14900
15508
|
WHERE source.Commentary.language IN ${languages};
|
|
15509
|
+
|
|
15510
|
+
CREATE TABLE "Dataset" AS SELECT * FROM source.Dataset
|
|
15511
|
+
WHERE language IN ${languages};
|
|
15512
|
+
|
|
15513
|
+
CREATE TABLE "DatasetBook" AS SELECT * FROM source.DatasetBook
|
|
15514
|
+
INNER JOIN source.Dataset ON source.Dataset.id = source.DatasetBook.datasetId
|
|
15515
|
+
WHERE source.Dataset.language IN ${languages};
|
|
15516
|
+
|
|
15517
|
+
CREATE TABLE "DatasetChapter" AS SELECT * FROM source.DatasetChapter
|
|
15518
|
+
INNER JOIN source.Dataset ON source.Dataset.id = source.DatasetChapter.datasetId
|
|
15519
|
+
WHERE source.Dataset.language IN ${languages};
|
|
15520
|
+
|
|
15521
|
+
CREATE TABLE "DatasetChapterVerse" AS SELECT * FROM source.DatasetChapterVerse
|
|
15522
|
+
INNER JOIN source.Dataset ON source.Dataset.id = source.DatasetChapterVerse.datasetId
|
|
15523
|
+
WHERE source.Dataset.language IN ${languages};
|
|
15524
|
+
|
|
15525
|
+
CREATE TABLE "DatasetReference" AS SELECT * FROM source.DatasetReference
|
|
15526
|
+
INNER JOIN source.Dataset ON source.Dataset.id = source.DatasetReference.datasetId
|
|
15527
|
+
WHERE source.Dataset.language IN ${languages};
|
|
14901
15528
|
`);
|
|
14902
15529
|
} else {
|
|
14903
15530
|
db.exec(`
|
|
@@ -14914,6 +15541,11 @@ async function initDb(dbPath, options) {
|
|
|
14914
15541
|
CREATE TABLE "CommentaryBook" AS SELECT * FROM source.CommentaryBook;
|
|
14915
15542
|
CREATE TABLE "CommentaryChapter" AS SELECT * FROM source.CommentaryChapter;
|
|
14916
15543
|
CREATE TABLE "CommentaryChapterVerse" AS SELECT * FROM source.CommentaryChapterVerse;
|
|
15544
|
+
CREATE TABLE "Dataset" AS SELECT * FROM source.Dataset;
|
|
15545
|
+
CREATE TABLE "DatasetBook" AS SELECT * FROM source.DatasetBook;
|
|
15546
|
+
CREATE TABLE "DatasetChapter" AS SELECT * FROM source.DatasetChapter;
|
|
15547
|
+
CREATE TABLE "DatasetChapterVerse" AS SELECT * FROM source.DatasetChapterVerse;
|
|
15548
|
+
CREATE TABLE "DatasetReference" AS SELECT * FROM source.DatasetReference;
|
|
14917
15549
|
`);
|
|
14918
15550
|
}
|
|
14919
15551
|
logger2.log("Done.");
|
|
@@ -14922,7 +15554,7 @@ async function initDb(dbPath, options) {
|
|
|
14922
15554
|
}
|
|
14923
15555
|
}
|
|
14924
15556
|
} else {
|
|
14925
|
-
const db = await getDb(
|
|
15557
|
+
const db = await getDb(dbPath);
|
|
14926
15558
|
db.close();
|
|
14927
15559
|
}
|
|
14928
15560
|
}
|
|
@@ -14931,7 +15563,7 @@ async function importTranslation(dir, dirs, options) {
|
|
|
14931
15563
|
globalThis.DOMParser = import_linkedom.DOMParser;
|
|
14932
15564
|
globalThis.Element = import_linkedom.Element;
|
|
14933
15565
|
globalThis.Node = import_linkedom.Node;
|
|
14934
|
-
const db = await
|
|
15566
|
+
const db = await getDb(options.db);
|
|
14935
15567
|
try {
|
|
14936
15568
|
await importTranslations(
|
|
14937
15569
|
db,
|
|
@@ -14949,7 +15581,7 @@ async function importTranslations2(dir, options) {
|
|
|
14949
15581
|
globalThis.DOMParser = import_linkedom.DOMParser;
|
|
14950
15582
|
globalThis.Element = import_linkedom.Element;
|
|
14951
15583
|
globalThis.Node = import_linkedom.Node;
|
|
14952
|
-
const db = await
|
|
15584
|
+
const db = await getDb(options.db);
|
|
14953
15585
|
try {
|
|
14954
15586
|
const files = await (0, import_promises5.readdir)(dir);
|
|
14955
15587
|
const translationDirs = files.map((f) => import_node_path2.default.resolve(dir, f));
|
|
@@ -14969,7 +15601,7 @@ async function importCommentary(dir, dirs, options) {
|
|
|
14969
15601
|
globalThis.DOMParser = import_linkedom.DOMParser;
|
|
14970
15602
|
globalThis.Element = import_linkedom.Element;
|
|
14971
15603
|
globalThis.Node = import_linkedom.Node;
|
|
14972
|
-
const db = await
|
|
15604
|
+
const db = await getDb(options.db);
|
|
14973
15605
|
try {
|
|
14974
15606
|
await importCommentaries(
|
|
14975
15607
|
db,
|
|
@@ -14987,7 +15619,7 @@ async function importCommentaries2(dir, options) {
|
|
|
14987
15619
|
globalThis.DOMParser = import_linkedom.DOMParser;
|
|
14988
15620
|
globalThis.Element = import_linkedom.Element;
|
|
14989
15621
|
globalThis.Node = import_linkedom.Node;
|
|
14990
|
-
const db = await
|
|
15622
|
+
const db = await getDb(options.db);
|
|
14991
15623
|
try {
|
|
14992
15624
|
const files = await (0, import_promises5.readdir)(dir);
|
|
14993
15625
|
const commentaryDirs = files.map((f) => import_node_path2.default.resolve(dir, f));
|
|
@@ -15002,6 +15634,19 @@ async function importCommentaries2(dir, options) {
|
|
|
15002
15634
|
db.close();
|
|
15003
15635
|
}
|
|
15004
15636
|
}
|
|
15637
|
+
async function importApi(dir, options) {
|
|
15638
|
+
const db = await getDb(options.db);
|
|
15639
|
+
try {
|
|
15640
|
+
const datasets = await loadDatasetsFromDirectory(dir);
|
|
15641
|
+
importDatasetOutput(db, {
|
|
15642
|
+
commentaries: [],
|
|
15643
|
+
translations: [],
|
|
15644
|
+
datasets
|
|
15645
|
+
});
|
|
15646
|
+
} finally {
|
|
15647
|
+
db.close();
|
|
15648
|
+
}
|
|
15649
|
+
}
|
|
15005
15650
|
async function fetchAudio(dir, translations, options = {}) {
|
|
15006
15651
|
const logger2 = log_exports.getLogger();
|
|
15007
15652
|
for (let translation of translations) {
|
|
@@ -15158,7 +15803,7 @@ Found ${sources.length} sources for '${translationQuery}':`);
|
|
|
15158
15803
|
}
|
|
15159
15804
|
async function sourceTranslations(outputDir, translations, options = {}) {
|
|
15160
15805
|
const logger2 = log_exports.getLogger();
|
|
15161
|
-
|
|
15806
|
+
let {
|
|
15162
15807
|
convertToUsx3 = false,
|
|
15163
15808
|
useDatabase = true,
|
|
15164
15809
|
// Default to true
|
|
@@ -15193,20 +15838,27 @@ async function sourceTranslations(outputDir, translations, options = {}) {
|
|
|
15193
15838
|
let db = null;
|
|
15194
15839
|
let sourceExists = null;
|
|
15195
15840
|
let sourceUpsert = null;
|
|
15196
|
-
let skippedByDatabase = 0;
|
|
15197
15841
|
if (useDatabase) {
|
|
15842
|
+
if (!overwrite) {
|
|
15843
|
+
overwrite = true;
|
|
15844
|
+
console.warn(
|
|
15845
|
+
"Overwriting files is enabled due to database tracking."
|
|
15846
|
+
);
|
|
15847
|
+
}
|
|
15198
15848
|
logger2.log("Connecting to database for download tracking...");
|
|
15199
|
-
db = await
|
|
15849
|
+
db = await getDb(options.db);
|
|
15200
15850
|
sourceExists = db.prepare(
|
|
15201
15851
|
"SELECT usfmZipEtag, usfmDownloadDate FROM EBibleSource WHERE id = @id AND sha256 = @sha256;"
|
|
15202
15852
|
);
|
|
15853
|
+
let skippedByDatabase = 0;
|
|
15854
|
+
let sourcesChecked = 0;
|
|
15855
|
+
let notDownloaded = 0;
|
|
15203
15856
|
filteredSources = filteredSources.filter((source) => {
|
|
15204
|
-
if (overwrite) {
|
|
15205
|
-
return true;
|
|
15206
|
-
}
|
|
15207
15857
|
const existingSource = sourceExists.get(source);
|
|
15858
|
+
sourcesChecked++;
|
|
15208
15859
|
if (existingSource) {
|
|
15209
15860
|
if (!existingSource.usfmDownloadDate) {
|
|
15861
|
+
notDownloaded++;
|
|
15210
15862
|
return true;
|
|
15211
15863
|
}
|
|
15212
15864
|
source.usfmZipEtag = existingSource.usfmZipEtag;
|
|
@@ -15221,13 +15873,18 @@ async function sourceTranslations(outputDir, translations, options = {}) {
|
|
|
15221
15873
|
});
|
|
15222
15874
|
if (skippedByDatabase > 0) {
|
|
15223
15875
|
logger2.log(
|
|
15224
|
-
`Database filtering: Skipped ${skippedByDatabase} already downloaded sources
|
|
15876
|
+
`Database filtering: Skipped ${skippedByDatabase} already downloaded sources.`
|
|
15225
15877
|
);
|
|
15226
15878
|
} else {
|
|
15227
|
-
logger2.log(
|
|
15228
|
-
"Database filtering: No sources were skipped (none previously downloaded)"
|
|
15229
|
-
);
|
|
15879
|
+
logger2.log(`Database filtering: No sources were skipped.`);
|
|
15230
15880
|
}
|
|
15881
|
+
logger2.log(`Database filtering:`);
|
|
15882
|
+
logger2.log(` \u2022 Checked: ${sourcesChecked}`);
|
|
15883
|
+
logger2.log(` \u2022 Skipped: ${skippedByDatabase}`);
|
|
15884
|
+
logger2.log(` \u2022 New: ${notDownloaded}`);
|
|
15885
|
+
logger2.log(
|
|
15886
|
+
` \u2022 Needs Update: ${filteredSources.length - notDownloaded}`
|
|
15887
|
+
);
|
|
15231
15888
|
sourceUpsert = db.prepare(`INSERT INTO EBibleSource(
|
|
15232
15889
|
id, translationId, title, shortTitle, languageCode, textDirection, copyright, description,
|
|
15233
15890
|
oldTestamentBooks, oldTestamentChapters, oldTestamentVerses,
|
|
@@ -15434,9 +16091,9 @@ Total selected: ${selectedSources.length} sources from ${sourceGroups.size} tran
|
|
|
15434
16091
|
if (!convertToUsx3) {
|
|
15435
16092
|
source.usfmDownloadDate = import_luxon2.DateTime.utc().toISO();
|
|
15436
16093
|
source.usfmDownloadPath = outputDir;
|
|
15437
|
-
|
|
15438
|
-
|
|
15439
|
-
|
|
16094
|
+
if (sourceUpsert) {
|
|
16095
|
+
sourceUpsert.run(source);
|
|
16096
|
+
}
|
|
15440
16097
|
}
|
|
15441
16098
|
} catch (error) {
|
|
15442
16099
|
numErrored++;
|
|
@@ -15704,7 +16361,7 @@ async function start() {
|
|
|
15704
16361
|
globalThis.Element = import_linkedom2.Element;
|
|
15705
16362
|
globalThis.Node = import_linkedom2.Node;
|
|
15706
16363
|
const program = new import_commander.Command();
|
|
15707
|
-
program.name("helloao").description("A CLI for managing a Free Use Bible API.").version("0.0.1");
|
|
16364
|
+
program.name("helloao").description("A CLI for managing a Free Use Bible API.").option("--db <path>", "Path to the database file.").version("0.0.1");
|
|
15708
16365
|
program.command("init [path]").description("Initialize a new Bible API DB.").option(
|
|
15709
16366
|
"--source <path>",
|
|
15710
16367
|
"The source database to copy from. If given a HTTPS URL, then the database will be downloaded from the given URL."
|
|
@@ -15712,7 +16369,10 @@ async function start() {
|
|
|
15712
16369
|
"--language <languages...>",
|
|
15713
16370
|
"The language(s) that the database should be initialized with."
|
|
15714
16371
|
).action(async (dbPath, options) => {
|
|
15715
|
-
await initDb(dbPath,
|
|
16372
|
+
await initDb(dbPath, {
|
|
16373
|
+
...program.opts(),
|
|
16374
|
+
...options
|
|
16375
|
+
});
|
|
15716
16376
|
});
|
|
15717
16377
|
program.command("generate-translation-metadata").description("Generates a metadata file for a translation.").action(async () => {
|
|
15718
16378
|
const meta = await askForMetadata();
|
|
@@ -15741,22 +16401,40 @@ async function start() {
|
|
|
15741
16401
|
program.command("import-translation <dir> [dirs...]").description(
|
|
15742
16402
|
"Imports a translation from the given directory into the database."
|
|
15743
16403
|
).option("--overwrite", "Whether to overwrite existing files.").action(async (dir, dirs, options) => {
|
|
15744
|
-
await importTranslation(dir, dirs,
|
|
16404
|
+
await importTranslation(dir, dirs, {
|
|
16405
|
+
...program.opts(),
|
|
16406
|
+
...options
|
|
16407
|
+
});
|
|
15745
16408
|
});
|
|
15746
16409
|
program.command("import-translations <dir>").description(
|
|
15747
16410
|
"Imports all translations from the given directory into the database."
|
|
15748
16411
|
).option("--overwrite", "Whether to overwrite existing files.").action(async (dir, options) => {
|
|
15749
|
-
await importTranslations2(dir,
|
|
16412
|
+
await importTranslations2(dir, {
|
|
16413
|
+
...program.opts(),
|
|
16414
|
+
...options
|
|
16415
|
+
});
|
|
15750
16416
|
});
|
|
15751
16417
|
program.command("import-commentary <dir> [dirs...]").description(
|
|
15752
16418
|
"Imports a commentary from the given directory into the database."
|
|
15753
16419
|
).option("--overwrite", "Whether to overwrite existing files.").action(async (dir, dirs, options) => {
|
|
15754
|
-
await importCommentary(dir, dirs,
|
|
16420
|
+
await importCommentary(dir, dirs, {
|
|
16421
|
+
...program.opts(),
|
|
16422
|
+
...options
|
|
16423
|
+
});
|
|
15755
16424
|
});
|
|
15756
16425
|
program.command("import-commentaries <dir>").description(
|
|
15757
16426
|
"Imports all commentaries from the given directory into the database."
|
|
15758
16427
|
).option("--overwrite", "Whether to overwrite existing files.").action(async (dir, options) => {
|
|
15759
|
-
await importCommentaries2(dir,
|
|
16428
|
+
await importCommentaries2(dir, {
|
|
16429
|
+
...program.opts(),
|
|
16430
|
+
...options
|
|
16431
|
+
});
|
|
16432
|
+
});
|
|
16433
|
+
program.command("import-api <dir>").description("Imports API files from the given directory into the DB.").option("--overwrite", "Whether to overwrite existing files.").action(async (dir, options) => {
|
|
16434
|
+
await importApi(dir, {
|
|
16435
|
+
...program.opts(),
|
|
16436
|
+
...options
|
|
16437
|
+
});
|
|
15760
16438
|
});
|
|
15761
16439
|
program.command("upload-test-translation <input>").description(
|
|
15762
16440
|
`Uploads a translation to the HelloAO Free Bible API test S3 bucket.
|
|
@@ -15805,7 +16483,10 @@ For inquiries, please contact hello@helloao.org.`
|
|
|
15805
16483
|
if (!good) {
|
|
15806
16484
|
return;
|
|
15807
16485
|
}
|
|
15808
|
-
const result = await uploadTestTranslation(input5,
|
|
16486
|
+
const result = await uploadTestTranslation(input5, {
|
|
16487
|
+
...program.opts(),
|
|
16488
|
+
...options
|
|
16489
|
+
});
|
|
15809
16490
|
if (result) {
|
|
15810
16491
|
const logger2 = log_exports.getLogger();
|
|
15811
16492
|
logger2.log("\n");
|
|
@@ -15865,7 +16546,10 @@ For inquiries, please contact hello@helloao.org.`
|
|
|
15865
16546
|
if (!good) {
|
|
15866
16547
|
return;
|
|
15867
16548
|
}
|
|
15868
|
-
const result = await uploadTestTranslations(input5,
|
|
16549
|
+
const result = await uploadTestTranslations(input5, {
|
|
16550
|
+
...program.opts(),
|
|
16551
|
+
...options
|
|
16552
|
+
});
|
|
15869
16553
|
if (result) {
|
|
15870
16554
|
const logger2 = log_exports.getLogger();
|
|
15871
16555
|
logger2.log("\nVersion: ", result.version);
|
|
@@ -15909,7 +16593,10 @@ For inquiries, please contact hello@helloao.org.`
|
|
|
15909
16593
|
"--s3-region <region>",
|
|
15910
16594
|
"The AWS region to use for uploading to S3."
|
|
15911
16595
|
).option("--pretty", "Whether to generate pretty-printed JSON files.").action(async (input5, dest, options) => {
|
|
15912
|
-
await generateTranslationFiles(input5, dest,
|
|
16596
|
+
await generateTranslationFiles(input5, dest, {
|
|
16597
|
+
...program.opts(),
|
|
16598
|
+
...options
|
|
16599
|
+
});
|
|
15913
16600
|
});
|
|
15914
16601
|
program.command("generate-translations-files <input> <dir>").description("Generates API files from the given input translations.").option(
|
|
15915
16602
|
"--batch-size <size>",
|
|
@@ -15943,7 +16630,10 @@ For inquiries, please contact hello@helloao.org.`
|
|
|
15943
16630
|
"--s3-region <region>",
|
|
15944
16631
|
"The AWS region to use for uploading to S3."
|
|
15945
16632
|
).option("--pretty", "Whether to generate pretty-printed JSON files.").action(async (input5, dest, options) => {
|
|
15946
|
-
await generateTranslationsFiles(input5, dest,
|
|
16633
|
+
await generateTranslationsFiles(input5, dest, {
|
|
16634
|
+
...program.opts(),
|
|
16635
|
+
...options
|
|
16636
|
+
});
|
|
15947
16637
|
});
|
|
15948
16638
|
program.command("upload-api-files").argument("<dest>", "The destination to upload the API files to.").description(
|
|
15949
16639
|
"Uploads API files to the specified destination. For S3, use the format s3://bucket-name/path/to/folder."
|
|
@@ -15985,7 +16675,7 @@ For inquiries, please contact hello@helloao.org.`
|
|
|
15985
16675
|
"--verbose",
|
|
15986
16676
|
"Whether to output verbose information during the upload."
|
|
15987
16677
|
).action(async (dest, options) => {
|
|
15988
|
-
const db =
|
|
16678
|
+
const db = getPrismaDb(program.opts().db);
|
|
15989
16679
|
try {
|
|
15990
16680
|
await uploadApiFilesFromDatabase(db, dest, options);
|
|
15991
16681
|
} finally {
|
|
@@ -16010,7 +16700,10 @@ For inquiries, please contact hello@helloao.org.`
|
|
|
16010
16700
|
overwrite: options.overwrite
|
|
16011
16701
|
}
|
|
16012
16702
|
};
|
|
16013
|
-
await sourceTranslations(dir, translations,
|
|
16703
|
+
await sourceTranslations(dir, translations, {
|
|
16704
|
+
...program.opts(),
|
|
16705
|
+
...sourceOptions
|
|
16706
|
+
});
|
|
16014
16707
|
});
|
|
16015
16708
|
program.command("list-ebible-translations [search]").description(
|
|
16016
16709
|
"List available eBible translations. Optionally filter by search term."
|
|
@@ -16023,7 +16716,10 @@ For inquiries, please contact hello@helloao.org.`
|
|
|
16023
16716
|
"-a, --all",
|
|
16024
16717
|
"Fetch all translations. If omitted, only undownloaded translations will be fetched."
|
|
16025
16718
|
).action(async (dir, translations, options) => {
|
|
16026
|
-
await fetchAudio(dir, translations,
|
|
16719
|
+
await fetchAudio(dir, translations, {
|
|
16720
|
+
...program.opts(),
|
|
16721
|
+
...options
|
|
16722
|
+
});
|
|
16027
16723
|
});
|
|
16028
16724
|
program.command("fetch-bible-metadata <dir>").description(
|
|
16029
16725
|
"Fetches the Theographic bible metadata and places it in the given directory."
|