@helloao/tools 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generation/api.cjs +1241 -64
- package/dist/cjs/generation/api.cjs.map +3 -3
- package/dist/cjs/generation/common-types.cjs +423 -0
- package/dist/cjs/generation/common-types.cjs.map +2 -2
- package/dist/cjs/generation/dataset.cjs.map +2 -2
- package/dist/cjs/generation/theographic.cjs +446 -0
- package/dist/cjs/generation/theographic.cjs.map +7 -0
- package/dist/esm/generation/api.js +1207 -64
- package/dist/esm/generation/api.js.map +3 -3
- package/dist/esm/generation/common-types.js +411 -0
- package/dist/esm/generation/common-types.js.map +2 -2
- package/dist/esm/generation/dataset.js.map +2 -2
- package/dist/esm/generation/theographic.js +412 -0
- package/dist/esm/generation/theographic.js.map +7 -0
- package/dist/types/generation/api.d.ts +2248 -304
- package/dist/types/generation/common-types.d.ts +782 -0
- package/dist/types/generation/dataset.d.ts +17 -1
- package/dist/types/generation/theographic.d.ts +64 -0
- package/package.json +1 -1
|
@@ -315,6 +315,417 @@ export const ScoredVerseRefSchema = VerseRefSchema.extend({
|
|
|
315
315
|
id: "ScoredVerseRef",
|
|
316
316
|
description: "Defines the schema for information about a verse reference that has an arbitrary score attached to it."
|
|
317
317
|
});
|
|
318
|
+
export const DatasetEntityTypeSchema = z.enum(["people", "places", "events", "groups"]).meta({
|
|
319
|
+
id: "DatasetEntityType",
|
|
320
|
+
description: "The type of an entity in a dataset. Matches the collection segment of the entity API paths, so the API link for an entity can be constructed as `/api/d/{dataset}/{type}/{id}.json`."
|
|
321
|
+
});
|
|
322
|
+
export const DatasetEntityRefSchema = z.object({
|
|
323
|
+
/**
|
|
324
|
+
* The ID of the entity that is being referenced.
|
|
325
|
+
*/
|
|
326
|
+
id: z.string().meta({
|
|
327
|
+
description: "The ID of the entity that is being referenced."
|
|
328
|
+
}),
|
|
329
|
+
/**
|
|
330
|
+
* The type of the entity that is being referenced.
|
|
331
|
+
* Matches the collection segment of the entity's API link,
|
|
332
|
+
* so the link can be constructed as `/api/d/{dataset}/{type}/{id}.json`.
|
|
333
|
+
*/
|
|
334
|
+
type: DatasetEntityTypeSchema.meta({
|
|
335
|
+
description: "The type of the entity that is being referenced. Matches the collection segment of the entity's API link, so the link can be constructed as `/api/d/{dataset}/{type}/{id}.json`."
|
|
336
|
+
}),
|
|
337
|
+
/**
|
|
338
|
+
* The name of the entity that is being referenced.
|
|
339
|
+
*/
|
|
340
|
+
name: z.string().optional().meta({
|
|
341
|
+
description: "The name of the entity that is being referenced."
|
|
342
|
+
}),
|
|
343
|
+
/**
|
|
344
|
+
* The API link for the entity that is being referenced.
|
|
345
|
+
* Only present in API responses.
|
|
346
|
+
*/
|
|
347
|
+
apiLink: z.string().optional().meta({
|
|
348
|
+
description: "The API link for the entity that is being referenced. Relative to the API origin. Only present in API responses."
|
|
349
|
+
})
|
|
350
|
+
}).meta({
|
|
351
|
+
id: "DatasetEntityRef",
|
|
352
|
+
description: "Defines the schema for a reference to another entity (person, place, event, or people group) in a dataset."
|
|
353
|
+
});
|
|
354
|
+
export const DatasetPersonSchema = z.object({
|
|
355
|
+
/**
|
|
356
|
+
* The ID of the person.
|
|
357
|
+
*/
|
|
358
|
+
id: z.string().meta({
|
|
359
|
+
description: "The ID of the person."
|
|
360
|
+
}),
|
|
361
|
+
/**
|
|
362
|
+
* The name of the person.
|
|
363
|
+
*/
|
|
364
|
+
name: z.string().meta({
|
|
365
|
+
description: "The name of the person."
|
|
366
|
+
}),
|
|
367
|
+
/**
|
|
368
|
+
* Other names that the person is called by.
|
|
369
|
+
*/
|
|
370
|
+
alsoCalled: z.array(z.string()).optional().meta({
|
|
371
|
+
description: "Other names that the person is called by."
|
|
372
|
+
}),
|
|
373
|
+
/**
|
|
374
|
+
* Whether the name of the person is a proper name.
|
|
375
|
+
*/
|
|
376
|
+
isProperName: z.boolean().optional().meta({
|
|
377
|
+
description: "Whether the name of the person is a proper name."
|
|
378
|
+
}),
|
|
379
|
+
/**
|
|
380
|
+
* The gender of the person.
|
|
381
|
+
*/
|
|
382
|
+
gender: z.string().optional().meta({
|
|
383
|
+
description: "The gender of the person."
|
|
384
|
+
}),
|
|
385
|
+
/**
|
|
386
|
+
* The description of the person.
|
|
387
|
+
* Each string is a paragraph.
|
|
388
|
+
*/
|
|
389
|
+
description: z.array(z.string()).optional().meta({
|
|
390
|
+
description: "The description of the person. Each string is a paragraph."
|
|
391
|
+
}),
|
|
392
|
+
/**
|
|
393
|
+
* The year that the person was born.
|
|
394
|
+
* Negative numbers are years BC. Positive numbers are years AD.
|
|
395
|
+
*/
|
|
396
|
+
birthYear: z.number().optional().meta({
|
|
397
|
+
description: "The year that the person was born. Negative numbers are years BC. Positive numbers are years AD."
|
|
398
|
+
}),
|
|
399
|
+
/**
|
|
400
|
+
* The year that the person died.
|
|
401
|
+
* Negative numbers are years BC. Positive numbers are years AD.
|
|
402
|
+
*/
|
|
403
|
+
deathYear: z.number().optional().meta({
|
|
404
|
+
description: "The year that the person died. Negative numbers are years BC. Positive numbers are years AD."
|
|
405
|
+
}),
|
|
406
|
+
/**
|
|
407
|
+
* The earliest year that the person is mentioned in.
|
|
408
|
+
* Negative numbers are years BC. Positive numbers are years AD.
|
|
409
|
+
*/
|
|
410
|
+
minYear: z.number().optional().meta({
|
|
411
|
+
description: "The earliest year that the person is mentioned in. Negative numbers are years BC. Positive numbers are years AD."
|
|
412
|
+
}),
|
|
413
|
+
/**
|
|
414
|
+
* The latest year that the person is mentioned in.
|
|
415
|
+
* Negative numbers are years BC. Positive numbers are years AD.
|
|
416
|
+
*/
|
|
417
|
+
maxYear: z.number().optional().meta({
|
|
418
|
+
description: "The latest year that the person is mentioned in. Negative numbers are years BC. Positive numbers are years AD."
|
|
419
|
+
}),
|
|
420
|
+
/**
|
|
421
|
+
* The place that the person was born in.
|
|
422
|
+
*/
|
|
423
|
+
birthPlace: DatasetEntityRefSchema.optional().meta({
|
|
424
|
+
description: "The place that the person was born in."
|
|
425
|
+
}),
|
|
426
|
+
/**
|
|
427
|
+
* The place that the person died in.
|
|
428
|
+
*/
|
|
429
|
+
deathPlace: DatasetEntityRefSchema.optional().meta({
|
|
430
|
+
description: "The place that the person died in."
|
|
431
|
+
}),
|
|
432
|
+
/**
|
|
433
|
+
* The father(s) of the person.
|
|
434
|
+
*/
|
|
435
|
+
father: z.array(DatasetEntityRefSchema).optional().meta({
|
|
436
|
+
description: "The father(s) of the person."
|
|
437
|
+
}),
|
|
438
|
+
/**
|
|
439
|
+
* The mother(s) of the person.
|
|
440
|
+
*/
|
|
441
|
+
mother: z.array(DatasetEntityRefSchema).optional().meta({
|
|
442
|
+
description: "The mother(s) of the person."
|
|
443
|
+
}),
|
|
444
|
+
/**
|
|
445
|
+
* The partners (spouses) of the person.
|
|
446
|
+
*/
|
|
447
|
+
partners: z.array(DatasetEntityRefSchema).optional().meta({
|
|
448
|
+
description: "The partners (spouses) of the person."
|
|
449
|
+
}),
|
|
450
|
+
/**
|
|
451
|
+
* The children of the person.
|
|
452
|
+
*/
|
|
453
|
+
children: z.array(DatasetEntityRefSchema).optional().meta({
|
|
454
|
+
description: "The children of the person."
|
|
455
|
+
}),
|
|
456
|
+
/**
|
|
457
|
+
* The siblings of the person.
|
|
458
|
+
*/
|
|
459
|
+
siblings: z.array(DatasetEntityRefSchema).optional().meta({
|
|
460
|
+
description: "The siblings of the person."
|
|
461
|
+
}),
|
|
462
|
+
/**
|
|
463
|
+
* The half-siblings of the person that share the same mother.
|
|
464
|
+
*/
|
|
465
|
+
halfSiblingsSameMother: z.array(DatasetEntityRefSchema).optional().meta({
|
|
466
|
+
description: "The half-siblings of the person that share the same mother."
|
|
467
|
+
}),
|
|
468
|
+
/**
|
|
469
|
+
* The half-siblings of the person that share the same father.
|
|
470
|
+
*/
|
|
471
|
+
halfSiblingsSameFather: z.array(DatasetEntityRefSchema).optional().meta({
|
|
472
|
+
description: "The half-siblings of the person that share the same father."
|
|
473
|
+
}),
|
|
474
|
+
/**
|
|
475
|
+
* The people groups that the person is a member of.
|
|
476
|
+
*/
|
|
477
|
+
memberOf: z.array(DatasetEntityRefSchema).optional().meta({
|
|
478
|
+
description: "The people groups that the person is a member of."
|
|
479
|
+
}),
|
|
480
|
+
/**
|
|
481
|
+
* The events that the person participated in.
|
|
482
|
+
*/
|
|
483
|
+
events: z.array(DatasetEntityRefSchema).optional().meta({
|
|
484
|
+
description: "The events that the person participated in."
|
|
485
|
+
}),
|
|
486
|
+
/**
|
|
487
|
+
* The list of Bible references that mention the person.
|
|
488
|
+
* Sorted by book order, chapter, and verse.
|
|
489
|
+
* Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.
|
|
490
|
+
*/
|
|
491
|
+
references: z.array(VerseRefSchema).meta({
|
|
492
|
+
description: "The list of Bible references that mention the person. Sorted by book order, chapter, and verse. Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`."
|
|
493
|
+
})
|
|
494
|
+
}).meta({
|
|
495
|
+
id: "DatasetPerson",
|
|
496
|
+
description: "Defines the schema for information about a person in a dataset."
|
|
497
|
+
});
|
|
498
|
+
export const DatasetPlaceSchema = z.object({
|
|
499
|
+
/**
|
|
500
|
+
* The ID of the place.
|
|
501
|
+
*/
|
|
502
|
+
id: z.string().meta({
|
|
503
|
+
description: "The ID of the place."
|
|
504
|
+
}),
|
|
505
|
+
/**
|
|
506
|
+
* The name of the place.
|
|
507
|
+
*/
|
|
508
|
+
name: z.string().meta({
|
|
509
|
+
description: "The name of the place."
|
|
510
|
+
}),
|
|
511
|
+
/**
|
|
512
|
+
* The name of the place as it appears in the King James Version.
|
|
513
|
+
*/
|
|
514
|
+
kjvName: z.string().optional().meta({
|
|
515
|
+
description: "The name of the place as it appears in the King James Version."
|
|
516
|
+
}),
|
|
517
|
+
/**
|
|
518
|
+
* The name of the place as it appears in the English Standard Version.
|
|
519
|
+
*/
|
|
520
|
+
esvName: z.string().optional().meta({
|
|
521
|
+
description: "The name of the place as it appears in the English Standard Version."
|
|
522
|
+
}),
|
|
523
|
+
/**
|
|
524
|
+
* Other names that the place is called by.
|
|
525
|
+
*/
|
|
526
|
+
aliases: z.array(z.string()).optional().meta({
|
|
527
|
+
description: "Other names that the place is called by."
|
|
528
|
+
}),
|
|
529
|
+
/**
|
|
530
|
+
* The type of geographical feature that the place is.
|
|
531
|
+
* For example, "City", "Region", "Mountain", "Water", etc.
|
|
532
|
+
*/
|
|
533
|
+
featureType: z.string().optional().meta({
|
|
534
|
+
description: 'The type of geographical feature that the place is. For example, "City", "Region", "Mountain", "Water", etc.'
|
|
535
|
+
}),
|
|
536
|
+
/**
|
|
537
|
+
* The sub-type of geographical feature that the place is.
|
|
538
|
+
*/
|
|
539
|
+
featureSubType: z.string().optional().meta({
|
|
540
|
+
description: "The sub-type of geographical feature that the place is."
|
|
541
|
+
}),
|
|
542
|
+
/**
|
|
543
|
+
* The latitude of the place.
|
|
544
|
+
*/
|
|
545
|
+
latitude: z.number().optional().meta({
|
|
546
|
+
description: "The latitude of the place."
|
|
547
|
+
}),
|
|
548
|
+
/**
|
|
549
|
+
* The longitude of the place.
|
|
550
|
+
*/
|
|
551
|
+
longitude: z.number().optional().meta({
|
|
552
|
+
description: "The longitude of the place."
|
|
553
|
+
}),
|
|
554
|
+
/**
|
|
555
|
+
* How precise the latitude and longitude of the place are.
|
|
556
|
+
*/
|
|
557
|
+
precision: z.string().optional().meta({
|
|
558
|
+
description: "How precise the latitude and longitude of the place are."
|
|
559
|
+
}),
|
|
560
|
+
/**
|
|
561
|
+
* The description of the place.
|
|
562
|
+
* Each string is a paragraph.
|
|
563
|
+
*/
|
|
564
|
+
description: z.array(z.string()).optional().meta({
|
|
565
|
+
description: "The description of the place. Each string is a paragraph."
|
|
566
|
+
}),
|
|
567
|
+
/**
|
|
568
|
+
* The comment on the place from the dataset authors.
|
|
569
|
+
*/
|
|
570
|
+
comment: z.string().optional().meta({
|
|
571
|
+
description: "The comment on the place from the dataset authors."
|
|
572
|
+
}),
|
|
573
|
+
/**
|
|
574
|
+
* The root place for this place.
|
|
575
|
+
* For example, the root place of "Sea of Galilee" and "Sea of Tiberias" is the same body of water.
|
|
576
|
+
*/
|
|
577
|
+
rootPlace: DatasetEntityRefSchema.optional().meta({
|
|
578
|
+
description: "The root place for this place. Different names for the same geographical location share the same root place."
|
|
579
|
+
}),
|
|
580
|
+
/**
|
|
581
|
+
* The place that this place is a duplicate of.
|
|
582
|
+
*/
|
|
583
|
+
duplicateOf: DatasetEntityRefSchema.optional().meta({
|
|
584
|
+
description: "The place that this place is a duplicate of."
|
|
585
|
+
}),
|
|
586
|
+
/**
|
|
587
|
+
* The people that have been at the place.
|
|
588
|
+
*/
|
|
589
|
+
people: z.array(DatasetEntityRefSchema).optional().meta({
|
|
590
|
+
description: "The people that have been at the place."
|
|
591
|
+
}),
|
|
592
|
+
/**
|
|
593
|
+
* The people that were born at the place.
|
|
594
|
+
*/
|
|
595
|
+
peopleBorn: z.array(DatasetEntityRefSchema).optional().meta({
|
|
596
|
+
description: "The people that were born at the place."
|
|
597
|
+
}),
|
|
598
|
+
/**
|
|
599
|
+
* The people that died at the place.
|
|
600
|
+
*/
|
|
601
|
+
peopleDied: z.array(DatasetEntityRefSchema).optional().meta({
|
|
602
|
+
description: "The people that died at the place."
|
|
603
|
+
}),
|
|
604
|
+
/**
|
|
605
|
+
* The events that happened at the place.
|
|
606
|
+
*/
|
|
607
|
+
events: z.array(DatasetEntityRefSchema).optional().meta({
|
|
608
|
+
description: "The events that happened at the place."
|
|
609
|
+
}),
|
|
610
|
+
/**
|
|
611
|
+
* The list of Bible references that mention the place.
|
|
612
|
+
* Sorted by book order, chapter, and verse.
|
|
613
|
+
* Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.
|
|
614
|
+
*/
|
|
615
|
+
references: z.array(VerseRefSchema).meta({
|
|
616
|
+
description: "The list of Bible references that mention the place. Sorted by book order, chapter, and verse. Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`."
|
|
617
|
+
})
|
|
618
|
+
}).meta({
|
|
619
|
+
id: "DatasetPlace",
|
|
620
|
+
description: "Defines the schema for information about a place in a dataset."
|
|
621
|
+
});
|
|
622
|
+
export const DatasetEventSchema = z.object({
|
|
623
|
+
/**
|
|
624
|
+
* The ID of the event.
|
|
625
|
+
*/
|
|
626
|
+
id: z.string().meta({
|
|
627
|
+
description: "The ID of the event."
|
|
628
|
+
}),
|
|
629
|
+
/**
|
|
630
|
+
* The name of the event.
|
|
631
|
+
*/
|
|
632
|
+
name: z.string().meta({
|
|
633
|
+
description: "The name of the event."
|
|
634
|
+
}),
|
|
635
|
+
/**
|
|
636
|
+
* The date that the event started at.
|
|
637
|
+
* Negative numbers are years BC. Positive numbers are years AD.
|
|
638
|
+
* More specific dates use the `YYYY-MM-DD` format.
|
|
639
|
+
*/
|
|
640
|
+
startDate: z.string().optional().meta({
|
|
641
|
+
description: "The date that the event started at. Negative numbers are years BC. Positive numbers are years AD. More specific dates use the `YYYY-MM-DD` format."
|
|
642
|
+
}),
|
|
643
|
+
/**
|
|
644
|
+
* The duration of the event.
|
|
645
|
+
* For example, "1D" is one day and "40Y" is fourty years.
|
|
646
|
+
*/
|
|
647
|
+
duration: z.string().optional().meta({
|
|
648
|
+
description: 'The duration of the event. For example, "1D" is one day and "40Y" is fourty years.'
|
|
649
|
+
}),
|
|
650
|
+
/**
|
|
651
|
+
* The people that participated in the event.
|
|
652
|
+
*/
|
|
653
|
+
participants: z.array(DatasetEntityRefSchema).optional().meta({
|
|
654
|
+
description: "The people that participated in the event."
|
|
655
|
+
}),
|
|
656
|
+
/**
|
|
657
|
+
* The places that the event happened at.
|
|
658
|
+
*/
|
|
659
|
+
locations: z.array(DatasetEntityRefSchema).optional().meta({
|
|
660
|
+
description: "The places that the event happened at."
|
|
661
|
+
}),
|
|
662
|
+
/**
|
|
663
|
+
* The people groups that participated in the event.
|
|
664
|
+
*/
|
|
665
|
+
groups: z.array(DatasetEntityRefSchema).optional().meta({
|
|
666
|
+
description: "The people groups that participated in the event."
|
|
667
|
+
}),
|
|
668
|
+
/**
|
|
669
|
+
* The event that this event is a part of.
|
|
670
|
+
*/
|
|
671
|
+
partOf: DatasetEntityRefSchema.optional().meta({
|
|
672
|
+
description: "The event that this event is a part of."
|
|
673
|
+
}),
|
|
674
|
+
/**
|
|
675
|
+
* The event that happened before this event.
|
|
676
|
+
*/
|
|
677
|
+
predecessor: DatasetEntityRefSchema.optional().meta({
|
|
678
|
+
description: "The event that happened before this event."
|
|
679
|
+
}),
|
|
680
|
+
/**
|
|
681
|
+
* The list of Bible references that describe the event.
|
|
682
|
+
* Sorted by book order, chapter, and verse.
|
|
683
|
+
* Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.
|
|
684
|
+
*/
|
|
685
|
+
references: z.array(VerseRefSchema).meta({
|
|
686
|
+
description: "The list of Bible references that describe the event. Sorted by book order, chapter, and verse. Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`."
|
|
687
|
+
})
|
|
688
|
+
}).meta({
|
|
689
|
+
id: "DatasetEvent",
|
|
690
|
+
description: "Defines the schema for information about an event in a dataset."
|
|
691
|
+
});
|
|
692
|
+
export const DatasetPeopleGroupSchema = z.object({
|
|
693
|
+
/**
|
|
694
|
+
* The ID of the people group.
|
|
695
|
+
*/
|
|
696
|
+
id: z.string().meta({
|
|
697
|
+
description: "The ID of the people group."
|
|
698
|
+
}),
|
|
699
|
+
/**
|
|
700
|
+
* The name of the people group.
|
|
701
|
+
*/
|
|
702
|
+
name: z.string().meta({
|
|
703
|
+
description: "The name of the people group."
|
|
704
|
+
}),
|
|
705
|
+
/**
|
|
706
|
+
* The people that are members of the people group.
|
|
707
|
+
*/
|
|
708
|
+
members: z.array(DatasetEntityRefSchema).optional().meta({
|
|
709
|
+
description: "The people that are members of the people group."
|
|
710
|
+
}),
|
|
711
|
+
/**
|
|
712
|
+
* The events that the people group participated in.
|
|
713
|
+
*/
|
|
714
|
+
events: z.array(DatasetEntityRefSchema).optional().meta({
|
|
715
|
+
description: "The events that the people group participated in."
|
|
716
|
+
}),
|
|
717
|
+
/**
|
|
718
|
+
* The list of Bible references that mention the people group.
|
|
719
|
+
* Sorted by book order, chapter, and verse.
|
|
720
|
+
* Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`.
|
|
721
|
+
*/
|
|
722
|
+
references: z.array(VerseRefSchema).meta({
|
|
723
|
+
description: "The list of Bible references that mention the people group. Sorted by book order, chapter, and verse. Consecutive verses in the same chapter are collapsed into a single reference using `endVerse`."
|
|
724
|
+
})
|
|
725
|
+
}).meta({
|
|
726
|
+
id: "DatasetPeopleGroup",
|
|
727
|
+
description: "Defines the schema for information about a people group in a dataset."
|
|
728
|
+
});
|
|
318
729
|
export const CommentaryProfileSchema = z.object({
|
|
319
730
|
/**
|
|
320
731
|
* The ID of the profile.
|