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 #363

Merged
merged 2 commits into from
May 16, 2023
Merged
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
26 changes: 26 additions & 0 deletions lexicons/app/bsky/actor/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,37 @@
"type": "object",
"properties": {
"muted": {"type": "boolean"},
"mutedByList": {"type": "ref", "ref": "app.bsky.graph.defs#listViewBasic"},
"blockedBy": {"type": "boolean"},
"blocking": {"type": "string", "format": "at-uri"},
"following": {"type": "string", "format": "at-uri"},
"followedBy": {"type": "string", "format": "at-uri"}
}
},
"preferences": {
"type": "array",
"items": {
"type": "union",
"refs": [
"#adultContentPref",
"#contentLabelPref"
]
}
},
"adultContentPref": {
"type": "object",
"required": ["enabled"],
"properties": {
"enabled": {"type": "boolean", "default": false}
}
},
"contentLabelPref": {
"type": "object",
"required": ["label", "visibility"],
"properties": {
"label": {"type": "string"},
"visibility": {"type": "string", "knownValues": ["show", "warn", "hide"]}
}
}
}
}
28 changes: 28 additions & 0 deletions lexicons/app/bsky/actor/getPreferences.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"lexicon": 1,
"id": "app.bsky.actor.getPreferences",
"defs": {
"main": {
"type": "query",
"description": "Get private preferences attached to the account.",
"parameters": {
"type": "params",
"properties": {
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["preferences"],
"properties": {
"preferences": {
"type": "ref",
"ref": "app.bsky.actor.defs#preferences"
}
}
}
}
}
}
}
23 changes: 23 additions & 0 deletions lexicons/app/bsky/actor/putPreferences.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"lexicon": 1,
"id": "app.bsky.actor.putPreferences",
"defs": {
"main": {
"type": "procedure",
"description": "Sets the private preferences attached to the account.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["preferences"],
"properties": {
"preferences": {
"type": "ref",
"ref": "app.bsky.actor.defs#preferences"
}
}
}
}
}
}
}
59 changes: 59 additions & 0 deletions lexicons/app/bsky/graph/defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"lexicon": 1,
"id": "app.bsky.graph.defs",
"defs": {
"listViewBasic": {
"type": "object",
"required": ["uri", "creator", "name", "purpose"],
"properties": {
"uri": {"type": "string", "format": "at-uri"},
"name": {"type": "string", "maxLength": 64, "minLength": 1},
"purpose": {"type": "ref", "ref": "#listPurpose"},
"avatar": {"type": "string"},
"viewer": {"type": "ref", "ref": "#listViewerState"},
"indexedAt": {"type": "string", "format": "datetime"}
}
},
"listView": {
"type": "object",
"required": ["uri", "creator", "name", "purpose", "indexedAt"],
"properties": {
"uri": {"type": "string", "format": "at-uri"},
"creator": {"type": "ref", "ref": "app.bsky.actor.defs#profileView"},
"name": {"type": "string", "maxLength": 64, "minLength": 1},
"purpose": {"type": "ref", "ref": "#listPurpose"},
"description": {"type": "string", "maxGraphemes": 300, "maxLength": 3000},
"descriptionFacets": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.richtext.facet"}
},
"avatar": {"type": "string"},
"viewer": {"type": "ref", "ref": "#listViewerState"},
"indexedAt": {"type": "string", "format": "datetime"}
}
},
"listItemView": {
"type": "object",
"required": ["subject"],
"properties": {
"subject": {"type": "ref", "ref": "app.bsky.actor.defs#profileView"}
}
},
"listPurpose": {
"type": "string",
"knownValues": [
"app.bsky.graph.defs#modlist"
]
},
"modlist": {
"type": "token",
"description": "A list of actors to apply an aggregate moderation action (mute/block) on"
},
"listViewerState": {
"type": "object",
"properties": {
"muted": {"type": "boolean"}
}
}
}
}
34 changes: 34 additions & 0 deletions lexicons/app/bsky/graph/getList.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"lexicon": 1,
"id": "app.bsky.graph.getList",
"defs": {
"main": {
"type": "query",
"description": "Fetch a list of actors",
"parameters": {
"type": "params",
"required": ["list"],
"properties": {
"list": {"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": ["list", "items"],
"properties": {
"cursor": {"type": "string"},
"list": {"type": "ref", "ref": "app.bsky.graph.defs#listView"},
"items": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.graph.defs#listItemView"}
}
}
}
}
}
}
}
31 changes: 31 additions & 0 deletions lexicons/app/bsky/graph/getListMutes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"lexicon": 1,
"id": "app.bsky.graph.getListMutes",
"defs": {
"main": {
"type": "query",
"description": "Which lists is the requester's account muting?",
"parameters": {
"type": "params",
"properties": {
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
"cursor": {"type": "string"}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["lists"],
"properties": {
"cursor": {"type": "string"},
"lists": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.graph.defs#listView"}
}
}
}
}
}
}
}
33 changes: 33 additions & 0 deletions lexicons/app/bsky/graph/getLists.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"lexicon": 1,
"id": "app.bsky.graph.getLists",
"defs": {
"main": {
"type": "query",
"description": "Fetch a list of lists that belong to an 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": ["lists"],
"properties": {
"cursor": {"type": "string"},
"lists": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.graph.defs#listView"}
}
}
}
}
}
}
}
30 changes: 30 additions & 0 deletions lexicons/app/bsky/graph/list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"lexicon": 1,
"id": "app.bsky.graph.list",
"defs": {
"main": {
"type": "record",
"description": "A declaration of a list of actors.",
"key": "tid",
"record": {
"type": "object",
"required": ["name", "purpose", "createdAt"],
"properties": {
"purpose": {"type": "ref", "ref": "app.bsky.graph.defs#listPurpose"},
"name": {"type": "string", "maxLength": 64, "minLength": 1},
"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"}
}
}
}
}
}
20 changes: 20 additions & 0 deletions lexicons/app/bsky/graph/listitem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"lexicon": 1,
"id": "app.bsky.graph.listitem",
"defs": {
"main": {
"type": "record",
"description": "An item under a declared list of actors",
"key": "tid",
"record": {
"type": "object",
"required": ["subject", "list", "createdAt"],
"properties": {
"subject": {"type": "string", "format": "did"},
"list": {"type": "string", "format": "at-uri"},
"createdAt": {"type": "string", "format": "datetime"}
}
}
}
}
}
20 changes: 20 additions & 0 deletions lexicons/app/bsky/graph/muteActorList.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"lexicon": 1,
"id": "app.bsky.graph.muteActorList",
"defs": {
"main": {
"type": "procedure",
"description": "Mute a list of actors.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["list"],
"properties": {
"list": { "type": "string", "format": "at-uri" }
}
}
}
}
}
}
20 changes: 20 additions & 0 deletions lexicons/app/bsky/graph/unmuteActorList.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"lexicon": 1,
"id": "app.bsky.graph.unmuteActorList",
"defs": {
"main": {
"type": "procedure",
"description": "Unmute a list of actors.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["list"],
"properties": {
"list": { "type": "string", "format": "at-uri" }
}
}
}
}
}
}