@lincs.project/webannotation-schema 1.0.2 → 1.0.3

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/index.js CHANGED
@@ -2816,14 +2816,29 @@ var schemaContext = {
2816
2816
  wikidata: "https://www.wikidata.org/wiki/",
2817
2817
  crm: "http://www.cidoc-crm.org/cidoc-crm/",
2818
2818
  crmdig: "http://www.ics.forth.gr/isl/CRMdig/",
2819
- certainty: "crm:P2_has_type",
2819
+ certainty: {
2820
+ "@type": "@id",
2821
+ "@id": "crm:P2_has_type"
2822
+ },
2820
2823
  contributor: "dcterms:contributor",
2821
2824
  description: "rdfs:comment",
2822
- precision: "crm:P2_has_type",
2825
+ precision: {
2826
+ "@type": "@id",
2827
+ "@id": "crm:P2_has_type"
2828
+ },
2823
2829
  softwareVersion: "schema:softwareVersion",
2824
- status: "crm:P2_has_type",
2825
- entityType: "crm:P2_has_type",
2826
- addicionalType: "crm:P2_has_type",
2830
+ status: {
2831
+ "@type": "@id",
2832
+ "@id": "crm:P2_has_type"
2833
+ },
2834
+ entityType: {
2835
+ "@type": "@id",
2836
+ "@id": "crm:P2_has_type"
2837
+ },
2838
+ additionalType: {
2839
+ "@type": "@id",
2840
+ "@id": "crm:P2_has_type"
2841
+ },
2827
2842
  approved: "edit:statusApproved",
2828
2843
  citing: "edit:citing",
2829
2844
  correcting: "edit:correcting",
@@ -2837,7 +2852,7 @@ var import_zod = require("zod");
2837
2852
  var User = import_zod.z.object({
2838
2853
  id: import_zod.z.union([import_zod.z.string().url({ message: "Must be an URI" }), import_zod.z.literal("anonymous")]).describe("The IRI that identifies the agent (Creator or Contributor)."),
2839
2854
  type: import_zod.z.literal("crm:E21_Person").describe("The type of the Agent."),
2840
- name: import_zod.z.string().nonempty({ message: "Cannot be empty" }).describe("The name of the agent.")
2855
+ name: import_zod.z.string().min(1, { message: "Cannot be empty" }).describe("The name of the agent.")
2841
2856
  }).describe("Human Agent");
2842
2857
  var creatorSchema = {
2843
2858
  type: "object",
@@ -2858,7 +2873,7 @@ var creatorSchema = {
2858
2873
  var Software = import_zod.z.object({
2859
2874
  id: import_zod.z.string().url({ message: "Must be an URI" }).describe("The IRI that identifies the agent (software)."),
2860
2875
  type: import_zod.z.tuple([import_zod.z.literal("Software"), import_zod.z.literal("crm:P16_used_specific_object")]).describe("The type of the Agent."),
2861
- label: import_zod.z.string().nonempty().describe("The name of the software."),
2876
+ label: import_zod.z.string().min(1).describe("The name of the software."),
2862
2877
  softwareVersion: import_zod.z.string().optional().describe("The software version.")
2863
2878
  }).describe("Software Agent");
2864
2879
  var softwareSchema = {
@@ -2916,7 +2931,7 @@ var precisionSchema = {
2916
2931
  enum: Quality,
2917
2932
  description: "Indicates the degree of precision associated with the location of the entity linked to the annotation body."
2918
2933
  };
2919
- var Label = import_zod2.z.string().nonempty({ message: "The label cannot be empty" }).describe("The title or name of a linked resource or named entity.");
2934
+ var Label = import_zod2.z.string().min(1, { message: "The label cannot be empty" }).describe("The title or name of a linked resource or named entity.");
2920
2935
  var labelSchema = {
2921
2936
  type: "string",
2922
2937
  minLength: 1,
@@ -3504,7 +3519,7 @@ var textPositionSelectorSchema = {
3504
3519
  var XpathSelector = import_zod17.z.object({
3505
3520
  id: import_zod17.z.string().uuid().describe("UUID that identifies the selector."),
3506
3521
  type: import_zod17.z.tuple([import_zod17.z.literal("XPathSelector"), import_zod17.z.literal("crm:E73_Information_Object")]),
3507
- value: import_zod17.z.string().nonempty().describe("The xpath to the selected segment."),
3522
+ value: import_zod17.z.string().min(1).describe("The xpath to the selected segment."),
3508
3523
  refinedBy: TextPositionSelector.optional().describe(
3509
3524
  "The relationship between a broader selector and the more specific selector that should be applied to the results of the first."
3510
3525
  )
@@ -3641,7 +3656,7 @@ var Target = import_zod20.z.object({
3641
3656
  id: import_zod20.z.union([import_zod20.z.string().url(), import_zod20.z.string().uuid()]).describe("The IRI that identifies the Target resource."),
3642
3657
  type: import_zod20.z.tuple([import_zod20.z.literal("SpecificResource"), import_zod20.z.literal("crm:E73_Information_Object")]).describe("The class of the Specific Resource."),
3643
3658
  format: import_zod20.z.array(
3644
- import_zod20.z.string().nonempty().describe(
3659
+ import_zod20.z.string().min(1).describe(
3645
3660
  "The format of the Web Resource's content. The value of the property should be the media-type of the format, following the [rfc6838] specification."
3646
3661
  )
3647
3662
  ).optional().describe(
@@ -3654,7 +3669,7 @@ var Target = import_zod20.z.object({
3654
3669
  ).min(1).optional().describe(
3655
3670
  "The languages of the Web Resource's content. The value of the property should be an array of language code following the [bcp47] specification."
3656
3671
  ),
3657
- title: import_zod20.z.string().nonempty({ message: "The title cannot be empty" }).optional().describe("The title of the document being annotated."),
3672
+ title: import_zod20.z.string().min(1, { message: "The title cannot be empty" }).optional().describe("The title of the document being annotated."),
3658
3673
  renderedVia: Software.optional().describe(
3659
3674
  "The relationship between the Specific Resource that represents the Target in the annotation, and the piece of software or other system that was used to render the Target when the annotation was created."
3660
3675
  ),
@@ -3878,21 +3893,23 @@ var WebAnnotation = import_zod21.z.object({
3878
3893
  ),
3879
3894
  id: import_zod21.z.union([
3880
3895
  import_zod21.z.string().url(),
3881
- //? We can improve this making it a regexp to make sure that this URI contains an UUID at the end connected by an "_".])
3896
+ //? We can improve this making it a regexp to make sure that this URI contains a search params named 'annoID' with n UUID value".])
3882
3897
  import_zod21.z.string().uuid()
3883
- ]).describe("The identity of the Annotation. It must be a URI or UUID."),
3898
+ ]).describe(
3899
+ "The identity of the Annotation. It must be a UUID or URI containing a UUID in the search params (URI?annoId=URI)"
3900
+ ),
3884
3901
  type: import_zod21.z.tuple([import_zod21.z.literal("Annotation"), import_zod21.z.literal("crm:E33_Linguistic_Object")]).describe("The type of the Annotation."),
3885
3902
  motivation: import_zod21.z.tuple([import_zod21.z.enum(Motivation), import_zod21.z.literal("crm:E33_Linguistic_Object")]).describe("The relationship between an Annotation and a Motivation."),
3886
3903
  created: import_zod21.z.string().datetime().describe("The time at which the resource was created."),
3887
3904
  modified: import_zod21.z.string().datetime().optional().describe("The time at which the resource was modified, after creation."),
3888
3905
  status: import_zod21.z.enum(Status).describe("The status of this annotation in a workflow."),
3889
- creator: User.describe("The agent responsible for creating the resource."),
3906
+ creator: User.describe("The agent responsible for creating the resource.").optional(),
3890
3907
  contributor: import_zod21.z.array(User.describe("The agents responsible for modifying the resource.")).nonempty().optional().describe("The agents responsible for modifying the resource."),
3891
3908
  generator: Software.describe(
3892
3909
  "The agent responsible for generating the serialization of the Annotation. "
3893
3910
  ),
3894
3911
  target: Target.describe("The relationship between an Annotation and its Target."),
3895
- body: Body.describe("The relationship between an Annotation and its Body.")
3912
+ body: import_zod21.z.union([Body, import_zod21.z.array(Body)]).describe("The relationship between an Annotation and its Body.")
3896
3913
  }).describe("Web Annotation Root");
3897
3914
  var webAnnotationSchema = {
3898
3915
  $id: schemaId,
@@ -3914,11 +3931,11 @@ var webAnnotationSchema = {
3914
3931
  {
3915
3932
  type: "string",
3916
3933
  format: "uri",
3917
- description: 'Idealy, this this uri must be a concatenation of an URI and UUID with an "_".'
3934
+ description: "It must be a UUID or URI containing a UUID in the search params (URI?annoId=URI)."
3918
3935
  },
3919
3936
  { type: "string", format: "uuid" }
3920
3937
  ],
3921
- description: "The identity of the Annotation. It must be a URI or UUID."
3938
+ description: "The identity of the Annotation. It must be a UUID or URI containing a UUID in the search params (URI?annoId=URI)"
3922
3939
  },
3923
3940
  type: {
3924
3941
  type: "array",
@@ -3960,7 +3977,17 @@ var webAnnotationSchema = {
3960
3977
  },
3961
3978
  generator: { $ref: "defs.jsonld#/definitions/software" },
3962
3979
  target: { $ref: "defs.jsonld#/definitions/target" },
3963
- body: { $ref: "defs.jsonld#/definitions/body" },
3980
+ body: {
3981
+ oneOf: [
3982
+ { $ref: "defs.jsonld#/definitions/body" },
3983
+ {
3984
+ type: "array",
3985
+ items: { $ref: "defs.jsonld#/definitions/body" },
3986
+ minItems: 1
3987
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3988
+ }
3989
+ ]
3990
+ },
3964
3991
  status: { type: "string", enum: Status }
3965
3992
  },
3966
3993
  required: [
@@ -3969,7 +3996,6 @@ var webAnnotationSchema = {
3969
3996
  "type",
3970
3997
  "motivation",
3971
3998
  "created",
3972
- "creator",
3973
3999
  "generator",
3974
4000
  "target",
3975
4001
  "body",
@@ -4463,6 +4489,105 @@ var common = {
4463
4489
  annotation: commonAnnotation
4464
4490
  };
4465
4491
 
4492
+ // src/v1/mocks/body/person.ts
4493
+ var commonPersonBody = {
4494
+ id: "https://www.uo.com/person",
4495
+ entityType: ["Person", "crm:E21_Person"]
4496
+ };
4497
+ var real = {
4498
+ ...common.annotation,
4499
+ body: {
4500
+ id: "https://www.uo.com/person",
4501
+ entityType: ["Person", "crm:E21_Person"]
4502
+ }
4503
+ };
4504
+ var fictional = {
4505
+ ...common.annotation,
4506
+ body: {
4507
+ id: "https://www.uo.com/person",
4508
+ entityType: ["Person", "crm:E89_Propositional_Object"]
4509
+ }
4510
+ };
4511
+ var withCertainty = {
4512
+ ...common.annotation,
4513
+ body: {
4514
+ id: "https://www.uo.com/person",
4515
+ entityType: ["Person", "crm:E21_Person"],
4516
+ certainty: "edit:qualityLow"
4517
+ }
4518
+ };
4519
+ var withLabelAndDescription = {
4520
+ ...common.annotation,
4521
+ body: {
4522
+ id: "https://www.uo.com/person",
4523
+ entityType: ["Person", "crm:E21_Person"],
4524
+ label: "John",
4525
+ description: "A person"
4526
+ }
4527
+ };
4528
+ var person = {
4529
+ valid: {
4530
+ real,
4531
+ fictional,
4532
+ withCertainty,
4533
+ withLabelAndDescription
4534
+ }
4535
+ };
4536
+
4537
+ // src/v1/mocks/body/place.ts
4538
+ var commonPlaceBody = {
4539
+ id: "https://www.uo.com/place",
4540
+ entityType: "cwrc:place"
4541
+ };
4542
+ var real2 = {
4543
+ ...common.annotation,
4544
+ body: {
4545
+ id: "https://www.uo.com/place",
4546
+ entityType: "cwrc:place"
4547
+ }
4548
+ };
4549
+ var fictional2 = {
4550
+ ...common.annotation,
4551
+ body: {
4552
+ id: "https://www.uo.com/place",
4553
+ entityType: ["cwrc:place", "crm:E89_Propositional_Object"]
4554
+ }
4555
+ };
4556
+ var withCertainty2 = {
4557
+ ...common.annotation,
4558
+ body: {
4559
+ id: "https://www.uo.com/place",
4560
+ entityType: "cwrc:place",
4561
+ certainty: "edit:qualityMedium"
4562
+ }
4563
+ };
4564
+ var withPrecision = {
4565
+ ...common.annotation,
4566
+ body: {
4567
+ id: "https://www.uo.com/place",
4568
+ entityType: "cwrc:place",
4569
+ precision: "edit:qualityHigh"
4570
+ }
4571
+ };
4572
+ var withLabelAndDescription2 = {
4573
+ ...common.annotation,
4574
+ body: {
4575
+ id: "https://www.uo.com/place",
4576
+ entityType: "cwrc:place",
4577
+ label: "Paris",
4578
+ description: "A place"
4579
+ }
4580
+ };
4581
+ var place = {
4582
+ valid: {
4583
+ real: real2,
4584
+ fictional: fictional2,
4585
+ withCertainty: withCertainty2,
4586
+ withPrecision,
4587
+ withLabelAndDescription: withLabelAndDescription2
4588
+ }
4589
+ };
4590
+
4466
4591
  // src/v1/mocks/body/citation.ts
4467
4592
  var simple = {
4468
4593
  ...common.annotation,
@@ -4472,7 +4597,7 @@ var simple = {
4472
4597
  entityType: ["cito:Citation", "crm:E73_Information_Object"]
4473
4598
  }
4474
4599
  };
4475
- var withCertainty = {
4600
+ var withCertainty3 = {
4476
4601
  ...common.annotation,
4477
4602
  motivation: ["citing", "crm:E33_Linguistic_Object"],
4478
4603
  body: {
@@ -4481,7 +4606,7 @@ var withCertainty = {
4481
4606
  certainty: "edit:qualityHigh"
4482
4607
  }
4483
4608
  };
4484
- var withLabelAndDescription = {
4609
+ var withLabelAndDescription3 = {
4485
4610
  ...common.annotation,
4486
4611
  motivation: ["citing", "crm:E33_Linguistic_Object"],
4487
4612
  body: {
@@ -4494,27 +4619,27 @@ var withLabelAndDescription = {
4494
4619
  var citation = {
4495
4620
  valid: {
4496
4621
  simple,
4497
- withCertainty,
4498
- withLabelAndDescription
4622
+ withCertainty: withCertainty3,
4623
+ withLabelAndDescription: withLabelAndDescription3
4499
4624
  }
4500
4625
  };
4501
4626
 
4502
4627
  // src/v1/mocks/body/conceptualObject.ts
4503
- var real = {
4628
+ var real3 = {
4504
4629
  ...common.annotation,
4505
4630
  body: {
4506
4631
  id: "https://www.uo.com/conceptualObject",
4507
4632
  entityType: "crm:E28_Conceptual_Object"
4508
4633
  }
4509
4634
  };
4510
- var fictional = {
4635
+ var fictional3 = {
4511
4636
  ...common.annotation,
4512
4637
  body: {
4513
4638
  id: "https://www.uo.com/conceptualObject",
4514
4639
  entityType: ["crm:E28_Conceptual_Object", "wikidata:Q15831596"]
4515
4640
  }
4516
4641
  };
4517
- var withCertainty2 = {
4642
+ var withCertainty4 = {
4518
4643
  ...common.annotation,
4519
4644
  body: {
4520
4645
  id: "https://www.uo.com/conceptualObject",
@@ -4522,7 +4647,7 @@ var withCertainty2 = {
4522
4647
  certainty: "edit:qualityMedium"
4523
4648
  }
4524
4649
  };
4525
- var withLabelAndDescription2 = {
4650
+ var withLabelAndDescription4 = {
4526
4651
  ...common.annotation,
4527
4652
  body: {
4528
4653
  id: "https://www.uo.com/conceptualObject",
@@ -4533,10 +4658,10 @@ var withLabelAndDescription2 = {
4533
4658
  };
4534
4659
  var conceptualObject = {
4535
4660
  valid: {
4536
- real,
4537
- fictional,
4538
- withCertainty: withCertainty2,
4539
- withLabelAndDescription: withLabelAndDescription2
4661
+ real: real3,
4662
+ fictional: fictional3,
4663
+ withCertainty: withCertainty4,
4664
+ withLabelAndDescription: withLabelAndDescription4
4540
4665
  }
4541
4666
  };
4542
4667
 
@@ -4565,7 +4690,7 @@ var simple2 = {
4565
4690
  value: "2012-03-01T00:00:00/2012-02-01T18:21:07"
4566
4691
  }
4567
4692
  };
4568
- var withCertainty3 = {
4693
+ var withCertainty5 = {
4569
4694
  ...common.annotation,
4570
4695
  body: {
4571
4696
  id: "55369c00-5c43-4d1a-8462-31c74fbec584",
@@ -4575,7 +4700,7 @@ var withCertainty3 = {
4575
4700
  certainty: "edit:qualityMedium"
4576
4701
  }
4577
4702
  };
4578
- var withPrecision = {
4703
+ var withPrecision2 = {
4579
4704
  ...common.annotation,
4580
4705
  body: {
4581
4706
  id: "55369c00-5c43-4d1a-8462-31c74fbec584",
@@ -4588,8 +4713,8 @@ var withPrecision = {
4588
4713
  var date = {
4589
4714
  valid: {
4590
4715
  simple: simple2,
4591
- withCertainty: withCertainty3,
4592
- withPrecision
4716
+ withCertainty: withCertainty5,
4717
+ withPrecision: withPrecision2
4593
4718
  }
4594
4719
  };
4595
4720
 
@@ -4651,7 +4776,7 @@ var simple3 = {
4651
4776
  entityType: "crmdig:D1_Digital_Object"
4652
4777
  }
4653
4778
  };
4654
- var withCertainty4 = {
4779
+ var withCertainty6 = {
4655
4780
  ...common.annotation,
4656
4781
  motivation: ["linking", "crm:E33_Linguistic_Object"],
4657
4782
  body: {
@@ -4663,7 +4788,7 @@ var withCertainty4 = {
4663
4788
  var link = {
4664
4789
  valid: {
4665
4790
  simple: simple3,
4666
- withCertainty: withCertainty4
4791
+ withCertainty: withCertainty6
4667
4792
  }
4668
4793
  };
4669
4794
 
@@ -4685,7 +4810,7 @@ var additionalType = {
4685
4810
  id: "55369c00-5c43-4d1a-8462-31c74fbec584",
4686
4811
  type: "TextualBody",
4687
4812
  entityType: "crm:E33_Linguistic_Object",
4688
- additionalType: "scholarly",
4813
+ additionalType: "cwrc:NoteScholarly",
4689
4814
  value: "this is a note"
4690
4815
  }
4691
4816
  };
@@ -4709,21 +4834,21 @@ var note = {
4709
4834
  };
4710
4835
 
4711
4836
  // src/v1/mocks/body/organization.ts
4712
- var real2 = {
4837
+ var real4 = {
4713
4838
  ...common.annotation,
4714
4839
  body: {
4715
4840
  id: "https://www.uo.com/organization",
4716
4841
  entityType: ["foaf:Organization", "crm:E74_Group"]
4717
4842
  }
4718
4843
  };
4719
- var fictional2 = {
4844
+ var fictional4 = {
4720
4845
  ...common.annotation,
4721
4846
  body: {
4722
4847
  id: "https://www.uo.com/organization",
4723
4848
  entityType: ["foaf:Organization", "crm:E89_Propositional_Object"]
4724
4849
  }
4725
4850
  };
4726
- var withCertainty5 = {
4851
+ var withCertainty7 = {
4727
4852
  ...common.annotation,
4728
4853
  body: {
4729
4854
  id: "https://www.uo.com/organization",
@@ -4731,7 +4856,7 @@ var withCertainty5 = {
4731
4856
  certainty: "edit:qualityHigh"
4732
4857
  }
4733
4858
  };
4734
- var withLabelAndDescription3 = {
4859
+ var withLabelAndDescription5 = {
4735
4860
  ...common.annotation,
4736
4861
  body: {
4737
4862
  id: "https://www.uo.com/organization",
@@ -4742,74 +4867,29 @@ var withLabelAndDescription3 = {
4742
4867
  };
4743
4868
  var organization = {
4744
4869
  valid: {
4745
- real: real2,
4746
- fictional: fictional2,
4747
- withCertainty: withCertainty5,
4748
- withLabelAndDescription: withLabelAndDescription3
4749
- }
4750
- };
4751
-
4752
- // src/v1/mocks/body/person.ts
4753
- var commonPersonBody = {
4754
- id: "https://www.uo.com/person",
4755
- entityType: ["Person", "crm:E21_Person"]
4756
- };
4757
- var real3 = {
4758
- ...common.annotation,
4759
- body: {
4760
- id: "https://www.uo.com/person",
4761
- entityType: ["Person", "crm:E21_Person"]
4762
- }
4763
- };
4764
- var fictional3 = {
4765
- ...common.annotation,
4766
- body: {
4767
- id: "https://www.uo.com/person",
4768
- entityType: ["Person", "crm:E89_Propositional_Object"]
4769
- }
4770
- };
4771
- var withCertainty6 = {
4772
- ...common.annotation,
4773
- body: {
4774
- id: "https://www.uo.com/person",
4775
- entityType: ["Person", "crm:E21_Person"],
4776
- certainty: "edit:qualityLow"
4777
- }
4778
- };
4779
- var withLabelAndDescription4 = {
4780
- ...common.annotation,
4781
- body: {
4782
- id: "https://www.uo.com/person",
4783
- entityType: ["Person", "crm:E21_Person"],
4784
- label: "John",
4785
- description: "A person"
4786
- }
4787
- };
4788
- var person = {
4789
- valid: {
4790
- real: real3,
4791
- fictional: fictional3,
4792
- withCertainty: withCertainty6,
4793
- withLabelAndDescription: withLabelAndDescription4
4870
+ real: real4,
4871
+ fictional: fictional4,
4872
+ withCertainty: withCertainty7,
4873
+ withLabelAndDescription: withLabelAndDescription5
4794
4874
  }
4795
4875
  };
4796
4876
 
4797
4877
  // src/v1/mocks/body/physicalThing.ts
4798
- var real4 = {
4878
+ var real5 = {
4799
4879
  ...common.annotation,
4800
4880
  body: {
4801
4881
  id: "https://www.uo.com/pysicalThing",
4802
4882
  entityType: "crm:E18_Physical_Thing"
4803
4883
  }
4804
4884
  };
4805
- var fictional4 = {
4885
+ var fictional5 = {
4806
4886
  ...common.annotation,
4807
4887
  body: {
4808
4888
  id: "https://www.uo.com/pysicalThing",
4809
4889
  entityType: ["crm:E18_Physical_Thing", "wikidata:Q15831596"]
4810
4890
  }
4811
4891
  };
4812
- var withCertainty7 = {
4892
+ var withCertainty8 = {
4813
4893
  ...common.annotation,
4814
4894
  body: {
4815
4895
  id: "https://www.uo.com/pysicalThing",
@@ -4817,7 +4897,7 @@ var withCertainty7 = {
4817
4897
  certainty: "edit:qualityLow"
4818
4898
  }
4819
4899
  };
4820
- var withLabelAndDescription5 = {
4900
+ var withLabelAndDescription6 = {
4821
4901
  ...common.annotation,
4822
4902
  body: {
4823
4903
  id: "https://www.uo.com/pysicalThing",
@@ -4827,60 +4907,10 @@ var withLabelAndDescription5 = {
4827
4907
  }
4828
4908
  };
4829
4909
  var physicalThing = {
4830
- valid: {
4831
- real: real4,
4832
- fictional: fictional4,
4833
- withCertainty: withCertainty7,
4834
- withLabelAndDescription: withLabelAndDescription5
4835
- }
4836
- };
4837
-
4838
- // src/v1/mocks/body/place.ts
4839
- var real5 = {
4840
- ...common.annotation,
4841
- body: {
4842
- id: "https://www.uo.com/place",
4843
- entityType: "cwrc:place"
4844
- }
4845
- };
4846
- var fictional5 = {
4847
- ...common.annotation,
4848
- body: {
4849
- id: "https://www.uo.com/place",
4850
- entityType: ["cwrc:place", "crm:E89_Propositional_Object"]
4851
- }
4852
- };
4853
- var withCertainty8 = {
4854
- ...common.annotation,
4855
- body: {
4856
- id: "https://www.uo.com/place",
4857
- entityType: "cwrc:place",
4858
- certainty: "edit:qualityMedium"
4859
- }
4860
- };
4861
- var withPrecision2 = {
4862
- ...common.annotation,
4863
- body: {
4864
- id: "https://www.uo.com/place",
4865
- entityType: "cwrc:place",
4866
- precision: "edit:qualityHigh"
4867
- }
4868
- };
4869
- var withLabelAndDescription6 = {
4870
- ...common.annotation,
4871
- body: {
4872
- id: "https://www.uo.com/place",
4873
- entityType: "cwrc:place",
4874
- label: "Paris",
4875
- description: "A place"
4876
- }
4877
- };
4878
- var place = {
4879
4910
  valid: {
4880
4911
  real: real5,
4881
4912
  fictional: fictional5,
4882
4913
  withCertainty: withCertainty8,
4883
- withPrecision: withPrecision2,
4884
4914
  withLabelAndDescription: withLabelAndDescription6
4885
4915
  }
4886
4916
  };
@@ -4926,6 +4956,17 @@ var work = {
4926
4956
  }
4927
4957
  };
4928
4958
 
4959
+ // src/v1/mocks/body/index.ts
4960
+ var personPlace = {
4961
+ ...common.annotation,
4962
+ body: [commonPersonBody, commonPlaceBody]
4963
+ };
4964
+ var multipleBodies = {
4965
+ valid: {
4966
+ personPlace
4967
+ }
4968
+ };
4969
+
4929
4970
  // src/v1/mocks/root/agent.ts
4930
4971
  var creatorSimple = {
4931
4972
  ...common.annotation,
@@ -4949,12 +4990,17 @@ var generatorWithVersion = {
4949
4990
  ...common.annotation,
4950
4991
  generator: { ...common.software, softwareVersion: "v1.2.5" }
4951
4992
  };
4993
+ var { creator } = common.annotation;
4994
+ var noCreator = {
4995
+ ...common.annotation
4996
+ };
4952
4997
  var agent = {
4953
4998
  valid: {
4954
4999
  creator: {
4955
5000
  simple: creatorSimple,
4956
5001
  withContributor: creatorWithContributor,
4957
- withMultipleContributors: creatorWithMultipleContributors
5002
+ withMultipleContributors: creatorWithMultipleContributors,
5003
+ noCreator
4958
5004
  },
4959
5005
  generator: {
4960
5006
  simple: generatorSimple,
@@ -5269,10 +5315,24 @@ var generateValidExamples = async () => {
5269
5315
  await import_fs_extra.default.writeJSON(import_path.default.join(FOLDER, "creator.jsonld"), agent.valid.creator.simple, JSON_OPTIONS);
5270
5316
  await import_fs_extra.default.writeJSON(
5271
5317
  import_path.default.join(FOLDER, "creator_with_contributor.jsonld"),
5318
+ agent.valid.creator.withContributor,
5319
+ JSON_OPTIONS
5320
+ );
5321
+ await import_fs_extra.default.writeJSON(
5322
+ import_path.default.join(FOLDER, "creator_with_multiple_contributors.jsonld"),
5272
5323
  agent.valid.creator.withMultipleContributors,
5273
5324
  JSON_OPTIONS
5274
5325
  );
5275
- await import_fs_extra.default.writeJSON(import_path.default.join(FOLDER, "generator.jsonld"), agent.valid.generator, JSON_OPTIONS);
5326
+ await import_fs_extra.default.writeJSON(
5327
+ import_path.default.join(FOLDER, "no_creator.jsonld"),
5328
+ agent.valid.creator.noCreator,
5329
+ JSON_OPTIONS
5330
+ );
5331
+ await import_fs_extra.default.writeJSON(
5332
+ import_path.default.join(FOLDER, "generator.jsonld"),
5333
+ agent.valid.generator.simple,
5334
+ JSON_OPTIONS
5335
+ );
5276
5336
  await import_fs_extra.default.writeJSON(
5277
5337
  import_path.default.join(FOLDER, "generator_with_version.jsonld"),
5278
5338
  agent.valid.generator.withVersion,
@@ -5331,7 +5391,11 @@ var generateValidExamples = async () => {
5331
5391
  place.valid.fictional,
5332
5392
  JSON_OPTIONS
5333
5393
  );
5334
- await import_fs_extra.default.writeJSON(import_path.default.join(FOLDER, "place_with_precision.jsonld"), place.valid, JSON_OPTIONS);
5394
+ await import_fs_extra.default.writeJSON(
5395
+ import_path.default.join(FOLDER, "place_with_precision.jsonld"),
5396
+ place.valid.withPrecision,
5397
+ JSON_OPTIONS
5398
+ );
5335
5399
  await import_fs_extra.default.writeJSON(
5336
5400
  import_path.default.join(FOLDER, "organization.jsonld"),
5337
5401
  organization.valid.real,
@@ -5342,21 +5406,25 @@ var generateValidExamples = async () => {
5342
5406
  organization.valid.fictional,
5343
5407
  JSON_OPTIONS
5344
5408
  );
5345
- await import_fs_extra.default.writeJSON(import_path.default.join(FOLDER, "work.jsonld"), work.valid, JSON_OPTIONS);
5409
+ await import_fs_extra.default.writeJSON(import_path.default.join(FOLDER, "work_real.jsonld"), work.valid.real, JSON_OPTIONS);
5346
5410
  await import_fs_extra.default.writeJSON(
5347
5411
  import_path.default.join(FOLDER, "work_fictional.jsonld"),
5348
5412
  work.valid.fictional,
5349
5413
  JSON_OPTIONS
5350
5414
  );
5351
- await import_fs_extra.default.writeJSON(import_path.default.join(FOLDER, "physical_thing.jsonld"), physicalThing.valid, JSON_OPTIONS);
5415
+ await import_fs_extra.default.writeJSON(
5416
+ import_path.default.join(FOLDER, "physical_thing_real.jsonld"),
5417
+ physicalThing.valid.real,
5418
+ JSON_OPTIONS
5419
+ );
5352
5420
  await import_fs_extra.default.writeJSON(
5353
5421
  import_path.default.join(FOLDER, "physical_thing_fictional.jsonld"),
5354
5422
  physicalThing.valid.fictional,
5355
5423
  JSON_OPTIONS
5356
5424
  );
5357
5425
  await import_fs_extra.default.writeJSON(
5358
- import_path.default.join(FOLDER, "conceptual_object.jsonld"),
5359
- conceptualObject.valid,
5426
+ import_path.default.join(FOLDER, "conceptual_object_real.jsonld"),
5427
+ conceptualObject.valid.real,
5360
5428
  JSON_OPTIONS
5361
5429
  );
5362
5430
  await import_fs_extra.default.writeJSON(
@@ -5380,7 +5448,7 @@ var generateValidExamples = async () => {
5380
5448
  await import_fs_extra.default.writeJSON(import_path.default.join(FOLDER, "correction.jsonld"), correction.valid, JSON_OPTIONS);
5381
5449
  await import_fs_extra.default.writeJSON(
5382
5450
  import_path.default.join(FOLDER, "keyword_vocabulary.jsonld"),
5383
- keyword.valid.vocabulary,
5451
+ keyword.valid.vocabulary.simple,
5384
5452
  JSON_OPTIONS
5385
5453
  );
5386
5454
  await import_fs_extra.default.writeJSON(
@@ -5389,6 +5457,11 @@ var generateValidExamples = async () => {
5389
5457
  JSON_OPTIONS
5390
5458
  );
5391
5459
  await import_fs_extra.default.writeJSON(import_path.default.join(FOLDER, "link.jsonld"), link.valid.simple, JSON_OPTIONS);
5460
+ await import_fs_extra.default.writeJSON(
5461
+ import_path.default.join(FOLDER, "multiple_bodies.jsonld"),
5462
+ multipleBodies.valid.personPlace,
5463
+ JSON_OPTIONS
5464
+ );
5392
5465
  };
5393
5466
 
5394
5467
  // src/v1/generate/jsonld.ts