[[reference-shared-types-watcher]] //////// =========================================================================================================================== || || || || || || || ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ || || ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ || || ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ || || ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ || || ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ || || ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ || || || || || || This file is autogenerated, DO NOT send pull requests that changes this file directly. || || You should update the script that does the generation, which can be found in: || || https://github.com/elastic/elastic-client-generator-js || || || || You can run the script with the following command: || || npm run elasticsearch -- --version || || || || || || || =========================================================================================================================== //////// == Shared Watcher types [discrete] [[WatcherAcknowledgeState]] === WatcherAcknowledgeState [pass] ++++
++++
interface WatcherAcknowledgeState {
  state: <>
  timestamp: <>
}
[pass]
++++
++++ [discrete] [[WatcherAcknowledgementOptions]] === WatcherAcknowledgementOptions [pass] ++++
++++
type WatcherAcknowledgementOptions = 'awaits_successful_execution' | 'ackable' | 'acked'
[pass]
++++
++++ [discrete] [[WatcherAction]] === WatcherAction [pass] ++++
++++
interface WatcherAction {
  action_type?: <>
  condition?: <>
  foreach?: string
  max_iterations?: <>
  name?: <>
  throttle_period?: <>
  throttle_period_in_millis?: <><<>>
  transform?: <>
  index?: <>
  logging?: <>
  email?: <>
  pagerduty?: <>
  slack?: <>
  webhook?: <>
}
[pass]
++++
++++ [discrete] [[WatcherActionExecutionMode]] === WatcherActionExecutionMode [pass] ++++
++++
type WatcherActionExecutionMode = 'simulate' | 'force_simulate' | 'execute' | 'force_execute' | 'skip'
[pass]
++++
++++ [discrete] [[WatcherActionStatus]] === WatcherActionStatus [pass] ++++
++++
interface WatcherActionStatus {
  ack: <>
  last_execution?: <>
  last_successful_execution?: <>
  last_throttle?: <>
}
[pass]
++++
++++ [discrete] [[WatcherActionStatusOptions]] === WatcherActionStatusOptions [pass] ++++
++++
type WatcherActionStatusOptions = 'success' | 'failure' | 'simulated' | 'throttled'
[pass]
++++
++++ [discrete] [[WatcherActionType]] === WatcherActionType [pass] ++++
++++
type WatcherActionType = 'email' | 'webhook' | 'index' | 'logging' | 'slack' | 'pagerduty'
[pass]
++++
++++ [discrete] [[WatcherActions]] === WatcherActions [pass] ++++
++++
type WatcherActions = Record<<>, <>>
[pass]
++++
++++ [discrete] [[WatcherActivationState]] === WatcherActivationState [pass] ++++
++++
interface WatcherActivationState {
  active: boolean
  timestamp: <>
}
[pass]
++++
++++ [discrete] [[WatcherActivationStatus]] === WatcherActivationStatus [pass] ++++
++++
interface WatcherActivationStatus {
  actions: <>
  state: <>
  version: <>
}
[pass]
++++
++++ [discrete] [[WatcherAlwaysCondition]] === WatcherAlwaysCondition [pass] ++++
++++
interface WatcherAlwaysCondition {
}
[pass]
++++
++++ [discrete] [[WatcherArrayCompareCondition]] === WatcherArrayCompareCondition [pass] ++++
++++
interface WatcherArrayCompareConditionKeys {
  path: string
}
type WatcherArrayCompareCondition = WatcherArrayCompareConditionKeys
  & { [property: string]: <> | string }
[pass]
++++
++++ [discrete] [[WatcherArrayCompareOpParams]] === WatcherArrayCompareOpParams [pass] ++++
++++
interface WatcherArrayCompareOpParams {
  quantifier: <>
  value: <>
}
[pass]
++++
++++ [discrete] [[WatcherChainInput]] === WatcherChainInput [pass] ++++
++++
interface WatcherChainInput {
  inputs: Partial>>>[]
}
[pass]
++++
++++ [discrete] [[WatcherConditionContainer]] === WatcherConditionContainer [pass] ++++
++++
interface WatcherConditionContainer {
  always?: <>
  array_compare?: Partial>>>
  compare?: Partial>, <>>>>>
  never?: <>
  script?: <>
}
[pass]
++++
++++ [discrete] [[WatcherConditionOp]] === WatcherConditionOp [pass] ++++
++++
type WatcherConditionOp = 'not_eq' | 'eq' | 'lt' | 'gt' | 'lte' | 'gte'
[pass]
++++
++++ [discrete] [[WatcherConditionType]] === WatcherConditionType [pass] ++++
++++
type WatcherConditionType = 'always' | 'never' | 'script' | 'compare' | 'array_compare'
[pass]
++++
++++ [discrete] [[WatcherConnectionScheme]] === WatcherConnectionScheme [pass] ++++
++++
type WatcherConnectionScheme = 'http' | 'https'
[pass]
++++
++++ [discrete] [[WatcherCronExpression]] === WatcherCronExpression [pass] ++++
++++
type WatcherCronExpression = string
[pass]
++++
++++ [discrete] [[WatcherDailySchedule]] === WatcherDailySchedule [pass] ++++
++++
interface WatcherDailySchedule {
  at: <>[]
}
[pass]
++++
++++ [discrete] [[WatcherDataAttachmentFormat]] === WatcherDataAttachmentFormat [pass] ++++
++++
type WatcherDataAttachmentFormat = 'json' | 'yaml'
[pass]
++++
++++ [discrete] [[WatcherDataEmailAttachment]] === WatcherDataEmailAttachment [pass] ++++
++++
interface WatcherDataEmailAttachment {
  format?: <>
}
[pass]
++++
++++ [discrete] [[WatcherDay]] === WatcherDay [pass] ++++
++++
type WatcherDay = 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'
[pass]
++++
++++ [discrete] [[WatcherEmail]] === WatcherEmail [pass] ++++
++++
interface WatcherEmail {
  id?: <>
  bcc?: string[]
  body?: <>
  cc?: string[]
  from?: string
  priority?: <>
  reply_to?: string[]
  sent_date?: <>
  subject: string
  to: string[]
  attachments?: Record>>
}
[pass]
++++
++++ [discrete] [[WatcherEmailAction]] === WatcherEmailAction [pass] ++++
++++
interface WatcherEmailAction extends <> {
}
[pass]
++++
++++ [discrete] [[WatcherEmailAttachmentContainer]] === WatcherEmailAttachmentContainer [pass] ++++
++++
interface WatcherEmailAttachmentContainer {
  http?: <>
  reporting?: <>
  data?: <>
}
[pass]
++++
++++ [discrete] [[WatcherEmailBody]] === WatcherEmailBody [pass] ++++
++++
interface WatcherEmailBody {
  html?: string
  text?: string
}
[pass]
++++
++++ [discrete] [[WatcherEmailPriority]] === WatcherEmailPriority [pass] ++++
++++
type WatcherEmailPriority = 'lowest' | 'low' | 'normal' | 'high' | 'highest'
[pass]
++++
++++ [discrete] [[WatcherEmailResult]] === WatcherEmailResult [pass] ++++
++++
interface WatcherEmailResult {
  account?: string
  message: <>
  reason?: string
}
[pass]
++++
++++ [discrete] [[WatcherExecutionPhase]] === WatcherExecutionPhase [pass] ++++
++++
type WatcherExecutionPhase = 'awaits_execution' | 'started' | 'input' | 'condition' | 'actions' | 'watch_transform' | 'aborted' | 'finished'
[pass]
++++
++++ [discrete] [[WatcherExecutionResult]] === WatcherExecutionResult [pass] ++++
++++
interface WatcherExecutionResult {
  actions: <>[]
  condition: <>
  execution_duration: <><<>>
  execution_time: <>
  input: <>
}
[pass]
++++
++++ [discrete] [[WatcherExecutionResultAction]] === WatcherExecutionResultAction [pass] ++++
++++
interface WatcherExecutionResultAction {
  email?: <>
  id: <>
  index?: <>
  logging?: <>
  pagerduty?: <>
  reason?: string
  slack?: <>
  status: <>
  type: <>
  webhook?: <>
  error?: <>
}
[pass]
++++
++++ [discrete] [[WatcherExecutionResultCondition]] === WatcherExecutionResultCondition [pass] ++++
++++
interface WatcherExecutionResultCondition {
  met: boolean
  status: <>
  type: <>
}
[pass]
++++
++++ [discrete] [[WatcherExecutionResultInput]] === WatcherExecutionResultInput [pass] ++++
++++
interface WatcherExecutionResultInput {
  payload: Record
  status: <>
  type: <>
}
[pass]
++++
++++ [discrete] [[WatcherExecutionState]] === WatcherExecutionState [pass] ++++
++++
interface WatcherExecutionState {
  successful: boolean
  timestamp: <>
  reason?: string
}
[pass]
++++
++++ [discrete] [[WatcherExecutionStatus]] === WatcherExecutionStatus [pass] ++++
++++
type WatcherExecutionStatus = 'awaits_execution' | 'checking' | 'execution_not_needed' | 'throttled' | 'executed' | 'failed' | 'deleted_while_queued' | 'not_executed_already_queued'
[pass]
++++
++++ [discrete] [[WatcherExecutionThreadPool]] === WatcherExecutionThreadPool [pass] ++++
++++
interface WatcherExecutionThreadPool {
  max_size: <>
  queue_size: <>
}
[pass]
++++
++++ [discrete] [[WatcherHourAndMinute]] === WatcherHourAndMinute [pass] ++++
++++
interface WatcherHourAndMinute {
  hour: <>[]
  minute: <>[]
}
[pass]
++++
++++ [discrete] [[WatcherHourlySchedule]] === WatcherHourlySchedule [pass] ++++
++++
interface WatcherHourlySchedule {
  minute: <>[]
}
[pass]
++++
++++ [discrete] [[WatcherHttpEmailAttachment]] === WatcherHttpEmailAttachment [pass] ++++
++++
interface WatcherHttpEmailAttachment {
  content_type?: string
  inline?: boolean
  request?: <>
}
[pass]
++++
++++ [discrete] [[WatcherHttpInput]] === WatcherHttpInput [pass] ++++
++++
interface WatcherHttpInput {
  extract?: string[]
  request?: <>
  response_content_type?: <>
}
[pass]
++++
++++ [discrete] [[WatcherHttpInputAuthentication]] === WatcherHttpInputAuthentication [pass] ++++
++++
interface WatcherHttpInputAuthentication {
  basic: <>
}
[pass]
++++
++++ [discrete] [[WatcherHttpInputBasicAuthentication]] === WatcherHttpInputBasicAuthentication [pass] ++++
++++
interface WatcherHttpInputBasicAuthentication {
  password: <>
  username: <>
}
[pass]
++++
++++ [discrete] [[WatcherHttpInputMethod]] === WatcherHttpInputMethod [pass] ++++
++++
type WatcherHttpInputMethod = 'head' | 'get' | 'post' | 'put' | 'delete'
[pass]
++++
++++ [discrete] [[WatcherHttpInputProxy]] === WatcherHttpInputProxy [pass] ++++
++++
interface WatcherHttpInputProxy {
  host: <>
  port: <>
}
[pass]
++++
++++ [discrete] [[WatcherHttpInputRequestDefinition]] === WatcherHttpInputRequestDefinition [pass] ++++
++++
interface WatcherHttpInputRequestDefinition {
  auth?: <>
  body?: string
  connection_timeout?: <>
  headers?: Record
  host?: <>
  method?: <>
  params?: Record
  path?: string
  port?: <>
  proxy?: <>
  read_timeout?: <>
  scheme?: <>
  url?: string
}
[pass]
++++
++++ [discrete] [[WatcherHttpInputRequestResult]] === WatcherHttpInputRequestResult [pass] ++++
++++
interface WatcherHttpInputRequestResult extends <> {
}
[pass]
++++
++++ [discrete] [[WatcherHttpInputResponseResult]] === WatcherHttpInputResponseResult [pass] ++++
++++
interface WatcherHttpInputResponseResult {
  body: string
  headers: <>
  status: <>
}
[pass]
++++
++++ [discrete] [[WatcherIndexAction]] === WatcherIndexAction [pass] ++++
++++
interface WatcherIndexAction {
  index: <>
  doc_id?: <>
  refresh?: <>
  op_type?: <>
  timeout?: <>
  execution_time_field?: <>
}
[pass]
++++
++++ [discrete] [[WatcherIndexResult]] === WatcherIndexResult [pass] ++++
++++
interface WatcherIndexResult {
  response: <>
}
[pass]
++++
++++ [discrete] [[WatcherIndexResultSummary]] === WatcherIndexResultSummary [pass] ++++
++++
interface WatcherIndexResultSummary {
  created: boolean
  id: <>
  index: <>
  result: <>
  version: <>
}
[pass]
++++
++++ [discrete] [[WatcherInputContainer]] === WatcherInputContainer [pass] ++++
++++
interface WatcherInputContainer {
  chain?: <>
  http?: <>
  search?: <>
  simple?: Record
}
[pass]
++++
++++ [discrete] [[WatcherInputType]] === WatcherInputType [pass] ++++
++++
type WatcherInputType = 'http' | 'search' | 'simple'
[pass]
++++
++++ [discrete] [[WatcherLoggingAction]] === WatcherLoggingAction [pass] ++++
++++
interface WatcherLoggingAction {
  level?: string
  text: string
  category?: string
}
[pass]
++++
++++ [discrete] [[WatcherLoggingResult]] === WatcherLoggingResult [pass] ++++
++++
interface WatcherLoggingResult {
  logged_text: string
}
[pass]
++++
++++ [discrete] [[WatcherMonth]] === WatcherMonth [pass] ++++
++++
type WatcherMonth = 'january' | 'february' | 'march' | 'april' | 'may' | 'june' | 'july' | 'august' | 'september' | 'october' | 'november' | 'december'
[pass]
++++
++++ [discrete] [[WatcherNeverCondition]] === WatcherNeverCondition [pass] ++++
++++
interface WatcherNeverCondition {
}
[pass]
++++
++++ [discrete] [[WatcherPagerDutyAction]] === WatcherPagerDutyAction [pass] ++++
++++
interface WatcherPagerDutyAction extends <> {
}
[pass]
++++
++++ [discrete] [[WatcherPagerDutyContext]] === WatcherPagerDutyContext [pass] ++++
++++
interface WatcherPagerDutyContext {
  href?: string
  src?: string
  type: <>
}
[pass]
++++
++++ [discrete] [[WatcherPagerDutyContextType]] === WatcherPagerDutyContextType [pass] ++++
++++
type WatcherPagerDutyContextType = 'link' | 'image'
[pass]
++++
++++ [discrete] [[WatcherPagerDutyEvent]] === WatcherPagerDutyEvent [pass] ++++
++++
interface WatcherPagerDutyEvent {
  account?: string
  attach_payload: boolean
  client?: string
  client_url?: string
  contexts?: <>[]
  context?: <>[]
  description: string
  event_type?: <>
  incident_key: string
  proxy?: <>
}
[pass]
++++
++++ [discrete] [[WatcherPagerDutyEventProxy]] === WatcherPagerDutyEventProxy [pass] ++++
++++
interface WatcherPagerDutyEventProxy {
  host?: <>
  port?: <>
}
[pass]
++++
++++ [discrete] [[WatcherPagerDutyEventType]] === WatcherPagerDutyEventType [pass] ++++
++++
type WatcherPagerDutyEventType = 'trigger' | 'resolve' | 'acknowledge'
[pass]
++++
++++ [discrete] [[WatcherPagerDutyResult]] === WatcherPagerDutyResult [pass] ++++
++++
interface WatcherPagerDutyResult {
  event: <>
  reason?: string
  request?: <>
  response?: <>
}
[pass]
++++
++++ [discrete] [[WatcherQuantifier]] === WatcherQuantifier [pass] ++++
++++
type WatcherQuantifier = 'some' | 'all'
[pass]
++++
++++ [discrete] [[WatcherQueryWatch]] === WatcherQueryWatch [pass] ++++
++++
interface WatcherQueryWatch {
  _id: <>
  status?: <>
  watch?: <>
  _primary_term?: <>
  _seq_no?: <>
}
[pass]
++++
++++ [discrete] [[WatcherReportingEmailAttachment]] === WatcherReportingEmailAttachment [pass] ++++
++++
interface WatcherReportingEmailAttachment {
  url: string
  inline?: boolean
  retries?: <>
  interval?: <>
  request?: <>
}
[pass]
++++
++++ [discrete] [[WatcherResponseContentType]] === WatcherResponseContentType [pass] ++++
++++
type WatcherResponseContentType = 'json' | 'yaml' | 'text'
[pass]
++++
++++ [discrete] [[WatcherScheduleContainer]] === WatcherScheduleContainer [pass] ++++
++++
interface WatcherScheduleContainer {
  cron?: <>
  daily?: <>
  hourly?: <>
  interval?: <>
  monthly?: <> | <>[]
  weekly?: <> | <>[]
  yearly?: <> | <>[]
}
[pass]
++++
++++ [discrete] [[WatcherScheduleTimeOfDay]] === WatcherScheduleTimeOfDay [pass] ++++
++++
type WatcherScheduleTimeOfDay = string | <>
[pass]
++++
++++ [discrete] [[WatcherScheduleTriggerEvent]] === WatcherScheduleTriggerEvent [pass] ++++
++++
interface WatcherScheduleTriggerEvent {
  scheduled_time: <>
  triggered_time?: <>
}
[pass]
++++
++++ [discrete] [[WatcherScriptCondition]] === WatcherScriptCondition [pass] ++++
++++
interface WatcherScriptCondition {
  lang?: string
  params?: Record
  source?: string
  id?: string
}
[pass]
++++
++++ [discrete] [[WatcherSearchInput]] === WatcherSearchInput [pass] ++++
++++
interface WatcherSearchInput {
  extract?: string[]
  request: <>
  timeout?: <>
}
[pass]
++++
++++ [discrete] [[WatcherSearchInputRequestBody]] === WatcherSearchInputRequestBody [pass] ++++
++++
interface WatcherSearchInputRequestBody {
  query: <>
}
[pass]
++++
++++ [discrete] [[WatcherSearchInputRequestDefinition]] === WatcherSearchInputRequestDefinition [pass] ++++
++++
interface WatcherSearchInputRequestDefinition {
  body?: <>
  indices?: <>[]
  indices_options?: <>
  search_type?: <>
  template?: <>
  rest_total_hits_as_int?: boolean
}
[pass]
++++
++++ [discrete] [[WatcherSearchTemplateRequestBody]] === WatcherSearchTemplateRequestBody [pass] ++++
++++
interface WatcherSearchTemplateRequestBody {
  explain?: boolean
  pass:[/**] @property id ID of the search template to use. If no source is specified, this parameter is required. */
  id?: <>
  params?: Record
  profile?: boolean
  pass:[/**] @property source An inline search template. Supports the same parameters as the search API's request body. Also supports Mustache variables. If no id is specified, this parameter is required. */
  source?: string
}
[pass]
++++
++++ [discrete] [[WatcherSimulatedActions]] === WatcherSimulatedActions [pass] ++++
++++
interface WatcherSimulatedActions {
  actions: string[]
  all: <>
  use_all: boolean
}
[pass]
++++
++++ [discrete] [[WatcherSlackAction]] === WatcherSlackAction [pass] ++++
++++
interface WatcherSlackAction {
  account?: string
  message: <>
}
[pass]
++++
++++ [discrete] [[WatcherSlackAttachment]] === WatcherSlackAttachment [pass] ++++
++++
interface WatcherSlackAttachment {
  author_icon?: string
  author_link?: string
  author_name: string
  color?: string
  fallback?: string
  fields?: <>[]
  footer?: string
  footer_icon?: string
  image_url?: string
  pretext?: string
  text?: string
  thumb_url?: string
  title: string
  title_link?: string
  ts?: <><<>>
}
[pass]
++++
++++ [discrete] [[WatcherSlackAttachmentField]] === WatcherSlackAttachmentField [pass] ++++
++++
interface WatcherSlackAttachmentField {
  <>: boolean
  title: string
  value: string
}
[pass]
++++
++++ [discrete] [[WatcherSlackDynamicAttachment]] === WatcherSlackDynamicAttachment [pass] ++++
++++
interface WatcherSlackDynamicAttachment {
  attachment_template: <>
  list_path: string
}
[pass]
++++
++++ [discrete] [[WatcherSlackMessage]] === WatcherSlackMessage [pass] ++++
++++
interface WatcherSlackMessage {
  attachments: <>[]
  dynamic_attachments?: <>
  from: string
  icon?: string
  text: string
  to: string[]
}
[pass]
++++
++++ [discrete] [[WatcherSlackResult]] === WatcherSlackResult [pass] ++++
++++
interface WatcherSlackResult {
  account?: string
  message: <>
}
[pass]
++++
++++ [discrete] [[WatcherThrottleState]] === WatcherThrottleState [pass] ++++
++++
interface WatcherThrottleState {
  reason: string
  timestamp: <>
}
[pass]
++++
++++ [discrete] [[WatcherTimeOfMonth]] === WatcherTimeOfMonth [pass] ++++
++++
interface WatcherTimeOfMonth {
  at: string[]
  on: <>[]
}
[pass]
++++
++++ [discrete] [[WatcherTimeOfWeek]] === WatcherTimeOfWeek [pass] ++++
++++
interface WatcherTimeOfWeek {
  at: string[]
  on: <>[]
}
[pass]
++++
++++ [discrete] [[WatcherTimeOfYear]] === WatcherTimeOfYear [pass] ++++
++++
interface WatcherTimeOfYear {
  at: string[]
  int: <>[]
  on: <>[]
}
[pass]
++++
++++ [discrete] [[WatcherTriggerContainer]] === WatcherTriggerContainer [pass] ++++
++++
interface WatcherTriggerContainer {
  schedule?: <>
}
[pass]
++++
++++ [discrete] [[WatcherTriggerEventContainer]] === WatcherTriggerEventContainer [pass] ++++
++++
interface WatcherTriggerEventContainer {
  schedule?: <>
}
[pass]
++++
++++ [discrete] [[WatcherTriggerEventResult]] === WatcherTriggerEventResult [pass] ++++
++++
interface WatcherTriggerEventResult {
  manual: <>
  triggered_time: <>
  type: string
}
[pass]
++++
++++ [discrete] [[WatcherWatch]] === WatcherWatch [pass] ++++
++++
interface WatcherWatch {
  actions: Record<<>, <>>
  condition: <>
  input: <>
  metadata?: <>
  status?: <>
  throttle_period?: <>
  throttle_period_in_millis?: <><<>>
  transform?: <>
  trigger: <>
}
[pass]
++++
++++ [discrete] [[WatcherWatchStatus]] === WatcherWatchStatus [pass] ++++
++++
interface WatcherWatchStatus {
  actions: <>
  last_checked?: <>
  last_met_condition?: <>
  state: <>
  version: <>
  execution_state?: string
}
[pass]
++++
++++ [discrete] [[WatcherWebhookAction]] === WatcherWebhookAction [pass] ++++
++++
interface WatcherWebhookAction extends <> {
}
[pass]
++++
++++ [discrete] [[WatcherWebhookResult]] === WatcherWebhookResult [pass] ++++
++++
interface WatcherWebhookResult {
  request: <>
  response?: <>
}
[pass]
++++
++++