Files
flatrender/services/studio/FlatRender.StudioSvc/Models/Requests/Requests.cs
T
soroush.asadi a69bc62724
Build backend images / build content-svc (push) Failing after 1m3s
Build backend images / build file-svc (push) Failing after 1m5s
Build backend images / build gateway (push) Failing after 1m0s
Build backend images / build identity-svc (push) Failing after 1m8s
Build backend images / build notification-svc (push) Failing after 57s
Build backend images / build render-svc (push) Failing after 1m6s
Build backend images / build studio-svc (push) Failing after 1m3s
feat(studio B1): persist input edits to content elements (render-binding foundation)
Studio edits previously went only to edit_state; the render binds saved_scene_contents,
so edits never reached the MP4. Add studio-svc PATCH /v1/saved-projects/{id}/contents
(update saved_scene_contents.value/value_file_id by content key, ExecuteSqlInterpolated
for null-safe params) + Next /api/projects/[id]/contents route + persistence hook pushes
edited values (from bridged c-<key> layers) alongside the scene_data save. Verified
text persists incl. UTF-8 Persian (9 chars/17 bytes).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 00:53:17 +03:30

131 lines
3.0 KiB
C#

namespace FlatRender.StudioSvc.Models.Requests;
public record CreateSavedProjectRequest(
Guid OriginalProjectId,
string? Name,
Guid? PresetStoryId,
bool CopyDefaultValues = true
);
public record UpdateSavedProjectRequest(
string? Name,
string? Image,
string? Type,
Guid? MusicFileId,
Guid? MusicTrackId,
decimal? MusicVolume,
Guid? VoiceoverFileId,
decimal? VoiceoverVolume,
bool? VoiceoverRecordedInBrowser,
decimal? SfxVolume,
bool? SfxEnabled,
string? AudioVisualizerMusicUrl,
decimal? AudioVisualizerDurationSec,
bool? ManualColorPicker,
Guid? SelectedPresetStoryId,
string? LastEditStep,
string? EditState
);
public record SaveSceneRequest(
Guid? OriginalSceneId,
string Key,
string? Title,
string? Image,
string? SceneColorSvg,
string SceneType,
int Sort,
decimal SceneLengthSec,
decimal? MinDurationSec,
decimal? MaxDurationSec,
decimal OverlapAtEndSec,
bool CanHandleDuration,
bool ManualColorSelection,
List<SaveSceneContentRequest> Contents,
List<SaveSceneColorRequest> Colors,
List<SaveSharedColorRequest> SharedColors,
List<SaveSharedLayerRequest> SharedLayers
);
public record SaveSceneContentRequest(
string Key,
string? Title,
string Type,
string? Value,
Guid? ValueFileId,
string? InsertedFileType,
string? FontFace,
string? FontFaceName,
int? FontSize,
int? DefaultFontSize,
string? DefaultFontFace,
string? Justify,
int PositionInContainer,
int DirectionLayerValue,
bool IsTextBox,
string? AiInputType,
int? SelectedDp,
string? RepeaterItemKey,
int? RepeaterIndex,
bool IsFocused,
string? MappedList,
string? Thumbnail,
int Sort
);
public record SaveSceneColorRequest(
string ElementKey,
string? Title,
string? Icon,
string AttrValue,
string Value,
bool IsSelected,
int Sort
);
public record SaveSharedColorRequest(
string ElementKey,
string? Title,
string? Icon,
string AttrValue,
string Value,
bool IsSelected,
int Sort
);
public record SaveSharedLayerRequest(
string Key,
string? Title,
string Type,
string? Value,
Guid? ValueFileId,
string? FontFace,
string? FontFaceName,
int? FontSize,
string? Justify,
int PositionInContainer,
int DirectionLayerValue,
bool IsTextBox,
string? AiInputType,
string? MappedList,
string? Thumbnail,
int? Width,
int? Height,
bool IsFocused,
bool IsFontChangeable,
bool IsFontSizeChangeable,
int Sort
);
public record SavedProjectListRequest(
int Page = 1,
int PageSize = 20,
string? Q = null,
string? Type = null
);
/// <summary>Lightweight update of individual scene-input values — the studio editor
/// writes the user's edits here (by content key) so the render binder picks them up.</summary>
public record UpdateContentsRequest(List<UpdateContentItem> Items);
public record UpdateContentItem(string Key, string? Value, Guid? ValueFileId);