@alistigo/document-format 0.2.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/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@alistigo/document-format",
3
+ "version": "0.2.2",
4
+ "private": false,
5
+ "type": "module",
6
+ "description": "Specification, JSON schemas, and TypeScript types for the Alistigo list document format. The source of truth for what an Alistigo document looks like.",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.js",
10
+ "types": "./dist/index.d.ts"
11
+ },
12
+ "./schemas/document.json": "./src/schemas/document.json"
13
+ },
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "files": [
17
+ "dist",
18
+ "src/schemas",
19
+ "docs"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "dependencies": {
25
+ "@alistigo/domain": "0.2.2"
26
+ },
27
+ "peerDependencies": {
28
+ "ajv": "^8.17.0",
29
+ "ajv-formats": "^3.0.1"
30
+ },
31
+ "peerDependenciesMeta": {
32
+ "ajv": {
33
+ "optional": true
34
+ },
35
+ "ajv-formats": {
36
+ "optional": true
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://alistigo.ai/schema/v1/document.json",
4
+ "title": "Alistigo Document",
5
+ "description": "A self-contained Alistigo list document in JSON-LD ItemList format.",
6
+ "type": "object",
7
+ "required": [
8
+ "@context",
9
+ "@type",
10
+ "alistigo:listId",
11
+ "alistigo:schemaVersion",
12
+ "itemListElement",
13
+ "alistigo:listEventLog"
14
+ ],
15
+ "properties": {
16
+ "@context": {
17
+ "type": "object",
18
+ "required": ["@vocab", "alistigo"],
19
+ "properties": {
20
+ "@vocab": { "type": "string", "const": "https://schema.org/" },
21
+ "alistigo": { "type": "string", "const": "https://alistigo.ai/vocab/" }
22
+ }
23
+ },
24
+ "@type": { "type": "string", "const": "ItemList" },
25
+ "alistigo:listId": { "type": "string", "pattern": "^lst_" },
26
+ "alistigo:schemaVersion": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
27
+ "name": { "type": "string" },
28
+ "itemListElement": {
29
+ "type": "array",
30
+ "items": { "$ref": "#/$defs/ListItem" }
31
+ },
32
+ "alistigo:listEventLog": {
33
+ "type": "array",
34
+ "items": { "$ref": "#/$defs/EventRecord" }
35
+ }
36
+ },
37
+ "$defs": {
38
+ "ListItem": {
39
+ "type": "object",
40
+ "required": ["@type", "alistigo:listElementId", "position", "name"],
41
+ "properties": {
42
+ "@type": { "type": "string", "const": "ListItem" },
43
+ "alistigo:listElementId": { "type": "string", "pattern": "^lse_" },
44
+ "position": { "type": "integer", "minimum": 1 },
45
+ "name": { "type": "string", "minLength": 1 }
46
+ }
47
+ },
48
+ "EventRecord": {
49
+ "type": "object",
50
+ "required": [
51
+ "alistigo:listEventId",
52
+ "alistigo:eventType",
53
+ "alistigo:listId",
54
+ "alistigo:actorId",
55
+ "alistigo:timestamp"
56
+ ],
57
+ "properties": {
58
+ "alistigo:listEventId": { "type": "string" },
59
+ "alistigo:eventType": {
60
+ "type": "string",
61
+ "enum": ["ListCreated", "ListElementAdded", "ListElementDeleted", "ListExported"]
62
+ },
63
+ "alistigo:listId": { "type": "string" },
64
+ "alistigo:actorId": { "type": "string" },
65
+ "alistigo:timestamp": { "type": "string", "format": "date-time" }
66
+ }
67
+ }
68
+ }
69
+ }