waitForPendingWrites
Waits until all currently pending writes for the active user have been acknowledged by the backend.
The returned promise resolves immediately if there are no outstanding writes.
Otherwise, the promise waits for all previously issued writes (including
those written in a previous app session), but it does not wait for writes
that were added after the function is called. If you want to wait for
additional writes, call waitForPendingWrites()
again.
Any outstanding waitForPendingWrites()
promises are rejected during user
changes.