@helloao/tools 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generation/api.cjs +727 -2
- package/dist/cjs/generation/api.cjs.map +2 -2
- package/dist/cjs/generation/audio.cjs +52 -5
- package/dist/cjs/generation/audio.cjs.map +2 -2
- package/dist/cjs/generation/book-order.cjs +1 -1
- package/dist/cjs/generation/book-order.cjs.map +2 -2
- package/dist/cjs/generation/common-types.cjs +651 -0
- package/dist/cjs/generation/common-types.cjs.map +2 -2
- package/dist/cjs/generation/dataset.cjs +31 -8
- package/dist/cjs/generation/dataset.cjs.map +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/log.cjs.map +1 -1
- package/dist/cjs/parser/codex-parser.cjs.map +1 -1
- package/dist/cjs/parser/commentary-csv-parser.cjs.map +1 -1
- package/dist/cjs/parser/iterators.cjs.map +1 -1
- package/dist/cjs/parser/lockman-parser.cjs +334 -0
- package/dist/cjs/parser/lockman-parser.cjs.map +7 -0
- package/dist/cjs/parser/tyndale-xml-parser.cjs.map +1 -1
- package/dist/cjs/parser/types.cjs.map +1 -1
- package/dist/cjs/parser/usfm-parser.cjs.map +1 -1
- package/dist/cjs/parser/usx-parser.cjs +24 -7
- package/dist/cjs/parser/usx-parser.cjs.map +2 -2
- package/dist/cjs/utils.cjs +152 -0
- package/dist/cjs/utils.cjs.map +3 -3
- package/dist/esm/generation/api.js +696 -2
- package/dist/esm/generation/api.js.map +2 -2
- package/dist/esm/generation/audio.js +46 -3
- package/dist/esm/generation/audio.js.map +2 -2
- package/dist/esm/generation/book-order.js +1 -1
- package/dist/esm/generation/book-order.js.map +2 -2
- package/dist/esm/generation/common-types.js +590 -0
- package/dist/esm/generation/common-types.js.map +3 -3
- package/dist/esm/generation/dataset.js +29 -8
- package/dist/esm/generation/dataset.js.map +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/log.js.map +1 -1
- package/dist/esm/parser/codex-parser.js.map +1 -1
- package/dist/esm/parser/commentary-csv-parser.js.map +1 -1
- package/dist/esm/parser/iterators.js.map +1 -1
- package/dist/esm/parser/lockman-parser.js +306 -0
- package/dist/esm/parser/lockman-parser.js.map +7 -0
- package/dist/esm/parser/tyndale-xml-parser.js.map +1 -1
- package/dist/esm/parser/usfm-parser.js.map +1 -1
- package/dist/esm/parser/usx-parser.js +24 -7
- package/dist/esm/parser/usx-parser.js.map +2 -2
- package/dist/esm/utils.js +138 -0
- package/dist/esm/utils.js.map +2 -2
- package/dist/types/generation/api.d.ts +2515 -470
- package/dist/types/generation/audio.d.ts +5 -0
- package/dist/types/generation/common-types.d.ts +1222 -413
- package/dist/types/generation/dataset.d.ts +1 -0
- package/dist/types/parser/codex-parser.d.ts +18 -138
- package/dist/types/parser/lockman-parser.d.ts +14 -0
- package/dist/types/parser/types.d.ts +4 -0
- package/dist/types/parser/usx-parser.d.ts +2 -2
- package/dist/types/utils.d.ts +223 -18
- package/package.json +5 -3
|
@@ -18,6 +18,27 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var api_exports = {};
|
|
20
20
|
__export(api_exports, {
|
|
21
|
+
ApiAvailableCommentariesSchema: () => ApiAvailableCommentariesSchema,
|
|
22
|
+
ApiAvailableDatasetsSchema: () => ApiAvailableDatasetsSchema,
|
|
23
|
+
ApiAvailableTranslationsSchema: () => ApiAvailableTranslationsSchema,
|
|
24
|
+
ApiCommentaryBookChapterSchema: () => ApiCommentaryBookChapterSchema,
|
|
25
|
+
ApiCommentaryBookSchema: () => ApiCommentaryBookSchema,
|
|
26
|
+
ApiCommentaryBooksSchema: () => ApiCommentaryBooksSchema,
|
|
27
|
+
ApiCommentaryProfileContentSchema: () => ApiCommentaryProfileContentSchema,
|
|
28
|
+
ApiCommentaryProfileSchema: () => ApiCommentaryProfileSchema,
|
|
29
|
+
ApiCommentaryProfilesSchema: () => ApiCommentaryProfilesSchema,
|
|
30
|
+
ApiCommentarySchema: () => ApiCommentarySchema,
|
|
31
|
+
ApiDatasetBookChapterSchema: () => ApiDatasetBookChapterSchema,
|
|
32
|
+
ApiDatasetBookSchema: () => ApiDatasetBookSchema,
|
|
33
|
+
ApiDatasetBooksSchema: () => ApiDatasetBooksSchema,
|
|
34
|
+
ApiDatasetSchema: () => ApiDatasetSchema,
|
|
35
|
+
ApiTranslationBookChapterAudioSchema: () => ApiTranslationBookChapterAudioSchema,
|
|
36
|
+
ApiTranslationBookChapterSchema: () => ApiTranslationBookChapterSchema,
|
|
37
|
+
ApiTranslationBookSchema: () => ApiTranslationBookSchema,
|
|
38
|
+
ApiTranslationBooksSchema: () => ApiTranslationBooksSchema,
|
|
39
|
+
ApiTranslationCompleteBookSchema: () => ApiTranslationCompleteBookSchema,
|
|
40
|
+
ApiTranslationCompleteSchema: () => ApiTranslationCompleteSchema,
|
|
41
|
+
ApiTranslationSchema: () => ApiTranslationSchema,
|
|
21
42
|
bookChapterApiLink: () => bookChapterApiLink,
|
|
22
43
|
bookChapterAudioApiLink: () => bookChapterAudioApiLink,
|
|
23
44
|
bookCommentaryChapterApiLink: () => bookCommentaryChapterApiLink,
|
|
@@ -36,6 +57,689 @@ __export(api_exports, {
|
|
|
36
57
|
replaceSpacesWithUnderscores: () => replaceSpacesWithUnderscores
|
|
37
58
|
});
|
|
38
59
|
module.exports = __toCommonJS(api_exports);
|
|
60
|
+
var import_zod = require("zod");
|
|
61
|
+
var import_common_types = require("./common-types.js");
|
|
62
|
+
var import_zod_openapi = require("zod-openapi");
|
|
63
|
+
const ApiAvailableTranslationsSchema = import_zod.z.object({
|
|
64
|
+
/**
|
|
65
|
+
* The list of translations.
|
|
66
|
+
*/
|
|
67
|
+
translations: import_zod.z.array(import_zod.z.lazy(() => ApiTranslationSchema)).meta({
|
|
68
|
+
description: "The list of translations that are available in the API."
|
|
69
|
+
})
|
|
70
|
+
}).meta({
|
|
71
|
+
id: "ApiAvailableTranslations",
|
|
72
|
+
description: "The list of available translations. Maps to the /api/available-translations.json endpoint."
|
|
73
|
+
});
|
|
74
|
+
const ApiAvailableCommentariesSchema = import_zod.z.object({
|
|
75
|
+
/**
|
|
76
|
+
* The list of commentaries.
|
|
77
|
+
*/
|
|
78
|
+
commentaries: import_zod.z.array(import_zod.z.lazy(() => ApiCommentarySchema)).meta({
|
|
79
|
+
description: "The list of commentaries that are available in the API."
|
|
80
|
+
})
|
|
81
|
+
}).meta({
|
|
82
|
+
id: "ApiAvailableCommentaries",
|
|
83
|
+
description: "The list of available commentaries. Maps to the /api/available-commentaries.json endpoint."
|
|
84
|
+
});
|
|
85
|
+
const ApiAvailableDatasetsSchema = import_zod.z.object({
|
|
86
|
+
datasets: import_zod.z.array(import_zod.z.lazy(() => ApiDatasetSchema)).meta({
|
|
87
|
+
description: "The list of datasets that are available in the API."
|
|
88
|
+
})
|
|
89
|
+
}).meta({
|
|
90
|
+
id: "ApiAvailableDatasets",
|
|
91
|
+
description: "The list of available datasets. Maps to the /api/available-datasets.json endpoint."
|
|
92
|
+
});
|
|
93
|
+
const ApiDatasetSchema = import_common_types.DatasetSchema.extend({
|
|
94
|
+
/**
|
|
95
|
+
* The API link for the list of books for this dataset.
|
|
96
|
+
*/
|
|
97
|
+
listOfBooksApiLink: import_zod.z.string().meta({
|
|
98
|
+
description: "The API link for the list of books for this dataset. Relative to the API origin."
|
|
99
|
+
}),
|
|
100
|
+
/**
|
|
101
|
+
* The available list of formats.
|
|
102
|
+
*/
|
|
103
|
+
availableFormats: import_zod.z.array(import_zod.z.literal("json")),
|
|
104
|
+
/**
|
|
105
|
+
* The number of books that are contained in this dataset.
|
|
106
|
+
*/
|
|
107
|
+
numberOfBooks: import_zod.z.number().meta({
|
|
108
|
+
description: "The number of books that are contained in this dataset."
|
|
109
|
+
}),
|
|
110
|
+
/**
|
|
111
|
+
* The total number of chapters that are contained in this dataset.
|
|
112
|
+
*/
|
|
113
|
+
totalNumberOfChapters: import_zod.z.number().meta({
|
|
114
|
+
description: "The total number of chapters that are contained in this dataset."
|
|
115
|
+
}),
|
|
116
|
+
/**
|
|
117
|
+
* The total number of verses that are contained in this dataset.
|
|
118
|
+
*/
|
|
119
|
+
totalNumberOfVerses: import_zod.z.number().meta({
|
|
120
|
+
description: "The total number of verses that are contained in this dataset."
|
|
121
|
+
}),
|
|
122
|
+
/**
|
|
123
|
+
* The total number of references that are contained in this dataset.
|
|
124
|
+
*/
|
|
125
|
+
totalNumberOfReferences: import_zod.z.number().meta({
|
|
126
|
+
description: "The total number of references that are contained in this dataset."
|
|
127
|
+
}),
|
|
128
|
+
/**
|
|
129
|
+
* Gets the name of the language that the commentary is in.
|
|
130
|
+
* Null or undefined if the name of the language is not known.
|
|
131
|
+
*/
|
|
132
|
+
languageName: import_zod.z.string().optional().meta({
|
|
133
|
+
description: "Gets the name of the language that the dataset is in. Null or undefined if the name of the language is not known."
|
|
134
|
+
}),
|
|
135
|
+
/**
|
|
136
|
+
* Gets the name of the language in English.
|
|
137
|
+
* Null or undefined if the language doesn't have an english name.
|
|
138
|
+
*/
|
|
139
|
+
languageEnglishName: import_zod.z.string().optional().meta({
|
|
140
|
+
description: "Gets the name of the language in English. Null or undefined if the language doesn't have an english name."
|
|
141
|
+
})
|
|
142
|
+
}).meta({
|
|
143
|
+
id: "ApiDataset",
|
|
144
|
+
description: "Defines a dataset that is used in the API."
|
|
145
|
+
});
|
|
146
|
+
const ApiTranslationSchema = import_common_types.TranslationSchema.extend({
|
|
147
|
+
/**
|
|
148
|
+
* The API link for the list of available books for this translation.
|
|
149
|
+
*/
|
|
150
|
+
listOfBooksApiLink: import_zod.z.string().meta({
|
|
151
|
+
description: "The API link for the list of books for this translation. Relative to the API origin."
|
|
152
|
+
}),
|
|
153
|
+
/**
|
|
154
|
+
* The available list of formats.
|
|
155
|
+
*/
|
|
156
|
+
availableFormats: import_zod.z.array(import_zod.z.enum(["json", "usfm"])),
|
|
157
|
+
/**
|
|
158
|
+
* The number of books that are contained in this translation.
|
|
159
|
+
*
|
|
160
|
+
* Complete translations should have the same number of books as the Bible (66).
|
|
161
|
+
*/
|
|
162
|
+
numberOfBooks: import_zod.z.number().meta({
|
|
163
|
+
description: "The number of books that are contained in this translation. Complete translations should have the same number of books as the Bible (66)."
|
|
164
|
+
}),
|
|
165
|
+
/**
|
|
166
|
+
* The total number of chapters that are contained in this translation.
|
|
167
|
+
*
|
|
168
|
+
* Complete translations should have the same number of chapters as the Bible (1,189).
|
|
169
|
+
*/
|
|
170
|
+
totalNumberOfChapters: import_zod.z.number().meta({
|
|
171
|
+
description: "The total number of chapters that are contained in this translation. Complete translations should have the same number of chapters as the Bible (1,189)."
|
|
172
|
+
}),
|
|
173
|
+
/**
|
|
174
|
+
* The total number of verses that are contained in this translation.
|
|
175
|
+
*
|
|
176
|
+
* Complete translations should have the same number of verses as the Bible (around 31,102 - some translations exclude verses based on the aparent likelyhood of existing in the original source texts).
|
|
177
|
+
*/
|
|
178
|
+
totalNumberOfVerses: import_zod.z.number().meta({
|
|
179
|
+
description: "The total number of verses that are contained in this translation. Complete translations should have the same number of verses as the Bible (around 31,102 - some translations exclude verses based on the aparent likelyhood of existing in the original source texts)."
|
|
180
|
+
}),
|
|
181
|
+
/**
|
|
182
|
+
* The total number of apocryphal books that are contained in this translation.
|
|
183
|
+
*/
|
|
184
|
+
numberOfApocryphalBooks: import_zod.z.number().optional().meta({
|
|
185
|
+
description: "The total number of apocryphal books that are contained in this translation."
|
|
186
|
+
}),
|
|
187
|
+
/**
|
|
188
|
+
* The total number of apocryphal chapters that are contained in this translation.
|
|
189
|
+
*/
|
|
190
|
+
totalNumberOfApocryphalChapters: import_zod.z.number().optional().meta({
|
|
191
|
+
description: "The total number of apocryphal chapters that are contained in this translation."
|
|
192
|
+
}),
|
|
193
|
+
/**
|
|
194
|
+
* The total number of apocryphal verses that are contained in this translation.
|
|
195
|
+
*/
|
|
196
|
+
totalNumberOfApocryphalVerses: import_zod.z.number().optional().meta({
|
|
197
|
+
description: "The total number of apocryphal verses that are contained in this translation."
|
|
198
|
+
}),
|
|
199
|
+
/**
|
|
200
|
+
* Gets the name of the language that the translation is in.
|
|
201
|
+
* Null or undefined if the name of the language is not known.
|
|
202
|
+
*/
|
|
203
|
+
languageName: import_zod.z.string().optional().meta({
|
|
204
|
+
description: "Gets the name of the language that the translation is in. Null or undefined if the name of the language is not known."
|
|
205
|
+
}),
|
|
206
|
+
/**
|
|
207
|
+
* Gets the name of the language in English.
|
|
208
|
+
* Null or undefined if the language doesn't have an english name.
|
|
209
|
+
*/
|
|
210
|
+
languageEnglishName: import_zod.z.string().optional().meta({
|
|
211
|
+
description: "Gets the name of the language in English. Null or undefined if the language doesn't have an english name."
|
|
212
|
+
}),
|
|
213
|
+
/**
|
|
214
|
+
* The API link for downloading the complete translation as a single JSON file.
|
|
215
|
+
*
|
|
216
|
+
* Undefined if complete translation files are not available.
|
|
217
|
+
*/
|
|
218
|
+
completeTranslationApiLink: import_zod.z.string().optional().meta({
|
|
219
|
+
description: "The API link for downloading the complete translation as a single JSON file. Relative to the API origin. Undefined if complete translation files are not available."
|
|
220
|
+
})
|
|
221
|
+
}).meta({
|
|
222
|
+
id: "ApiTranslation",
|
|
223
|
+
description: "Defines a translation that is used in the API."
|
|
224
|
+
});
|
|
225
|
+
const ApiTranslationCompleteSchema = import_zod.z.object({
|
|
226
|
+
/**
|
|
227
|
+
* The translation metadata.
|
|
228
|
+
*/
|
|
229
|
+
translation: import_zod.z.lazy(() => ApiTranslationSchema).meta({
|
|
230
|
+
description: "The translation metadata."
|
|
231
|
+
}),
|
|
232
|
+
/**
|
|
233
|
+
* The complete list of books with all their chapters.
|
|
234
|
+
*/
|
|
235
|
+
books: import_zod.z.array(import_zod.z.lazy(() => ApiTranslationCompleteBookSchema)).meta({
|
|
236
|
+
description: "The complete list of books with all their chapters."
|
|
237
|
+
})
|
|
238
|
+
}).meta({
|
|
239
|
+
id: "ApiTranslationComplete",
|
|
240
|
+
description: "Defines the complete translation download data. Maps to the /api/:translationId/complete.json endpoint."
|
|
241
|
+
});
|
|
242
|
+
const ApiTranslationCompleteBookSchema = import_common_types.TranslationBookSchema.extend({
|
|
243
|
+
/**
|
|
244
|
+
* The number of chapters in the book.
|
|
245
|
+
*/
|
|
246
|
+
numberOfChapters: import_zod.z.number().meta({
|
|
247
|
+
description: "The number of chapters in the book."
|
|
248
|
+
}),
|
|
249
|
+
/**
|
|
250
|
+
* The total number of verses in the book.
|
|
251
|
+
*/
|
|
252
|
+
totalNumberOfVerses: import_zod.z.number().meta({
|
|
253
|
+
description: "The total number of verses in the book."
|
|
254
|
+
}),
|
|
255
|
+
/**
|
|
256
|
+
* The complete list of chapters with all content.
|
|
257
|
+
*/
|
|
258
|
+
chapters: import_zod.z.array(import_common_types.TranslationBookChapterSchema).meta({
|
|
259
|
+
description: "The complete list of chapters with all content."
|
|
260
|
+
})
|
|
261
|
+
}).meta({
|
|
262
|
+
id: "ApiTranslationCompleteBook",
|
|
263
|
+
description: "A book in the complete translation download."
|
|
264
|
+
});
|
|
265
|
+
const ApiCommentarySchema = import_common_types.CommentarySchema.extend({
|
|
266
|
+
/**
|
|
267
|
+
* The API link for the list of available books for this translation.
|
|
268
|
+
*/
|
|
269
|
+
listOfBooksApiLink: import_zod.z.string().meta({
|
|
270
|
+
description: "The API link for the list of books for this commentary. Relative to the API origin."
|
|
271
|
+
}),
|
|
272
|
+
/**
|
|
273
|
+
* The API link for the list of available profiles for this commentary.
|
|
274
|
+
*/
|
|
275
|
+
listOfProfilesApiLink: import_zod.z.string().meta({
|
|
276
|
+
description: "The API link for the list of profiles for this commentary. Relative to the API origin."
|
|
277
|
+
}),
|
|
278
|
+
/**
|
|
279
|
+
* The available list of formats.
|
|
280
|
+
*/
|
|
281
|
+
availableFormats: import_zod.z.array(import_zod.z.enum(["json", "usfm"])),
|
|
282
|
+
/**
|
|
283
|
+
* The number of books that are contained in this commentary.
|
|
284
|
+
*
|
|
285
|
+
* Complete commentaries should have the same number of books as the Bible (66).
|
|
286
|
+
*/
|
|
287
|
+
numberOfBooks: import_zod.z.number().meta({
|
|
288
|
+
description: "The number of books that are contained in this commentary. Complete commentaries should have the same number of books as the Bible (66)."
|
|
289
|
+
}),
|
|
290
|
+
/**
|
|
291
|
+
* The total number of chapters that are contained in this translation.
|
|
292
|
+
*
|
|
293
|
+
* Complete commentaries should have the same number of chapters as the Bible (1,189).
|
|
294
|
+
*/
|
|
295
|
+
totalNumberOfChapters: import_zod.z.number().meta({
|
|
296
|
+
description: "The total number of chapters that are contained in this commentary. Complete commentaries should have the same number of chapters as the Bible (1,189)."
|
|
297
|
+
}),
|
|
298
|
+
/**
|
|
299
|
+
* The total number of verses that are contained in this commentary.
|
|
300
|
+
*
|
|
301
|
+
* Complete commentaries should have the same number of verses as the Bible (around 31,102 - some commentaries exclude verses based on the aparent likelyhood of existing in the original source texts).
|
|
302
|
+
*/
|
|
303
|
+
totalNumberOfVerses: import_zod.z.number().meta({
|
|
304
|
+
description: "The total number of verses that are contained in this commentary. Complete commentaries should have the same number of verses as the Bible (around 31,102 - some commentaries exclude verses based on the aparent likelyhood of existing in the original source texts)."
|
|
305
|
+
}),
|
|
306
|
+
/**
|
|
307
|
+
* The total number of profiles that are contained in this commentary.
|
|
308
|
+
*
|
|
309
|
+
* Profiles are used to provide additional information about people and people groups that are mentioned in the Bible.
|
|
310
|
+
*/
|
|
311
|
+
totalNumberOfProfiles: import_zod.z.number().meta({
|
|
312
|
+
description: "The total number of profiles that are contained in this commentary. Profiles are used to provide additional information about people and people groups that are mentioned in the Bible."
|
|
313
|
+
}),
|
|
314
|
+
/**
|
|
315
|
+
* Gets the name of the language that the commentary is in.
|
|
316
|
+
* Null or undefined if the name of the language is not known.
|
|
317
|
+
*/
|
|
318
|
+
languageName: import_zod.z.string().optional().meta({
|
|
319
|
+
description: "Gets the name of the language that the commentary is in. Null or undefined if the name of the language is not known."
|
|
320
|
+
}),
|
|
321
|
+
/**
|
|
322
|
+
* Gets the name of the language in English.
|
|
323
|
+
* Null or undefined if the language doesn't have an english name.
|
|
324
|
+
*/
|
|
325
|
+
languageEnglishName: import_zod.z.string().optional().meta({
|
|
326
|
+
description: "Gets the name of the language in English. Null or undefined if the language doesn't have an english name."
|
|
327
|
+
})
|
|
328
|
+
}).meta({
|
|
329
|
+
id: "ApiCommentary",
|
|
330
|
+
description: "Defines a commentary that is used in the API."
|
|
331
|
+
});
|
|
332
|
+
const ApiTranslationBooksSchema = import_zod.z.object({
|
|
333
|
+
/**
|
|
334
|
+
* The translation information for the books.
|
|
335
|
+
*/
|
|
336
|
+
translation: import_zod.z.lazy(() => ApiTranslationSchema).meta({
|
|
337
|
+
description: "The translation information for the books."
|
|
338
|
+
}),
|
|
339
|
+
/**
|
|
340
|
+
* The list of books that are available for the translation.
|
|
341
|
+
*/
|
|
342
|
+
books: import_zod.z.array(import_zod.z.lazy(() => ApiTranslationBookSchema)).meta({
|
|
343
|
+
description: "The list of books that are available for the translation."
|
|
344
|
+
})
|
|
345
|
+
}).meta({
|
|
346
|
+
id: "ApiTranslationBooks",
|
|
347
|
+
description: "Defines an interface that contains information about the books that are available for a translation."
|
|
348
|
+
});
|
|
349
|
+
const ApiCommentaryBooksSchema = import_zod.z.object({
|
|
350
|
+
/**
|
|
351
|
+
* The commentary information for the books.
|
|
352
|
+
*/
|
|
353
|
+
commentary: import_zod.z.lazy(() => ApiCommentarySchema).meta({
|
|
354
|
+
description: "The commentary information for the books."
|
|
355
|
+
}),
|
|
356
|
+
/**
|
|
357
|
+
* The list of books that are available for the commentary.
|
|
358
|
+
*/
|
|
359
|
+
books: import_zod.z.array(import_zod.z.lazy(() => ApiCommentaryBookSchema)).meta({
|
|
360
|
+
description: "The list of books that are available for the commentary."
|
|
361
|
+
})
|
|
362
|
+
}).meta({
|
|
363
|
+
id: "ApiCommentaryBooks",
|
|
364
|
+
description: "Defines an interface that contains information about the books that are available for a commentary."
|
|
365
|
+
});
|
|
366
|
+
const ApiDatasetBooksSchema = import_zod.z.object({
|
|
367
|
+
/**
|
|
368
|
+
* The dataset information for the books.
|
|
369
|
+
*/
|
|
370
|
+
dataset: import_zod.z.lazy(() => ApiDatasetSchema).meta({
|
|
371
|
+
description: "The dataset information for the books."
|
|
372
|
+
}),
|
|
373
|
+
/**
|
|
374
|
+
* The list of books that are available for the dataset.
|
|
375
|
+
*/
|
|
376
|
+
books: import_zod.z.array(import_zod.z.lazy(() => ApiDatasetBookSchema)).meta({
|
|
377
|
+
description: "The list of books that are available for the dataset."
|
|
378
|
+
})
|
|
379
|
+
}).meta({
|
|
380
|
+
id: "ApiDatasetBooks",
|
|
381
|
+
description: "Defines an interface that contains information about the books that are available for a dataset."
|
|
382
|
+
});
|
|
383
|
+
const ApiCommentaryProfilesSchema = import_zod.z.object({
|
|
384
|
+
/**
|
|
385
|
+
* The commentary information for the books.
|
|
386
|
+
*/
|
|
387
|
+
commentary: import_zod.z.lazy(() => ApiCommentarySchema).meta({
|
|
388
|
+
description: "The commentary information for the profiles."
|
|
389
|
+
}),
|
|
390
|
+
/**
|
|
391
|
+
* The list of profiles that are available for the commentary.
|
|
392
|
+
*/
|
|
393
|
+
profiles: import_zod.z.array(import_zod.z.lazy(() => ApiCommentaryProfileSchema)).meta({
|
|
394
|
+
description: "The list of profiles that are available for the commentary."
|
|
395
|
+
})
|
|
396
|
+
}).meta({
|
|
397
|
+
id: "ApiCommentaryProfiles",
|
|
398
|
+
description: "Defines an interface that contains information about the profiles that are available for a commentary."
|
|
399
|
+
});
|
|
400
|
+
const ApiCommentaryProfileSchema = import_common_types.CommentaryProfileSchema.extend({
|
|
401
|
+
/**
|
|
402
|
+
* The link to this profile.
|
|
403
|
+
*/
|
|
404
|
+
thisProfileLink: import_zod.z.string().meta({
|
|
405
|
+
description: "The API link for this profile. Relative to the API origin."
|
|
406
|
+
}),
|
|
407
|
+
/**
|
|
408
|
+
* The link to the chapter that this profile references in the commentary.
|
|
409
|
+
*/
|
|
410
|
+
referenceChapterLink: import_zod.z.string().nullable().meta({
|
|
411
|
+
description: "The API link to the chapter that this profile references in the commentary. Relative to the API origin. Null if the profile doesn't reference a specific chapter."
|
|
412
|
+
})
|
|
413
|
+
}).meta({
|
|
414
|
+
id: "ApiCommentaryProfile",
|
|
415
|
+
description: "Defines an interface that contains information about a profile."
|
|
416
|
+
});
|
|
417
|
+
const ApiTranslationBookSchema = import_common_types.TranslationBookSchema.extend({
|
|
418
|
+
/**
|
|
419
|
+
* The number of the first chapter in the book.
|
|
420
|
+
*/
|
|
421
|
+
firstChapterNumber: import_zod.z.number().meta({
|
|
422
|
+
description: "The number of the first chapter in the book."
|
|
423
|
+
}),
|
|
424
|
+
/**
|
|
425
|
+
* The link to the first chapter of the book.
|
|
426
|
+
*/
|
|
427
|
+
firstChapterApiLink: import_zod.z.string().meta({
|
|
428
|
+
description: "The link to the first chapter of the book."
|
|
429
|
+
}),
|
|
430
|
+
/**
|
|
431
|
+
* The number of the last chapter in the book.
|
|
432
|
+
*/
|
|
433
|
+
lastChapterNumber: import_zod.z.number().meta({
|
|
434
|
+
description: "The number of the last chapter in the book."
|
|
435
|
+
}),
|
|
436
|
+
/**
|
|
437
|
+
* The link to the last chapter of the book.
|
|
438
|
+
*/
|
|
439
|
+
lastChapterApiLink: import_zod.z.string().meta({
|
|
440
|
+
description: "The link to the last chapter of the book."
|
|
441
|
+
}),
|
|
442
|
+
/**
|
|
443
|
+
* The number of chapters that the book contains.
|
|
444
|
+
*/
|
|
445
|
+
numberOfChapters: import_zod.z.number().meta({
|
|
446
|
+
description: "The number of chapters that the book contains."
|
|
447
|
+
}),
|
|
448
|
+
/**
|
|
449
|
+
* The number of verses that the book contains.
|
|
450
|
+
*/
|
|
451
|
+
totalNumberOfVerses: import_zod.z.number().meta({
|
|
452
|
+
description: "The number of verses that the book contains."
|
|
453
|
+
})
|
|
454
|
+
}).meta({
|
|
455
|
+
id: "ApiTranslationBook",
|
|
456
|
+
description: "Defines a schema that contains information about a translation book."
|
|
457
|
+
});
|
|
458
|
+
const ApiCommentaryBookSchema = import_common_types.CommentaryBookSchema.extend({
|
|
459
|
+
/**
|
|
460
|
+
* The number of the first chapter in the book.
|
|
461
|
+
*
|
|
462
|
+
* Null if the comentary book has no chapters.
|
|
463
|
+
*/
|
|
464
|
+
firstChapterNumber: import_zod.z.number().nullable().meta({
|
|
465
|
+
description: "The number of the first chapter in the book. Null if the comentary book has no chapters."
|
|
466
|
+
}),
|
|
467
|
+
/**
|
|
468
|
+
* The link to the first chapter of the book.
|
|
469
|
+
*
|
|
470
|
+
* Null if the comentary book has no chapters.
|
|
471
|
+
*/
|
|
472
|
+
firstChapterApiLink: import_zod.z.string().nullable().meta({
|
|
473
|
+
description: "The link to the first chapter of the book. Null if the comentary book has no chapters."
|
|
474
|
+
}),
|
|
475
|
+
/**
|
|
476
|
+
* The number of the last chapter in the book.
|
|
477
|
+
*
|
|
478
|
+
* Null if the comentary book has no chapters.
|
|
479
|
+
*/
|
|
480
|
+
lastChapterNumber: import_zod.z.number().nullable().meta({
|
|
481
|
+
description: "The number of the last chapter in the book. Null if the comentary book has no chapters."
|
|
482
|
+
}),
|
|
483
|
+
/**
|
|
484
|
+
* The link to the last chapter of the book.
|
|
485
|
+
*
|
|
486
|
+
* Null if the comentary book has no chapters.
|
|
487
|
+
*/
|
|
488
|
+
lastChapterApiLink: import_zod.z.string().nullable().meta({
|
|
489
|
+
description: "The link to the last chapter of the book. Null if the comentary book has no chapters."
|
|
490
|
+
}),
|
|
491
|
+
/**
|
|
492
|
+
* The number of chapters that the book contains.
|
|
493
|
+
*/
|
|
494
|
+
numberOfChapters: import_zod.z.number().meta({
|
|
495
|
+
description: "The number of chapters that the book contains."
|
|
496
|
+
}),
|
|
497
|
+
/**
|
|
498
|
+
* The number of verses that the book contains.
|
|
499
|
+
*/
|
|
500
|
+
totalNumberOfVerses: import_zod.z.number().meta({
|
|
501
|
+
description: "The number of verses that the book contains."
|
|
502
|
+
})
|
|
503
|
+
}).meta({
|
|
504
|
+
id: "ApiCommentaryBook",
|
|
505
|
+
description: "Defines a schema that contains information about a commentary book."
|
|
506
|
+
});
|
|
507
|
+
const ApiDatasetBookSchema = import_common_types.DatasetBookSchema.extend({
|
|
508
|
+
/**
|
|
509
|
+
* The number of the first chapter in the book.
|
|
510
|
+
*/
|
|
511
|
+
firstChapterNumber: import_zod.z.number().meta({
|
|
512
|
+
description: "The number of the first chapter in the book."
|
|
513
|
+
}),
|
|
514
|
+
/**
|
|
515
|
+
* The link to the first chapter of the book.
|
|
516
|
+
*/
|
|
517
|
+
firstChapterApiLink: import_zod.z.string().meta({
|
|
518
|
+
description: "The link to the first chapter of the book."
|
|
519
|
+
}),
|
|
520
|
+
/**
|
|
521
|
+
* The number of the last chapter in the book.
|
|
522
|
+
*/
|
|
523
|
+
lastChapterNumber: import_zod.z.number().meta({
|
|
524
|
+
description: "The number of the last chapter in the book."
|
|
525
|
+
}),
|
|
526
|
+
/**
|
|
527
|
+
* The link to the last chapter of the book.
|
|
528
|
+
*/
|
|
529
|
+
lastChapterApiLink: import_zod.z.string().meta({
|
|
530
|
+
description: "The link to the last chapter of the book."
|
|
531
|
+
}),
|
|
532
|
+
/**
|
|
533
|
+
* The number of chapters that the book contains.
|
|
534
|
+
*/
|
|
535
|
+
numberOfChapters: import_zod.z.number().meta({
|
|
536
|
+
description: "The number of chapters that the book contains."
|
|
537
|
+
}),
|
|
538
|
+
/**
|
|
539
|
+
* The number of verses that the book contains.
|
|
540
|
+
*/
|
|
541
|
+
totalNumberOfVerses: import_zod.z.number().meta({
|
|
542
|
+
description: "The number of verses that the book contains."
|
|
543
|
+
}),
|
|
544
|
+
/**
|
|
545
|
+
* The number of references that the book contains.
|
|
546
|
+
*/
|
|
547
|
+
totalNumberOfReferences: import_zod.z.number().meta({
|
|
548
|
+
description: "The number of references that the book contains."
|
|
549
|
+
})
|
|
550
|
+
}).meta({
|
|
551
|
+
id: "ApiDatasetBook",
|
|
552
|
+
description: "Defines a schema that contains information about a book in a dataset."
|
|
553
|
+
});
|
|
554
|
+
const ApiTranslationBookChapterSchema = import_common_types.TranslationBookChapterSchema.extend({
|
|
555
|
+
/**
|
|
556
|
+
* The translation information for the book chapter.
|
|
557
|
+
*/
|
|
558
|
+
translation: import_zod.z.lazy(() => ApiTranslationSchema).meta({
|
|
559
|
+
description: "The translation information for the book chapter."
|
|
560
|
+
}),
|
|
561
|
+
/**
|
|
562
|
+
* The book information for the book chapter.
|
|
563
|
+
*/
|
|
564
|
+
book: import_zod.z.lazy(() => ApiTranslationBookSchema).meta({
|
|
565
|
+
description: "The book information for the book chapter."
|
|
566
|
+
}),
|
|
567
|
+
/**
|
|
568
|
+
* The link to this chapter.
|
|
569
|
+
*/
|
|
570
|
+
thisChapterLink: import_zod.z.string().meta({
|
|
571
|
+
description: "The API link for this chapter. Relative to the API origin."
|
|
572
|
+
}),
|
|
573
|
+
/**
|
|
574
|
+
* The link to the next chapter.
|
|
575
|
+
* Null if this is the last chapter in the translation.
|
|
576
|
+
*/
|
|
577
|
+
nextChapterApiLink: import_zod.z.string().nullable().meta({
|
|
578
|
+
description: "The API link to the next chapter. Relative to the API origin. Null if this is the last chapter in the translation."
|
|
579
|
+
}),
|
|
580
|
+
/**
|
|
581
|
+
* The links to the audio versions for the next chapter.
|
|
582
|
+
* Null if this is the last chapter in the translation.
|
|
583
|
+
*/
|
|
584
|
+
nextChapterAudioLinks: import_zod.z.record(import_zod.z.string(), import_zod.z.string()).nullable().meta({
|
|
585
|
+
description: "The links to the audio versions for the next chapter. Relative to the API origin. Null if this is the last chapter in the translation."
|
|
586
|
+
}),
|
|
587
|
+
/**
|
|
588
|
+
* The link to the previous chapter.
|
|
589
|
+
* Null if this is the first chapter in the translation.
|
|
590
|
+
*/
|
|
591
|
+
previousChapterApiLink: import_zod.z.string().nullable().meta({
|
|
592
|
+
description: "The API link to the previous chapter. Relative to the API origin. Null if this is the first chapter in the translation."
|
|
593
|
+
}),
|
|
594
|
+
/**
|
|
595
|
+
* The links to the audio versions for the previous chapter.
|
|
596
|
+
* Null if this is the first chapter in the translation.
|
|
597
|
+
*/
|
|
598
|
+
previousChapterAudioLinks: import_zod.z.record(import_zod.z.string(), import_zod.z.string()).nullable().meta({
|
|
599
|
+
description: "The links to the audio versions for the previous chapter. Relative to the API origin. Null if this is the first chapter in the translation."
|
|
600
|
+
}),
|
|
601
|
+
/**
|
|
602
|
+
* The number of verses that the chapter contains.
|
|
603
|
+
*/
|
|
604
|
+
numberOfVerses: import_zod.z.number().meta({
|
|
605
|
+
description: "The number of verses that the chapter contains."
|
|
606
|
+
})
|
|
607
|
+
}).meta({
|
|
608
|
+
id: "ApiTranslationBookChapter",
|
|
609
|
+
description: "Defines an interface that contains information about a book chapter in a translation."
|
|
610
|
+
});
|
|
611
|
+
const ApiCommentaryBookChapterSchema = import_common_types.CommentaryBookChapterSchema.extend({
|
|
612
|
+
/**
|
|
613
|
+
* The commentary information for the book chapter.
|
|
614
|
+
*/
|
|
615
|
+
commentary: import_zod.z.lazy(() => ApiCommentarySchema).meta({
|
|
616
|
+
description: "The commentary information for the book chapter."
|
|
617
|
+
}),
|
|
618
|
+
/**
|
|
619
|
+
* The book information for the book chapter.
|
|
620
|
+
*/
|
|
621
|
+
book: import_zod.z.lazy(() => ApiCommentaryBookSchema).meta({
|
|
622
|
+
description: "The book information for the book chapter."
|
|
623
|
+
}),
|
|
624
|
+
/**
|
|
625
|
+
* The link to this chapter.
|
|
626
|
+
*/
|
|
627
|
+
thisChapterLink: import_zod.z.string().meta({
|
|
628
|
+
description: "The API link for this chapter. Relative to the API origin."
|
|
629
|
+
}),
|
|
630
|
+
/**
|
|
631
|
+
* The link to the next chapter.
|
|
632
|
+
* Null if this is the last chapter in the translation.
|
|
633
|
+
*/
|
|
634
|
+
nextChapterApiLink: import_zod.z.string().nullable().meta({
|
|
635
|
+
description: "The API link to the next chapter. Relative to the API origin. Null if this is the last chapter in the commentary."
|
|
636
|
+
}),
|
|
637
|
+
/**
|
|
638
|
+
* The link to the previous chapter.
|
|
639
|
+
* Null if this is the first chapter in the translation.
|
|
640
|
+
*/
|
|
641
|
+
previousChapterApiLink: import_zod.z.string().nullable().meta({
|
|
642
|
+
description: "The API link to the previous chapter. Relative to the API origin. Null if this is the first chapter in the commentary."
|
|
643
|
+
}),
|
|
644
|
+
/**
|
|
645
|
+
* The number of verses that the chapter contains.
|
|
646
|
+
*/
|
|
647
|
+
numberOfVerses: import_zod.z.number().meta({
|
|
648
|
+
description: "The number of verses that the chapter contains."
|
|
649
|
+
})
|
|
650
|
+
}).meta({
|
|
651
|
+
id: "ApiCommentaryBookChapter",
|
|
652
|
+
description: "Defines a schema that contains information about a book chapter in a commentary."
|
|
653
|
+
});
|
|
654
|
+
const ApiDatasetBookChapterSchema = import_common_types.DatasetBookChapterSchema.extend({
|
|
655
|
+
/**
|
|
656
|
+
* The dataset information for the book chapter.
|
|
657
|
+
*/
|
|
658
|
+
dataset: import_zod.z.lazy(() => ApiDatasetSchema).meta({
|
|
659
|
+
description: "The dataset information for the book chapter."
|
|
660
|
+
}),
|
|
661
|
+
/**
|
|
662
|
+
* The book information for the book chapter.
|
|
663
|
+
*/
|
|
664
|
+
book: import_zod.z.lazy(() => ApiDatasetBookSchema).meta({
|
|
665
|
+
description: "The book information for the book chapter."
|
|
666
|
+
}),
|
|
667
|
+
/**
|
|
668
|
+
* The link to this chapter.
|
|
669
|
+
*/
|
|
670
|
+
thisChapterLink: import_zod.z.string().meta({
|
|
671
|
+
description: "The API link for this chapter. Relative to the API origin."
|
|
672
|
+
}),
|
|
673
|
+
/**
|
|
674
|
+
* The link to the next chapter.
|
|
675
|
+
* Null if this is the last chapter in the translation.
|
|
676
|
+
*/
|
|
677
|
+
nextChapterApiLink: import_zod.z.string().nullable().meta({
|
|
678
|
+
description: "The API link to the next chapter. Relative to the API origin. Null if this is the last chapter in the dataset."
|
|
679
|
+
}),
|
|
680
|
+
/**
|
|
681
|
+
* The link to the previous chapter.
|
|
682
|
+
* Null if this is the first chapter in the translation.
|
|
683
|
+
*/
|
|
684
|
+
previousChapterApiLink: import_zod.z.string().nullable().meta({
|
|
685
|
+
description: "The API link to the previous chapter. Relative to the API origin. Null if this is the first chapter in the dataset."
|
|
686
|
+
}),
|
|
687
|
+
/**
|
|
688
|
+
* The number of verses that the chapter contains.
|
|
689
|
+
*/
|
|
690
|
+
numberOfVerses: import_zod.z.number().meta({
|
|
691
|
+
description: "The number of verses that the chapter contains."
|
|
692
|
+
}),
|
|
693
|
+
/**
|
|
694
|
+
* The number of references that the chapter contains.
|
|
695
|
+
*/
|
|
696
|
+
numberOfReferences: import_zod.z.number().meta({
|
|
697
|
+
description: "The number of references that the chapter contains."
|
|
698
|
+
})
|
|
699
|
+
}).meta({
|
|
700
|
+
id: "ApiDatasetBookChapter",
|
|
701
|
+
description: "Defines a schema that contains information about a book chapter in a dataset."
|
|
702
|
+
});
|
|
703
|
+
const ApiTranslationBookChapterAudioSchema = import_zod.z.object({
|
|
704
|
+
/**
|
|
705
|
+
* The chapter that the audio is for.
|
|
706
|
+
*/
|
|
707
|
+
chapter: import_zod.z.lazy(() => ApiTranslationBookChapterSchema).meta({
|
|
708
|
+
description: "The chapter that the audio is for."
|
|
709
|
+
}),
|
|
710
|
+
/**
|
|
711
|
+
* The link that the audio should be placed at.
|
|
712
|
+
*/
|
|
713
|
+
link: import_zod.z.string().meta({
|
|
714
|
+
description: "The link that the audio should be placed at. Relative to the API origin."
|
|
715
|
+
}),
|
|
716
|
+
/**
|
|
717
|
+
* The original URL of the audio.
|
|
718
|
+
*/
|
|
719
|
+
originalUrl: import_zod.z.string().meta({
|
|
720
|
+
description: "The original URL of the audio."
|
|
721
|
+
})
|
|
722
|
+
});
|
|
723
|
+
const ApiCommentaryProfileContentSchema = import_zod.z.object({
|
|
724
|
+
/**
|
|
725
|
+
* The commentary information for the profile.
|
|
726
|
+
*/
|
|
727
|
+
commentary: import_zod.z.lazy(() => ApiCommentarySchema).meta({
|
|
728
|
+
description: "The commentary information for the profile."
|
|
729
|
+
}),
|
|
730
|
+
/**
|
|
731
|
+
* The information about the profile.
|
|
732
|
+
*/
|
|
733
|
+
profile: import_zod.z.lazy(() => ApiCommentaryProfileSchema).meta({
|
|
734
|
+
description: "The information about the profile."
|
|
735
|
+
}),
|
|
736
|
+
/**
|
|
737
|
+
* The content of the profile.
|
|
738
|
+
*/
|
|
739
|
+
content: import_zod.z.array(import_zod.z.string()).meta({
|
|
740
|
+
description: "The content of the profile. This is an array of strings, where each string is a paragraph of the profile content."
|
|
741
|
+
})
|
|
742
|
+
});
|
|
39
743
|
function generateApiForDataset(dataset, options = {}) {
|
|
40
744
|
const { useCommonName, pathPrefix } = options;
|
|
41
745
|
const apiPathPrefix = pathPrefix ? pathPrefix : "";
|
|
@@ -91,8 +795,8 @@ function generateApiForDataset(dataset, options = {}) {
|
|
|
91
795
|
};
|
|
92
796
|
let translationChapters = [];
|
|
93
797
|
for (let { chapters, ...book } of books) {
|
|
94
|
-
const firstChapterNumber = chapters[0]
|
|
95
|
-
const lastChapterNumber = chapters[chapters.length - 1]
|
|
798
|
+
const firstChapterNumber = chapters[0]?.chapter.number;
|
|
799
|
+
const lastChapterNumber = chapters[chapters.length - 1]?.chapter.number;
|
|
96
800
|
const apiBook = {
|
|
97
801
|
...book,
|
|
98
802
|
firstChapterNumber,
|
|
@@ -632,6 +1336,27 @@ function replaceSpacesWithUnderscores(str) {
|
|
|
632
1336
|
}
|
|
633
1337
|
// Annotate the CommonJS export names for ESM import in node:
|
|
634
1338
|
0 && (module.exports = {
|
|
1339
|
+
ApiAvailableCommentariesSchema,
|
|
1340
|
+
ApiAvailableDatasetsSchema,
|
|
1341
|
+
ApiAvailableTranslationsSchema,
|
|
1342
|
+
ApiCommentaryBookChapterSchema,
|
|
1343
|
+
ApiCommentaryBookSchema,
|
|
1344
|
+
ApiCommentaryBooksSchema,
|
|
1345
|
+
ApiCommentaryProfileContentSchema,
|
|
1346
|
+
ApiCommentaryProfileSchema,
|
|
1347
|
+
ApiCommentaryProfilesSchema,
|
|
1348
|
+
ApiCommentarySchema,
|
|
1349
|
+
ApiDatasetBookChapterSchema,
|
|
1350
|
+
ApiDatasetBookSchema,
|
|
1351
|
+
ApiDatasetBooksSchema,
|
|
1352
|
+
ApiDatasetSchema,
|
|
1353
|
+
ApiTranslationBookChapterAudioSchema,
|
|
1354
|
+
ApiTranslationBookChapterSchema,
|
|
1355
|
+
ApiTranslationBookSchema,
|
|
1356
|
+
ApiTranslationBooksSchema,
|
|
1357
|
+
ApiTranslationCompleteBookSchema,
|
|
1358
|
+
ApiTranslationCompleteSchema,
|
|
1359
|
+
ApiTranslationSchema,
|
|
635
1360
|
bookChapterApiLink,
|
|
636
1361
|
bookChapterAudioApiLink,
|
|
637
1362
|
bookCommentaryChapterApiLink,
|