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

feat: Update API, based on the latest lexicon schemas #92

Merged
merged 2 commits into from
Dec 23, 2023
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: 2 additions & 2 deletions atrium-api/src/app/bsky/actor/defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct FeedViewPref {
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct PersonalDetailsPref {
///The birth date of the owner of the account.
///The birth date of account owner.
#[serde(skip_serializing_if = "Option::is_none")]
pub birth_date: Option<String>,
}
Expand Down Expand Up @@ -111,7 +111,7 @@ pub struct ThreadViewPref {
///Show followed users at the top of all replies.
#[serde(skip_serializing_if = "Option::is_none")]
pub prioritize_followed_users: Option<bool>,
///Sorting mode.
///Sorting mode for threads.
#[serde(skip_serializing_if = "Option::is_none")]
pub sort: Option<String>,
}
Expand Down
4 changes: 2 additions & 2 deletions atrium-api/src/app/bsky/actor/search_actors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ pub struct Parameters {
pub cursor: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i32>,
///search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended
///Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.
#[serde(skip_serializing_if = "Option::is_none")]
pub q: Option<String>,
///DEPRECATED: use 'q' instead
///DEPRECATED: use 'q' instead.
#[serde(skip_serializing_if = "Option::is_none")]
pub term: Option<String>,
}
Expand Down
4 changes: 2 additions & 2 deletions atrium-api/src/app/bsky/actor/search_actors_typeahead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
pub struct Parameters {
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i32>,
///search query prefix; not a full query string
///Search query prefix; not a full query string.
#[serde(skip_serializing_if = "Option::is_none")]
pub q: Option<String>,
///DEPRECATED: use 'q' instead
///DEPRECATED: use 'q' instead.
#[serde(skip_serializing_if = "Option::is_none")]
pub term: Option<String>,
}
Expand Down
2 changes: 1 addition & 1 deletion atrium-api/src/app/bsky/embed/external.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `app.bsky.embed.external` namespace.
//!A representation of some externally linked content, embedded in another form of content
//!A representation of some externally linked content, embedded in another form of content.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Main {
Expand Down
2 changes: 1 addition & 1 deletion atrium-api/src/app/bsky/embed/images.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `app.bsky.embed.images` namespace.
//!A set of images embedded in some other form of content
//!A set of images embedded in some other form of content.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Main {
Expand Down
2 changes: 1 addition & 1 deletion atrium-api/src/app/bsky/embed/record.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `app.bsky.embed.record` namespace.
//!A representation of a record embedded in another form of content
//!A representation of a record embedded in another form of content.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Main {
Expand Down
2 changes: 1 addition & 1 deletion atrium-api/src/app/bsky/embed/record_with_media.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `app.bsky.embed.recordWithMedia` namespace.
//!A representation of a record embedded in another form of content, alongside other compatible embeds
//!A representation of a record embedded in another form of content, alongside other compatible embeds.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Main {
Expand Down
10 changes: 2 additions & 8 deletions atrium-api/src/app/bsky/feed/defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ pub struct ThreadViewPost {
pub post: PostView,
#[serde(skip_serializing_if = "Option::is_none")]
pub replies: Option<Vec<ThreadViewPostRepliesItem>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub viewer: Option<ViewerThreadState>,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
Expand All @@ -131,13 +129,9 @@ pub struct ViewerState {
#[serde(skip_serializing_if = "Option::is_none")]
pub like: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub repost: Option<String>,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ViewerThreadState {
pub reply_disabled: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub can_reply: Option<bool>,
pub repost: Option<String>,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
Expand Down
6 changes: 3 additions & 3 deletions atrium-api/src/app/bsky/feed/search_posts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Parameters {
///optional pagination mechanism; may not necessarily allow scrolling through entire result set
///Optional pagination mechanism; may not necessarily allow scrolling through entire result set.
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i32>,
///search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended
///Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.
pub q: String,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Output {
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
///count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits
///Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.
#[serde(skip_serializing_if = "Option::is_none")]
pub hits_total: Option<i32>,
pub posts: Vec<crate::app::bsky::feed::defs::PostView>,
Expand Down
5 changes: 3 additions & 2 deletions atrium-api/src/app/bsky/graph/defs.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `app.bsky.graph.defs` namespace.
///A list of actors used for curation purposes such as list feeds or interaction gating
///A list of actors used for curation purposes such as list feeds or interaction gating.
pub struct Curatelist;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ListItemView {
pub subject: crate::app::bsky::actor::defs::ProfileView,
pub uri: String,
}
pub type ListPurpose = String;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
Expand Down Expand Up @@ -48,5 +49,5 @@ pub struct ListViewerState {
#[serde(skip_serializing_if = "Option::is_none")]
pub muted: Option<bool>,
}
///A list of actors to apply an aggregate moderation action (mute/block) on
///A list of actors to apply an aggregate moderation action (mute/block) on.
pub struct Modlist;
2 changes: 2 additions & 0 deletions atrium-api/src/app/bsky/notification/list_notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pub struct Output {
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
pub notifications: Vec<Notification>,
#[serde(skip_serializing_if = "Option::is_none")]
pub seen_at: Option<String>,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
Expand Down
1 change: 0 additions & 1 deletion atrium-api/src/app/bsky/unspecced.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `app.bsky.unspecced` namespace.
pub mod apply_labels;
pub mod defs;
pub mod get_popular;
pub mod get_popular_feed_generators;
Expand Down
10 changes: 0 additions & 10 deletions atrium-api/src/app/bsky/unspecced/apply_labels.rs

This file was deleted.

8 changes: 4 additions & 4 deletions atrium-api/src/app/bsky/unspecced/search_actors_skeleton.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Parameters {
///optional pagination mechanism; may not necessarily allow scrolling through entire result set
///Optional pagination mechanism; may not necessarily allow scrolling through entire result set.
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i32>,
///search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax
///Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax.
pub q: String,
///if true, acts as fast/simple 'typeahead' query
///If true, acts as fast/simple 'typeahead' query.
#[serde(skip_serializing_if = "Option::is_none")]
pub typeahead: Option<bool>,
}
Expand All @@ -20,7 +20,7 @@ pub struct Output {
pub actors: Vec<crate::app::bsky::unspecced::defs::SkeletonSearchActor>,
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
///count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits
///Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.
#[serde(skip_serializing_if = "Option::is_none")]
pub hits_total: Option<i32>,
}
Expand Down
6 changes: 3 additions & 3 deletions atrium-api/src/app/bsky/unspecced/search_posts_skeleton.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Parameters {
///optional pagination mechanism; may not necessarily allow scrolling through entire result set
///Optional pagination mechanism; may not necessarily allow scrolling through entire result set.
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i32>,
///search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended
///Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.
pub q: String,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Output {
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
///count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits
///Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.
#[serde(skip_serializing_if = "Option::is_none")]
pub hits_total: Option<i32>,
pub posts: Vec<crate::app::bsky::unspecced::defs::SkeletonSearchPost>,
Expand Down
Loading