Skip to content
33 changes: 33 additions & 0 deletions lexicons/fyi/frontpage/feed/comment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"lexicon": 1,
"id": "fyi.frontpage.feed.comment",
"defs": {
"main": {
"type": "record",
"description": "Record containing a Frontpage comment.",
"key": "tid",
"record": {
"type": "object",
"required": ["createdAt", "post", "blocks"],
"properties": {
"blocks": {
"type": "array",
"maxLength": 50,
"description": "The content of the comment. Note, there are additional constraints placed on the total size of the content within the Frontpage AppView that are not possible to express in lexicon. Generally a comment can have a maximum length of 10,000 graphemes, the Frontpage AppView will enforce this limit.",
"items": {
"type": "ref",
"ref": "fyi.frontpage.richtext.block"
}
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "Client-declared timestamp when this comment was originally created."
},
"parent": { "type": "ref", "ref": "com.atproto.repo.strongRef" },
"post": { "type": "ref", "ref": "com.atproto.repo.strongRef" }
}
}
}
}
}
43 changes: 43 additions & 0 deletions lexicons/fyi/frontpage/feed/post.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"lexicon": 1,
"id": "fyi.frontpage.feed.post",
"defs": {
"main": {
"type": "record",
"description": "Record containing a Frontpage post.",
"key": "tid",
"record": {
"type": "object",
"required": ["title", "createdAt"],
"properties": {
"title": {
"type": "string",
"maxLength": 3000,
"maxGraphemes": 300,
"description": "The title of the post."
},
"subject": {
"type": "union",
"description": "The piece of content that this Frontpage post is about.",
"refs": ["#urlSubject"]
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "Client-declared timestamp when this post was originally created."
}
}
}
},
"urlSubject": {
"type": "object",
"required": ["url"],
"properties": {
"url": {
"type": "string",
"format": "uri"
}
}
}
}
}
27 changes: 27 additions & 0 deletions lexicons/fyi/frontpage/feed/vote.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"lexicon": 1,
"id": "fyi.frontpage.feed.vote",
"defs": {
"main": {
"type": "record",
"description": "Record containing a Frontpage vote.",
"key": "tid",
"record": {
"type": "object",
"required": ["subject", "createdAt"],
"properties": {
"subject": {
"type": "ref",
"description": "The post or comment that this Frontpage vote is for.",
"ref": "com.atproto.repo.strongRef"
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "Client-declared timestamp when this vote was originally created."
}
}
}
}
}
}
26 changes: 26 additions & 0 deletions lexicons/fyi/frontpage/richtext/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"lexicon": 1,
"id": "fyi.frontpage.richtext.block",
"defs": {
"main": {
"type": "object",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for the extra object here? Can't this be a union directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, at least lex-cli errors when you have a union at the top level of main. I'll verify that though.

"required": ["content"],
"properties": {
"content": {
"type": "union",
"refs": ["#plaintextParagraph"]
}
}
},
"plaintextParagraph": {
"type": "object",
"properties": {
"text": {
"type": "string",
"maxLength": 100000,
"maxGraphemes": 10000
}
}
}
}
}
Loading