import { getGroupsCustomAttributeName , parseGroupsAttribute , PreTokenGenerationEvent } from "./helpers" ; param event returns { Promise < * > } export const handler = async ( event ) : Promise < PreTokenGenerationEvent > => { event . response . claimsOverrideDetails = { groupOverrideDetails : { groupsToOverride : [ ... event . request . groupConfiguration . groupsToOverride , ... parseGroupsAttribute ( event . request . userAttributes [ getGroupsCustomAttributeName ( ) ] ) ] } } ; return event ; } ;