
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@invertase/firestore-record-acknowledgements
Advanced tools
A JavaScript utility library for the Firebase Record Acknowledgements Extension.
To assist with the usage of this Extension, a utility library exists to help provide a typed API interface for easily constructing operations to send to the API.
npm i --save @invertase/firestore-record-acknowledgements
To use this library, you must also have the
firebase
package installed and initialized before any usage.
The library exports a number of functions to assist sending the correct payloads to the correct extension endpoints, with fully typed responses.
The user should be authenticated via the firebase/auth
package before using any of the functions.
import { getNotice, acknowledgeNotice, unacknowledgeNotice, getAcknowledgments } from '@invertase/firestore-record-acknowledgements';
// ...
// Get a notice by ID (and optional version).
const notice = await getNotice({ type: 'banner', version: 2 });
// Acknowledge a notice by ID.
await acknowledgeNotice({ noticeId: '...', metadata: { ... } });
// Unacknowledge a notice by ID.
await unacknowledgeNotice({ noticeId: '...', metadata: { ... } });
// Get all acknowledgements for current user.
const acknowledgements = await getAcknowledgments({ includeUnacknowledgments: true });
If you need to provide a custom functions instance, you can provide an instance to the functions
argument. This
is useful if you wish to use a secondary app instance or change the region of the functions instance.
import { initializeApp } from 'firebase/app';
import { getFunctions } from 'firebase/functions';
const app = initializeApp({ ... });
const functions = getFunctions(app, 'europe-west1');
// Use the custom functions instance.
const notice = await getNotice({ functions, type: 'banner' });
If you have multiple instances of the extension installed, you can provide the extensionId
argument to the functions:
// Makes a request to the uniuque deployed extension.
const notice = await getNotice({ extensionId: '1234', type: 'banner' });
FAQs
A JavaScript utility library for the Firebase Record Acknowledgements Extension.
The npm package @invertase/firestore-record-acknowledgements receives a total of 2 weekly downloads. As such, @invertase/firestore-record-acknowledgements popularity was classified as not popular.
We found that @invertase/firestore-record-acknowledgements demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.