Skip to content

Commit 645999f

Browse files
committed
Release Version 11.7.0
1 parent 54b2fb9 commit 645999f

25 files changed

+230
-96
lines changed

CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
11

22
> **LoginRadius Node JS SDK Change Log** provides information regarding what has changed, more specifically what changes, improvements and bug fix has been made to the SDK. For more details please refer to the [LoginRadius API Documention](https://docs.loginradius.com/api/v2/deployment/sdk-libraries/node-js-library)
33
4+
# Version 11.7.0
5+
6+
**Release Date:** March 26, 2025
7+
8+
## Enhancements
9+
10+
We've introduced a brand-new set of Webhook APIs, designed with enhanced functionality and flexibility. These new APIs support advanced features including:
11+
12+
- Custom header configuration
13+
- Query parameter support
14+
- Webhook authentication methods (Bearer Token and Basic Auth)
15+
- Support for a custom `Name` parameter to label each webhook subscription
16+
17+
As part of this upgrade, the legacy Webhook APIs have been deprecated in favor of the new, more robust versions.
18+
19+
## Newly Added APIs
20+
21+
- `getWebhookSubscriptionDetail` – Retrieve detailed information about a specific webhook subscription
22+
- `createWebhookSubscription` – Create a new webhook subscription with advanced configuration options
23+
- `deleteWebhookSubscription` – Remove an existing webhook subscription
24+
- `updateWebhookSubscription` – Modify an existing webhook subscription
25+
- `listAllWebhooks` – Retrieve a list of all configured webhook subscriptions
26+
- `getWebhookEvents` – Fetch available webhook events supported by the system
27+
28+
## Deprecated APIs
29+
30+
The following legacy APIs have been deprecated:
31+
32+
- `webHookUnsubscribe`
33+
- `webhookTest`
34+
- `webHookSubscribe`
35+
- `getWebHookSubscribedURLs`
36+
437

538
# Version 11.6.1
639

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2022 LoginRadius Inc.
1+
Copyright (c) 2025 LoginRadius Inc.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

+102-28
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ LoginRadius Combined Node SDK features a combined SDK set to encompass Social Lo
3434
This document contains information and examples regarding the LoginRadius Node.js SDK. It provides guidance for working with social authentication, user profile data, and sending messages with a variety of social networks such as Facebook, Google, Twitter, Yahoo, LinkedIn, and more.
3535
You can get the SDK from [here](http://github.com/LoginRadius/node-js-sdk)
3636

37-
Note: The latest version(11.6.0) of Node js SDK works with LoginRadius V2 APIs.
37+
Note: The latest version(11.7.0) of Node js SDK works with LoginRadius V2 APIs.
3838

3939
Installation <br/>
4040
run `npm install loginradius-sdk` <br/>
@@ -5529,30 +5529,85 @@ lrv2.nativeSocialApi.getAccessTokenByGoogleAuthCode(googleAuthcode, socialAppNam
55295529
### WebHook API
55305530

55315531

5532-
List of APIs in this Section:<br>
5532+
List of APIs in this Section:
55335533

5534-
* POST : [Webhook Subscribe](#WebHookSubscribe-post-)<br>
5535-
* GET : [Webhook Subscribed URLs](#GetWebHookSubscribedURLs-get-)<br>
5536-
* GET : [Webhook Test](#WebhookTest-get-)<br>
5537-
* DELETE : [WebHook Unsubscribe](#WebHookUnsubscribe-delete-)<br>
5534+
* PUT : [Update Webhook Subscription](#UpdateWebhookSubscription-put-)
5535+
* POST : [Create Webhook Subscription](#CreateWebhookSubscription-post-)
5536+
* GET : [Get Webhook Subscription Detail](#GetWebhookSubscriptionDetail-get-)
5537+
* GET : [List All Webhooks](#ListAllWebhooks-get-)
5538+
* GET : [Get Webhook Events](#GetWebhookEvents-get-)
5539+
* DELETE : [Delete Webhook Subscription](#DeleteWebhookSubscription-delete-)
55385540

55395541

55405542

5541-
<h6 id="WebHookSubscribe-post-"> Webhook Subscribe (POST)</h6>
5543+
<h6 id="UpdateWebhookSubscription-put-"> Update Webhook Subscription (PUT)</h6>
55425544

5543-
API can be used to configure a WebHook on your LoginRadius site. Webhooks also work on subscribe and notification model, subscribe your hook and get a notification. Equivalent to RESThook but these provide security on basis of signature and RESThook work on unique URL. Following are the events that are allowed by LoginRadius to trigger a WebHook service call. [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/webhook-subscribe)
5545+
This API is used to update a webhook subscription [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/update-webhook-subscription/)
55445546

55455547

55465548

55475549

5548-
```js
5550+
```
5551+
5552+
var hookId = "<hookId>"; //Required
5553+
5554+
var webHookSubscriptionUpdateModel ={
5555+
"Headers": {
5556+
"x-test-header": "qa"
5557+
},
5558+
"QueryParams": {
5559+
"apikey": "859faf40a7c54c209360b45376bf529f"
5560+
},
5561+
"Authentication": {
5562+
"AuthType": "Basic",
5563+
"BasicAuth": {
5564+
"Username": "lrqaadmin",
5565+
"Password": "ZBz6JcnZadxc2gB7sf5vby87zBIu6q"
5566+
}
5567+
}
5568+
}; //Required
5569+
5570+
lrv2.webHookApi.updateWebhookSubscription(hookId, webHookSubscriptionUpdateModel).then((response) => {
5571+
console.log(response);
5572+
}).catch((error) => {
5573+
console.log(error);
5574+
});
5575+
5576+
```
5577+
5578+
5579+
5580+
5581+
<h6 id="CreateWebhookSubscription-post-"> Create Webhook Subscription (POST)</h6>
5582+
5583+
This API is used to create a new webhook subscription on your LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/create-webhook-subscription/)
5584+
5585+
5586+
5587+
5588+
```
5589+
55495590
55505591
var webHookSubscribeModel ={
55515592
"event" : "<event>",
5552-
"targetUrl" : "<targetUrl>"
5593+
"name" : "<name>",
5594+
"targetUrl" : "<targetUrl>",
5595+
"Headers": {
5596+
"Custom-Header": "headerValue"
5597+
},
5598+
"QueryParams": {
5599+
"apikey": "yourApiKey"
5600+
},
5601+
"Authentication": {
5602+
"AuthType": "Basic",
5603+
"BasicAuth": {
5604+
"Username": "yourUsername",
5605+
"Password": "yourPassword"
5606+
}
5607+
}
55535608
}; //Required
55545609
5555-
lrv2.webHookApi.webHookSubscribe(webHookSubscribeModel).then((response) => {
5610+
lrv2.webHookApi.createWebhookSubscription(webHookSubscribeModel).then((response) => {
55565611
console.log(response);
55575612
}).catch((error) => {
55585613
console.log(error);
@@ -5563,18 +5618,18 @@ lrv2.webHookApi.webHookSubscribe(webHookSubscribeModel).then((response) => {
55635618

55645619

55655620

5566-
<h6 id="GetWebHookSubscribedURLs-get-"> Webhook Subscribed URLs (GET)</h6>
5621+
<h6 id="GetWebhookSubscriptionDetail-get-"> Get Webhook Subscription Detail (GET)</h6>
55675622

5568-
This API is used to fatch all the subscribed URLs, for particular event [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/webhook-subscribed-urls)
5623+
This API is used to get details of a webhook subscription by Id [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/get-webhook-subscription-details/)
55695624

55705625

55715626

55725627

5573-
```js
5628+
```
55745629
5575-
var event = "<event>"; //Required
5630+
var hookId = "<hookId>"; //Required
55765631
5577-
lrv2.webHookApi.getWebHookSubscribedURLs(event).then((response) => {
5632+
lrv2.webHookApi.getWebhookSubscriptionDetail(hookId).then((response) => {
55785633
console.log(response);
55795634
}).catch((error) => {
55805635
console.log(error);
@@ -5585,16 +5640,17 @@ lrv2.webHookApi.getWebHookSubscribedURLs(event).then((response) => {
55855640

55865641

55875642

5588-
<h6 id="WebhookTest-get-"> Webhook Test (GET)</h6>
5643+
<h6 id="ListAllWebhooks-get-"> List All Webhooks (GET)</h6>
55895644

5590-
API can be used to test a subscribed WebHook. [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/webhook-test)
5645+
This API is used to get the list of all the webhooks [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/list-all-webhooks/)
55915646

55925647

55935648

55945649

5595-
```js
5650+
```
5651+
55965652
5597-
lrv2.webHookApi.webhookTest().then((response) => {
5653+
lrv2.webHookApi.listAllWebhooks().then((response) => {
55985654
console.log(response);
55995655
}).catch((error) => {
56005656
console.log(error);
@@ -5605,21 +5661,39 @@ lrv2.webHookApi.webhookTest().then((response) => {
56055661

56065662

56075663

5608-
<h6 id="WebHookUnsubscribe-delete-"> WebHook Unsubscribe (DELETE)</h6>
5664+
<h6 id="GetWebhookEvents-get-"> Get Webhook Events (GET)</h6>
56095665

5610-
API can be used to unsubscribe a WebHook configured on your LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/webhook-unsubscribe)
5666+
This API is used to retrieve all the webhook events. [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/get-webhook-events/)
56115667

56125668

56135669

56145670

5615-
```js
5671+
```
56165672
5617-
var webHookSubscribeModel ={
5618-
"event" : "<event>",
5619-
"targetUrl" : "<targetUrl>"
5620-
}; //Required
56215673
5622-
lrv2.webHookApi.webHookUnsubscribe(webHookSubscribeModel).then((response) => {
5674+
lrv2.webHookApi.getWebhookEvents().then((response) => {
5675+
console.log(response);
5676+
}).catch((error) => {
5677+
console.log(error);
5678+
});
5679+
5680+
```
5681+
5682+
5683+
5684+
5685+
<h6 id="DeleteWebhookSubscription-delete-"> Delete Webhook Subscription (DELETE)</h6>
5686+
5687+
This API is used to delete webhook subscription [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/delete-webhook-subscription/)
5688+
5689+
5690+
5691+
5692+
```
5693+
5694+
var hookId = "<hookId>"; //Required
5695+
5696+
lrv2.webHookApi.deleteWebhookSubscription(hookId).then((response) => {
56235697
console.log(response);
56245698
}).catch((error) => {
56255699
console.log(error);

loginradius-sdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"email": "[email protected]"
2828
}
2929
],
30-
"dependencies": {
30+
"devDependencies": {
3131
"eslint": "^8.29.0",
3232
"prettier": "^2.8.1"
3333
}

loginradius-sdk/sdk/api/account/accountApi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Created by LoginRadius Development Team
3-
Copyright 2019 LoginRadius Inc. All rights reserved.
3+
Copyright 2025 LoginRadius Inc. All rights reserved.
44
*/
55
module.exports = function (config) {
66
var module = {};

loginradius-sdk/sdk/api/account/roleApi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Created by LoginRadius Development Team
3-
Copyright 2019 LoginRadius Inc. All rights reserved.
3+
Copyright 2025 LoginRadius Inc. All rights reserved.
44
*/
55
module.exports = function (config) {
66
var module = {};

loginradius-sdk/sdk/api/account/sottApi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Created by LoginRadius Development Team
3-
Copyright 2019 LoginRadius Inc. All rights reserved.
3+
Copyright 2025 LoginRadius Inc. All rights reserved.
44
*/
55
module.exports = function (config) {
66
var module = {};

loginradius-sdk/sdk/api/advanced/configurationApi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Created by LoginRadius Development Team
3-
Copyright 2019 LoginRadius Inc. All rights reserved.
3+
Copyright 2025 LoginRadius Inc. All rights reserved.
44
*/
55
module.exports = function (config) {
66
var module = {};

loginradius-sdk/sdk/api/advanced/consentManagementApi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Created by LoginRadius Development Team
3-
Copyright 2019 LoginRadius Inc. All rights reserved.
3+
Copyright 2025 LoginRadius Inc. All rights reserved.
44
*/
55
module.exports = function (config) {
66
var module = {};

loginradius-sdk/sdk/api/advanced/customObjectApi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Created by LoginRadius Development Team
3-
Copyright 2019 LoginRadius Inc. All rights reserved.
3+
Copyright 2025 LoginRadius Inc. All rights reserved.
44
*/
55
module.exports = function (config) {
66
var module = {};

loginradius-sdk/sdk/api/advanced/multiFactorAuthenticationApi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Created by LoginRadius Development Team
3-
Copyright 2019 LoginRadius Inc. All rights reserved.
3+
Copyright 2025 LoginRadius Inc. All rights reserved.
44
*/
55
module.exports = function (config) {
66
var module = {};

loginradius-sdk/sdk/api/advanced/reAuthenticationApi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Created by LoginRadius Development Team
3-
Copyright 2019 LoginRadius Inc. All rights reserved.
3+
Copyright 2025 LoginRadius Inc. All rights reserved.
44
*/
55
module.exports = function (config) {
66
var module = {};

0 commit comments

Comments
 (0)