New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

firestore-facade

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firestore-facade - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

dist/types.d.ts

15

dist/methods.d.ts

@@ -6,14 +6,5 @@ import type { firestore } from "firebase-admin";

set: (documentId: string, data: T) => Promise<firestore.WriteResult>;
/**
* @TODO firestore.UpdateData is not strict at all, we need to find
* a way to type the data argument.
*
* Problem is that update can get many different types, including number
* increments and array remove/union instructions.
* See https://firebase.google.com/docs/firestore/manage-data/add-data#web-version-9_4
*
* So not sure how strict we can get here.
*/
update: (documentId: string, data: Partial<T> | FieldPaths<T>) => Promise<firestore.WriteResult>;
get: (documentId: string) => Promise<import("./documents.js").FirestoreDocument<unknown>>;
update: (documentId: string, data: Partial<T> | Partial<FieldPaths<T>>) => Promise<firestore.WriteResult>;
updateFields: (documentId: string, data: Partial<FieldPaths<T>>) => Promise<firestore.WriteResult>;
get: (documentId: string) => Promise<import("./documents.js").FirestoreDocument<T>>;
query: (fn: (ref: firestore.CollectionReference) => firestore.Query) => Promise<import("./documents.js").FirestoreDocument<T>[]>;

@@ -20,0 +11,0 @@ /**

13

dist/methods.js

@@ -6,15 +6,4 @@ import { getDocument, getDocuments, getDocumentsWithSelect, } from "./documents.js";

set: (documentId, data) => db.collection(collectionPath).doc(documentId).set(data),
/**
* @TODO firestore.UpdateData is not strict at all, we need to find
* a way to type the data argument.
*
* Problem is that update can get many different types, including number
* increments and array remove/union instructions.
* See https://firebase.google.com/docs/firestore/manage-data/add-data#web-version-9_4
*
* So not sure how strict we can get here.
*/
update: (documentId, data) => db.collection(collectionPath).doc(documentId).update(data),
// updateField: (documentId: string, data: DeepKeyMap<T>) =>
// db.collection(collectionPath).doc(documentId).update(data),
updateFields: (documentId, data) => db.collection(collectionPath).doc(documentId).update(data),
get: (documentId) => getDocument(db, collectionPath, documentId),

@@ -21,0 +10,0 @@ query: (fn) => getDocuments(fn(db.collection(collectionPath))),

{
"name": "firestore-facade",
"version": "0.1.5",
"version": "0.1.6",
"description": "A clean, strongly-typed, zero-dependency API for Firestore Typescript projects",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc