mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Working on project front side.
This commit is contained in:
@@ -1,6 +1,23 @@
|
||||
import {SafeActionResult} from "next-safe-action";
|
||||
import {ZodString} from "zod";
|
||||
|
||||
export type ServerActionResult<T> = { success: true; value: T; actionSuccess?: ActionSuccessMessage } | { success: false; actionError: ActionErrorMessage };
|
||||
export type ServerActionResult<T> = { success: true; value?: T; actionSuccess?: ActionSuccessMessage } | {
|
||||
success: false;
|
||||
actionError?: ActionErrorMessage
|
||||
};
|
||||
|
||||
export type ActionErrorMessage = { message?: string; status?: number; cause?: string; messageParams?: Record<string, string | number> };
|
||||
export type ActionErrorMessage = {
|
||||
message?: string;
|
||||
status?: number;
|
||||
cause?: string;
|
||||
messageParams?: Record<string, string | number>
|
||||
};
|
||||
|
||||
export type ActionSuccessMessage = { message?: string; messageParams?: Record<string, string | number> };
|
||||
export type ActionSuccessMessage = { message?: string; messageParams?: Record<string, string | number> };
|
||||
|
||||
|
||||
|
||||
export type ActionResult<T> = SafeActionResult<string, ZodString, readonly [], {
|
||||
formErrors: string[];
|
||||
fieldErrors: {};
|
||||
}, readonly [], ServerActionResult<T>, object>
|
||||
Reference in New Issue
Block a user