Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Scheduled] Auto Mirror Lexicons #423

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion lexicons/app/bsky/actor/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
"type": "union",
"refs": [
"#adultContentPref",
"#contentLabelPref"
"#contentLabelPref",
"#savedFeedsPref"
]
}
},
Expand All @@ -111,6 +112,26 @@
"label": {"type": "string"},
"visibility": {"type": "string", "knownValues": ["show", "warn", "hide"]}
}
},
"savedFeedsPref": {
"type": "object",
"required": ["pinned", "saved"],
"properties": {
"pinned": {
"type": "array",
"items": {
"type": "string",
"format": "at-uri"
}
},
"saved": {
"type": "array",
"items": {
"type": "string",
"format": "at-uri"
}
}
}
}
}
}
10 changes: 9 additions & 1 deletion lexicons/app/bsky/embed/record.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@
"type": "object",
"required": ["record"],
"properties": {
"record": {"type": "union", "refs": ["#viewRecord", "#viewNotFound", "#viewBlocked"]}
"record": {
"type": "union",
"refs": [
"#viewRecord",
"#viewNotFound",
"#viewBlocked",
"app.bsky.feed.defs#generatorView"
]
}
}
},
"viewRecord": {
Expand Down
47 changes: 44 additions & 3 deletions lexicons/app/bsky/feed/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"type": "object",
"required": ["post"],
"properties": {
"post": {"type": "ref", "ref": "app.bsky.feed.defs#postView"},
"post": {"type": "ref", "ref": "#postView"},
"reply": {"type": "ref", "ref": "#replyRef"},
"reason": {"type": "union", "refs": ["#reasonRepost"]}
}
Expand All @@ -50,8 +50,8 @@
"type": "object",
"required": ["root", "parent"],
"properties": {
"root": {"type": "ref", "ref": "app.bsky.feed.defs#postView"},
"parent": {"type": "ref", "ref": "app.bsky.feed.defs#postView"}
"root": {"type": "union", "refs": ["#postView", "#notFoundPost", "#blockedPost"]},
"parent": {"type": "union", "refs": ["#postView", "#notFoundPost", "#blockedPost"]}
}
},
"reasonRepost": {
Expand Down Expand Up @@ -89,6 +89,47 @@
"uri": {"type": "string", "format": "at-uri"},
"blocked": {"type": "boolean", "const": true}
}
},
"generatorView": {
"type": "object",
"required": ["uri", "cid", "creator", "displayName", "indexedAt"],
"properties": {
"uri": {"type": "string", "format": "at-uri"},
"cid": {"type": "string", "format": "cid"},
"did": {"type": "string", "format": "did"},
"creator": {"type": "ref", "ref": "app.bsky.actor.defs#profileView"},
"displayName": {"type": "string"},
"description": {"type": "string", "maxGraphemes": 300, "maxLength": 3000},
"descriptionFacets": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.richtext.facet"}
},
"avatar": {"type": "string"},
"likeCount": {"type": "integer", "minimum": 0 },
"viewer": {"type": "ref", "ref": "#generatorViewerState"},
"indexedAt": {"type": "string", "format": "datetime"}
}
},
"generatorViewerState": {
"type": "object",
"properties": {
"like": {"type": "string", "format": "at-uri"}
}
},
"skeletonFeedPost": {
"type": "object",
"required": ["post"],
"properties": {
"post": {"type": "string", "format": "at-uri"},
"reason": {"type": "union", "refs": ["#skeletonReasonRepost"]}
}
},
"skeletonReasonRepost": {
"type": "object",
"required": ["repost"],
"properties": {
"repost": {"type": "string", "ref": "at-uri"}
}
}
}
}
39 changes: 39 additions & 0 deletions lexicons/app/bsky/feed/describeFeedGenerator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"lexicon": 1,
"id": "app.bsky.feed.describeFeedGenerator",
"defs": {
"main": {
"type": "query",
"description": "Returns information about a given feed generator including TOS & offered feed URIs",
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["did", "feeds"],
"properties": {
"did": {"type": "string", "format": "did"},
"feeds": {
"type": "array",
"items": {"type": "ref", "ref": "#feed"}
},
"links": {"type": "ref", "ref": "#links"}
}
}
}
},
"feed": {
"type": "object",
"required": ["uri"],
"properties": {
"uri": {"type": "string", "format": "at-uri"}
}
},
"links": {
"type": "object",
"properties": {
"privacyPolicy": {"type": "string"},
"termsOfService": {"type": "string"}
}
}
}
}
30 changes: 30 additions & 0 deletions lexicons/app/bsky/feed/generator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"lexicon": 1,
"id": "app.bsky.feed.generator",
"defs": {
"main": {
"type": "record",
"description": "A declaration of the existence of a feed generator",
"key": "any",
"record": {
"type": "object",
"required": ["did", "displayName", "createdAt"],
"properties": {
"did": {"type": "string", "format": "did"},
"displayName": {"type": "string", "maxGraphemes": 24, "maxLength": 240},
"description": {"type": "string", "maxGraphemes": 300, "maxLength": 3000},
"descriptionFacets": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.richtext.facet"}
},
"avatar": {
"type": "blob",
"accept": ["image/png", "image/jpeg"],
"maxSize": 1000000
},
"createdAt": {"type": "string", "format": "datetime"}
}
}
}
}
}
33 changes: 33 additions & 0 deletions lexicons/app/bsky/feed/getActorFeeds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"lexicon": 1,
"id": "app.bsky.feed.getActorFeeds",
"defs": {
"main": {
"type": "query",
"description": "Retrieve a list of feeds created by a given actor",
"parameters": {
"type": "params",
"required": ["actor"],
"properties": {
"actor": {"type": "string", "format": "at-identifier"},
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
"cursor": {"type": "string"}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["feeds"],
"properties": {
"cursor": {"type": "string"},
"feeds": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.feed.defs#generatorView"}
}
}
}
}
}
}
}
36 changes: 36 additions & 0 deletions lexicons/app/bsky/feed/getFeed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"lexicon": 1,
"id": "app.bsky.feed.getFeed",
"defs": {
"main": {
"type": "query",
"description": "Compose and hydrate a feed from a user's selected feed generator",
"parameters": {
"type": "params",
"required": ["feed"],
"properties": {
"feed": {"type": "string", "format": "at-uri"},
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
"cursor": {"type": "string"}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["feed"],
"properties": {
"cursor": {"type": "string"},
"feed": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.feed.defs#feedViewPost"}
}
}
}
},
"errors": [
{"name": "UnknownFeed"}
]
}
}
}
29 changes: 29 additions & 0 deletions lexicons/app/bsky/feed/getFeedGenerator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"lexicon": 1,
"id": "app.bsky.feed.getFeedGenerator",
"defs": {
"main": {
"type": "query",
"description": "Get information about a specific feed offered by a feed generator, such as its online status",
"parameters": {
"type": "params",
"required": ["feed"],
"properties": {
"feed": {"type": "string", "format": "at-uri"}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["view", "isOnline", "isValid"],
"properties": {
"view": {"type": "ref", "ref": "app.bsky.feed.defs#generatorView"},
"isOnline": {"type": "boolean"},
"isValid": {"type": "boolean"}
}
}
}
}
}
}
33 changes: 33 additions & 0 deletions lexicons/app/bsky/feed/getFeedGenerators.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"lexicon": 1,
"id": "app.bsky.feed.getFeedGenerators",
"defs": {
"main": {
"type": "query",
"description": "Get information about a list of feed generators",
"parameters": {
"type": "params",
"required": ["feeds"],
"properties": {
"feeds": {
"type": "array",
"items": {"type": "string", "format": "at-uri"}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["feeds"],
"properties": {
"feeds": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.feed.defs#generatorView"}
}
}
}
}
}
}
}
36 changes: 36 additions & 0 deletions lexicons/app/bsky/feed/getFeedSkeleton.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"lexicon": 1,
"id": "app.bsky.feed.getFeedSkeleton",
"defs": {
"main": {
"type": "query",
"description": "A skeleton of a feed provided by a feed generator",
"parameters": {
"type": "params",
"required": ["feed"],
"properties": {
"feed": {"type": "string", "format": "at-uri"},
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
"cursor": {"type": "string"}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["feed"],
"properties": {
"cursor": {"type": "string"},
"feed": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.feed.defs#skeletonFeedPost"}
}
}
}
},
"errors": [
{"name": "UnknownFeed"}
]
}
}
}