@ihavethatonvinyl/lexicons 0.0.0-stage → 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/LICENSE +20 -0
- package/dist/index.d.ts +600 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +39 -3
- package/schemas/com/ihavethatonvinyl/article/createArticleRevision.json +34 -0
- package/schemas/com/ihavethatonvinyl/article/defs.json +446 -0
- package/schemas/com/ihavethatonvinyl/article/getArticle.json +52 -0
- package/schemas/com/ihavethatonvinyl/article/listArticles.json +71 -0
- package/schemas/com/ihavethatonvinyl/article/publishArticleRevision.json +43 -0
- package/schemas/com/ihavethatonvinyl/article/revision.json +46 -0
- package/schemas/com/ihavethatonvinyl/article/unpublishArticle.json +20 -0
- package/schemas/com/ihavethatonvinyl/article.json +30 -0
- package/schemas/com/ihavethatonvinyl/auth/editor.json +31 -0
- package/schemas/com/ihavethatonvinyl/auth/publisher.json +25 -0
- package/README.md +0 -3
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.ihavethatonvinyl.article.getArticle",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "query",
|
|
7
|
+
"description": "Fetch an article with its latest revision, plus optionally all older versions",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"properties": {
|
|
11
|
+
"article": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The AT URI of the article",
|
|
14
|
+
"format": "at-uri"
|
|
15
|
+
},
|
|
16
|
+
"allVersions": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"default": false
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"output": {
|
|
23
|
+
"encoding": "application/json",
|
|
24
|
+
"schema": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"article": {
|
|
28
|
+
"type": "ref",
|
|
29
|
+
"ref": "com.ihavethatonvinyl.article"
|
|
30
|
+
},
|
|
31
|
+
"contents": {
|
|
32
|
+
"type": "ref",
|
|
33
|
+
"ref": "com.ihavethatonvinyl.article.revision"
|
|
34
|
+
},
|
|
35
|
+
"history": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "ref",
|
|
39
|
+
"ref": "com.ihavethatonvinyl.article.revision"
|
|
40
|
+
},
|
|
41
|
+
"description": "If allVersions is true, this will be set to all the versions of the article except the latest, sorted from newest to oldest by its date"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"required": [
|
|
45
|
+
"article",
|
|
46
|
+
"contents"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.ihavethatonvinyl.article.listArticles",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "query",
|
|
7
|
+
"description": "returns the latest version of the articles that match the search criteria",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"properties": {
|
|
11
|
+
"limit": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"description": "The number of articles to return",
|
|
14
|
+
"minimum": 1,
|
|
15
|
+
"maximum": 100,
|
|
16
|
+
"default": 25
|
|
17
|
+
},
|
|
18
|
+
"cursor": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "The search cursor to use to offset the query for pagination"
|
|
21
|
+
},
|
|
22
|
+
"sort": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": [
|
|
25
|
+
"asc",
|
|
26
|
+
"desc"
|
|
27
|
+
],
|
|
28
|
+
"default": "desc",
|
|
29
|
+
"description": "return the articles from newest to oldest (desc, default) or oldest to newest (asc)"
|
|
30
|
+
},
|
|
31
|
+
"sortBy": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"knownValues": [
|
|
34
|
+
"published",
|
|
35
|
+
"updated"
|
|
36
|
+
],
|
|
37
|
+
"default": "published",
|
|
38
|
+
"description": "Sort by the date that the article was published (default) or when it was last updated"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"output": {
|
|
43
|
+
"encoding": "application/json",
|
|
44
|
+
"schema": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"properties": {
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "ref",
|
|
51
|
+
"ref": "com.ihavethatonvinyl.article.revision"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"cursor": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
"total": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"minimum": 0
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"required": [
|
|
63
|
+
"items",
|
|
64
|
+
"cursor",
|
|
65
|
+
"total"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.ihavethatonvinyl.article.publishArticleRevision",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "procedure",
|
|
7
|
+
"description": "publishes an article revision. if one of the revision's article refs exists in the repo, it is considered an update",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"properties": {
|
|
11
|
+
"revision": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "the AT-URI of the revision",
|
|
14
|
+
"format": "at-uri"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": [
|
|
18
|
+
"revision"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"output": {
|
|
22
|
+
"encoding": "application/json",
|
|
23
|
+
"schema": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"article": {
|
|
27
|
+
"type": "ref",
|
|
28
|
+
"ref": "com.ihavethatonvinyl.article"
|
|
29
|
+
},
|
|
30
|
+
"contents": {
|
|
31
|
+
"type": "ref",
|
|
32
|
+
"ref": "com.ihavethatonvinyl.article.revision"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": [
|
|
36
|
+
"article",
|
|
37
|
+
"contents"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.ihavethatonvinyl.article.revision",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "record",
|
|
7
|
+
"key": "tid",
|
|
8
|
+
"description": "An I Have That on Vinyl article revision",
|
|
9
|
+
"record": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"published": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "datetime"
|
|
15
|
+
},
|
|
16
|
+
"publishedBy": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"format": "did"
|
|
19
|
+
},
|
|
20
|
+
"articles": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "ref",
|
|
24
|
+
"ref": "com.atproto.repo.strongRef"
|
|
25
|
+
},
|
|
26
|
+
"minLength": 1
|
|
27
|
+
},
|
|
28
|
+
"contents": {
|
|
29
|
+
"type": "ref",
|
|
30
|
+
"ref": "com.ihavethatonvinyl.article.defs#contents"
|
|
31
|
+
},
|
|
32
|
+
"notes": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "A short description of what was updated",
|
|
35
|
+
"maxGraphemes": 1024
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": [
|
|
39
|
+
"published",
|
|
40
|
+
"publishedBy",
|
|
41
|
+
"contents"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.ihavethatonvinyl.article.unpublishArticle",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "procedure",
|
|
7
|
+
"description": "Deletes an article and removes any refs to it from all revisions",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"properties": {
|
|
11
|
+
"article": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The AT-URI of the article to unpublish",
|
|
14
|
+
"format": "at-uri"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.ihavethatonvinyl.article",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "record",
|
|
7
|
+
"key": "literal:self",
|
|
8
|
+
"description": "An I Have That on Vinyl article. It is immutable so backlinks and comments survive edits. The record key acts as the article's URL slug",
|
|
9
|
+
"record": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"published": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The date the article was originally published",
|
|
15
|
+
"format": "datetime"
|
|
16
|
+
},
|
|
17
|
+
"publishedBy": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The user who published the article",
|
|
20
|
+
"format": "did"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": [
|
|
24
|
+
"published",
|
|
25
|
+
"publishedBy"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.ihavethatonvinyl.auth.editor",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "permission-set",
|
|
7
|
+
"key": "literal:self",
|
|
8
|
+
"title": "ihavethatonvinyl.com",
|
|
9
|
+
"detail": "Manage article contents",
|
|
10
|
+
"permissions": [
|
|
11
|
+
{
|
|
12
|
+
"type": "permission",
|
|
13
|
+
"resource": "repo",
|
|
14
|
+
"action": [
|
|
15
|
+
"create"
|
|
16
|
+
],
|
|
17
|
+
"collection": [
|
|
18
|
+
"com.ihavethatonvinyl.article.revision"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "permission",
|
|
23
|
+
"resource": "blob",
|
|
24
|
+
"accept": [
|
|
25
|
+
"image/*"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.ihavethatonvinyl.auth.publisher",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "permission-set",
|
|
7
|
+
"key": "literal:self",
|
|
8
|
+
"title": "ihavethatonvinyl.com",
|
|
9
|
+
"detail": "Manage articles",
|
|
10
|
+
"permissions": [
|
|
11
|
+
{
|
|
12
|
+
"type": "permission",
|
|
13
|
+
"resource": "repo",
|
|
14
|
+
"action": [
|
|
15
|
+
"create",
|
|
16
|
+
"delete"
|
|
17
|
+
],
|
|
18
|
+
"collection": [
|
|
19
|
+
"com.ihavethatonvinyl.article"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
package/README.md
DELETED