This is a joke right? JavaScript is a horrific language and the decision to use as a back end language is mind boggling. But don't take my word for it, go to the Data Explorer in the Azure portal, pick any entity with a number value, set it to 345896229870334651 and watch what happens. If you think it's a portal issue, it's not. Save an entity with that value via the SDK and the database stores the value just fine. So it is a portal issue! It's not. Now pass an entity with that value to a stored procedure and save it. BOOM, your data has just been corrupted. Why?
BECAUSE JAVASCRIPT IS THE WORST LANGUAGE IN THE HISTORY OF THE UNIVERSE.
Yep, if you store 64 bit values, you can't use Cosmos triggers or stored procedures because they're implemented in JavaScript. And if you do, you're sitting on a ticking time bomb.
When is the Cosmos team going to wake up, abandon this horrific language, and offer developers a real language to develop code in?