feat(content): scenes + shared-colors + colour-presets endpoints
Build backend images / build content-svc (push) Failing after 2m53s
Build backend images / build file-svc (push) Failing after 3m55s
Build backend images / build gateway (push) Failing after 53s
Build backend images / build identity-svc (push) Failing after 3m26s
Build backend images / build notification-svc (push) Failing after 3m5s
Build backend images / build render-svc (push) Failing after 46s
Build backend images / build studio-svc (push) Failing after 2m22s
Build backend images / build content-svc (push) Failing after 2m53s
Build backend images / build file-svc (push) Failing after 3m55s
Build backend images / build gateway (push) Failing after 53s
Build backend images / build identity-svc (push) Failing after 3m26s
Build backend images / build notification-svc (push) Failing after 3m5s
Build backend images / build render-svc (push) Failing after 46s
Build backend images / build studio-svc (push) Failing after 2m22s
Completes the content backend for the studio building blocks (all project-scoped):
- GET /v1/scenes?project_id= + POST/PUT/DELETE (scene metadata CRUD)
- GET /v1/shared-colors?project_id= + POST/PUT/DELETE
- GET /v1/color-presets?project_id= + POST/PUT/DELETE (palette + items)
SceneColorService + DTOs; reads open, writes [Authorize(Roles=Admin)].
Gateway routes /v1/{scenes,shared-colors,color-presets}/* → content.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
namespace FlatRender.ContentSvc.Models;
|
||||
|
||||
// ── Scenes (project-scoped scene templates) ──────────────────────────────────
|
||||
|
||||
public record SceneResponse(
|
||||
Guid Id, Guid ProjectId, string Key, string Title, string? LocalizedTitle,
|
||||
string SceneType, string? Image, string? Demo, string? SceneColorSvg, string? SnapshotUrl,
|
||||
bool GenerateKf, decimal? DefaultDurationSec, decimal? MinDurationSec, decimal? MaxDurationSec,
|
||||
decimal OverlapAtEndSec, bool CanHandleDuration, bool ManualColorSelection, int Sort, bool IsActive
|
||||
);
|
||||
|
||||
public record CreateSceneRequest(
|
||||
Guid ProjectId, string Key, string Title, string? LocalizedTitle, string? SceneType,
|
||||
string? Image, string? Demo, string? SceneColorSvg, string? SnapshotUrl, bool GenerateKf,
|
||||
decimal? DefaultDurationSec, decimal? MinDurationSec, decimal? MaxDurationSec, decimal OverlapAtEndSec,
|
||||
bool CanHandleDuration, bool ManualColorSelection, int Sort, bool IsActive
|
||||
);
|
||||
|
||||
public record UpdateSceneRequest(
|
||||
string Key, string Title, string? LocalizedTitle, string? SceneType,
|
||||
string? Image, string? Demo, string? SceneColorSvg, string? SnapshotUrl, bool GenerateKf,
|
||||
decimal? DefaultDurationSec, decimal? MinDurationSec, decimal? MaxDurationSec, decimal OverlapAtEndSec,
|
||||
bool CanHandleDuration, bool ManualColorSelection, int Sort, bool IsActive
|
||||
);
|
||||
|
||||
// ── Shared colors (project-scoped named colors) ──────────────────────────────
|
||||
|
||||
public record SharedColorResponse(
|
||||
Guid Id, Guid ProjectId, string ElementKey, string Title, string? Icon,
|
||||
string AttrValue, string DefaultColor, int Sort
|
||||
);
|
||||
|
||||
public record SaveSharedColorRequest(
|
||||
Guid ProjectId, string ElementKey, string Title, string? Icon,
|
||||
string? AttrValue, string DefaultColor, int Sort
|
||||
);
|
||||
|
||||
// ── Color presets (named palettes of colors) ─────────────────────────────────
|
||||
|
||||
public record ColorPresetItemResponse(Guid Id, string ElementKey, string Value, int Sort);
|
||||
|
||||
public record ColorPresetResponse(
|
||||
Guid Id, Guid ProjectId, string? Name, int Sort, List<ColorPresetItemResponse> Items
|
||||
);
|
||||
|
||||
public record ColorPresetItemInput(string ElementKey, string Value, int Sort);
|
||||
|
||||
public record SaveColorPresetRequest(
|
||||
Guid ProjectId, string? Name, int Sort, List<ColorPresetItemInput> Items
|
||||
);
|
||||
Reference in New Issue
Block a user