bijoutrouvaille / fireward

A concise and readable language for Firestore security rules, similar to Firebase Bolt.
MIT License
238 stars 4 forks source link

Support GeoPoint #19

Closed mackattack3k closed 4 years ago

mackattack3k commented 4 years ago

Do you have any plans to support GeoPoint type validating?

Unfortunately there is no support for it in firestore rules natively although there is a GeoPoint type in firestore.

I have tried using a custom type as an object but that doesn't seem to work. I also tried to type it as any but seems like that support isn't there either?

bijoutrouvaille commented 4 years ago

Thanks for the request. The geopoint and any support should be easy to implement. I'll look into it this weekend.

mackattack3k commented 4 years ago

Maybe it should be implemented with is latlng somehow?

Awesome work with fireward!

bijoutrouvaille commented 4 years ago

Thanks! Yes, I plan to use their built-in type.

bijoutrouvaille commented 4 years ago

Geo types and any should now be available in 1.4.3 on all release channels. TS should generate a WardGeoPoint type, and firestore should be checking for the built-in latlng. Thanks for reporting.

toddpi314 commented 4 years ago

Um, this is one of the most useful tools for firestore right now. Thanks for the quick support adding features like this, and keep up the good work.