From 57c6df2aaef5d9d4664347eca8925694b8ada52d Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 13 Mar 2024 13:41:27 -0400 Subject: [PATCH] Adding vote display modes and other additions from main. --- src/index.ts | 4 +--- src/types/CommentReportView.ts | 6 ++++++ src/types/ListMedia.ts | 6 ------ src/types/ListMediaResponse.ts | 6 ------ src/types/LocalImage.ts | 9 --------- src/types/LocalUserView.ts | 2 ++ src/types/PostReportView.ts | 9 +++++++++ src/types/SaveUserSettings.ts | 5 ++++- src/types/Site.ts | 2 -- 9 files changed, 22 insertions(+), 27 deletions(-) delete mode 100644 src/types/ListMedia.ts delete mode 100644 src/types/ListMediaResponse.ts delete mode 100644 src/types/LocalImage.ts diff --git a/src/index.ts b/src/index.ts index 695fa45..8451c14 100644 --- a/src/index.ts +++ b/src/index.ts @@ -125,8 +125,6 @@ export { ListCommentReports } from "./types/ListCommentReports"; export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse"; export { ListCommunities } from "./types/ListCommunities"; export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse"; -export { ListMedia } from "./types/ListMedia"; -export { ListMediaResponse } from "./types/ListMediaResponse"; export { ListPostLikes } from "./types/ListPostLikes"; export { ListPostLikesResponse } from "./types/ListPostLikesResponse"; export { ListPostReports } from "./types/ListPostReports"; @@ -136,13 +134,13 @@ export { ListPrivateMessageReportsResponse } from "./types/ListPrivateMessageRep export { ListRegistrationApplications } from "./types/ListRegistrationApplications"; export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse"; export { ListingType } from "./types/ListingType"; -export { LocalImage } from "./types/LocalImage"; export { LocalSite } from "./types/LocalSite"; export { LocalSiteId } from "./types/LocalSiteId"; export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit"; export { LocalUser } from "./types/LocalUser"; export { LocalUserId } from "./types/LocalUserId"; export { LocalUserView } from "./types/LocalUserView"; +export { LocalUserVoteDisplayMode } from "./types/LocalUserVoteDisplayMode"; export { LockPost } from "./types/LockPost"; export { Login } from "./types/Login"; export { LoginResponse } from "./types/LoginResponse"; diff --git a/src/types/CommentReportView.ts b/src/types/CommentReportView.ts index c88f685..59ef498 100644 --- a/src/types/CommentReportView.ts +++ b/src/types/CommentReportView.ts @@ -5,6 +5,7 @@ import type { CommentReport } from "./CommentReport"; import type { Community } from "./Community"; import type { Person } from "./Person"; import type { Post } from "./Post"; +import type { SubscribedType } from "./SubscribedType"; export interface CommentReportView { comment_report: CommentReport; @@ -15,6 +16,11 @@ export interface CommentReportView { comment_creator: Person; counts: CommentAggregates; creator_banned_from_community: boolean; + creator_is_moderator: boolean; + creator_is_admin: boolean; + creator_blocked: boolean; + subscribed: SubscribedType; + saved: boolean; my_vote?: number; resolver?: Person; } diff --git a/src/types/ListMedia.ts b/src/types/ListMedia.ts deleted file mode 100644 index 618716f..0000000 --- a/src/types/ListMedia.ts +++ /dev/null @@ -1,6 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export interface ListMedia { - page?: /* integer */ number; - limit?: /* integer */ number; -} diff --git a/src/types/ListMediaResponse.ts b/src/types/ListMediaResponse.ts deleted file mode 100644 index ed042ff..0000000 --- a/src/types/ListMediaResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { LocalImage } from "./LocalImage"; - -export interface ListMediaResponse { - images: Array; -} diff --git a/src/types/LocalImage.ts b/src/types/LocalImage.ts deleted file mode 100644 index 3b51683..0000000 --- a/src/types/LocalImage.ts +++ /dev/null @@ -1,9 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { LocalUserId } from "./LocalUserId"; - -export interface LocalImage { - local_user_id: LocalUserId; - pictrs_alias: string; - pictrs_delete_token: string; - published: string; -} diff --git a/src/types/LocalUserView.ts b/src/types/LocalUserView.ts index ea6f87e..2dd2381 100644 --- a/src/types/LocalUserView.ts +++ b/src/types/LocalUserView.ts @@ -1,10 +1,12 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { LocalUser } from "./LocalUser"; +import type { LocalUserVoteDisplayMode } from "./LocalUserVoteDisplayMode"; import type { Person } from "./Person"; import type { PersonAggregates } from "./PersonAggregates"; export interface LocalUserView { local_user: LocalUser; + local_user_vote_display_mode: LocalUserVoteDisplayMode; person: Person; counts: PersonAggregates; } diff --git a/src/types/PostReportView.ts b/src/types/PostReportView.ts index 0c48f17..64845fe 100644 --- a/src/types/PostReportView.ts +++ b/src/types/PostReportView.ts @@ -4,6 +4,7 @@ import type { Person } from "./Person"; import type { Post } from "./Post"; import type { PostAggregates } from "./PostAggregates"; import type { PostReport } from "./PostReport"; +import type { SubscribedType } from "./SubscribedType"; export interface PostReportView { post_report: PostReport; @@ -12,7 +13,15 @@ export interface PostReportView { creator: Person; post_creator: Person; creator_banned_from_community: boolean; + creator_is_moderator: boolean; + creator_is_admin: boolean; + subscribed: SubscribedType; + saved: boolean; + read: boolean; + hidden: boolean; + creator_blocked: boolean; my_vote?: number; + unread_comments: /* integer */ number; counts: PostAggregates; resolver?: Person; } diff --git a/src/types/SaveUserSettings.ts b/src/types/SaveUserSettings.ts index f4f0375..c9c15fd 100644 --- a/src/types/SaveUserSettings.ts +++ b/src/types/SaveUserSettings.ts @@ -8,7 +8,6 @@ export interface SaveUserSettings { show_nsfw?: boolean; blur_nsfw?: boolean; auto_expand?: boolean; - show_scores?: boolean; theme?: string; default_sort_type?: SortType; default_listing_type?: ListingType; @@ -31,4 +30,8 @@ export interface SaveUserSettings { enable_keyboard_navigation?: boolean; enable_animated_images?: boolean; collapse_bot_comments?: boolean; + show_scores?: boolean; + show_upvotes?: boolean; + show_downvotes?: boolean; + show_upvote_percentage?: boolean; } diff --git a/src/types/Site.ts b/src/types/Site.ts index 1ed7ce6..071a21c 100644 --- a/src/types/Site.ts +++ b/src/types/Site.ts @@ -14,8 +14,6 @@ export interface Site { actor_id: string; last_refreshed_at: string; inbox_url: string; - private_key?: string; - public_key: string; instance_id: InstanceId; content_warning?: string; }