mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-02 22:01:05 +02:00
feat: migrated from zod v3 to v4
This commit is contained in:
parent
ad41967d28
commit
b25c1cd4b4
18 changed files with 313 additions and 271 deletions
|
|
@ -12,7 +12,7 @@ export const loginResponse = z.object({
|
|||
});
|
||||
|
||||
export const registerRequest = loginRequest.omit({ grant_type: true, username: true }).extend({
|
||||
email: z.string().email("Invalid email address"),
|
||||
email: z.email("Invalid email address"),
|
||||
is_active: z.boolean().optional(),
|
||||
is_superuser: z.boolean().optional(),
|
||||
is_verified: z.boolean().optional(),
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export const getSearchSpacesResponse = z.array(searchSpace);
|
|||
* Create search space
|
||||
*/
|
||||
export const createSearchSpaceRequest = searchSpace.pick({ name: true, description: true }).extend({
|
||||
citations_enabled: z.boolean().default(true).optional(),
|
||||
citations_enabled: z.boolean().prefault(true).optional(),
|
||||
qna_custom_instructions: z.string().nullable().optional(),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { z } from "zod";
|
||||
|
||||
export const user = z.object({
|
||||
id: z.string().uuid(),
|
||||
email: z.string().email(),
|
||||
id: z.uuid(),
|
||||
email: z.email(),
|
||||
is_active: z.boolean(),
|
||||
is_superuser: z.boolean(),
|
||||
is_verified: z.boolean(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue