1
0
mirror of https://github.com/bitwarden/server synced 2026-02-17 18:09:11 +00:00

Add query for email verification link (#6984)

* Add query for email verification link

* PR comments
This commit is contained in:
Matt Gibson
2026-02-12 15:16:50 +00:00
committed by GitHub
parent c15c41801a
commit cde8ceca31
6 changed files with 68 additions and 14 deletions

View File

@@ -4,8 +4,8 @@
/// Base interface for query operations in the seeding system. The base interface should not be used directly, rather use `IQuery<TRequest, TResult>`.
/// </summary>
/// <remarks>
/// Queries are synchronous, read-only operations that retrieve data from the seeding context.
/// Unlike scenes which create data, queries fetch existing data based on request parameters.
/// Queries are read-only operations that retrieve data from the seeding context.
/// Unlike scenes, which create data, queries fetch existing data based on request parameters.
/// They follow a type-safe pattern using generics to ensure proper request/response handling
/// while maintaining a common non-generic interface for dynamic invocation.
/// </remarks>
@@ -22,17 +22,17 @@ public interface IQuery
/// </summary>
/// <param name="request">The request object containing parameters for the query operation.</param>
/// <returns>The query result data as an object.</returns>
object Execute(object request);
Task<object> Execute(object request);
}
/// <summary>
/// Generic query interface for synchronous, read-only operations with specific request and result types.
/// Generic query interface for read-only operations with specific request and result types.
/// </summary>
/// <typeparam name="TRequest">The type of request object this query accepts.</typeparam>
/// <typeparam name="TResult">The type of data this query returns.</typeparam>
/// <remarks>
/// Use this interface when you need to retrieve existing data from the seeding context based on
/// specific request parameters. Queries are synchronous and do not modify data - they only read
/// specific request parameters. Queries do not modify data - they only read
/// and return information. The explicit interface implementations allow dynamic invocation while
/// maintaining type safety in the implementation.
/// </remarks>
@@ -43,7 +43,7 @@ public interface IQuery<TRequest, TResult> : IQuery where TRequest : class where
/// </summary>
/// <param name="request">The request object containing parameters for the query operation.</param>
/// <returns>The typed query result data.</returns>
TResult Execute(TRequest request);
Task<TResult> Execute(TRequest request);
/// <summary>
/// Gets the request type for this query.
@@ -56,5 +56,5 @@ public interface IQuery<TRequest, TResult> : IQuery where TRequest : class where
/// </summary>
/// <param name="request">The request object to cast and process.</param>
/// <returns>The typed result cast to object.</returns>
object IQuery.Execute(object request) => Execute((TRequest)request);
async Task<object> IQuery.Execute(object request) => await Execute((TRequest)request);
}