kopia lustrzana https://github.com/snarfed/bridgy-fed
rodzic
23a8f7cfda
commit
b7eac67443
|
@ -0,0 +1 @@
|
|||
../atproto/lexicons
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.actor.getProfile",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["actor"],
|
||||
"properties": {
|
||||
"actor": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {"type": "ref", "ref": "app.bsky.actor.profile#view"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.actor.getProfiles",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["actors"],
|
||||
"properties": {
|
||||
"actors": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"maxLength": 25
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["profiles"],
|
||||
"properties": {
|
||||
"profiles": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "app.bsky.actor.profile#view"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.actor.getSuggestions",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Get a list of actors suggested for following. Used in discovery UIs.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"cursor": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["actors"],
|
||||
"properties": {
|
||||
"cursor": {"type": "string"},
|
||||
"actors": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "app.bsky.actor.profile#viewBasic"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.actor.profile",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "record",
|
||||
"key": "literal:self",
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["displayName"],
|
||||
"properties": {
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"maxLength": 64
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 256
|
||||
},
|
||||
"avatar": {
|
||||
"type": "image",
|
||||
"accept": ["image/png", "image/jpeg"],
|
||||
"maxWidth": 2000,
|
||||
"maxHeight": 2000,
|
||||
"maxSize": 1000000
|
||||
},
|
||||
"banner": {
|
||||
"type": "image",
|
||||
"accept": ["image/png", "image/jpeg"],
|
||||
"maxWidth": 6000,
|
||||
"maxHeight": 2000,
|
||||
"maxSize": 1000000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"view": {
|
||||
"type": "object",
|
||||
"required": ["did", "declaration", "handle", "creator", "followersCount", "followsCount", "postsCount"],
|
||||
"properties": {
|
||||
"did": {"type": "string"},
|
||||
"declaration": {"type": "ref", "ref": "app.bsky.system.declRef"},
|
||||
"handle": {"type": "string"},
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"maxLength": 64
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 256
|
||||
},
|
||||
"avatar": { "type": "string" },
|
||||
"banner": { "type": "string" },
|
||||
"followersCount": {"type": "integer"},
|
||||
"followsCount": {"type": "integer"},
|
||||
"postsCount": {"type": "integer"},
|
||||
"creator": {"type": "string"},
|
||||
"indexedAt": {"type": "datetime"},
|
||||
"viewer": {"type": "ref", "ref": "#viewerState"},
|
||||
"myState": {"type": "ref", "ref": "#myState", "description": "Deprecated"}
|
||||
}
|
||||
},
|
||||
"viewBasic": {
|
||||
"type": "object",
|
||||
"required": ["did", "declaration", "handle"],
|
||||
"properties": {
|
||||
"did": {"type": "string"},
|
||||
"declaration": {"type": "ref", "ref": "app.bsky.system.declRef"},
|
||||
"handle": {"type": "string"},
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"maxLength": 64
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 256
|
||||
},
|
||||
"avatar": { "type": "string" },
|
||||
"indexedAt": {"type": "datetime"},
|
||||
"viewer": {"type": "ref", "ref": "#viewerState"}
|
||||
}
|
||||
},
|
||||
"viewerState": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"muted": {"type": "boolean"},
|
||||
"following": {"type": "string"},
|
||||
"followedBy": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"myState": {
|
||||
"type": "object",
|
||||
"description": "Deprecated in favor of #viewerState",
|
||||
"properties": {
|
||||
"follow": {"type": "string"},
|
||||
"muted": {"type": "boolean"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.actor.ref",
|
||||
"description": "A reference to an actor in the network.",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "object",
|
||||
"required": ["did", "declarationCid"],
|
||||
"properties": {
|
||||
"did": {"type": "string"},
|
||||
"declarationCid": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"withInfo": {
|
||||
"type": "object",
|
||||
"required": ["did", "declaration", "handle"],
|
||||
"properties": {
|
||||
"did": {"type": "string"},
|
||||
"declaration": {"type": "ref", "ref": "app.bsky.system.declRef"},
|
||||
"handle": {"type": "string"},
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"maxLength": 64
|
||||
},
|
||||
"avatar": { "type": "string" },
|
||||
"viewer": {"type": "ref", "ref": "#viewerState"}
|
||||
}
|
||||
},
|
||||
"viewerState": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"muted": {"type": "boolean"},
|
||||
"following": {"type": "string"},
|
||||
"followedBy": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.actor.search",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Find users matching search criteria.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"term": {"type": "string"},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["users"],
|
||||
"properties": {
|
||||
"cursor": {"type": "string"},
|
||||
"users": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "app.bsky.actor.profile#viewBasic"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.actor.searchTypeahead",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Find user suggestions for a search term.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"term": {"type": "string"},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["users"],
|
||||
"properties": {
|
||||
"users": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.actor.updateProfile",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Notify server that the user has seen notifications.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"nullable": ["description", "avatar", "banner"],
|
||||
"properties": {
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"maxLength": 64
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 256
|
||||
},
|
||||
"avatar": {
|
||||
"type": "image",
|
||||
"accept": ["image/png", "image/jpeg"],
|
||||
"maxWidth": 500,
|
||||
"maxHeight": 500,
|
||||
"maxSize": 100000
|
||||
},
|
||||
"banner": {
|
||||
"type": "image",
|
||||
"accept": ["image/png", "image/jpeg"],
|
||||
"maxWidth": 1500,
|
||||
"maxHeight": 500,
|
||||
"maxSize": 500000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["uri", "cid", "record"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"},
|
||||
"record": {"type": "unknown"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"errors": [
|
||||
{"name": "InvalidBlob"},
|
||||
{"name": "BlobTooLarge"},
|
||||
{"name": "InvalidMimeType"},
|
||||
{"name": "InvalidImageDimensions"}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.embed.external",
|
||||
"description": "An representation of some externally linked content, embedded in another form of content",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "object",
|
||||
"required": ["external"],
|
||||
"properties": {
|
||||
"external": {
|
||||
"type": "ref",
|
||||
"ref": "#external"
|
||||
}
|
||||
}
|
||||
},
|
||||
"external": {
|
||||
"type": "object",
|
||||
"required": ["uri", "title", "description"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"title": {"type": "string"},
|
||||
"description": {"type": "string"},
|
||||
"thumb": {
|
||||
"type": "image",
|
||||
"accept": ["image/*"],
|
||||
"maxWidth": 2000,
|
||||
"maxHeight": 2000,
|
||||
"maxSize": 1000000
|
||||
}
|
||||
}
|
||||
},
|
||||
"presented": {
|
||||
"type": "object",
|
||||
"required": ["external"],
|
||||
"properties": {
|
||||
"external": {
|
||||
"type": "ref",
|
||||
"ref": "#presentedExternal"
|
||||
}
|
||||
}
|
||||
},
|
||||
"presentedExternal": {
|
||||
"type": "object",
|
||||
"required": ["uri", "title", "description"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"title": {"type": "string"},
|
||||
"description": {"type": "string"},
|
||||
"thumb": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.embed.images",
|
||||
"description": "A set of images embedded in some other form of content",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "object",
|
||||
"required": ["images"],
|
||||
"properties": {
|
||||
"images": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "#image"},
|
||||
"maxLength": 4
|
||||
}
|
||||
}
|
||||
},
|
||||
"image": {
|
||||
"type": "object",
|
||||
"required": ["image", "alt"],
|
||||
"properties": {
|
||||
"image": {
|
||||
"type": "image",
|
||||
"accept": ["image/*"],
|
||||
"maxWidth": 2000,
|
||||
"maxHeight": 2000,
|
||||
"maxSize": 1000000
|
||||
},
|
||||
"alt": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"presented": {
|
||||
"type": "object",
|
||||
"required": ["images"],
|
||||
"properties": {
|
||||
"images": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "#presentedImage"},
|
||||
"maxLength": 4
|
||||
}
|
||||
}
|
||||
},
|
||||
"presentedImage": {
|
||||
"type": "object",
|
||||
"required": ["thumb", "fullsize", "alt"],
|
||||
"properties": {
|
||||
"thumb": {"type": "string"},
|
||||
"fullsize": {"type": "string"},
|
||||
"alt": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.embed.record",
|
||||
"description": "An representation of a record embedded in another form of content",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "object",
|
||||
"required": ["record"],
|
||||
"properties": {
|
||||
"record": {"type": "ref", "ref": "com.atproto.repo.strongRef"}
|
||||
}
|
||||
},
|
||||
"presented": {
|
||||
"type": "object",
|
||||
"required": ["record"],
|
||||
"properties": {
|
||||
"record": {"type": "union", "refs": ["#presentedRecord", "#presentedNotFound"]}
|
||||
}
|
||||
},
|
||||
"presentedRecord": {
|
||||
"type": "object",
|
||||
"required": ["uri", "cid", "author", "record"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"},
|
||||
"author": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"},
|
||||
"record": {"type": "unknown"}
|
||||
}
|
||||
},
|
||||
"presentedNotFound": {
|
||||
"type": "object",
|
||||
"required": ["uri"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.feed.feedViewPost",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "object",
|
||||
"required": ["post"],
|
||||
"properties": {
|
||||
"post": {"type": "ref", "ref": "app.bsky.feed.post#view"},
|
||||
"reply": {"type": "ref", "ref": "#replyRef"},
|
||||
"reason": {"type": "union", "refs": ["#reasonRepost"]}
|
||||
}
|
||||
},
|
||||
"replyRef": {
|
||||
"type": "object",
|
||||
"required": ["root", "parent"],
|
||||
"properties": {
|
||||
"root": {"type": "ref", "ref": "app.bsky.feed.post#view"},
|
||||
"parent": {"type": "ref", "ref": "app.bsky.feed.post#view"}
|
||||
}
|
||||
},
|
||||
"reasonRepost": {
|
||||
"type": "object",
|
||||
"required": ["by", "indexedAt"],
|
||||
"properties": {
|
||||
"by": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"},
|
||||
"indexedAt": {"type": "datetime"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.feed.getAuthorFeed",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "A view of a user's feed.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["author"],
|
||||
"properties": {
|
||||
"author": {"type": "string"},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"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.feedViewPost"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.feed.getPostThread",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["uri"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"depth": {"type": "integer"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["thread"],
|
||||
"properties": {
|
||||
"thread": {
|
||||
"type": "union",
|
||||
"refs": ["#threadViewPost", "#notFoundPost"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"errors": [
|
||||
{"name": "NotFound"}
|
||||
]
|
||||
},
|
||||
"threadViewPost": {
|
||||
"type": "object",
|
||||
"required": ["post"],
|
||||
"properties": {
|
||||
"post": {"type": "ref", "ref": "app.bsky.feed.post#view"},
|
||||
"parent": {"type": "union", "refs": ["#threadViewPost", "#notFoundPost"]},
|
||||
"replies": {
|
||||
"type": "array",
|
||||
"items": {"type": "union", "refs": ["#threadViewPost", "#notFoundPost"]}
|
||||
}
|
||||
}
|
||||
},
|
||||
"notFoundPost": {
|
||||
"type": "object",
|
||||
"required": ["uri", "notFound"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"notFound": {"type": "boolean", "const": true}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.feed.getRepostedBy",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["uri"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["uri", "repostedBy"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"},
|
||||
"cursor": {"type": "string"},
|
||||
"repostedBy": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.feed.getTimeline",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "A view of the user's home timeline.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"algorithm": {"type": "string"},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"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.feedViewPost"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.feed.getVotes",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["uri"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"},
|
||||
"direction": {"type": "string", "enum": ["up", "down"]},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["uri", "votes"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"},
|
||||
"cursor": {"type": "string"},
|
||||
"votes": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "#vote"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"vote": {
|
||||
"type": "object",
|
||||
"required": ["direction", "indexedAt", "createdAt", "actor"],
|
||||
"properties": {
|
||||
"direction": {"type": "string", "enum": ["up", "down"]},
|
||||
"indexedAt": {"type": "datetime"},
|
||||
"createdAt": {"type": "datetime"},
|
||||
"actor": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.feed.post",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "record",
|
||||
"key": "tid",
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["text", "createdAt"],
|
||||
"properties": {
|
||||
"text": {"type": "string", "maxLength": 256},
|
||||
"entities": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "#entity"}
|
||||
},
|
||||
"reply": {"type": "ref", "ref": "#replyRef"},
|
||||
"embed": {
|
||||
"type": "union",
|
||||
"refs": [
|
||||
"app.bsky.embed.images",
|
||||
"app.bsky.embed.external",
|
||||
"app.bsky.embed.record"
|
||||
]
|
||||
},
|
||||
"createdAt": {"type": "datetime"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"replyRef":{
|
||||
"type": "object",
|
||||
"required": ["root", "parent"],
|
||||
"properties": {
|
||||
"root": {"type": "ref", "ref": "com.atproto.repo.strongRef"},
|
||||
"parent": {"type": "ref", "ref": "com.atproto.repo.strongRef"}
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"type": "object",
|
||||
"required": ["index", "type", "value"],
|
||||
"properties": {
|
||||
"index": {"type": "ref", "ref": "#textSlice"},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Expected values are 'mention', 'hashtag', and 'link'."
|
||||
},
|
||||
"value": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"textSlice": {
|
||||
"type": "object",
|
||||
"description": "A text segment. Start is inclusive, end is exclusive.",
|
||||
"required": ["start", "end"],
|
||||
"properties": {
|
||||
"start": {"type": "integer", "minimum": 0},
|
||||
"end": {"type": "integer", "minimum": 0}
|
||||
}
|
||||
},
|
||||
"view": {
|
||||
"type": "object",
|
||||
"required": ["uri", "cid", "author", "record", "replyCount", "repostCount", "upvoteCount", "downvoteCount", "indexedAt", "viewer"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"},
|
||||
"author": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"},
|
||||
"record": {"type": "unknown"},
|
||||
"embed": {
|
||||
"type": "union",
|
||||
"refs": [
|
||||
"app.bsky.embed.images#presented",
|
||||
"app.bsky.embed.external#presented",
|
||||
"app.bsky.embed.record#presented"
|
||||
]
|
||||
},
|
||||
"replyCount": {"type": "integer"},
|
||||
"repostCount": {"type": "integer"},
|
||||
"upvoteCount": {"type": "integer"},
|
||||
"downvoteCount": {"type": "integer"},
|
||||
"indexedAt": {"type": "datetime"},
|
||||
"viewer": {"type": "ref", "ref": "#viewerState"}
|
||||
}
|
||||
},
|
||||
"viewerState": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"repost": {"type": "string"},
|
||||
"upvote": {"type": "string"},
|
||||
"downvote": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.feed.repost",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "record",
|
||||
"key": "tid",
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["subject", "createdAt"],
|
||||
"properties": {
|
||||
"subject": {"type": "ref", "ref": "com.atproto.repo.strongRef"},
|
||||
"createdAt": {"type": "datetime"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.feed.setVote",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Upvote, downvote, or clear the user's vote for a post.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["subject", "direction"],
|
||||
"properties": {
|
||||
"subject": {"type": "ref", "ref": "com.atproto.repo.strongRef"},
|
||||
"direction": {
|
||||
"type": "string",
|
||||
"enum": ["up", "down", "none"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"upvote": {"type": "string"},
|
||||
"downvote": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.feed.vote",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "record",
|
||||
"key": "tid",
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["subject", "direction", "createdAt"],
|
||||
"properties": {
|
||||
"subject": {"type": "ref", "ref": "com.atproto.repo.strongRef"},
|
||||
"direction": {"type": "string", "enum": ["up", "down"]},
|
||||
"createdAt": {"type": "datetime"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.graph.assertCreator",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "token",
|
||||
"description": "Assertion type: Creator. Defined for app.bsky.graph.assertions's assertion."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.graph.assertMember",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "token",
|
||||
"description": "Assertion type: Member. Defined for app.bsky.graph.assertions's assertion."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.graph.assertion",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "record",
|
||||
"key": "tid",
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["assertion", "subject", "createdAt"],
|
||||
"properties": {
|
||||
"assertion": {"type": "string"},
|
||||
"subject": {"type": "ref", "ref": "app.bsky.actor.ref"},
|
||||
"createdAt": {"type": "datetime"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.graph.confirmation",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "record",
|
||||
"key": "tid",
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["originator", "assertion", "createdAt"],
|
||||
"properties": {
|
||||
"originator": {"type": "ref", "ref": "app.bsky.actor.ref"},
|
||||
"assertion": {"type": "ref", "ref": "com.atproto.repo.strongRef"},
|
||||
"createdAt": {"type": "datetime"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.graph.follow",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "record",
|
||||
"description": "A social follow.",
|
||||
"key": "tid",
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["subject", "createdAt"],
|
||||
"properties": {
|
||||
"subject": {"type": "ref", "ref": "app.bsky.actor.ref"},
|
||||
"createdAt": {"type": "datetime"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.graph.getFollowers",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Who is following a user?",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["user"],
|
||||
"properties": {
|
||||
"user": {"type": "string"},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["subject", "followers"],
|
||||
"properties": {
|
||||
"subject": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"},
|
||||
"cursor": {"type": "string"},
|
||||
"followers": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.graph.getFollows",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Who is a user following?",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["user"],
|
||||
"properties": {
|
||||
"user": {"type": "string"},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["subject", "follows"],
|
||||
"properties": {
|
||||
"subject": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"},
|
||||
"cursor": {"type": "string"},
|
||||
"follows": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.graph.getMutes",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Who does the viewer mute?",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["mutes"],
|
||||
"properties": {
|
||||
"cursor": {"type": "string"},
|
||||
"mutes": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.graph.mute",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Mute an actor by did or handle.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["user"],
|
||||
"properties": {
|
||||
"user": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.graph.unmute",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Unmute an actor by did or handle.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["user"],
|
||||
"properties": {
|
||||
"user": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.notification.getCount",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["count"],
|
||||
"properties": {
|
||||
"count": { "type": "integer"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.notification.list",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["notifications"],
|
||||
"properties": {
|
||||
"cursor": {"type": "string"},
|
||||
"notifications": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "#notification"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"notification": {
|
||||
"type": "object",
|
||||
"required": ["uri", "cid", "author", "reason", "record", "isRead", "indexedAt"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string" },
|
||||
"author": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"},
|
||||
"reason": {
|
||||
"type": "string",
|
||||
"description": "Expected values are 'vote', 'repost', 'follow', 'invite', 'mention' and 'reply'.",
|
||||
"knownValues": ["vote", "repost", "follow", "invite", "mention", "reply"]
|
||||
},
|
||||
"reasonSubject": {"type": "string"},
|
||||
"record": {"type": "unknown"},
|
||||
"isRead": {"type": "boolean"},
|
||||
"indexedAt": {"type": "datetime"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.notification.updateSeen",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Notify server that the user has seen notifications.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["seenAt"],
|
||||
"properties": {
|
||||
"seenAt": { "type": "datetime" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.system.actorUser",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "token",
|
||||
"description": "Actor type: User. Defined for app.bsky.system.declaration's actorType."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.system.declRef",
|
||||
"defs": {
|
||||
"main": {
|
||||
"description": "A reference to a app.bsky.system.declaration record.",
|
||||
"type": "object",
|
||||
"required": ["cid", "actorType"],
|
||||
"properties": {
|
||||
"cid": {"type": "string"},
|
||||
"actorType": {
|
||||
"type": "string",
|
||||
"knownValues": ["app.bsky.system.actorUser"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.system.declaration",
|
||||
"defs": {
|
||||
"main": {
|
||||
"description": "Context for an account that is considered intrinsic to it and alters the fundamental understanding of an account of changed. A declaration should be treated as immutable.",
|
||||
"type": "record",
|
||||
"key": "literal:self",
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["actorType"],
|
||||
"properties": {
|
||||
"actorType": {
|
||||
"type": "string",
|
||||
"knownValues": ["app.bsky.system.actorUser"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.account.create",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Create an account.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["handle", "email", "password"],
|
||||
"properties": {
|
||||
"email": {"type": "string"},
|
||||
"handle": {"type": "string"},
|
||||
"inviteCode": {"type": "string"},
|
||||
"password": {"type": "string"},
|
||||
"recoveryKey": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["accessJwt", "refreshJwt", "handle", "did"],
|
||||
"properties": {
|
||||
"accessJwt": { "type": "string" },
|
||||
"refreshJwt": { "type": "string" },
|
||||
"handle": { "type": "string" },
|
||||
"did": { "type": "string" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"errors": [
|
||||
{"name": "InvalidHandle"},
|
||||
{"name": "InvalidPassword"},
|
||||
{"name": "InvalidInviteCode"},
|
||||
{"name": "HandleNotAvailable"}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.account.createInviteCode",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Create an invite code.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["useCount"],
|
||||
"properties": {
|
||||
"useCount": {"type": "integer"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["code"],
|
||||
"properties": {
|
||||
"code": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.account.delete",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Delete a user account with a token and password.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["did", "password", "token"],
|
||||
"properties": {
|
||||
"did": { "type": "string" },
|
||||
"password": { "type": "string" },
|
||||
"token": { "type": "string" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"errors": [{ "name": "ExpiredToken" }, { "name": "InvalidToken" }]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.account.get",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Get information about an account."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.account.requestDelete",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Initiate a user account deletion via email."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.account.requestPasswordReset",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Initiate a user account password reset via email.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["email"],
|
||||
"properties": {
|
||||
"email": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.account.resetPassword",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Reset a user account password using a token.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["token", "password"],
|
||||
"properties": {
|
||||
"token": { "type": "string" },
|
||||
"password": { "type": "string" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"errors": [{ "name": "ExpiredToken" }, { "name": "InvalidToken" }]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.blob",
|
||||
"defs": {
|
||||
"view": {
|
||||
"type": "object",
|
||||
"required": ["cid", "mimeType", "size", "createdAt"],
|
||||
"properties": {
|
||||
"cid": {"type": "string"},
|
||||
"mimeType": {"type": "string"},
|
||||
"size": {"type": "integer"},
|
||||
"createdAt": {"type": "datetime"},
|
||||
"details": {
|
||||
"type": "union",
|
||||
"refs": ["#imageDetails", "#videoDetails"]
|
||||
},
|
||||
"moderation": {"type": "ref", "ref": "#moderation"}
|
||||
}
|
||||
},
|
||||
"imageDetails": {
|
||||
"type": "object",
|
||||
"required": ["width", "height"],
|
||||
"properties": {
|
||||
"width": {"type": "integer"},
|
||||
"height": {"type": "integer"}
|
||||
}
|
||||
},
|
||||
"videoDetails": {
|
||||
"type": "object",
|
||||
"required": ["width", "height", "length"],
|
||||
"properties": {
|
||||
"width": {"type": "integer"},
|
||||
"height": {"type": "integer"},
|
||||
"length": {"type": "integer"}
|
||||
}
|
||||
},
|
||||
"moderation": {
|
||||
"type": "object",
|
||||
"required": [],
|
||||
"properties": {
|
||||
"currentAction": {"type": "ref", "ref": "com.atproto.admin.moderationAction#viewCurrent"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.getModerationAction",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "View details about a moderation action.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["id"],
|
||||
"properties": {
|
||||
"id": {"type": "integer"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {"type": "ref", "ref": "com.atproto.admin.moderationAction#viewDetail"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.getModerationActions",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "List moderation actions related to a subject.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"subject": {"type": "string"},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["actions"],
|
||||
"properties": {
|
||||
"cursor": {"type": "string"},
|
||||
"actions": {"type": "array", "items": {"type": "ref", "ref": "com.atproto.admin.moderationAction#view"}}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.getModerationReport",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "View details about a moderation report.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["id"],
|
||||
"properties": {
|
||||
"id": {"type": "integer"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {"type": "ref", "ref": "com.atproto.admin.moderationReport#viewDetail"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.getModerationReports",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "List moderation reports related to a subject.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"subject": {"type": "string"},
|
||||
"resolved": {"type": "boolean"},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["reports"],
|
||||
"properties": {
|
||||
"cursor": {"type": "string"},
|
||||
"reports": {"type": "array", "items": {"type": "ref", "ref": "com.atproto.admin.moderationReport#view"}}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.getRecord",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "View details about a record.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["uri"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {"type": "ref", "ref": "com.atproto.admin.record#viewDetail"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.getRepo",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "View details about a repository.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["did"],
|
||||
"properties": {
|
||||
"did": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {"type": "ref", "ref": "com.atproto.admin.repo#viewDetail"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.moderationAction",
|
||||
"defs": {
|
||||
"view": {
|
||||
"type": "object",
|
||||
"required": ["id", "action", "subject", "subjectBlobCids", "reason", "createdBy", "createdAt", "resolvedReportIds"],
|
||||
"properties": {
|
||||
"id": {"type": "integer"},
|
||||
"action": {"type": "ref", "ref": "#actionType"},
|
||||
"subject": {
|
||||
"type": "union",
|
||||
"refs": [
|
||||
"com.atproto.repo.repoRef",
|
||||
"com.atproto.repo.strongRef"
|
||||
]
|
||||
},
|
||||
"subjectBlobCids": {"type": "array", "items": {"type": "string"}},
|
||||
"reason": {"type": "string"},
|
||||
"createdBy": {"type": "string"},
|
||||
"createdAt": {"type": "string"},
|
||||
"reversal": {"type": "ref", "ref": "#reversal"},
|
||||
"resolvedReportIds": {"type": "array", "items": {"type": "integer"}}
|
||||
}
|
||||
},
|
||||
"viewDetail": {
|
||||
"type": "object",
|
||||
"required": ["id", "action", "subject", "subjectBlobs", "reason", "createdBy", "createdAt", "resolvedReports"],
|
||||
"properties": {
|
||||
"id": {"type": "integer"},
|
||||
"action": {"type": "ref", "ref": "#actionType"},
|
||||
"subject": {
|
||||
"type": "union",
|
||||
"refs": [
|
||||
"com.atproto.admin.repo#view",
|
||||
"com.atproto.admin.record#view"
|
||||
]
|
||||
},
|
||||
"subjectBlobs": {"type": "array", "items": {"type": "ref", "ref": "com.atproto.admin.blob#view"}},
|
||||
"reason": {"type": "string"},
|
||||
"createdBy": {"type": "string"},
|
||||
"createdAt": {"type": "string"},
|
||||
"reversal": {"type": "ref", "ref": "#reversal"},
|
||||
"resolvedReports": {"type": "array", "items": {"type": "ref", "ref": "com.atproto.admin.moderationReport#view"}}
|
||||
}
|
||||
},
|
||||
"viewCurrent": {
|
||||
"type": "object",
|
||||
"required": ["id", "action"],
|
||||
"properties": {
|
||||
"id": {"type": "integer"},
|
||||
"action": {"type": "ref", "ref": "#actionType"}
|
||||
}
|
||||
},
|
||||
"reversal": {
|
||||
"type": "object",
|
||||
"required": ["reason", "createdBy", "createdAt"],
|
||||
"properties": {
|
||||
"reason": {"type": "string"},
|
||||
"createdBy": {"type": "string"},
|
||||
"createdAt": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"actionType": {
|
||||
"type": "string",
|
||||
"knownValues": [
|
||||
"com.atproto.admin.moderationAction#takedown",
|
||||
"com.atproto.admin.moderationAction#flag",
|
||||
"com.atproto.admin.moderationAction#acknowledge"
|
||||
]
|
||||
},
|
||||
"takedown": {
|
||||
"type": "token",
|
||||
"description": "Moderation action type: Takedown. Indicates that content should not be served by the PDS."
|
||||
},
|
||||
"flag": {
|
||||
"type": "token",
|
||||
"description": "Moderation action type: Flag. Indicates that the content was reviewed and considered to violate PDS rules, but may still be served."
|
||||
},
|
||||
"acknowledge": {
|
||||
"type": "token",
|
||||
"description": "Moderation action type: Acknowledge. Indicates that the content was reviewed and not considered to violate PDS rules."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.moderationReport",
|
||||
"defs": {
|
||||
"view": {
|
||||
"type": "object",
|
||||
"required": ["id", "reasonType", "subject", "reportedByDid", "createdAt", "resolvedByActionIds"],
|
||||
"properties": {
|
||||
"id": {"type": "integer"},
|
||||
"reasonType": {"type": "ref", "ref": "com.atproto.report.reasonType"},
|
||||
"reason": {"type": "string"},
|
||||
"subject": {
|
||||
"type": "union",
|
||||
"refs": [
|
||||
"com.atproto.repo.repoRef",
|
||||
"com.atproto.repo.strongRef"
|
||||
]
|
||||
},
|
||||
"reportedByDid": {"type": "string"},
|
||||
"createdAt": {"type": "datetime"},
|
||||
"resolvedByActionIds": {"type": "array", "items": {"type": "integer"}}
|
||||
}
|
||||
},
|
||||
"viewDetail": {
|
||||
"type": "object",
|
||||
"required": ["id", "reasonType", "subject", "reportedByDid", "createdAt", "resolvedByActions"],
|
||||
"properties": {
|
||||
"id": {"type": "integer"},
|
||||
"reasonType": {"type": "ref", "ref": "com.atproto.report.reasonType"},
|
||||
"reason": {"type": "string"},
|
||||
"subject": {
|
||||
"type": "union",
|
||||
"refs": [
|
||||
"com.atproto.admin.repo#view",
|
||||
"com.atproto.admin.record#view"
|
||||
]
|
||||
},
|
||||
"reportedByDid": {"type": "string"},
|
||||
"createdAt": {"type": "datetime"},
|
||||
"resolvedByActions": {"type": "array", "items": {"type": "ref", "ref": "com.atproto.admin.moderationAction#view"}}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.record",
|
||||
"defs": {
|
||||
"view": {
|
||||
"type": "object",
|
||||
"required": ["uri", "cid", "value", "blobCids", "indexedAt", "moderation", "repo"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"},
|
||||
"value": {"type": "unknown"},
|
||||
"blobCids": {"type": "array", "items": {"type": "string"}},
|
||||
"indexedAt": {"type": "string"},
|
||||
"moderation": {"type": "ref", "ref": "#moderation"},
|
||||
"repo": {"type": "ref", "ref": "com.atproto.admin.repo#view"}
|
||||
}
|
||||
},
|
||||
"viewDetail": {
|
||||
"type": "object",
|
||||
"required": ["uri", "cid", "value", "blobs", "indexedAt", "moderation", "repo"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"},
|
||||
"value": {"type": "unknown"},
|
||||
"blobs": {"type": "array", "items": {"type": "ref", "ref": "com.atproto.admin.blob#view"}},
|
||||
"indexedAt": {"type": "string"},
|
||||
"moderation": {"type": "ref", "ref": "#moderationDetail"},
|
||||
"repo": {"type": "ref", "ref": "com.atproto.admin.repo#view"}
|
||||
}
|
||||
},
|
||||
"moderation": {
|
||||
"type": "object",
|
||||
"required": [],
|
||||
"properties": {
|
||||
"currentAction": {"type": "ref", "ref": "com.atproto.admin.moderationAction#viewCurrent"}
|
||||
}
|
||||
},
|
||||
"moderationDetail": {
|
||||
"type": "object",
|
||||
"required": ["actions", "reports"],
|
||||
"properties": {
|
||||
"currentAction": {"type": "ref", "ref": "com.atproto.admin.moderationAction#viewCurrent"},
|
||||
"actions": {"type": "array", "items": {"type": "ref", "ref": "com.atproto.admin.moderationAction#view"}},
|
||||
"reports": {"type": "array", "items": {"type": "ref", "ref": "com.atproto.admin.moderationReport#view"}}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.repo",
|
||||
"defs": {
|
||||
"view": {
|
||||
"type": "object",
|
||||
"required": ["did", "handle", "relatedRecords", "indexedAt", "moderation"],
|
||||
"properties": {
|
||||
"did": {"type": "string"},
|
||||
"handle": {"type": "string"},
|
||||
"account": {"type": "ref", "ref": "#account"},
|
||||
"relatedRecords": {"type": "array", "items": {"type": "unknown"}},
|
||||
"indexedAt": {"type": "string"},
|
||||
"moderation": {"type": "ref", "ref": "#moderation"}
|
||||
}
|
||||
},
|
||||
"viewDetail": {
|
||||
"type": "object",
|
||||
"required": ["did", "handle", "relatedRecords", "indexedAt", "moderation"],
|
||||
"properties": {
|
||||
"did": {"type": "string"},
|
||||
"handle": {"type": "string"},
|
||||
"account": {"type": "ref", "ref": "#account"},
|
||||
"relatedRecords": {"type": "array", "items": {"type": "unknown"}},
|
||||
"indexedAt": {"type": "string"},
|
||||
"moderation": {"type": "ref", "ref": "#moderationDetail"}
|
||||
}
|
||||
},
|
||||
"account": {
|
||||
"type": "object",
|
||||
"required": ["email"],
|
||||
"properties": {
|
||||
"email": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"moderation": {
|
||||
"type": "object",
|
||||
"required": [],
|
||||
"properties": {
|
||||
"currentAction": {"type": "ref", "ref": "com.atproto.admin.moderationAction#viewCurrent"}
|
||||
}
|
||||
},
|
||||
"moderationDetail": {
|
||||
"type": "object",
|
||||
"required": ["actions", "reports"],
|
||||
"properties": {
|
||||
"currentAction": {"type": "ref", "ref": "com.atproto.admin.moderationAction#viewCurrent"},
|
||||
"actions": {"type": "array", "items": {"type": "ref", "ref": "com.atproto.admin.moderationAction#view"}},
|
||||
"reports": {"type": "array", "items": {"type": "ref", "ref": "com.atproto.admin.moderationReport#view"}}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.resolveModerationReports",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Resolve moderation reports by an action.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["actionId", "reportIds", "createdBy"],
|
||||
"properties": {
|
||||
"actionId": {"type": "integer"},
|
||||
"reportIds": {"type": "array", "items": {"type": "integer"}},
|
||||
"createdBy": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "ref",
|
||||
"ref": "com.atproto.admin.moderationAction#view"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.reverseModerationAction",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Reverse a moderation action.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["id", "reason", "createdBy"],
|
||||
"properties": {
|
||||
"id": {"type": "integer"},
|
||||
"reason": {"type": "string"},
|
||||
"createdBy": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "ref",
|
||||
"ref": "com.atproto.admin.moderationAction#view"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.searchRepos",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Find repositories based on a search term.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"term": {"type": "string"},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
|
||||
"before": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["repos"],
|
||||
"properties": {
|
||||
"cursor": {"type": "string"},
|
||||
"repos": {"type": "array", "items": {"type": "ref", "ref": "com.atproto.admin.repo#view"}}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.admin.takeModerationAction",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Take a moderation action on a repo.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["action", "subject", "reason", "createdBy"],
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string",
|
||||
"knownValues": [
|
||||
"com.atproto.admin.moderationAction#takedown",
|
||||
"com.atproto.admin.moderationAction#flag",
|
||||
"com.atproto.admin.moderationAction#acknowledge"
|
||||
]
|
||||
},
|
||||
"subject": {
|
||||
"type": "union",
|
||||
"refs": [
|
||||
"com.atproto.repo.repoRef",
|
||||
"com.atproto.repo.recordRef"
|
||||
]
|
||||
},
|
||||
"subjectBlobCids": {"type": "array", "items": {"type": "string"}},
|
||||
"reason": {"type": "string"},
|
||||
"createdBy": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "ref",
|
||||
"ref": "com.atproto.admin.moderationAction#view"
|
||||
}
|
||||
},
|
||||
"errors": [{ "name": "SubjectHasAction" }]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.blob.upload",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Upload a new blob to be added to repo in a later request.",
|
||||
"input": {
|
||||
"encoding": "*/*"
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["cid"],
|
||||
"properties": {
|
||||
"cid": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.handle.resolve",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Provides the DID of a repo.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"handle": {"type": "string", "description": "The handle to resolve. If not supplied, will resolve the host's own handle."}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["did"],
|
||||
"properties": {
|
||||
"did": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.handle.update",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Updates the handle of the account",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["handle"],
|
||||
"properties": {
|
||||
"handle": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.repo.batchWrite",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Apply a batch transaction of creates, puts, and deletes.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["did", "writes"],
|
||||
"properties": {
|
||||
"did": {
|
||||
"type": "string",
|
||||
"description": "The DID of the repo."
|
||||
},
|
||||
"validate": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Validate the records?"
|
||||
},
|
||||
"writes": {
|
||||
"type": "array",
|
||||
"items": {"type": "union", "refs": ["#create", "#update", "#delete"], "closed": true}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"create": {
|
||||
"type": "object",
|
||||
"required": ["action", "collection", "value"],
|
||||
"properties": {
|
||||
"action": {"type": "string", "const": "create"},
|
||||
"collection": {"type": "string"},
|
||||
"rkey": {"type": "string"},
|
||||
"value": {"type": "unknown"}
|
||||
}
|
||||
},
|
||||
"update": {
|
||||
"type": "object",
|
||||
"required": ["action", "collection", "rkey", "value"],
|
||||
"properties": {
|
||||
"action": {"type": "string", "const": "update"},
|
||||
"collection": {"type": "string"},
|
||||
"rkey": {"type": "string"},
|
||||
"value": {"type": "unknown"}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"type": "object",
|
||||
"required": ["action", "collection", "rkey"],
|
||||
"properties": {
|
||||
"action": {"type": "string", "const": "delete"},
|
||||
"collection": {"type": "string"},
|
||||
"rkey": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.repo.createRecord",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Create a new record.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["did", "collection", "record"],
|
||||
"properties": {
|
||||
"did": {
|
||||
"type": "string",
|
||||
"description": "The DID of the repo."
|
||||
},
|
||||
"collection": {
|
||||
"type": "string",
|
||||
"description": "The NSID of the record collection."
|
||||
},
|
||||
"validate": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Validate the record?"
|
||||
},
|
||||
"record": {
|
||||
"type": "unknown",
|
||||
"description": "The record to create."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["uri", "cid"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.repo.deleteRecord",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Delete a record.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["did", "collection", "rkey"],
|
||||
"properties": {
|
||||
"did": {
|
||||
"type": "string",
|
||||
"description": "The DID of the repo."
|
||||
},
|
||||
"collection": {
|
||||
"type": "string",
|
||||
"description": "The NSID of the record collection."
|
||||
},
|
||||
"rkey": {
|
||||
"type": "string",
|
||||
"description": "The key of the record."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.repo.describe",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Get information about the repo, including the list of collections.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["user"],
|
||||
"properties": {
|
||||
"user": {"type": "string", "description": "The handle or DID of the repo."}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["handle", "did", "didDoc", "collections", "handleIsCorrect"],
|
||||
"properties": {
|
||||
"handle": {"type": "string"},
|
||||
"did": {"type": "string"},
|
||||
"didDoc": {"type": "unknown"},
|
||||
"collections": {"type": "array", "items": {"type": "string"}},
|
||||
"handleIsCorrect": {"type": "boolean"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.repo.getRecord",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Fetch a record.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["user", "collection", "rkey"],
|
||||
"properties": {
|
||||
"user": {"type": "string", "description": "The handle or DID of the repo."},
|
||||
"collection": {"type": "string", "description": "The NSID of the collection."},
|
||||
"rkey": {"type": "string", "description": "The key of the record."},
|
||||
"cid": {"type": "string", "description": "The CID of the version of the record. If not specified, then return the most recent version."}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["uri", "value"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"},
|
||||
"value": {"type": "unknown"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.repo.listRecords",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "List a range of records in a collection.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["user", "collection"],
|
||||
"properties": {
|
||||
"user": {"type": "string", "description": "The handle or DID of the repo."},
|
||||
"collection": {"type": "string", "description": "The NSID of the record type."},
|
||||
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50, "description": "The number of records to return."},
|
||||
"before": {"type": "string", "description": "A TID to filter the range of records returned."},
|
||||
"after": {"type": "string", "description": "A TID to filter the range of records returned."},
|
||||
"reverse": {"type": "boolean", "description": "Reverse the order of the returned records?"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["records"],
|
||||
"properties": {
|
||||
"cursor": {"type": "string"},
|
||||
"records": {
|
||||
"type": "array",
|
||||
"items": {"type": "ref", "ref": "#record"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["uri", "cid", "value"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"},
|
||||
"value": {"type": "unknown"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.repo.putRecord",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Write a record.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["did", "collection", "rkey", "record"],
|
||||
"properties": {
|
||||
"did": {
|
||||
"type": "string",
|
||||
"description": "The DID of the repo."
|
||||
},
|
||||
"collection": {
|
||||
"type": "string",
|
||||
"description": "The NSID of the record type."
|
||||
},
|
||||
"rkey": {
|
||||
"type": "string",
|
||||
"description": "The TID of the record."
|
||||
},
|
||||
"validate": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Validate the record?"
|
||||
},
|
||||
"record": {
|
||||
"type": "unknown",
|
||||
"description": "The record to create."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["uri", "cid"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.repo.recordRef",
|
||||
"description": "A URI with optional content-hash fingerprint.",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "object",
|
||||
"required": ["uri"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.repo.repoRef",
|
||||
"description": "A did identifying a repository.",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "object",
|
||||
"required": ["did"],
|
||||
"properties": {
|
||||
"did": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.repo.strongRef",
|
||||
"description": "A URI with a content-hash fingerprint.",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "object",
|
||||
"required": ["uri", "cid"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.report.create",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Report a repo or a record.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["reasonType", "subject"],
|
||||
"properties": {
|
||||
"reasonType": {"type": "ref", "ref": "com.atproto.report.reasonType"},
|
||||
"reason": {"type": "string"},
|
||||
"subject": {
|
||||
"type": "union",
|
||||
"refs": [
|
||||
"com.atproto.repo.repoRef",
|
||||
"com.atproto.repo.recordRef"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["id", "reasonType", "subject", "reportedByDid", "createdAt"],
|
||||
"properties": {
|
||||
"id": {"type": "integer"},
|
||||
"reasonType": {"type": "ref", "ref": "com.atproto.report.reasonType"},
|
||||
"reason": {"type": "string"},
|
||||
"subject": {
|
||||
"type": "union",
|
||||
"refs": [
|
||||
"com.atproto.repo.repoRef",
|
||||
"com.atproto.repo.strongRef"
|
||||
]
|
||||
},
|
||||
"reportedByDid": {"type": "string"},
|
||||
"createdAt": {"type": "datetime"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.report.reasonType",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "string",
|
||||
"knownValues": [
|
||||
"com.atproto.report.reasonType#spam",
|
||||
"com.atproto.report.reasonType#other"
|
||||
]
|
||||
},
|
||||
"spam": {
|
||||
"type": "token",
|
||||
"description": "Moderation report reason: Spam."
|
||||
},
|
||||
"other": {
|
||||
"type": "token",
|
||||
"description": "Moderation report reason: Other."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.report.subject",
|
||||
"defs": {
|
||||
"repo": {
|
||||
"type": "object",
|
||||
"required": ["did"],
|
||||
"properties": {
|
||||
"did": {"type": "string", "description": "The DID of the repo."}
|
||||
}
|
||||
},
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["did", "collection", "rkey"],
|
||||
"properties": {
|
||||
"did": {"type": "string", "description": "The DID of the repo."},
|
||||
"collection": {"type": "string", "description": "The NSID of the collection."},
|
||||
"rkey": {"type": "string", "description": "The key of the record."},
|
||||
"cid": {"type": "string", "description": "The CID of the version of the record. If not specified, defaults to the most recent version."}
|
||||
}
|
||||
},
|
||||
"recordRef": {
|
||||
"type": "object",
|
||||
"required": ["uri", "cid"],
|
||||
"properties": {
|
||||
"uri": {"type": "string"},
|
||||
"cid": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.server.getAccountsConfig",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Get a document describing the service's accounts configuration.",
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["availableUserDomains"],
|
||||
"properties": {
|
||||
"inviteCodeRequired": {"type": "boolean"},
|
||||
"availableUserDomains": {"type": "array", "items": {"type": "string"}},
|
||||
"links": {"type": "ref", "ref": "#links"}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"privacyPolicy": {"type": "string"},
|
||||
"termsOfService": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.session.create",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Create an authentication session.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["password"],
|
||||
"properties": {
|
||||
"identifier": {"type": "string", "description": "Handle or other identifier supported by the server for the authenticating user."},
|
||||
"password": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["accessJwt", "refreshJwt", "handle", "did"],
|
||||
"properties": {
|
||||
"accessJwt": {"type": "string"},
|
||||
"refreshJwt": {"type": "string"},
|
||||
"handle": {"type": "string"},
|
||||
"did": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"errors": [
|
||||
{"name": "AccountTakedown"}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.session.delete",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Delete the current session."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.session.get",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Get information about the current session.",
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["handle", "did"],
|
||||
"properties": {
|
||||
"handle": {"type": "string"},
|
||||
"did": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.session.refresh",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"description": "Refresh an authentication session.",
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["accessJwt", "refreshJwt", "handle", "did"],
|
||||
"properties": {
|
||||
"accessJwt": {"type": "string"},
|
||||
"refreshJwt": {"type": "string"},
|
||||
"handle": {"type": "string"},
|
||||
"did": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"errors": [
|
||||
{"name": "AccountTakedown"}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.sync.getBlocks",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Gets blocks from a given repo.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["did", "cids"],
|
||||
"properties": {
|
||||
"did": {"type": "string", "description": "The DID of the repo."},
|
||||
"cids": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/vnd.ipld.car"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.sync.getCheckout",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Gets the repo state.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["did"],
|
||||
"properties": {
|
||||
"did": {"type": "string", "description": "The DID of the repo."},
|
||||
"commit": {"type": "string", "description": "The commit to get the checkout from. Defaults to current HEAD."}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/vnd.ipld.car"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.sync.getCommitPath",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Gets the path of repo commits",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["did"],
|
||||
"properties": {
|
||||
"did": {"type": "string", "description": "The DID of the repo."},
|
||||
"latest": { "type": "string", "description": "The most recent commit"},
|
||||
"earliest": { "type": "string", "description": "The earliest commit to start from"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["commits"],
|
||||
"properties": {
|
||||
"commits": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.sync.getHead",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Gets the current HEAD CID of a repo.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["did"],
|
||||
"properties": {
|
||||
"did": {"type": "string", "description": "The DID of the repo."}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["root"],
|
||||
"properties": {
|
||||
"root": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.sync.getRecord",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Gets blocks needed for existence or non-existence of record.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["did", "collection", "rkey"],
|
||||
"properties": {
|
||||
"did": {"type": "string", "description": "The DID of the repo."},
|
||||
"collection": {"type": "string" },
|
||||
"rkey": {"type": "string" },
|
||||
"commit": {"type": "string", "description": "An optional past commit CID."}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/vnd.ipld.car"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.sync.getRepo",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Gets the repo state.",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"required": ["did"],
|
||||
"properties": {
|
||||
"did": {"type": "string", "description": "The DID of the repo."},
|
||||
"earliest": {"type": "string", "description": "The earliest commit in the commit range (not inclusive)"},
|
||||
"latest": {"type": "string", "description": "The latest commit you in the commit range (inclusive"}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/vnd.ipld.car"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
{
|
||||
"lexicon": 1,
|
||||
"id": "com.atproto.sync.subscribeAllRepos",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "subscription",
|
||||
"description": "Subscribe to repo updates",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"cursor": {
|
||||
"type": "integer",
|
||||
"description": "The last known event to backfill from."
|
||||
}
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["seq", "event", "repo", "commit", "blocks", "blobs", "time"],
|
||||
"properties": {
|
||||
"seq": {"type": "integer"},
|
||||
"event": {
|
||||
"type": "string",
|
||||
"knownValues": [
|
||||
"repo_append",
|
||||
"rebase"
|
||||
]
|
||||
},
|
||||
"repo": {"type": "string"},
|
||||
"commit": {"type": "string"},
|
||||
"prev": {"type": "string"},
|
||||
"blocks": {"type": "unknown"},
|
||||
"blobs": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"}
|
||||
},
|
||||
"time": {"type": "datetime"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"infos": [
|
||||
{"name": "OutdatedCursor"}
|
||||
],
|
||||
"errors": [
|
||||
{"name": "FutureCursor"}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,27 +22,14 @@ class XrpcActorTest(testutil.TestCase):
|
|||
query_string={'actor': 'user.com'})
|
||||
self.assertEqual(200, resp.status_code)
|
||||
self.assertEqual({
|
||||
'$type': 'app.bsky.actor.profile',
|
||||
'$type': 'app.bsky.actor.defs#profileView',
|
||||
'handle': 'mas.to/users/swentel',
|
||||
'did': 'did:web:mas.to:users:swentel',
|
||||
'creator': 'did:web:mas.to:users:swentel',
|
||||
'displayName': 'Mrs. ☕ Foo',
|
||||
'declaration': {
|
||||
'$type': 'app.bsky.system.declRef',
|
||||
'cid': 'TODO',
|
||||
'actorType': 'app.bsky.system.actorUser',
|
||||
},
|
||||
'description': None,
|
||||
'description': "I'm a person",
|
||||
'avatar': 'https://user.com/me.jpg',
|
||||
'banner': 'http://user.com/header.png',
|
||||
'followersCount': 0,
|
||||
'followsCount': 0,
|
||||
'membersCount': 0,
|
||||
'postsCount': 0,
|
||||
'myState': {
|
||||
'follow': 'TODO',
|
||||
'member': 'TODO',
|
||||
},
|
||||
}, resp.json)
|
||||
|
||||
def test_getProfile_unset(self):
|
||||
|
@ -67,17 +54,17 @@ class XrpcActorTest(testutil.TestCase):
|
|||
}, resp.json)
|
||||
|
||||
def test_search(self):
|
||||
resp = self.client.get('/xrpc/app.bsky.actor.search',
|
||||
resp = self.client.get('/xrpc/app.bsky.actor.searchActors',
|
||||
query_string={'term': 'foo'})
|
||||
self.assertEqual(200, resp.status_code)
|
||||
self.assertEqual({
|
||||
'users': [],
|
||||
'actors': [],
|
||||
}, resp.json)
|
||||
|
||||
def test_searchTypeahead(self):
|
||||
resp = self.client.get('/xrpc/app.bsky.actor.searchTypeahead',
|
||||
resp = self.client.get('/xrpc/app.bsky.actor.searchActorsTypeahead',
|
||||
query_string={'term': 'foo'})
|
||||
self.assertEqual(200, resp.status_code)
|
||||
self.assertEqual({
|
||||
'users': [],
|
||||
'actors': [],
|
||||
}, resp.json)
|
||||
|
|
|
@ -40,12 +40,12 @@ POST_THREAD_AS = {
|
|||
}
|
||||
POST_THREAD_BSKY = {
|
||||
'thread': {
|
||||
'$type': 'app.bsky.feed.getPostThread#threadViewPost',
|
||||
'$type': 'app.bsky.feed.defs#threadViewPost',
|
||||
'post': POST_BSKY['post'],
|
||||
'replies': [{
|
||||
'$type': 'app.bsky.feed.getPostThread#threadViewPost',
|
||||
'$type': 'app.bsky.feed.defs#threadViewPost',
|
||||
'post': {
|
||||
'$type': 'app.bsky.feed.post#view',
|
||||
'$type': 'app.bsky.feed.defs#postView',
|
||||
'uri': 'http://bob.org/reply',
|
||||
'cid': 'TODO',
|
||||
'record': {
|
||||
|
@ -54,22 +54,17 @@ POST_THREAD_BSKY = {
|
|||
'createdAt': '',
|
||||
},
|
||||
'author': {
|
||||
'$type': 'app.bsky.actor.ref#withInfo',
|
||||
'$type': 'app.bsky.actor.defs#profileViewBasic',
|
||||
'did': 'did:web:bob.org',
|
||||
'displayName': 'Bob',
|
||||
'handle': 'bob.org',
|
||||
'declaration': {
|
||||
'$type': 'app.bsky.system.declRef',
|
||||
'actorType': 'app.bsky.system.actorUser',
|
||||
'cid': 'TODO',
|
||||
},
|
||||
'description': None,
|
||||
},
|
||||
'replyCount': 0,
|
||||
'repostCount': 0,
|
||||
'upvoteCount': 0,
|
||||
'downvoteCount': 0,
|
||||
'indexedAt': '2022-01-02T03:04:05+00:00',
|
||||
'viewer': {},
|
||||
},
|
||||
}],
|
||||
},
|
||||
|
@ -101,7 +96,7 @@ class XrpcFeedTest(testutil.TestCase):
|
|||
resp = self.client.get('/xrpc/app.bsky.feed.getAuthorFeed',
|
||||
query_string={'author': 'user.com'})
|
||||
self.assertEqual(200, resp.status_code, resp.get_data(as_text=True))
|
||||
self.assertEqual({
|
||||
self.assert_equals({
|
||||
'feed': [REPOST_BSKY, REPLY_BSKY, POST_BSKY],
|
||||
}, resp.json)
|
||||
|
||||
|
@ -133,7 +128,7 @@ class XrpcFeedTest(testutil.TestCase):
|
|||
resp = self.client.get('/xrpc/app.bsky.feed.getPostThread',
|
||||
query_string={'uri': 'http://a/post'})
|
||||
self.assertEqual(200, resp.status_code, resp.get_data(as_text=True))
|
||||
self.assert_equals(POST_THREAD_BSKY, resp.json)
|
||||
self.assertEqual(POST_THREAD_BSKY, resp.json)
|
||||
|
||||
def test_getPostThread_no_uri_param(self):
|
||||
resp = self.client.get('/xrpc/app.bsky.feed.getPostThread')
|
||||
|
@ -162,23 +157,15 @@ class XrpcFeedTest(testutil.TestCase):
|
|||
'uri': 'http://orig/post',
|
||||
'repostBy': [{
|
||||
'$type': 'app.bsky.feed.getRepostedBy#repostedBy',
|
||||
'description': None,
|
||||
'did': 'did:web:mas.to:users:swentel',
|
||||
'declaration': {
|
||||
'$type': 'app.bsky.system.declRef',
|
||||
'cid': 'TODO',
|
||||
'actorType': 'app.bsky.system.actorUser',
|
||||
},
|
||||
'handle': 'mas.to/users/swentel',
|
||||
'displayName': 'Mrs. ☕ Foo',
|
||||
'avatar': 'https://user.com/me.jpg',
|
||||
}, {
|
||||
'$type': 'app.bsky.feed.getRepostedBy#repostedBy',
|
||||
'description': None,
|
||||
'did': 'did:web:alice.com',
|
||||
'declaration': {
|
||||
'$type': 'app.bsky.system.declRef',
|
||||
'cid': 'TODO',
|
||||
'actorType': 'app.bsky.system.actorUser',
|
||||
},
|
||||
'handle': 'alice.com',
|
||||
'displayName': 'Alice',
|
||||
'avatar': 'https://alice.com/alice.jpg',
|
||||
|
@ -193,10 +180,10 @@ class XrpcFeedTest(testutil.TestCase):
|
|||
'feed': [bluesky.from_as1(COMMENT), bluesky.from_as1(NOTE)],
|
||||
}, got.json)
|
||||
|
||||
def test_getVotes(self):
|
||||
resp = self.client.get('/xrpc/app.bsky.feed.getVotes',
|
||||
def test_getLikes(self):
|
||||
resp = self.client.get('/xrpc/app.bsky.feed.getLikes',
|
||||
query_string={'uri': 'http://a/post'})
|
||||
self.assertEqual({
|
||||
'uri': 'http://a/post',
|
||||
'votes': [],
|
||||
'likes': [],
|
||||
}, resp.json)
|
||||
|
|
|
@ -7,31 +7,26 @@ from .test_activitypub import ACTOR, FOLLOW, FOLLOW_WITH_ACTOR, FOLLOW_WITH_OBJE
|
|||
from . import testutil
|
||||
from models import Follower, User
|
||||
|
||||
ACTOR_DECLARATION = {
|
||||
'$type': 'app.bsky.system.declRef',
|
||||
'actorType': 'app.bsky.system.actorUser',
|
||||
'cid': 'TODO',
|
||||
}
|
||||
SUBJECT = {
|
||||
'$type': 'app.bsky.actor.ref#withInfo',
|
||||
'$type': 'app.bsky.actor.defs#profileView',
|
||||
'did': 'did:web:user.com',
|
||||
'handle': 'user.com',
|
||||
'declaration': ACTOR_DECLARATION,
|
||||
'description': None,
|
||||
}
|
||||
FOLLOWERS_BSKY = [{
|
||||
'$type': 'app.bsky.graph.getFollowers#follower',
|
||||
'did': 'did:web:other',
|
||||
'handle': 'yoozer@other',
|
||||
'declaration': ACTOR_DECLARATION,
|
||||
'indexedAt': '2022-01-02T03:04:05+00:00',
|
||||
'description': None,
|
||||
}, {
|
||||
'$type': 'app.bsky.graph.getFollowers#follower',
|
||||
'did': 'did:web:mas.to:users:swentel',
|
||||
'handle': 'mas.to/users/swentel',
|
||||
'displayName': 'Mrs. ☕ Foo',
|
||||
'avatar': 'https://user.com/me.jpg',
|
||||
'declaration': ACTOR_DECLARATION,
|
||||
'indexedAt': '2022-01-02T03:04:05+00:00',
|
||||
'description': None,
|
||||
}]
|
||||
|
||||
|
||||
|
@ -57,7 +52,7 @@ class XrpcGraphTest(testutil.TestCase):
|
|||
resp = self.client.get('/xrpc/app.bsky.graph.getFollowers',
|
||||
query_string={'user': 'user.com'})
|
||||
self.assertEqual(200, resp.status_code)
|
||||
self.assert_equals({
|
||||
self.assertEqual({
|
||||
'subject': SUBJECT,
|
||||
'cursor': '',
|
||||
'followers': [],
|
||||
|
@ -69,6 +64,7 @@ class XrpcGraphTest(testutil.TestCase):
|
|||
other_follow = {
|
||||
**FOLLOW,
|
||||
'actor': {
|
||||
'type': 'Person',
|
||||
'url': 'http://other',
|
||||
'preferredUsername': 'yoozer',
|
||||
},
|
||||
|
@ -85,7 +81,7 @@ class XrpcGraphTest(testutil.TestCase):
|
|||
resp = self.client.get('/xrpc/app.bsky.graph.getFollowers',
|
||||
query_string={'user': 'user.com'})
|
||||
self.assertEqual(200, resp.status_code)
|
||||
self.assert_equals({
|
||||
self.assertEqual({
|
||||
'subject': SUBJECT,
|
||||
'cursor': '',
|
||||
'followers': FOLLOWERS_BSKY,
|
||||
|
@ -102,7 +98,7 @@ class XrpcGraphTest(testutil.TestCase):
|
|||
resp = self.client.get('/xrpc/app.bsky.graph.getFollows',
|
||||
query_string={'user': 'user.com'})
|
||||
self.assertEqual(200, resp.status_code)
|
||||
self.assert_equals({
|
||||
self.assertEqual({
|
||||
'subject': SUBJECT,
|
||||
'cursor': '',
|
||||
'follows': [],
|
||||
|
@ -114,6 +110,7 @@ class XrpcGraphTest(testutil.TestCase):
|
|||
other_follow = {
|
||||
**FOLLOW,
|
||||
'object': {
|
||||
'type': 'Person',
|
||||
'url': 'http://other',
|
||||
'preferredUsername': 'yoozer',
|
||||
},
|
||||
|
@ -130,7 +127,7 @@ class XrpcGraphTest(testutil.TestCase):
|
|||
resp = self.client.get('/xrpc/app.bsky.graph.getFollows',
|
||||
query_string={'user': 'user.com'})
|
||||
self.assertEqual(200, resp.status_code)
|
||||
self.assert_equals({
|
||||
self.assertEqual({
|
||||
'subject': SUBJECT,
|
||||
'cursor': '',
|
||||
'follows': FOLLOWERS_BSKY,
|
||||
|
|
|
@ -33,14 +33,7 @@ def getProfile(input, actor=None):
|
|||
actor_as1 = g.user.to_as1()
|
||||
logger.info(f'AS1 actor: {json.dumps(actor_as1, indent=2)}')
|
||||
|
||||
profile = {
|
||||
**bluesky.from_as1(actor_as1),
|
||||
'myState': {
|
||||
# ?
|
||||
'follow': 'TODO',
|
||||
'member': 'TODO',
|
||||
},
|
||||
}
|
||||
profile = bluesky.from_as1(actor_as1)
|
||||
logger.info(f'Bluesky profile: {json.dumps(profile, indent=2)}')
|
||||
return profile
|
||||
|
||||
|
@ -54,19 +47,19 @@ def getSuggestions(input):
|
|||
return {'actors': []}
|
||||
|
||||
|
||||
@xrpc_server.method('app.bsky.actor.search')
|
||||
def search(input, term=None, limit=None, before=None):
|
||||
@xrpc_server.method('app.bsky.actor.searchActors')
|
||||
def searchActors(input, term=None, limit=None, before=None):
|
||||
"""
|
||||
lexicons/app/bsky/actor/search.json
|
||||
lexicons/app/bsky/actor/searchActors.json
|
||||
"""
|
||||
# TODO based on stored users
|
||||
return {'users': []}
|
||||
return {'actors': []}
|
||||
|
||||
|
||||
@xrpc_server.method('app.bsky.actor.searchTypeahead')
|
||||
def searchTypeahead(input, term=None, limit=None):
|
||||
@xrpc_server.method('app.bsky.actor.searchActorsTypeahead')
|
||||
def searchActorsTypeahead(input, term=None, limit=None):
|
||||
"""
|
||||
lexicons/app/bsky/actor/searchTypeahead.json
|
||||
lexicons/app/bsky/actor/searchActorsTypeahead.json
|
||||
"""
|
||||
# TODO based on stored users
|
||||
return {'users': []}
|
||||
return {'actors': []}
|
||||
|
|
16
xrpc_feed.py
16
xrpc_feed.py
|
@ -55,10 +55,10 @@ def getPostThread(input, uri=None, depth=None):
|
|||
|
||||
return {
|
||||
'thread': {
|
||||
'$type': 'app.bsky.feed.getPostThread#threadViewPost',
|
||||
'$type': 'app.bsky.feed.defs#threadViewPost',
|
||||
'post': bluesky.from_as1(obj.as1)['post'],
|
||||
'replies': [{
|
||||
'$type': 'app.bsky.feed.getPostThread#threadViewPost',
|
||||
'$type': 'app.bsky.feed.defs#threadViewPost',
|
||||
'post': bluesky.from_as1(reply)['post'],
|
||||
} for reply in obj.as1.get('replies', {}).get('items', [])],
|
||||
},
|
||||
|
@ -84,7 +84,7 @@ def getRepostedBy(input, uri=None, cid=None, limit=None, before=None):
|
|||
return {
|
||||
'uri': 'http://orig/post',
|
||||
'repostBy': [{
|
||||
**bluesky.actor_to_ref(a['actor']),
|
||||
**bluesky.from_as1(a['actor']),
|
||||
'$type': 'app.bsky.feed.getRepostedBy#repostedBy',
|
||||
} for a in activities if a.get('actor')],
|
||||
}
|
||||
|
@ -108,13 +108,13 @@ def getTimeline(input, algorithm=None, limit=50, before=None):
|
|||
return {'feed': [bluesky.from_as1(obj.as1) for obj in objects if not obj.deleted]}
|
||||
|
||||
|
||||
# TODO: use likes as votes?
|
||||
@xrpc_server.method('app.bsky.feed.getVotes')
|
||||
def getVotes(input, uri=None, direction=None, cid=None, limit=None, before=None):
|
||||
# TODO
|
||||
@xrpc_server.method('app.bsky.feed.getLikes')
|
||||
def getLikes(input, uri=None, direction=None, cid=None, limit=None, before=None):
|
||||
"""
|
||||
lexicons/app/bsky/feed/getVotes.json
|
||||
lexicons/app/bsky/feed/getLikes.json
|
||||
"""
|
||||
return {
|
||||
'uri': uri,
|
||||
'votes': [],
|
||||
'likes': [],
|
||||
}
|
||||
|
|
|
@ -36,13 +36,16 @@ def get_followers(query_prop, output_field, user=None, limit=50, before=None):
|
|||
actor = follower.to_as1()
|
||||
if actor:
|
||||
actors.append({
|
||||
**bluesky.actor_to_ref(actor),
|
||||
**bluesky.from_as1(actor),
|
||||
'$type': 'app.bsky.graph.getFollowers#follower',
|
||||
'indexedAt': util.now().isoformat(),
|
||||
})
|
||||
|
||||
return {
|
||||
'subject': bluesky.actor_to_ref({'url': f'https://{user}/'}),
|
||||
'subject': bluesky.from_as1({
|
||||
'objectType': 'person',
|
||||
'url': f'https://{user}/',
|
||||
}),
|
||||
output_field: actors,
|
||||
'cursor': '',
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue