mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-09-02 19:23:49 +00:00
Add missing TS derives that were causing errors when generating Typescript bindings (#5853)
This commit is contained in:
parent
e66d0a3d61
commit
fd1e0b01e5
3 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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>,
|
||||
|
|
Loading…
Reference in a new issue