techsbcn-storybook 2.0.4 → 2.0.5

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.
@@ -3,5 +3,6 @@ export interface Session {
3
3
  role: string[];
4
4
  }
5
5
  export declare const getSession: () => Session | null;
6
+ export declare const getJwtToken: () => string | null;
6
7
  export declare const saveSession: (jwt: string) => void;
7
8
  export declare const clearSession: () => void;
package/dist/index.js CHANGED
@@ -627,6 +627,7 @@ var getSession = () => {
627
627
  role: roles === void 0 || roles === null ? [] : Array.isArray(roles) ? roles : [roles]
628
628
  };
629
629
  };
630
+ var getJwtToken = () => getCookie(AUTH_COOKIE_NAME);
630
631
  var saveSession = (jwt) => {
631
632
  if (typeof document === "undefined") return;
632
633
  const payload = decodeJwtPayload(jwt);
@@ -2792,6 +2793,7 @@ exports.clearSession = clearSession;
2792
2793
  exports.downloadFileBlob = downloadFileBlob;
2793
2794
  exports.getImageByBase64 = getImageByBase64;
2794
2795
  exports.getImageByBlob = getImageByBlob;
2796
+ exports.getJwtToken = getJwtToken;
2795
2797
  exports.getSession = getSession;
2796
2798
  exports.redirectDownload = redirectDownload;
2797
2799
  exports.saveSession = saveSession;