From c862bd816e7d5c95c5944497f1c0a080e4b1d005 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 13 Dec 2024 12:47:46 +0100 Subject: [PATCH 01/14] Rework image api --- src/http.ts | 80 ++++++++++++++++++-------------- src/index.ts | 4 ++ src/other_types.ts | 20 -------- src/types/DeleteImageParams.ts | 3 ++ src/types/ImageGetParams.ts | 6 +++ src/types/ImageProxyParams.ts | 7 +++ src/types/LemmyErrorType.ts | 1 + src/types/SaveUserSettings.ts | 4 -- src/types/UploadImageResponse.ts | 7 +++ 9 files changed, 73 insertions(+), 59 deletions(-) create mode 100644 src/types/DeleteImageParams.ts create mode 100644 src/types/ImageGetParams.ts create mode 100644 src/types/ImageProxyParams.ts create mode 100644 src/types/UploadImageResponse.ts diff --git a/src/http.ts b/src/http.ts index 31ac0cae..f2e2ef10 100644 --- a/src/http.ts +++ b/src/http.ts @@ -123,12 +123,7 @@ import { SearchResponse } from "./types/SearchResponse"; import { SiteResponse } from "./types/SiteResponse"; import { TransferCommunity } from "./types/TransferCommunity"; import { VerifyEmail } from "./types/VerifyEmail"; -import { - DeleteImage, - UploadImage, - UploadImageResponse, - VERSION, -} from "./other_types"; +import { UploadImage, VERSION } from "./other_types"; import { HideCommunity } from "./types/HideCommunity"; import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse"; import { UpdateTotp } from "./types/UpdateTotp"; @@ -163,11 +158,14 @@ import { MyUserInfo } from "./types/MyUserInfo"; import { UserBlockInstanceParams } from "./types/UserBlockInstanceParams"; import { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams"; import { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams"; +import { DeleteImageParams } from "./types/DeleteImageParams"; +import { UploadImageResponse } from "./types/UploadImageResponse"; enum HttpType { Get = "GET", Post = "POST", Put = "PUT", + Delete = "DELETE", } type RequestOptions = Pick; @@ -1874,6 +1872,8 @@ export class LemmyHttp { /** * Upload an image to the server. + * + * `HTTP.Post /image` */ async uploadImage( { image }: UploadImage, @@ -1881,51 +1881,61 @@ export class LemmyHttp { ): Promise { const formData = createFormData(image); - let url: string | undefined = undefined; - let delete_url: string | undefined = undefined; - const response = await this.#fetchFunction(this.#pictrsUrl, { ...options, method: HttpType.Post, body: formData as unknown as BodyInit, headers: this.#headers, }); - - if (response.status === 413) { - return { msg: "too_large" }; - } - - const responseJson = await response.json(); - - if (responseJson.msg === "ok") { - const { file: hash, delete_token: deleteToken } = responseJson.files[0]; - delete_url = `${this.#pictrsUrl}/delete/${deleteToken}/${hash}`; - url = `${this.#pictrsUrl}/${hash}`; - } - - return { - ...responseJson, - url, - delete_url, - }; + return response.json(); } /** - * Delete a pictrs image + * Upload new user avatar. + * + * `HTTP.Post /account/avatar` */ - async deleteImage( - { token, filename }: DeleteImage, + async userUploadAvatar( + { image }: UploadImage, options?: RequestOptions, - ): Promise { - const deleteUrl = `${this.#pictrsUrl}/delete/${token}/${filename}`; + ): Promise { + const formData = createFormData(image); - const response = await this.#fetchFunction(deleteUrl, { + const response = await this.#fetchFunction(this.#pictrsUrl, { ...options, - method: HttpType.Get, + method: HttpType.Post, + body: formData as unknown as BodyInit, headers: this.#headers, }); + return response.json(); + } - return response.status == 204; + /** + * Delete a pictrs image + * + * `HTTP.Delete /image` + */ + async deleteImage(form: DeleteImageParams, options?: RequestOptions) { + return this.#wrapper( + HttpType.Delete, + "/image", + form, + options, + ); + } + + /** + * Health check for image functionality + * + * `HTTP.Get /image/health` + */ + async imageHealth(options?: RequestOptions) { + return this.#wrapper( + HttpType.Get, + "/image/health", + {}, + options, + ); } #buildFullUrl(endpoint: string) { diff --git a/src/index.ts b/src/index.ts index eb60cf47..906bb0f5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -85,6 +85,7 @@ export { DeleteAccount } from "./types/DeleteAccount"; export { DeleteComment } from "./types/DeleteComment"; export { DeleteCommunity } from "./types/DeleteCommunity"; export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji"; +export { DeleteImageParams } from "./types/DeleteImageParams"; export { DeleteOAuthProvider } from "./types/DeleteOAuthProvider"; export { DeletePost } from "./types/DeletePost"; export { DeletePrivateMessage } from "./types/DeletePrivateMessage"; @@ -138,6 +139,8 @@ export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnread export { HideCommunity } from "./types/HideCommunity"; export { HidePost } from "./types/HidePost"; export { ImageDetails } from "./types/ImageDetails"; +export { ImageGetParams } from "./types/ImageGetParams"; +export { ImageProxyParams } from "./types/ImageProxyParams"; export { Instance } from "./types/Instance"; export { InstanceId } from "./types/InstanceId"; export { InstanceWithFederationState } from "./types/InstanceWithFederationState"; @@ -291,6 +294,7 @@ export { TransferCommunity } from "./types/TransferCommunity"; export { UpdateTagline } from "./types/UpdateTagline"; export { UpdateTotp } from "./types/UpdateTotp"; export { UpdateTotpResponse } from "./types/UpdateTotpResponse"; +export { UploadImageResponse } from "./types/UploadImageResponse"; export { UserBlockInstanceParams } from "./types/UserBlockInstanceParams"; export { VerifyEmail } from "./types/VerifyEmail"; export { VoteView } from "./types/VoteView"; diff --git a/src/other_types.ts b/src/other_types.ts index 27e2e333..b3be06c8 100644 --- a/src/other_types.ts +++ b/src/other_types.ts @@ -3,23 +3,3 @@ export const VERSION = "v4"; export interface UploadImage { image: File | Buffer; } - -export interface UploadImageResponse { - /** - * Is "ok" if the upload was successful; is something else otherwise. - */ - msg: string; - files?: ImageFile[]; - url?: string; - delete_url?: string; -} - -export interface ImageFile { - file: string; - delete_token: string; -} - -export interface DeleteImage { - token: string; - filename: string; -} diff --git a/src/types/DeleteImageParams.ts b/src/types/DeleteImageParams.ts new file mode 100644 index 00000000..c0df70ef --- /dev/null +++ b/src/types/DeleteImageParams.ts @@ -0,0 +1,3 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type DeleteImageParams = { file: string; token: string }; diff --git a/src/types/ImageGetParams.ts b/src/types/ImageGetParams.ts new file mode 100644 index 00000000..c2dbfab7 --- /dev/null +++ b/src/types/ImageGetParams.ts @@ -0,0 +1,6 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ImageGetParams = { + format: string | null; + thumbnail: number | null; +}; diff --git a/src/types/ImageProxyParams.ts b/src/types/ImageProxyParams.ts new file mode 100644 index 00000000..1552bbcc --- /dev/null +++ b/src/types/ImageProxyParams.ts @@ -0,0 +1,7 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ImageProxyParams = { + url: string; + format: string | null; + thumbnail: number | null; +}; diff --git a/src/types/LemmyErrorType.ts b/src/types/LemmyErrorType.ts index 32b9c9e9..01af7e9e 100644 --- a/src/types/LemmyErrorType.ts +++ b/src/types/LemmyErrorType.ts @@ -22,6 +22,7 @@ export type LemmyErrorType = | { error: "pictrs_api_key_not_provided" } | { error: "no_content_type_header" } | { error: "not_an_image_type" } + | { error: "invalid_image_upload" } | { 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 431a8dd2..f6439a13 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 avatar. - */ - avatar?: string; /** * A URL for your banner. */ diff --git a/src/types/UploadImageResponse.ts b/src/types/UploadImageResponse.ts new file mode 100644 index 00000000..afc7d987 --- /dev/null +++ b/src/types/UploadImageResponse.ts @@ -0,0 +1,7 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type UploadImageResponse = { + image_url: string; + filename: string; + delete_token: string; +}; From 3185b36867e031896a62f106fc0d4479a2875e38 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 13 Dec 2024 12:49:22 +0100 Subject: [PATCH 02/14] fix --- src/index.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 906bb0f5..99290707 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,5 @@ export * from "./http"; -export { - UploadImage, - UploadImageResponse, - ImageFile, - DeleteImage, -} from "./other_types"; +export { UploadImage } from "./other_types"; export { ActivityId } from "./types/ActivityId"; export { AddAdmin } from "./types/AddAdmin"; export { AddAdminResponse } from "./types/AddAdminResponse"; From f53636efb9dd042b8122cc3a8df9dcad03e2c8d6 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 13 Dec 2024 12:49:38 +0100 Subject: [PATCH 03/14] 0.20.0-image-api-rework.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a1eda16d..ac7d20d8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lemmy-js-client", "description": "A javascript / typescript client for Lemmy", - "version": "0.20.0-api-v4.17", + "version": "0.20.0-image-api-rework.0", "author": "Dessalines ", "license": "AGPL-3.0", "main": "./dist/index.js", From b68dd9df8cdc2a83a6c81d7f3f292268e4619074 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 13 Dec 2024 13:01:28 +0100 Subject: [PATCH 04/14] rename --- src/types/DeleteImageParams.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/DeleteImageParams.ts b/src/types/DeleteImageParams.ts index c0df70ef..626a45a5 100644 --- a/src/types/DeleteImageParams.ts +++ b/src/types/DeleteImageParams.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type DeleteImageParams = { file: string; token: string }; +export type DeleteImageParams = { filename: string; token: string }; From e36dbd84f5eb54d953c8e72112f80a5db4022da2 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 13 Dec 2024 13:01:33 +0100 Subject: [PATCH 05/14] 0.20.0-image-api-rework.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ac7d20d8..51cb2e25 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lemmy-js-client", "description": "A javascript / typescript client for Lemmy", - "version": "0.20.0-image-api-rework.0", + "version": "0.20.0-image-api-rework.2", "author": "Dessalines ", "license": "AGPL-3.0", "main": "./dist/index.js", From ed90884fddb31e2d3643ffda95a8ad0a9656583d Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 13 Dec 2024 14:44:34 +0100 Subject: [PATCH 06/14] rename params --- putTypesInIndex.js | 2 +- src/types/ImageGetParams.ts | 4 ++-- src/types/ImageProxyParams.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/putTypesInIndex.js b/putTypesInIndex.js index 8d41ef8f..4a30b484 100644 --- a/putTypesInIndex.js +++ b/putTypesInIndex.js @@ -5,7 +5,7 @@ const exportRegex = /export\s+(?:enum|interface|type)\s+([A-Za-z0-9_]+)/g; const baseExports = [ 'export * from "./http";', - 'export {UploadImage,UploadImageResponse,ImageFile,DeleteImage} from "./other_types";', + 'export {UploadImage} from "./other_types";', ]; async function putTypesInIndex() { diff --git a/src/types/ImageGetParams.ts b/src/types/ImageGetParams.ts index c2dbfab7..1a7daf8b 100644 --- a/src/types/ImageGetParams.ts +++ b/src/types/ImageGetParams.ts @@ -1,6 +1,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. export type ImageGetParams = { - format: string | null; - thumbnail: number | null; + file_type: string | null; + max_size: number | null; }; diff --git a/src/types/ImageProxyParams.ts b/src/types/ImageProxyParams.ts index 1552bbcc..22d0737c 100644 --- a/src/types/ImageProxyParams.ts +++ b/src/types/ImageProxyParams.ts @@ -2,6 +2,6 @@ export type ImageProxyParams = { url: string; - format: string | null; - thumbnail: number | null; + file_type: string | null; + max_size: number | null; }; From 77b0deb01f86abf7c687a8e61719d41eb19cd103 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 13 Dec 2024 14:44:39 +0100 Subject: [PATCH 07/14] 0.20.0-image-api-rework.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 51cb2e25..f48a78c1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lemmy-js-client", "description": "A javascript / typescript client for Lemmy", - "version": "0.20.0-image-api-rework.2", + "version": "0.20.0-image-api-rework.3", "author": "Dessalines ", "license": "AGPL-3.0", "main": "./dist/index.js", From 42bac946992ffb3c93781314918532bdcb4dfc49 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 13 Dec 2024 15:37:28 +0100 Subject: [PATCH 08/14] fix null --- src/types/ImageGetParams.ts | 5 +---- src/types/ImageProxyParams.ts | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/types/ImageGetParams.ts b/src/types/ImageGetParams.ts index 1a7daf8b..5dab2752 100644 --- a/src/types/ImageGetParams.ts +++ b/src/types/ImageGetParams.ts @@ -1,6 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ImageGetParams = { - file_type: string | null; - max_size: number | null; -}; +export type ImageGetParams = { file_type?: string; max_size?: number }; diff --git a/src/types/ImageProxyParams.ts b/src/types/ImageProxyParams.ts index 22d0737c..1d74299e 100644 --- a/src/types/ImageProxyParams.ts +++ b/src/types/ImageProxyParams.ts @@ -2,6 +2,6 @@ export type ImageProxyParams = { url: string; - file_type: string | null; - max_size: number | null; + file_type?: string; + max_size?: number; }; From 4bf613ef684fc0c01c1c4b6d69fd8d77a30a258f Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 17 Dec 2024 11:06:07 +0100 Subject: [PATCH 09/14] fix upload urls --- src/http.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/http.ts b/src/http.ts index f2e2ef10..529b58f9 100644 --- a/src/http.ts +++ b/src/http.ts @@ -176,7 +176,6 @@ type RequestOptions = Pick; export class LemmyHttp { #apiUrl: string; #headers: { [key: string]: string } = {}; - #pictrsUrl: string; #fetchFunction: typeof fetch = fetch.bind(globalThis); /** @@ -192,7 +191,6 @@ export class LemmyHttp { }, ) { this.#apiUrl = `${baseUrl.replace(/\/+$/, "")}/api/${VERSION}`; - this.#pictrsUrl = `${baseUrl}/pictrs/image`; if (options?.headers) { this.#headers = options.headers; @@ -1881,7 +1879,7 @@ export class LemmyHttp { ): Promise { const formData = createFormData(image); - const response = await this.#fetchFunction(this.#pictrsUrl, { + const response = await this.#fetchFunction("/api/v4/image", { ...options, method: HttpType.Post, body: formData as unknown as BodyInit, @@ -1901,7 +1899,7 @@ export class LemmyHttp { ): Promise { const formData = createFormData(image); - const response = await this.#fetchFunction(this.#pictrsUrl, { + const response = await this.#fetchFunction("/api/v4/account/avatar", { ...options, method: HttpType.Post, body: formData as unknown as BodyInit, From 5b8accac6289b084e1d3362aacf9d31d3c0f6318 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 17 Dec 2024 11:06:19 +0100 Subject: [PATCH 10/14] 0.20.0-image-api-rework.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f48a78c1..d89217cb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lemmy-js-client", "description": "A javascript / typescript client for Lemmy", - "version": "0.20.0-image-api-rework.3", + "version": "0.20.0-image-api-rework.4", "author": "Dessalines ", "license": "AGPL-3.0", "main": "./dist/index.js", From 8cbffad86a65d58449df6371a3660cb98144d8b5 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 17 Dec 2024 11:10:06 +0100 Subject: [PATCH 11/14] build full url --- src/http.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/http.ts b/src/http.ts index 529b58f9..3fb3a36a 100644 --- a/src/http.ts +++ b/src/http.ts @@ -1879,7 +1879,7 @@ export class LemmyHttp { ): Promise { const formData = createFormData(image); - const response = await this.#fetchFunction("/api/v4/image", { + const response = await this.#fetchFunction(this.#buildFullUrl("/image"), { ...options, method: HttpType.Post, body: formData as unknown as BodyInit, @@ -1899,12 +1899,15 @@ export class LemmyHttp { ): Promise { const formData = createFormData(image); - const response = await this.#fetchFunction("/api/v4/account/avatar", { - ...options, - method: HttpType.Post, - body: formData as unknown as BodyInit, - headers: this.#headers, - }); + const response = await this.#fetchFunction( + this.#buildFullUrl("/account/avatar"), + { + ...options, + method: HttpType.Post, + body: formData as unknown as BodyInit, + headers: this.#headers, + }, + ); return response.json(); } From e3f700850e5adda95a45058a468900bc7e2d1733 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 17 Dec 2024 11:10:15 +0100 Subject: [PATCH 12/14] 0.20.0-image-api-rework.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d89217cb..01cf60bb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lemmy-js-client", "description": "A javascript / typescript client for Lemmy", - "version": "0.20.0-image-api-rework.4", + "version": "0.20.0-image-api-rework.5", "author": "Dessalines ", "license": "AGPL-3.0", "main": "./dist/index.js", From 0ba200251488cda21380732fd71bbe664a6066af Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 18 Dec 2024 11:54:08 +0100 Subject: [PATCH 13/14] 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 f36bfde6..a7c9de6c 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 8fb1b529..627fb527 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 82a0b1ef..75b4fb1e 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 0119254b..15e41769 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 01af7e9e..fbc7fa45 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 f6439a13..78a37698 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 3f241cbd..380e6437 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; }; From 2e85189e5cff1a7714396e20cb72331799e6c08b Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 18 Dec 2024 11:54:22 +0100 Subject: [PATCH 14/14] 0.20.0-image-api-rework.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 01cf60bb..e4ac9f0e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lemmy-js-client", "description": "A javascript / typescript client for Lemmy", - "version": "0.20.0-image-api-rework.5", + "version": "0.20.0-image-api-rework.6", "author": "Dessalines ", "license": "AGPL-3.0", "main": "./dist/index.js",