Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lexicons fetched from 2676206 committed 2024-09-26T23:26:45Z #404

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lexicons/app.bsky.actor.defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
"labels": {
"type": "array",
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
},
"pinnedPost": {
"type": "ref",
"ref": "com.atproto.repo.strongRef"
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions lexicons/app.bsky.actor.profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
"type": "ref",
"ref": "com.atproto.repo.strongRef"
},
"pinnedPost": {
"type": "ref",
"ref": "com.atproto.repo.strongRef"
},
"createdAt": { "type": "string", "format": "datetime" }
}
}
Expand Down
18 changes: 15 additions & 3 deletions lexicons/app.bsky.feed.defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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.",
Expand Down Expand Up @@ -88,6 +89,10 @@
"indexedAt": { "type": "string", "format": "datetime" }
}
},
"reasonPin": {
"type": "object",
"properties": {}
},
"threadViewPost": {
"type": "object",
"required": ["post"],
Expand Down Expand Up @@ -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.",
Expand All @@ -186,6 +194,10 @@
"repost": { "type": "string", "format": "at-uri" }
}
},
"skeletonReasonPin": {
"type": "object",
"properties": {}
},
"threadgateView": {
"type": "object",
"properties": {
Expand Down
4 changes: 4 additions & 0 deletions lexicons/app.bsky.feed.getAuthorFeed.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
"posts_and_author_threads"
],
"default": "posts_with_replies"
},
"includePins": {
"type": "boolean",
"default": false
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion lexicons/app.bsky.feed.threadgate.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
1 change: 1 addition & 0 deletions packages/atproto_client/models/app/bsky/actor/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions packages/atproto_client/models/app/bsky/actor/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
25 changes: 23 additions & 2 deletions packages/atproto_client/models/app/bsky/feed/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.

Expand Down Expand Up @@ -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`."""

Expand Down Expand Up @@ -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.

Expand All @@ -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`."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand All @@ -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.


Expand Down
Loading