Skip to content

Commit

Permalink
Update lexicons fetched from a8e1f90 committed 2024-08-22T22:00:01Z (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX authored Aug 27, 2024
1 parent 1c4f4f0 commit 79ae777
Show file tree
Hide file tree
Showing 22 changed files with 627 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/source/aliases_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
'models.AppBskyFeedGetListFeed': 'atproto_client.models.app.bsky.feed.get_list_feed',
'models.AppBskyFeedGetPostThread': 'atproto_client.models.app.bsky.feed.get_post_thread',
'models.AppBskyFeedGetPosts': 'atproto_client.models.app.bsky.feed.get_posts',
'models.AppBskyFeedGetQuotes': 'atproto_client.models.app.bsky.feed.get_quotes',
'models.AppBskyFeedGetRepostedBy': 'atproto_client.models.app.bsky.feed.get_reposted_by',
'models.AppBskyFeedGetSuggestedFeeds': 'atproto_client.models.app.bsky.feed.get_suggested_feeds',
'models.AppBskyFeedGetTimeline': 'atproto_client.models.app.bsky.feed.get_timeline',
'models.AppBskyFeedLike': 'atproto_client.models.app.bsky.feed.like',
'models.AppBskyFeedPost': 'atproto_client.models.app.bsky.feed.post',
'models.AppBskyFeedPostgate': 'atproto_client.models.app.bsky.feed.postgate',
'models.AppBskyFeedRepost': 'atproto_client.models.app.bsky.feed.repost',
'models.AppBskyFeedSearchPosts': 'atproto_client.models.app.bsky.feed.search_posts',
'models.AppBskyFeedSendInteractions': 'atproto_client.models.app.bsky.feed.send_interactions',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
app.bsky.feed.get\_quotes
================================================

.. automodule:: atproto_client.models.app.bsky.feed.get_quotes
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
app.bsky.feed.postgate
=============================================

.. automodule:: atproto_client.models.app.bsky.feed.postgate
:members:
:undoc-members:
:show-inheritance:
2 changes: 2 additions & 0 deletions docs/source/atproto/atproto_client.models.app.bsky.feed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ Submodules
atproto_client.models.app.bsky.feed.get_list_feed
atproto_client.models.app.bsky.feed.get_post_thread
atproto_client.models.app.bsky.feed.get_posts
atproto_client.models.app.bsky.feed.get_quotes
atproto_client.models.app.bsky.feed.get_reposted_by
atproto_client.models.app.bsky.feed.get_suggested_feeds
atproto_client.models.app.bsky.feed.get_timeline
atproto_client.models.app.bsky.feed.like
atproto_client.models.app.bsky.feed.post
atproto_client.models.app.bsky.feed.postgate
atproto_client.models.app.bsky.feed.repost
atproto_client.models.app.bsky.feed.search_posts
atproto_client.models.app.bsky.feed.send_interactions
Expand Down
10 changes: 10 additions & 0 deletions lexicons/app.bsky.embed.record.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"#viewRecord",
"#viewNotFound",
"#viewBlocked",
"#viewDetached",
"app.bsky.feed.defs#generatorView",
"app.bsky.graph.defs#listView",
"app.bsky.labeler.defs#labelerView",
Expand Down Expand Up @@ -49,6 +50,7 @@
"replyCount": { "type": "integer" },
"repostCount": { "type": "integer" },
"likeCount": { "type": "integer" },
"quoteCount": { "type": "integer" },
"embeds": {
"type": "array",
"items": {
Expand Down Expand Up @@ -80,6 +82,14 @@
"blocked": { "type": "boolean", "const": true },
"author": { "type": "ref", "ref": "app.bsky.feed.defs#blockedAuthor" }
}
},
"viewDetached": {
"type": "object",
"required": ["uri", "detached"],
"properties": {
"uri": { "type": "string", "format": "at-uri" },
"detached": { "type": "boolean", "const": true }
}
}
}
}
4 changes: 3 additions & 1 deletion lexicons/app.bsky.feed.defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"replyCount": { "type": "integer" },
"repostCount": { "type": "integer" },
"likeCount": { "type": "integer" },
"quoteCount": { "type": "integer" },
"indexedAt": { "type": "string", "format": "datetime" },
"viewer": { "type": "ref", "ref": "#viewerState" },
"labels": {
Expand All @@ -41,7 +42,8 @@
"repost": { "type": "string", "format": "at-uri" },
"like": { "type": "string", "format": "at-uri" },
"threadMuted": { "type": "boolean" },
"replyDisabled": { "type": "boolean" }
"replyDisabled": { "type": "boolean" },
"embeddingDisabled": { "type": "boolean" }
}
},
"feedViewPost": {
Expand Down
2 changes: 1 addition & 1 deletion lexicons/app.bsky.feed.getActorLikes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Get a list of posts liked by an actor. Does not require auth.",
"description": "Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.",
"parameters": {
"type": "params",
"required": ["actor"],
Expand Down
4 changes: 4 additions & 0 deletions lexicons/app.bsky.feed.getPostThread.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
"app.bsky.feed.defs#notFoundPost",
"app.bsky.feed.defs#blockedPost"
]
},
"threadgate": {
"type": "ref",
"ref": "app.bsky.feed.defs#threadgateView"
}
}
}
Expand Down
52 changes: 52 additions & 0 deletions lexicons/app.bsky.feed.getQuotes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"lexicon": 1,
"id": "app.bsky.feed.getQuotes",
"defs": {
"main": {
"type": "query",
"description": "Get a list of quotes for a given post.",
"parameters": {
"type": "params",
"required": ["uri"],
"properties": {
"uri": {
"type": "string",
"format": "at-uri",
"description": "Reference (AT-URI) of post record"
},
"cid": {
"type": "string",
"format": "cid",
"description": "If supplied, filters to quotes of specific version (by CID) of the post record."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"cursor": { "type": "string" }
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["uri", "posts"],
"properties": {
"uri": { "type": "string", "format": "at-uri" },
"cid": { "type": "string", "format": "cid" },
"cursor": { "type": "string" },
"posts": {
"type": "array",
"items": {
"type": "ref",
"ref": "app.bsky.feed.defs#postView"
}
}
}
}
}
}
}
}
45 changes: 45 additions & 0 deletions lexicons/app.bsky.feed.postgate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"lexicon": 1,
"id": "app.bsky.feed.postgate",
"defs": {
"main": {
"type": "record",
"key": "tid",
"description": "Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository.",
"record": {
"type": "object",
"required": ["post", "createdAt"],
"properties": {
"createdAt": { "type": "string", "format": "datetime" },
"post": {
"type": "string",
"format": "at-uri",
"description": "Reference (AT-URI) to the post record."
},
"detachedEmbeddingUris": {
"type": "array",
"maxLength": 50,
"items": {
"type": "string",
"format": "at-uri"
},
"description": "List of AT-URIs embedding this post that the author has detached from."
},
"embeddingRules": {
"type": "array",
"maxLength": 5,
"items": {
"type": "union",
"refs": ["#disableRule"]
}
}
}
}
},
"disableRule": {
"type": "object",
"description": "Disables embedding of this post.",
"properties": {}
}
}
}
11 changes: 10 additions & 1 deletion lexicons/app.bsky.feed.threadgate.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@
"refs": ["#mentionRule", "#followingRule", "#listRule"]
}
},
"createdAt": { "type": "string", "format": "datetime" }
"createdAt": { "type": "string", "format": "datetime" },
"hiddenReplies": {
"type": "array",
"maxLength": 50,
"items": {
"type": "string",
"format": "at-uri"
},
"description": "List of hidden reply URIs."
}
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions packages/atproto_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
from atproto_client.models.app.bsky.feed import get_list_feed as AppBskyFeedGetListFeed
from atproto_client.models.app.bsky.feed import get_post_thread as AppBskyFeedGetPostThread
from atproto_client.models.app.bsky.feed import get_posts as AppBskyFeedGetPosts
from atproto_client.models.app.bsky.feed import get_quotes as AppBskyFeedGetQuotes
from atproto_client.models.app.bsky.feed import get_reposted_by as AppBskyFeedGetRepostedBy
from atproto_client.models.app.bsky.feed import get_suggested_feeds as AppBskyFeedGetSuggestedFeeds
from atproto_client.models.app.bsky.feed import get_timeline as AppBskyFeedGetTimeline
from atproto_client.models.app.bsky.feed import like as AppBskyFeedLike
from atproto_client.models.app.bsky.feed import post as AppBskyFeedPost
from atproto_client.models.app.bsky.feed import postgate as AppBskyFeedPostgate
from atproto_client.models.app.bsky.feed import repost as AppBskyFeedRepost
from atproto_client.models.app.bsky.feed import search_posts as AppBskyFeedSearchPosts
from atproto_client.models.app.bsky.feed import send_interactions as AppBskyFeedSendInteractions
Expand Down Expand Up @@ -242,11 +244,13 @@ class _Ids:
AppBskyFeedGetListFeed: str = 'app.bsky.feed.getListFeed'
AppBskyFeedGetPostThread: str = 'app.bsky.feed.getPostThread'
AppBskyFeedGetPosts: str = 'app.bsky.feed.getPosts'
AppBskyFeedGetQuotes: str = 'app.bsky.feed.getQuotes'
AppBskyFeedGetRepostedBy: str = 'app.bsky.feed.getRepostedBy'
AppBskyFeedGetSuggestedFeeds: str = 'app.bsky.feed.getSuggestedFeeds'
AppBskyFeedGetTimeline: str = 'app.bsky.feed.getTimeline'
AppBskyFeedLike: str = 'app.bsky.feed.like'
AppBskyFeedPost: str = 'app.bsky.feed.post'
AppBskyFeedPostgate: str = 'app.bsky.feed.postgate'
AppBskyFeedRepost: str = 'app.bsky.feed.repost'
AppBskyFeedSearchPosts: str = 'app.bsky.feed.searchPosts'
AppBskyFeedSendInteractions: str = 'app.bsky.feed.sendInteractions'
Expand Down
13 changes: 13 additions & 0 deletions packages/atproto_client/models/app/bsky/embed/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class View(base.ModelBase):
'models.AppBskyEmbedRecord.ViewRecord',
'models.AppBskyEmbedRecord.ViewNotFound',
'models.AppBskyEmbedRecord.ViewBlocked',
'models.AppBskyEmbedRecord.ViewDetached',
'models.AppBskyFeedDefs.GeneratorView',
'models.AppBskyGraphDefs.ListView',
'models.AppBskyLabelerDefs.LabelerView',
Expand Down Expand Up @@ -68,6 +69,7 @@ class ViewRecord(base.ModelBase):
] = None #: Embeds.
labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels.
like_count: t.Optional[int] = None #: Like count.
quote_count: t.Optional[int] = None #: Quote count.
reply_count: t.Optional[int] = None #: Reply count.
repost_count: t.Optional[int] = None #: Repost count.

Expand Down Expand Up @@ -97,3 +99,14 @@ class ViewBlocked(base.ModelBase):
py_type: t.Literal['app.bsky.embed.record#viewBlocked'] = Field(
default='app.bsky.embed.record#viewBlocked', alias='$type', frozen=True
)


class ViewDetached(base.ModelBase):
"""Definition model for :obj:`app.bsky.embed.record`."""

detached: bool = Field(frozen=True) #: Detached.
uri: str #: Uri.

py_type: t.Literal['app.bsky.embed.record#viewDetached'] = Field(
default='app.bsky.embed.record#viewDetached', alias='$type', frozen=True
)
2 changes: 2 additions & 0 deletions packages/atproto_client/models/app/bsky/feed/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class PostView(base.ModelBase):
] = None #: Embed.
labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels.
like_count: t.Optional[int] = None #: Like count.
quote_count: t.Optional[int] = None #: Quote count.
reply_count: t.Optional[int] = None #: Reply count.
repost_count: t.Optional[int] = None #: Repost count.
threadgate: t.Optional['models.AppBskyFeedDefs.ThreadgateView'] = None #: Threadgate.
Expand All @@ -50,6 +51,7 @@ class PostView(base.ModelBase):
class ViewerState(base.ModelBase):
"""Definition model for :obj:`app.bsky.feed.defs`. Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests."""

embedding_disabled: t.Optional[bool] = None #: Embedding disabled.
like: t.Optional[str] = None #: Like.
reply_disabled: t.Optional[bool] = None #: Reply disabled.
repost: t.Optional[str] = None #: Repost.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ class Response(base.ResponseModelBase):
],
Field(discriminator='py_type'),
] #: Thread.
threadgate: t.Optional['models.AppBskyFeedDefs.ThreadgateView'] = None #: Threadgate.
42 changes: 42 additions & 0 deletions packages/atproto_client/models/app/bsky/feed/get_quotes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
##################################################################
# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS!
# Copyright (C) 2024 Ilya (Marshal) <https://github.com/MarshalX>.
# This file is part of Python atproto SDK. Licenced under MIT.
##################################################################


import typing as t

import typing_extensions as te
from pydantic import Field

if t.TYPE_CHECKING:
from atproto_client import models
from atproto_client.models import base


class Params(base.ParamsModelBase):
"""Parameters model for :obj:`app.bsky.feed.getQuotes`."""

uri: str #: Reference (AT-URI) of post record.
cid: t.Optional[str] = None #: If supplied, filters to quotes of specific version (by CID) of the post record.
cursor: t.Optional[str] = None #: Cursor.
limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit.


class ParamsDict(t.TypedDict):
uri: str #: Reference (AT-URI) of post record.
cid: te.NotRequired[
t.Optional[str]
] #: If supplied, filters to quotes of specific version (by CID) of the post record.
cursor: te.NotRequired[t.Optional[str]] #: Cursor.
limit: te.NotRequired[t.Optional[int]] #: Limit.


class Response(base.ResponseModelBase):
"""Output data model for :obj:`app.bsky.feed.getQuotes`."""

posts: t.List['models.AppBskyFeedDefs.PostView'] #: Posts.
uri: str #: Uri.
cid: t.Optional[str] = None #: Cid.
cursor: t.Optional[str] = None #: Cursor.
Loading

0 comments on commit 79ae777

Please sign in to comment.