namespace Titano.Protocol; /// /// POST /api/v1/uploads (BRIEF §14.4). The client hashes the file first; when the server already holds that /// SHA-256 it answers 200 with and no upload is needed. /// public sealed record StartUploadRequest(Guid? SequenceId, string FileName, long Size, string Sha256, DateTime? CapturedAt, string? SessionKey); public sealed record StartUploadResponse(Guid? UploadId, int ChunkSize, IReadOnlyList Received, bool AlreadyExists, Guid? FrameId); /// PUT /api/v1/uploads/{id}/chunks/{n} response. public sealed record ChunkReceived(int Index, IReadOnlyList Received); /// POST /api/v1/uploads/{id}/complete response: the committed frame. public sealed record CompleteUploadResponse(Guid FrameId, Guid SequenceId, int Index); /// GET /api/v1/uploads/{id}: resume state. public sealed record UploadState(Guid UploadId, string FileName, long Size, string Sha256, int ChunkSize, IReadOnlyList Received, string State); /// /// POST /api/v1/sequences/{id}/renders: a client offers one of its renders of the sequence (BRIEF §14.5, /// renders are uploaded on request). The render keeps its id on the server, so both sides recognise it; when the /// server already has that id it answers 200 with . Chunks go to /// /uploads/{uploadId}/chunks/{n}; POST /sequences/{id}/renders/{uploadId}/complete verifies the SHA-256 /// and files the render under the sequence's exports. /// public sealed record RenderUploadRequest( Guid RenderId, string FileName, long Size, string Sha256, string PresetName, string? Codec, int Width, int Height, double Fps, double DurationSeconds, string? ProducedBy);