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
50 lines
2.2 KiB
C#
50 lines
2.2 KiB
C#
namespace Titano.Protocol;
|
|
|
|
/// <summary><c>POST /api/v1/auth/login</c>. <see cref="Cookie"/> = true asks for an HttpOnly session cookie (web admin).</summary>
|
|
public sealed record LoginRequest(string Username, string Password, string ClientName, bool Cookie = false);
|
|
|
|
public sealed record LoginResponse(string? Token, UserDto User, bool MustChangePassword, DateTimeOffset ExpiresAt);
|
|
|
|
/// <summary><c>POST /api/v1/auth/password</c>.</summary>
|
|
public sealed record ChangePasswordRequest(string CurrentPassword, string NewPassword);
|
|
|
|
public sealed record UserDto(
|
|
Guid Id,
|
|
string Username,
|
|
string? DisplayName,
|
|
string Role,
|
|
long Permissions,
|
|
long QuotaBytes,
|
|
long UsedBytes,
|
|
bool Disabled,
|
|
bool MustChangePassword,
|
|
DateTimeOffset Created,
|
|
DateTimeOffset? LastLogin);
|
|
|
|
/// <summary><c>POST /api/v1/users</c> (admin).</summary>
|
|
public sealed record CreateUserRequest(string Username, string? DisplayName, string Role, long QuotaBytes, string? Password, bool AllowRenderNode);
|
|
|
|
/// <summary><c>PATCH /api/v1/users/{id}</c> (admin); null fields stay unchanged.</summary>
|
|
public sealed record UpdateUserRequest(string? DisplayName, string? Role, long? QuotaBytes, bool? Disabled, bool? AllowRenderNode);
|
|
|
|
/// <summary>Response of <c>POST /api/v1/users</c> and <c>/users/{id}/reset-password</c>: a temporary password shown once.</summary>
|
|
public sealed record TemporaryPasswordResponse(UserDto User, string TemporaryPassword);
|
|
|
|
/// <summary><c>POST /api/v1/users/{id}/reset-password</c> (admin); without a password the server generates one.</summary>
|
|
public sealed record ResetPasswordRequest(string? Password);
|
|
|
|
/// <summary>One row of the admin user list: the account plus when and from which client it was last used.</summary>
|
|
public sealed record UserSummaryDto(UserDto User, DateTimeOffset? LastSeen, string? LastClient, long UploadsLast30Days);
|
|
|
|
/// <summary>One audit log entry (who did what to which user, sequence or setting).</summary>
|
|
public sealed record AuditEntryDto(
|
|
Guid Id,
|
|
DateTimeOffset At,
|
|
Guid? UserId,
|
|
string? Username,
|
|
string Action,
|
|
string? TargetKind,
|
|
string? TargetId,
|
|
string? Details,
|
|
string? RemoteAddress);
|