Add attachment list API

This commit is contained in:
Rory&
2026-08-02 01:00:21 +02:00
parent fbd4bd2b5a
commit ffd7f00336
8 changed files with 223 additions and 2 deletions
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using Spacebar.Models.Generic;
namespace Spacebar.Models.Api;
@@ -38,4 +39,20 @@ public class CreateAttachmentResponse {
[JsonPropertyName("original_content_type")]
public string? OriginalContentType { get; set; }
}
}
public class AttachmentListResponse {
[JsonPropertyName("total")]
public int Total { get; set; }
[JsonPropertyName("items")]
public List<Entry> Items { get; set; }
public class Entry {
[JsonPropertyName("attachment")]
public MessageAttachment Attachment { get; set; }
[JsonPropertyName("message_reference")]
public MessageReference MessageReference { get; set; }
}
}
@@ -6,4 +6,9 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Spacebar.Models.Generic\Spacebar.Models.Generic.csproj" Condition="'$(ContinuousIntegrationBuild)'!='true'"/>
<PackageReference Include="Spacebar.Models.Generic" Version="*-preview*" Condition="'$(ContinuousIntegrationBuild)'=='true'"/>
</ItemGroup>
</Project>