Skip to content

Commit

Permalink
atproto-openapi-types/spec/api.json updated
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyliu7321 authored and github-actions[bot] committed May 14, 2024
1 parent 435cee3 commit 4d81515
Show file tree
Hide file tree
Showing 22 changed files with 2,927 additions and 111 deletions.
13 changes: 12 additions & 1 deletion atproto-openapi-types/lexicons/app/bsky/actor/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,18 @@
"properties": {
"lists": { "type": "integer" },
"feedgens": { "type": "integer" },
"labeler": { "type": "boolean" }
"labeler": { "type": "boolean" },
"chat": { "type": "ref", "ref": "#profileAssociatedChat" }
}
},
"profileAssociatedChat": {
"type": "object",
"required": ["allowIncoming"],
"properties": {
"allowIncoming": {
"type": "string",
"knownValues": ["all", "none", "following"]
}
}
},
"viewerState": {
Expand Down
21 changes: 21 additions & 0 deletions atproto-openapi-types/lexicons/chat/bsky/actor/declaration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"lexicon": 1,
"id": "chat.bsky.actor.declaration",
"defs": {
"main": {
"type": "record",
"description": "A declaration of a Bluesky chat account.",
"key": "literal:self",
"record": {
"type": "object",
"required": ["allowIncoming"],
"properties": {
"allowIncoming": {
"type": "string",
"knownValues": ["all", "none", "following"]
}
}
}
}
}
}
33 changes: 33 additions & 0 deletions atproto-openapi-types/lexicons/chat/bsky/actor/defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"lexicon": 1,
"id": "chat.bsky.actor.defs",
"defs": {
"profileViewBasic": {
"type": "object",
"required": ["did", "handle"],
"properties": {
"did": { "type": "string", "format": "did" },
"handle": { "type": "string", "format": "handle" },
"displayName": {
"type": "string",
"maxGraphemes": 64,
"maxLength": 640
},
"avatar": { "type": "string", "format": "uri" },
"associated": {
"type": "ref",
"ref": "app.bsky.actor.defs#profileAssociated"
},
"viewer": { "type": "ref", "ref": "app.bsky.actor.defs#viewerState" },
"labels": {
"type": "array",
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
},
"chatDisabled": {
"type": "boolean",
"description": "Set to true when the actor cannot actively participate in converations"
}
}
}
}
}
16 changes: 16 additions & 0 deletions atproto-openapi-types/lexicons/chat/bsky/actor/deleteAccount.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"lexicon": 1,
"id": "chat.bsky.actor.deleteAccount",
"defs": {
"main": {
"type": "procedure",
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"lexicon": 1,
"id": "chat.bsky.actor.exportAccountData",
"defs": {
"main": {
"type": "query",
"output": {
"encoding": "application/jsonl"
}
}
}
}
137 changes: 137 additions & 0 deletions atproto-openapi-types/lexicons/chat/bsky/convo/defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.defs",
"defs": {
"messageRef": {
"type": "object",
"required": ["did", "messageId"],
"properties": {
"did": { "type": "string", "format": "did" },
"messageId": { "type": "string" }
}
},
"message": {
"type": "object",
"required": ["text"],
"properties": {
"id": { "type": "string" },
"text": {
"type": "string",
"maxLength": 10000,
"maxGraphemes": 1000
},
"facets": {
"type": "array",
"description": "Annotations of text (mentions, URLs, hashtags, etc)",
"items": { "type": "ref", "ref": "app.bsky.richtext.facet" }
},
"embed": {
"type": "union",
"refs": ["app.bsky.embed.record"]
}
}
},
"messageView": {
"type": "object",
"required": ["id", "rev", "text", "sender", "sentAt"],
"properties": {
"id": { "type": "string" },
"rev": { "type": "string" },
"text": {
"type": "string",
"maxLength": 10000,
"maxGraphemes": 1000
},
"facets": {
"type": "array",
"description": "Annotations of text (mentions, URLs, hashtags, etc)",
"items": { "type": "ref", "ref": "app.bsky.richtext.facet" }
},
"embed": {
"type": "union",
"refs": ["app.bsky.embed.record"]
},
"sender": { "type": "ref", "ref": "#messageViewSender" },
"sentAt": { "type": "string", "format": "datetime" }
}
},
"deletedMessageView": {
"type": "object",
"required": ["id", "rev", "sender", "sentAt"],
"properties": {
"id": { "type": "string" },
"rev": { "type": "string" },
"sender": { "type": "ref", "ref": "#messageViewSender" },
"sentAt": { "type": "string", "format": "datetime" }
}
},
"messageViewSender": {
"type": "object",
"required": ["did"],
"properties": {
"did": { "type": "string", "format": "did" }
}
},
"convoView": {
"type": "object",
"required": ["id", "rev", "members", "muted", "unreadCount"],
"properties": {
"id": { "type": "string" },
"rev": { "type": "string" },
"members": {
"type": "array",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic"
}
},
"lastMessage": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView"]
},
"muted": { "type": "boolean" },
"unreadCount": { "type": "integer" }
}
},
"logBeginConvo": {
"type": "object",
"required": ["rev", "convoId"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" }
}
},
"logLeaveConvo": {
"type": "object",
"required": ["rev", "convoId"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" }
}
},
"logCreateMessage": {
"type": "object",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" },
"message": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView"]
}
}
},
"logDeleteMessage": {
"type": "object",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" },
"message": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView"]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.deleteMessageForSelf",
"defs": {
"main": {
"type": "procedure",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId", "messageId"],
"properties": {
"convoId": { "type": "string" },
"messageId": { "type": "string" }
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "chat.bsky.convo.defs#deletedMessageView"
}
}
}
}
}
29 changes: 29 additions & 0 deletions atproto-openapi-types/lexicons/chat/bsky/convo/getConvo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.getConvo",
"defs": {
"main": {
"type": "query",
"parameters": {
"type": "params",
"required": ["convoId"],
"properties": {
"convoId": { "type": "string" }
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convo"],
"properties": {
"convo": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.getConvoForMembers",
"defs": {
"main": {
"type": "query",
"parameters": {
"type": "params",
"required": ["members"],
"properties": {
"members": {
"type": "array",
"minLength": 1,
"maxLength": 10,
"items": {
"type": "string",
"format": "did"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convo"],
"properties": {
"convo": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}
38 changes: 38 additions & 0 deletions atproto-openapi-types/lexicons/chat/bsky/convo/getLog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.getLog",
"defs": {
"main": {
"type": "query",
"parameters": {
"type": "params",
"required": [],
"properties": {
"cursor": { "type": "string" }
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["logs"],
"properties": {
"cursor": { "type": "string" },
"logs": {
"type": "array",
"items": {
"type": "union",
"refs": [
"chat.bsky.convo.defs#logBeginConvo",
"chat.bsky.convo.defs#logLeaveConvo",
"chat.bsky.convo.defs#logCreateMessage",
"chat.bsky.convo.defs#logDeleteMessage"
]
}
}
}
}
}
}
}
}
Loading

0 comments on commit 4d81515

Please sign in to comment.