mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-22 20:31:12 +00:00
Adding vote display modes and other additions from main. (#246)
This commit is contained in:
parent
c89acdd8df
commit
42874f0348
10 changed files with 27 additions and 37 deletions
15
src/http.ts
15
src/http.ts
|
@ -139,8 +139,6 @@ import { ListPostLikesResponse } from "./types/ListPostLikesResponse";
|
||||||
import { ListCommentLikes } from "./types/ListCommentLikes";
|
import { ListCommentLikes } from "./types/ListCommentLikes";
|
||||||
import { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
|
import { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
|
||||||
import { HidePost } from "./types/HidePost";
|
import { HidePost } from "./types/HidePost";
|
||||||
import { ListMedia } from "./types/ListMedia";
|
|
||||||
import { ListMediaResponse } from "./types/ListMediaResponse";
|
|
||||||
|
|
||||||
enum HttpType {
|
enum HttpType {
|
||||||
Get = "GET",
|
Get = "GET",
|
||||||
|
@ -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.
|
* Enable / Disable TOTP / two-factor authentication.
|
||||||
*
|
*
|
||||||
|
|
|
@ -125,8 +125,6 @@ export { ListCommentReports } from "./types/ListCommentReports";
|
||||||
export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
|
export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
|
||||||
export { ListCommunities } from "./types/ListCommunities";
|
export { ListCommunities } from "./types/ListCommunities";
|
||||||
export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
|
export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
|
||||||
export { ListMedia } from "./types/ListMedia";
|
|
||||||
export { ListMediaResponse } from "./types/ListMediaResponse";
|
|
||||||
export { ListPostLikes } from "./types/ListPostLikes";
|
export { ListPostLikes } from "./types/ListPostLikes";
|
||||||
export { ListPostLikesResponse } from "./types/ListPostLikesResponse";
|
export { ListPostLikesResponse } from "./types/ListPostLikesResponse";
|
||||||
export { ListPostReports } from "./types/ListPostReports";
|
export { ListPostReports } from "./types/ListPostReports";
|
||||||
|
@ -136,13 +134,13 @@ export { ListPrivateMessageReportsResponse } from "./types/ListPrivateMessageRep
|
||||||
export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
|
export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
|
||||||
export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
|
export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
|
||||||
export { ListingType } from "./types/ListingType";
|
export { ListingType } from "./types/ListingType";
|
||||||
export { LocalImage } from "./types/LocalImage";
|
|
||||||
export { LocalSite } from "./types/LocalSite";
|
export { LocalSite } from "./types/LocalSite";
|
||||||
export { LocalSiteId } from "./types/LocalSiteId";
|
export { LocalSiteId } from "./types/LocalSiteId";
|
||||||
export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit";
|
export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit";
|
||||||
export { LocalUser } from "./types/LocalUser";
|
export { LocalUser } from "./types/LocalUser";
|
||||||
export { LocalUserId } from "./types/LocalUserId";
|
export { LocalUserId } from "./types/LocalUserId";
|
||||||
export { LocalUserView } from "./types/LocalUserView";
|
export { LocalUserView } from "./types/LocalUserView";
|
||||||
|
export { LocalUserVoteDisplayMode } from "./types/LocalUserVoteDisplayMode";
|
||||||
export { LockPost } from "./types/LockPost";
|
export { LockPost } from "./types/LockPost";
|
||||||
export { Login } from "./types/Login";
|
export { Login } from "./types/Login";
|
||||||
export { LoginResponse } from "./types/LoginResponse";
|
export { LoginResponse } from "./types/LoginResponse";
|
||||||
|
|
|
@ -5,6 +5,7 @@ import type { CommentReport } from "./CommentReport";
|
||||||
import type { Community } from "./Community";
|
import type { Community } from "./Community";
|
||||||
import type { Person } from "./Person";
|
import type { Person } from "./Person";
|
||||||
import type { Post } from "./Post";
|
import type { Post } from "./Post";
|
||||||
|
import type { SubscribedType } from "./SubscribedType";
|
||||||
|
|
||||||
export interface CommentReportView {
|
export interface CommentReportView {
|
||||||
comment_report: CommentReport;
|
comment_report: CommentReport;
|
||||||
|
@ -15,6 +16,11 @@ export interface CommentReportView {
|
||||||
comment_creator: Person;
|
comment_creator: Person;
|
||||||
counts: CommentAggregates;
|
counts: CommentAggregates;
|
||||||
creator_banned_from_community: boolean;
|
creator_banned_from_community: boolean;
|
||||||
|
creator_is_moderator: boolean;
|
||||||
|
creator_is_admin: boolean;
|
||||||
|
creator_blocked: boolean;
|
||||||
|
subscribed: SubscribedType;
|
||||||
|
saved: boolean;
|
||||||
my_vote?: number;
|
my_vote?: number;
|
||||||
resolver?: Person;
|
resolver?: Person;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -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<LocalImage>;
|
|
||||||
}
|
|
|
@ -1,10 +1,12 @@
|
||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// 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 { LocalUser } from "./LocalUser";
|
||||||
|
import type { LocalUserVoteDisplayMode } from "./LocalUserVoteDisplayMode";
|
||||||
import type { Person } from "./Person";
|
import type { Person } from "./Person";
|
||||||
import type { PersonAggregates } from "./PersonAggregates";
|
import type { PersonAggregates } from "./PersonAggregates";
|
||||||
|
|
||||||
export interface LocalUserView {
|
export interface LocalUserView {
|
||||||
local_user: LocalUser;
|
local_user: LocalUser;
|
||||||
|
local_user_vote_display_mode: LocalUserVoteDisplayMode;
|
||||||
person: Person;
|
person: Person;
|
||||||
counts: PersonAggregates;
|
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.
|
// 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";
|
import type { LocalUserId } from "./LocalUserId";
|
||||||
|
|
||||||
export interface LocalImage {
|
export interface LocalUserVoteDisplayMode {
|
||||||
local_user_id: LocalUserId;
|
local_user_id: LocalUserId;
|
||||||
pictrs_alias: string;
|
score: boolean;
|
||||||
pictrs_delete_token: string;
|
upvotes: boolean;
|
||||||
published: string;
|
downvotes: boolean;
|
||||||
|
upvote_percentage: boolean;
|
||||||
}
|
}
|
|
@ -4,6 +4,7 @@ import type { Person } from "./Person";
|
||||||
import type { Post } from "./Post";
|
import type { Post } from "./Post";
|
||||||
import type { PostAggregates } from "./PostAggregates";
|
import type { PostAggregates } from "./PostAggregates";
|
||||||
import type { PostReport } from "./PostReport";
|
import type { PostReport } from "./PostReport";
|
||||||
|
import type { SubscribedType } from "./SubscribedType";
|
||||||
|
|
||||||
export interface PostReportView {
|
export interface PostReportView {
|
||||||
post_report: PostReport;
|
post_report: PostReport;
|
||||||
|
@ -12,7 +13,15 @@ export interface PostReportView {
|
||||||
creator: Person;
|
creator: Person;
|
||||||
post_creator: Person;
|
post_creator: Person;
|
||||||
creator_banned_from_community: boolean;
|
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;
|
my_vote?: number;
|
||||||
|
unread_comments: /* integer */ number;
|
||||||
counts: PostAggregates;
|
counts: PostAggregates;
|
||||||
resolver?: Person;
|
resolver?: Person;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@ export interface SaveUserSettings {
|
||||||
show_nsfw?: boolean;
|
show_nsfw?: boolean;
|
||||||
blur_nsfw?: boolean;
|
blur_nsfw?: boolean;
|
||||||
auto_expand?: boolean;
|
auto_expand?: boolean;
|
||||||
show_scores?: boolean;
|
|
||||||
theme?: string;
|
theme?: string;
|
||||||
default_sort_type?: SortType;
|
default_sort_type?: SortType;
|
||||||
default_listing_type?: ListingType;
|
default_listing_type?: ListingType;
|
||||||
|
@ -31,4 +30,8 @@ export interface SaveUserSettings {
|
||||||
enable_keyboard_navigation?: boolean;
|
enable_keyboard_navigation?: boolean;
|
||||||
enable_animated_images?: boolean;
|
enable_animated_images?: boolean;
|
||||||
collapse_bot_comments?: boolean;
|
collapse_bot_comments?: boolean;
|
||||||
|
show_scores?: boolean;
|
||||||
|
show_upvotes?: boolean;
|
||||||
|
show_downvotes?: boolean;
|
||||||
|
show_upvote_percentage?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,6 @@ export interface Site {
|
||||||
actor_id: string;
|
actor_id: string;
|
||||||
last_refreshed_at: string;
|
last_refreshed_at: string;
|
||||||
inbox_url: string;
|
inbox_url: string;
|
||||||
private_key?: string;
|
|
||||||
public_key: string;
|
|
||||||
instance_id: InstanceId;
|
instance_id: InstanceId;
|
||||||
content_warning?: string;
|
content_warning?: string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue