{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clousd-com/json-schema/clousd-com-action-schema.json",
  "title": "Action",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clousd-com-openapi.yml#/components/schemas/Action",
  "type": "object",
  "required": [
    "op"
  ],
  "properties": {
    "op": {
      "type": "string",
      "enum": [
        "tap",
        "long_press",
        "swipe",
        "scroll",
        "text",
        "key",
        "open_app",
        "close_app",
        "url",
        "intent",
        "settings",
        "screen_text",
        "find_text",
        "tap_text",
        "wait_text",
        "installed",
        "clipboard_get",
        "clipboard_set",
        "notifications",
        "notifications_open",
        "notifications_close",
        "notifications_clear",
        "app_info",
        "crashes",
        "health"
      ],
      "description": "Read-only ops (installed, screen_text, find_text, wait_text, clipboard_get, notifications, app_info, crashes, health) do not change the observation seq. clipboard_get, notifications, app_info, crashes and health return their result as JSON in `data`."
    },
    "x": {
      "type": "integer",
      "description": "phone pixels"
    },
    "y": {
      "type": "integer"
    },
    "x2": {
      "type": "integer"
    },
    "y2": {
      "type": "integer"
    },
    "ms": {
      "type": "integer",
      "description": "swipe duration; for wait_text the timeout in ms (max 120000)"
    },
    "text": {
      "type": "string",
      "description": "text to type (any language), text to find, scroll direction (down|up)"
    },
    "key": {
      "type": "string",
      "description": "home, back, recents, enter, power, tab, del, menu, volume_up, volume_down, wake, sleep or a keycode"
    },
    "package": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "fx": {
      "type": "number",
      "description": "x as a fraction of the screen width (0..1) instead of pixels (tap, swipe, long_press)"
    },
    "fy": {
      "type": "number"
    },
    "intent": {
      "type": "object",
      "description": "for op=intent - started like `am start` from the shell user",
      "properties": {
        "action": {
          "type": "string"
        },
        "data": {
          "type": "string",
          "description": "a URI, e.g. https://example.com or geo:0,0?q=coffee"
        },
        "package": {
          "type": "string"
        },
        "component": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "MIME type"
        },
        "extras": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "string extras"
        }
      }
    }
  }
}