Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@frontegg/client

Package Overview
Dependencies
Maintainers
1
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontegg/client - npm Package Compare versions

Comparing version 1.0.42 to 1.0.43-0

3

dist/index.d.ts

@@ -6,2 +6,3 @@ import { AuditsClient } from './src/audits';

import { TenantsClient } from './src/tenants';
export { AuditsClient, NotificationsClient, TenantsClient, frontegg, FronteggPermissions, IFronteggOptions, };
import { FronteggAuthenticator } from './src/authenticator';
export { AuditsClient, NotificationsClient, TenantsClient, frontegg, FronteggPermissions, IFronteggOptions, FronteggAuthenticator, };

@@ -13,1 +13,3 @@ "use strict";

exports.TenantsClient = tenants_1.TenantsClient;
var authenticator_1 = require("./src/authenticator");
exports.FronteggAuthenticator = authenticator_1.FronteggAuthenticator;

@@ -17,4 +17,4 @@ export declare class NotificationsClient {

body?: string;
url?: string;
severity?: string;
url?: string;
actions?: INotificationAction[];

@@ -21,0 +21,0 @@ expiryDate?: Date;

@@ -6,2 +6,3 @@ import { AuditsClient } from './src/audits';

import { TenantsClient } from './src/tenants';
import { FronteggAuthenticator } from './src/authenticator';

@@ -15,2 +16,3 @@ export {

IFronteggOptions,
FronteggAuthenticator,
};
{
"name": "@frontegg/client",
"version": "1.0.42",
"version": "1.0.43-0",
"description": "Frontegg Javascript Library for backend",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -124,2 +124,38 @@ # Frontegg Client

```
### Notifications
Allow your customers to be aware of any important business related event they need to pay attention to, both in the dashboard and even when offline.
Frontegg’s Managed Notifications feature allows a SaaS company to embed an end-to-end working feature in just 5 lines of code.
#### Sending notifications
```javascript
import { NotificationsClient } from '@frontegg/client'
const notificationsClient = new NotificationsClient();
// First initialize the module
await notificationsClient.init('YOUR-CLIENT-ID', 'YOUR-API-KEY');
// Set the notification you want to send
const notification = {
"title": "Notification Title",
"body": "Notification Body",
"severity": "info",
"url": "example.com" // url to be opened when user clicks on the notification
}
// send the notification to a specific user
await notificationsClient.sendToUser('RECEPIENT-USER-ID', 'RECEPIENT-TENANT-ID', notification)
// send the notification to all tenant users
await notificationsClient.sendToTenantUsers('RECEPIENT-TENANT-ID', notification)
// send the notification to all users
await notificationsClient.sendToAllUsers(notification)
```
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