bundle method

BundleBuilder bundle([
  1. String bundleId
])

Creates a new BundleBuilder instance to package selected Firestore data into a bundle.

@param bundleId The ID of the bundle. When loaded on clients, client SDKs use this ID and the timestamp associated with the bundle to tell if it has been loaded already. If not specified, a random identifier will be used.

@example const bundle = firestore.bundle('data-bundle'); const docSnapshot = await firestore.doc('abc/123').get(); const querySnapshot = await firestore.collection('coll').get();

const bundleBuffer = bundle.add(docSnapshot); // Add a document .add('coll-query', querySnapshot) // Add a named query. .build() // Save bundleBuffer to CDN or stream it to clients.

Implementation

external BundleBuilder bundle([String bundleId]);