Add missing TS derives that were causing errors when generating Typescript bindings (#5853)

This commit is contained in:
SleeplessOne1917 2025-07-09 03:48:14 -04:00 committed by GitHub
parent e66d0a3d61
commit fd1e0b01e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 0 deletions

View file

@ -244,6 +244,8 @@ pub struct ModlogCombinedId(i32);
#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq, Serialize, Deserialize, Default)]
#[cfg_attr(feature = "full", derive(DieselNewType))]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export))]
/// The inbox combined id
pub struct InboxCombinedId(i32);

View file

@ -22,6 +22,8 @@ use serde_with::skip_serializing_none;
#[cfg_attr(feature = "full", diesel(table_name = inbox_combined))]
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
#[cfg_attr(feature = "full", cursor_keys_module(name = inbox_combined_keys))]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(optional_fields, export))]
/// A combined inbox table.
pub struct InboxCombined {
pub id: InboxCombinedId,

View file

@ -696,6 +696,8 @@ pub struct ResolveObject {
}
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export))]
pub enum PostOrCommentOrPrivateMessage {
Post(Post),
Comment(Comment),
@ -711,6 +713,8 @@ pub enum PostOrCommentOrPrivateMessage {
/// Be careful with any changes to this struct, to avoid breaking changes which could prevent
/// importing older backups.
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(optional_fields, export))]
pub struct UserSettingsBackup {
pub display_name: Option<String>,
pub bio: Option<String>,