Last active
March 16, 2023 19:25
-
-
Save isaacbatst/32070c56306a30c3a30f26d305e23077 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// undefined = nenhum parâmetro é necessário, enquanto que: | |
// z.object({ | |
// id: z.string({ | |
// invalid_type_error: 'INVALID_ID_TYPE', | |
// required_error: 'REQUIRED_ID', | |
// }), | |
//}) representa uma rota que espera os parâmetros no seguinte formato: { id: string } | |
const appRoutes = { | |
home: undefined, | |
myAccount: undefined, | |
products: undefined, | |
customerService: undefined, | |
notifications: undefined, | |
contracts: undefined, | |
contractVersionSelector: z.object({ | |
id: z.string({ | |
invalid_type_error: 'INVALID_ID_TYPE', | |
required_error: 'REQUIRED_ID', | |
}), | |
}, {invalid_type_error: 'INVALID_LINK_PARAMS', required_error: 'REQUIRED_LINK_PARAMS'}), | |
contract: z.object({ | |
id: z.string({ | |
invalid_type_error: 'INVALID_ID_TYPE', | |
required_error: 'REQUIRED_ID', | |
}), | |
}, {invalid_type_error: 'INVALID_LINK_PARAMS', required_error: 'REQUIRED_LINK_PARAMS'}), | |
contractWithdraw: z.object({ | |
id: z.string({ | |
invalid_type_error: 'INVALID_ID_TYPE', | |
required_error: 'REQUIRED_ID', | |
}), | |
}, {invalid_type_error: 'INVALID_LINK_PARAMS', required_error: 'REQUIRED_LINK_PARAMS'}), | |
transactions: undefined, | |
product: z.object({ | |
id: z.string({ | |
invalid_type_error: 'INVALID_ID_TYPE', | |
required_error: 'REQUIRED_ID', | |
}), | |
}, {invalid_type_error: 'INVALID_LINK_PARAMS', required_error: 'REQUIRED_LINK_PARAMS'}), | |
myAccountData: undefined, | |
changePassword: undefined, | |
changeEmail: undefined, | |
notificationsSettings: undefined, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment