add dtos for the open api spec

This commit is contained in:
2026-08-06 12:58:41 -05:00
parent 9e201e4d4d
commit 8af110873b
5 changed files with 37 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
using System.Text.Json.Serialization;
namespace SafelyYou.Api;
public record ErrorResponse(
[property: JsonPropertyName("msg")] string Msg
);
@@ -0,0 +1,8 @@
using System.Text.Json.Serialization;
namespace SafelyYou.Api;
public record GetDeviceStatsResponse(
[property: JsonPropertyName("avg_upload_time")] string AvgUploadTime,
[property: JsonPropertyName("uptime")] double Uptime
);
+7
View File
@@ -0,0 +1,7 @@
using System.Text.Json.Serialization;
namespace SafelyYou.Api;
public record HeartbeatRequest(
[property: JsonPropertyName("sent_at")] DateTimeOffset SentAt
);
+7
View File
@@ -0,0 +1,7 @@
using System.Text.Json.Serialization;
namespace SafelyYou.Api;
public record NotFoundResponse(
[property: JsonPropertyName("msg")] string Msg
);
@@ -0,0 +1,8 @@
using System.Text.Json.Serialization;
namespace SafelyYou.Api;
public record UploadStatsRequest(
[property: JsonPropertyName("sent_at")] DateTimeOffset SentAt,
[property: JsonPropertyName("upload_time")] long UploadTime
);