migration

This commit is contained in:
Théo LAGACHE
2025-05-16 15:54:17 +02:00
parent 01019fe1a3
commit 6f2523e524
285 changed files with 15492 additions and 46090 deletions
+21 -13
View File
@@ -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
View File
@@ -1,5 +1,3 @@
export type eventUpdate = {
update : boolean
}
update: boolean;
};
+1 -3
View File
@@ -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 }>;
};
};