# Describes the format for available Telegram bot services

send_message:
  fields:
    message:
      required: true
      example: The garage door has been open for 10 minutes.
      selector:
        text:
    title:
      example: "Your Garage Door Friend"
      selector:
        text:
    target:
      example: "[12345, 67890] or 12345"
      selector:
        object:
    parse_mode:
      selector:
        select:
          options:
            - "html"
            - "markdown"
            - "markdownv2"
            - "plain_text"
    disable_notification:
      selector:
        boolean:
    disable_web_page_preview:
      selector:
        boolean:
    timeout:
      selector:
        number:
          min: 1
          max: 3600
          unit_of_measurement: seconds
    keyboard:
      example: '["/command1, /command2", "/command3"]'
      selector:
        object:
    inline_keyboard:
      example:
        '["/button1, /button2", "/button3"] or ["Text button1:/button1, Text
        button2:/button2", "Text button3:/button3"] or [[["Text button1", "/button1"],
        ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
      selector:
        object:
    message_tag:
      example: "msg_to_edit"
      selector:
        text:
    reply_to_message_id:
      selector:
        number:
          mode: box
    message_thread_id:
      selector:
        number:
          mode: box

send_photo:
  fields:
    url:
      example: "http://example.org/path/to/the/image.png"
      selector:
        text:
    file:
      example: "/path/to/the/image.png"
      selector:
        text:
    caption:
      example: "My image"
      selector:
        text:
    username:
      example: myuser
      selector:
        text:
    password:
      example: myuser_pwd
      selector:
        text:
    authentication:
      default: digest
      selector:
        select:
          options:
            - "digest"
            - "bearer_token"
    target:
      example: "[12345, 67890] or 12345"
      selector:
        object:
    parse_mode:
      selector:
        select:
          options:
            - "html"
            - "markdown"
            - "markdownv2"
            - "plain_text"
    disable_notification:
      selector:
        boolean:
    verify_ssl:
      selector:
        boolean:
    timeout:
      selector:
        number:
          min: 1
          max: 3600
          unit_of_measurement: seconds
    keyboard:
      example: '["/command1, /command2", "/command3"]'
      selector:
        object:
    inline_keyboard:
      example:
        '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"],
        ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
      selector:
        object:
    message_tag:
      example: "msg_to_edit"
      selector:
        text:
    reply_to_message_id:
      selector:
        number:
          mode: box
    message_thread_id:
      selector:
        number:
          mode: box

send_sticker:
  fields:
    url:
      example: "http://example.org/path/to/the/sticker.webp"
      selector:
        text:
    file:
      example: "/path/to/the/sticker.webp"
      selector:
        text:
    sticker_id:
      example: CAACAgIAAxkBAAEDDldhZD-hqWclr6krLq-FWSfCrGNmOQAC9gAD9HsZAAFeYY-ltPYnrCEE
      selector:
        text:
    username:
      example: myuser
      selector:
        text:
    password:
      example: myuser_pwd
      selector:
        text:
    authentication:
      default: digest
      selector:
        select:
          options:
            - "digest"
            - "bearer_token"
    target:
      example: "[12345, 67890] or 12345"
      selector:
        object:
    disable_notification:
      selector:
        boolean:
    verify_ssl:
      selector:
        boolean:
    timeout:
      selector:
        number:
          min: 1
          max: 3600
          unit_of_measurement: seconds
    keyboard:
      example: '["/command1, /command2", "/command3"]'
      selector:
        object:
    inline_keyboard:
      example:
        '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"],
        ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
      selector:
        object:
    message_tag:
      example: "msg_to_edit"
      selector:
        text:
    reply_to_message_id:
      selector:
        number:
          mode: box
    message_thread_id:
      selector:
        number:
          mode: box

send_animation:
  fields:
    url:
      example: "http://example.org/path/to/the/animation.gif"
      selector:
        text:
    file:
      example: "/path/to/the/animation.gif"
      selector:
        text:
    caption:
      example: "My animation"
      selector:
        text:
    username:
      example: myuser
      selector:
        text:
    password:
      example: myuser_pwd
      selector:
        text:
    authentication:
      default: digest
      selector:
        select:
          options:
            - "digest"
            - "bearer_token"
    target:
      example: "[12345, 67890] or 12345"
      selector:
        object:
    parse_mode:
      selector:
        select:
          options:
            - "html"
            - "markdown"
            - "markdownv2"
            - "plain_text"
    disable_notification:
      selector:
        boolean:
    verify_ssl:
      selector:
        boolean:
    timeout:
      selector:
        number:
          min: 1
          max: 3600
          unit_of_measurement: seconds
    keyboard:
      example: '["/command1, /command2", "/command3"]'
      selector:
        object:
    inline_keyboard:
      example:
        '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"],
        ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
      selector:
        object:
    message_tag:
      example: "msg_to_edit"
      selector:
        text:
    reply_to_message_id:
      selector:
        number:
          mode: box
    message_thread_id:
      selector:
        number:
          mode: box

send_video:
  fields:
    url:
      example: "http://example.org/path/to/the/video.mp4"
      selector:
        text:
    file:
      example: "/path/to/the/video.mp4"
      selector:
        text:
    caption:
      example: "My video"
      selector:
        text:
    username:
      example: myuser
      selector:
        text:
    password:
      example: myuser_pwd
      selector:
        text:
    authentication:
      default: digest
      selector:
        select:
          options:
            - "digest"
            - "bearer_token"
    target:
      example: "[12345, 67890] or 12345"
      selector:
        object:
    parse_mode:
      selector:
        select:
          options:
            - "html"
            - "markdown"
            - "markdownv2"
            - "plain_text"
    disable_notification:
      selector:
        boolean:
    verify_ssl:
      selector:
        boolean:
    timeout:
      selector:
        number:
          min: 1
          max: 3600
          unit_of_measurement: seconds
    keyboard:
      example: '["/command1, /command2", "/command3"]'
      selector:
        object:
    inline_keyboard:
      example:
        '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"],
        ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
      selector:
        object:
    message_tag:
      example: "msg_to_edit"
      selector:
        text:
    reply_to_message_id:
      selector:
        number:
          mode: box
    message_thread_id:
      selector:
        number:
          mode: box

send_voice:
  fields:
    url:
      example: "http://example.org/path/to/the/voice.opus"
      selector:
        text:
    file:
      example: "/path/to/the/voice.opus"
      selector:
        text:
    caption:
      example: "My microphone recording"
      selector:
        text:
    username:
      example: myuser
      selector:
        text:
    password:
      example: myuser_pwd
      selector:
        text:
    authentication:
      default: digest
      selector:
        select:
          options:
            - "digest"
            - "bearer_token"
    target:
      example: "[12345, 67890] or 12345"
      selector:
        object:
    disable_notification:
      selector:
        boolean:
    verify_ssl:
      selector:
        boolean:
    timeout:
      selector:
        number:
          min: 1
          max: 3600
          unit_of_measurement: seconds
    keyboard:
      example: '["/command1, /command2", "/command3"]'
      selector:
        object:
    inline_keyboard:
      example:
        '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"],
        ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
      selector:
        object:
    message_tag:
      example: "msg_to_edit"
      selector:
        text:
    reply_to_message_id:
      selector:
        number:
          mode: box
    message_thread_id:
      selector:
        number:
          mode: box

send_document:
  fields:
    url:
      example: "http://example.org/path/to/the/document.odf"
      selector:
        text:
    file:
      example: "/tmp/whatever.odf"
      selector:
        text:
    caption:
      example: Document Title xy
      selector:
        text:
    username:
      example: myuser
      selector:
        text:
    password:
      example: myuser_pwd
      selector:
        text:
    authentication:
      default: digest
      selector:
        select:
          options:
            - "digest"
            - "bearer_token"
    target:
      example: "[12345, 67890] or 12345"
      selector:
        object:
    parse_mode:
      selector:
        select:
          options:
            - "html"
            - "markdown"
            - "markdownv2"
            - "plain_text"
    disable_notification:
      selector:
        boolean:
    verify_ssl:
      selector:
        boolean:
    timeout:
      selector:
        number:
          min: 1
          max: 3600
          unit_of_measurement: seconds
    keyboard:
      example: '["/command1, /command2", "/command3"]'
      selector:
        object:
    inline_keyboard:
      example:
        '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"],
        ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
      selector:
        object:
    message_tag:
      example: "msg_to_edit"
      selector:
        text:
    reply_to_message_id:
      selector:
        number:
          mode: box
    message_thread_id:
      selector:
        number:
          mode: box

send_location:
  fields:
    latitude:
      required: true
      selector:
        number:
          min: -90
          max: 90
          step: 0.001
          unit_of_measurement: "°"
    longitude:
      required: true
      selector:
        number:
          min: -180
          max: 180
          step: 0.001
          unit_of_measurement: "°"
    target:
      example: "[12345, 67890] or 12345"
      selector:
        object:
    disable_notification:
      selector:
        boolean:
    timeout:
      selector:
        number:
          min: 1
          max: 3600
          unit_of_measurement: seconds
    keyboard:
      example: '["/command1, /command2", "/command3"]'
      selector:
        object:
    inline_keyboard:
      example:
        '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"],
        ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
      selector:
        object:
    message_tag:
      example: "msg_to_edit"
      selector:
        text:
    reply_to_message_id:
      selector:
        number:
          mode: box
    message_thread_id:
      selector:
        number:
          mode: box

send_poll:
  fields:
    target:
      example: "[12345, 67890] or 12345"
      selector:
        object:
    question:
      required: true
      selector:
        text:
    options:
      required: true
      selector:
        object:
    is_anonymous:
      selector:
        boolean:
    allows_multiple_answers:
      selector:
        boolean:
    open_period:
      selector:
        number:
          min: 5
          max: 600
          unit_of_measurement: seconds
    disable_notification:
      selector:
        boolean:
    timeout:
      selector:
        number:
          min: 1
          max: 3600
          unit_of_measurement: seconds
    message_tag:
      example: "msg_to_edit"
      selector:
        text:
    reply_to_message_id:
      selector:
        number:
          mode: box
    message_thread_id:
      selector:
        number:
          mode: box

edit_message:
  fields:
    message_id:
      required: true
      example: "{{ trigger.event.data.message.message_id }}"
      selector:
        text:
    chat_id:
      required: true
      example: 12345
      selector:
        text:
    message:
      example: The garage door has been open for 10 minutes.
      selector:
        text:
    title:
      example: "Your Garage Door Friend"
      selector:
        text:
    parse_mode:
      selector:
        select:
          options:
            - "html"
            - "markdown"
            - "markdownv2"
            - "plain_text"
    disable_web_page_preview:
      selector:
        boolean:
    inline_keyboard:
      example:
        '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"],
        ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
      selector:
        object:

edit_caption:
  fields:
    message_id:
      required: true
      example: "{{ trigger.event.data.message.message_id }}"
      selector:
        text:
    chat_id:
      required: true
      example: 12345
      selector:
        text:
    caption:
      required: true
      example: The garage door has been open for 10 minutes.
      selector:
        text:
    inline_keyboard:
      example:
        '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"],
        ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
      selector:
        object:

edit_replymarkup:
  fields:
    message_id:
      required: true
      example: "{{ trigger.event.data.message.message_id }}"
      selector:
        text:
    chat_id:
      required: true
      example: 12345
      selector:
        text:
    inline_keyboard:
      required: true
      example:
        '["/button1, /button2", "/button3"] or [[["Text button1", "/button1"],
        ["Text button2", "/button2"]], [["Text button3", "/button3"]]]'
      selector:
        object:

answer_callback_query:
  fields:
    message:
      required: true
      example: "OK, I'm listening"
      selector:
        text:
    callback_query_id:
      required: true
      example: "{{ trigger.event.data.id }}"
      selector:
        text:
    show_alert:
      required: true
      selector:
        boolean:
    timeout:
      selector:
        number:
          min: 1
          max: 3600
          unit_of_measurement: seconds

delete_message:
  fields:
    message_id:
      required: true
      example: "{{ trigger.event.data.message.message_id }}"
      selector:
        text:
    chat_id:
      required: true
      example: 12345
      selector:
        text:
