Skip to content

Commit

Permalink
fixed typing
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Feb 11, 2020
1 parent f48721e commit 059dcab
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface ScheduledExecutionOptions {
context: Context;
state: State;
}

export type AlertInstances = Record<string, AlertInstance>;
export class AlertInstance {
private scheduledExecutionOptions?: ScheduledExecutionOptions;
private meta: AlertInstanceMeta;
Expand Down
3 changes: 2 additions & 1 deletion x-pack/legacy/plugins/alerting/server/alerts_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
AlertType,
IntervalSchedule,
SanitizedAlert,
AlertTaskState,
} from './types';
import { validateAlertTypeParams } from './lib';
import {
Expand All @@ -31,7 +32,7 @@ import {
} from '../../../../plugins/security/server';
import { EncryptedSavedObjectsPluginStart } from '../../../../plugins/encrypted_saved_objects/server';
import { TaskManagerStartContract } from '../../../../plugins/task_manager/server';
import { AlertTaskState, taskInstanceToAlertTaskInstance } from './task_runner/alert_task_instance';
import { taskInstanceToAlertTaskInstance } from './task_runner/alert_task_instance';

type NormalizedAlertAction = Omit<AlertAction, 'actionTypeId'>;
export type CreateAPIKeyResult =
Expand Down
1 change: 0 additions & 1 deletion x-pack/legacy/plugins/alerting/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ export type AlertsClient = PublicMethodsOf<AlertsClientClass>;

export { init } from './init';
export { AlertType, AlertingPlugin, AlertExecutorOptions } from './types';
export { AlertTaskState } from './task_runner';
export { PluginSetupContract, PluginStartContract } from './plugin';
1 change: 0 additions & 1 deletion x-pack/legacy/plugins/alerting/server/task_runner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/

export { AlertTaskState } from './alert_task_instance';
export { TaskRunnerFactory } from './task_runner_factory';
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ import {
Services,
AlertInfoParams,
RawAlertInstance,
AlertTaskState,
} from '../types';
import { promiseResult, map, Resultable, asOk, asErr, resolveErr } from '../lib/result_type';
import {
AlertTaskState,
AlertInstances,
taskInstanceToAlertTaskInstance,
} from './alert_task_instance';
import { taskInstanceToAlertTaskInstance } from './alert_task_instance';
import { AlertInstances } from '../alert_instance/alert_instance';

const FALLBACK_RETRY_INTERVAL: IntervalSchedule = { interval: '5m' };

Expand Down

0 comments on commit 059dcab

Please sign in to comment.