From 0ba200251488cda21380732fd71bbe664a6066af Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 18 Dec 2024 11:54:08 +0100 Subject: [PATCH] remaining upload endpoints --- src/types/CreateSite.ts | 2 -- src/types/EditCommunity.ts | 8 -------- src/types/EditSite.ts | 8 -------- src/types/GetSiteResponse.ts | 1 + src/types/LemmyErrorType.ts | 1 + src/types/SaveUserSettings.ts | 4 ---- src/types/SiteResponse.ts | 2 +- 7 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/types/CreateSite.ts b/src/types/CreateSite.ts index f36bfde..a7c9de6 100644 --- a/src/types/CreateSite.ts +++ b/src/types/CreateSite.ts @@ -14,8 +14,6 @@ export type CreateSite = { name: string; sidebar?: string; description?: string; - icon?: string; - banner?: string; enable_nsfw?: boolean; community_creation_admin_only?: boolean; require_email_verification?: boolean; diff --git a/src/types/EditCommunity.ts b/src/types/EditCommunity.ts index 8fb1b52..627fb52 100644 --- a/src/types/EditCommunity.ts +++ b/src/types/EditCommunity.ts @@ -20,14 +20,6 @@ export type EditCommunity = { * A shorter, one line description of your community. */ description?: string; - /** - * An icon URL. - */ - icon?: string; - /** - * A banner URL. - */ - banner?: string; /** * Whether its an NSFW community. */ diff --git a/src/types/EditSite.ts b/src/types/EditSite.ts index 82a0b1e..75b4fb1 100644 --- a/src/types/EditSite.ts +++ b/src/types/EditSite.ts @@ -20,14 +20,6 @@ export type EditSite = { * A shorter, one line description of your site. */ description?: string; - /** - * A url for your site's icon. - */ - icon?: string; - /** - * A url for your site's banner. - */ - banner?: string; /** * Whether to enable NSFW. */ diff --git a/src/types/GetSiteResponse.ts b/src/types/GetSiteResponse.ts index 0119254..15e4176 100644 --- a/src/types/GetSiteResponse.ts +++ b/src/types/GetSiteResponse.ts @@ -35,4 +35,5 @@ export type GetSiteResponse = { oauth_providers?: Array; admin_oauth_providers?: Array; blocked_urls: Array; + image_upload_disabled: boolean; }; diff --git a/src/types/LemmyErrorType.ts b/src/types/LemmyErrorType.ts index 01af7e9..fbc7fa4 100644 --- a/src/types/LemmyErrorType.ts +++ b/src/types/LemmyErrorType.ts @@ -23,6 +23,7 @@ export type LemmyErrorType = | { error: "no_content_type_header" } | { error: "not_an_image_type" } | { error: "invalid_image_upload" } + | { error: "image_upload_disabled" } | { error: "not_a_mod_or_admin" } | { error: "not_top_mod" } | { error: "not_logged_in" } diff --git a/src/types/SaveUserSettings.ts b/src/types/SaveUserSettings.ts index f6439a1..78a3769 100644 --- a/src/types/SaveUserSettings.ts +++ b/src/types/SaveUserSettings.ts @@ -42,10 +42,6 @@ export type SaveUserSettings = { * The language of the lemmy interface */ interface_language?: string; - /** - * A URL for your banner. - */ - banner?: string; /** * Your display name, which can contain strange characters, and does not need to be unique. */ diff --git a/src/types/SiteResponse.ts b/src/types/SiteResponse.ts index 3f241cb..380e643 100644 --- a/src/types/SiteResponse.ts +++ b/src/types/SiteResponse.ts @@ -7,7 +7,7 @@ import type { SiteView } from "./SiteView"; export type SiteResponse = { site_view: SiteView; /** - * deprecated, use field `tagline` or /api/v3/tagline/list + * deprecated, use field `tagline` or /api/v4/tagline/list */ taglines: Array; };