I'm writing firestore rules function, which must return true, if certain value is between 0 and 1000 or bigger than current unix-timestamp. According to reference, I'm trying to do the following:
rules_version = '2';
service cloud.firestore {
match /databases/{db}/documents {
function check(i) {
return i > 0 && (i < 1000 || i > (timestamp.epochMillis));
}
// ...
However, rules editor gives me an error:
timestamp is a package and cannot be used as variable name.