2026-08-02 21:41:12 +02:00
|
|
|
using AIStudio.Chat;
|
2026-11-28 11:52:17 +01:00
|
|
|
using AIStudio.Tools.Imports;
|
2026-08-02 21:41:12 +02:00
|
|
|
|
|
|
|
|
namespace AIStudio.Tools.Media;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Persists a completed media transcript for a feature-specific owner.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IMediaTranscriptStorage
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2026-11-28 11:52:17 +01:00
|
|
|
/// Determines whether this storage handles the specified import owner.
|
2026-08-02 21:41:12 +02:00
|
|
|
/// </summary>
|
2026-11-28 11:52:17 +01:00
|
|
|
/// <param name="owner">The feature-specific import owner.</param>
|
2026-08-02 21:41:12 +02:00
|
|
|
/// <returns><see langword="true"/> when the transcript can be stored.</returns>
|
2026-11-28 11:52:17 +01:00
|
|
|
bool CanStore(ImportOwner owner);
|
2026-08-02 21:41:12 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Persists a completed transcript and returns the attachment exposed to the calling workflow.
|
|
|
|
|
/// </summary>
|
2026-11-28 11:52:17 +01:00
|
|
|
/// <param name="target">The stable import target.</param>
|
2026-08-02 21:41:12 +02:00
|
|
|
/// <param name="originalMediaPath">The original media path.</param>
|
|
|
|
|
/// <param name="transcript">The completed transcript text.</param>
|
|
|
|
|
/// <param name="token">The cancellation token.</param>
|
|
|
|
|
/// <returns>The attachment representing the persisted transcript.</returns>
|
|
|
|
|
Task<FileAttachment> StoreAsync(
|
2026-11-28 11:52:17 +01:00
|
|
|
ImportTarget target,
|
2026-08-02 21:41:12 +02:00
|
|
|
string originalMediaPath,
|
|
|
|
|
string transcript,
|
|
|
|
|
CancellationToken token);
|
|
|
|
|
}
|