diff --git a/lexicons/app.bsky.actor.defs.json b/lexicons/app.bsky.actor.defs.json index cf2452e2..784bce8a 100644 --- a/lexicons/app.bsky.actor.defs.json +++ b/lexicons/app.bsky.actor.defs.json @@ -91,6 +91,10 @@ "labels": { "type": "array", "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "pinnedPost": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" } } }, diff --git a/lexicons/app.bsky.actor.profile.json b/lexicons/app.bsky.actor.profile.json index 4363a02d..911d7a05 100644 --- a/lexicons/app.bsky.actor.profile.json +++ b/lexicons/app.bsky.actor.profile.json @@ -41,6 +41,10 @@ "type": "ref", "ref": "com.atproto.repo.strongRef" }, + "pinnedPost": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, "createdAt": { "type": "string", "format": "datetime" } } } diff --git a/lexicons/app.bsky.feed.defs.json b/lexicons/app.bsky.feed.defs.json index fcbc173e..341f7fbd 100644 --- a/lexicons/app.bsky.feed.defs.json +++ b/lexicons/app.bsky.feed.defs.json @@ -44,7 +44,8 @@ "like": { "type": "string", "format": "at-uri" }, "threadMuted": { "type": "boolean" }, "replyDisabled": { "type": "boolean" }, - "embeddingDisabled": { "type": "boolean" } + "embeddingDisabled": { "type": "boolean" }, + "pinned": { "type": "boolean" } } }, "feedViewPost": { @@ -53,7 +54,7 @@ "properties": { "post": { "type": "ref", "ref": "#postView" }, "reply": { "type": "ref", "ref": "#replyRef" }, - "reason": { "type": "union", "refs": ["#reasonRepost"] }, + "reason": { "type": "union", "refs": ["#reasonRepost", "#reasonPin"] }, "feedContext": { "type": "string", "description": "Context provided by feed generator that may be passed back alongside interactions.", @@ -88,6 +89,10 @@ "indexedAt": { "type": "string", "format": "datetime" } } }, + "reasonPin": { + "type": "object", + "properties": {} + }, "threadViewPost": { "type": "object", "required": ["post"], @@ -171,7 +176,10 @@ "required": ["post"], "properties": { "post": { "type": "string", "format": "at-uri" }, - "reason": { "type": "union", "refs": ["#skeletonReasonRepost"] }, + "reason": { + "type": "union", + "refs": ["#skeletonReasonRepost", "#skeletonReasonPin"] + }, "feedContext": { "type": "string", "description": "Context that will be passed through to client and may be passed to feed generator back alongside interactions.", @@ -186,6 +194,10 @@ "repost": { "type": "string", "format": "at-uri" } } }, + "skeletonReasonPin": { + "type": "object", + "properties": {} + }, "threadgateView": { "type": "object", "properties": { diff --git a/lexicons/app.bsky.feed.getAuthorFeed.json b/lexicons/app.bsky.feed.getAuthorFeed.json index 90e4d1a7..19e99b17 100644 --- a/lexicons/app.bsky.feed.getAuthorFeed.json +++ b/lexicons/app.bsky.feed.getAuthorFeed.json @@ -27,6 +27,10 @@ "posts_and_author_threads" ], "default": "posts_with_replies" + }, + "includePins": { + "type": "boolean", + "default": false } } }, diff --git a/lexicons/app.bsky.feed.threadgate.json b/lexicons/app.bsky.feed.threadgate.json index 73a74f32..2da5a771 100644 --- a/lexicons/app.bsky.feed.threadgate.json +++ b/lexicons/app.bsky.feed.threadgate.json @@ -5,7 +5,7 @@ "main": { "type": "record", "key": "tid", - "description": "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository..", + "description": "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.", "record": { "type": "object", "required": ["post", "createdAt"], diff --git a/packages/atproto_client/models/app/bsky/actor/defs.py b/packages/atproto_client/models/app/bsky/actor/defs.py index 2b668994..a65e3e73 100644 --- a/packages/atproto_client/models/app/bsky/actor/defs.py +++ b/packages/atproto_client/models/app/bsky/actor/defs.py @@ -69,6 +69,7 @@ class ProfileViewDetailed(base.ModelBase): 'models.AppBskyGraphDefs.StarterPackViewBasic' ] = None #: Joined via starter pack. labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels. + pinned_post: t.Optional['models.ComAtprotoRepoStrongRef.Main'] = None #: Pinned post. posts_count: t.Optional[int] = None #: Posts count. viewer: t.Optional['models.AppBskyActorDefs.ViewerState'] = None #: Viewer. diff --git a/packages/atproto_client/models/app/bsky/actor/profile.py b/packages/atproto_client/models/app/bsky/actor/profile.py index cffd9bca..7b3873ea 100644 --- a/packages/atproto_client/models/app/bsky/actor/profile.py +++ b/packages/atproto_client/models/app/bsky/actor/profile.py @@ -30,6 +30,7 @@ class Record(base.RecordModelBase): labels: t.Optional[ te.Annotated[t.Union['models.ComAtprotoLabelDefs.SelfLabels'], Field(default=None, discriminator='py_type')] ] = None #: Self-label values, specific to the Bluesky application, on the overall account. + pinned_post: t.Optional['models.ComAtprotoRepoStrongRef.Main'] = None #: Pinned post. py_type: t.Literal['app.bsky.actor.profile'] = Field(default='app.bsky.actor.profile', alias='$type', frozen=True) diff --git a/packages/atproto_client/models/app/bsky/feed/defs.py b/packages/atproto_client/models/app/bsky/feed/defs.py index af7632ea..4cf87f8e 100644 --- a/packages/atproto_client/models/app/bsky/feed/defs.py +++ b/packages/atproto_client/models/app/bsky/feed/defs.py @@ -54,6 +54,7 @@ class ViewerState(base.ModelBase): embedding_disabled: t.Optional[bool] = None #: Embedding disabled. like: t.Optional[str] = None #: Like. + pinned: t.Optional[bool] = None #: Pinned. reply_disabled: t.Optional[bool] = None #: Reply disabled. repost: t.Optional[str] = None #: Repost. thread_muted: t.Optional[bool] = None #: Thread muted. @@ -71,7 +72,10 @@ class FeedViewPost(base.ModelBase): default=None, max_length=2000 ) #: Context provided by feed generator that may be passed back alongside interactions. reason: t.Optional[ - te.Annotated[t.Union['models.AppBskyFeedDefs.ReasonRepost'], Field(default=None, discriminator='py_type')] + te.Annotated[ + t.Union['models.AppBskyFeedDefs.ReasonRepost', 'models.AppBskyFeedDefs.ReasonPin'], + Field(default=None, discriminator='py_type'), + ] ] = None #: Reason. reply: t.Optional['models.AppBskyFeedDefs.ReplyRef'] = None #: Reply. @@ -119,6 +123,14 @@ class ReasonRepost(base.ModelBase): ) +class ReasonPin(base.ModelBase): + """Definition model for :obj:`app.bsky.feed.defs`.""" + + py_type: t.Literal['app.bsky.feed.defs#reasonPin'] = Field( + default='app.bsky.feed.defs#reasonPin', alias='$type', frozen=True + ) + + class ThreadViewPost(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`.""" @@ -226,7 +238,8 @@ class SkeletonFeedPost(base.ModelBase): ) #: Context that will be passed through to client and may be passed to feed generator back alongside interactions. reason: t.Optional[ te.Annotated[ - t.Union['models.AppBskyFeedDefs.SkeletonReasonRepost'], Field(default=None, discriminator='py_type') + t.Union['models.AppBskyFeedDefs.SkeletonReasonRepost', 'models.AppBskyFeedDefs.SkeletonReasonPin'], + Field(default=None, discriminator='py_type'), ] ] = None #: Reason. @@ -245,6 +258,14 @@ class SkeletonReasonRepost(base.ModelBase): ) +class SkeletonReasonPin(base.ModelBase): + """Definition model for :obj:`app.bsky.feed.defs`.""" + + py_type: t.Literal['app.bsky.feed.defs#skeletonReasonPin'] = Field( + default='app.bsky.feed.defs#skeletonReasonPin', alias='$type', frozen=True + ) + + class ThreadgateView(base.ModelBase): """Definition model for :obj:`app.bsky.feed.defs`.""" diff --git a/packages/atproto_client/models/app/bsky/feed/get_author_feed.py b/packages/atproto_client/models/app/bsky/feed/get_author_feed.py index 54f95f81..2a7ea881 100644 --- a/packages/atproto_client/models/app/bsky/feed/get_author_feed.py +++ b/packages/atproto_client/models/app/bsky/feed/get_author_feed.py @@ -29,6 +29,7 @@ class Params(base.ParamsModelBase): str, ] ] = 'posts_with_replies' #: Combinations of post/repost types to include in response. + include_pins: t.Optional[bool] = False #: Include pins. limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. @@ -46,6 +47,7 @@ class ParamsDict(t.TypedDict): ] ] ] #: Combinations of post/repost types to include in response. + include_pins: te.NotRequired[t.Optional[bool]] #: Include pins. limit: te.NotRequired[t.Optional[int]] #: Limit.