mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
## Summary Removes RuleTypeSchema in favor of Type for TypeScript. Does break out one function called `parseScheduleDates` into its own file to remove a circular ref issue.
20 lines
749 B
TypeScript
20 lines
749 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
import { EntriesArray } from '../shared_imports';
|
|
import { Type } from './schemas/common/schemas';
|
|
|
|
export const hasLargeValueList = (entries: EntriesArray): boolean => {
|
|
const found = entries.filter(({ type }) => type === 'list');
|
|
return found.length > 0;
|
|
};
|
|
|
|
export const hasNestedEntry = (entries: EntriesArray): boolean => {
|
|
const found = entries.filter(({ type }) => type === 'nested');
|
|
return found.length > 0;
|
|
};
|
|
|
|
export const isThresholdRule = (ruleType: Type) => ruleType === 'threshold';
|