For now the TargetedMessageRequest allows to set a devicesFilter property as a string only.
It would be great to have a powerful DSL to create the device filters, for example.
$filters = StringTagFilter::create('username')->eq('my_username')->and(IntTagFilter::create('age')->between(15, 50))->join(ApplicationTagFilter::create('XXXXX-XXXXX');
This sample will be equivalent to (T("username", EQ, "my_username"), T("favorite_color", IN, ["red","green","blue"])) + A('XXXXX-XXXXX).
A first implementation has been started on the devices-filter branch.