chore: rename route from api-v2 to api (#7379)
* chore: rename route from api-v2 to api * chore: change oas references * chore: remove v2 ref
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import {
|
||||
createFindParams,
|
||||
createOperatorMap,
|
||||
createSelectParams,
|
||||
} from "../../utils/validators"
|
||||
import { z } from "zod"
|
||||
|
||||
export const AdminGetUserParams = createSelectParams()
|
||||
|
||||
export type AdminGetUsersParamsType = z.infer<typeof AdminGetUsersParams>
|
||||
export const AdminGetUsersParams = createFindParams({
|
||||
offset: 0,
|
||||
limit: 50,
|
||||
}).merge(
|
||||
z.object({
|
||||
q: z.string().optional(),
|
||||
id: z.union([z.string(), z.array(z.string())]).optional(),
|
||||
created_at: createOperatorMap().optional(),
|
||||
updated_at: createOperatorMap().optional(),
|
||||
deleted_at: createOperatorMap().optional(),
|
||||
email: z.string().optional(),
|
||||
first_name: z.string().optional(),
|
||||
last_name: z.string().optional(),
|
||||
})
|
||||
)
|
||||
|
||||
export type AdminCreateUserType = z.infer<typeof AdminCreateUser>
|
||||
export const AdminCreateUser = z.object({
|
||||
email: z.string(),
|
||||
first_name: z.string().optional(),
|
||||
last_name: z.string().optional(),
|
||||
avatar_url: z.string().optional(),
|
||||
})
|
||||
|
||||
export type AdminUpdateUserType = z.infer<typeof AdminUpdateUser>
|
||||
export const AdminUpdateUser = z.object({
|
||||
first_name: z.string().optional(),
|
||||
last_name: z.string().optional(),
|
||||
avatar_url: z.string().optional(),
|
||||
})
|
||||
Reference in New Issue
Block a user