mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-25 22:01:12 +00:00
Fix other successResponses (#204)
* Fix other successResponses * Remove remnants --------- Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
This commit is contained in:
parent
6c7030cb13
commit
e65588ae3e
7 changed files with 11 additions and 42 deletions
27
src/http.ts
27
src/http.ts
|
@ -32,11 +32,9 @@ import { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
|
|||
import { CreateSite } from "./types/CreateSite";
|
||||
import { CustomEmojiResponse } from "./types/CustomEmojiResponse";
|
||||
import { DeleteAccount } from "./types/DeleteAccount";
|
||||
import { DeleteAccountResponse } from "./types/DeleteAccountResponse";
|
||||
import { DeleteComment } from "./types/DeleteComment";
|
||||
import { DeleteCommunity } from "./types/DeleteCommunity";
|
||||
import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
||||
import { DeleteCustomEmojiResponse } from "./types/DeleteCustomEmojiResponse";
|
||||
import { DeletePost } from "./types/DeletePost";
|
||||
import { DeletePrivateMessage } from "./types/DeletePrivateMessage";
|
||||
import { DistinguishComment } from "./types/DistinguishComment";
|
||||
|
@ -94,7 +92,6 @@ import { MarkPostAsRead } from "./types/MarkPostAsRead";
|
|||
import { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";
|
||||
import { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
||||
import { PasswordReset } from "./types/PasswordReset";
|
||||
import { PasswordResetResponse } from "./types/PasswordResetResponse";
|
||||
import { PersonMentionResponse } from "./types/PersonMentionResponse";
|
||||
import { PostReportResponse } from "./types/PostReportResponse";
|
||||
import { PostResponse } from "./types/PostResponse";
|
||||
|
@ -103,7 +100,6 @@ import { PrivateMessageResponse } from "./types/PrivateMessageResponse";
|
|||
import { PrivateMessagesResponse } from "./types/PrivateMessagesResponse";
|
||||
import { PurgeComment } from "./types/PurgeComment";
|
||||
import { PurgeCommunity } from "./types/PurgeCommunity";
|
||||
import { PurgeItemResponse } from "./types/PurgeItemResponse";
|
||||
import { PurgePerson } from "./types/PurgePerson";
|
||||
import { PurgePost } from "./types/PurgePost";
|
||||
import { Register } from "./types/Register";
|
||||
|
@ -124,7 +120,6 @@ import { SearchResponse } from "./types/SearchResponse";
|
|||
import { SiteResponse } from "./types/SiteResponse";
|
||||
import { TransferCommunity } from "./types/TransferCommunity";
|
||||
import { VerifyEmail } from "./types/VerifyEmail";
|
||||
import { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
||||
import {
|
||||
DeleteImage,
|
||||
UploadImage,
|
||||
|
@ -439,7 +434,7 @@ export class LemmyHttp {
|
|||
* `HTTP.PUT /community/hide`
|
||||
*/
|
||||
hideCommunity(form: HideCommunity) {
|
||||
return this.#wrapper<HideCommunity, CommunityResponse>(
|
||||
return this.#wrapper<HideCommunity, SuccessResponse>(
|
||||
HttpType.Put,
|
||||
"/community/hide",
|
||||
form,
|
||||
|
@ -1091,7 +1086,7 @@ export class LemmyHttp {
|
|||
* `HTTP.POST /user/delete_account`
|
||||
*/
|
||||
deleteAccount(form: DeleteAccount) {
|
||||
return this.#wrapper<DeleteAccount, DeleteAccountResponse>(
|
||||
return this.#wrapper<DeleteAccount, SuccessResponse>(
|
||||
HttpType.Post,
|
||||
"/user/delete_account",
|
||||
form,
|
||||
|
@ -1104,7 +1099,7 @@ export class LemmyHttp {
|
|||
* `HTTP.POST /user/password_reset`
|
||||
*/
|
||||
passwordReset(form: PasswordReset) {
|
||||
return this.#wrapper<PasswordReset, PasswordResetResponse>(
|
||||
return this.#wrapper<PasswordReset, SuccessResponse>(
|
||||
HttpType.Post,
|
||||
"/user/password_reset",
|
||||
form,
|
||||
|
@ -1117,7 +1112,7 @@ export class LemmyHttp {
|
|||
* `HTTP.POST /user/password_change`
|
||||
*/
|
||||
passwordChangeAfterReset(form: PasswordChangeAfterReset) {
|
||||
return this.#wrapper<PasswordChangeAfterReset, LoginResponse>(
|
||||
return this.#wrapper<PasswordChangeAfterReset, SuccessResponse>(
|
||||
HttpType.Post,
|
||||
"/user/password_change",
|
||||
form,
|
||||
|
@ -1143,7 +1138,7 @@ export class LemmyHttp {
|
|||
* `HTTP.PUT /user/save_user_settings`
|
||||
*/
|
||||
saveUserSettings(form: SaveUserSettings) {
|
||||
return this.#wrapper<SaveUserSettings, LoginResponse>(
|
||||
return this.#wrapper<SaveUserSettings, SuccessResponse>(
|
||||
HttpType.Put,
|
||||
"/user/save_user_settings",
|
||||
form,
|
||||
|
@ -1195,7 +1190,7 @@ export class LemmyHttp {
|
|||
* `HTTP.POST /user/verify_email`
|
||||
*/
|
||||
verifyEmail(form: VerifyEmail) {
|
||||
return this.#wrapper<VerifyEmail, VerifyEmailResponse>(
|
||||
return this.#wrapper<VerifyEmail, SuccessResponse>(
|
||||
HttpType.Post,
|
||||
"/user/verify_email",
|
||||
form,
|
||||
|
@ -1258,7 +1253,7 @@ export class LemmyHttp {
|
|||
* `HTTP.POST /admin/purge/person`
|
||||
*/
|
||||
purgePerson(form: PurgePerson) {
|
||||
return this.#wrapper<PurgePerson, PurgeItemResponse>(
|
||||
return this.#wrapper<PurgePerson, SuccessResponse>(
|
||||
HttpType.Post,
|
||||
"/admin/purge/person",
|
||||
form,
|
||||
|
@ -1271,7 +1266,7 @@ export class LemmyHttp {
|
|||
* `HTTP.POST /admin/purge/community`
|
||||
*/
|
||||
purgeCommunity(form: PurgeCommunity) {
|
||||
return this.#wrapper<PurgeCommunity, PurgeItemResponse>(
|
||||
return this.#wrapper<PurgeCommunity, SuccessResponse>(
|
||||
HttpType.Post,
|
||||
"/admin/purge/community",
|
||||
form,
|
||||
|
@ -1284,7 +1279,7 @@ export class LemmyHttp {
|
|||
* `HTTP.POST /admin/purge/post`
|
||||
*/
|
||||
purgePost(form: PurgePost) {
|
||||
return this.#wrapper<PurgePost, PurgeItemResponse>(
|
||||
return this.#wrapper<PurgePost, SuccessResponse>(
|
||||
HttpType.Post,
|
||||
"/admin/purge/post",
|
||||
form,
|
||||
|
@ -1297,7 +1292,7 @@ export class LemmyHttp {
|
|||
* `HTTP.POST /admin/purge/comment`
|
||||
*/
|
||||
purgeComment(form: PurgeComment) {
|
||||
return this.#wrapper<PurgeComment, PurgeItemResponse>(
|
||||
return this.#wrapper<PurgeComment, SuccessResponse>(
|
||||
HttpType.Post,
|
||||
"/admin/purge/comment",
|
||||
form,
|
||||
|
@ -1336,7 +1331,7 @@ export class LemmyHttp {
|
|||
* `HTTP.Post /custom_emoji/delete`
|
||||
*/
|
||||
deleteCustomEmoji(form: DeleteCustomEmoji) {
|
||||
return this.#wrapper<DeleteCustomEmoji, DeleteCustomEmojiResponse>(
|
||||
return this.#wrapper<DeleteCustomEmoji, SuccessResponse>(
|
||||
HttpType.Post,
|
||||
"/custom_emoji/delete",
|
||||
form,
|
||||
|
|
|
@ -65,11 +65,9 @@ export { CustomEmojiKeyword } from "./types/CustomEmojiKeyword";
|
|||
export { CustomEmojiResponse } from "./types/CustomEmojiResponse";
|
||||
export { CustomEmojiView } from "./types/CustomEmojiView";
|
||||
export { DeleteAccount } from "./types/DeleteAccount";
|
||||
export { DeleteAccountResponse } from "./types/DeleteAccountResponse";
|
||||
export { DeleteComment } from "./types/DeleteComment";
|
||||
export { DeleteCommunity } from "./types/DeleteCommunity";
|
||||
export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
||||
export { DeleteCustomEmojiResponse } from "./types/DeleteCustomEmojiResponse";
|
||||
export { DeletePost } from "./types/DeletePost";
|
||||
export { DeletePrivateMessage } from "./types/DeletePrivateMessage";
|
||||
export { DistinguishComment } from "./types/DistinguishComment";
|
||||
|
@ -172,7 +170,6 @@ 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";
|
||||
export { Person } from "./types/Person";
|
||||
export { PersonAggregates } from "./types/PersonAggregates";
|
||||
export { PersonBlockId } from "./types/PersonBlockId";
|
||||
|
@ -206,7 +203,6 @@ export { PrivateMessageView } from "./types/PrivateMessageView";
|
|||
export { PrivateMessagesResponse } from "./types/PrivateMessagesResponse";
|
||||
export { PurgeComment } from "./types/PurgeComment";
|
||||
export { PurgeCommunity } from "./types/PurgeCommunity";
|
||||
export { PurgeItemResponse } from "./types/PurgeItemResponse";
|
||||
export { PurgePerson } from "./types/PurgePerson";
|
||||
export { PurgePost } from "./types/PurgePost";
|
||||
export { Register } from "./types/Register";
|
||||
|
@ -242,7 +238,6 @@ export { TransferCommunity } from "./types/TransferCommunity";
|
|||
export { UpdateTotp } from "./types/UpdateTotp";
|
||||
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
||||
export { VerifyEmail } from "./types/VerifyEmail";
|
||||
export { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
||||
export {
|
||||
UploadImage,
|
||||
UploadImageResponse,
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
// 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>;
|
|
@ -1,7 +0,0 @@
|
|||
// 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;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
// 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>;
|
|
@ -1,5 +0,0 @@
|
|||
// 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;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
// 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>;
|
Loading…
Reference in a new issue