Revert "Updating successresponses."

This reverts commit 6de51027d4.
This commit is contained in:
Dessalines 2023-10-19 18:20:32 -04:00
parent a8ac7acf02
commit b6ab9679f1
17 changed files with 260 additions and 164 deletions

View file

@ -1,14 +1,21 @@
import fetch from "cross-fetch"; import fetch from "cross-fetch";
import FormData from "form-data"; import FormData from "form-data";
import { AddAdmin } from "./types/AddAdmin"; import { AddAdmin } from "./types/AddAdmin";
import { AddAdminResponse } from "./types/AddAdminResponse";
import { AddModToCommunity } from "./types/AddModToCommunity"; import { AddModToCommunity } from "./types/AddModToCommunity";
import { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
import { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication"; import { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
import { BanFromCommunity } from "./types/BanFromCommunity"; import { BanFromCommunity } from "./types/BanFromCommunity";
import { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
import { BanPerson } from "./types/BanPerson"; import { BanPerson } from "./types/BanPerson";
import { BanPersonResponse } from "./types/BanPersonResponse";
import { BannedPersonsResponse } from "./types/BannedPersonsResponse"; import { BannedPersonsResponse } from "./types/BannedPersonsResponse";
import { BlockCommunity } from "./types/BlockCommunity"; import { BlockCommunity } from "./types/BlockCommunity";
import { BlockCommunityResponse } from "./types/BlockCommunityResponse";
import { BlockPerson } from "./types/BlockPerson"; import { BlockPerson } from "./types/BlockPerson";
import { BlockPersonResponse } from "./types/BlockPersonResponse";
import { ChangePassword } from "./types/ChangePassword"; import { ChangePassword } from "./types/ChangePassword";
import { CommentReplyResponse } from "./types/CommentReplyResponse";
import { CommentReportResponse } from "./types/CommentReportResponse"; import { CommentReportResponse } from "./types/CommentReportResponse";
import { CommentResponse } from "./types/CommentResponse"; import { CommentResponse } from "./types/CommentResponse";
import { CommunityResponse } from "./types/CommunityResponse"; import { CommunityResponse } from "./types/CommunityResponse";
@ -25,9 +32,11 @@ import { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
import { CreateSite } from "./types/CreateSite"; import { CreateSite } from "./types/CreateSite";
import { CustomEmojiResponse } from "./types/CustomEmojiResponse"; import { CustomEmojiResponse } from "./types/CustomEmojiResponse";
import { DeleteAccount } from "./types/DeleteAccount"; import { DeleteAccount } from "./types/DeleteAccount";
import { DeleteAccountResponse } from "./types/DeleteAccountResponse";
import { DeleteComment } from "./types/DeleteComment"; import { DeleteComment } from "./types/DeleteComment";
import { DeleteCommunity } from "./types/DeleteCommunity"; import { DeleteCommunity } from "./types/DeleteCommunity";
import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji"; import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
import { DeleteCustomEmojiResponse } from "./types/DeleteCustomEmojiResponse";
import { DeletePost } from "./types/DeletePost"; import { DeletePost } from "./types/DeletePost";
import { DeletePrivateMessage } from "./types/DeletePrivateMessage"; import { DeletePrivateMessage } from "./types/DeletePrivateMessage";
import { DistinguishComment } from "./types/DistinguishComment"; import { DistinguishComment } from "./types/DistinguishComment";
@ -85,6 +94,7 @@ import { MarkPostAsRead } from "./types/MarkPostAsRead";
import { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead"; import { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";
import { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset"; import { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
import { PasswordReset } from "./types/PasswordReset"; import { PasswordReset } from "./types/PasswordReset";
import { PasswordResetResponse } from "./types/PasswordResetResponse";
import { PersonMentionResponse } from "./types/PersonMentionResponse"; import { PersonMentionResponse } from "./types/PersonMentionResponse";
import { PostReportResponse } from "./types/PostReportResponse"; import { PostReportResponse } from "./types/PostReportResponse";
import { PostResponse } from "./types/PostResponse"; import { PostResponse } from "./types/PostResponse";
@ -93,6 +103,7 @@ import { PrivateMessageResponse } from "./types/PrivateMessageResponse";
import { PrivateMessagesResponse } from "./types/PrivateMessagesResponse"; import { PrivateMessagesResponse } from "./types/PrivateMessagesResponse";
import { PurgeComment } from "./types/PurgeComment"; import { PurgeComment } from "./types/PurgeComment";
import { PurgeCommunity } from "./types/PurgeCommunity"; import { PurgeCommunity } from "./types/PurgeCommunity";
import { PurgeItemResponse } from "./types/PurgeItemResponse";
import { PurgePerson } from "./types/PurgePerson"; import { PurgePerson } from "./types/PurgePerson";
import { PurgePost } from "./types/PurgePost"; import { PurgePost } from "./types/PurgePost";
import { Register } from "./types/Register"; import { Register } from "./types/Register";
@ -113,6 +124,7 @@ import { SearchResponse } from "./types/SearchResponse";
import { SiteResponse } from "./types/SiteResponse"; import { SiteResponse } from "./types/SiteResponse";
import { TransferCommunity } from "./types/TransferCommunity"; import { TransferCommunity } from "./types/TransferCommunity";
import { VerifyEmail } from "./types/VerifyEmail"; import { VerifyEmail } from "./types/VerifyEmail";
import { VerifyEmailResponse } from "./types/VerifyEmailResponse";
import { import {
DeleteImage, DeleteImage,
UploadImage, UploadImage,
@ -121,6 +133,7 @@ import {
} from "./types/others"; } from "./types/others";
import { HideCommunity } from "./types/HideCommunity"; import { HideCommunity } from "./types/HideCommunity";
import { BlockInstance } from "./types/BlockInstance"; import { BlockInstance } from "./types/BlockInstance";
import { BlockInstanceResponse } from "./types/BlockInstanceResponse";
import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse"; import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
import { UpdateTotp } from "./types/UpdateTotp"; import { UpdateTotp } from "./types/UpdateTotp";
import { UpdateTotpResponse } from "./types/UpdateTotpResponse"; import { UpdateTotpResponse } from "./types/UpdateTotpResponse";
@ -400,7 +413,7 @@ export class LemmyHttp {
* `HTTP.POST /community/block` * `HTTP.POST /community/block`
*/ */
blockCommunity(form: BlockCommunity) { blockCommunity(form: BlockCommunity) {
return this.#wrapper<BlockCommunity, SuccessResponse>( return this.#wrapper<BlockCommunity, BlockCommunityResponse>(
HttpType.Post, HttpType.Post,
"/community/block", "/community/block",
form, form,
@ -465,7 +478,7 @@ export class LemmyHttp {
* `HTTP.POST /community/ban_user` * `HTTP.POST /community/ban_user`
*/ */
banFromCommunity(form: BanFromCommunity) { banFromCommunity(form: BanFromCommunity) {
return this.#wrapper<BanFromCommunity, SuccessResponse>( return this.#wrapper<BanFromCommunity, BanFromCommunityResponse>(
HttpType.Post, HttpType.Post,
"/community/ban_user", "/community/ban_user",
form, form,
@ -478,7 +491,7 @@ export class LemmyHttp {
* `HTTP.POST /community/mod` * `HTTP.POST /community/mod`
*/ */
addModToCommunity(form: AddModToCommunity) { addModToCommunity(form: AddModToCommunity) {
return this.#wrapper<AddModToCommunity, SuccessResponse>( return this.#wrapper<AddModToCommunity, AddModToCommunityResponse>(
HttpType.Post, HttpType.Post,
"/community/mod", "/community/mod",
form, form,
@ -730,7 +743,7 @@ export class LemmyHttp {
* `HTTP.POST /comment/mark_as_read` * `HTTP.POST /comment/mark_as_read`
*/ */
markCommentReplyAsRead(form: MarkCommentReplyAsRead) { markCommentReplyAsRead(form: MarkCommentReplyAsRead) {
return this.#wrapper<MarkCommentReplyAsRead, SuccessResponse>( return this.#wrapper<MarkCommentReplyAsRead, CommentReplyResponse>(
HttpType.Post, HttpType.Post,
"/comment/mark_as_read", "/comment/mark_as_read",
form, form,
@ -1026,7 +1039,7 @@ export class LemmyHttp {
* `HTTP.POST /user/ban` * `HTTP.POST /user/ban`
*/ */
banPerson(form: BanPerson) { banPerson(form: BanPerson) {
return this.#wrapper<BanPerson, SuccessResponse>( return this.#wrapper<BanPerson, BanPersonResponse>(
HttpType.Post, HttpType.Post,
"/user/ban", "/user/ban",
form, form,
@ -1052,7 +1065,7 @@ export class LemmyHttp {
* `HTTP.POST /user/block` * `HTTP.POST /user/block`
*/ */
blockPerson(form: BlockPerson) { blockPerson(form: BlockPerson) {
return this.#wrapper<BlockPerson, SuccessResponse>( return this.#wrapper<BlockPerson, BlockPersonResponse>(
HttpType.Post, HttpType.Post,
"/user/block", "/user/block",
form, form,
@ -1078,7 +1091,7 @@ export class LemmyHttp {
* `HTTP.POST /user/delete_account` * `HTTP.POST /user/delete_account`
*/ */
deleteAccount(form: DeleteAccount) { deleteAccount(form: DeleteAccount) {
return this.#wrapper<DeleteAccount, SuccessResponse>( return this.#wrapper<DeleteAccount, DeleteAccountResponse>(
HttpType.Post, HttpType.Post,
"/user/delete_account", "/user/delete_account",
form, form,
@ -1091,7 +1104,7 @@ export class LemmyHttp {
* `HTTP.POST /user/password_reset` * `HTTP.POST /user/password_reset`
*/ */
passwordReset(form: PasswordReset) { passwordReset(form: PasswordReset) {
return this.#wrapper<PasswordReset, SuccessResponse>( return this.#wrapper<PasswordReset, PasswordResetResponse>(
HttpType.Post, HttpType.Post,
"/user/password_reset", "/user/password_reset",
form, form,
@ -1182,7 +1195,7 @@ export class LemmyHttp {
* `HTTP.POST /user/verify_email` * `HTTP.POST /user/verify_email`
*/ */
verifyEmail(form: VerifyEmail) { verifyEmail(form: VerifyEmail) {
return this.#wrapper<VerifyEmail, SuccessResponse>( return this.#wrapper<VerifyEmail, VerifyEmailResponse>(
HttpType.Post, HttpType.Post,
"/user/verify_email", "/user/verify_email",
form, form,
@ -1195,7 +1208,7 @@ export class LemmyHttp {
* `HTTP.POST /admin/add` * `HTTP.POST /admin/add`
*/ */
addAdmin(form: AddAdmin) { addAdmin(form: AddAdmin) {
return this.#wrapper<AddAdmin, SuccessResponse>( return this.#wrapper<AddAdmin, AddAdminResponse>(
HttpType.Post, HttpType.Post,
"/admin/add", "/admin/add",
form, form,
@ -1245,7 +1258,7 @@ export class LemmyHttp {
* `HTTP.POST /admin/purge/person` * `HTTP.POST /admin/purge/person`
*/ */
purgePerson(form: PurgePerson) { purgePerson(form: PurgePerson) {
return this.#wrapper<PurgePerson, SuccessResponse>( return this.#wrapper<PurgePerson, PurgeItemResponse>(
HttpType.Post, HttpType.Post,
"/admin/purge/person", "/admin/purge/person",
form, form,
@ -1258,7 +1271,7 @@ export class LemmyHttp {
* `HTTP.POST /admin/purge/community` * `HTTP.POST /admin/purge/community`
*/ */
purgeCommunity(form: PurgeCommunity) { purgeCommunity(form: PurgeCommunity) {
return this.#wrapper<PurgeCommunity, SuccessResponse>( return this.#wrapper<PurgeCommunity, PurgeItemResponse>(
HttpType.Post, HttpType.Post,
"/admin/purge/community", "/admin/purge/community",
form, form,
@ -1271,7 +1284,7 @@ export class LemmyHttp {
* `HTTP.POST /admin/purge/post` * `HTTP.POST /admin/purge/post`
*/ */
purgePost(form: PurgePost) { purgePost(form: PurgePost) {
return this.#wrapper<PurgePost, SuccessResponse>( return this.#wrapper<PurgePost, PurgeItemResponse>(
HttpType.Post, HttpType.Post,
"/admin/purge/post", "/admin/purge/post",
form, form,
@ -1284,7 +1297,7 @@ export class LemmyHttp {
* `HTTP.POST /admin/purge/comment` * `HTTP.POST /admin/purge/comment`
*/ */
purgeComment(form: PurgeComment) { purgeComment(form: PurgeComment) {
return this.#wrapper<PurgeComment, SuccessResponse>( return this.#wrapper<PurgeComment, PurgeItemResponse>(
HttpType.Post, HttpType.Post,
"/admin/purge/comment", "/admin/purge/comment",
form, form,
@ -1323,7 +1336,7 @@ export class LemmyHttp {
* `HTTP.Post /custom_emoji/delete` * `HTTP.Post /custom_emoji/delete`
*/ */
deleteCustomEmoji(form: DeleteCustomEmoji) { deleteCustomEmoji(form: DeleteCustomEmoji) {
return this.#wrapper<DeleteCustomEmoji, SuccessResponse>( return this.#wrapper<DeleteCustomEmoji, DeleteCustomEmojiResponse>(
HttpType.Post, HttpType.Post,
"/custom_emoji/delete", "/custom_emoji/delete",
form, form,
@ -1349,7 +1362,7 @@ export class LemmyHttp {
* `HTTP.Post /site/block` * `HTTP.Post /site/block`
*/ */
blockInstance(form: BlockInstance) { blockInstance(form: BlockInstance) {
return this.#wrapper<BlockInstance, SuccessResponse>( return this.#wrapper<BlockInstance, BlockInstanceResponse>(
HttpType.Post, HttpType.Post,
"/site/block", "/site/block",
form, form,

View file

@ -1,6 +1,8 @@
export * from "./http"; export * from "./http";
export { AddAdmin } from "./types/AddAdmin"; export { AddAdmin } from "./types/AddAdmin";
export { AddAdminResponse } from "./types/AddAdminResponse";
export { AddModToCommunity } from "./types/AddModToCommunity"; export { AddModToCommunity } from "./types/AddModToCommunity";
export { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
export { AdminPurgeComment } from "./types/AdminPurgeComment"; export { AdminPurgeComment } from "./types/AdminPurgeComment";
export { AdminPurgeCommentView } from "./types/AdminPurgeCommentView"; export { AdminPurgeCommentView } from "./types/AdminPurgeCommentView";
export { AdminPurgeCommunity } from "./types/AdminPurgeCommunity"; export { AdminPurgeCommunity } from "./types/AdminPurgeCommunity";
@ -11,11 +13,16 @@ export { AdminPurgePost } from "./types/AdminPurgePost";
export { AdminPurgePostView } from "./types/AdminPurgePostView"; export { AdminPurgePostView } from "./types/AdminPurgePostView";
export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication"; export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
export { BanFromCommunity } from "./types/BanFromCommunity"; export { BanFromCommunity } from "./types/BanFromCommunity";
export { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
export { BanPerson } from "./types/BanPerson"; export { BanPerson } from "./types/BanPerson";
export { BanPersonResponse } from "./types/BanPersonResponse";
export { BannedPersonsResponse } from "./types/BannedPersonsResponse"; export { BannedPersonsResponse } from "./types/BannedPersonsResponse";
export { BlockCommunity } from "./types/BlockCommunity"; export { BlockCommunity } from "./types/BlockCommunity";
export { BlockCommunityResponse } from "./types/BlockCommunityResponse";
export { BlockInstance } from "./types/BlockInstance"; export { BlockInstance } from "./types/BlockInstance";
export { BlockInstanceResponse } from "./types/BlockInstanceResponse";
export { BlockPerson } from "./types/BlockPerson"; export { BlockPerson } from "./types/BlockPerson";
export { BlockPersonResponse } from "./types/BlockPersonResponse";
export { CaptchaResponse } from "./types/CaptchaResponse"; export { CaptchaResponse } from "./types/CaptchaResponse";
export { ChangePassword } from "./types/ChangePassword"; export { ChangePassword } from "./types/ChangePassword";
export { Comment } from "./types/Comment"; export { Comment } from "./types/Comment";
@ -23,6 +30,7 @@ export { CommentAggregates } from "./types/CommentAggregates";
export { CommentId } from "./types/CommentId"; export { CommentId } from "./types/CommentId";
export { CommentReply } from "./types/CommentReply"; export { CommentReply } from "./types/CommentReply";
export { CommentReplyId } from "./types/CommentReplyId"; export { CommentReplyId } from "./types/CommentReplyId";
export { CommentReplyResponse } from "./types/CommentReplyResponse";
export { CommentReplyView } from "./types/CommentReplyView"; export { CommentReplyView } from "./types/CommentReplyView";
export { CommentReport } from "./types/CommentReport"; export { CommentReport } from "./types/CommentReport";
export { CommentReportId } from "./types/CommentReportId"; export { CommentReportId } from "./types/CommentReportId";
@ -57,9 +65,11 @@ export { CustomEmojiKeyword } from "./types/CustomEmojiKeyword";
export { CustomEmojiResponse } from "./types/CustomEmojiResponse"; export { CustomEmojiResponse } from "./types/CustomEmojiResponse";
export { CustomEmojiView } from "./types/CustomEmojiView"; export { CustomEmojiView } from "./types/CustomEmojiView";
export { DeleteAccount } from "./types/DeleteAccount"; export { DeleteAccount } from "./types/DeleteAccount";
export { DeleteAccountResponse } from "./types/DeleteAccountResponse";
export { DeleteComment } from "./types/DeleteComment"; export { DeleteComment } from "./types/DeleteComment";
export { DeleteCommunity } from "./types/DeleteCommunity"; export { DeleteCommunity } from "./types/DeleteCommunity";
export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji"; export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
export { DeleteCustomEmojiResponse } from "./types/DeleteCustomEmojiResponse";
export { DeletePost } from "./types/DeletePost"; export { DeletePost } from "./types/DeletePost";
export { DeletePrivateMessage } from "./types/DeletePrivateMessage"; export { DeletePrivateMessage } from "./types/DeletePrivateMessage";
export { DistinguishComment } from "./types/DistinguishComment"; export { DistinguishComment } from "./types/DistinguishComment";
@ -162,6 +172,7 @@ export { MyUserInfo } from "./types/MyUserInfo";
export { PaginationCursor } from "./types/PaginationCursor"; export { PaginationCursor } from "./types/PaginationCursor";
export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset"; export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
export { PasswordReset } from "./types/PasswordReset"; export { PasswordReset } from "./types/PasswordReset";
export { PasswordResetResponse } from "./types/PasswordResetResponse";
export { Person } from "./types/Person"; export { Person } from "./types/Person";
export { PersonAggregates } from "./types/PersonAggregates"; export { PersonAggregates } from "./types/PersonAggregates";
export { PersonBlockId } from "./types/PersonBlockId"; export { PersonBlockId } from "./types/PersonBlockId";
@ -171,6 +182,7 @@ export { PersonMention } from "./types/PersonMention";
export { PersonMentionId } from "./types/PersonMentionId"; export { PersonMentionId } from "./types/PersonMentionId";
export { PersonMentionResponse } from "./types/PersonMentionResponse"; export { PersonMentionResponse } from "./types/PersonMentionResponse";
export { PersonMentionView } from "./types/PersonMentionView"; export { PersonMentionView } from "./types/PersonMentionView";
export { PersonSortType } from "./types/PersonSortType";
export { PersonView } from "./types/PersonView"; export { PersonView } from "./types/PersonView";
export { Post } from "./types/Post"; export { Post } from "./types/Post";
export { PostAggregates } from "./types/PostAggregates"; export { PostAggregates } from "./types/PostAggregates";
@ -194,6 +206,7 @@ export { PrivateMessageView } from "./types/PrivateMessageView";
export { PrivateMessagesResponse } from "./types/PrivateMessagesResponse"; export { PrivateMessagesResponse } from "./types/PrivateMessagesResponse";
export { PurgeComment } from "./types/PurgeComment"; export { PurgeComment } from "./types/PurgeComment";
export { PurgeCommunity } from "./types/PurgeCommunity"; export { PurgeCommunity } from "./types/PurgeCommunity";
export { PurgeItemResponse } from "./types/PurgeItemResponse";
export { PurgePerson } from "./types/PurgePerson"; export { PurgePerson } from "./types/PurgePerson";
export { PurgePost } from "./types/PurgePost"; export { PurgePost } from "./types/PurgePost";
export { Register } from "./types/Register"; export { Register } from "./types/Register";
@ -229,6 +242,7 @@ export { TransferCommunity } from "./types/TransferCommunity";
export { UpdateTotp } from "./types/UpdateTotp"; export { UpdateTotp } from "./types/UpdateTotp";
export { UpdateTotpResponse } from "./types/UpdateTotpResponse"; export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
export { VerifyEmail } from "./types/VerifyEmail"; export { VerifyEmail } from "./types/VerifyEmail";
export { VerifyEmailResponse } from "./types/VerifyEmailResponse";
export { export {
UploadImage, UploadImage,
UploadImageResponse, UploadImageResponse,

View file

@ -0,0 +1,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PersonView } from "./PersonView";
export interface AddAdminResponse {
admins: Array<PersonView>;
}

View file

@ -0,0 +1,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { CommunityModeratorView } from "./CommunityModeratorView";
export interface AddModToCommunityResponse {
moderators: Array<CommunityModeratorView>;
}

View file

@ -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 { PersonView } from "./PersonView";
export interface BanFromCommunityResponse {
person_view: PersonView;
banned: boolean;
}

View file

@ -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 { PersonView } from "./PersonView";
export interface BanPersonResponse {
person_view: PersonView;
banned: boolean;
}

View file

@ -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 { CommunityView } from "./CommunityView";
export interface BlockCommunityResponse {
community_view: CommunityView;
blocked: boolean;
}

View file

@ -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 BlockInstanceResponse {
blocked: boolean;
}

View file

@ -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 { PersonView } from "./PersonView";
export interface BlockPersonResponse {
person_view: PersonView;
blocked: boolean;
}

View file

@ -0,0 +1,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { CommentReplyView } from "./CommentReplyView";
export interface CommentReplyResponse {
comment_reply_view: CommentReplyView;
}

View file

@ -0,0 +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 = Record<string, never>;

View file

@ -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 { CustomEmojiId } from "./CustomEmojiId";
export interface DeleteCustomEmojiResponse {
id: CustomEmojiId;
success: boolean;
}

View file

@ -1,151 +1,139 @@
// 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.
export type LemmyErrorType = export type LemmyErrorType =
| { error: "report_reason_required" } | { error_type: "ReportReasonRequired" }
| { error: "report_too_long" } | { error_type: "ReportTooLong" }
| { error: "not_a_moderator" } | { error_type: "NotAModerator" }
| { error: "not_an_admin" } | { error_type: "NotAnAdmin" }
| { error: "cant_block_yourself" } | { error_type: "CannotBlockYourself" }
| { error: "cant_block_admin" } | { error_type: "CannotBlockAdmin" }
| { error: "couldnt_update_user" } | { error_type: "CouldNotUpdateUser" }
| { error: "passwords_do_not_match" } | { error_type: "PasswordsDoNotMatch" }
| { error: "email_not_verified" } | { error_type: "PasswordIncorrect" }
| { error: "email_required" } | { error_type: "EmailNotVerified" }
| { error: "couldnt_update_comment" } | { error_type: "EmailRequired" }
| { error: "couldnt_update_private_message" } | { error_type: "CouldNotUpdateComment" }
| { error: "cannot_leave_admin" } | { error_type: "CouldNotUpdatePrivateMessage" }
| { error: "no_lines_in_html" } | { error_type: "CannotLeaveAdmin" }
| { error: "site_metadata_page_is_not_doctype_html" } | { error_type: "NoLinesInHtml" }
| { error: "pictrs_response_error"; message: string } | { error_type: "SiteMetadataPageIsNotDoctypeHtml" }
| { error: "pictrs_purge_response_error"; message: string } | { error_type: "PictrsResponseError"; message: string }
| { error: "pictrs_caching_disabled" } | { error_type: "PictrsPurgeResponseError"; message: string }
| { error: "image_url_missing_path_segments" } | { error_type: "ImageUrlMissingPathSegments" }
| { error: "image_url_missing_last_path_segment" } | { error_type: "ImageUrlMissingLastPathSegment" }
| { error: "pictrs_api_key_not_provided" } | { error_type: "PictrsApiKeyNotProvided" }
| { error: "no_content_type_header" } | { error_type: "NoContentTypeHeader" }
| { error: "not_an_image_type" } | { error_type: "NotAnImageType" }
| { error: "not_a_mod_or_admin" } | { error_type: "NotAModOrAdmin" }
| { error: "no_admins" } | { error_type: "NoAdmins" }
| { error: "not_top_admin" } | { error_type: "NotTopAdmin" }
| { error: "not_top_mod" } | { error_type: "NotTopMod" }
| { error: "not_logged_in" } | { error_type: "NotLoggedIn" }
| { error: "site_ban" } | { error_type: "SiteBan" }
| { error: "deleted" } | { error_type: "Deleted" }
| { error: "banned_from_community" } | { error_type: "BannedFromCommunity" }
| { error: "couldnt_find_community" } | { error_type: "CouldNotFindCommunity" }
| { error: "couldnt_find_person" } | { error_type: "PersonIsBlocked" }
| { error: "person_is_blocked" } | { error_type: "DownvotesAreDisabled" }
| { error: "downvotes_are_disabled" } | { error_type: "InstanceIsPrivate" }
| { error: "instance_is_private" } | { error_type: "InvalidPassword" }
| { error: "invalid_password" } | { error_type: "SiteDescriptionLengthOverflow" }
| { error: "site_description_length_overflow" } | { error_type: "HoneypotFailed" }
| { error: "honeypot_failed" } | { error_type: "RegistrationApplicationIsPending" }
| { error: "registration_application_is_pending" } | { error_type: "PrivateInstanceCannotHaveFederationEnabled" }
| { error: "cant_enable_private_instance_and_federation_together" } | { error_type: "Locked" }
| { error: "locked" } | { error_type: "CouldNotCreateComment" }
| { error: "couldnt_create_comment" } | { error_type: "MaxCommentDepthReached" }
| { error: "max_comment_depth_reached" } | { error_type: "EditCommentNotAllowed" }
| { error: "no_comment_edit_allowed" } | { error_type: "OnlyAdminsCanCreateCommunities" }
| { error: "only_admins_can_create_communities" } | { error_type: "CommunityAlreadyExists" }
| { error: "community_already_exists" } | { error_type: "LanguageNotAllowed" }
| { error: "language_not_allowed" } | { error_type: "OnlyModsCanPostInCommunity" }
| { error: "only_mods_can_post_in_community" } | { error_type: "CouldNotUpdatePost" }
| { error: "couldnt_update_post" } | { error_type: "EditPostNotAllowed" }
| { error: "no_post_edit_allowed" } | { error_type: "CouldNotFindPost" }
| { error: "couldnt_find_post" } | { error_type: "EditPrivateMessageNotAllowed" }
| { error: "edit_private_message_not_allowed" } | { error_type: "SiteAlreadyExists" }
| { error: "site_already_exists" } | { error_type: "ApplicationQuestionRequired" }
| { error: "application_question_required" } | { error_type: "InvalidDefaultPostListingType" }
| { error: "invalid_default_post_listing_type" } | { error_type: "RegistrationClosed" }
| { error: "registration_closed" } | { error_type: "RegistrationApplicationAnswerRequired" }
| { error: "registration_application_answer_required" } | { error_type: "EmailAlreadyExists" }
| { error: "email_already_exists" } | { error_type: "FederationError"; message: string }
| { error: "federation_forbidden_by_strict_allow_list" } | { error_type: "FederationForbiddenByStrictAllowList" }
| { error: "person_is_banned_from_community" } | { error_type: "PersonIsBannedFromCommunity" }
| { error: "object_is_not_public" } | { error_type: "ObjectIsNotPublic" }
| { error: "invalid_community" } | { error_type: "InvalidCommunity" }
| { error: "cannot_create_post_or_comment_in_deleted_or_removed_community" } | { error_type: "CannotCreatePostOrCommentInDeletedOrRemovedCommunity" }
| { error: "cannot_receive_page" } | { error_type: "CannotReceivePage" }
| { error: "new_post_cannot_be_locked" } | { error_type: "NewPostCannotBeLocked" }
| { error: "only_local_admin_can_remove_community" } | { error_type: "OnlyLocalAdminCanRemoveCommunity" }
| { error: "only_local_admin_can_restore_community" } | { error_type: "OnlyLocalAdminCanRestoreCommunity" }
| { error: "no_id_given" } | { error_type: "NoIdGiven" }
| { error: "incorrect_login" } | { error_type: "CouldNotFindUsernameOrEmail" }
| { error: "invalid_query" } | { error_type: "InvalidQuery" }
| { error: "object_not_local" } | { error_type: "ObjectNotLocal" }
| { error: "post_is_locked" } | { error_type: "PostIsLocked" }
| { error: "person_is_banned_from_site"; message: string } | { error_type: "PersonIsBannedFromSite" }
| { error: "invalid_vote_value" } | { error_type: "InvalidVoteValue" }
| { error: "page_does_not_specify_creator" } | { error_type: "PageDoesNotSpecifyCreator" }
| { error: "page_does_not_specify_group" } | { error_type: "PageDoesNotSpecifyGroup" }
| { error: "no_community_found_in_cc" } | { error_type: "NoCommunityFoundInCC" }
| { error: "no_email_setup" } | { error_type: "NoEmailSetup" }
| { error: "email_smtp_server_needs_a_port" } | { error_type: "EmailSmtpServerNeedsAPort" }
| { error: "missing_an_email" } | { error_type: "MissingAnEmail" }
| { error: "rate_limit_error" } | { error_type: "RateLimitError" }
| { error: "invalid_name" } | { error_type: "InvalidName" }
| { error: "invalid_display_name" } | { error_type: "InvalidDisplayName" }
| { error: "invalid_matrix_id" } | { error_type: "InvalidMatrixId" }
| { error: "invalid_post_title" } | { error_type: "InvalidPostTitle" }
| { error: "invalid_body_field" } | { error_type: "InvalidBodyField" }
| { error: "bio_length_overflow" } | { error_type: "BioLengthOverflow" }
| { error: "missing_totp_token" } | { error_type: "MissingTotpToken" }
| { error: "missing_totp_secret" } | { error_type: "IncorrectTotpToken" }
| { error: "incorrect_totp_token" } | { error_type: "CouldNotParseTotpSecret" }
| { error: "couldnt_parse_totp_secret" } | { error_type: "CouldNotLikeComment" }
| { error: "couldnt_generate_totp" } | { error_type: "CouldNotSaveComment" }
| { error: "totp_already_enabled" } | { error_type: "CouldNotCreateReport" }
| { error: "couldnt_like_comment" } | { error_type: "CouldNotResolveReport" }
| { error: "couldnt_save_comment" } | { error_type: "CommunityModeratorAlreadyExists" }
| { error: "couldnt_create_report" } | { error_type: "CommunityUserIsAlreadyBanned" }
| { error: "couldnt_resolve_report" } | { error_type: "CommunityBlockAlreadyExists" }
| { error: "community_moderator_already_exists" } | { error_type: "CommunityFollowerAlreadyExists" }
| { error: "community_user_already_banned" } | { error_type: "CouldNotUpdateCommunityHiddenStatus" }
| { error: "community_block_already_exists" } | { error_type: "PersonBlockAlreadyExists" }
| { error: "community_follower_already_exists" } | { error_type: "UserAlreadyExists" }
| { error: "couldnt_update_community_hidden_status" } | { error_type: "TokenNotFound" }
| { error: "person_block_already_exists" } | { error_type: "CouldNotLikePost" }
| { error: "user_already_exists" } | { error_type: "CouldNotSavePost" }
| { error: "token_not_found" } | { error_type: "CouldNotMarkPostAsRead" }
| { error: "couldnt_like_post" } | { error_type: "CouldNotUpdateCommunity" }
| { error: "couldnt_save_post" } | { error_type: "CouldNotUpdateReplies" }
| { error: "couldnt_mark_post_as_read" } | { error_type: "CouldNotUpdatePersonMentions" }
| { error: "couldnt_update_community" } | { error_type: "PostTitleTooLong" }
| { error: "couldnt_update_replies" } | { error_type: "CouldNotCreatePost" }
| { error: "couldnt_update_person_mentions" } | { error_type: "CouldNotCreatePrivateMessage" }
| { error: "post_title_too_long" } | { error_type: "CouldNotUpdatePrivate" }
| { error: "couldnt_create_post" } | { error_type: "SystemErrLogin" }
| { error: "couldnt_create_private_message" } | { error_type: "CouldNotSetAllRegistrationsAccepted" }
| { error: "couldnt_update_private" } | { error_type: "CouldNotSetAllEmailVerified" }
| { error: "system_err_login" } | { error_type: "Banned" }
| { error: "couldnt_set_all_registrations_accepted" } | { error_type: "CouldNotGetComments" }
| { error: "couldnt_set_all_email_verified" } | { error_type: "CouldNotGetPosts" }
| { error: "banned" } | { error_type: "InvalidUrl" }
| { error: "couldnt_get_comments" } | { error_type: "EmailSendFailed" }
| { error: "couldnt_get_posts" } | { error_type: "Slurs" }
| { error: "invalid_url" } | { error_type: "CouldNotGenerateTotp" }
| { error: "email_send_failed" } | { error_type: "CouldNotFindObject" }
| { error: "slurs" } | { error_type: "RegistrationDenied"; message: string }
| { error: "couldnt_find_object" } | { error_type: "FederationDisabled" }
| { error: "registration_denied"; message: string | null } | { error_type: "DomainBlocked" }
| { error: "federation_disabled" } | { error_type: "DomainNotInAllowList" }
| { error: "domain_blocked"; message: string } | { error_type: "FederationDisabledByStrictAllowList" }
| { error: "domain_not_in_allow_list"; message: string } | { error_type: "SiteNameRequired" }
| { error: "federation_disabled_by_strict_allow_list" } | { error_type: "SiteNameLengthOverflow" }
| { error: "site_name_required" } | { error_type: "PermissiveRegex" }
| { error: "site_name_length_overflow" } | { error_type: "InvalidRegex" }
| { error: "permissive_regex" } | { error_type: "CaptchaIncorrect" }
| { error: "invalid_regex" } | { error_type: "PasswordResetLimitReached" }
| { error: "captcha_incorrect" } | { error_type: "CouldNotCreateAudioCaptcha" };
| { error: "password_reset_limit_reached" }
| { error: "couldnt_create_audio_captcha" }
| { error: "invalid_url_scheme" }
| { error: "couldnt_send_webmention" }
| { error: "contradicting_filters" }
| { error: "instance_block_already_exists" }
| { error: "auth_cookie_insecure" }
| { error: "too_many_items" }
| { error: "community_has_no_followers" }
| { error: "ban_expiration_in_past" }
| { error: "invalid_unix_time" }
| { error: "unknown"; message: string };

View file

@ -0,0 +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 = Record<string, never>;

View file

@ -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";

View file

@ -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 PurgeItemResponse {
success: boolean;
}

View file

@ -0,0 +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 = Record<string, never>;