[v4]: add `method` arg to `/click` route stub

Merged
SE
8mo ago
+42-3

why

  • to group two types of clicking into a single route. ie, we don't need to add a separate /sendClickEvent route

what changed

  • added an optional synthetic parameter to the /click schema, which we will internally route to .sendClickEvent()

screenshot:

Screenshot 2026-03-24 at 3 58 50 PM

test plan

  • added a test to verify passing synthetic: true passes validation

Summary by cubic

Add a method param to the v4 /click route to support both coordinate-based and JS event clicks in one endpoint, defaulting to xy for backward compatibility. Caps clickCount at 3 and updates the OpenAPI/action output. Addresses Linear STG-1659.

  • New Features
    • Adds method: 'xy' | 'jsevent' (default xy) to /click params; action output now includes and requires method via PageClickParamsOutput.
    • Limits clickCount to 1–3 in schema and OpenAPI in packages/server-v4.
    • Adds integration tests for coordinate clicks and method: "jsevent" selector clicks.