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
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import {
ALERT_STATUS_ACTIVE,
ALERT_STATUS_RECOVERED,
ALERT_STATUS_UNTRACKED,
} from '@kbn/rule-data-utils';

export const ALERT_STATUSES = [ALERT_STATUS_ACTIVE, ALERT_STATUS_RECOVERED, ALERT_STATUS_UNTRACKED];
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ export function getConnectorType(
actionParams: ObsAIAssistantActionParams
): Promise<GenericValidationResult<ObsAIAssistantActionParams>> => {
const validationResult = {
errors: { connector: new Array<string>(), message: new Array<string>() },
errors: {
connector: [] as string[],
message: [] as string[],
prompts: [] as string[],
},
};

if (!actionParams.connector) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@

export interface ObsAIAssistantActionParams {
connector: string;
message: string;
prompts?: Array<{
message: string;
statuses: string[];
}>;
message?: string; // this is a legacy field
}
Loading