import { schema } from '@kbn/config-schema' ; import { LicensingRouter } from '../../types' ; export function registerNotifyFeatureUsageRoute ( router ) { router . post ( { path : '/internal/licensing/feature_usage/notify' , validate : { body : schema . object ( { featureName : schema . string ( ) , lastUsed : schema . number ( ) , } ) , } , } , async ( context , request , response ) => { const { featureName , lastUsed } = request . body ; context . licensing . featureUsage . notifyUsage ( featureName , lastUsed ) ; return response . ok ( { body : { success : true , } , } ) ; } ) ; }