import { SerializedPolicy } from '../../../common/types' ; import { defaultRolloverAction } from '../constants' ; export const isUsingDefaultRollover = ( policy ) : boolean => { const rollover = policy ?. phases ?. hot ?. actions ?. rollover ; return Boolean ( rollover && rollover . max_age === defaultRolloverAction . max_age && rollover . max_docs === defaultRolloverAction . max_docs && rollover . max_primary_shard_size === defaultRolloverAction . max_primary_shard_size ) ; } ;