Adds DTOs for users summary, audit, sequence stats and delete plan, archive and server settings, dashboard, logs, render job parameters and render results, plus client calls for job pause/resume/priority, node failure and chunked render-result upload (sharing the frame upload chunk loop). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
128 lines
4.0 KiB
C#
128 lines
4.0 KiB
C#
namespace Titano.Protocol;
|
|
|
|
/// <summary>Sequence summary for lists (BRIEF §12.2 card data).</summary>
|
|
public sealed record SequenceDto(
|
|
Guid Id,
|
|
string? Title,
|
|
string DisplayTitle,
|
|
string Folder,
|
|
string? CameraMake,
|
|
string? CameraModel,
|
|
string? Lens,
|
|
DateTime? FirstCapture,
|
|
DateTime? LastCapture,
|
|
int FrameCount,
|
|
double? MedianInterval,
|
|
long TotalBytes,
|
|
long Status,
|
|
int RenderedCount,
|
|
Guid? HeroFrameId,
|
|
IReadOnlyList<string> Tags,
|
|
int Rating,
|
|
string? Notes,
|
|
int SettingsVersion,
|
|
int FramesVersion,
|
|
int WarningCount,
|
|
Guid? OwnerUserId,
|
|
DateTimeOffset UpdatedAt);
|
|
|
|
/// <summary>A page of results with an opaque keyset cursor; null cursor = last page.</summary>
|
|
public sealed record Page<T>(IReadOnlyList<T> Items, string? NextCursor, long? Total);
|
|
|
|
/// <summary><c>POST /api/v1/sequences</c>.</summary>
|
|
public sealed record CreateSequenceRequest(string? Title, string? CameraHint);
|
|
|
|
/// <summary><c>PATCH /api/v1/sequences/{id}</c>. <see cref="ExpectedSettingsVersion"/> enables conflict detection (409).</summary>
|
|
public sealed record UpdateSequenceRequest(
|
|
string? Title,
|
|
IReadOnlyList<string>? Tags,
|
|
int? Rating,
|
|
string? Notes,
|
|
string? SettingsJson,
|
|
int? ExpectedSettingsVersion);
|
|
|
|
public sealed record FrameDto(
|
|
Guid Id,
|
|
Guid SequenceId,
|
|
int Index,
|
|
string FileName,
|
|
long Size,
|
|
string? Sha256,
|
|
DateTime? CapturedAt,
|
|
int? UtcOffsetMinutes,
|
|
double? ExposureTime,
|
|
double? FNumber,
|
|
int? Iso,
|
|
double? FocalLength,
|
|
int Orientation,
|
|
int Width,
|
|
int Height,
|
|
string Format,
|
|
long Flags);
|
|
|
|
/// <summary><c>GET /api/v1/sequences/{id}/manifest</c>: what a client needs to diff a sequence (BRIEF §14.5).</summary>
|
|
public sealed record SequenceManifest(
|
|
Guid SequenceId,
|
|
int FramesVersion,
|
|
int SettingsVersion,
|
|
string? SettingsJson,
|
|
IReadOnlyList<string> Tags,
|
|
IReadOnlyList<ManifestFrame> Frames,
|
|
IReadOnlyList<RenderDto> Renders);
|
|
|
|
public sealed record ManifestFrame(Guid Id, int Index, string FileName, long Size, string Sha256, bool HasProxy, bool HasThumb);
|
|
|
|
public sealed record RenderDto(
|
|
Guid Id,
|
|
string PresetName,
|
|
string? Codec,
|
|
int Width,
|
|
int Height,
|
|
double Fps,
|
|
double DurationSeconds,
|
|
long Bytes,
|
|
DateTimeOffset Created,
|
|
string? ProducedBy);
|
|
|
|
/// <summary>Aggregates for the archive dashboard and the admin panel.</summary>
|
|
public sealed record ArchiveStatsDto(
|
|
long Sequences,
|
|
long Photos,
|
|
long Bytes,
|
|
long FreeBytes,
|
|
long CapacityBytes,
|
|
int Cameras,
|
|
int? FirstYear,
|
|
int? LastYear,
|
|
IReadOnlyList<KeyValueCount> ByYear,
|
|
IReadOnlyList<KeyValueCount> ByMonth,
|
|
IReadOnlyList<KeyValueCount> ByCamera,
|
|
IReadOnlyList<KeyValueCount> ByFormat,
|
|
int SequencesWithoutProxies,
|
|
int UnverifiedSequences);
|
|
|
|
public sealed record KeyValueCount(string Key, long Count, long Bytes);
|
|
|
|
/// <summary><c>GET /api/v1/sequences/{id}/stats</c>: frame totals by format and flagged frames.</summary>
|
|
public sealed record SequenceStatsDto(
|
|
Guid SequenceId,
|
|
int FrameCount,
|
|
long TotalBytes,
|
|
DateTime? FirstCapture,
|
|
DateTime? LastCapture,
|
|
double? MedianInterval,
|
|
IReadOnlyList<KeyValueCount> ByFormat,
|
|
long MissingFrames,
|
|
long CorruptFrames,
|
|
long DuplicateFrames,
|
|
long ExcludedFrames);
|
|
|
|
/// <summary>
|
|
/// <c>DELETE /api/v1/sequences/{id}</c>: what the delete does (with <c>?dryRun=true</c>) or did. The folder is moved
|
|
/// to <see cref="TrashFolder"/> inside the archive, never erased.
|
|
/// </summary>
|
|
public sealed record SequenceDeletePlan(Guid SequenceId, string? Folder, string? TrashFolder, int FrameCount, long TotalBytes, int RenderCount, bool DryRun);
|
|
|
|
/// <summary><c>GET/PUT /api/v1/archive/settings</c> (admin). The root path comes from the server configuration.</summary>
|
|
public sealed record ArchiveSettingsDto(Guid Id, string Name, string RootPath, string FolderTemplate, string FileTemplate, int ProxyLongEdge);
|