Point-in-Time Recovery
⚠️ Available starting with v10.6.0
Firestore allows you to recover document versions from the past. The feature is called point-in-time recovery. It’s useful when you accidentally delete or modify a document and want to restore it to the previous state.
Typesaurus provides an adapter that allows you to use this feature with your Typesaurus database without losing type-information. To start using it, install @typesaurus/recovery
package:
The package exposes a single method — recover
. It accepts Date
, timestamp number
, or ISO string
and requests to recover for the given time:
The recover
function accepts all reading methods:
The method returns values from the corresponding reading methods.
Available reading methods:
It also supports collection groups: