Firestore

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. Source: Google

Command

rhub add:action <group.eventId> <filterId> GCP FIRESTORE

Param

Description

eventId

The event that will receive te action.

Example: payment.payment-fulfilled

filterId

The filter/trigger in the event that will process the action.

Example: on-event

Prompt Questions

Operation Select the operation type, such as Standard or FIFO Queue.

Operation

Description

set

Save data into a document.

update

Update document data.

delete

Remove document,

Path

The document path Example: collection-name/document/sub-collection-name

If your path last chain (after slash) parameter is a collection, Reactivehub will use the firestore auto genereated document ID.

Merge

If set to true, the document will only update the payload parameters and maintain the current document data.

YAML

SET
UPDATE
DELETE
SET
-
id: my-action-id
async: false
type: GCP
action: FIRESTORE
operation: set
serviceAccountId: google-cloud-project-account
template:
path: my-colection/my-document/my-subcollection
merge: false
payload:
keyName: '{keyName}'
UPDATE
-
id: my-action-id
async: false
type: GCP
action: FIRESTORE
operation: update
serviceAccountId: google-cloud-project-account
template:
path: my-colection/my-document/my-subcollection
merge: false
payload:
keyName: '{keyName}'
DELETE

Receives the document path to delete.

id: my-action-id
async: false
type: GCP
action: FIRESTORE
operation: delete
serviceAccountId: google-cloud-project-account
template:
path: my-colection/my-document/my-subcollection