import { AuthenticationClient } from "../../clients" ; import { RegisterRequest as Request } from "../../common" ; import { throwOnPasswordPolicyViolation } from "../../utilities" ; import { handler } from "../_" ; import schema = require ( "../../common/events/register/index.json" ) ; param event return export const post = handler < { } , Request > ( schema , async ( { body : { email , password } } ) => { throwOnPasswordPolicyViolation ( password ) ; const auth = new AuthenticationClient ( ) ; await auth . register ( email , password ) ; } ) ;