website refactor

This commit is contained in:
2026-01-13 00:16:14 +01:00
parent 5ea95eaf51
commit d18e2979ba
17 changed files with 1056 additions and 303 deletions

View File

@@ -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>>;
}