Lays down every contract the later parcels of owner review 1 phase 5 build on, so they compile against shared types without touching each other's files. - Settings format 3: export.playback (direction, loops, fades, hold), omitted at its default and member by member; RequiredFormat is 3 only while used. - OutputProgram public API with a forward-only body; still-frame job parameters (StillFrame, StillPhoto) routed to format-3 nodes only. - Render.Sha256/Kind, RenderCopy, RenderKind; JobKind.VideoCopy = 24. - Migration 0010 (sqlite, postgres): renders.sha256/kind, ix_renders_created, render_copies without a foreign key. - Videos protocol DTOs, client calls, ServerCapabilities.Videos (declared, not announced yet), ServerSettingsDto.VideosPath. - IVideoLibrary with a NotImplemented stub registered on the server; TrashKind.Videos, VideoTrashNames, VideoErrors. - en and it strings for the whole phase, five icons, decisions 1-22 and the open-question defaults; tests that used format 3 as "newer" now use 4. Refs #21 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
2.2 KiB
C#
49 lines
2.2 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Chronos.Protocol;
|
|
|
|
/// <summary>Error body of every failed API call: <c>{ code, message, details }</c> (BRIEF §14.3).</summary>
|
|
public sealed record ApiError(string Code, string Message, string? Details = null);
|
|
|
|
/// <summary>Upload and account limits announced by the server.</summary>
|
|
public sealed record ServerLimits(long MaxUploadBytes, int ChunkSizeBytes, int PasswordMinLength = 10);
|
|
|
|
/// <summary><c>GET /api/v1/server/info</c>.</summary>
|
|
/// <param name="Extensions">
|
|
/// File extensions the archive files as photos (lower case, no dot): the admin panel's upload dialog offers and sends only
|
|
/// these (owner review 2, R3). Null from servers that do not announce them.
|
|
/// </param>
|
|
/// <param name="SettingsFormat">
|
|
/// The highest project settings format the server reads and renders (<c>ProjectSettings.CurrentVersion</c>, owner review 1,
|
|
/// phase 4); null from an older server, which reads format 1 only. The desktop holds back a push or a render that needs more.
|
|
/// </param>
|
|
public sealed record ServerInfo(
|
|
string Name,
|
|
string Version,
|
|
int ApiVersion,
|
|
IReadOnlyList<string> Capabilities,
|
|
string? TlsFingerprint,
|
|
IReadOnlyList<string> Formats,
|
|
ServerLimits Limits,
|
|
IReadOnlyList<string>? Extensions = null,
|
|
int? SettingsFormat = null);
|
|
|
|
/// <summary>Names of <see cref="ServerInfo.Capabilities"/> that clients act on.</summary>
|
|
public static class ServerCapabilities
|
|
{
|
|
/// <summary>
|
|
/// The server keeps its sequences' projects (owner review 2, R8): <c>/api/v1/sequences/{sid}/projects</c>, the
|
|
/// <c>projectChanged</c> event, renders of a project version. A server without it knows only the sequence's settings.
|
|
/// </summary>
|
|
public const string Projects = "projects";
|
|
|
|
/// <summary>
|
|
/// The server keeps a videos library (owner review 1, R9): <c>/api/v1/videos</c> lists, deletes into the trash and copies
|
|
/// its renders into its videos folder. Without it a client lists only its own videos.
|
|
/// </summary>
|
|
public const string Videos = "videos";
|
|
}
|
|
|
|
/// <summary><c>GET /health</c>.</summary>
|
|
public sealed record HealthStatus(string Status, string Version, IReadOnlyDictionary<string, string> Checks);
|