mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2025-02-05 16:34:43 +00:00
parent
ff8c69bc80
commit
034e4a3b5a
1 changed files with 132 additions and 0 deletions
132
src/http.ts
132
src/http.ts
|
@ -196,6 +196,7 @@ import {
|
||||||
UploadedFile,
|
UploadedFile,
|
||||||
Delete,
|
Delete,
|
||||||
Security,
|
Security,
|
||||||
|
Tags,
|
||||||
} from "tsoa";
|
} from "tsoa";
|
||||||
|
|
||||||
enum HttpType {
|
enum HttpType {
|
||||||
|
@ -245,6 +246,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/site")
|
@Get("/site")
|
||||||
|
@Tags("Site")
|
||||||
getSite(@Inject() options?: RequestOptions) {
|
getSite(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GetSiteResponse>(
|
return this.#wrapper<object, GetSiteResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -259,6 +261,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/site")
|
@Post("/site")
|
||||||
|
@Tags("Site")
|
||||||
createSite(@Body() form: CreateSite, @Inject() options?: RequestOptions) {
|
createSite(@Body() form: CreateSite, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<CreateSite, SiteResponse>(
|
return this.#wrapper<CreateSite, SiteResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -273,6 +276,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/site")
|
@Put("/site")
|
||||||
|
@Tags("Site")
|
||||||
editSite(@Body() form: EditSite, @Inject() options?: RequestOptions) {
|
editSite(@Body() form: EditSite, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<EditSite, SiteResponse>(
|
return this.#wrapper<EditSite, SiteResponse>(
|
||||||
HttpType.Put,
|
HttpType.Put,
|
||||||
|
@ -287,6 +291,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/admin/leave")
|
@Post("/admin/leave")
|
||||||
|
@Tags("Admin")
|
||||||
leaveAdmin(@Inject() options?: RequestOptions) {
|
leaveAdmin(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GetSiteResponse>(
|
return this.#wrapper<object, GetSiteResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -303,6 +308,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/auth/totp/generate")
|
@Post("/account/auth/totp/generate")
|
||||||
|
@Tags("Account")
|
||||||
generateTotpSecret(@Inject() options?: RequestOptions) {
|
generateTotpSecret(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GenerateTotpSecretResponse>(
|
return this.#wrapper<object, GenerateTotpSecretResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -317,6 +323,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/account")
|
@Get("/account")
|
||||||
|
@Tags("Account")
|
||||||
getMyUser(@Inject() options?: RequestOptions) {
|
getMyUser(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, MyUserInfo>(
|
return this.#wrapper<object, MyUserInfo>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -332,6 +339,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/account/settings/export")
|
@Get("/account/settings/export")
|
||||||
|
@Tags("Account")
|
||||||
exportSettings(@Inject() options?: RequestOptions) {
|
exportSettings(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, string>(
|
return this.#wrapper<object, string>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -346,6 +354,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/settings/import")
|
@Post("/account/settings/import")
|
||||||
|
@Tags("Account")
|
||||||
importSettings(@Body() form: any, @Inject() options?: RequestOptions) {
|
importSettings(@Body() form: any, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, SuccessResponse>(
|
return this.#wrapper<object, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -360,6 +369,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/account/list_logins")
|
@Get("/account/list_logins")
|
||||||
|
@Tags("Account")
|
||||||
listLogins(@Inject() options?: RequestOptions) {
|
listLogins(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, LoginToken[]>(
|
return this.#wrapper<object, LoginToken[]>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -374,6 +384,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/account/validate_auth")
|
@Get("/account/validate_auth")
|
||||||
|
@Tags("Account")
|
||||||
validateAuth(@Inject() options?: RequestOptions) {
|
validateAuth(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, SuccessResponse>(
|
return this.#wrapper<object, SuccessResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -388,6 +399,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/account/list_media")
|
@Get("/account/list_media")
|
||||||
|
@Tags("Account", "Media")
|
||||||
listMedia(
|
listMedia(
|
||||||
@Queries() form: ListMediaI = {},
|
@Queries() form: ListMediaI = {},
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -405,6 +417,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/admin/list_all_media")
|
@Get("/admin/list_all_media")
|
||||||
|
@Tags("Admin", "Media")
|
||||||
listAllMedia(
|
listAllMedia(
|
||||||
@Queries() form: ListMediaI = {},
|
@Queries() form: ListMediaI = {},
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -427,6 +440,7 @@ export class LemmyHttp extends Controller {
|
||||||
|
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/auth/totp/update")
|
@Post("/account/auth/totp/update")
|
||||||
|
@Tags("Account")
|
||||||
updateTotp(@Body() form: UpdateTotp, @Inject() options?: RequestOptions) {
|
updateTotp(@Body() form: UpdateTotp, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<UpdateTotp, UpdateTotpResponse>(
|
return this.#wrapper<UpdateTotp, UpdateTotpResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -442,6 +456,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/modlog")
|
@Get("/modlog")
|
||||||
|
@Tags("Miscellaneous")
|
||||||
getModlog(
|
getModlog(
|
||||||
@Queries() form: GetModlogI = {},
|
@Queries() form: GetModlogI = {},
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -460,6 +475,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/search")
|
@Get("/search")
|
||||||
|
@Tags("Miscellaneous")
|
||||||
search(@Queries() form: SearchI, @Inject() options?: RequestOptions) {
|
search(@Queries() form: SearchI, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<Search, SearchResponse>(
|
return this.#wrapper<Search, SearchResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -475,6 +491,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/resolve_object")
|
@Get("/resolve_object")
|
||||||
|
@Tags("Miscellaneous")
|
||||||
resolveObject(
|
resolveObject(
|
||||||
@Queries() form: ResolveObjectI,
|
@Queries() form: ResolveObjectI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -492,6 +509,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/community")
|
@Post("/community")
|
||||||
|
@Tags("Community")
|
||||||
createCommunity(
|
createCommunity(
|
||||||
@Body() form: CreateCommunity,
|
@Body() form: CreateCommunity,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -510,6 +528,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/community")
|
@Get("/community")
|
||||||
|
@Tags("Community")
|
||||||
getCommunity(
|
getCommunity(
|
||||||
@Queries() form: GetCommunityI = {},
|
@Queries() form: GetCommunityI = {},
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -527,6 +546,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/community")
|
@Put("/community")
|
||||||
|
@Tags("Community")
|
||||||
editCommunity(
|
editCommunity(
|
||||||
@Body() form: EditCommunity,
|
@Body() form: EditCommunity,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -545,6 +565,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/community/list")
|
@Get("/community/list")
|
||||||
|
@Tags("Community")
|
||||||
listCommunities(
|
listCommunities(
|
||||||
@Queries() form: ListCommunitiesI = {},
|
@Queries() form: ListCommunitiesI = {},
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -562,6 +583,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/community/follow")
|
@Post("/community/follow")
|
||||||
|
@Tags("Community")
|
||||||
followCommunity(
|
followCommunity(
|
||||||
@Body() form: FollowCommunity,
|
@Body() form: FollowCommunity,
|
||||||
@Inject() @Inject() options?: RequestOptions,
|
@Inject() @Inject() options?: RequestOptions,
|
||||||
|
@ -579,6 +601,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/community/pending_follows/count")
|
@Get("/community/pending_follows/count")
|
||||||
|
@Tags("Community")
|
||||||
getCommunityPendingFollowsCount(
|
getCommunityPendingFollowsCount(
|
||||||
@Queries() form: GetCommunityPendingFollowsCountI,
|
@Queries() form: GetCommunityPendingFollowsCountI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -594,6 +617,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/community/pending_follows/list")
|
@Get("/community/pending_follows/list")
|
||||||
|
@Tags("Community")
|
||||||
listCommunityPendingFollows(
|
listCommunityPendingFollows(
|
||||||
@Queries() form: ListCommunityPendingFollowsI,
|
@Queries() form: ListCommunityPendingFollowsI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -609,6 +633,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/community/pending_follows/approve")
|
@Post("/community/pending_follows/approve")
|
||||||
|
@Tags("Community")
|
||||||
approveCommunityPendingFollow(
|
approveCommunityPendingFollow(
|
||||||
@Body() form: ApproveCommunityPendingFollower,
|
@Body() form: ApproveCommunityPendingFollower,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -626,6 +651,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/block/community")
|
@Post("/account/block/community")
|
||||||
|
@Tags("Account", "Community")
|
||||||
blockCommunity(
|
blockCommunity(
|
||||||
@Body() form: BlockCommunity,
|
@Body() form: BlockCommunity,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -643,6 +669,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/community/delete")
|
@Post("/community/delete")
|
||||||
|
@Tags("Community")
|
||||||
deleteCommunity(
|
deleteCommunity(
|
||||||
@Body() form: DeleteCommunity,
|
@Body() form: DeleteCommunity,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -660,6 +687,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/community/hide")
|
@Put("/community/hide")
|
||||||
|
@Tags("Community", "Admin")
|
||||||
hideCommunity(
|
hideCommunity(
|
||||||
@Body() form: HideCommunity,
|
@Body() form: HideCommunity,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -677,6 +705,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/community/remove")
|
@Post("/community/remove")
|
||||||
|
@Tags("Community", "Moderator")
|
||||||
removeCommunity(
|
removeCommunity(
|
||||||
@Body() form: RemoveCommunity,
|
@Body() form: RemoveCommunity,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -694,6 +723,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/community/transfer")
|
@Post("/community/transfer")
|
||||||
|
@Tags("Community", "Moderator")
|
||||||
transferCommunity(
|
transferCommunity(
|
||||||
@Body() form: TransferCommunity,
|
@Body() form: TransferCommunity,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -711,6 +741,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/community/ban_user")
|
@Post("/community/ban_user")
|
||||||
|
@Tags("Community", "Moderator")
|
||||||
banFromCommunity(
|
banFromCommunity(
|
||||||
@Body() form: BanFromCommunity,
|
@Body() form: BanFromCommunity,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -728,6 +759,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/community/mod")
|
@Post("/community/mod")
|
||||||
|
@Tags("Community", "Moderator")
|
||||||
addModToCommunity(
|
addModToCommunity(
|
||||||
@Body() form: AddModToCommunity,
|
@Body() form: AddModToCommunity,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -746,6 +778,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/community/random")
|
@Get("/community/random")
|
||||||
|
@Tags("Community")
|
||||||
getRandomCommunity(
|
getRandomCommunity(
|
||||||
@Queries() form: GetRandomCommunityI,
|
@Queries() form: GetRandomCommunityI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -763,6 +796,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/post")
|
@Post("/post")
|
||||||
|
@Tags("Post")
|
||||||
createPost(@Body() form: CreatePost, @Inject() options?: RequestOptions) {
|
createPost(@Body() form: CreatePost, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<CreatePost, PostResponse>(
|
return this.#wrapper<CreatePost, PostResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -778,6 +812,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/post")
|
@Get("/post")
|
||||||
|
@Tags("Post")
|
||||||
getPost(@Queries() form: GetPostI = {}, @Inject() options?: RequestOptions) {
|
getPost(@Queries() form: GetPostI = {}, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<GetPost, GetPostResponse>(
|
return this.#wrapper<GetPost, GetPostResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -792,6 +827,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/post")
|
@Put("/post")
|
||||||
|
@Tags("Post")
|
||||||
editPost(@Body() form: EditPost, @Inject() options?: RequestOptions) {
|
editPost(@Body() form: EditPost, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<EditPost, PostResponse>(
|
return this.#wrapper<EditPost, PostResponse>(
|
||||||
HttpType.Put,
|
HttpType.Put,
|
||||||
|
@ -806,6 +842,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/post/delete")
|
@Post("/post/delete")
|
||||||
|
@Tags("Post")
|
||||||
deletePost(@Body() form: DeletePost, @Inject() options?: RequestOptions) {
|
deletePost(@Body() form: DeletePost, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<DeletePost, PostResponse>(
|
return this.#wrapper<DeletePost, PostResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -820,6 +857,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/post/remove")
|
@Post("/post/remove")
|
||||||
|
@Tags("Post", "Moderator")
|
||||||
removePost(@Body() form: RemovePost, @Inject() options?: RequestOptions) {
|
removePost(@Body() form: RemovePost, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<RemovePost, PostResponse>(
|
return this.#wrapper<RemovePost, PostResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -834,6 +872,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/post/mark_as_read")
|
@Post("/post/mark_as_read")
|
||||||
|
@Tags("Post")
|
||||||
markPostAsRead(
|
markPostAsRead(
|
||||||
@Body() form: MarkPostAsRead,
|
@Body() form: MarkPostAsRead,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -851,6 +890,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/post/mark_as_read/many")
|
@Post("/post/mark_as_read/many")
|
||||||
|
@Tags("Post")
|
||||||
markManyPostAsRead(
|
markManyPostAsRead(
|
||||||
@Body() form: MarkManyPostsAsRead,
|
@Body() form: MarkManyPostsAsRead,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -868,6 +908,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/post/hide")
|
@Post("/post/hide")
|
||||||
|
@Tags("Post")
|
||||||
hidePost(@Body() form: HidePost, @Inject() options?: RequestOptions) {
|
hidePost(@Body() form: HidePost, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<HidePost, SuccessResponse>(
|
return this.#wrapper<HidePost, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -882,6 +923,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/post/lock")
|
@Post("/post/lock")
|
||||||
|
@Tags("Post")
|
||||||
lockPost(@Body() form: LockPost, @Inject() options?: RequestOptions) {
|
lockPost(@Body() form: LockPost, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<LockPost, PostResponse>(
|
return this.#wrapper<LockPost, PostResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -896,6 +938,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/post/feature")
|
@Post("/post/feature")
|
||||||
|
@Tags("Post", "Moderator")
|
||||||
featurePost(@Body() form: FeaturePost, @Inject() options?: RequestOptions) {
|
featurePost(@Body() form: FeaturePost, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<FeaturePost, PostResponse>(
|
return this.#wrapper<FeaturePost, PostResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -911,6 +954,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/post/list")
|
@Get("/post/list")
|
||||||
|
@Tags("Post")
|
||||||
getPosts(
|
getPosts(
|
||||||
@Queries() form: GetPostsI = {},
|
@Queries() form: GetPostsI = {},
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -928,6 +972,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/post/like")
|
@Post("/post/like")
|
||||||
|
@Tags("Post")
|
||||||
likePost(@Body() form: CreatePostLike, @Inject() options?: RequestOptions) {
|
likePost(@Body() form: CreatePostLike, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<CreatePostLike, PostResponse>(
|
return this.#wrapper<CreatePostLike, PostResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -942,6 +987,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/post/like/list")
|
@Get("/post/like/list")
|
||||||
|
@Tags("Post", "Admin")
|
||||||
listPostLikes(
|
listPostLikes(
|
||||||
@Queries() form: ListPostLikesI,
|
@Queries() form: ListPostLikesI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -959,6 +1005,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/post/save")
|
@Put("/post/save")
|
||||||
|
@Tags("Post")
|
||||||
savePost(@Body() form: SavePost, @Inject() options?: RequestOptions) {
|
savePost(@Body() form: SavePost, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<SavePost, PostResponse>(
|
return this.#wrapper<SavePost, PostResponse>(
|
||||||
HttpType.Put,
|
HttpType.Put,
|
||||||
|
@ -973,6 +1020,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/post/report")
|
@Post("/post/report")
|
||||||
|
@Tags("Post")
|
||||||
createPostReport(
|
createPostReport(
|
||||||
@Body() form: CreatePostReport,
|
@Body() form: CreatePostReport,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -990,6 +1038,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/post/report/resolve")
|
@Put("/post/report/resolve")
|
||||||
|
@Tags("Post", "Moderator")
|
||||||
resolvePostReport(
|
resolvePostReport(
|
||||||
@Body() form: ResolvePostReport,
|
@Body() form: ResolvePostReport,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1007,6 +1056,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/post/site_metadata")
|
@Get("/post/site_metadata")
|
||||||
|
@Tags("Miscellaneous", "Post")
|
||||||
getSiteMetadata(
|
getSiteMetadata(
|
||||||
@Queries() form: GetSiteMetadataI,
|
@Queries() form: GetSiteMetadataI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1024,6 +1074,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/comment")
|
@Post("/comment")
|
||||||
|
@Tags("Comment")
|
||||||
createComment(
|
createComment(
|
||||||
@Body() form: CreateComment,
|
@Body() form: CreateComment,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1041,6 +1092,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/comment")
|
@Put("/comment")
|
||||||
|
@Tags("Comment")
|
||||||
editComment(@Body() form: EditComment, @Inject() options?: RequestOptions) {
|
editComment(@Body() form: EditComment, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<EditComment, CommentResponse>(
|
return this.#wrapper<EditComment, CommentResponse>(
|
||||||
HttpType.Put,
|
HttpType.Put,
|
||||||
|
@ -1055,6 +1107,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/comment/delete")
|
@Post("/comment/delete")
|
||||||
|
@Tags("Comment")
|
||||||
deleteComment(
|
deleteComment(
|
||||||
@Body() form: DeleteComment,
|
@Body() form: DeleteComment,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1072,6 +1125,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/comment/remove")
|
@Post("/comment/remove")
|
||||||
|
@Tags("Comment", "Moderator")
|
||||||
removeComment(
|
removeComment(
|
||||||
@Body() form: RemoveComment,
|
@Body() form: RemoveComment,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1089,6 +1143,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/comment/mark_as_read")
|
@Post("/comment/mark_as_read")
|
||||||
|
@Tags("Comment")
|
||||||
markCommentReplyAsRead(
|
markCommentReplyAsRead(
|
||||||
@Body() form: MarkCommentReplyAsRead,
|
@Body() form: MarkCommentReplyAsRead,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1106,6 +1161,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/comment/like")
|
@Post("/comment/like")
|
||||||
|
@Tags("Comment")
|
||||||
likeComment(
|
likeComment(
|
||||||
@Body() form: CreateCommentLike,
|
@Body() form: CreateCommentLike,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1123,6 +1179,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/comment/like/list")
|
@Get("/comment/like/list")
|
||||||
|
@Tags("Comment", "Admin")
|
||||||
listCommentLikes(
|
listCommentLikes(
|
||||||
@Queries() form: ListCommentLikesI,
|
@Queries() form: ListCommentLikesI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1140,6 +1197,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/comment/save")
|
@Put("/comment/save")
|
||||||
|
@Tags("Comment")
|
||||||
saveComment(@Body() form: SaveComment, @Inject() options?: RequestOptions) {
|
saveComment(@Body() form: SaveComment, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<SaveComment, CommentResponse>(
|
return this.#wrapper<SaveComment, CommentResponse>(
|
||||||
HttpType.Put,
|
HttpType.Put,
|
||||||
|
@ -1154,6 +1212,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/comment/distinguish")
|
@Post("/comment/distinguish")
|
||||||
|
@Tags("Comment", "Moderator")
|
||||||
distinguishComment(
|
distinguishComment(
|
||||||
@Body() form: DistinguishComment,
|
@Body() form: DistinguishComment,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1172,6 +1231,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/comment/list")
|
@Get("/comment/list")
|
||||||
|
@Tags("Comment")
|
||||||
getComments(
|
getComments(
|
||||||
@Queries() form: GetCommentsI = {},
|
@Queries() form: GetCommentsI = {},
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1190,6 +1250,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/comment")
|
@Get("/comment")
|
||||||
|
@Tags("Comment")
|
||||||
getComment(@Queries() form: GetCommentI, @Inject() options?: RequestOptions) {
|
getComment(@Queries() form: GetCommentI, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<GetComment, CommentResponse>(
|
return this.#wrapper<GetComment, CommentResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -1204,6 +1265,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/comment/report")
|
@Post("/comment/report")
|
||||||
|
@Tags("Comment")
|
||||||
createCommentReport(
|
createCommentReport(
|
||||||
@Body() form: CreateCommentReport,
|
@Body() form: CreateCommentReport,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1221,6 +1283,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/comment/report/resolve")
|
@Put("/comment/report/resolve")
|
||||||
|
@Tags("Comment", "Moderator")
|
||||||
resolveCommentReport(
|
resolveCommentReport(
|
||||||
@Body() form: ResolveCommentReport,
|
@Body() form: ResolveCommentReport,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1238,6 +1301,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/private_message")
|
@Post("/private_message")
|
||||||
|
@Tags("PrivateMessage")
|
||||||
createPrivateMessage(
|
createPrivateMessage(
|
||||||
@Body() form: CreatePrivateMessage,
|
@Body() form: CreatePrivateMessage,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1255,6 +1319,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/private_message")
|
@Put("/private_message")
|
||||||
|
@Tags("PrivateMessage")
|
||||||
editPrivateMessage(
|
editPrivateMessage(
|
||||||
@Body() form: EditPrivateMessage,
|
@Body() form: EditPrivateMessage,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1272,6 +1337,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/private_message/delete")
|
@Post("/private_message/delete")
|
||||||
|
@Tags("PrivateMessage")
|
||||||
deletePrivateMessage(
|
deletePrivateMessage(
|
||||||
@Body() form: DeletePrivateMessage,
|
@Body() form: DeletePrivateMessage,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1289,6 +1355,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/private_message/mark_as_read")
|
@Post("/private_message/mark_as_read")
|
||||||
|
@Tags("PrivateMessage")
|
||||||
markPrivateMessageAsRead(
|
markPrivateMessageAsRead(
|
||||||
@Body() form: MarkPrivateMessageAsRead,
|
@Body() form: MarkPrivateMessageAsRead,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1306,6 +1373,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/private_message/report")
|
@Post("/private_message/report")
|
||||||
|
@Tags("PrivateMessage")
|
||||||
createPrivateMessageReport(
|
createPrivateMessageReport(
|
||||||
@Body() form: CreatePrivateMessageReport,
|
@Body() form: CreatePrivateMessageReport,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1321,6 +1389,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/private_message/report/resolve")
|
@Put("/private_message/report/resolve")
|
||||||
|
@Tags("PrivateMessage", "Admin")
|
||||||
resolvePrivateMessageReport(
|
resolvePrivateMessageReport(
|
||||||
@Body() form: ResolvePrivateMessageReport,
|
@Body() form: ResolvePrivateMessageReport,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1335,6 +1404,7 @@ export class LemmyHttp extends Controller {
|
||||||
* Register a new user.
|
* Register a new user.
|
||||||
*/
|
*/
|
||||||
@Post("/account/auth/register")
|
@Post("/account/auth/register")
|
||||||
|
@Tags("Account")
|
||||||
register(@Body() form: Register, @Inject() options?: RequestOptions) {
|
register(@Body() form: Register, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<Register, LoginResponse>(
|
return this.#wrapper<Register, LoginResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -1348,6 +1418,7 @@ export class LemmyHttp extends Controller {
|
||||||
* Log into lemmy.
|
* Log into lemmy.
|
||||||
*/
|
*/
|
||||||
@Post("/account/auth/login")
|
@Post("/account/auth/login")
|
||||||
|
@Tags("Account")
|
||||||
login(@Body() form: Login, @Inject() options?: RequestOptions) {
|
login(@Body() form: Login, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<Login, LoginResponse>(
|
return this.#wrapper<Login, LoginResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -1362,6 +1433,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/auth/logout")
|
@Post("/account/auth/logout")
|
||||||
|
@Tags("Account")
|
||||||
logout(@Inject() options?: RequestOptions) {
|
logout(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, SuccessResponse>(
|
return this.#wrapper<object, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -1377,6 +1449,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/person")
|
@Get("/person")
|
||||||
|
@Tags("Person")
|
||||||
getPersonDetails(
|
getPersonDetails(
|
||||||
@Queries() form: GetPersonDetailsI = {},
|
@Queries() form: GetPersonDetailsI = {},
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1395,6 +1468,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/person/content")
|
@Get("/person/content")
|
||||||
|
@Tags("Person")
|
||||||
listPersonContent(
|
listPersonContent(
|
||||||
@Queries() form: ListPersonContentI = {},
|
@Queries() form: ListPersonContentI = {},
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1412,6 +1486,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/mention/comment/mark_as_read")
|
@Post("/account/mention/comment/mark_as_read")
|
||||||
|
@Tags("Account", "Person")
|
||||||
markCommentMentionAsRead(
|
markCommentMentionAsRead(
|
||||||
@Body() form: MarkPersonCommentMentionAsRead,
|
@Body() form: MarkPersonCommentMentionAsRead,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1429,6 +1504,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/mention/post/mark_as_read")
|
@Post("/account/mention/post/mark_as_read")
|
||||||
|
@Tags("Account", "Post")
|
||||||
markPostMentionAsRead(
|
markPostMentionAsRead(
|
||||||
@Body() form: MarkPersonPostMentionAsRead,
|
@Body() form: MarkPersonPostMentionAsRead,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1446,6 +1522,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/admin/ban")
|
@Post("/admin/ban")
|
||||||
|
@Tags("Admin")
|
||||||
banPerson(@Body() form: BanPerson, @Inject() options?: RequestOptions) {
|
banPerson(@Body() form: BanPerson, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<BanPerson, BanPersonResponse>(
|
return this.#wrapper<BanPerson, BanPersonResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -1460,6 +1537,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/admin/banned")
|
@Get("/admin/banned")
|
||||||
|
@Tags("Admin", "Miscellaneous")
|
||||||
getBannedPersons(@Inject() options?: RequestOptions) {
|
getBannedPersons(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, BannedPersonsResponse>(
|
return this.#wrapper<object, BannedPersonsResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -1474,6 +1552,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/block/person")
|
@Post("/account/block/person")
|
||||||
|
@Tags("Account")
|
||||||
blockPerson(@Body() form: BlockPerson, @Inject() options?: RequestOptions) {
|
blockPerson(@Body() form: BlockPerson, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<BlockPerson, BlockPersonResponse>(
|
return this.#wrapper<BlockPerson, BlockPersonResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -1487,6 +1566,7 @@ export class LemmyHttp extends Controller {
|
||||||
* Fetch a Captcha.
|
* Fetch a Captcha.
|
||||||
*/
|
*/
|
||||||
@Get("/account/auth/get_captcha")
|
@Get("/account/auth/get_captcha")
|
||||||
|
@Tags("Account")
|
||||||
getCaptcha(@Inject() options?: RequestOptions) {
|
getCaptcha(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GetCaptchaResponse>(
|
return this.#wrapper<object, GetCaptchaResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -1501,6 +1581,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/delete")
|
@Post("/account/delete")
|
||||||
|
@Tags("Account")
|
||||||
deleteAccount(
|
deleteAccount(
|
||||||
@Body() form: DeleteAccount,
|
@Body() form: DeleteAccount,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1518,6 +1599,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/auth/password_reset")
|
@Post("/account/auth/password_reset")
|
||||||
|
@Tags("Account")
|
||||||
passwordReset(
|
passwordReset(
|
||||||
@Body() form: PasswordReset,
|
@Body() form: PasswordReset,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1535,6 +1617,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/auth/password_change")
|
@Post("/account/auth/password_change")
|
||||||
|
@Tags("Account")
|
||||||
passwordChangeAfterReset(
|
passwordChangeAfterReset(
|
||||||
@Body() form: PasswordChangeAfterReset,
|
@Body() form: PasswordChangeAfterReset,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1552,6 +1635,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/mark_as_read/all")
|
@Post("/account/mark_as_read/all")
|
||||||
|
@Tags("Account")
|
||||||
markAllNotificationsAsRead(@Inject() options?: RequestOptions) {
|
markAllNotificationsAsRead(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, SuccessResponse>(
|
return this.#wrapper<object, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -1566,6 +1650,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/account/settings/save")
|
@Put("/account/settings/save")
|
||||||
|
@Tags("Account")
|
||||||
saveUserSettings(
|
saveUserSettings(
|
||||||
@Body() form: SaveUserSettings,
|
@Body() form: SaveUserSettings,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1583,6 +1668,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/account/auth/change_password")
|
@Put("/account/auth/change_password")
|
||||||
|
@Tags("Account")
|
||||||
changePassword(
|
changePassword(
|
||||||
@Body() form: ChangePassword,
|
@Body() form: ChangePassword,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1600,6 +1686,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/account/report_count")
|
@Get("/account/report_count")
|
||||||
|
@Tags("Account")
|
||||||
getReportCount(
|
getReportCount(
|
||||||
@Queries() form: GetReportCountI,
|
@Queries() form: GetReportCountI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1617,6 +1704,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/account/unread_count")
|
@Get("/account/unread_count")
|
||||||
|
@Tags("Account")
|
||||||
getUnreadCount(@Inject() options?: RequestOptions) {
|
getUnreadCount(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GetUnreadCountResponse>(
|
return this.#wrapper<object, GetUnreadCountResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -1631,6 +1719,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/account/inbox")
|
@Get("/account/inbox")
|
||||||
|
@Tags("Account")
|
||||||
listInbox(@Queries() form: ListInboxI, @Inject() options?: RequestOptions) {
|
listInbox(@Queries() form: ListInboxI, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<ListInbox, ListInboxResponse>(
|
return this.#wrapper<ListInbox, ListInboxResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -1644,6 +1733,7 @@ export class LemmyHttp extends Controller {
|
||||||
* Verify your email
|
* Verify your email
|
||||||
*/
|
*/
|
||||||
@Post("/account/auth/verify_email")
|
@Post("/account/auth/verify_email")
|
||||||
|
@Tags("Account")
|
||||||
verifyEmail(@Body() form: VerifyEmail, @Inject() options?: RequestOptions) {
|
verifyEmail(@Body() form: VerifyEmail, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<VerifyEmail, SuccessResponse>(
|
return this.#wrapper<VerifyEmail, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -1658,6 +1748,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/account/auth/saved")
|
@Get("/account/auth/saved")
|
||||||
|
@Tags("Account")
|
||||||
listPersonSaved(
|
listPersonSaved(
|
||||||
@Queries() form: ListPersonSavedI,
|
@Queries() form: ListPersonSavedI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1675,6 +1766,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/admin/add")
|
@Post("/admin/add")
|
||||||
|
@Tags("Admin")
|
||||||
addAdmin(@Body() form: AddAdmin, @Inject() options?: RequestOptions) {
|
addAdmin(@Body() form: AddAdmin, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<AddAdmin, AddAdminResponse>(
|
return this.#wrapper<AddAdmin, AddAdminResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -1689,6 +1781,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/admin/registration_application/count")
|
@Get("/admin/registration_application/count")
|
||||||
|
@Tags("Admin")
|
||||||
getUnreadRegistrationApplicationCount(@Inject() options?: RequestOptions) {
|
getUnreadRegistrationApplicationCount(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GetUnreadRegistrationApplicationCountResponse>(
|
return this.#wrapper<object, GetUnreadRegistrationApplicationCountResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -1703,6 +1796,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/admin/registration_application/list")
|
@Get("/admin/registration_application/list")
|
||||||
|
@Tags("Admin")
|
||||||
listRegistrationApplications(
|
listRegistrationApplications(
|
||||||
@Queries() form: ListRegistrationApplicationsI,
|
@Queries() form: ListRegistrationApplicationsI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1718,6 +1812,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/admin/registration_application/approve")
|
@Put("/admin/registration_application/approve")
|
||||||
|
@Tags("Admin")
|
||||||
approveRegistrationApplication(
|
approveRegistrationApplication(
|
||||||
@Body() form: ApproveRegistrationApplication,
|
@Body() form: ApproveRegistrationApplication,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1733,6 +1828,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/admin/registration_application")
|
@Get("/admin/registration_application")
|
||||||
|
@Tags("Admin")
|
||||||
getRegistrationApplication(
|
getRegistrationApplication(
|
||||||
@Queries() form: GetRegistrationApplicationI,
|
@Queries() form: GetRegistrationApplicationI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1748,6 +1844,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/admin/purge/person")
|
@Post("/admin/purge/person")
|
||||||
|
@Tags("Admin")
|
||||||
purgePerson(@Body() form: PurgePerson, @Inject() options?: RequestOptions) {
|
purgePerson(@Body() form: PurgePerson, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<PurgePerson, SuccessResponse>(
|
return this.#wrapper<PurgePerson, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -1762,6 +1859,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/admin/purge/community")
|
@Post("/admin/purge/community")
|
||||||
|
@Tags("Admin")
|
||||||
purgeCommunity(
|
purgeCommunity(
|
||||||
@Body() form: PurgeCommunity,
|
@Body() form: PurgeCommunity,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1779,6 +1877,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/admin/purge/post")
|
@Post("/admin/purge/post")
|
||||||
|
@Tags("Admin")
|
||||||
purgePost(@Body() form: PurgePost, @Inject() options?: RequestOptions) {
|
purgePost(@Body() form: PurgePost, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<PurgePost, SuccessResponse>(
|
return this.#wrapper<PurgePost, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -1793,6 +1892,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/admin/purge/comment")
|
@Post("/admin/purge/comment")
|
||||||
|
@Tags("Admin")
|
||||||
purgeComment(@Body() form: PurgeComment, @Inject() options?: RequestOptions) {
|
purgeComment(@Body() form: PurgeComment, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<PurgeComment, SuccessResponse>(
|
return this.#wrapper<PurgeComment, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
|
@ -1807,6 +1907,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/custom_emoji")
|
@Post("/custom_emoji")
|
||||||
|
@Tags("CustomEmoji")
|
||||||
createCustomEmoji(
|
createCustomEmoji(
|
||||||
@Body() form: CreateCustomEmoji,
|
@Body() form: CreateCustomEmoji,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1824,6 +1925,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/custom_emoji")
|
@Put("/custom_emoji")
|
||||||
|
@Tags("CustomEmoji")
|
||||||
editCustomEmoji(
|
editCustomEmoji(
|
||||||
@Body() form: EditCustomEmoji,
|
@Body() form: EditCustomEmoji,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1841,6 +1943,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/custom_emoji/delete")
|
@Post("/custom_emoji/delete")
|
||||||
|
@Tags("CustomEmoji")
|
||||||
deleteCustomEmoji(
|
deleteCustomEmoji(
|
||||||
@Body() form: DeleteCustomEmoji,
|
@Body() form: DeleteCustomEmoji,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1859,6 +1962,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/custom_emoji/list")
|
@Get("/custom_emoji/list")
|
||||||
|
@Tags("CustomEmoji")
|
||||||
listCustomEmojis(
|
listCustomEmojis(
|
||||||
@Queries() form: ListCustomEmojisI,
|
@Queries() form: ListCustomEmojisI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1876,6 +1980,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/admin/tagline")
|
@Post("/admin/tagline")
|
||||||
|
@Tags("Admin", "Tagline")
|
||||||
createTagline(
|
createTagline(
|
||||||
@Body() form: CreateTagline,
|
@Body() form: CreateTagline,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1893,6 +1998,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/admin/tagline")
|
@Put("/admin/tagline")
|
||||||
|
@Tags("Admin", "Tagline")
|
||||||
editTagline(@Body() form: UpdateTagline, @Inject() options?: RequestOptions) {
|
editTagline(@Body() form: UpdateTagline, @Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<UpdateTagline, TaglineResponse>(
|
return this.#wrapper<UpdateTagline, TaglineResponse>(
|
||||||
HttpType.Put,
|
HttpType.Put,
|
||||||
|
@ -1907,6 +2013,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/admin/tagline/delete")
|
@Post("/admin/tagline/delete")
|
||||||
|
@Tags("Admin", "Tagline")
|
||||||
deleteTagline(
|
deleteTagline(
|
||||||
@Body() form: DeleteTagline,
|
@Body() form: DeleteTagline,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1925,6 +2032,7 @@ export class LemmyHttp extends Controller {
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Security({})
|
@Security({})
|
||||||
@Get("/admin/tagline/list")
|
@Get("/admin/tagline/list")
|
||||||
|
@Tags("Admin", "Tagline")
|
||||||
listTaglines(
|
listTaglines(
|
||||||
@Queries() form: ListTaglinesI,
|
@Queries() form: ListTaglinesI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1942,6 +2050,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/oauth_provider")
|
@Post("/oauth_provider")
|
||||||
|
@Tags("Miscellaneous", "OAuth")
|
||||||
createOAuthProvider(
|
createOAuthProvider(
|
||||||
@Body() form: CreateOAuthProvider,
|
@Body() form: CreateOAuthProvider,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1959,6 +2068,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Put("/oauth_provider")
|
@Put("/oauth_provider")
|
||||||
|
@Tags("Miscellaneous", "OAuth")
|
||||||
editOAuthProvider(
|
editOAuthProvider(
|
||||||
@Body() form: EditOAuthProvider,
|
@Body() form: EditOAuthProvider,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1976,6 +2086,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/oauth_provider/delete")
|
@Post("/oauth_provider/delete")
|
||||||
|
@Tags("Miscellaneous", "OAuth")
|
||||||
deleteOAuthProvider(
|
deleteOAuthProvider(
|
||||||
@Body() form: DeleteOAuthProvider,
|
@Body() form: DeleteOAuthProvider,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -1993,6 +2104,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/oauth/authenticate")
|
@Post("/oauth/authenticate")
|
||||||
|
@Tags("Miscellaneous", "OAuth")
|
||||||
authenticateWithOAuth(
|
authenticateWithOAuth(
|
||||||
@Body() form: AuthenticateWithOauth,
|
@Body() form: AuthenticateWithOauth,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2009,6 +2121,7 @@ export class LemmyHttp extends Controller {
|
||||||
* Fetch federated instances.
|
* Fetch federated instances.
|
||||||
*/
|
*/
|
||||||
@Get("/federated_instances")
|
@Get("/federated_instances")
|
||||||
|
@Tags("Miscellaneous")
|
||||||
getFederatedInstances(@Inject() options?: RequestOptions) {
|
getFederatedInstances(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GetFederatedInstancesResponse>(
|
return this.#wrapper<object, GetFederatedInstancesResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
@ -2023,6 +2136,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Get("/report/list")
|
@Get("/report/list")
|
||||||
|
@Tags("Admin")
|
||||||
listReports(
|
listReports(
|
||||||
@Queries() form: ListReportsI,
|
@Queries() form: ListReportsI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2040,6 +2154,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/block/instance")
|
@Post("/account/block/instance")
|
||||||
|
@Tags("Account")
|
||||||
userBlockInstance(
|
userBlockInstance(
|
||||||
@Body() form: UserBlockInstanceParams,
|
@Body() form: UserBlockInstanceParams,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2057,6 +2172,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/admin/instance/block")
|
@Post("/admin/instance/block")
|
||||||
|
@Tags("Admin")
|
||||||
adminBlockInstance(
|
adminBlockInstance(
|
||||||
@Body() form: AdminBlockInstanceParams,
|
@Body() form: AdminBlockInstanceParams,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2074,6 +2190,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/admin/instance/allow")
|
@Post("/admin/instance/allow")
|
||||||
|
@Tags("Admin")
|
||||||
adminAllowInstance(
|
adminAllowInstance(
|
||||||
@Body() form: AdminAllowInstanceParams,
|
@Body() form: AdminAllowInstanceParams,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2091,6 +2208,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/avatar")
|
@Post("/account/avatar")
|
||||||
|
@Tags("Account", "Media")
|
||||||
async uploadUserAvatar(
|
async uploadUserAvatar(
|
||||||
@UploadedFile() image: UploadImage,
|
@UploadedFile() image: UploadImage,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2103,6 +2221,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Delete("/account/avatar")
|
@Delete("/account/avatar")
|
||||||
|
@Tags("Account", "Media")
|
||||||
async deleteUserAvatar(
|
async deleteUserAvatar(
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
): Promise<SuccessResponse> {
|
): Promise<SuccessResponse> {
|
||||||
|
@ -2119,6 +2238,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/account/banner")
|
@Post("/account/banner")
|
||||||
|
@Tags("Account", "Media")
|
||||||
async uploadUserBanner(
|
async uploadUserBanner(
|
||||||
@UploadedFile() image: UploadImage,
|
@UploadedFile() image: UploadImage,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2131,6 +2251,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Delete("/account/banner")
|
@Delete("/account/banner")
|
||||||
|
@Tags("Account", "Media")
|
||||||
async deleteUserBanner(@Inject() options?: RequestOptions) {
|
async deleteUserBanner(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, SuccessResponse>(
|
return this.#wrapper<object, SuccessResponse>(
|
||||||
HttpType.Delete,
|
HttpType.Delete,
|
||||||
|
@ -2145,6 +2266,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/community/icon")
|
@Post("/community/icon")
|
||||||
|
@Tags("Community", "Media")
|
||||||
async uploadCommunityIcon(
|
async uploadCommunityIcon(
|
||||||
@UploadedFile() image: UploadImage,
|
@UploadedFile() image: UploadImage,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2157,6 +2279,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Delete("/community/icon")
|
@Delete("/community/icon")
|
||||||
|
@Tags("Community", "Media")
|
||||||
async deleteCommunityIcon(
|
async deleteCommunityIcon(
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
): Promise<SuccessResponse> {
|
): Promise<SuccessResponse> {
|
||||||
|
@ -2173,6 +2296,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/community/banner")
|
@Post("/community/banner")
|
||||||
|
@Tags("Community", "Media")
|
||||||
async uploadCommunityBanner(
|
async uploadCommunityBanner(
|
||||||
@UploadedFile() image: UploadImage,
|
@UploadedFile() image: UploadImage,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2185,6 +2309,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Delete("/community/banner")
|
@Delete("/community/banner")
|
||||||
|
@Tags("Community", "Media")
|
||||||
async deleteCommunityBanner(
|
async deleteCommunityBanner(
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
): Promise<SuccessResponse> {
|
): Promise<SuccessResponse> {
|
||||||
|
@ -2201,6 +2326,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/site/icon")
|
@Post("/site/icon")
|
||||||
|
@Tags("Site", "Media")
|
||||||
async uploadSiteIcon(
|
async uploadSiteIcon(
|
||||||
@UploadedFile() image: UploadImage,
|
@UploadedFile() image: UploadImage,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2213,6 +2339,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Delete("/site/icon")
|
@Delete("/site/icon")
|
||||||
|
@Tags("Site", "Media")
|
||||||
async deleteSiteIcon(
|
async deleteSiteIcon(
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
): Promise<SuccessResponse> {
|
): Promise<SuccessResponse> {
|
||||||
|
@ -2229,6 +2356,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/site/banner")
|
@Post("/site/banner")
|
||||||
|
@Tags("Site", "Media")
|
||||||
async uploadSiteBanner(
|
async uploadSiteBanner(
|
||||||
@UploadedFile() image: UploadImage,
|
@UploadedFile() image: UploadImage,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2241,6 +2369,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Delete("/site/banner")
|
@Delete("/site/banner")
|
||||||
|
@Tags("Site", "Media")
|
||||||
async deleteSiteBanner(
|
async deleteSiteBanner(
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
): Promise<SuccessResponse> {
|
): Promise<SuccessResponse> {
|
||||||
|
@ -2257,6 +2386,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Post("/image")
|
@Post("/image")
|
||||||
|
@Tags("Media")
|
||||||
async uploadImage(
|
async uploadImage(
|
||||||
@UploadedFile() image: UploadImage,
|
@UploadedFile() image: UploadImage,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2269,6 +2399,7 @@ export class LemmyHttp extends Controller {
|
||||||
*/
|
*/
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
@Delete("/image")
|
@Delete("/image")
|
||||||
|
@Tags("Media")
|
||||||
async deleteImage(
|
async deleteImage(
|
||||||
@Queries() form: DeleteImageParamsI,
|
@Queries() form: DeleteImageParamsI,
|
||||||
@Inject() options?: RequestOptions,
|
@Inject() options?: RequestOptions,
|
||||||
|
@ -2285,6 +2416,7 @@ export class LemmyHttp extends Controller {
|
||||||
* Health check for image functionality
|
* Health check for image functionality
|
||||||
*/
|
*/
|
||||||
@Get("image/health")
|
@Get("image/health")
|
||||||
|
@Tags("Media")
|
||||||
async imageHealth(@Inject() options?: RequestOptions) {
|
async imageHealth(@Inject() options?: RequestOptions) {
|
||||||
return this.#wrapper<object, SuccessResponse>(
|
return this.#wrapper<object, SuccessResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
|
|
Loading…
Reference in a new issue