up: tipagem zod para credenciais
This commit is contained in:
parent
ab3812e090
commit
2295f2ca81
1 changed files with 10 additions and 3 deletions
|
|
@ -96,7 +96,6 @@ export const orgaos: { [k in keyof TipoCredenciais]: k } = {
|
|||
IMA: "IMA",
|
||||
FEPAM: "FEPAM",
|
||||
FEAM: "FEAM",
|
||||
teste: "teste",
|
||||
} as const
|
||||
|
||||
export const objetoCredencial: { [k in keyof typeof orgaos]: z.ZodObject } = {
|
||||
|
|
@ -107,7 +106,6 @@ export const objetoCredencial: { [k in keyof typeof orgaos]: z.ZodObject } = {
|
|||
IMA: zCredenciais,
|
||||
FEPAM: zCredenciais,
|
||||
FEAM: zCredenciais,
|
||||
teste: teste,
|
||||
}
|
||||
|
||||
export type TipoCredenciais = Partial<{
|
||||
|
|
@ -118,9 +116,18 @@ export type TipoCredenciais = Partial<{
|
|||
IMA: z.infer<typeof zCredenciais>
|
||||
FEPAM: z.infer<typeof zCredenciais>
|
||||
FEAM: z.infer<typeof zCredenciais>
|
||||
teste: z.infer<typeof teste>
|
||||
}>
|
||||
|
||||
export const zTipoCredenciais: z.ZodType<TipoCredenciais> = z.object({
|
||||
SINIR: zCredenciaisSinir.optional(),
|
||||
IEMA: zCredenciais.optional(),
|
||||
INEA: zCredenciais.optional(),
|
||||
SIGOR: zCredenciais.optional(),
|
||||
IMA: zCredenciais.optional(),
|
||||
FEPAM: zCredenciais.optional(),
|
||||
FEAM: zCredenciais.optional(),
|
||||
})
|
||||
|
||||
export type TipoCredenciaisLista = {
|
||||
[K in keyof TipoCredenciais]: {
|
||||
K: TipoCredenciais[K]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue