website refactor
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { PageQueryResult } from "./PageQueryResult";
|
||||
|
||||
import { Result } from "../Result";
|
||||
|
||||
/**
|
||||
* PageQuery contract interface
|
||||
@@ -10,18 +9,18 @@ import { PageQueryResult } from "./PageQueryResult";
|
||||
* - Server-side composition classes
|
||||
* - Call services that call apps/api
|
||||
* - Assemble a Page DTO
|
||||
* - Return explicit result describing route outcome
|
||||
* - Explicit result describing route outcome
|
||||
* - Do not implement business rules
|
||||
*
|
||||
* @template TPageDto - The Page DTO type this query produces
|
||||
* @template TApiDto - The API DTO type this query produces
|
||||
* @template TParams - The parameters required to execute this query
|
||||
*/
|
||||
export interface PageQuery<TPageDto, TParams = void> {
|
||||
export interface PageQuery<TApiDto, TParams = void> {
|
||||
/**
|
||||
* Execute the page query
|
||||
*
|
||||
* @param params - Parameters required for query execution
|
||||
* @returns Promise resolving to a PageQueryResult discriminated union
|
||||
* @returns Promise resolving to a Result
|
||||
*/
|
||||
execute(params: TParams): Promise<PageQueryResult<TPageDto>>;
|
||||
}
|
||||
execute(params: TParams): Promise<Result<TApiDto, string>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user