@lincs.project/webannotation-schema 1.0.1 → 1.0.2
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/README.md +1 -1
- package/dist/index.d.mts +31 -29
- package/dist/index.d.ts +31 -29
- package/dist/index.js +24 -22
- package/dist/index.mjs +24 -22
- package/package.json +12 -14
- package/dist/v1/jsonld/context.jsonld +0 -24
- package/dist/v1/jsonld/defs.jsonld +0 -949
- package/dist/v1/jsonld/schema.jsonld +0 -621
- package/dist/v1/standalone/linc-wa-validator.js +0 -1
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ console.log(resultInvalid);
|
|
|
98
98
|
|
|
99
99
|
## Assets
|
|
100
100
|
|
|
101
|
-
Beyond the `validate` function, this module export multiple assets that can be used to build a custom validator ([Ajv Schema Object](#ajv-schema-object)) or assist the developer in building Web Annotations using Typescript ([
|
|
101
|
+
Beyond the `validate` function, this module export multiple assets that can be used to build a custom validator ([Ajv Schema Object](#ajv-schema-object)) or assist the developer in building Web Annotations using Typescript ([Typing](#typing)).
|
|
102
102
|
|
|
103
103
|
### Ajv Schema Object
|
|
104
104
|
|
package/dist/index.d.mts
CHANGED
|
@@ -4,33 +4,35 @@ import { z } from 'zod';
|
|
|
4
4
|
import * as ajv_dist_core from 'ajv/dist/core';
|
|
5
5
|
|
|
6
6
|
declare const VERSION = "v1";
|
|
7
|
-
declare const contextUri
|
|
8
|
-
declare const schemaId
|
|
9
|
-
declare const defsId
|
|
7
|
+
declare const contextUri = "https://wa.lincsproject.ca/v1/ns/anno.jsonld";
|
|
8
|
+
declare const schemaId = "https://wa.lincsproject.ca/v1/schema.jsonld";
|
|
9
|
+
declare const defsId = "https://wa.lincsproject.ca/v1/defs.jsonld";
|
|
10
10
|
|
|
11
11
|
declare const schemaContext: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
12
|
+
'@context': {
|
|
13
|
+
bf: string;
|
|
14
|
+
cito: string;
|
|
15
|
+
cwrc: string;
|
|
16
|
+
edit: string;
|
|
17
|
+
fabio: string;
|
|
18
|
+
frbroo: string;
|
|
19
|
+
wikidata: string;
|
|
20
|
+
crm: string;
|
|
21
|
+
crmdig: string;
|
|
22
|
+
certainty: string;
|
|
23
|
+
contributor: string;
|
|
24
|
+
description: string;
|
|
25
|
+
precision: string;
|
|
26
|
+
softwareVersion: string;
|
|
27
|
+
status: string;
|
|
28
|
+
entityType: string;
|
|
29
|
+
addicionalType: string;
|
|
30
|
+
approved: string;
|
|
31
|
+
citing: string;
|
|
32
|
+
correcting: string;
|
|
33
|
+
draft: string;
|
|
34
|
+
published: string;
|
|
35
|
+
};
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
declare const User: z.ZodObject<{
|
|
@@ -1346,7 +1348,7 @@ type Status = (typeof Status)[number];
|
|
|
1346
1348
|
declare const Motivation: readonly ["identifying", "describing", "correcting", "tagging", "classifying", "linking", "citing"];
|
|
1347
1349
|
type Motivation = (typeof Motivation)[number];
|
|
1348
1350
|
declare const WebAnnotation: z.ZodObject<{
|
|
1349
|
-
'@context': z.ZodTuple<[z.ZodLiteral<"http://www.w3.org/ns/anno.jsonld">, z.ZodLiteral<
|
|
1351
|
+
'@context': z.ZodTuple<[z.ZodLiteral<"http://www.w3.org/ns/anno.jsonld">, z.ZodLiteral<"https://wa.lincsproject.ca/v1/ns/anno.jsonld">], null>;
|
|
1350
1352
|
id: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1351
1353
|
type: z.ZodTuple<[z.ZodLiteral<"Annotation">, z.ZodLiteral<"crm:E33_Linguistic_Object">], null>;
|
|
1352
1354
|
motivation: z.ZodTuple<[z.ZodEnum<["identifying", "describing", "correcting", "tagging", "classifying", "linking", "citing"]>, z.ZodLiteral<"crm:E33_Linguistic_Object">], null>;
|
|
@@ -2252,7 +2254,7 @@ declare const WebAnnotation: z.ZodObject<{
|
|
|
2252
2254
|
label?: string | undefined;
|
|
2253
2255
|
description?: string | undefined;
|
|
2254
2256
|
};
|
|
2255
|
-
'@context': ["http://www.w3.org/ns/anno.jsonld",
|
|
2257
|
+
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
2256
2258
|
motivation: ["identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", "crm:E33_Linguistic_Object"];
|
|
2257
2259
|
created: string;
|
|
2258
2260
|
generator: {
|
|
@@ -2392,7 +2394,7 @@ declare const WebAnnotation: z.ZodObject<{
|
|
|
2392
2394
|
label?: string | undefined;
|
|
2393
2395
|
description?: string | undefined;
|
|
2394
2396
|
};
|
|
2395
|
-
'@context': ["http://www.w3.org/ns/anno.jsonld",
|
|
2397
|
+
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
2396
2398
|
motivation: ["identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", "crm:E33_Linguistic_Object"];
|
|
2397
2399
|
created: string;
|
|
2398
2400
|
generator: {
|
|
@@ -2615,7 +2617,7 @@ declare const validator: _ajv.ValidateFunction<Required<{
|
|
|
2615
2617
|
label?: string | undefined;
|
|
2616
2618
|
description?: string | undefined;
|
|
2617
2619
|
};
|
|
2618
|
-
'@context': ["http://www.w3.org/ns/anno.jsonld",
|
|
2620
|
+
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
2619
2621
|
motivation: ["identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", "crm:E33_Linguistic_Object"];
|
|
2620
2622
|
created: string;
|
|
2621
2623
|
generator: {
|
package/dist/index.d.ts
CHANGED
|
@@ -4,33 +4,35 @@ import { z } from 'zod';
|
|
|
4
4
|
import * as ajv_dist_core from 'ajv/dist/core';
|
|
5
5
|
|
|
6
6
|
declare const VERSION = "v1";
|
|
7
|
-
declare const contextUri
|
|
8
|
-
declare const schemaId
|
|
9
|
-
declare const defsId
|
|
7
|
+
declare const contextUri = "https://wa.lincsproject.ca/v1/ns/anno.jsonld";
|
|
8
|
+
declare const schemaId = "https://wa.lincsproject.ca/v1/schema.jsonld";
|
|
9
|
+
declare const defsId = "https://wa.lincsproject.ca/v1/defs.jsonld";
|
|
10
10
|
|
|
11
11
|
declare const schemaContext: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
12
|
+
'@context': {
|
|
13
|
+
bf: string;
|
|
14
|
+
cito: string;
|
|
15
|
+
cwrc: string;
|
|
16
|
+
edit: string;
|
|
17
|
+
fabio: string;
|
|
18
|
+
frbroo: string;
|
|
19
|
+
wikidata: string;
|
|
20
|
+
crm: string;
|
|
21
|
+
crmdig: string;
|
|
22
|
+
certainty: string;
|
|
23
|
+
contributor: string;
|
|
24
|
+
description: string;
|
|
25
|
+
precision: string;
|
|
26
|
+
softwareVersion: string;
|
|
27
|
+
status: string;
|
|
28
|
+
entityType: string;
|
|
29
|
+
addicionalType: string;
|
|
30
|
+
approved: string;
|
|
31
|
+
citing: string;
|
|
32
|
+
correcting: string;
|
|
33
|
+
draft: string;
|
|
34
|
+
published: string;
|
|
35
|
+
};
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
declare const User: z.ZodObject<{
|
|
@@ -1346,7 +1348,7 @@ type Status = (typeof Status)[number];
|
|
|
1346
1348
|
declare const Motivation: readonly ["identifying", "describing", "correcting", "tagging", "classifying", "linking", "citing"];
|
|
1347
1349
|
type Motivation = (typeof Motivation)[number];
|
|
1348
1350
|
declare const WebAnnotation: z.ZodObject<{
|
|
1349
|
-
'@context': z.ZodTuple<[z.ZodLiteral<"http://www.w3.org/ns/anno.jsonld">, z.ZodLiteral<
|
|
1351
|
+
'@context': z.ZodTuple<[z.ZodLiteral<"http://www.w3.org/ns/anno.jsonld">, z.ZodLiteral<"https://wa.lincsproject.ca/v1/ns/anno.jsonld">], null>;
|
|
1350
1352
|
id: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1351
1353
|
type: z.ZodTuple<[z.ZodLiteral<"Annotation">, z.ZodLiteral<"crm:E33_Linguistic_Object">], null>;
|
|
1352
1354
|
motivation: z.ZodTuple<[z.ZodEnum<["identifying", "describing", "correcting", "tagging", "classifying", "linking", "citing"]>, z.ZodLiteral<"crm:E33_Linguistic_Object">], null>;
|
|
@@ -2252,7 +2254,7 @@ declare const WebAnnotation: z.ZodObject<{
|
|
|
2252
2254
|
label?: string | undefined;
|
|
2253
2255
|
description?: string | undefined;
|
|
2254
2256
|
};
|
|
2255
|
-
'@context': ["http://www.w3.org/ns/anno.jsonld",
|
|
2257
|
+
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
2256
2258
|
motivation: ["identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", "crm:E33_Linguistic_Object"];
|
|
2257
2259
|
created: string;
|
|
2258
2260
|
generator: {
|
|
@@ -2392,7 +2394,7 @@ declare const WebAnnotation: z.ZodObject<{
|
|
|
2392
2394
|
label?: string | undefined;
|
|
2393
2395
|
description?: string | undefined;
|
|
2394
2396
|
};
|
|
2395
|
-
'@context': ["http://www.w3.org/ns/anno.jsonld",
|
|
2397
|
+
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
2396
2398
|
motivation: ["identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", "crm:E33_Linguistic_Object"];
|
|
2397
2399
|
created: string;
|
|
2398
2400
|
generator: {
|
|
@@ -2615,7 +2617,7 @@ declare const validator: _ajv.ValidateFunction<Required<{
|
|
|
2615
2617
|
label?: string | undefined;
|
|
2616
2618
|
description?: string | undefined;
|
|
2617
2619
|
};
|
|
2618
|
-
'@context': ["http://www.w3.org/ns/anno.jsonld",
|
|
2620
|
+
'@context': ["http://www.w3.org/ns/anno.jsonld", "https://wa.lincsproject.ca/v1/ns/anno.jsonld"];
|
|
2619
2621
|
motivation: ["identifying" | "describing" | "correcting" | "tagging" | "classifying" | "linking" | "citing", "crm:E33_Linguistic_Object"];
|
|
2620
2622
|
created: string;
|
|
2621
2623
|
generator: {
|
package/dist/index.js
CHANGED
|
@@ -2806,28 +2806,30 @@ var defsId = `https://wa.lincsproject.ca/${VERSION}/defs.jsonld`;
|
|
|
2806
2806
|
|
|
2807
2807
|
// src/v1/schema/context.ts
|
|
2808
2808
|
var schemaContext = {
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2809
|
+
"@context": {
|
|
2810
|
+
bf: "http://www.openlinksw.com/schemas/bif#",
|
|
2811
|
+
cito: "https://sparontologies.github.io/cito/current/cito.html#",
|
|
2812
|
+
cwrc: "http://id.lincsproject.ca/cwrc#",
|
|
2813
|
+
edit: "http://id.lincsproject.ca/edit/#",
|
|
2814
|
+
fabio: "https://purl.org/spar/fabio#",
|
|
2815
|
+
frbroo: "https://www.iflastandards.info/fr/frbr/frbroo#",
|
|
2816
|
+
wikidata: "https://www.wikidata.org/wiki/",
|
|
2817
|
+
crm: "http://www.cidoc-crm.org/cidoc-crm/",
|
|
2818
|
+
crmdig: "http://www.ics.forth.gr/isl/CRMdig/",
|
|
2819
|
+
certainty: "crm:P2_has_type",
|
|
2820
|
+
contributor: "dcterms:contributor",
|
|
2821
|
+
description: "rdfs:comment",
|
|
2822
|
+
precision: "crm:P2_has_type",
|
|
2823
|
+
softwareVersion: "schema:softwareVersion",
|
|
2824
|
+
status: "crm:P2_has_type",
|
|
2825
|
+
entityType: "crm:P2_has_type",
|
|
2826
|
+
addicionalType: "crm:P2_has_type",
|
|
2827
|
+
approved: "edit:statusApproved",
|
|
2828
|
+
citing: "edit:citing",
|
|
2829
|
+
correcting: "edit:correcting",
|
|
2830
|
+
draft: "edit:statusDraft",
|
|
2831
|
+
published: "edit:statusPublished"
|
|
2832
|
+
}
|
|
2831
2833
|
};
|
|
2832
2834
|
|
|
2833
2835
|
// src/v1/schema/definitions/agent.ts
|
package/dist/index.mjs
CHANGED
|
@@ -2777,28 +2777,30 @@ var defsId = `https://wa.lincsproject.ca/${VERSION}/defs.jsonld`;
|
|
|
2777
2777
|
|
|
2778
2778
|
// src/v1/schema/context.ts
|
|
2779
2779
|
var schemaContext = {
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2780
|
+
"@context": {
|
|
2781
|
+
bf: "http://www.openlinksw.com/schemas/bif#",
|
|
2782
|
+
cito: "https://sparontologies.github.io/cito/current/cito.html#",
|
|
2783
|
+
cwrc: "http://id.lincsproject.ca/cwrc#",
|
|
2784
|
+
edit: "http://id.lincsproject.ca/edit/#",
|
|
2785
|
+
fabio: "https://purl.org/spar/fabio#",
|
|
2786
|
+
frbroo: "https://www.iflastandards.info/fr/frbr/frbroo#",
|
|
2787
|
+
wikidata: "https://www.wikidata.org/wiki/",
|
|
2788
|
+
crm: "http://www.cidoc-crm.org/cidoc-crm/",
|
|
2789
|
+
crmdig: "http://www.ics.forth.gr/isl/CRMdig/",
|
|
2790
|
+
certainty: "crm:P2_has_type",
|
|
2791
|
+
contributor: "dcterms:contributor",
|
|
2792
|
+
description: "rdfs:comment",
|
|
2793
|
+
precision: "crm:P2_has_type",
|
|
2794
|
+
softwareVersion: "schema:softwareVersion",
|
|
2795
|
+
status: "crm:P2_has_type",
|
|
2796
|
+
entityType: "crm:P2_has_type",
|
|
2797
|
+
addicionalType: "crm:P2_has_type",
|
|
2798
|
+
approved: "edit:statusApproved",
|
|
2799
|
+
citing: "edit:citing",
|
|
2800
|
+
correcting: "edit:correcting",
|
|
2801
|
+
draft: "edit:statusDraft",
|
|
2802
|
+
published: "edit:statusPublished"
|
|
2803
|
+
}
|
|
2802
2804
|
};
|
|
2803
2805
|
|
|
2804
2806
|
// src/v1/schema/definitions/agent.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lincs.project/webannotation-schema",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "lincs project web annotation json-ld schema",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lincs project",
|
|
@@ -46,11 +46,10 @@
|
|
|
46
46
|
"build": "npm run generate-auxiliar-files && tsup src/index.ts --format esm,cjs --dts",
|
|
47
47
|
"build-documentation": "typedoc --out docs src/index.ts",
|
|
48
48
|
"clean": "rm -rf dist && rm -rf docs && rm -rf examples && rm -rf .turbo && rm -rf node_modules",
|
|
49
|
-
"deploy": "npm run clean && npm run build && npm run generate-auxiliar-files && npm run build-documentation",
|
|
49
|
+
"deploy": "npm run clean && npm run build && npm run generate-auxiliar-files && npm run build-documentation && npm run lint",
|
|
50
50
|
"dev": "npm run generate-auxiliar-files && tsup src/index.ts --format esm,cjs --dts --watch",
|
|
51
51
|
"generate-auxiliar-files": "ts-node ./src/generate.ts",
|
|
52
52
|
"lint": "eslint .",
|
|
53
|
-
"lint_": "eslint \"src/**/*.ts*\"",
|
|
54
53
|
"prepublishOnly": "npm test && npm run deploy",
|
|
55
54
|
"test": "jest --coverage=false",
|
|
56
55
|
"test-watch": "jest --watchAll --verbose"
|
|
@@ -59,24 +58,23 @@
|
|
|
59
58
|
"@apideck/better-ajv-errors": "^0.3.6",
|
|
60
59
|
"ajv": "^8.12.0",
|
|
61
60
|
"ajv-formats": "^2.1.1",
|
|
62
|
-
"typescript": "^5.
|
|
63
|
-
"zod": "^3.
|
|
61
|
+
"typescript": "^5.2.2",
|
|
62
|
+
"zod": "^3.22.4"
|
|
64
63
|
},
|
|
65
64
|
"devDependencies": {
|
|
66
|
-
"@jest/globals": "^29.
|
|
67
|
-
"@types/fs-extra": "^11.0.
|
|
68
|
-
"@types/jest": "^29.5.
|
|
69
|
-
"@types/node": "^20.
|
|
70
|
-
"eslint": "^8.
|
|
65
|
+
"@jest/globals": "^29.7.0",
|
|
66
|
+
"@types/fs-extra": "^11.0.2",
|
|
67
|
+
"@types/jest": "^29.5.5",
|
|
68
|
+
"@types/node": "^20.8.5",
|
|
69
|
+
"eslint": "^8.51.0",
|
|
71
70
|
"eslint-config-custom": "*",
|
|
72
71
|
"fs-extra": "^11.1.1",
|
|
73
|
-
"jest": "^29.
|
|
72
|
+
"jest": "^29.7.0",
|
|
74
73
|
"kleur": "^4.1.5",
|
|
75
|
-
"prettier": "^3.0.0",
|
|
76
74
|
"ts-jest": "^29.1.1",
|
|
77
75
|
"ts-node": "^10.9.1",
|
|
78
76
|
"tsconfig": "*",
|
|
79
|
-
"tsup": "^7.
|
|
80
|
-
"typedoc": "^0.
|
|
77
|
+
"tsup": "^7.2.0",
|
|
78
|
+
"typedoc": "^0.25.2"
|
|
81
79
|
}
|
|
82
80
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"bf": "http://www.openlinksw.com/schemas/bif#",
|
|
3
|
-
"cito": "https://sparontologies.github.io/cito/current/cito.html#",
|
|
4
|
-
"cwrc": "http://id.lincsproject.ca/cwrc#",
|
|
5
|
-
"edit": "http://id.lincsproject.ca/edit/#",
|
|
6
|
-
"fabio": "https://purl.org/spar/fabio#",
|
|
7
|
-
"frbroo": "https://www.iflastandards.info/fr/frbr/frbroo#",
|
|
8
|
-
"wikidata": "https://www.wikidata.org/wiki/",
|
|
9
|
-
"crm": "http://www.cidoc-crm.org/cidoc-crm/",
|
|
10
|
-
"crmdig": "http://www.ics.forth.gr/isl/CRMdig/",
|
|
11
|
-
"certainty": "crm:P2_has_type",
|
|
12
|
-
"contributor": "dcterms:contributor",
|
|
13
|
-
"description": "rdfs:comment",
|
|
14
|
-
"precision": "crm:P2_has_type",
|
|
15
|
-
"softwareVersion": "schema:softwareVersion",
|
|
16
|
-
"status": "crm:P2_has_type",
|
|
17
|
-
"entityType": "crm:P2_has_type",
|
|
18
|
-
"addicionalType": "crm:P2_has_type",
|
|
19
|
-
"approved": "edit:statusApproved",
|
|
20
|
-
"citing": "edit:citing",
|
|
21
|
-
"correcting": "edit:correcting",
|
|
22
|
-
"draft": "edit:statusDraft",
|
|
23
|
-
"published": "edit:statusPublished"
|
|
24
|
-
}
|