From e24ef22b5a2d133d192bb404470806be2495bc48 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 29 Feb 2024 23:03:37 -0500 Subject: [PATCH] Add alt text (#242) * Adding post alt text. * 0.19.4-alpha.5 * 0.19.4-alpha.6 --- package.json | 2 +- src/types/CreatePost.ts | 1 + src/types/EditPost.ts | 1 + src/types/LemmyErrorType.ts | 1 + src/types/Post.ts | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4179aee..8f954a3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lemmy-js-client", "description": "A javascript / typescript client for Lemmy", - "version": "0.19.4-alpha.4", + "version": "0.19.4-alpha.6", "author": "Dessalines ", "license": "AGPL-3.0", "main": "./dist/index.js", diff --git a/src/types/CreatePost.ts b/src/types/CreatePost.ts index 3b77adb..c4ccffe 100644 --- a/src/types/CreatePost.ts +++ b/src/types/CreatePost.ts @@ -7,6 +7,7 @@ export interface CreatePost { community_id: CommunityId; url?: string; body?: string; + alt_text?: string; honeypot?: string; nsfw?: boolean; language_id?: LanguageId; diff --git a/src/types/EditPost.ts b/src/types/EditPost.ts index c8fac6f..1d0f0a0 100644 --- a/src/types/EditPost.ts +++ b/src/types/EditPost.ts @@ -7,6 +7,7 @@ export interface EditPost { name?: string; url?: string; body?: string; + alt_text?: string; nsfw?: boolean; language_id?: LanguageId; custom_thumbnail?: string; diff --git a/src/types/LemmyErrorType.ts b/src/types/LemmyErrorType.ts index 857b894..ddb7111 100644 --- a/src/types/LemmyErrorType.ts +++ b/src/types/LemmyErrorType.ts @@ -91,6 +91,7 @@ export type LemmyErrorType = | { error: "invalid_post_title" } | { error: "invalid_body_field" } | { error: "bio_length_overflow" } + | { error: "alt_text_length_overflow" } | { error: "missing_totp_token" } | { error: "missing_totp_secret" } | { error: "incorrect_totp_token" } diff --git a/src/types/Post.ts b/src/types/Post.ts index 2bf377e..753cd6b 100644 --- a/src/types/Post.ts +++ b/src/types/Post.ts @@ -27,4 +27,5 @@ export interface Post { featured_community: boolean; featured_local: boolean; url_content_type?: string; + alt_text?: string; }