Skip to content

Commit

Permalink
chore(bluesky): update lexicons
Browse files Browse the repository at this point in the history
  • Loading branch information
mary-ext committed Sep 26, 2024
1 parent 3869696 commit 5cbbea0
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lexicons/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/bluesky-social/atproto/tree/319aa7cf6dd7de0262a40d69f695c9a0eb0b5179/lexicons
https://github.com/bluesky-social/atproto/tree/2676206e422233fefbf2d9d182e8d462f0957c93/lexicons
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
17 changes: 14 additions & 3 deletions packages/definitions/bluesky/lib/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ declare module '@atcute/client/lexicons' {
indexedAt?: string;
joinedViaStarterPack?: AppBskyGraphDefs.StarterPackViewBasic;
labels?: ComAtprotoLabelDefs.Label[];
pinnedPost?: ComAtprotoRepoStrongRef.Main;
postsCount?: number;
viewer?: ViewerState;
}
Expand Down Expand Up @@ -343,6 +344,7 @@ declare module '@atcute/client/lexicons' {
joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main;
/** Self-label values, specific to the Bluesky application, on the overall account. */
labels?: Brand.Union<ComAtprotoLabelDefs.SelfLabels>;
pinnedPost?: ComAtprotoRepoStrongRef.Main;
}
}

Expand Down Expand Up @@ -597,7 +599,7 @@ declare module '@atcute/client/lexicons' {
* Maximum string length: 2000
*/
feedContext?: string;
reason?: Brand.Union<ReasonRepost>;
reason?: Brand.Union<ReasonPin | ReasonRepost>;
reply?: ReplyRef;
}
interface GeneratorView {
Expand Down Expand Up @@ -681,6 +683,9 @@ declare module '@atcute/client/lexicons' {
threadgate?: ThreadgateView;
viewer?: ViewerState;
}
interface ReasonPin {
[Brand.Type]?: 'app.bsky.feed.defs#reasonPin';
}
interface ReasonRepost {
[Brand.Type]?: 'app.bsky.feed.defs#reasonRepost';
by: AppBskyActorDefs.ProfileViewBasic;
Expand All @@ -703,7 +708,10 @@ declare module '@atcute/client/lexicons' {
* Maximum string length: 2000
*/
feedContext?: string;
reason?: Brand.Union<SkeletonReasonRepost>;
reason?: Brand.Union<SkeletonReasonPin | SkeletonReasonRepost>;
}
interface SkeletonReasonPin {
[Brand.Type]?: 'app.bsky.feed.defs#skeletonReasonPin';
}
interface SkeletonReasonRepost {
[Brand.Type]?: 'app.bsky.feed.defs#skeletonReasonRepost';
Expand All @@ -727,6 +735,7 @@ declare module '@atcute/client/lexicons' {
[Brand.Type]?: 'app.bsky.feed.defs#viewerState';
embeddingDisabled?: boolean;
like?: At.Uri;
pinned?: boolean;
replyDisabled?: boolean;
repost?: At.Uri;
threadMuted?: boolean;
Expand Down Expand Up @@ -835,6 +844,8 @@ declare module '@atcute/client/lexicons' {
| 'posts_with_media'
| 'posts_with_replies'
| (string & {});
/** @default false */
includePins?: boolean;
/**
* Minimum: 1 \
* Maximum: 100
Expand Down Expand Up @@ -1282,7 +1293,7 @@ declare module '@atcute/client/lexicons' {
}

namespace AppBskyFeedThreadgate {
/** 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 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. */
interface Record {
$type: 'app.bsky.feed.threadgate';
createdAt: string;
Expand Down

0 comments on commit 5cbbea0

Please sign in to comment.