I’d also follow the approach of having multiple functions that accept different numbers of arguments. I only recommend replacing the Arg.t with the Js.Json.t type to make it typesafe. Because with Arg.t you cast the type to the desired value without any guarantee that it’s what you expect.
This will be unneeded in favor of action2 if you use Js.Json.t.
The reason is that {..} is an object type. To access an object field you need to use options["first"] syntax instead of options.first.
It looks ok. The only change I’d have is to start using optional labeled arguments: