@frontegg/rest-api 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/auth/index.d.ts CHANGED
@@ -243,6 +243,10 @@ export declare function signUpUser(body: ISignUpUser): Promise<ISignUpResponse>;
243
243
  * Get all current user active sessions
244
244
  */
245
245
  export declare function getCurrentUserSessions(): Promise<ISessionResponse[]>;
246
+ /**
247
+ * Get current user session
248
+ */
249
+ export declare function getCurrentUserSession(): Promise<ISessionResponse>;
246
250
  /**
247
251
  * Get session configurations
248
252
  */
package/auth/index.js CHANGED
@@ -246,6 +246,9 @@ export async function signUpUser(body) {
246
246
  export async function getCurrentUserSessions() {
247
247
  return Get(urls.identity.users.sessions.currentUser.v1);
248
248
  }
249
+ export async function getCurrentUserSession() {
250
+ return Get(`${urls.identity.users.sessions.currentUser.v1}/current`);
251
+ }
249
252
  export async function getSessionConfigurations() {
250
253
  return Get(urls.identity.users.sessions.configurations.v1);
251
254
  }
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.3
1
+ /** @license Frontegg v3.0.4
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -48,6 +48,7 @@ var _exportNames = {
48
48
  getVendorConfig: true,
49
49
  signUpUser: true,
50
50
  getCurrentUserSessions: true,
51
+ getCurrentUserSession: true,
51
52
  getSessionConfigurations: true,
52
53
  createOrUpdateSessionConfigrations: true,
53
54
  deleteSessionForUser: true,
@@ -119,6 +120,7 @@ exports.generateLoginResponse = generateLoginResponse;
119
120
  exports.generateLoginResponseFromOAuthResponse = generateLoginResponseFromOAuthResponse;
120
121
  exports.generateLoginResponseV2 = generateLoginResponseV2;
121
122
  exports.getActivateAccountStrategy = getActivateAccountStrategy;
123
+ exports.getCurrentUserSession = getCurrentUserSession;
122
124
  exports.getCurrentUserSessions = getCurrentUserSessions;
123
125
  exports.getOidcConfiguration = getOidcConfiguration;
124
126
  exports.getSSOConfigurations = getSSOConfigurations;
@@ -505,6 +507,10 @@ async function getCurrentUserSessions() {
505
507
  return (0, _fetch.Get)(_constants.urls.identity.users.sessions.currentUser.v1);
506
508
  }
507
509
 
510
+ async function getCurrentUserSession() {
511
+ return (0, _fetch.Get)(`${_constants.urls.identity.users.sessions.currentUser.v1}/current`);
512
+ }
513
+
508
514
  async function getSessionConfigurations() {
509
515
  return (0, _fetch.Get)(_constants.urls.identity.users.sessions.configurations.v1);
510
516
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.3
1
+ /** @license Frontegg v3.0.4
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/rest-api",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {