using System.Text.Json; using Bit.SeederApi.Models.Response; namespace Bit.SeederApi.Services; /// /// Service for executing and managing scene operations. /// /// /// The scene service provides a mechanism to execute scene operations by name with optional JSON arguments. /// Scenes create and configure test data, track entities for cleanup, and support destruction of seeded data. /// Each scene execution can be assigned a play ID for tracking and subsequent cleanup operations. /// public interface ISceneService { /// /// Executes a scene with the given template name and arguments. /// /// The name of the scene template (e.g., "SingleUserScene") /// Optional JSON arguments to pass to the scene's Seed method /// A tuple containing the result and optional seed ID for tracked entities /// Thrown when the scene template is not found /// Thrown when there's an error executing the scene Task ExecuteScene(string templateName, JsonElement? arguments); /// /// Destroys data created by a scene using the seeded data ID. /// /// The ID of the seeded data to destroy /// The result of the destroy operation /// Thrown when there's an error destroying the seeded data Task DestroyScene(string playId); /// /// Retrieves all play IDs for currently tracked seeded data. /// /// A list of play IDs representing active seeded data that can be destroyed. List GetAllPlayIds(); }