Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish fields in SlackFile struct #110

Merged
merged 1 commit into from
May 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions src/models/src/files/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,33 @@ pub struct SlackFileExternalType(pub String);
#[skip_serializing_none]
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Builder)]
pub struct SlackFile {
id: SlackFileId,
created: SlackDateTime,
timestamp: SlackDateTime,
name: String,
title: Option<String>,
mimetype: Option<SlackMimeType>,
filetype: Option<SlackFileType>,
pretty_type: Option<SlackFilePrettyType>,
external_type: Option<SlackFileExternalType>,
user: Option<SlackUserId>,
username: Option<String>,
url_private: Option<Url>,
url_private_download: Option<Url>,
permalink: Option<Url>,
permalink_public: Option<Url>,
pub id: SlackFileId,
pub created: SlackDateTime,
pub timestamp: SlackDateTime,
pub name: String,
pub title: Option<String>,
pub mimetype: Option<SlackMimeType>,
pub filetype: Option<SlackFileType>,
pub pretty_type: Option<SlackFilePrettyType>,
pub external_type: Option<SlackFileExternalType>,
pub user: Option<SlackUserId>,
pub username: Option<String>,
pub url_private: Option<Url>,
pub url_private_download: Option<Url>,
pub permalink: Option<Url>,
pub permalink_public: Option<Url>,
#[serde(flatten)]
flags: SlackFileFlags,
pub flags: SlackFileFlags,
}

#[skip_serializing_none]
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Builder)]
pub struct SlackFileFlags {
editable: Option<bool>,
is_external: Option<bool>,
is_public: Option<bool>,
public_url_shared: Option<bool>,
display_as_bot: Option<bool>,
is_starred: Option<bool>,
has_rich_preview: Option<bool>,
pub editable: Option<bool>,
pub is_external: Option<bool>,
pub is_public: Option<bool>,
pub public_url_shared: Option<bool>,
pub display_as_bot: Option<bool>,
pub is_starred: Option<bool>,
pub has_rich_preview: Option<bool>,
}