import * as ts from '@terascope/utils' ; import { TimeSeriesFormat } from '../interfaces' ; export function getRolloverFrequency ( config ) { return ts . get ( config , [ 'index_schema' , 'rollover_frequency' ] , 'monthly' ) ; } export function getSchemaVersion ( config ) { return ts . get ( config , [ 'index_schema' , 'version' ] , 1 ) ; } export function getSchemaVersionStr ( config ) { return `s${ getSchemaVersion ( config ) }` ; } export function getDataVersion ( config ) { return ts . get ( config , [ 'version' ] , 1 ) ; } export function getDataVersionStr ( config ) { return `v${ getDataVersion ( config ) }` ; } export function formatIndexName ( strs ) { return strs . map ( ( val ) => ts . trim ( val ) ) . filter ( Boolean ) . join ( '-' ) ; }