blob: 8bc4a2d8c6ab58416c3159d6eca5c51d234f9177 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
using System.Text.Json.Serialization;
namespace Spacebar.Models.Api;
public class CreateAttachmentRequest {
[JsonPropertyName("files")]
public required List<Entry> Files { get; set; }
public class Entry {
[JsonPropertyName("id"), JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
public long? Id { get; set; }
[JsonPropertyName("filename")]
public string? FileName { get; set; }
[JsonPropertyName("file_size")]
public int FileSize { get; set; }
[JsonPropertyName("is_clip")]
public bool? IsClip { get; set; }
}
}
public class CreateAttachmentResponse {
[JsonPropertyName("attachments")]
public required List<Entry> Attachments { get; set; }
public class Entry {
[JsonPropertyName("id"), JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
public long? Id { get; set; }
[JsonPropertyName("upload_filename")]
public string? UploadFileName { get; set; }
[JsonPropertyName("upload_url")]
public string UploadUrl { get; set; }
[JsonPropertyName("original_content_type")]
public string? OriginalContentType { get; set; }
}
}
|