Modules@robinpath/firebase

@robinpath/firebase

0.1.0Public

Firebase module for RobinPath.

@robinpath/firebase

Firebase module for RobinPath.

Category Functions Auth License

Why use this module?

The firebase module lets you:

  • Get a Firestore document by collection and document ID
  • List Firestore documents in a collection
  • Create a Firestore document with auto or specified ID
  • Update a Firestore document's fields
  • Delete a Firestore document

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/firebase

Quick Start

1. Set up credentials

firebase.setCredentials "my-project-id" "AIzaSy..."

2. Get a Firestore document by collection and document ID

firebase.getDocument "users" "user123"

Available Functions

FunctionDescription
firebase.setCredentialsSet Firebase project ID and API key for client-side REST operations
firebase.setServiceTokenSet Firebase project ID and OAuth2 access token for admin operations
firebase.getDocumentGet a Firestore document by collection and document ID
firebase.listDocumentsList Firestore documents in a collection
firebase.createDocumentCreate a Firestore document with auto or specified ID
firebase.updateDocumentUpdate a Firestore document's fields
firebase.deleteDocumentDelete a Firestore document
firebase.queryDocumentsQuery Firestore documents with structured query (where, orderBy, limit)
firebase.batchGetGet multiple Firestore documents by IDs
firebase.signUpCreate a new user with email and password
firebase.signInSign in a user with email and password
firebase.signInAnonymouslySign in anonymously
firebase.sendPasswordResetSend a password reset email
firebase.verifyEmailSend an email verification to the user
firebase.getUserByTokenGet user data from an ID token
firebase.deleteAccountDelete a user account
firebase.rtdbGetRead data from Realtime Database at a path
firebase.rtdbSetWrite data to Realtime Database at a path (overwrites)
firebase.rtdbUpdateUpdate data at a Realtime Database path (merge)
firebase.rtdbPushPush a new child to a Realtime Database path
firebase.rtdbDeleteDelete data at a Realtime Database path

Examples

Get a Firestore document by collection and document ID

firebase.getDocument "users" "user123"

List Firestore documents in a collection

firebase.listDocuments "users" {"pageSize": 10}

Create a Firestore document with auto or specified ID

firebase.createDocument "users" {"name": "Alice", "age": 30}

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/firebase";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  firebase.setCredentials "my-project-id" "AIzaSy..."
  firebase.getDocument "users" "user123"
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/firebase
Version0.1.0
LicenseMIT
Unpacked Size9.3 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

data