295 changes: 182 additions & 113 deletions src/http.ts

Large diffs are not rendered by default.

31 changes: 13 additions & 18 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export { BanPersonResponse } from "./types/BanPersonResponse";
export { BannedPersonsResponse } from "./types/BannedPersonsResponse";
export { BlockCommunity } from "./types/BlockCommunity";
export { BlockCommunityResponse } from "./types/BlockCommunityResponse";
export { BlockInstance } from "./types/BlockInstance";
export { BlockInstanceResponse } from "./types/BlockInstanceResponse";
export { BlockPerson } from "./types/BlockPerson";
export { BlockPersonResponse } from "./types/BlockPersonResponse";
export { CaptchaResponse } from "./types/CaptchaResponse";
Expand All @@ -43,8 +45,6 @@ export { CommunityBlockId } from "./types/CommunityBlockId";
export { CommunityBlockView } from "./types/CommunityBlockView";
export { CommunityFollowerView } from "./types/CommunityFollowerView";
export { CommunityId } from "./types/CommunityId";
export { CommunityJoin } from "./types/CommunityJoin";
export { CommunityJoinResponse } from "./types/CommunityJoinResponse";
export { CommunityModeratorView } from "./types/CommunityModeratorView";
export { CommunityResponse } from "./types/CommunityResponse";
export { CommunityView } from "./types/CommunityView";
Expand Down Expand Up @@ -82,15 +82,13 @@ export { EditSite } from "./types/EditSite";
export { FeaturePost } from "./types/FeaturePost";
export { FederatedInstances } from "./types/FederatedInstances";
export { FollowCommunity } from "./types/FollowCommunity";
export { GetBannedPersons } from "./types/GetBannedPersons";
export { GetCaptcha } from "./types/GetCaptcha";
export { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
export { GetComment } from "./types/GetComment";
export { GetComments } from "./types/GetComments";
export { GetCommentsResponse } from "./types/GetCommentsResponse";
export { GetCommunity } from "./types/GetCommunity";
export { GetCommunityResponse } from "./types/GetCommunityResponse";
export { GetFederatedInstances } from "./types/GetFederatedInstances";
export { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResponse";
export { GetModlog } from "./types/GetModlog";
export { GetModlogResponse } from "./types/GetModlogResponse";
Expand All @@ -107,20 +105,20 @@ export { GetReplies } from "./types/GetReplies";
export { GetRepliesResponse } from "./types/GetRepliesResponse";
export { GetReportCount } from "./types/GetReportCount";
export { GetReportCountResponse } from "./types/GetReportCountResponse";
export { GetSite } from "./types/GetSite";
export { GetSiteMetadata } from "./types/GetSiteMetadata";
export { GetSiteMetadataResponse } from "./types/GetSiteMetadataResponse";
export { GetSiteResponse } from "./types/GetSiteResponse";
export { GetUnreadCount } from "./types/GetUnreadCount";
export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
export { GetUnreadRegistrationApplicationCount } from "./types/GetUnreadRegistrationApplicationCount";
export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
export { HideCommunity } from "./types/HideCommunity";
export { ImageUpload } from "./types/ImageUpload";
export { ImageUploadId } from "./types/ImageUploadId";
export { Instance } from "./types/Instance";
export { InstanceBlockView } from "./types/InstanceBlockView";
export { InstanceId } from "./types/InstanceId";
export { Language } from "./types/Language";
export { LanguageId } from "./types/LanguageId";
export { LeaveAdmin } from "./types/LeaveAdmin";
export { LemmyErrorType } from "./types/LemmyErrorType";
export { ListCommentReports } from "./types/ListCommentReports";
export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
export { ListCommunities } from "./types/ListCommunities";
Expand All @@ -141,7 +139,6 @@ export { LocalUserView } from "./types/LocalUserView";
export { LockPost } from "./types/LockPost";
export { Login } from "./types/Login";
export { LoginResponse } from "./types/LoginResponse";
export { MarkAllAsRead } from "./types/MarkAllAsRead";
export { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead";
export { MarkPersonMentionAsRead } from "./types/MarkPersonMentionAsRead";
export { MarkPostAsRead } from "./types/MarkPostAsRead";
Expand All @@ -158,8 +155,6 @@ export { ModFeaturePost } from "./types/ModFeaturePost";
export { ModFeaturePostView } from "./types/ModFeaturePostView";
export { ModHideCommunity } from "./types/ModHideCommunity";
export { ModHideCommunityView } from "./types/ModHideCommunityView";
export { ModJoin } from "./types/ModJoin";
export { ModJoinResponse } from "./types/ModJoinResponse";
export { ModLockPost } from "./types/ModLockPost";
export { ModLockPostView } from "./types/ModLockPostView";
export { ModRemoveComment } from "./types/ModRemoveComment";
Expand All @@ -173,6 +168,7 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
export { ModlogActionType } from "./types/ModlogActionType";
export { ModlogListParams } from "./types/ModlogListParams";
export { MyUserInfo } from "./types/MyUserInfo";
export { PaginationCursor } from "./types/PaginationCursor";
export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
export { PasswordReset } from "./types/PasswordReset";
export { PasswordResetResponse } from "./types/PasswordResetResponse";
Expand All @@ -185,14 +181,13 @@ export { PersonMention } from "./types/PersonMention";
export { PersonMentionId } from "./types/PersonMentionId";
export { PersonMentionResponse } from "./types/PersonMentionResponse";
export { PersonMentionView } from "./types/PersonMentionView";
export { PersonSortType } from "./types/PersonSortType";
export { PersonView } from "./types/PersonView";
export { Post } from "./types/Post";
export { PostAggregates } from "./types/PostAggregates";
export { PostFeatureType } from "./types/PostFeatureType";
export { PostId } from "./types/PostId";
export { PostJoin } from "./types/PostJoin";
export { PostJoinResponse } from "./types/PostJoinResponse";
export { PostOrCommentId } from "./types/PostOrCommentId";
export { PostListingMode } from "./types/PostListingMode";
export { PostReport } from "./types/PostReport";
export { PostReportId } from "./types/PostReportId";
export { PostReportResponse } from "./types/PostReportResponse";
Expand Down Expand Up @@ -242,8 +237,8 @@ export { SortType } from "./types/SortType";
export { SubscribedType } from "./types/SubscribedType";
export { Tagline } from "./types/Tagline";
export { TransferCommunity } from "./types/TransferCommunity";
export { UserJoin } from "./types/UserJoin";
export { UserJoinResponse } from "./types/UserJoinResponse";
export { UpdateTotp } from "./types/UpdateTotp";
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
export { VerifyEmail } from "./types/VerifyEmail";
export { VerifyEmailResponse } from "./types/VerifyEmailResponse";
export { ImageFile, UploadImage, UploadImageResponse } from "./types/others";
export { UploadImage, UploadImageResponse, ImageFile } from "./types/others";
1 change: 0 additions & 1 deletion src/types/AddAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PersonId } from "./PersonId";
export interface AddAdmin {
person_id: PersonId;
added: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/AddModToCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ export interface AddModToCommunity {
community_id: CommunityId;
person_id: PersonId;
added: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/ApproveRegistrationApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ export interface ApproveRegistrationApplication {
id: number;
approve: boolean;
deny_reason?: string;
auth: string;
}
3 changes: 1 addition & 2 deletions src/types/BanFromCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ export interface BanFromCommunity {
ban: boolean;
remove_data?: boolean;
reason?: string;
expires?: number;
auth: string;
expires?: /* integer */ number;
}
3 changes: 1 addition & 2 deletions src/types/BanPerson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ export interface BanPerson {
ban: boolean;
remove_data?: boolean;
reason?: string;
expires?: number;
auth: string;
expires?: /* integer */ number;
}
1 change: 0 additions & 1 deletion src/types/BlockCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommunityId } from "./CommunityId";
export interface BlockCommunity {
community_id: CommunityId;
block: boolean;
auth: string;
}
7 changes: 7 additions & 0 deletions src/types/BlockInstance.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { InstanceId } from "./InstanceId";

export interface BlockInstance {
instance_id: InstanceId;
block: boolean;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface CommunityJoinResponse {
joined: boolean;
export interface BlockInstanceResponse {
blocked: boolean;
}
1 change: 0 additions & 1 deletion src/types/BlockPerson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PersonId } from "./PersonId";
export interface BlockPerson {
person_id: PersonId;
block: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/ChangePassword.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ export interface ChangePassword {
new_password: string;
new_password_verify: string;
old_password: string;
auth: string;
}
7 changes: 4 additions & 3 deletions src/types/CommentAggregates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import type { CommentId } from "./CommentId";
export interface CommentAggregates {
id: number;
comment_id: CommentId;
score: number;
upvotes: number;
downvotes: number;
score: /* integer */ number;
upvotes: /* integer */ number;
downvotes: /* integer */ number;
published: string;
child_count: number;
hot_rank: number;
controversy_rank: number;
}
1 change: 0 additions & 1 deletion src/types/CommentResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ import type { LocalUserId } from "./LocalUserId";
export interface CommentResponse {
comment_view: CommentView;
recipient_ids: Array<LocalUserId>;
form_id?: string;
}
2 changes: 1 addition & 1 deletion src/types/CommentSortType.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type CommentSortType = "Hot" | "Top" | "New" | "Old";
export type CommentSortType = "Hot" | "Top" | "New" | "Old" | "Controversial";
2 changes: 0 additions & 2 deletions src/types/Community.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export interface Community {
local: boolean;
icon?: string;
banner?: string;
followers_url: string;
inbox_url: string;
hidden: boolean;
posting_restricted_to_mods: boolean;
instance_id: InstanceId;
Expand Down
14 changes: 7 additions & 7 deletions src/types/CommunityAggregates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import type { CommunityId } from "./CommunityId";
export interface CommunityAggregates {
id: number;
community_id: CommunityId;
subscribers: number;
posts: number;
comments: number;
subscribers: /* integer */ number;
posts: /* integer */ number;
comments: /* integer */ number;
published: string;
users_active_day: number;
users_active_week: number;
users_active_month: number;
users_active_half_year: number;
users_active_day: /* integer */ number;
users_active_week: /* integer */ number;
users_active_month: /* integer */ number;
users_active_half_year: /* integer */ number;
hot_rank: number;
}
6 changes: 0 additions & 6 deletions src/types/CommunityJoin.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/types/CreateComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ export interface CreateComment {
post_id: PostId;
parent_id?: CommentId;
language_id?: LanguageId;
form_id?: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/CreateCommentLike.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface CreateCommentLike {
comment_id: CommentId;
score: number;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/CreateCommentReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface CreateCommentReport {
comment_id: CommentId;
reason: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/CreateCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ export interface CreateCommunity {
nsfw?: boolean;
posting_restricted_to_mods?: boolean;
discussion_languages?: Array<LanguageId>;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/CreateCustomEmoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ export interface CreateCustomEmoji {
image_url: string;
alt_text: string;
keywords: Array<string>;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/CreatePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ export interface CreatePost {
honeypot?: string;
nsfw?: boolean;
language_id?: LanguageId;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/CreatePostLike.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface CreatePostLike {
post_id: PostId;
score: number;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/CreatePostReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface CreatePostReport {
post_id: PostId;
reason: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/CreatePrivateMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PersonId } from "./PersonId";
export interface CreatePrivateMessage {
content: string;
recipient_id: PersonId;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/CreatePrivateMessageReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
export interface CreatePrivateMessageReport {
private_message_id: PrivateMessageId;
reason: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/CreateSite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ export interface CreateSite {
blocked_instances?: Array<string>;
taglines?: Array<string>;
registration_mode?: RegistrationMode;
auth: string;
}
2 changes: 1 addition & 1 deletion src/types/DeleteAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

export interface DeleteAccount {
password: string;
auth: string;
delete_content: boolean;
}
2 changes: 1 addition & 1 deletion src/types/DeleteAccountResponse.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type DeleteAccountResponse = null;
export type DeleteAccountResponse = Record<string, never>;
1 change: 0 additions & 1 deletion src/types/DeleteComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface DeleteComment {
comment_id: CommentId;
deleted: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/DeleteCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommunityId } from "./CommunityId";
export interface DeleteCommunity {
community_id: CommunityId;
deleted: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/DeleteCustomEmoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ import type { CustomEmojiId } from "./CustomEmojiId";

export interface DeleteCustomEmoji {
id: CustomEmojiId;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/DeletePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface DeletePost {
post_id: PostId;
deleted: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/DeletePrivateMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
export interface DeletePrivateMessage {
private_message_id: PrivateMessageId;
deleted: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/DistinguishComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface DistinguishComment {
comment_id: CommentId;
distinguished: boolean;
auth: string;
}
2 changes: 0 additions & 2 deletions src/types/EditComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ export interface EditComment {
comment_id: CommentId;
content?: string;
language_id?: LanguageId;
form_id?: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/EditCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ export interface EditCommunity {
nsfw?: boolean;
posting_restricted_to_mods?: boolean;
discussion_languages?: Array<LanguageId>;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/EditCustomEmoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ export interface EditCustomEmoji {
image_url: string;
alt_text: string;
keywords: Array<string>;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/EditPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ export interface EditPost {
body?: string;
nsfw?: boolean;
language_id?: LanguageId;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/EditPrivateMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
export interface EditPrivateMessage {
private_message_id: PrivateMessageId;
content: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/EditSite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ export interface EditSite {
taglines?: Array<string>;
registration_mode?: RegistrationMode;
reports_email_admins?: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/FeaturePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ export interface FeaturePost {
post_id: PostId;
featured: boolean;
feature_type: PostFeatureType;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/FollowCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommunityId } from "./CommunityId";
export interface FollowCommunity {
community_id: CommunityId;
follow: boolean;
auth: string;
}
5 changes: 5 additions & 0 deletions src/types/GenerateTotpSecretResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface GenerateTotpSecretResponse {
totp_secret_url: string;
}
1 change: 0 additions & 1 deletion src/types/GetComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ import type { CommentId } from "./CommentId";

export interface GetComment {
id: CommentId;
auth?: string;
}
7 changes: 4 additions & 3 deletions src/types/GetComments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ export interface GetComments {
type_?: ListingType;
sort?: CommentSortType;
max_depth?: number;
page?: number;
limit?: number;
page?: /* integer */ number;
limit?: /* integer */ number;
community_id?: CommunityId;
community_name?: string;
post_id?: PostId;
parent_id?: CommentId;
saved_only?: boolean;
auth?: string;
liked_only?: boolean;
disliked_only?: boolean;
}
1 change: 0 additions & 1 deletion src/types/GetCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommunityId } from "./CommunityId";
export interface GetCommunity {
id?: CommunityId;
name?: string;
auth?: string;
}
5 changes: 2 additions & 3 deletions src/types/GetModlog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import type { PersonId } from "./PersonId";
export interface GetModlog {
mod_person_id?: PersonId;
community_id?: CommunityId;
page?: number;
limit?: number;
page?: /* integer */ number;
limit?: /* integer */ number;
type_?: ModlogActionType;
other_person_id?: PersonId;
auth?: string;
}
5 changes: 2 additions & 3 deletions src/types/GetPersonDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ export interface GetPersonDetails {
person_id?: PersonId;
username?: string;
sort?: SortType;
page?: number;
limit?: number;
page?: /* integer */ number;
limit?: /* integer */ number;
community_id?: CommunityId;
saved_only?: boolean;
auth?: string;
}
5 changes: 2 additions & 3 deletions src/types/GetPersonMentions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import type { CommentSortType } from "./CommentSortType";

export interface GetPersonMentions {
sort?: CommentSortType;
page?: number;
limit?: number;
page?: /* integer */ number;
limit?: /* integer */ number;
unread_only?: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/GetPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ import type { PostId } from "./PostId";
export interface GetPost {
id?: PostId;
comment_id?: CommentId;
auth?: string;
}
9 changes: 6 additions & 3 deletions src/types/GetPosts.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { CommunityId } from "./CommunityId";
import type { ListingType } from "./ListingType";
import type { PaginationCursor } from "./PaginationCursor";
import type { SortType } from "./SortType";

export interface GetPosts {
type_?: ListingType;
sort?: SortType;
page?: number;
limit?: number;
page?: /* integer */ number;
limit?: /* integer */ number;
community_id?: CommunityId;
community_name?: string;
saved_only?: boolean;
auth?: string;
liked_only?: boolean;
disliked_only?: boolean;
page_cursor?: PaginationCursor;
}
2 changes: 2 additions & 0 deletions src/types/GetPostsResponse.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PaginationCursor } from "./PaginationCursor";
import type { PostView } from "./PostView";

export interface GetPostsResponse {
posts: Array<PostView>;
next_page?: PaginationCursor;
}
7 changes: 4 additions & 3 deletions src/types/GetPrivateMessages.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PersonId } from "./PersonId";

export interface GetPrivateMessages {
unread_only?: boolean;
page?: number;
limit?: number;
auth: string;
page?: /* integer */ number;
limit?: /* integer */ number;
creator_id?: PersonId;
}
5 changes: 2 additions & 3 deletions src/types/GetReplies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import type { CommentSortType } from "./CommentSortType";

export interface GetReplies {
sort?: CommentSortType;
page?: number;
limit?: number;
page?: /* integer */ number;
limit?: /* integer */ number;
unread_only?: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/GetReportCount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ import type { CommunityId } from "./CommunityId";

export interface GetReportCount {
community_id?: CommunityId;
auth: string;
}
6 changes: 3 additions & 3 deletions src/types/GetReportCountResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { CommunityId } from "./CommunityId";

export interface GetReportCountResponse {
community_id?: CommunityId;
comment_reports: number;
post_reports: number;
private_message_reports?: number;
comment_reports: /* integer */ number;
post_reports: /* integer */ number;
private_message_reports?: /* integer */ number;
}
5 changes: 0 additions & 5 deletions src/types/GetUnreadCount.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/types/GetUnreadCountResponse.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface GetUnreadCountResponse {
replies: number;
mentions: number;
private_messages: number;
replies: /* integer */ number;
mentions: /* integer */ number;
private_messages: /* integer */ number;
}
5 changes: 0 additions & 5 deletions src/types/GetUnreadRegistrationApplicationCount.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/types/GetUnreadRegistrationApplicationCountResponse.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface GetUnreadRegistrationApplicationCountResponse {
registration_applications: number;
registration_applications: /* integer */ number;
}
1 change: 0 additions & 1 deletion src/types/HideCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ export interface HideCommunity {
community_id: CommunityId;
hidden: boolean;
reason?: string;
auth: string;
}
11 changes: 11 additions & 0 deletions src/types/ImageUpload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ImageUploadId } from "./ImageUploadId";
import type { LocalUserId } from "./LocalUserId";

export interface ImageUpload {
id: ImageUploadId;
local_user_id: LocalUserId;
pictrs_alias: string;
pictrs_delete_token: string;
published: string;
}
4 changes: 1 addition & 3 deletions src/types/UserJoin.ts → src/types/ImageUploadId.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface UserJoin {
auth: string;
}
export type ImageUploadId = number;
10 changes: 10 additions & 0 deletions src/types/InstanceBlockView.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Instance } from "./Instance";
import type { Person } from "./Person";
import type { Site } from "./Site";

export interface InstanceBlockView {
person: Person;
instance: Instance;
site?: Site;
}
5 changes: 0 additions & 5 deletions src/types/LeaveAdmin.ts

This file was deleted.

139 changes: 139 additions & 0 deletions src/types/LemmyErrorType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type LemmyErrorType =
| { error_type: "ReportReasonRequired" }
| { error_type: "ReportTooLong" }
| { error_type: "NotAModerator" }
| { error_type: "NotAnAdmin" }
| { error_type: "CannotBlockYourself" }
| { error_type: "CannotBlockAdmin" }
| { error_type: "CouldNotUpdateUser" }
| { error_type: "PasswordsDoNotMatch" }
| { error_type: "PasswordIncorrect" }
| { error_type: "EmailNotVerified" }
| { error_type: "EmailRequired" }
| { error_type: "CouldNotUpdateComment" }
| { error_type: "CouldNotUpdatePrivateMessage" }
| { error_type: "CannotLeaveAdmin" }
| { error_type: "NoLinesInHtml" }
| { error_type: "SiteMetadataPageIsNotDoctypeHtml" }
| { error_type: "PictrsResponseError"; message: string }
| { error_type: "PictrsPurgeResponseError"; message: string }
| { error_type: "ImageUrlMissingPathSegments" }
| { error_type: "ImageUrlMissingLastPathSegment" }
| { error_type: "PictrsApiKeyNotProvided" }
| { error_type: "NoContentTypeHeader" }
| { error_type: "NotAnImageType" }
| { error_type: "NotAModOrAdmin" }
| { error_type: "NoAdmins" }
| { error_type: "NotTopAdmin" }
| { error_type: "NotTopMod" }
| { error_type: "NotLoggedIn" }
| { error_type: "SiteBan" }
| { error_type: "Deleted" }
| { error_type: "BannedFromCommunity" }
| { error_type: "CouldNotFindCommunity" }
| { error_type: "PersonIsBlocked" }
| { error_type: "DownvotesAreDisabled" }
| { error_type: "InstanceIsPrivate" }
| { error_type: "InvalidPassword" }
| { error_type: "SiteDescriptionLengthOverflow" }
| { error_type: "HoneypotFailed" }
| { error_type: "RegistrationApplicationIsPending" }
| { error_type: "PrivateInstanceCannotHaveFederationEnabled" }
| { error_type: "Locked" }
| { error_type: "CouldNotCreateComment" }
| { error_type: "MaxCommentDepthReached" }
| { error_type: "EditCommentNotAllowed" }
| { error_type: "OnlyAdminsCanCreateCommunities" }
| { error_type: "CommunityAlreadyExists" }
| { error_type: "LanguageNotAllowed" }
| { error_type: "OnlyModsCanPostInCommunity" }
| { error_type: "CouldNotUpdatePost" }
| { error_type: "EditPostNotAllowed" }
| { error_type: "CouldNotFindPost" }
| { error_type: "EditPrivateMessageNotAllowed" }
| { error_type: "SiteAlreadyExists" }
| { error_type: "ApplicationQuestionRequired" }
| { error_type: "InvalidDefaultPostListingType" }
| { error_type: "RegistrationClosed" }
| { error_type: "RegistrationApplicationAnswerRequired" }
| { error_type: "EmailAlreadyExists" }
| { error_type: "FederationError"; message: string }
| { error_type: "FederationForbiddenByStrictAllowList" }
| { error_type: "PersonIsBannedFromCommunity" }
| { error_type: "ObjectIsNotPublic" }
| { error_type: "InvalidCommunity" }
| { error_type: "CannotCreatePostOrCommentInDeletedOrRemovedCommunity" }
| { error_type: "CannotReceivePage" }
| { error_type: "NewPostCannotBeLocked" }
| { error_type: "OnlyLocalAdminCanRemoveCommunity" }
| { error_type: "OnlyLocalAdminCanRestoreCommunity" }
| { error_type: "NoIdGiven" }
| { error_type: "CouldNotFindUsernameOrEmail" }
| { error_type: "InvalidQuery" }
| { error_type: "ObjectNotLocal" }
| { error_type: "PostIsLocked" }
| { error_type: "PersonIsBannedFromSite" }
| { error_type: "InvalidVoteValue" }
| { error_type: "PageDoesNotSpecifyCreator" }
| { error_type: "PageDoesNotSpecifyGroup" }
| { error_type: "NoCommunityFoundInCC" }
| { error_type: "NoEmailSetup" }
| { error_type: "EmailSmtpServerNeedsAPort" }
| { error_type: "MissingAnEmail" }
| { error_type: "RateLimitError" }
| { error_type: "InvalidName" }
| { error_type: "InvalidDisplayName" }
| { error_type: "InvalidMatrixId" }
| { error_type: "InvalidPostTitle" }
| { error_type: "InvalidBodyField" }
| { error_type: "BioLengthOverflow" }
| { error_type: "MissingTotpToken" }
| { error_type: "IncorrectTotpToken" }
| { error_type: "CouldNotParseTotpSecret" }
| { error_type: "CouldNotLikeComment" }
| { error_type: "CouldNotSaveComment" }
| { error_type: "CouldNotCreateReport" }
| { error_type: "CouldNotResolveReport" }
| { error_type: "CommunityModeratorAlreadyExists" }
| { error_type: "CommunityUserIsAlreadyBanned" }
| { error_type: "CommunityBlockAlreadyExists" }
| { error_type: "CommunityFollowerAlreadyExists" }
| { error_type: "CouldNotUpdateCommunityHiddenStatus" }
| { error_type: "PersonBlockAlreadyExists" }
| { error_type: "UserAlreadyExists" }
| { error_type: "TokenNotFound" }
| { error_type: "CouldNotLikePost" }
| { error_type: "CouldNotSavePost" }
| { error_type: "CouldNotMarkPostAsRead" }
| { error_type: "CouldNotUpdateCommunity" }
| { error_type: "CouldNotUpdateReplies" }
| { error_type: "CouldNotUpdatePersonMentions" }
| { error_type: "PostTitleTooLong" }
| { error_type: "CouldNotCreatePost" }
| { error_type: "CouldNotCreatePrivateMessage" }
| { error_type: "CouldNotUpdatePrivate" }
| { error_type: "SystemErrLogin" }
| { error_type: "CouldNotSetAllRegistrationsAccepted" }
| { error_type: "CouldNotSetAllEmailVerified" }
| { error_type: "Banned" }
| { error_type: "CouldNotGetComments" }
| { error_type: "CouldNotGetPosts" }
| { error_type: "InvalidUrl" }
| { error_type: "EmailSendFailed" }
| { error_type: "Slurs" }
| { error_type: "CouldNotGenerateTotp" }
| { error_type: "CouldNotFindObject" }
| { error_type: "RegistrationDenied"; message: string }
| { error_type: "FederationDisabled" }
| { error_type: "DomainBlocked" }
| { error_type: "DomainNotInAllowList" }
| { error_type: "FederationDisabledByStrictAllowList" }
| { error_type: "SiteNameRequired" }
| { error_type: "SiteNameLengthOverflow" }
| { error_type: "PermissiveRegex" }
| { error_type: "InvalidRegex" }
| { error_type: "CaptchaIncorrect" }
| { error_type: "PasswordResetLimitReached" }
| { error_type: "CouldNotCreateAudioCaptcha" };
5 changes: 2 additions & 3 deletions src/types/ListCommentReports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
import type { CommunityId } from "./CommunityId";

export interface ListCommentReports {
page?: number;
limit?: number;
page?: /* integer */ number;
limit?: /* integer */ number;
unresolved_only?: boolean;
community_id?: CommunityId;
auth: string;
}
5 changes: 2 additions & 3 deletions src/types/ListCommunities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export interface ListCommunities {
type_?: ListingType;
sort?: SortType;
show_nsfw?: boolean;
page?: number;
limit?: number;
auth?: string;
page?: /* integer */ number;
limit?: /* integer */ number;
}
5 changes: 2 additions & 3 deletions src/types/ListPostReports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
import type { CommunityId } from "./CommunityId";

export interface ListPostReports {
page?: number;
limit?: number;
page?: /* integer */ number;
limit?: /* integer */ number;
unresolved_only?: boolean;
community_id?: CommunityId;
auth: string;
}
5 changes: 2 additions & 3 deletions src/types/ListPrivateMessageReports.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface ListPrivateMessageReports {
page?: number;
limit?: number;
page?: /* integer */ number;
limit?: /* integer */ number;
unresolved_only?: boolean;
auth: string;
}
5 changes: 2 additions & 3 deletions src/types/ListRegistrationApplications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

export interface ListRegistrationApplications {
unread_only?: boolean;
page?: number;
limit?: number;
auth: string;
page?: /* integer */ number;
limit?: /* integer */ number;
}
2 changes: 1 addition & 1 deletion src/types/ListingType.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type ListingType = "All" | "Local" | "Subscribed";
export type ListingType = "All" | "Local" | "Subscribed" | "ModeratorView";
8 changes: 7 additions & 1 deletion src/types/LocalUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import type { ListingType } from "./ListingType";
import type { LocalUserId } from "./LocalUserId";
import type { PersonId } from "./PersonId";
import type { PostListingMode } from "./PostListingMode";
import type { SortType } from "./SortType";

export interface LocalUser {
Expand All @@ -22,6 +23,11 @@ export interface LocalUser {
show_new_post_notifs: boolean;
email_verified: boolean;
accepted_application: boolean;
totp_2fa_url?: string;
open_links_in_new_tab: boolean;
blur_nsfw: boolean;
auto_expand: boolean;
infinite_scroll_enabled: boolean;
admin: boolean;
post_listing_mode: PostListingMode;
totp_2fa_enabled: boolean;
}
1 change: 0 additions & 1 deletion src/types/LockPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface LockPost {
post_id: PostId;
locked: boolean;
auth: string;
}
5 changes: 0 additions & 5 deletions src/types/MarkAllAsRead.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/types/MarkCommentReplyAsRead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommentReplyId } from "./CommentReplyId";
export interface MarkCommentReplyAsRead {
comment_reply_id: CommentReplyId;
read: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/MarkPersonMentionAsRead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PersonMentionId } from "./PersonMentionId";
export interface MarkPersonMentionAsRead {
person_mention_id: PersonMentionId;
read: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/MarkPostAsRead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface MarkPostAsRead {
post_id: PostId;
read: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/MarkPrivateMessageAsRead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
export interface MarkPrivateMessageAsRead {
private_message_id: PrivateMessageId;
read: boolean;
auth: string;
}
6 changes: 0 additions & 6 deletions src/types/ModJoin.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/types/ModJoinResponse.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/types/ModlogListParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface ModlogListParams {
community_id?: CommunityId;
mod_person_id?: PersonId;
other_person_id?: PersonId;
page?: number;
limit?: number;
page?: /* integer */ number;
limit?: /* integer */ number;
hide_modlog_names: boolean;
}
2 changes: 2 additions & 0 deletions src/types/MyUserInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import type { CommunityBlockView } from "./CommunityBlockView";
import type { CommunityFollowerView } from "./CommunityFollowerView";
import type { CommunityModeratorView } from "./CommunityModeratorView";
import type { InstanceBlockView } from "./InstanceBlockView";
import type { LanguageId } from "./LanguageId";
import type { LocalUserView } from "./LocalUserView";
import type { PersonBlockView } from "./PersonBlockView";
Expand All @@ -11,6 +12,7 @@ export interface MyUserInfo {
follows: Array<CommunityFollowerView>;
moderates: Array<CommunityModeratorView>;
community_blocks: Array<CommunityBlockView>;
instance_blocks: Array<InstanceBlockView>;
person_blocks: Array<PersonBlockView>;
discussion_languages: Array<LanguageId>;
}
4 changes: 1 addition & 3 deletions src/types/GetSite.ts → src/types/PaginationCursor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface GetSite {
auth?: string;
}
export type PaginationCursor = string;
2 changes: 1 addition & 1 deletion src/types/PasswordResetResponse.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type PasswordResetResponse = null;
export type PasswordResetResponse = Record<string, never>;
2 changes: 0 additions & 2 deletions src/types/Person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ export interface Person {
local: boolean;
banner?: string;
deleted: boolean;
inbox_url: string;
matrix_user_id?: string;
admin: boolean;
bot_account: boolean;
ban_expires?: string;
instance_id: InstanceId;
Expand Down
8 changes: 4 additions & 4 deletions src/types/PersonAggregates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import type { PersonId } from "./PersonId";
export interface PersonAggregates {
id: number;
person_id: PersonId;
post_count: number;
post_score: number;
comment_count: number;
comment_score: number;
post_count: /* integer */ number;
post_score: /* integer */ number;
comment_count: /* integer */ number;
comment_score: /* integer */ number;
}
9 changes: 9 additions & 0 deletions src/types/PersonSortType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type PersonSortType =
| "New"
| "Old"
| "MostComments"
| "CommentScore"
| "PostScore"
| "PostCount";
16 changes: 12 additions & 4 deletions src/types/PostAggregates.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { CommunityId } from "./CommunityId";
import type { InstanceId } from "./InstanceId";
import type { PersonId } from "./PersonId";
import type { PostId } from "./PostId";

export interface PostAggregates {
id: number;
post_id: PostId;
comments: number;
score: number;
upvotes: number;
downvotes: number;
comments: /* integer */ number;
score: /* integer */ number;
upvotes: /* integer */ number;
downvotes: /* integer */ number;
published: string;
newest_comment_time_necro: string;
newest_comment_time: string;
featured_community: boolean;
featured_local: boolean;
hot_rank: number;
hot_rank_active: number;
community_id: CommunityId;
creator_id: PersonId;
controversy_rank: number;
instance_id: InstanceId;
scaled_rank: number;
}
6 changes: 0 additions & 6 deletions src/types/PostJoin.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/types/PostJoinResponse.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface GetBannedPersons {
auth: string;
}
export type PostListingMode = "List" | "Card" | "SmallCard";
5 changes: 0 additions & 5 deletions src/types/PostOrCommentId.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/types/PostView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export interface PostView {
read: boolean;
creator_blocked: boolean;
my_vote?: number;
unread_comments: number;
unread_comments: /* integer */ number;
}
1 change: 0 additions & 1 deletion src/types/PurgeComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface PurgeComment {
comment_id: CommentId;
reason?: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/PurgeCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommunityId } from "./CommunityId";
export interface PurgeCommunity {
community_id: CommunityId;
reason?: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/PurgePerson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PersonId } from "./PersonId";
export interface PurgePerson {
person_id: PersonId;
reason?: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/PurgePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface PurgePost {
post_id: PostId;
reason?: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/RemoveComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ export interface RemoveComment {
comment_id: CommentId;
removed: boolean;
reason?: string;
auth: string;
}
3 changes: 1 addition & 2 deletions src/types/RemoveCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ export interface RemoveCommunity {
community_id: CommunityId;
removed: boolean;
reason?: string;
expires?: number;
auth: string;
expires?: /* integer */ number;
}
1 change: 0 additions & 1 deletion src/types/RemovePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ export interface RemovePost {
post_id: PostId;
removed: boolean;
reason?: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/ResolveCommentReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommentReportId } from "./CommentReportId";
export interface ResolveCommentReport {
report_id: CommentReportId;
resolved: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/ResolveObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

export interface ResolveObject {
q: string;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/ResolvePostReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PostReportId } from "./PostReportId";
export interface ResolvePostReport {
report_id: PostReportId;
resolved: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/ResolvePrivateMessageReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PrivateMessageReportId } from "./PrivateMessageReportId";
export interface ResolvePrivateMessageReport {
report_id: PrivateMessageReportId;
resolved: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/SaveComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface SaveComment {
comment_id: CommentId;
save: boolean;
auth: string;
}
1 change: 0 additions & 1 deletion src/types/SavePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface SavePost {
post_id: PostId;
save: boolean;
auth: string;
}
5 changes: 3 additions & 2 deletions src/types/SaveUserSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import type { SortType } from "./SortType";

export interface SaveUserSettings {
show_nsfw?: boolean;
blur_nsfw?: boolean;
auto_expand?: boolean;
show_scores?: boolean;
theme?: string;
default_sort_type?: SortType;
Expand All @@ -23,7 +25,6 @@ export interface SaveUserSettings {
show_read_posts?: boolean;
show_new_post_notifs?: boolean;
discussion_languages?: Array<LanguageId>;
generate_totp_2fa?: boolean;
auth: string;
open_links_in_new_tab?: boolean;
infinite_scroll_enabled?: boolean;
}
5 changes: 2 additions & 3 deletions src/types/Search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export interface Search {
type_?: SearchType;
sort?: SortType;
listing_type?: ListingType;
page?: number;
limit?: number;
auth?: string;
page?: /* integer */ number;
limit?: /* integer */ number;
}
16 changes: 8 additions & 8 deletions src/types/SiteAggregates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import type { SiteId } from "./SiteId";
export interface SiteAggregates {
id: number;
site_id: SiteId;
users: number;
posts: number;
comments: number;
communities: number;
users_active_day: number;
users_active_week: number;
users_active_month: number;
users_active_half_year: number;
users: /* integer */ number;
posts: /* integer */ number;
comments: /* integer */ number;
communities: /* integer */ number;
users_active_day: /* integer */ number;
users_active_week: /* integer */ number;
users_active_month: /* integer */ number;
users_active_half_year: /* integer */ number;
}
4 changes: 3 additions & 1 deletion src/types/SortType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ export type SortType =
| "TopTwelveHour"
| "TopThreeMonths"
| "TopSixMonths"
| "TopNineMonths";
| "TopNineMonths"
| "Controversial"
| "Scaled";
1 change: 0 additions & 1 deletion src/types/TransferCommunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ import type { PersonId } from "./PersonId";
export interface TransferCommunity {
community_id: CommunityId;
person_id: PersonId;
auth: string;
}
5 changes: 3 additions & 2 deletions src/types/GetCaptcha.ts → src/types/UpdateTotp.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface GetCaptcha {
auth?: string;
export interface UpdateTotp {
totp_token: string;
enabled: boolean;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface GetFederatedInstances {
auth?: string;
export interface UpdateTotpResponse {
enabled: boolean;
}
5 changes: 0 additions & 5 deletions src/types/UserJoinResponse.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/types/VerifyEmailResponse.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type VerifyEmailResponse = null;
export type VerifyEmailResponse = Record<string, never>;
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1808,10 +1808,10 @@ prettier-plugin-packagejson@^2.4.3:
sort-package-json "2.4.1"
synckit "0.8.5"

prettier@^2.8.8:
version "2.8.8"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
prettier@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.0.tgz#e7b19f691245a21d618c68bc54dc06122f6105ae"
integrity sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==

punycode@^2.1.0:
version "2.1.1"
Expand Down