mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
migration
This commit is contained in:
+21
-13
@@ -1,23 +1,31 @@
|
||||
import {SafeActionResult} from "next-safe-action";
|
||||
import {ZodString} from "zod";
|
||||
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>
|
||||
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>
|
||||
export type ActionResult<T> = SafeActionResult<
|
||||
string,
|
||||
ZodString,
|
||||
readonly [],
|
||||
{
|
||||
formErrors: string[];
|
||||
fieldErrors: {};
|
||||
},
|
||||
readonly [],
|
||||
ServerActionResult<T>,
|
||||
object
|
||||
>;
|
||||
|
||||
+2
-4
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
export type eventUpdate = {
|
||||
update : boolean
|
||||
}
|
||||
update: boolean;
|
||||
};
|
||||
|
||||
+1
-3
@@ -1,11 +1,9 @@
|
||||
export type LayoutParams<T extends Record<string, string | string[]>> = {
|
||||
children: React.ReactNode;
|
||||
params: T;
|
||||
|
||||
};
|
||||
|
||||
|
||||
export type PageParams<T extends Record<string, string | string[]>> = {
|
||||
params: Promise<T>;
|
||||
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user