@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.mjs CHANGED
@@ -2787,14 +2787,29 @@ var schemaContext = {
2787
2787
  wikidata: "https://www.wikidata.org/wiki/",
2788
2788
  crm: "http://www.cidoc-crm.org/cidoc-crm/",
2789
2789
  crmdig: "http://www.ics.forth.gr/isl/CRMdig/",
2790
- certainty: "crm:P2_has_type",
2790
+ certainty: {
2791
+ "@type": "@id",
2792
+ "@id": "crm:P2_has_type"
2793
+ },
2791
2794
  contributor: "dcterms:contributor",
2792
2795
  description: "rdfs:comment",
2793
- precision: "crm:P2_has_type",
2796
+ precision: {
2797
+ "@type": "@id",
2798
+ "@id": "crm:P2_has_type"
2799
+ },
2794
2800
  softwareVersion: "schema:softwareVersion",
2795
- status: "crm:P2_has_type",
2796
- entityType: "crm:P2_has_type",
2797
- addicionalType: "crm:P2_has_type",
2801
+ status: {
2802
+ "@type": "@id",
2803
+ "@id": "crm:P2_has_type"
2804
+ },
2805
+ entityType: {
2806
+ "@type": "@id",
2807
+ "@id": "crm:P2_has_type"
2808
+ },
2809
+ additionalType: {
2810
+ "@type": "@id",
2811
+ "@id": "crm:P2_has_type"
2812
+ },
2798
2813
  approved: "edit:statusApproved",
2799
2814
  citing: "edit:citing",
2800
2815
  correcting: "edit:correcting",
@@ -2808,7 +2823,7 @@ import { z } from "zod";
2808
2823
  var User = z.object({
2809
2824
  id: z.union([z.string().url({ message: "Must be an URI" }), z.literal("anonymous")]).describe("The IRI that identifies the agent (Creator or Contributor)."),
2810
2825
  type: z.literal("crm:E21_Person").describe("The type of the Agent."),
2811
- name: z.string().nonempty({ message: "Cannot be empty" }).describe("The name of the agent.")
2826
+ name: z.string().min(1, { message: "Cannot be empty" }).describe("The name of the agent.")
2812
2827
  }).describe("Human Agent");
2813
2828
  var creatorSchema = {
2814
2829
  type: "object",
@@ -2829,7 +2844,7 @@ var creatorSchema = {
2829
2844
  var Software = z.object({
2830
2845
  id: z.string().url({ message: "Must be an URI" }).describe("The IRI that identifies the agent (software)."),
2831
2846
  type: z.tuple([z.literal("Software"), z.literal("crm:P16_used_specific_object")]).describe("The type of the Agent."),
2832
- label: z.string().nonempty().describe("The name of the software."),
2847
+ label: z.string().min(1).describe("The name of the software."),
2833
2848
  softwareVersion: z.string().optional().describe("The software version.")
2834
2849
  }).describe("Software Agent");
2835
2850
  var softwareSchema = {
@@ -2887,7 +2902,7 @@ var precisionSchema = {
2887
2902
  enum: Quality,
2888
2903
  description: "Indicates the degree of precision associated with the location of the entity linked to the annotation body."
2889
2904
  };
2890
- var Label = z2.string().nonempty({ message: "The label cannot be empty" }).describe("The title or name of a linked resource or named entity.");
2905
+ var Label = z2.string().min(1, { message: "The label cannot be empty" }).describe("The title or name of a linked resource or named entity.");
2891
2906
  var labelSchema = {
2892
2907
  type: "string",
2893
2908
  minLength: 1,
@@ -3475,7 +3490,7 @@ var textPositionSelectorSchema = {
3475
3490
  var XpathSelector = z17.object({
3476
3491
  id: z17.string().uuid().describe("UUID that identifies the selector."),
3477
3492
  type: z17.tuple([z17.literal("XPathSelector"), z17.literal("crm:E73_Information_Object")]),
3478
- value: z17.string().nonempty().describe("The xpath to the selected segment."),
3493
+ value: z17.string().min(1).describe("The xpath to the selected segment."),
3479
3494
  refinedBy: TextPositionSelector.optional().describe(
3480
3495
  "The relationship between a broader selector and the more specific selector that should be applied to the results of the first."
3481
3496
  )
@@ -3612,7 +3627,7 @@ var Target = z20.object({
3612
3627
  id: z20.union([z20.string().url(), z20.string().uuid()]).describe("The IRI that identifies the Target resource."),
3613
3628
  type: z20.tuple([z20.literal("SpecificResource"), z20.literal("crm:E73_Information_Object")]).describe("The class of the Specific Resource."),
3614
3629
  format: z20.array(
3615
- z20.string().nonempty().describe(
3630
+ z20.string().min(1).describe(
3616
3631
  "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."
3617
3632
  )
3618
3633
  ).optional().describe(
@@ -3625,7 +3640,7 @@ var Target = z20.object({
3625
3640
  ).min(1).optional().describe(
3626
3641
  "The languages of the Web Resource's content. The value of the property should be an array of language code following the [bcp47] specification."
3627
3642
  ),
3628
- title: z20.string().nonempty({ message: "The title cannot be empty" }).optional().describe("The title of the document being annotated."),
3643
+ title: z20.string().min(1, { message: "The title cannot be empty" }).optional().describe("The title of the document being annotated."),
3629
3644
  renderedVia: Software.optional().describe(
3630
3645
  "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."
3631
3646
  ),
@@ -3849,21 +3864,23 @@ var WebAnnotation = z21.object({
3849
3864
  ),
3850
3865
  id: z21.union([
3851
3866
  z21.string().url(),
3852
- //? We can improve this making it a regexp to make sure that this URI contains an UUID at the end connected by an "_".])
3867
+ //? We can improve this making it a regexp to make sure that this URI contains a search params named 'annoID' with n UUID value".])
3853
3868
  z21.string().uuid()
3854
- ]).describe("The identity of the Annotation. It must be a URI or UUID."),
3869
+ ]).describe(
3870
+ "The identity of the Annotation. It must be a UUID or URI containing a UUID in the search params (URI?annoId=URI)"
3871
+ ),
3855
3872
  type: z21.tuple([z21.literal("Annotation"), z21.literal("crm:E33_Linguistic_Object")]).describe("The type of the Annotation."),
3856
3873
  motivation: z21.tuple([z21.enum(Motivation), z21.literal("crm:E33_Linguistic_Object")]).describe("The relationship between an Annotation and a Motivation."),
3857
3874
  created: z21.string().datetime().describe("The time at which the resource was created."),
3858
3875
  modified: z21.string().datetime().optional().describe("The time at which the resource was modified, after creation."),
3859
3876
  status: z21.enum(Status).describe("The status of this annotation in a workflow."),
3860
- creator: User.describe("The agent responsible for creating the resource."),
3877
+ creator: User.describe("The agent responsible for creating the resource.").optional(),
3861
3878
  contributor: z21.array(User.describe("The agents responsible for modifying the resource.")).nonempty().optional().describe("The agents responsible for modifying the resource."),
3862
3879
  generator: Software.describe(
3863
3880
  "The agent responsible for generating the serialization of the Annotation. "
3864
3881
  ),
3865
3882
  target: Target.describe("The relationship between an Annotation and its Target."),
3866
- body: Body.describe("The relationship between an Annotation and its Body.")
3883
+ body: z21.union([Body, z21.array(Body)]).describe("The relationship between an Annotation and its Body.")
3867
3884
  }).describe("Web Annotation Root");
3868
3885
  var webAnnotationSchema = {
3869
3886
  $id: schemaId,
@@ -3885,11 +3902,11 @@ var webAnnotationSchema = {
3885
3902
  {
3886
3903
  type: "string",
3887
3904
  format: "uri",
3888
- description: 'Idealy, this this uri must be a concatenation of an URI and UUID with an "_".'
3905
+ description: "It must be a UUID or URI containing a UUID in the search params (URI?annoId=URI)."
3889
3906
  },
3890
3907
  { type: "string", format: "uuid" }
3891
3908
  ],
3892
- description: "The identity of the Annotation. It must be a URI or UUID."
3909
+ description: "The identity of the Annotation. It must be a UUID or URI containing a UUID in the search params (URI?annoId=URI)"
3893
3910
  },
3894
3911
  type: {
3895
3912
  type: "array",
@@ -3931,7 +3948,17 @@ var webAnnotationSchema = {
3931
3948
  },
3932
3949
  generator: { $ref: "defs.jsonld#/definitions/software" },
3933
3950
  target: { $ref: "defs.jsonld#/definitions/target" },
3934
- body: { $ref: "defs.jsonld#/definitions/body" },
3951
+ body: {
3952
+ oneOf: [
3953
+ { $ref: "defs.jsonld#/definitions/body" },
3954
+ {
3955
+ type: "array",
3956
+ items: { $ref: "defs.jsonld#/definitions/body" },
3957
+ minItems: 1
3958
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3959
+ }
3960
+ ]
3961
+ },
3935
3962
  status: { type: "string", enum: Status }
3936
3963
  },
3937
3964
  required: [
@@ -3940,7 +3967,6 @@ var webAnnotationSchema = {
3940
3967
  "type",
3941
3968
  "motivation",
3942
3969
  "created",
3943
- "creator",
3944
3970
  "generator",
3945
3971
  "target",
3946
3972
  "body",
@@ -4434,6 +4460,105 @@ var common = {
4434
4460
  annotation: commonAnnotation
4435
4461
  };
4436
4462
 
4463
+ // src/v1/mocks/body/person.ts
4464
+ var commonPersonBody = {
4465
+ id: "https://www.uo.com/person",
4466
+ entityType: ["Person", "crm:E21_Person"]
4467
+ };
4468
+ var real = {
4469
+ ...common.annotation,
4470
+ body: {
4471
+ id: "https://www.uo.com/person",
4472
+ entityType: ["Person", "crm:E21_Person"]
4473
+ }
4474
+ };
4475
+ var fictional = {
4476
+ ...common.annotation,
4477
+ body: {
4478
+ id: "https://www.uo.com/person",
4479
+ entityType: ["Person", "crm:E89_Propositional_Object"]
4480
+ }
4481
+ };
4482
+ var withCertainty = {
4483
+ ...common.annotation,
4484
+ body: {
4485
+ id: "https://www.uo.com/person",
4486
+ entityType: ["Person", "crm:E21_Person"],
4487
+ certainty: "edit:qualityLow"
4488
+ }
4489
+ };
4490
+ var withLabelAndDescription = {
4491
+ ...common.annotation,
4492
+ body: {
4493
+ id: "https://www.uo.com/person",
4494
+ entityType: ["Person", "crm:E21_Person"],
4495
+ label: "John",
4496
+ description: "A person"
4497
+ }
4498
+ };
4499
+ var person = {
4500
+ valid: {
4501
+ real,
4502
+ fictional,
4503
+ withCertainty,
4504
+ withLabelAndDescription
4505
+ }
4506
+ };
4507
+
4508
+ // src/v1/mocks/body/place.ts
4509
+ var commonPlaceBody = {
4510
+ id: "https://www.uo.com/place",
4511
+ entityType: "cwrc:place"
4512
+ };
4513
+ var real2 = {
4514
+ ...common.annotation,
4515
+ body: {
4516
+ id: "https://www.uo.com/place",
4517
+ entityType: "cwrc:place"
4518
+ }
4519
+ };
4520
+ var fictional2 = {
4521
+ ...common.annotation,
4522
+ body: {
4523
+ id: "https://www.uo.com/place",
4524
+ entityType: ["cwrc:place", "crm:E89_Propositional_Object"]
4525
+ }
4526
+ };
4527
+ var withCertainty2 = {
4528
+ ...common.annotation,
4529
+ body: {
4530
+ id: "https://www.uo.com/place",
4531
+ entityType: "cwrc:place",
4532
+ certainty: "edit:qualityMedium"
4533
+ }
4534
+ };
4535
+ var withPrecision = {
4536
+ ...common.annotation,
4537
+ body: {
4538
+ id: "https://www.uo.com/place",
4539
+ entityType: "cwrc:place",
4540
+ precision: "edit:qualityHigh"
4541
+ }
4542
+ };
4543
+ var withLabelAndDescription2 = {
4544
+ ...common.annotation,
4545
+ body: {
4546
+ id: "https://www.uo.com/place",
4547
+ entityType: "cwrc:place",
4548
+ label: "Paris",
4549
+ description: "A place"
4550
+ }
4551
+ };
4552
+ var place = {
4553
+ valid: {
4554
+ real: real2,
4555
+ fictional: fictional2,
4556
+ withCertainty: withCertainty2,
4557
+ withPrecision,
4558
+ withLabelAndDescription: withLabelAndDescription2
4559
+ }
4560
+ };
4561
+
4437
4562
  // src/v1/mocks/body/citation.ts
4438
4563
  var simple = {
4439
4564
  ...common.annotation,
@@ -4443,7 +4568,7 @@ var simple = {
4443
4568
  entityType: ["cito:Citation", "crm:E73_Information_Object"]
4444
4569
  }
4445
4570
  };
4446
- var withCertainty = {
4571
+ var withCertainty3 = {
4447
4572
  ...common.annotation,
4448
4573
  motivation: ["citing", "crm:E33_Linguistic_Object"],
4449
4574
  body: {
@@ -4452,7 +4577,7 @@ var withCertainty = {
4452
4577
  certainty: "edit:qualityHigh"
4453
4578
  }
4454
4579
  };
4455
- var withLabelAndDescription = {
4580
+ var withLabelAndDescription3 = {
4456
4581
  ...common.annotation,
4457
4582
  motivation: ["citing", "crm:E33_Linguistic_Object"],
4458
4583
  body: {
@@ -4465,27 +4590,27 @@ var withLabelAndDescription = {
4465
4590
  var citation = {
4466
4591
  valid: {
4467
4592
  simple,
4468
- withCertainty,
4469
- withLabelAndDescription
4593
+ withCertainty: withCertainty3,
4594
+ withLabelAndDescription: withLabelAndDescription3
4470
4595
  }
4471
4596
  };
4472
4597
 
4473
4598
  // src/v1/mocks/body/conceptualObject.ts
4474
- var real = {
4599
+ var real3 = {
4475
4600
  ...common.annotation,
4476
4601
  body: {
4477
4602
  id: "https://www.uo.com/conceptualObject",
4478
4603
  entityType: "crm:E28_Conceptual_Object"
4479
4604
  }
4480
4605
  };
4481
- var fictional = {
4606
+ var fictional3 = {
4482
4607
  ...common.annotation,
4483
4608
  body: {
4484
4609
  id: "https://www.uo.com/conceptualObject",
4485
4610
  entityType: ["crm:E28_Conceptual_Object", "wikidata:Q15831596"]
4486
4611
  }
4487
4612
  };
4488
- var withCertainty2 = {
4613
+ var withCertainty4 = {
4489
4614
  ...common.annotation,
4490
4615
  body: {
4491
4616
  id: "https://www.uo.com/conceptualObject",
@@ -4493,7 +4618,7 @@ var withCertainty2 = {
4493
4618
  certainty: "edit:qualityMedium"
4494
4619
  }
4495
4620
  };
4496
- var withLabelAndDescription2 = {
4621
+ var withLabelAndDescription4 = {
4497
4622
  ...common.annotation,
4498
4623
  body: {
4499
4624
  id: "https://www.uo.com/conceptualObject",
@@ -4504,10 +4629,10 @@ var withLabelAndDescription2 = {
4504
4629
  };
4505
4630
  var conceptualObject = {
4506
4631
  valid: {
4507
- real,
4508
- fictional,
4509
- withCertainty: withCertainty2,
4510
- withLabelAndDescription: withLabelAndDescription2
4632
+ real: real3,
4633
+ fictional: fictional3,
4634
+ withCertainty: withCertainty4,
4635
+ withLabelAndDescription: withLabelAndDescription4
4511
4636
  }
4512
4637
  };
4513
4638
 
@@ -4536,7 +4661,7 @@ var simple2 = {
4536
4661
  value: "2012-03-01T00:00:00/2012-02-01T18:21:07"
4537
4662
  }
4538
4663
  };
4539
- var withCertainty3 = {
4664
+ var withCertainty5 = {
4540
4665
  ...common.annotation,
4541
4666
  body: {
4542
4667
  id: "55369c00-5c43-4d1a-8462-31c74fbec584",
@@ -4546,7 +4671,7 @@ var withCertainty3 = {
4546
4671
  certainty: "edit:qualityMedium"
4547
4672
  }
4548
4673
  };
4549
- var withPrecision = {
4674
+ var withPrecision2 = {
4550
4675
  ...common.annotation,
4551
4676
  body: {
4552
4677
  id: "55369c00-5c43-4d1a-8462-31c74fbec584",
@@ -4559,8 +4684,8 @@ var withPrecision = {
4559
4684
  var date = {
4560
4685
  valid: {
4561
4686
  simple: simple2,
4562
- withCertainty: withCertainty3,
4563
- withPrecision
4687
+ withCertainty: withCertainty5,
4688
+ withPrecision: withPrecision2
4564
4689
  }
4565
4690
  };
4566
4691
 
@@ -4622,7 +4747,7 @@ var simple3 = {
4622
4747
  entityType: "crmdig:D1_Digital_Object"
4623
4748
  }
4624
4749
  };
4625
- var withCertainty4 = {
4750
+ var withCertainty6 = {
4626
4751
  ...common.annotation,
4627
4752
  motivation: ["linking", "crm:E33_Linguistic_Object"],
4628
4753
  body: {
@@ -4634,7 +4759,7 @@ var withCertainty4 = {
4634
4759
  var link = {
4635
4760
  valid: {
4636
4761
  simple: simple3,
4637
- withCertainty: withCertainty4
4762
+ withCertainty: withCertainty6
4638
4763
  }
4639
4764
  };
4640
4765
 
@@ -4656,7 +4781,7 @@ var additionalType = {
4656
4781
  id: "55369c00-5c43-4d1a-8462-31c74fbec584",
4657
4782
  type: "TextualBody",
4658
4783
  entityType: "crm:E33_Linguistic_Object",
4659
- additionalType: "scholarly",
4784
+ additionalType: "cwrc:NoteScholarly",
4660
4785
  value: "this is a note"
4661
4786
  }
4662
4787
  };
@@ -4680,21 +4805,21 @@ var note = {
4680
4805
  };
4681
4806
 
4682
4807
  // src/v1/mocks/body/organization.ts
4683
- var real2 = {
4808
+ var real4 = {
4684
4809
  ...common.annotation,
4685
4810
  body: {
4686
4811
  id: "https://www.uo.com/organization",
4687
4812
  entityType: ["foaf:Organization", "crm:E74_Group"]
4688
4813
  }
4689
4814
  };
4690
- var fictional2 = {
4815
+ var fictional4 = {
4691
4816
  ...common.annotation,
4692
4817
  body: {
4693
4818
  id: "https://www.uo.com/organization",
4694
4819
  entityType: ["foaf:Organization", "crm:E89_Propositional_Object"]
4695
4820
  }
4696
4821
  };
4697
- var withCertainty5 = {
4822
+ var withCertainty7 = {
4698
4823
  ...common.annotation,
4699
4824
  body: {
4700
4825
  id: "https://www.uo.com/organization",
@@ -4702,7 +4827,7 @@ var withCertainty5 = {
4702
4827
  certainty: "edit:qualityHigh"
4703
4828
  }
4704
4829
  };
4705
- var withLabelAndDescription3 = {
4830
+ var withLabelAndDescription5 = {
4706
4831
  ...common.annotation,
4707
4832
  body: {
4708
4833
  id: "https://www.uo.com/organization",
@@ -4713,74 +4838,29 @@ var withLabelAndDescription3 = {
4713
4838
  };
4714
4839
  var organization = {
4715
4840
  valid: {
4716
- real: real2,
4717
- fictional: fictional2,
4718
- withCertainty: withCertainty5,
4719
- withLabelAndDescription: withLabelAndDescription3
4720
- }
4721
- };
4722
-
4723
- // src/v1/mocks/body/person.ts
4724
- var commonPersonBody = {
4725
- id: "https://www.uo.com/person",
4726
- entityType: ["Person", "crm:E21_Person"]
4727
- };
4728
- var real3 = {
4729
- ...common.annotation,
4730
- body: {
4731
- id: "https://www.uo.com/person",
4732
- entityType: ["Person", "crm:E21_Person"]
4733
- }
4734
- };
4735
- var fictional3 = {
4736
- ...common.annotation,
4737
- body: {
4738
- id: "https://www.uo.com/person",
4739
- entityType: ["Person", "crm:E89_Propositional_Object"]
4740
- }
4741
- };
4742
- var withCertainty6 = {
4743
- ...common.annotation,
4744
- body: {
4745
- id: "https://www.uo.com/person",
4746
- entityType: ["Person", "crm:E21_Person"],
4747
- certainty: "edit:qualityLow"
4748
- }
4749
- };
4750
- var withLabelAndDescription4 = {
4751
- ...common.annotation,
4752
- body: {
4753
- id: "https://www.uo.com/person",
4754
- entityType: ["Person", "crm:E21_Person"],
4755
- label: "John",
4756
- description: "A person"
4757
- }
4758
- };
4759
- var person = {
4760
- valid: {
4761
- real: real3,
4762
- fictional: fictional3,
4763
- withCertainty: withCertainty6,
4764
- withLabelAndDescription: withLabelAndDescription4
4841
+ real: real4,
4842
+ fictional: fictional4,
4843
+ withCertainty: withCertainty7,
4844
+ withLabelAndDescription: withLabelAndDescription5
4765
4845
  }
4766
4846
  };
4767
4847
 
4768
4848
  // src/v1/mocks/body/physicalThing.ts
4769
- var real4 = {
4849
+ var real5 = {
4770
4850
  ...common.annotation,
4771
4851
  body: {
4772
4852
  id: "https://www.uo.com/pysicalThing",
4773
4853
  entityType: "crm:E18_Physical_Thing"
4774
4854
  }
4775
4855
  };
4776
- var fictional4 = {
4856
+ var fictional5 = {
4777
4857
  ...common.annotation,
4778
4858
  body: {
4779
4859
  id: "https://www.uo.com/pysicalThing",
4780
4860
  entityType: ["crm:E18_Physical_Thing", "wikidata:Q15831596"]
4781
4861
  }
4782
4862
  };
4783
- var withCertainty7 = {
4863
+ var withCertainty8 = {
4784
4864
  ...common.annotation,
4785
4865
  body: {
4786
4866
  id: "https://www.uo.com/pysicalThing",
@@ -4788,7 +4868,7 @@ var withCertainty7 = {
4788
4868
  certainty: "edit:qualityLow"
4789
4869
  }
4790
4870
  };
4791
- var withLabelAndDescription5 = {
4871
+ var withLabelAndDescription6 = {
4792
4872
  ...common.annotation,
4793
4873
  body: {
4794
4874
  id: "https://www.uo.com/pysicalThing",
@@ -4798,60 +4878,10 @@ var withLabelAndDescription5 = {
4798
4878
  }
4799
4879
  };
4800
4880
  var physicalThing = {
4801
- valid: {
4802
- real: real4,
4803
- fictional: fictional4,
4804
- withCertainty: withCertainty7,
4805
- withLabelAndDescription: withLabelAndDescription5
4806
- }
4807
- };
4808
-
4809
- // src/v1/mocks/body/place.ts
4810
- var real5 = {
4811
- ...common.annotation,
4812
- body: {
4813
- id: "https://www.uo.com/place",
4814
- entityType: "cwrc:place"
4815
- }
4816
- };
4817
- var fictional5 = {
4818
- ...common.annotation,
4819
- body: {
4820
- id: "https://www.uo.com/place",
4821
- entityType: ["cwrc:place", "crm:E89_Propositional_Object"]
4822
- }
4823
- };
4824
- var withCertainty8 = {
4825
- ...common.annotation,
4826
- body: {
4827
- id: "https://www.uo.com/place",
4828
- entityType: "cwrc:place",
4829
- certainty: "edit:qualityMedium"
4830
- }
4831
- };
4832
- var withPrecision2 = {
4833
- ...common.annotation,
4834
- body: {
4835
- id: "https://www.uo.com/place",
4836
- entityType: "cwrc:place",
4837
- precision: "edit:qualityHigh"
4838
- }
4839
- };
4840
- var withLabelAndDescription6 = {
4841
- ...common.annotation,
4842
- body: {
4843
- id: "https://www.uo.com/place",
4844
- entityType: "cwrc:place",
4845
- label: "Paris",
4846
- description: "A place"
4847
- }
4848
- };
4849
- var place = {
4850
4881
  valid: {
4851
4882
  real: real5,
4852
4883
  fictional: fictional5,
4853
4884
  withCertainty: withCertainty8,
4854
- withPrecision: withPrecision2,
4855
4885
  withLabelAndDescription: withLabelAndDescription6
4856
4886
  }
4857
4887
  };
@@ -4897,6 +4927,17 @@ var work = {
4897
4927
  }
4898
4928
  };
4899
4929
 
4930
+ // src/v1/mocks/body/index.ts
4931
+ var personPlace = {
4932
+ ...common.annotation,
4933
+ body: [commonPersonBody, commonPlaceBody]
4934
+ };
4935
+ var multipleBodies = {
4936
+ valid: {
4937
+ personPlace
4938
+ }
4939
+ };
4940
+
4900
4941
  // src/v1/mocks/root/agent.ts
4901
4942
  var creatorSimple = {
4902
4943
  ...common.annotation,
@@ -4920,12 +4961,17 @@ var generatorWithVersion = {
4920
4961
  ...common.annotation,
4921
4962
  generator: { ...common.software, softwareVersion: "v1.2.5" }
4922
4963
  };
4964
+ var { creator } = common.annotation;
4965
+ var noCreator = {
4966
+ ...common.annotation
4967
+ };
4923
4968
  var agent = {
4924
4969
  valid: {
4925
4970
  creator: {
4926
4971
  simple: creatorSimple,
4927
4972
  withContributor: creatorWithContributor,
4928
- withMultipleContributors: creatorWithMultipleContributors
4973
+ withMultipleContributors: creatorWithMultipleContributors,
4974
+ noCreator
4929
4975
  },
4930
4976
  generator: {
4931
4977
  simple: generatorSimple,
@@ -5240,10 +5286,24 @@ var generateValidExamples = async () => {
5240
5286
  await import_fs_extra.default.writeJSON(path.join(FOLDER, "creator.jsonld"), agent.valid.creator.simple, JSON_OPTIONS);
5241
5287
  await import_fs_extra.default.writeJSON(
5242
5288
  path.join(FOLDER, "creator_with_contributor.jsonld"),
5289
+ agent.valid.creator.withContributor,
5290
+ JSON_OPTIONS
5291
+ );
5292
+ await import_fs_extra.default.writeJSON(
5293
+ path.join(FOLDER, "creator_with_multiple_contributors.jsonld"),
5243
5294
  agent.valid.creator.withMultipleContributors,
5244
5295
  JSON_OPTIONS
5245
5296
  );
5246
- await import_fs_extra.default.writeJSON(path.join(FOLDER, "generator.jsonld"), agent.valid.generator, JSON_OPTIONS);
5297
+ await import_fs_extra.default.writeJSON(
5298
+ path.join(FOLDER, "no_creator.jsonld"),
5299
+ agent.valid.creator.noCreator,
5300
+ JSON_OPTIONS
5301
+ );
5302
+ await import_fs_extra.default.writeJSON(
5303
+ path.join(FOLDER, "generator.jsonld"),
5304
+ agent.valid.generator.simple,
5305
+ JSON_OPTIONS
5306
+ );
5247
5307
  await import_fs_extra.default.writeJSON(
5248
5308
  path.join(FOLDER, "generator_with_version.jsonld"),
5249
5309
  agent.valid.generator.withVersion,
@@ -5302,7 +5362,11 @@ var generateValidExamples = async () => {
5302
5362
  place.valid.fictional,
5303
5363
  JSON_OPTIONS
5304
5364
  );
5305
- await import_fs_extra.default.writeJSON(path.join(FOLDER, "place_with_precision.jsonld"), place.valid, JSON_OPTIONS);
5365
+ await import_fs_extra.default.writeJSON(
5366
+ path.join(FOLDER, "place_with_precision.jsonld"),
5367
+ place.valid.withPrecision,
5368
+ JSON_OPTIONS
5369
+ );
5306
5370
  await import_fs_extra.default.writeJSON(
5307
5371
  path.join(FOLDER, "organization.jsonld"),
5308
5372
  organization.valid.real,
@@ -5313,21 +5377,25 @@ var generateValidExamples = async () => {
5313
5377
  organization.valid.fictional,
5314
5378
  JSON_OPTIONS
5315
5379
  );
5316
- await import_fs_extra.default.writeJSON(path.join(FOLDER, "work.jsonld"), work.valid, JSON_OPTIONS);
5380
+ await import_fs_extra.default.writeJSON(path.join(FOLDER, "work_real.jsonld"), work.valid.real, JSON_OPTIONS);
5317
5381
  await import_fs_extra.default.writeJSON(
5318
5382
  path.join(FOLDER, "work_fictional.jsonld"),
5319
5383
  work.valid.fictional,
5320
5384
  JSON_OPTIONS
5321
5385
  );
5322
- await import_fs_extra.default.writeJSON(path.join(FOLDER, "physical_thing.jsonld"), physicalThing.valid, JSON_OPTIONS);
5386
+ await import_fs_extra.default.writeJSON(
5387
+ path.join(FOLDER, "physical_thing_real.jsonld"),
5388
+ physicalThing.valid.real,
5389
+ JSON_OPTIONS
5390
+ );
5323
5391
  await import_fs_extra.default.writeJSON(
5324
5392
  path.join(FOLDER, "physical_thing_fictional.jsonld"),
5325
5393
  physicalThing.valid.fictional,
5326
5394
  JSON_OPTIONS
5327
5395
  );
5328
5396
  await import_fs_extra.default.writeJSON(
5329
- path.join(FOLDER, "conceptual_object.jsonld"),
5330
- conceptualObject.valid,
5397
+ path.join(FOLDER, "conceptual_object_real.jsonld"),
5398
+ conceptualObject.valid.real,
5331
5399
  JSON_OPTIONS
5332
5400
  );
5333
5401
  await import_fs_extra.default.writeJSON(
@@ -5351,7 +5419,7 @@ var generateValidExamples = async () => {
5351
5419
  await import_fs_extra.default.writeJSON(path.join(FOLDER, "correction.jsonld"), correction.valid, JSON_OPTIONS);
5352
5420
  await import_fs_extra.default.writeJSON(
5353
5421
  path.join(FOLDER, "keyword_vocabulary.jsonld"),
5354
- keyword.valid.vocabulary,
5422
+ keyword.valid.vocabulary.simple,
5355
5423
  JSON_OPTIONS
5356
5424
  );
5357
5425
  await import_fs_extra.default.writeJSON(
@@ -5360,6 +5428,11 @@ var generateValidExamples = async () => {
5360
5428
  JSON_OPTIONS
5361
5429
  );
5362
5430
  await import_fs_extra.default.writeJSON(path.join(FOLDER, "link.jsonld"), link.valid.simple, JSON_OPTIONS);
5431
+ await import_fs_extra.default.writeJSON(
5432
+ path.join(FOLDER, "multiple_bodies.jsonld"),
5433
+ multipleBodies.valid.personPlace,
5434
+ JSON_OPTIONS
5435
+ );
5363
5436
  };
5364
5437
 
5365
5438
  // src/v1/generate/jsonld.ts