mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-29 15:51: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 { 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";
|
||||||
|
@ -94,7 +92,6 @@ 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";
|
||||||
|
@ -103,7 +100,6 @@ 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";
|
||||||
|
@ -124,7 +120,6 @@ 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,
|
||||||
|
@ -439,7 +434,7 @@ export class LemmyHttp {
|
||||||
* `HTTP.PUT /community/hide`
|
* `HTTP.PUT /community/hide`
|
||||||
*/
|
*/
|
||||||
hideCommunity(form: HideCommunity) {
|
hideCommunity(form: HideCommunity) {
|
||||||
return this.#wrapper<HideCommunity, CommunityResponse>(
|
return this.#wrapper<HideCommunity, SuccessResponse>(
|
||||||
HttpType.Put,
|
HttpType.Put,
|
||||||
"/community/hide",
|
"/community/hide",
|
||||||
form,
|
form,
|
||||||
|
@ -1091,7 +1086,7 @@ export class LemmyHttp {
|
||||||
* `HTTP.POST /user/delete_account`
|
* `HTTP.POST /user/delete_account`
|
||||||
*/
|
*/
|
||||||
deleteAccount(form: DeleteAccount) {
|
deleteAccount(form: DeleteAccount) {
|
||||||
return this.#wrapper<DeleteAccount, DeleteAccountResponse>(
|
return this.#wrapper<DeleteAccount, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/delete_account",
|
"/user/delete_account",
|
||||||
form,
|
form,
|
||||||
|
@ -1104,7 +1099,7 @@ export class LemmyHttp {
|
||||||
* `HTTP.POST /user/password_reset`
|
* `HTTP.POST /user/password_reset`
|
||||||
*/
|
*/
|
||||||
passwordReset(form: PasswordReset) {
|
passwordReset(form: PasswordReset) {
|
||||||
return this.#wrapper<PasswordReset, PasswordResetResponse>(
|
return this.#wrapper<PasswordReset, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/password_reset",
|
"/user/password_reset",
|
||||||
form,
|
form,
|
||||||
|
@ -1117,7 +1112,7 @@ export class LemmyHttp {
|
||||||
* `HTTP.POST /user/password_change`
|
* `HTTP.POST /user/password_change`
|
||||||
*/
|
*/
|
||||||
passwordChangeAfterReset(form: PasswordChangeAfterReset) {
|
passwordChangeAfterReset(form: PasswordChangeAfterReset) {
|
||||||
return this.#wrapper<PasswordChangeAfterReset, LoginResponse>(
|
return this.#wrapper<PasswordChangeAfterReset, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/password_change",
|
"/user/password_change",
|
||||||
form,
|
form,
|
||||||
|
@ -1143,7 +1138,7 @@ export class LemmyHttp {
|
||||||
* `HTTP.PUT /user/save_user_settings`
|
* `HTTP.PUT /user/save_user_settings`
|
||||||
*/
|
*/
|
||||||
saveUserSettings(form: SaveUserSettings) {
|
saveUserSettings(form: SaveUserSettings) {
|
||||||
return this.#wrapper<SaveUserSettings, LoginResponse>(
|
return this.#wrapper<SaveUserSettings, SuccessResponse>(
|
||||||
HttpType.Put,
|
HttpType.Put,
|
||||||
"/user/save_user_settings",
|
"/user/save_user_settings",
|
||||||
form,
|
form,
|
||||||
|
@ -1195,7 +1190,7 @@ export class LemmyHttp {
|
||||||
* `HTTP.POST /user/verify_email`
|
* `HTTP.POST /user/verify_email`
|
||||||
*/
|
*/
|
||||||
verifyEmail(form: VerifyEmail) {
|
verifyEmail(form: VerifyEmail) {
|
||||||
return this.#wrapper<VerifyEmail, VerifyEmailResponse>(
|
return this.#wrapper<VerifyEmail, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/verify_email",
|
"/user/verify_email",
|
||||||
form,
|
form,
|
||||||
|
@ -1258,7 +1253,7 @@ export class LemmyHttp {
|
||||||
* `HTTP.POST /admin/purge/person`
|
* `HTTP.POST /admin/purge/person`
|
||||||
*/
|
*/
|
||||||
purgePerson(form: PurgePerson) {
|
purgePerson(form: PurgePerson) {
|
||||||
return this.#wrapper<PurgePerson, PurgeItemResponse>(
|
return this.#wrapper<PurgePerson, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/admin/purge/person",
|
"/admin/purge/person",
|
||||||
form,
|
form,
|
||||||
|
@ -1271,7 +1266,7 @@ export class LemmyHttp {
|
||||||
* `HTTP.POST /admin/purge/community`
|
* `HTTP.POST /admin/purge/community`
|
||||||
*/
|
*/
|
||||||
purgeCommunity(form: PurgeCommunity) {
|
purgeCommunity(form: PurgeCommunity) {
|
||||||
return this.#wrapper<PurgeCommunity, PurgeItemResponse>(
|
return this.#wrapper<PurgeCommunity, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/admin/purge/community",
|
"/admin/purge/community",
|
||||||
form,
|
form,
|
||||||
|
@ -1284,7 +1279,7 @@ export class LemmyHttp {
|
||||||
* `HTTP.POST /admin/purge/post`
|
* `HTTP.POST /admin/purge/post`
|
||||||
*/
|
*/
|
||||||
purgePost(form: PurgePost) {
|
purgePost(form: PurgePost) {
|
||||||
return this.#wrapper<PurgePost, PurgeItemResponse>(
|
return this.#wrapper<PurgePost, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/admin/purge/post",
|
"/admin/purge/post",
|
||||||
form,
|
form,
|
||||||
|
@ -1297,7 +1292,7 @@ export class LemmyHttp {
|
||||||
* `HTTP.POST /admin/purge/comment`
|
* `HTTP.POST /admin/purge/comment`
|
||||||
*/
|
*/
|
||||||
purgeComment(form: PurgeComment) {
|
purgeComment(form: PurgeComment) {
|
||||||
return this.#wrapper<PurgeComment, PurgeItemResponse>(
|
return this.#wrapper<PurgeComment, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/admin/purge/comment",
|
"/admin/purge/comment",
|
||||||
form,
|
form,
|
||||||
|
@ -1336,7 +1331,7 @@ export class LemmyHttp {
|
||||||
* `HTTP.Post /custom_emoji/delete`
|
* `HTTP.Post /custom_emoji/delete`
|
||||||
*/
|
*/
|
||||||
deleteCustomEmoji(form: DeleteCustomEmoji) {
|
deleteCustomEmoji(form: DeleteCustomEmoji) {
|
||||||
return this.#wrapper<DeleteCustomEmoji, DeleteCustomEmojiResponse>(
|
return this.#wrapper<DeleteCustomEmoji, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/custom_emoji/delete",
|
"/custom_emoji/delete",
|
||||||
form,
|
form,
|
||||||
|
|
|
@ -65,11 +65,9 @@ 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";
|
||||||
|
@ -172,7 +170,6 @@ 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";
|
||||||
|
@ -206,7 +203,6 @@ 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";
|
||||||
|
@ -242,7 +238,6 @@ 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,
|
||||||
|
|
|
@ -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