@lincs.project/webannotation-schema 1.8.0 → 1.10.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/index.d.mts +99 -89
- package/dist/index.d.ts +99 -89
- package/dist/index.js +122 -189
- package/dist/index.mjs +113 -186
- package/dist/v1/jsonld/context.jsonld +25 -19
- package/dist/v1/jsonld/defs.jsonld +2 -2
- package/dist/v1/jsonld/schema.jsonld +47 -189
- package/dist/v1/standalone/linc-wa-validator.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43,15 +43,18 @@ __export(src_exports, {
|
|
|
43
43
|
DATE_RANGE_PATTERN: () => DATE_RANGE_PATTERN,
|
|
44
44
|
Date: () => Date,
|
|
45
45
|
DateEntityType: () => DateEntityType,
|
|
46
|
+
Description: () => Description,
|
|
46
47
|
Event: () => Event,
|
|
47
48
|
EventEntityType: () => EventEntityType,
|
|
48
|
-
IdentifiedBy: () => IdentifiedBy,
|
|
49
49
|
Keyword: () => Keyword,
|
|
50
50
|
KeywordEntityType: () => KeywordEntityType,
|
|
51
51
|
KeywordFolksnomy: () => KeywordFolksnomy,
|
|
52
52
|
KeywordFolksnomyEntityType: () => KeywordFolksnomyEntityType,
|
|
53
|
+
Label: () => Label,
|
|
53
54
|
Link: () => Link,
|
|
54
55
|
LinkEntityType: () => LinkEntityType,
|
|
56
|
+
ModeExistence: () => ModeExistence,
|
|
57
|
+
Motivation: () => Motivation,
|
|
55
58
|
Note: () => Note,
|
|
56
59
|
NoteEntityType: () => NoteEntityType,
|
|
57
60
|
Organization: () => Organization,
|
|
@@ -68,7 +71,6 @@ __export(src_exports, {
|
|
|
68
71
|
Selector: () => Selector,
|
|
69
72
|
Software: () => Software,
|
|
70
73
|
Source: () => Source,
|
|
71
|
-
Status: () => Status,
|
|
72
74
|
Target: () => Target,
|
|
73
75
|
TextPositionSelector: () => TextPositionSelector,
|
|
74
76
|
TextPositionSelectorExtended: () => TextPositionSelectorExtended,
|
|
@@ -101,17 +103,21 @@ __export(src_exports, {
|
|
|
101
103
|
dateSchema: () => dateSchema,
|
|
102
104
|
definitionSchema: () => definitionSchema,
|
|
103
105
|
defsId: () => defsId,
|
|
106
|
+
descriptionSchema: () => descriptionSchema,
|
|
104
107
|
eventEntityTypeSchema: () => eventEntityTypeSchema,
|
|
105
108
|
eventSchema: () => eventSchema,
|
|
106
109
|
formatSchema: () => formatSchema,
|
|
107
|
-
|
|
110
|
+
isIdentifiedBy: () => isIdentifiedBy,
|
|
111
|
+
isIndentifyBySchema: () => isIndentifyBySchema,
|
|
108
112
|
keywordEntityTypeSchema: () => keywordEntityTypeSchema,
|
|
109
113
|
keywordFolksnomyEntityTypeSchema: () => keywordFolksnomyEntityTypeSchema,
|
|
110
114
|
keywordFolksnomySchema: () => keywordFolksnomySchema,
|
|
111
115
|
keywordSchema: () => keywordSchema,
|
|
116
|
+
labelSchema: () => labelSchema,
|
|
112
117
|
languageSchema: () => languageSchema,
|
|
113
118
|
linkEntityTypeSchema: () => linkEntityTypeSchema,
|
|
114
119
|
linkSchema: () => linkSchema,
|
|
120
|
+
modeExistenceSchema: () => modeExistenceSchema,
|
|
115
121
|
noteEntityTypeSchema: () => noteEntityTypeSchema,
|
|
116
122
|
noteSchema: () => noteSchema,
|
|
117
123
|
organizationEntityTypeSchema: () => organizationEntityTypeSchema,
|
|
@@ -165,38 +171,44 @@ var schemaContext = {
|
|
|
165
171
|
wikidata: "http://www.wikidata.org/entity/",
|
|
166
172
|
crm: "http://www.cidoc-crm.org/cidoc-crm/",
|
|
167
173
|
crmdig: "http://www.ics.forth.gr/isl/CRMdig/",
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
174
|
+
citing: "edit:citing",
|
|
175
|
+
correcting: "edit:correcting",
|
|
176
|
+
"oa:identifying": {
|
|
177
|
+
type: "crm:E55_Type"
|
|
178
|
+
},
|
|
179
|
+
"oa:describing": {
|
|
180
|
+
type: "crm:E55_Type"
|
|
181
|
+
},
|
|
182
|
+
"oa:tagging": {
|
|
183
|
+
type: "crm:E55_Type"
|
|
184
|
+
},
|
|
185
|
+
"oa:classifying": {
|
|
186
|
+
type: "crm:E55_Type"
|
|
187
|
+
},
|
|
188
|
+
"oa:linking": {
|
|
189
|
+
type: "crm:E55_Type"
|
|
171
190
|
},
|
|
172
191
|
certainty: {
|
|
173
192
|
"@type": "@id",
|
|
174
|
-
"@id": "
|
|
193
|
+
"@id": "http://temp.lincsproject.ca/certainty"
|
|
194
|
+
},
|
|
195
|
+
precision: {
|
|
196
|
+
"@type": "@id",
|
|
197
|
+
"@id": "http://temp.lincsproject.ca/precision"
|
|
175
198
|
},
|
|
176
199
|
contributor: "dcterms:contributor",
|
|
177
|
-
description: "rdfs:comment",
|
|
178
200
|
entityType: {
|
|
179
201
|
"@type": "@id",
|
|
180
202
|
"@id": "rdf:type"
|
|
181
203
|
},
|
|
182
|
-
|
|
183
|
-
modeExistence: "edit:ModeExistence",
|
|
184
|
-
precision: {
|
|
185
|
-
"@type": "@id",
|
|
186
|
-
"@id": "crm:P2_has_type"
|
|
187
|
-
},
|
|
188
|
-
softwareVersion: "schema:softwareVersion",
|
|
189
|
-
status: {
|
|
204
|
+
additionalType: {
|
|
190
205
|
"@type": "@id",
|
|
191
206
|
"@id": "crm:P2_has_type"
|
|
192
207
|
},
|
|
208
|
+
modeExistence: "edit:ModeExistence",
|
|
209
|
+
description: "rdfs:comment",
|
|
193
210
|
title: "crm:P190_has_symbolic_content",
|
|
194
|
-
|
|
195
|
-
approved: "edit:statusApproved",
|
|
196
|
-
citing: "edit:citing",
|
|
197
|
-
correcting: "edit:correcting",
|
|
198
|
-
draft: "edit:statusDraft",
|
|
199
|
-
published: "edit:statusPublished"
|
|
211
|
+
softwareVersion: "schema:softwareVersion"
|
|
200
212
|
}
|
|
201
213
|
};
|
|
202
214
|
|
|
@@ -222,7 +234,7 @@ var softwareIdDescription = "The IRI that identifies the agent (software).";
|
|
|
222
234
|
var Software = import_zod.z.object({
|
|
223
235
|
id: import_zod.z.string().url().describe(softwareIdDescription),
|
|
224
236
|
type: import_zod.z.literal("Software").describe("The type of the Agent."),
|
|
225
|
-
|
|
237
|
+
P16_used_specific_object: import_zod.z.string().url().optional(),
|
|
226
238
|
label: import_zod.z.string().min(1).describe("The name of the software."),
|
|
227
239
|
softwareVersion: import_zod.z.string().optional().describe("The software version.")
|
|
228
240
|
}).describe("Software Agent");
|
|
@@ -232,7 +244,7 @@ var softwareSchema = {
|
|
|
232
244
|
properties: {
|
|
233
245
|
id: { type: "string", format: "uri", description: softwareIdDescription },
|
|
234
246
|
type: { type: "string", const: "Software" },
|
|
235
|
-
|
|
247
|
+
P16_used_specific_object: { type: "string", format: "uri" },
|
|
236
248
|
label: { type: "string", minLength: 1, description: "The name of the software." },
|
|
237
249
|
softwareVersion: { type: "string", description: "The software version." }
|
|
238
250
|
},
|
|
@@ -1385,7 +1397,7 @@ var languageSchema = {
|
|
|
1385
1397
|
maxLength: 3
|
|
1386
1398
|
};
|
|
1387
1399
|
var sourceIdDescription = "The IRI that identifies the Target source.";
|
|
1388
|
-
var
|
|
1400
|
+
var isIdentifiedBy = import_zod23.z.object({
|
|
1389
1401
|
id: import_zod23.z.string().url(),
|
|
1390
1402
|
type: import_zod23.z.literal("crm:E33_E41_Linguistic_Appellation"),
|
|
1391
1403
|
title: import_zod23.z.string().min(1, { message: "The title cannot be empty" }).describe("The title of the document being annotated.")
|
|
@@ -1396,12 +1408,12 @@ var Source = import_zod23.z.object({
|
|
|
1396
1408
|
format: import_zod23.z.union([Format, import_zod23.z.array(Format).min(1)]).optional().describe(
|
|
1397
1409
|
"The formats of the Web Resource's content. The value of the property should and array of media-types of the format, following the [rfc6838] specification."
|
|
1398
1410
|
),
|
|
1399
|
-
|
|
1411
|
+
P1_is_identified_by: isIdentifiedBy.optional(),
|
|
1400
1412
|
language: import_zod23.z.union([Language, import_zod23.z.array(Language).min(1)]).optional().describe(
|
|
1401
1413
|
"The languages of the Web Resource's content. The value of the property should be an array of language code following the [bcp47] specification."
|
|
1402
1414
|
)
|
|
1403
1415
|
}).describe("Web Annotation Target");
|
|
1404
|
-
var
|
|
1416
|
+
var isIndentifyBySchema = {
|
|
1405
1417
|
type: "object",
|
|
1406
1418
|
description: "indentifyBy",
|
|
1407
1419
|
properties: {
|
|
@@ -1434,7 +1446,7 @@ var sourceSchema = {
|
|
|
1434
1446
|
}
|
|
1435
1447
|
]
|
|
1436
1448
|
},
|
|
1437
|
-
|
|
1449
|
+
P1_is_identified_by: { ...isIndentifyBySchema, nullable: true },
|
|
1438
1450
|
language: {
|
|
1439
1451
|
type: ["string", "array"],
|
|
1440
1452
|
nullable: true,
|
|
@@ -1655,69 +1667,40 @@ var definitionSchema = {
|
|
|
1655
1667
|
};
|
|
1656
1668
|
|
|
1657
1669
|
// src/v1/schema/root.ts
|
|
1658
|
-
var import_zod27 = require("zod");
|
|
1659
|
-
|
|
1660
|
-
// src/v1/schema/definitions/motivation.ts
|
|
1661
1670
|
var import_zod26 = require("zod");
|
|
1662
|
-
var
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
]
|
|
1671
|
-
var
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
type: "object",
|
|
1677
|
-
properties: {
|
|
1678
|
-
type: { type: "string", const: "crm:E55_Type" }
|
|
1679
|
-
},
|
|
1680
|
-
required: ["type"]
|
|
1681
|
-
};
|
|
1682
|
-
var motivationSchema = {
|
|
1683
|
-
type: "object",
|
|
1684
|
-
description: "The relationship between an Annotation and a Motivation.",
|
|
1685
|
-
properties: {
|
|
1686
|
-
identifying: { ...motivationType, nullable: true },
|
|
1687
|
-
describing: { ...motivationType, nullable: true },
|
|
1688
|
-
correcting: { ...motivationType, nullable: true },
|
|
1689
|
-
tagging: { ...motivationType, nullable: true },
|
|
1690
|
-
classifying: { ...motivationType, nullable: true },
|
|
1691
|
-
linking: { ...motivationType, nullable: true },
|
|
1692
|
-
citing: { ...motivationType, nullable: true }
|
|
1693
|
-
}
|
|
1694
|
-
};
|
|
1695
|
-
|
|
1696
|
-
// src/v1/schema/root.ts
|
|
1697
|
-
var Status = ["edit:statusDraft", "edit:statusApproved", "edit:statusPublished"];
|
|
1698
|
-
var WebAnnotation = import_zod27.z.object({
|
|
1699
|
-
"@context": import_zod27.z.tuple([
|
|
1700
|
-
import_zod27.z.literal("http://www.w3.org/ns/anno.jsonld").describe("W3C Web Annotation Context."),
|
|
1701
|
-
import_zod27.z.literal(contextUri).describe("LINCS Web Annotation Context.")
|
|
1671
|
+
var Motivation = [
|
|
1672
|
+
"oa:identifying",
|
|
1673
|
+
"oa:describing",
|
|
1674
|
+
"correcting",
|
|
1675
|
+
"oa:tagging",
|
|
1676
|
+
"oa:classifying",
|
|
1677
|
+
"oa:linking",
|
|
1678
|
+
"citing"
|
|
1679
|
+
];
|
|
1680
|
+
var WebAnnotation = import_zod26.z.object({
|
|
1681
|
+
"@context": import_zod26.z.tuple([
|
|
1682
|
+
import_zod26.z.literal("http://www.w3.org/ns/anno.jsonld").describe("W3C Web Annotation Context."),
|
|
1683
|
+
import_zod26.z.literal("https://www.cidoc-crm.org/cidoc-crm/json-ld_context.jsonld").describe("CIDOC Web Annotation Context."),
|
|
1684
|
+
import_zod26.z.literal(contextUri).describe("LINCS Web Annotation Context.")
|
|
1702
1685
|
]).describe(
|
|
1703
1686
|
"The context that determines the meaning of the JSON as an Annotation. The itens should point to a URI containing the defiintion used in this schema."
|
|
1704
1687
|
),
|
|
1705
|
-
id:
|
|
1706
|
-
type:
|
|
1707
|
-
motivation: Motivation,
|
|
1708
|
-
created:
|
|
1709
|
-
modified:
|
|
1688
|
+
id: import_zod26.z.string().url().describe("The identity of the Annotation."),
|
|
1689
|
+
type: import_zod26.z.tuple([import_zod26.z.literal("Annotation"), import_zod26.z.literal("crm:E33_Linguistic_Object")]).describe("The type of the Annotation."),
|
|
1690
|
+
motivation: import_zod26.z.enum(Motivation).describe("The relationship between an Annotation and a Motivation."),
|
|
1691
|
+
created: import_zod26.z.string().datetime().describe("The time at which the resource was created."),
|
|
1692
|
+
modified: import_zod26.z.string().datetime().optional().describe("The time at which the resource was modified, after creation."),
|
|
1710
1693
|
creator: User.describe("The agent responsible for creating the resource.").optional(),
|
|
1711
|
-
contributor:
|
|
1694
|
+
contributor: import_zod26.z.array(User.describe("The agents responsible for modifying the resource.")).nonempty().optional().describe("The agents responsible for modifying the resource."),
|
|
1712
1695
|
generator: Software.describe(
|
|
1713
1696
|
"The agent responsible for generating the serialization of the Annotation. "
|
|
1714
1697
|
),
|
|
1715
1698
|
target: Target.describe("The relationship between an Annotation and its Target."),
|
|
1716
|
-
body:
|
|
1699
|
+
body: import_zod26.z.union([BodyChoice, Body, import_zod26.z.array(Body)]).describe("The relationship between an Annotation and its Body."),
|
|
1717
1700
|
certainty: Certainty.optional(),
|
|
1718
1701
|
precision: Precision.optional(),
|
|
1719
|
-
label:
|
|
1720
|
-
|
|
1702
|
+
label: import_zod26.z.string().min(1, { message: "The label cannot be empty" }).optional().describe("The descriptive label for the annotation"),
|
|
1703
|
+
P2_has_type: import_zod26.z.union([import_zod26.z.string().min(3), import_zod26.z.array(import_zod26.z.string().min(3)).min(1)]).optional()
|
|
1721
1704
|
}).describe("Web Annotation Root");
|
|
1722
1705
|
var webAnnotationSchema = {
|
|
1723
1706
|
$id: schemaId,
|
|
@@ -1726,10 +1709,11 @@ var webAnnotationSchema = {
|
|
|
1726
1709
|
properties: {
|
|
1727
1710
|
"@context": {
|
|
1728
1711
|
type: "array",
|
|
1729
|
-
minItems:
|
|
1730
|
-
maxItems:
|
|
1712
|
+
minItems: 3,
|
|
1713
|
+
maxItems: 3,
|
|
1731
1714
|
items: [
|
|
1732
1715
|
{ type: "string", const: "http://www.w3.org/ns/anno.jsonld" },
|
|
1716
|
+
{ type: "string", const: "https://www.cidoc-crm.org/cidoc-crm/json-ld_context.jsonld" },
|
|
1733
1717
|
{ type: "string", const: contextUri }
|
|
1734
1718
|
],
|
|
1735
1719
|
description: "The context that determines the meaning of the JSON as an Annotation. The itens should point to a URI containing the defiintion used in this schema."
|
|
@@ -1749,7 +1733,11 @@ var webAnnotationSchema = {
|
|
|
1749
1733
|
],
|
|
1750
1734
|
description: "The type of the Annotation."
|
|
1751
1735
|
},
|
|
1752
|
-
motivation:
|
|
1736
|
+
motivation: {
|
|
1737
|
+
type: "string",
|
|
1738
|
+
enum: Motivation,
|
|
1739
|
+
description: "The relationship between an Annotation and a Motivation."
|
|
1740
|
+
},
|
|
1753
1741
|
created: {
|
|
1754
1742
|
type: "string",
|
|
1755
1743
|
format: "date-time",
|
|
@@ -1785,19 +1773,22 @@ var webAnnotationSchema = {
|
|
|
1785
1773
|
certainty: certaintySchema,
|
|
1786
1774
|
precision: precisionSchema,
|
|
1787
1775
|
label: { type: "string" },
|
|
1788
|
-
|
|
1776
|
+
P2_has_type: {
|
|
1777
|
+
oneOf: [
|
|
1778
|
+
{ type: "string", minLength: 3 },
|
|
1779
|
+
{
|
|
1780
|
+
type: "array",
|
|
1781
|
+
minItems: 1,
|
|
1782
|
+
items: {
|
|
1783
|
+
type: "string",
|
|
1784
|
+
minLength: 3
|
|
1785
|
+
},
|
|
1786
|
+
uniqueItems: true
|
|
1787
|
+
}
|
|
1788
|
+
]
|
|
1789
|
+
}
|
|
1789
1790
|
},
|
|
1790
|
-
required: [
|
|
1791
|
-
"@context",
|
|
1792
|
-
"id",
|
|
1793
|
-
"type",
|
|
1794
|
-
"motivation",
|
|
1795
|
-
"created",
|
|
1796
|
-
"generator",
|
|
1797
|
-
"target",
|
|
1798
|
-
"body",
|
|
1799
|
-
"status"
|
|
1800
|
-
],
|
|
1791
|
+
required: ["@context", "id", "type", "motivation", "created", "generator", "target", "body"],
|
|
1801
1792
|
additionalProperties: false,
|
|
1802
1793
|
allOf: [
|
|
1803
1794
|
{
|
|
@@ -1826,17 +1817,7 @@ var webAnnotationSchema = {
|
|
|
1826
1817
|
then: {
|
|
1827
1818
|
type: "object",
|
|
1828
1819
|
properties: {
|
|
1829
|
-
motivation: {
|
|
1830
|
-
type: "object",
|
|
1831
|
-
properties: {
|
|
1832
|
-
identifying: {
|
|
1833
|
-
type: "object",
|
|
1834
|
-
properties: {
|
|
1835
|
-
type: { type: "string", const: "crm:E55_Type" }
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
}
|
|
1820
|
+
motivation: { type: "string", const: "oa:identifying" }
|
|
1840
1821
|
}
|
|
1841
1822
|
},
|
|
1842
1823
|
else: {
|
|
@@ -1854,17 +1835,7 @@ var webAnnotationSchema = {
|
|
|
1854
1835
|
then: {
|
|
1855
1836
|
type: "object",
|
|
1856
1837
|
properties: {
|
|
1857
|
-
motivation: {
|
|
1858
|
-
type: "object",
|
|
1859
|
-
properties: {
|
|
1860
|
-
describing: {
|
|
1861
|
-
type: "object",
|
|
1862
|
-
properties: {
|
|
1863
|
-
type: { type: "string", const: "crm:E55_Type" }
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1838
|
+
motivation: { type: "string", const: "oa:describing" }
|
|
1868
1839
|
}
|
|
1869
1840
|
},
|
|
1870
1841
|
else: {
|
|
@@ -1882,17 +1853,7 @@ var webAnnotationSchema = {
|
|
|
1882
1853
|
then: {
|
|
1883
1854
|
type: "object",
|
|
1884
1855
|
properties: {
|
|
1885
|
-
motivation: {
|
|
1886
|
-
type: "object",
|
|
1887
|
-
properties: {
|
|
1888
|
-
correcting: {
|
|
1889
|
-
type: "object",
|
|
1890
|
-
properties: {
|
|
1891
|
-
type: { type: "string", const: "crm:E55_Type" }
|
|
1892
|
-
}
|
|
1893
|
-
}
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1856
|
+
motivation: { type: "string", const: "correcting" }
|
|
1896
1857
|
}
|
|
1897
1858
|
},
|
|
1898
1859
|
else: {
|
|
@@ -1910,17 +1871,7 @@ var webAnnotationSchema = {
|
|
|
1910
1871
|
then: {
|
|
1911
1872
|
type: "object",
|
|
1912
1873
|
properties: {
|
|
1913
|
-
motivation: {
|
|
1914
|
-
type: "object",
|
|
1915
|
-
properties: {
|
|
1916
|
-
tagging: {
|
|
1917
|
-
type: "object",
|
|
1918
|
-
properties: {
|
|
1919
|
-
type: { type: "string", const: "crm:E55_Type" }
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
}
|
|
1923
|
-
}
|
|
1874
|
+
motivation: { type: "string", const: "oa:tagging" }
|
|
1924
1875
|
}
|
|
1925
1876
|
},
|
|
1926
1877
|
else: {
|
|
@@ -1938,17 +1889,7 @@ var webAnnotationSchema = {
|
|
|
1938
1889
|
then: {
|
|
1939
1890
|
type: "object",
|
|
1940
1891
|
properties: {
|
|
1941
|
-
motivation: {
|
|
1942
|
-
type: "object",
|
|
1943
|
-
properties: {
|
|
1944
|
-
classifying: {
|
|
1945
|
-
type: "object",
|
|
1946
|
-
properties: {
|
|
1947
|
-
type: { type: "string", const: "crm:E55_Type" }
|
|
1948
|
-
}
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1892
|
+
motivation: { type: "string", const: "oa:classifying" }
|
|
1952
1893
|
}
|
|
1953
1894
|
},
|
|
1954
1895
|
else: {
|
|
@@ -1966,17 +1907,7 @@ var webAnnotationSchema = {
|
|
|
1966
1907
|
then: {
|
|
1967
1908
|
type: "object",
|
|
1968
1909
|
properties: {
|
|
1969
|
-
motivation: {
|
|
1970
|
-
type: "object",
|
|
1971
|
-
properties: {
|
|
1972
|
-
linking: {
|
|
1973
|
-
type: "object",
|
|
1974
|
-
properties: {
|
|
1975
|
-
type: { type: "string", const: "crm:E55_Type" }
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
}
|
|
1910
|
+
motivation: { type: "string", const: "oa:linking" }
|
|
1980
1911
|
}
|
|
1981
1912
|
},
|
|
1982
1913
|
else: {
|
|
@@ -1994,17 +1925,7 @@ var webAnnotationSchema = {
|
|
|
1994
1925
|
then: {
|
|
1995
1926
|
type: "object",
|
|
1996
1927
|
properties: {
|
|
1997
|
-
motivation: {
|
|
1998
|
-
type: "object",
|
|
1999
|
-
properties: {
|
|
2000
|
-
citing: {
|
|
2001
|
-
type: "object",
|
|
2002
|
-
properties: {
|
|
2003
|
-
type: { type: "string", const: "crm:E55_Type" }
|
|
2004
|
-
}
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
}
|
|
1928
|
+
motivation: { type: "string", const: "citing" }
|
|
2008
1929
|
}
|
|
2009
1930
|
}
|
|
2010
1931
|
}
|
|
@@ -2023,18 +1944,18 @@ var import_ajv = __toESM(require("ajv"));
|
|
|
2023
1944
|
var import_ajv_formats = __toESM(require("ajv-formats"));
|
|
2024
1945
|
|
|
2025
1946
|
// src/v1/validator/types.ts
|
|
2026
|
-
var
|
|
2027
|
-
var ValidationError =
|
|
2028
|
-
message:
|
|
2029
|
-
path:
|
|
2030
|
-
suggestion:
|
|
2031
|
-
context:
|
|
2032
|
-
errorType:
|
|
2033
|
-
}).and(
|
|
1947
|
+
var import_zod27 = require("zod");
|
|
1948
|
+
var ValidationError = import_zod27.z.object({
|
|
1949
|
+
message: import_zod27.z.string(),
|
|
1950
|
+
path: import_zod27.z.string(),
|
|
1951
|
+
suggestion: import_zod27.z.string().optional(),
|
|
1952
|
+
context: import_zod27.z.object({
|
|
1953
|
+
errorType: import_zod27.z.string()
|
|
1954
|
+
}).and(import_zod27.z.unknown())
|
|
2034
1955
|
});
|
|
2035
|
-
var ValidateResult =
|
|
2036
|
-
valid:
|
|
2037
|
-
errors:
|
|
1956
|
+
var ValidateResult = import_zod27.z.object({
|
|
1957
|
+
valid: import_zod27.z.boolean(),
|
|
1958
|
+
errors: import_zod27.z.array(ValidationError).optional()
|
|
2038
1959
|
});
|
|
2039
1960
|
|
|
2040
1961
|
// src/v1/validator/index.ts
|
|
@@ -2080,15 +2001,18 @@ __export(v1_exports, {
|
|
|
2080
2001
|
DATE_RANGE_PATTERN: () => DATE_RANGE_PATTERN,
|
|
2081
2002
|
Date: () => Date,
|
|
2082
2003
|
DateEntityType: () => DateEntityType,
|
|
2004
|
+
Description: () => Description,
|
|
2083
2005
|
Event: () => Event,
|
|
2084
2006
|
EventEntityType: () => EventEntityType,
|
|
2085
|
-
IdentifiedBy: () => IdentifiedBy,
|
|
2086
2007
|
Keyword: () => Keyword,
|
|
2087
2008
|
KeywordEntityType: () => KeywordEntityType,
|
|
2088
2009
|
KeywordFolksnomy: () => KeywordFolksnomy,
|
|
2089
2010
|
KeywordFolksnomyEntityType: () => KeywordFolksnomyEntityType,
|
|
2011
|
+
Label: () => Label,
|
|
2090
2012
|
Link: () => Link,
|
|
2091
2013
|
LinkEntityType: () => LinkEntityType,
|
|
2014
|
+
ModeExistence: () => ModeExistence,
|
|
2015
|
+
Motivation: () => Motivation,
|
|
2092
2016
|
Note: () => Note,
|
|
2093
2017
|
NoteEntityType: () => NoteEntityType,
|
|
2094
2018
|
Organization: () => Organization,
|
|
@@ -2105,7 +2029,6 @@ __export(v1_exports, {
|
|
|
2105
2029
|
Selector: () => Selector,
|
|
2106
2030
|
Software: () => Software,
|
|
2107
2031
|
Source: () => Source,
|
|
2108
|
-
Status: () => Status,
|
|
2109
2032
|
Target: () => Target,
|
|
2110
2033
|
TextPositionSelector: () => TextPositionSelector,
|
|
2111
2034
|
TextPositionSelectorExtended: () => TextPositionSelectorExtended,
|
|
@@ -2138,17 +2061,21 @@ __export(v1_exports, {
|
|
|
2138
2061
|
dateSchema: () => dateSchema,
|
|
2139
2062
|
definitionSchema: () => definitionSchema,
|
|
2140
2063
|
defsId: () => defsId,
|
|
2064
|
+
descriptionSchema: () => descriptionSchema,
|
|
2141
2065
|
eventEntityTypeSchema: () => eventEntityTypeSchema,
|
|
2142
2066
|
eventSchema: () => eventSchema,
|
|
2143
2067
|
formatSchema: () => formatSchema,
|
|
2144
|
-
|
|
2068
|
+
isIdentifiedBy: () => isIdentifiedBy,
|
|
2069
|
+
isIndentifyBySchema: () => isIndentifyBySchema,
|
|
2145
2070
|
keywordEntityTypeSchema: () => keywordEntityTypeSchema,
|
|
2146
2071
|
keywordFolksnomyEntityTypeSchema: () => keywordFolksnomyEntityTypeSchema,
|
|
2147
2072
|
keywordFolksnomySchema: () => keywordFolksnomySchema,
|
|
2148
2073
|
keywordSchema: () => keywordSchema,
|
|
2074
|
+
labelSchema: () => labelSchema,
|
|
2149
2075
|
languageSchema: () => languageSchema,
|
|
2150
2076
|
linkEntityTypeSchema: () => linkEntityTypeSchema,
|
|
2151
2077
|
linkSchema: () => linkSchema,
|
|
2078
|
+
modeExistenceSchema: () => modeExistenceSchema,
|
|
2152
2079
|
noteEntityTypeSchema: () => noteEntityTypeSchema,
|
|
2153
2080
|
noteSchema: () => noteSchema,
|
|
2154
2081
|
organizationEntityTypeSchema: () => organizationEntityTypeSchema,
|
|
@@ -2196,15 +2123,18 @@ __export(v1_exports, {
|
|
|
2196
2123
|
DATE_RANGE_PATTERN,
|
|
2197
2124
|
Date,
|
|
2198
2125
|
DateEntityType,
|
|
2126
|
+
Description,
|
|
2199
2127
|
Event,
|
|
2200
2128
|
EventEntityType,
|
|
2201
|
-
IdentifiedBy,
|
|
2202
2129
|
Keyword,
|
|
2203
2130
|
KeywordEntityType,
|
|
2204
2131
|
KeywordFolksnomy,
|
|
2205
2132
|
KeywordFolksnomyEntityType,
|
|
2133
|
+
Label,
|
|
2206
2134
|
Link,
|
|
2207
2135
|
LinkEntityType,
|
|
2136
|
+
ModeExistence,
|
|
2137
|
+
Motivation,
|
|
2208
2138
|
Note,
|
|
2209
2139
|
NoteEntityType,
|
|
2210
2140
|
Organization,
|
|
@@ -2221,7 +2151,6 @@ __export(v1_exports, {
|
|
|
2221
2151
|
Selector,
|
|
2222
2152
|
Software,
|
|
2223
2153
|
Source,
|
|
2224
|
-
Status,
|
|
2225
2154
|
Target,
|
|
2226
2155
|
TextPositionSelector,
|
|
2227
2156
|
TextPositionSelectorExtended,
|
|
@@ -2254,17 +2183,21 @@ __export(v1_exports, {
|
|
|
2254
2183
|
dateSchema,
|
|
2255
2184
|
definitionSchema,
|
|
2256
2185
|
defsId,
|
|
2186
|
+
descriptionSchema,
|
|
2257
2187
|
eventEntityTypeSchema,
|
|
2258
2188
|
eventSchema,
|
|
2259
2189
|
formatSchema,
|
|
2260
|
-
|
|
2190
|
+
isIdentifiedBy,
|
|
2191
|
+
isIndentifyBySchema,
|
|
2261
2192
|
keywordEntityTypeSchema,
|
|
2262
2193
|
keywordFolksnomyEntityTypeSchema,
|
|
2263
2194
|
keywordFolksnomySchema,
|
|
2264
2195
|
keywordSchema,
|
|
2196
|
+
labelSchema,
|
|
2265
2197
|
languageSchema,
|
|
2266
2198
|
linkEntityTypeSchema,
|
|
2267
2199
|
linkSchema,
|
|
2200
|
+
modeExistenceSchema,
|
|
2268
2201
|
noteEntityTypeSchema,
|
|
2269
2202
|
noteSchema,
|
|
2270
2203
|
organizationEntityTypeSchema,
|