1
0
mirror of https://github.com/bitwarden/server synced 2025-12-16 08:13:33 +00:00

Stricter scene and query types

SeederAPI only serves Scenes, Recipes are inteded to be used locally only.
This commit is contained in:
Matt Gibson
2025-10-29 12:27:15 -07:00
parent 16ee5cfaad
commit 878b78b51e
14 changed files with 261 additions and 204 deletions

View File

@@ -1,9 +1,10 @@
using System.Text.Json;
using Bit.Infrastructure.EntityFramework.Models;
using Bit.SeederApi.Models.Response;
namespace Bit.SeederApi.Services;
public interface IRecipeService
public interface ISeedService
{
/// <summary>
/// Executes a scene with the given template name and arguments.
@@ -13,7 +14,7 @@ public interface IRecipeService
/// <returns>A tuple containing the result and optional seed ID for tracked entities</returns>
/// <exception cref="RecipeNotFoundException">Thrown when the scene template is not found</exception>
/// <exception cref="RecipeExecutionException">Thrown when there's an error executing the scene</exception>
(object? Result, Guid? SeedId) ExecuteRecipe(string templateName, JsonElement? arguments);
SceneResponseModel ExecuteScene(string templateName, JsonElement? arguments);
/// <summary>
/// Destroys data created by a scene using the seeded data ID.