Skip to main content

List a collection

Mount @bijectionhq/app-rest once per collection. The full resource name may identify a top-level collection or a collection under a specific parent document. Use letters, digits, underscores and hyphens for collection and parent document segments.
Seal a Google access token with datastore or cloud-platform OAuth scope and Firestore read permissions. Rotate the token by setting its secret again. Pass provider as receivers.provider, and the same label to the binder and as the app’s data.
Documents land as typed Firestore JSON keyed by full resource name, at most 512 characters. Each page carries up to 32 documents and 36 KiB. The collection’s opaque page token continues traversal in name order. For a finite read at one instant supply start as a UTC Firestore readTime within the database’s retention limits. Otherwise each sweep restarts after the final page and can observe concurrent edits. Missing documents remain. Firestore ListDocuments API

Listen to named documents

Mount @bijectionhq/app-documents once per fixed target of one to eight named documents. Follow the Google stream mount example, use firestoreListen(credential, data) from that package, and bind it to the Documents app’s provider. The receiver binder and the app’s data take the same label. Seal a Google access token and the exact target in the receiver credential. Grant Firestore read access and use the datastore or cloud-platform scope. List full, distinct document names in ascending order. Each can have up to 384 characters.
Each pass sends one AddTarget and keeps the request side open while receiving Firestore’s bidirectional stream. It closes at the first consistent snapshot with a resume token or at its 20-second deadline. The app commits the token, read time and membership with its document changes. A resumed pass without new data can leave the position unchanged. Documents land as base64 Firestore Document Protobuf under their full names. Deletes and target removals clear the projected document. The first consistent snapshot also clears absent names within the fixed target. A reset, invalid retained token or existence-count mismatch can record a continuity gap for operator review. A pass accepts up to 48 KiB of answer data within the action result’s encoded bound. Oversized contents hold the previous token. Collection queries use the collection listing mode above. Firestore Listen protocol