wekan_cli/command_result/
attachments.rs1use crate::client::attachments::AttachmentMetadata;
2use serde::Serialize;
3
4#[derive(Debug, Eq, PartialEq, Serialize)]
5pub struct BoardAttachmentCollectionSuccess {
6 pub board_id: String,
7 pub count: usize,
8 pub attachments: Vec<crate::client::boards::attachments::BoardAttachment>,
9}
10
11#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize)]
12#[serde(rename_all = "snake_case")]
13pub enum AttachmentScope {
14 Board,
15 Swimlane,
16 List,
17 Card,
18}
19
20#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
21pub struct AttachmentCollectionSuccess {
22 pub board_id: String,
23 pub swimlane_id: Option<String>,
24 pub list_id: Option<String>,
25 pub card_id: Option<String>,
26 pub requested_scope: AttachmentScope,
27 pub effective_scope: AttachmentScope,
28 pub count: u32,
29 pub attachments: Vec<AttachmentMetadata>,
30}
31
32#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
33pub struct AttachmentDownloadSuccess {
34 pub attachment_id: String,
35 pub file_name: String,
36 pub file_size: u64,
37 pub file_type: String,
38 pub storage_backend: String,
39 pub background_image_url: Option<String>,
40 pub destination: String,
41 pub bytes_written: u64,
42 pub file_saved: bool,
43 #[serde(skip)]
44 pub bytes: Option<Vec<u8>>,
45}