From 5789a9a685af672d1bacd25e882d36dcda2ff9fb Mon Sep 17 00:00:00 2001 From: Nutomic Date: Tue, 24 Sep 2024 21:00:49 +0200 Subject: [PATCH] Post scheduling (#347) * Post scheduling * rename field * 0.20.0-alpha.5 * fix type * 0.20.0-alpha.6 * add EditPost.scheduled_publish_time * 0.19.6-alpha.1 * add error * fix --- src/types/CreatePost.ts | 1 + src/types/EditPost.ts | 1 + src/types/LemmyErrorType.ts | 2 ++ src/types/Post.ts | 1 + 4 files changed, 5 insertions(+) diff --git a/src/types/CreatePost.ts b/src/types/CreatePost.ts index c4ccffe..462aff1 100644 --- a/src/types/CreatePost.ts +++ b/src/types/CreatePost.ts @@ -12,4 +12,5 @@ export interface CreatePost { nsfw?: boolean; language_id?: LanguageId; custom_thumbnail?: string; + scheduled_publish_time?: number; } diff --git a/src/types/EditPost.ts b/src/types/EditPost.ts index 1d0f0a0..fc4c62b 100644 --- a/src/types/EditPost.ts +++ b/src/types/EditPost.ts @@ -11,4 +11,5 @@ export interface EditPost { nsfw?: boolean; language_id?: LanguageId; custom_thumbnail?: string; + scheduled_publish_time?: number; } diff --git a/src/types/LemmyErrorType.ts b/src/types/LemmyErrorType.ts index fa7fe2c..059c28d 100644 --- a/src/types/LemmyErrorType.ts +++ b/src/types/LemmyErrorType.ts @@ -159,5 +159,7 @@ export type LemmyErrorType = | { error: "couldnt_delete_oauth_provider" } | { error: "unknown"; message: string } | { error: "cant_delete_site" } + | { error: "post_schedule_time_must_be_in_future" } + | { error: "too_many_scheduled_posts" } | { error: "url_length_overflow" } | { error: "not_found" }; diff --git a/src/types/Post.ts b/src/types/Post.ts index 753cd6b..107adb2 100644 --- a/src/types/Post.ts +++ b/src/types/Post.ts @@ -28,4 +28,5 @@ export interface Post { featured_local: boolean; url_content_type?: string; alt_text?: string; + scheduled_publish_time?: number; }