mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
18 lines
417 B
TypeScript
18 lines
417 B
TypeScript
export interface ServerActionSuccess<TData> {
|
|
data: TData;
|
|
meta?: Record<string, unknown>;
|
|
links?: Record<string, string | null>;
|
|
status?: number;
|
|
}
|
|
|
|
export interface ServerActionFailure {
|
|
error: string;
|
|
errors?: unknown[];
|
|
status?: number;
|
|
}
|
|
|
|
// Discriminate with `"error" in result` / `"data" in result`.
|
|
export type ServerActionResult<TData> =
|
|
| ServerActionSuccess<TData>
|
|
| ServerActionFailure;
|