Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 14 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1637,11 +1637,9 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'error',
},
},

/**
* ResponseOps overrides
*/

{
files: [
'src/platform/packages/shared/response-ops/**/*.{ts, tsx}',
Expand All @@ -1650,6 +1648,20 @@ module.exports = {
'x-pack/platform/plugins/shared/stack_alerts/**/*.{ts, tsx}',
'x-pack/platform/plugins/shared/stack_connectors/**/*.{ts, tsx}',
'x-pack/platform/plugins/shared/triggers_actions_ui/**/*.{ts, tsx}',
'x-pack/platform/plugins/shared/event_log/**/*.{ts, tsx}',
'x-pack/platform/plugins/shared/rule_registry/**/*.{ts, tsx}',
'x-pack/platform/plugins/shared/task_manager/**/*.{ts, tsx}',
'x-pack/solutions/observability/packages/kbn-alerts-grouping/**/*.{ts, tsx}',
'src/platform/packages/shared/kbn-alerts-ui-shared/**/*.{ts, tsx}',
'src/platform/packages/shared/kbn-alerting-types/**/*.{ts, tsx}',
'src/platform/packages/shared/kbn-cases-components/**/*.{ts, tsx}',
'src/platform/packages/shared/kbn-actions-types/**/*.{ts, tsx}',
'src/platform/packages/shared/kbn-alerts-as-data-utils/**/*.{ts, tsx}',
'src/platform/packages/shared/kbn-grouping/**/*.{ts, tsx}',
'src/platform/packages/shared/kbn-rrule/**/*.{ts, tsx}',
'src/platform/packages/shared/kbn-rule-data-utils/**/*.{ts, tsx}',
'src/platform/packages/shared/kbn-triggers-actions-ui-types/**/*.{ts, tsx}',
'x-pack/platform/packages/shared/kbn-alerting-comparators/**/*.{ts, tsx}',
'x-pack/platform/plugins/shared/embeddable_alerts_table/**/*.{ts,tsx}',
'x-pack/test/alerting_api_integration/**/*.{ts, tsx}',
'x-pack/test/cases_api_integration/**/*.{ts, tsx}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { SerializedFieldFormat } from '@kbn/field-formats-plugin/common';
import type { SerializedFieldFormat } from '@kbn/field-formats-plugin/common';
import type { IFieldSubType } from '@kbn/es-query';
import type { RuntimeField } from '@kbn/data-views-plugin/common';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { TechnicalRuleDataFieldName } from '@kbn/rule-data-utils';
import { JsonValue } from '@kbn/utility-types';
import type { TechnicalRuleDataFieldName } from '@kbn/rule-data-utils';
import type { JsonValue } from '@kbn/utility-types';

export interface MetaAlertFields {
_id: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import { i18n } from '@kbn/i18n';
import { ActionGroup } from './action_group_types';
import type { ActionGroup } from './action_group_types';

export const RecoveredActionGroup: Readonly<ActionGroup<'recovered'>> = Object.freeze({
id: 'recovered',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import type { LicenseType } from '@kbn/licensing-plugin/common/types';
import type { RecoveredActionGroupId, DefaultActionGroupId } from './builtin_action_groups_types';
import { ActionGroup } from './action_group_types';
import { ActionVariable } from './action_variable';
import type { ActionGroup } from './action_group_types';
import type { ActionVariable } from './action_variable';

interface ConsumerPrivileges {
read: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import {
TAGS,
ALERT_INTENDED_TIMESTAMP,
} from '@kbn/rule-data-utils';
import { MultiField } from './types';
import type { MultiField } from './types';

export const alertFieldMap = {
[ALERT_ACTION_GROUP]: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import { EcsFlat } from '@elastic/ecs';
import { EcsMetadata, FieldMap } from './types';
import type { EcsMetadata, FieldMap } from './types';

const EXCLUDED_TYPES = ['constant_keyword'];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import fs from 'fs';
import path from 'path';
import { set } from '@kbn/safer-lodash-set';
import { get } from 'lodash';
import { FieldMap } from '../..';
import { createLineWriter, LineWriter } from './lib/line_writer';
import type { FieldMap } from '../..';
import type { LineWriter } from './lib/line_writer';
import { createLineWriter } from './lib/line_writer';

const PLUGIN_DIR = path.resolve(path.join(__dirname, '..'));

Expand Down Expand Up @@ -266,7 +267,7 @@ const SchemaFileTemplate = `
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
%%IMPORTS%%
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
export const IsoDateString = new rt.Type<string, string, unknown>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';

const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
export const IsoDateString = new rt.Type<string, string, unknown>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
export const IsoDateString = new rt.Type<string, string, unknown>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';

const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
export const IsoDateString = new rt.Type<string, string, unknown>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';

const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
export const IsoDateString = new rt.Type<string, string, unknown>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
export const IsoDateString = new rt.Type<string, string, unknown>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
export const IsoDateString = new rt.Type<string, string, unknown>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
import { LegacyAlertSchema } from './legacy_alert_schema';
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
import { EcsSchema } from './ecs_schema';
import { LegacyAlertSchema } from './legacy_alert_schema';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
import { EcsSchema } from './ecs_schema';
import { LegacyAlertSchema } from './legacy_alert_schema';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
import { EcsSchema } from './ecs_schema';
import { LegacyAlertSchema } from './legacy_alert_schema';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
import { EcsSchema } from './ecs_schema';
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
import { LegacyAlertSchema } from './legacy_alert_schema';
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
import { EcsSchema } from './ecs_schema';
import { LegacyAlertSchema } from './legacy_alert_schema';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
import { EcsSchema } from './ecs_schema';
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// this file was generated, and should not be edited by hand
// ---------------------------------- WARNING ----------------------------------
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import type { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
export const IsoDateString = new rt.Type<string, string, unknown>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import {
import type {
ActionContextVariablesFlatten,
ActionVariable,
SummaryActionContextVariablesFlatten,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
*/

import { partition } from 'lodash';
import { ActionVariable } from '@kbn/alerting-types';
import { ActionGroupWithMessageVariables, ActionVariables } from '@kbn/triggers-actions-ui-types';
import type { ActionVariable } from '@kbn/alerting-types';
import type {
ActionGroupWithMessageVariables,
ActionVariables,
} from '@kbn/triggers-actions-ui-types';
import { transformActionVariables } from './transforms';

export const getAvailableActionVariables = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { ActionVariables, RuleType } from '@kbn/triggers-actions-ui-types';
import type { ActionVariables, RuleType } from '@kbn/triggers-actions-ui-types';
import { transformActionVariables } from './transforms';
import { ALERTING_FEATURE_ID } from '../common/constants';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { ActionVariable } from '@kbn/alerting-types';
import type { ActionVariable } from '@kbn/alerting-types';
import type { ActionVariables, OmitMessageVariablesType } from '@kbn/triggers-actions-ui-types';
import {
ActionVariables,
OmitMessageVariablesType,
REQUIRED_ACTION_VARIABLES,
CONTEXT_ACTION_VARIABLES,
} from '@kbn/triggers-actions-ui-types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
*/

import { ALERT_RULE_NAME, ALERT_STATUS } from '@kbn/rule-data-utils';
import { OptionsListControlState } from '@kbn/controls-plugin/public';
import type { OptionsListControlState } from '@kbn/controls-plugin/public';
import { i18n } from '@kbn/i18n';
import { FilterControlConfig } from './types';
import type { FilterControlConfig } from './types';

export const DEFAULT_CONTROLS: FilterControlConfig[] = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { ControlGroupRuntimeState } from '@kbn/controls-plugin/public';
import type { ControlGroupRuntimeState } from '@kbn/controls-plugin/public';
import type { Storage } from '@kbn/kibana-utils-plugin/public';
import { useEffect, useRef, useState } from 'react';
import type { Dispatch, SetStateAction } from 'react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { ViewMode } from '@kbn/presentation-publishing';
import type { ViewMode } from '@kbn/presentation-publishing';
import { useCallback, useEffect, useState } from 'react';

interface UseViewEditModeArgs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import type { ControlGroupRuntimeState } from '@kbn/controls-plugin/public';
import { Filter } from '@kbn/es-query';
import type { Filter } from '@kbn/es-query';
import { BehaviorSubject } from 'rxjs';

export const controlGroupFilterOutputMock$ = new BehaviorSubject<Filter[] | undefined>([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { ControlGroupRuntimeState, OptionsListControlState } from '@kbn/controls-plugin/public';
import { Filter } from '@kbn/es-query';
import type {
ControlGroupRuntimeState,
OptionsListControlState,
} from '@kbn/controls-plugin/public';
import type { Filter } from '@kbn/es-query';
import { ALERT_DURATION, ALERT_RULE_NAME, ALERT_START, ALERT_STATUS } from '@kbn/rule-data-utils';

export interface ControlGroupOutput {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import type { Filter } from '@kbn/es-query';
import type { ToastsStart, HttpStart } from '@kbn/core/public';
import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public';
import { DataPublicPluginStart } from '@kbn/data-plugin/public';
import type { DataPublicPluginStart } from '@kbn/data-plugin/public';

export type QueryLanguageType = 'lucene' | 'kuery';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { ActionType } from '@kbn/actions-types';
import { PreConfiguredActionConnector } from '../common/types';
import type { ActionType } from '@kbn/actions-types';
import type { PreConfiguredActionConnector } from '../common/types';
import {
checkActionFormActionTypeEnabled,
checkActionTypeEnabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { ActionType } from '@kbn/actions-types';
import { ActionConnector } from '../common/types';
import type { ActionType } from '@kbn/actions-types';
import type { ActionConnector } from '../common/types';
import './check_action_type_enabled.scss';
import { configurationCheckResult, getLicenseCheckResult } from './get_license_check_result';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { HttpSetup } from '@kbn/core/public';
import { AsApiContract } from '@kbn/actions-types';
import { AlertingFrameworkHealth, AlertsHealth } from '@kbn/alerting-types';
import type { HttpSetup } from '@kbn/core/public';
import type { AsApiContract } from '@kbn/actions-types';
import type { AlertingFrameworkHealth, AlertsHealth } from '@kbn/alerting-types';
import { BASE_ALERTING_API_PATH } from '../../constants';
import { transformAlertingFrameworkHealthResponse, transformAlertsHealthResponse } from '.';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { AsApiContract, RewriteRequestCase } from '@kbn/actions-types';
import { AlertingFrameworkHealth, AlertsHealth } from '@kbn/alerting-types';
import type { AsApiContract, RewriteRequestCase } from '@kbn/actions-types';
import type { AlertingFrameworkHealth, AlertsHealth } from '@kbn/alerting-types';

export const transformAlertsHealthResponse: RewriteRequestCase<AlertsHealth> = ({
decryption_health: decryptionHealth,
Expand Down
Loading