{"_id":"@bazumax/cordova-plugin-firestore","_rev":"4-4075ab681773b8a65e133c6e7a32cb3d","name":"@bazumax/cordova-plugin-firestore","dist-tags":{"latest":"4.2.6"},"versions":{"4.2.1":{"name":"@bazumax/cordova-plugin-firestore","version":"4.2.1","cordova":{"id":"@bazumax/cordova-plugin-firestore","platforms":["android","ios","browser"]},"types":"./types/index.d.ts","engines":{"cordovaDependencies":{"0.0.7":{"cordova":">=7.0.0","cordova-android":">=5.0.0","cordova-ios":">=4.0.0"}}},"description":"A Google Firebase Firestore plugin","devDependencies":{"grunt":"^1.0.4","grunt-contrib-jshint":"^1.1.0","jest":"^24.7.1"},"repository":{"type":"git","url":"git+https://github.com/ReallySmallSoftware/cordova-plugin-firestore.git"},"author":{"name":"Richard Windley","email":"richard.windley@gmail.com","url":"http://www.reallysmall.co.uk"},"license":"Apache-2.0","bugs":{"url":"https://github.com/ReallySmallSoftware/cordova-plugin-firestore/issues"},"homepage":"https://github.com/ReallySmallSoftware/cordova-plugin-firestore","keywords":["ecosystem:cordova","cordova-android","cordova-ios","cordova-browser"],"scripts":{"test":"jest"},"gitHead":"5e2f036fd252265325bfe493267efa73070d124e","_id":"@bazumax/cordova-plugin-firestore@4.2.1","_nodeVersion":"14.10.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-aC2SDTjTfSqejH4WMmxNac2yVgtasldxukeDy8O5UBqyWnarYOiz7YQYaDBsLbAhjRL9R21WtxbdGBiCDEe3sQ==","shasum":"9f794b3736bf1e541efd8cb849b0b0f463aa8c01","tarball":"https://registry.npmjs.org/@bazumax/cordova-plugin-firestore/-/cordova-plugin-firestore-4.2.1.tgz","fileCount":90,"unpackedSize":239733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfd7/tCRA9TVsSAnZWagAAvaAP/14PPakp2vY2kV6vFTUJ\nSsPlI4QVgCL2pahLlQhezo8PdJlDdHSjQ1SIMcc28elcn9xqJP//SdjRGpN6\nPy4xUgKt6yXaGh/8/bKVrEqlF96MqunaTHOSTzwymbn03b5Ng7nhTC/Wg7Ce\ntTkzf2M0r4TF4SXFUz2V9bBX9/aaFPx0N0kE88E6d+jKlOLQiGtPHWbgAqsF\nDuo6e679JsKRlPGvtQ5tM1VXLJ7yTW1HVhsMArbxdGOM5i1VY5QBTbRviWT/\nZ7kqhIKaP24AW+4RV0EFYdGGnQjYqhGTdieehAawkBXiqu7ZEnv5SL+uuCnF\n8/6OfgYAT8dkQb763yriwKEaufNIQbDbINH6TgdXCDPcVKOOlhOCi9tMK7UV\nYAmWmV58vcFlzY7O/5/fOZkpndAfLfkxe+V7HIyJ6L51GsfW18yPWc+L00C0\nS4jWvFbKV60knVxG+1HneX6sIRzWywBh9TNID4MiRTpw95c5RVUvMjM6xS6a\nnx17h7TvXQUBqWIxtK0YRvPvDt1+G7vv7qvrEcqKZzI21qaGlRQN7S2ScyCu\n63srDCH/ZxcvzIyN3w+vAcR2MqIubas0fUD6Qs2i43kVM7TkDFR59fX3A1/9\nT4sKCwHNMArvC7LwetG0iGskmDui1kVUupUcl16CJmmZWd43+J/Kp6ewt+uE\nCI7X\r\n=bdPA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIARVEZUtBuu/LZqLpAyfm+UU8WD+L9hudJyC4KoScICVAiAH5NnvVMyrzb6qnbEzLUhdmCbEFgKFKR3QppRpfrEkLg=="}]},"maintainers":[{"name":"bazuka5801","email":"bazuka5801@mail.ru"}],"_npmUser":{"name":"bazuka5801","email":"bazuka5801@mail.ru"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-plugin-firestore_4.2.1_1601683436630_0.6207672999761047"},"_hasShrinkwrap":false},"4.2.3":{"name":"@bazumax/cordova-plugin-firestore","version":"4.2.3","cordova":{"id":"@bazumax/cordova-plugin-firestore","platforms":["android","ios","browser"]},"types":"./types/index.d.ts","engines":{"cordovaDependencies":{"0.0.7":{"cordova":">=7.0.0","cordova-android":">=5.0.0","cordova-ios":">=4.0.0"}}},"description":"A Google Firebase Firestore plugin","devDependencies":{"grunt":"^1.0.4","grunt-contrib-jshint":"^1.1.0","jest":"^24.7.1"},"repository":{"type":"git","url":"git+https://github.com/ReallySmallSoftware/cordova-plugin-firestore.git"},"author":{"name":"Richard Windley","email":"richard.windley@gmail.com","url":"http://www.reallysmall.co.uk"},"license":"Apache-2.0","bugs":{"url":"https://github.com/ReallySmallSoftware/cordova-plugin-firestore/issues"},"homepage":"https://github.com/ReallySmallSoftware/cordova-plugin-firestore","keywords":["ecosystem:cordova","cordova-android","cordova-ios","cordova-browser"],"scripts":{"test":"jest"},"gitHead":"9bd86017d4245a5446da980c1bb97fdbb0937e46","_id":"@bazumax/cordova-plugin-firestore@4.2.3","_nodeVersion":"15.6.0","_npmVersion":"7.4.0","dist":{"integrity":"sha512-21zPI26Y+8BHWDzn/EdNi26gEZh2VlGBNwmLqriLkgMlcRWAXZMUFh2P/6eSKvKQGo6i6aUb2xI+44kW+o2VtA==","shasum":"cd572c70c1199412dca4cd1e82ca6a2cdd44c787","tarball":"https://registry.npmjs.org/@bazumax/cordova-plugin-firestore/-/cordova-plugin-firestore-4.2.3.tgz","fileCount":90,"unpackedSize":239748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMrY3CRA9TVsSAnZWagAAxJ0P/j16Uy9eC5T9vcA7b5ss\nQa17FwsVwFFwpZCqJlpkwpXLWkK0Nmg9U7l+8e8qSOdPf0dmfI+GLvJJg47x\n5fm39pR22WpbmmXYdSgmWXYDPcsvWErbAACz7Nuw4Mr8MZsObL7dXhLrry0o\n/VTsOZZJW/dM0UETjrNyOHQPbzXwv443j49/9sRkuZ1jAJ6t6LDQ1okrSghu\nQHhjHj7eS1XOmlEA+40G6Ztq6sUzMoSnaP+wpHqlw7GP4/qj3MhoAb2mu2XY\n87vV3RHySDesSGGLP60VsFbknRKho8/ks1uiAwkFIF2RbseltgVhfz0Rlk2v\nD/BiIUXbpZuBF4dcWtRL/kuBHETF5fJwjx6fkJ2pTYXDcA/zu3fILeiHXOnY\nNyOuHGa5jbr+VjtsjW9P7ED8WydFYvIRSYdeAH0XzMkfs98z/UmaZOmaUH3m\nsZBhEeJG9oYX5eurk0/idzFOnd3Mgo5Reay/JO7F2WxOGVjx2i17HZZt5/U0\npgfcDbvMkQtysDyZwZuBp76U+CWS8XVjN6DGn4CXZI20RCPb1PNE8h+CbIv0\n94woVrkEftMjb9I8iLdGulmgYD3ln/pRLuCcxW9N4zaC63V7QGRlBlNPFlyc\nTJ7eMB0ghbx3AEB0KhX+FLkJ21fMv3CKb7+ilG22LCJO5S69OLNUhU2fWnBv\noICj\r\n=ooZc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXXP1TztNkvglcEC2EAvooHE9G3yCLZGpH+v1f8YQSkgIgHLLr/xIYYuOtzm+O5GsQ/OWNybsiXzNKXkTFpd5KYtA="}]},"_npmUser":{"name":"bazuka5801","email":"bazuka5801@mail.ru"},"directories":{},"maintainers":[{"name":"bazuka5801","email":"bazuka5801@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-plugin-firestore_4.2.3_1613936183202_0.2855471343499816"},"_hasShrinkwrap":false},"4.2.5":{"name":"@bazumax/cordova-plugin-firestore","version":"4.2.5","cordova":{"id":"@bazumax/cordova-plugin-firestore","platforms":["android","ios","browser"]},"types":"./types/index.d.ts","engines":{"cordovaDependencies":{"0.0.7":{"cordova":">=7.0.0","cordova-android":">=5.0.0","cordova-ios":">=4.0.0"}}},"description":"A Google Firebase Firestore plugin","devDependencies":{"grunt":"^1.0.4","grunt-contrib-jshint":"^1.1.0","jest":"^24.7.1"},"repository":{"type":"git","url":"https://github.com/ReallySmallSoftware/cordova-plugin-firestore.git"},"author":{"name":"Richard Windley","email":"richard.windley@gmail.com","url":"http://www.reallysmall.co.uk"},"license":"Apache-2.0","bugs":{"url":"https://github.com/ReallySmallSoftware/cordova-plugin-firestore/issues"},"homepage":"https://github.com/ReallySmallSoftware/cordova-plugin-firestore","keywords":["ecosystem:cordova","cordova-android","cordova-ios","cordova-browser"],"scripts":{"test":"jest"},"licenseText":"Copyright 2017 Richard Windley\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","_id":"@bazumax/cordova-plugin-firestore@4.2.5","dist":{"shasum":"44fa06d9b2d99a703780a460a313dd6999f4a4ba","integrity":"sha512-5GNLfZBy1yVvv3jO+YO6FapeuVpjfG/fTSmXU0BCbmigA/dCeluZdqCdzcDZiBr1kEIUP9TnjCEoXQz2gBKGPA==","tarball":"https://registry.npmjs.org/@bazumax/cordova-plugin-firestore/-/cordova-plugin-firestore-4.2.5.tgz","fileCount":114,"unpackedSize":439354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgV1jPCRA9TVsSAnZWagAAAM0P/1YkMteEiFNzMB7WH1r+\nzEQvGa2Qjp8xLurTBme1z6jPzfuwrnVY2qoqJhMX8JwgpO6BlDp3jCgfG9mx\nhlNxKBj/hN4ESgKsTzq0/w5I8Cp/VqNz1/gHsUdmzyzBwHZHqIBREkYr/fpx\nSXnlokybHbHJ8t9/HXmivFFs05AB4wbMJOInyc8oqhQGUjia3hm4ysymvFK9\n1gFBGcSK7RHmwORdmRMjD7NQTSCDlnuhZ+zvOxaFXUFaL3XxM5orXq45oIZG\n1k/7AmRukXP4V0YlcOU8oqU1SrZiDVC6RGFQ/ike0Drm9GW1vNRykAX5glSA\nTrx6DqfW3OWBbVdVkirevKjdkHMWD4esfTUhfKr0UpBJiWkNLZv3nR5AlRRj\n/OC/lmeosyHNs5/5vIVl7kc43J7n/OfjBB6x959uxk1uJOLzPUJG3N2BatiL\nZClUMXSEcuqgSHan9taYP5QB4RyUF+bQ2X1kLtCflaPm23f9zxLhqERTJAg0\nbpDJwDW3SuEoS7Im6nxDmS8xLW9efiIux8d1BrMKHy60gq16QQb3nLNMh+47\nxd58jWawUZM8W2iziJaj7KDE73LTTLzpv7PnQ7t8wROi7fjD+N+oZwN9ZMdJ\nGTTqCGq3JPz8Q1kxU++XZtHeKVQpH8LJCs6/Z4XGOifZGC2/g1iIrMSNf4Fx\n2vp4\r\n=RG9o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpHo1k4VxaFyPZEgShjUx0HzKGfgpTf7Y7oEzEuaaWwQIhALrlnGG9PjtR95zMpMX+nZmbRZRSJtd32H690aP19Hls"}]},"_npmUser":{"name":"bazuka5801","email":"bazuka5801@mail.ru"},"directories":{},"maintainers":[{"name":"bazuka5801","email":"bazuka5801@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-plugin-firestore_4.2.5_1616337102692_0.22865090490066398"},"_hasShrinkwrap":false},"4.2.6":{"name":"@bazumax/cordova-plugin-firestore","version":"4.2.6","cordova":{"id":"@bazumax/cordova-plugin-firestore","platforms":["android","ios","browser"]},"types":"./types/index.d.ts","engines":{"cordovaDependencies":{"0.0.7":{"cordova":">=7.0.0","cordova-android":">=5.0.0","cordova-ios":">=4.0.0"}}},"description":"A Google Firebase Firestore plugin","devDependencies":{"grunt":"^1.0.4","grunt-contrib-jshint":"^1.1.0","jest":"^24.7.1"},"repository":{"type":"git","url":"git+https://github.com/ReallySmallSoftware/cordova-plugin-firestore.git"},"author":{"name":"Richard Windley","email":"richard.windley@gmail.com","url":"http://www.reallysmall.co.uk"},"license":"Apache-2.0","bugs":{"url":"https://github.com/ReallySmallSoftware/cordova-plugin-firestore/issues"},"homepage":"https://github.com/ReallySmallSoftware/cordova-plugin-firestore","keywords":["ecosystem:cordova","cordova-android","cordova-ios","cordova-browser"],"scripts":{"test":"jest"},"gitHead":"52c15a87b0e47f1139b3539d2973cd39df0fabb8","_id":"@bazumax/cordova-plugin-firestore@4.2.6","_nodeVersion":"14.18.0","_npmVersion":"7.20.0","dist":{"integrity":"sha512-tisiQCjmjdTs6pZCUs8nYPz54WQ3CIwRh13tcniUDhhm0wUREJ3f8qbi+Z20GZWldyEg4aTNRzo4qnpy+FbijA==","shasum":"660acd6dde0f8fa95ca109a5852c9258d0542a08","tarball":"https://registry.npmjs.org/@bazumax/cordova-plugin-firestore/-/cordova-plugin-firestore-4.2.6.tgz","fileCount":90,"unpackedSize":237040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4sAvCRA9TVsSAnZWagAAQdMQAJEQZpRzee9xWTHfai7u\nJDyQH8WokDfbWyhQg4JXV0f8dTv2y1b8oRncAwxYilTvGVpRHBLBNKvkI0Xa\nn0c39K9awQIiyWhgsYNdqeziEaWEcGQAkk4T6t8f460DrwDDtLo9Q7f5iUjH\njmXueb06jwVAythMY2mwPolFdTSTC0o7a+Bv4fFnx01m9r0bV08T0aM8JGDm\nSGTXneML0NHmAOUbwuWMSlP2hbrjRq77PgWfhbtxisGmk5y5I3TIGW9Adm5n\nyRpLiq3zkKymdov0swv4bieCjKSujOXM8xPyzWrPLSqS1338GPP1dgVU5p32\n3KX01fWxH2pOjhmbsw0B8xlLOouJySnZQtdnjku9u/jmsU3O7E/vu1QNFGUx\nqhCrAMUaOxCwj7C1Z7A4fltgWOaHT2wc99bYfzSEm9kF2h1HsJ7R1lK6GdSp\nqaxtSJgu4ot/MQPwcVDR4AvukwyVwNdbobpLHqAXs1mvh+e8xf1vTLiSlME/\nJnAZtqLXsLWqvehBTmyF3VImqW9OFCgdsCL0jhworL9LIL9MuShB6I0QGLJT\nA+biH8vaeFBZl63DwwYVOpgYB7C9l7lai6yOjNXyqbkk+9vxKBRysviO7+sy\nnIEgMcfyYNjKVsyJCPk86qk3vqHTdH3lcy77l7foEdbz/QuE5hH/TyYZG/qT\nvQw8\r\n=GYc2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAfYz3n3Drj7T24LV6LzNe/JK1XXwvyPBXeA8GeiIm7DAiAGSbCsFNizNJIDtYMjyyVt8XnHITuJ6m+6WbOs15NcrA=="}]},"_npmUser":{"name":"bazuka5801","email":"bazuka5801@mail.ru"},"directories":{},"maintainers":[{"name":"bazuka5801","email":"bazuka5801@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-plugin-firestore_4.2.6_1642250287014_0.41925143293170253"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-03T00:03:56.361Z","4.2.1":"2020-10-03T00:03:56.820Z","modified":"2022-04-04T17:50:10.047Z","4.2.3":"2021-02-21T19:36:23.332Z","4.2.5":"2021-03-21T14:31:42.842Z","4.2.6":"2022-01-15T12:38:07.193Z"},"maintainers":[{"name":"bazuka5801","email":"bazuka5801@mail.ru"}],"description":"A Google Firebase Firestore plugin","homepage":"https://github.com/ReallySmallSoftware/cordova-plugin-firestore","keywords":["ecosystem:cordova","cordova-android","cordova-ios","cordova-browser"],"repository":{"type":"git","url":"git+https://github.com/ReallySmallSoftware/cordova-plugin-firestore.git"},"author":{"name":"Richard Windley","email":"richard.windley@gmail.com","url":"http://www.reallysmall.co.uk"},"bugs":{"url":"https://github.com/ReallySmallSoftware/cordova-plugin-firestore/issues"},"license":"Apache-2.0","readme":"# Cordova Firestore Plugin (for Capacitor v2+)\nA Google Firebase Firestore plugin to enable realtime synchronisation between app and cloud and automatically handle limited connectivity.\n\n# What is Firestore?\nFrom the Google documentation (https://firebase.google.com/docs/firestore/):\n\n> Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud Platform. Like Firebase Realtime Database, it keeps your data in sync across client apps through realtime listeners and offers offline support for mobile and web so you can build responsive apps that work regardless of network latency or Internet connectivity. Cloud Firestore also offers seamless integration with other Firebase and Google Cloud Platform products, including Cloud Functions\n\n# Supported platforms\nThis plugin supports the following platforms:\n\n- Android\n- iOS\n\n# Installation\n## Install the plugin\n\n```bash\nyarn add cordova-plugin-firestore\n```\n\n## Android specific installation\nDownload `google-services.json` to `(your_project_dir)/google-services.json`\n\nHint: [Get a config file for your Android App](https://support.google.com/firebase/answer/7015592#android)\n\nYou must ensure that `google-services.json` is put in the correct location: `app/google-services.json`.\n\n## iOS specific installation\n\nDownload `GoogleService-Info.plist` to `(your_project_dir)/GoogleService-Info.plist`\n\nHint: [Get a config file for your iOS App](https://support.google.com/firebase/answer/7015592#ios)\n\n## Firestore configuration\nIt is good practice to make sure your Firestore database is only accessible for authorised users, at least for write operations. It is recommended you take time to understand [Firestore rules](https://firebase.google.com/docs/firestore/security/get-started).\n\nAn example that only allows access for authorised users is shown below:\n\n```\nservice cloud.firestore {\n  match /databases/{database}/documents {\n    match /{document=**} {\n      allow read, write : if request.auth != null;\n    }\n  }\n}\n```\n\nAuthenticating users is beyond the scope of this plugin, but the `cordova-plugin-firebaseui-auth` is one such plugin you can use to achieve this which will work alongside this plugin.\n\n## Dependencies\n### Promises\nThis plugin uses Promises. If you want to use this with Android 4.4 then you will need to include a `Promise` polyfill.\n\n\n# Example\nA simple example is shown below which sets up the necessary options, initialises the database and then adds a document to a `users` collection:\n\n```js\nvar options = {\n  \"datePrefix\": '__DATE:',\n  \"fieldValueDelete\": \"__DELETE\",\n  \"fieldValueServerTimestamp\" : \"__SERVERTIMESTAMP\",\n  \"persist\": true\n};\n\nFirestore.initialise(options).then(function(db) {\n  // Add a second document with a generated ID.\n  db.get().collection(\"users\").add({\n      first: \"Alan\",\n      middle: \"Mathison\",\n      last: \"Turing\",\n      born: 1912\n  })\n  .then(function(docRef) {\n      console.log(\"Document written with ID: \", docRef.id);\n  })\n  .catch(function(error) {\n      console.error(\"Error adding document: \", error);\n  });\n});\n```\n\n## options.config\nIn the above example this is being used for the browser version, but it can also be used for Android and iOS to specify different databases than the default in the `google-services.json` and `GoogleService-Info.plist` files.\n\n# What is supported?\n\n## Firestore\n- collection(collectionPath)\n- runTransaction(updateFunction)\n- doc(id)\n\n## DocumentSnapshot and QueryDataSnapshot\n- data()\n- get(fieldPath)\n- exists\n- id\n- ref\n\n## QuerySnapshot\n- docs\n- empty\n- size\n\n## DocumentReference\n- collection(collectionPath)\n- delete()\n- get()\n- onSnapshot(optionsOrObserverOrOnNext, observerOrOnNextOrOnError, onError)\n- set(data, options)\n- update(data)\n- id\n- parent\n\n## Query\n- endAt(snapshotOrVarArgs)\n- endBefore(snapshotOrVarArgs)\n- limit(limit)\n- orderBy(field, direction)\n- get()\n- onSnapshot(optionsOrObserverOrOnNext, observerOrOnNextOrOnError, onError)\n- startAfter(snapshotOrVarArgs)\n- startAt(snapshotOrVarArgs)\n- where(fieldPath, opStr, passedValue)\n\n## CollectionReference (inherits from Query)\n- add(data)\n- id\n- doc(id)\n- parent\n\n## Transaction\n- get()\n- delete()\n- set()\n- update()\n\n## FieldValue\n- FieldValue.delete()\n- FieldValue.serverTimestamp()\n\n## GeoPoint\n- Firestore.GeoPoint(latitude, longitude)\n\n## Timestamp\n- Firestore.Timestamp(seconds, nanoseconds)\n\n## Dates\nBecause data is transferred to the client as JSON there is extra logic in place to handle the conversion of dates for some operations.\n\nWhen initialising the plugin you can set up a prefix that is applied to a string value which is used to identify it as a date. The default prefix is `__DATE:`\n\nTherefore, when a date field is retrieved from the database by the native code it will be transferred in the JSON looking similar to the following:\n\n```json\n{\n    \"dateField\" : \"__DATE:123456789\"\n}\n```\n\nThe number is seconds since epoch.\n\nThe client will receive the field as a Javascript Date.\n\nThis conversion also happens when specifying a field in a where condition.\n\n```\nThe behavior for Date objects stored in Firestore is going to change\nAND YOUR APP MAY BREAK.\nTo hide this warning and ensure your app does not break, you need to add the\nfollowing code to your app before calling any other Cloud Firestore methods:\n\n  const firestore = firebase.firestore();\n  const settings = {/* your settings... */ timestampsInSnapshots: true};\n  firestore.settings(settings);\n\nWith this change, timestamps stored in Cloud Firestore will be read back as\nFirebase Timestamp objects instead of as system Date objects. So you will also\nneed to update code expecting a Date to instead expect a Timestamp. For example:\n\n  // Old:\n  const date = snapshot.get('created_at');\n  // New:\n  const timestamp = snapshot.get('created_at');\n  const date = timestamp.toDate();\n\nPlease audit all existing usages of Date when you enable the new behavior. In a\nfuture release, the behavior will change to the new behavior, so if you do not\nfollow these steps, YOUR APP MAY BREAK.\n```\n\n## FieldValue constants\nSimilar to the situation with dates, there are special values used for `FieldValue` values:\n\n- FieldValue.delete() equates to `__DELETE`\n- FieldValue.serverTimestamp() equates to `__SERVERTIMESTAMP`\n\nThese values can be changed when initialisation is performed.\n\n## Nested collections\nNested collections are supported. This can take either form as follows:\n\n```\ndb.get().collection(\"mycollection\").doc(\"mydoc\").collection(\"mysubcollection\");\ndb.get().collection(\"mycollection/mydoc/mysubcollection\");\n```\n\nNote that the second form is slightly more efficient as it results in less objects being instantiated.\n\n\n## Learnings and notes\nI have learnt a number of things whilst implementing this:\n- The documentation states that the database cannot be initialised in a seperate thread when using persistence. In my experience this should say it cannot be *used* in multiple threads.\n- Yes, I did spell initialise() with an 's' - Original plugin developer @ReallySmallSoftware is from the UK\n","readmeFilename":"README.md"}