Skip to content

Commit

Permalink
Adding vote display modes and other additions from main. (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines committed Mar 13, 2024
1 parent c89acdd commit 42874f0
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 37 deletions.
15 changes: 0 additions & 15 deletions src/http.ts
Expand Up @@ -139,8 +139,6 @@ import { ListPostLikesResponse } from "./types/ListPostLikesResponse";
import { ListCommentLikes } from "./types/ListCommentLikes";
import { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
import { HidePost } from "./types/HidePost";
import { ListMedia } from "./types/ListMedia";
import { ListMediaResponse } from "./types/ListMediaResponse";

enum HttpType {
Get = "GET",
Expand Down Expand Up @@ -292,19 +290,6 @@ export class LemmyHttp {
);
}

/**
* List all the media for your user
*
* `HTTP.GET /user/list_media`
*/
listMedia(form: ListMedia) {
return this.#wrapper<ListMedia, ListMediaResponse>(
HttpType.Get,
"/user/list_media",
form,
);
}

/**
* Enable / Disable TOTP / two-factor authentication.
*
Expand Down
4 changes: 1 addition & 3 deletions src/index.ts
Expand Up @@ -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";
Expand All @@ -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";
Expand Down
6 changes: 6 additions & 0 deletions src/types/CommentReportView.ts
Expand Up @@ -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;
Expand All @@ -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;
}
6 changes: 0 additions & 6 deletions src/types/ListMedia.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/types/ListMediaResponse.ts

This file was deleted.

2 changes: 2 additions & 0 deletions 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;
}
@@ -1,9 +1,10 @@
// 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 {
export interface LocalUserVoteDisplayMode {
local_user_id: LocalUserId;
pictrs_alias: string;
pictrs_delete_token: string;
published: string;
score: boolean;
upvotes: boolean;
downvotes: boolean;
upvote_percentage: boolean;
}
9 changes: 9 additions & 0 deletions src/types/PostReportView.ts
Expand Up @@ -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;
Expand All @@ -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;
}
5 changes: 4 additions & 1 deletion src/types/SaveUserSettings.ts
Expand Up @@ -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;
Expand All @@ -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;
}
2 changes: 0 additions & 2 deletions src/types/Site.ts
Expand Up @@ -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;
}

0 comments on commit 42874f0

Please sign in to comment.