@liff/store
Advanced tools
Comparing version 2.14.0 to 2.15.0
@@ -66,2 +66,7 @@ import { LiffMenuColorSetting } from '@liff/types'; | ||
}; | ||
scanCodeV2: { | ||
permission: boolean; | ||
minVer: string; | ||
minOsVer: string; | ||
}; | ||
getAdvertisingId: { | ||
@@ -68,0 +73,0 @@ permission: boolean; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@liff/consts"),t=require("@liff/is-in-client"),n=require("@liff/util"),r={};function o(){return r}function T(r,o){if(!o)throw n.createLiffError(e.INVALID_CONFIG,"liffId is necessary for liff.init()");var T=(t.isInClient()?sessionStorage:localStorage).getItem(e.STORE_KEY+":"+o+":"+r);try{return null===T?null:JSON.parse(T)}catch(E){return null}}function E(e){return T(e,o().liffId)}function i(r,T){var E=o().liffId;if(!E)throw n.createLiffError(e.INVALID_CONFIG,"liffId is necessary for liff.init()");(t.isInClient()?sessionStorage:localStorage).setItem(e.STORE_KEY+":"+E+":"+r,JSON.stringify(T))}function s(){return E(e.STORE_OBJECT.CONTEXT)}function f(r){var T=o().liffId;if(!T)throw n.createLiffError(e.INVALID_CONFIG,"liffId is necessary for liff.init()");(t.isInClient()?sessionStorage:localStorage).removeItem(e.STORE_KEY+":"+T+":"+r)}function O(){var t=o();n.cookie.remove(e.STORE_KEY+":"+e.STORE_OBJECT.EXPIRES+":"+t.liffId,{path:"/"})}exports.clean=function(){Object.keys(e.STORE_OBJECT).forEach((function(t){f(e.STORE_OBJECT[t])})),O()},exports.get=E,exports.getAId=function(){return((s()||{}).d||{}).aId},exports.getAccessToken=function(){return E(e.STORE_OBJECT.ACCESS_TOKEN)},exports.getAppData=function(){return E(e.STORE_OBJECT.APP_DATA)},exports.getByLiffId=T,exports.getClientId=function(){return E(e.STORE_OBJECT.CLIENT_ID)},exports.getConfig=o,exports.getContext=s,exports.getDecodedIDToken=function(){return E(e.STORE_OBJECT.DECODED_ID_TOKEN)},exports.getExpireTime=function(){var t=o();return n.cookie.get(e.STORE_KEY+":"+e.STORE_OBJECT.EXPIRES+":"+t.liffId)},exports.getFeatureToken=function(){return E(e.STORE_OBJECT.FEATURE_TOKEN)},exports.getIDToken=function(){return E(e.STORE_OBJECT.ID_TOKEN)},exports.getIsSubsequentLiffApp=function(){return Boolean(E(e.STORE_OBJECT.IS_SUBSEQUENT_LIFF_APP))},exports.getIsVideoAutoPlay=function(){return((s()||{}).d||{}).autoplay||!1},exports.getLoginTmp=function(){return E(e.STORE_OBJECT.LOGIN_TMP)},exports.getMSIT=function(){return E(e.STORE_OBJECT.MSIT)},exports.getMST=function(){return E(e.STORE_OBJECT.MST)},exports.getMSTChallenge=function(){return E(e.STORE_OBJECT.MST_CHALLENGE)},exports.getMSTVerifier=function(){return E(e.STORE_OBJECT.MST_VERIFIER)},exports.getProfilePlus=function(){return(s()||{}).profilePlus},exports.getRawContext=function(){return E(e.STORE_OBJECT.RAW_CONTEXT)},exports.remove=f,exports.removeExpireTime=O,exports.removeLoginTmp=function(){f(e.STORE_OBJECT.LOGIN_TMP)},exports.set=i,exports.setAccessToken=function(t){i(e.STORE_OBJECT.ACCESS_TOKEN,t)},exports.setAppData=function(t){i(e.STORE_OBJECT.APP_DATA,t)},exports.setClientId=function(t){i(e.STORE_OBJECT.CLIENT_ID,t)},exports.setConfig=function(e){r=e},exports.setContext=function(t){i(e.STORE_OBJECT.CONTEXT,t)},exports.setDecodedIDToken=function(t){i(e.STORE_OBJECT.DECODED_ID_TOKEN,t)},exports.setExpireTime=function(t){var r=o();n.cookie.set(e.STORE_KEY+":"+e.STORE_OBJECT.EXPIRES+":"+r.liffId,t.getTime(),{expires:t.toUTCString(),path:"/",secure:null})},exports.setFeatureToken=function(t){i(e.STORE_OBJECT.FEATURE_TOKEN,t)},exports.setIDToken=function(t){i(e.STORE_OBJECT.ID_TOKEN,t)},exports.setIsSubsequentLiffApp=function(t){i(e.STORE_OBJECT.IS_SUBSEQUENT_LIFF_APP,t)},exports.setLoginTmp=function(t){i(e.STORE_OBJECT.LOGIN_TMP,t)},exports.setMSIT=function(t){i(e.STORE_OBJECT.MSIT,t)},exports.setMST=function(t){i(e.STORE_OBJECT.MST,t)},exports.setMSTChallenge=function(t){i(e.STORE_OBJECT.MST_CHALLENGE,t)},exports.setMSTVerifier=function(t){i(e.STORE_OBJECT.MST_VERIFIER,t)}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@liff/consts"),t=require("@liff/is-in-client"),n=require("@liff/util"),o={};function r(){return o}function T(o,r){if(!r)throw n.createLiffError(e.INVALID_CONFIG,"liffId is necessary for liff.init()");var T=(t.isInClient()?sessionStorage:localStorage).getItem(e.STORE_KEY+":"+r+":"+o);try{return null===T?null:JSON.parse(T)}catch(E){return null}}function E(e){return T(e,r().liffId)}function i(o,T){var E=r().liffId;if(!E)throw n.createLiffError(e.INVALID_CONFIG,"liffId is necessary for liff.init()");(t.isInClient()?sessionStorage:localStorage).setItem(e.STORE_KEY+":"+E+":"+o,JSON.stringify(T))}function s(){return E(e.STORE_OBJECT.CONTEXT)}function O(o){var T=r().liffId;if(!T)throw n.createLiffError(e.INVALID_CONFIG,"liffId is necessary for liff.init()");(t.isInClient()?sessionStorage:localStorage).removeItem(e.STORE_KEY+":"+T+":"+o)}function f(){var t=r();n.cookie.remove(e.STORE_KEY+":"+e.STORE_OBJECT.EXPIRES+":"+t.liffId,{path:"/"})}exports.clean=function(){Object.keys(e.STORE_OBJECT).forEach((function(t){O(e.STORE_OBJECT[t])})),f()},exports.clearAutologinAttempt=function(){i(e.STORE_OBJECT.AUTOLOGIN_ATTEMPT,!1)},exports.get=E,exports.getAId=function(){return((s()||{}).d||{}).aId},exports.getAccessToken=function(){return E(e.STORE_OBJECT.ACCESS_TOKEN)},exports.getAppData=function(){return E(e.STORE_OBJECT.APP_DATA)},exports.getAutologinAttempt=function(){return!!E(e.STORE_OBJECT.AUTOLOGIN_ATTEMPT)},exports.getByLiffId=T,exports.getClientId=function(){return E(e.STORE_OBJECT.CLIENT_ID)},exports.getConfig=r,exports.getContext=s,exports.getDecodedIDToken=function(){return E(e.STORE_OBJECT.DECODED_ID_TOKEN)},exports.getExpireTime=function(){var t=r();return n.cookie.get(e.STORE_KEY+":"+e.STORE_OBJECT.EXPIRES+":"+t.liffId)},exports.getFeatureToken=function(){return E(e.STORE_OBJECT.FEATURE_TOKEN)},exports.getIDToken=function(){return E(e.STORE_OBJECT.ID_TOKEN)},exports.getIsSubsequentLiffApp=function(){return Boolean(E(e.STORE_OBJECT.IS_SUBSEQUENT_LIFF_APP))},exports.getIsVideoAutoPlay=function(){return((s()||{}).d||{}).autoplay||!1},exports.getLoginTmp=function(){return E(e.STORE_OBJECT.LOGIN_TMP)},exports.getMSIT=function(){return E(e.STORE_OBJECT.MSIT)},exports.getMST=function(){return E(e.STORE_OBJECT.MST)},exports.getMSTChallenge=function(){return E(e.STORE_OBJECT.MST_CHALLENGE)},exports.getMSTVerifier=function(){return E(e.STORE_OBJECT.MST_VERIFIER)},exports.getProfilePlus=function(){return(s()||{}).profilePlus},exports.getRawContext=function(){return E(e.STORE_OBJECT.RAW_CONTEXT)},exports.remove=O,exports.removeExpireTime=f,exports.removeLoginTmp=function(){O(e.STORE_OBJECT.LOGIN_TMP)},exports.set=i,exports.setAccessToken=function(t){i(e.STORE_OBJECT.ACCESS_TOKEN,t)},exports.setAppData=function(t){i(e.STORE_OBJECT.APP_DATA,t)},exports.setAutologinAttempt=function(){i(e.STORE_OBJECT.AUTOLOGIN_ATTEMPT,!0)},exports.setClientId=function(t){i(e.STORE_OBJECT.CLIENT_ID,t)},exports.setConfig=function(e){o=e},exports.setContext=function(t){i(e.STORE_OBJECT.CONTEXT,t)},exports.setDecodedIDToken=function(t){i(e.STORE_OBJECT.DECODED_ID_TOKEN,t)},exports.setExpireTime=function(t){var o=r();n.cookie.set(e.STORE_KEY+":"+e.STORE_OBJECT.EXPIRES+":"+o.liffId,t.getTime(),{expires:t.toUTCString(),path:"/",secure:null})},exports.setFeatureToken=function(t){i(e.STORE_OBJECT.FEATURE_TOKEN,t)},exports.setIDToken=function(t){i(e.STORE_OBJECT.ID_TOKEN,t)},exports.setIsSubsequentLiffApp=function(t){i(e.STORE_OBJECT.IS_SUBSEQUENT_LIFF_APP,t)},exports.setLoginTmp=function(t){i(e.STORE_OBJECT.LOGIN_TMP,t)},exports.setMSIT=function(t){i(e.STORE_OBJECT.MSIT,t)},exports.setMST=function(t){i(e.STORE_OBJECT.MST,t)},exports.setMSTChallenge=function(t){i(e.STORE_OBJECT.MST_CHALLENGE,t)},exports.setMSTVerifier=function(t){i(e.STORE_OBJECT.MST_VERIFIER,t)}; |
@@ -24,1 +24,2 @@ export * from './aId'; | ||
export * from './remove'; | ||
export * from './autologinAttempt'; |
@@ -1,1 +0,1 @@ | ||
import{INVALID_CONFIG as n,STORE_KEY as t,STORE_OBJECT as i}from"@liff/consts";import{isInClient as f}from"@liff/is-in-client";import{createLiffError as r,cookie as o}from"@liff/util";var u={};function e(){return u}function c(n){u=n}function E(i,o){if(!o)throw r(n,"liffId is necessary for liff.init()");var u=(f()?sessionStorage:localStorage).getItem(t+":"+o+":"+i);try{return null===u?null:JSON.parse(u)}catch(e){return null}}function I(n){return E(n,e().liffId)}function l(i,o){var u=e().liffId;if(!u)throw r(n,"liffId is necessary for liff.init()");(f()?sessionStorage:localStorage).setItem(t+":"+u+":"+i,JSON.stringify(o))}function T(){return I(i.CONTEXT)}function S(n){l(i.CONTEXT,n)}function s(){return((T()||{}).d||{}).aId}function a(){return((T()||{}).d||{}).autoplay||!1}function _(){return(T()||{}).profilePlus}function N(){return Boolean(I(i.IS_SUBSEQUENT_LIFF_APP))}function O(n){l(i.IS_SUBSEQUENT_LIFF_APP,n)}function A(){return I(i.APP_DATA)}function P(n){l(i.APP_DATA,n)}function C(){return I(i.MST_VERIFIER)}function D(n){l(i.MST_VERIFIER,n)}function d(){return I(i.MSIT)}function m(n){l(i.MSIT,n)}function g(){return I(i.MST)}function L(n){l(i.MST,n)}function M(){return I(i.MST_CHALLENGE)}function p(n){l(i.MST_CHALLENGE,n)}function R(){return I(i.CLIENT_ID)}function v(n){l(i.CLIENT_ID,n)}function F(){return I(i.RAW_CONTEXT)}function K(){return I(i.FEATURE_TOKEN)}function h(n){l(i.FEATURE_TOKEN,n)}function y(){return I(i.ID_TOKEN)}function U(n){l(i.ID_TOKEN,n)}function X(){return I(i.ACCESS_TOKEN)}function G(n){l(i.ACCESS_TOKEN,n)}function w(i){var o=e().liffId;if(!o)throw r(n,"liffId is necessary for liff.init()");(f()?sessionStorage:localStorage).removeItem(t+":"+o+":"+i)}function B(){return I(i.LOGIN_TMP)}function x(n){l(i.LOGIN_TMP,n)}function H(){w(i.LOGIN_TMP)}function J(n){var f=e();o.set(t+":"+i.EXPIRES+":"+f.liffId,n.getTime(),{expires:n.toUTCString(),path:"/",secure:null})}function Q(){var n=e();return o.get(t+":"+i.EXPIRES+":"+n.liffId)}function V(){var n=e();o.remove(t+":"+i.EXPIRES+":"+n.liffId,{path:"/"})}function b(){return I(i.DECODED_ID_TOKEN)}function j(n){l(i.DECODED_ID_TOKEN,n)}function k(){Object.keys(i).forEach((function(n){w(i[n])})),V()}export{k as clean,I as get,s as getAId,X as getAccessToken,A as getAppData,E as getByLiffId,R as getClientId,e as getConfig,T as getContext,b as getDecodedIDToken,Q as getExpireTime,K as getFeatureToken,y as getIDToken,N as getIsSubsequentLiffApp,a as getIsVideoAutoPlay,B as getLoginTmp,d as getMSIT,g as getMST,M as getMSTChallenge,C as getMSTVerifier,_ as getProfilePlus,F as getRawContext,w as remove,V as removeExpireTime,H as removeLoginTmp,l as set,G as setAccessToken,P as setAppData,v as setClientId,c as setConfig,S as setContext,j as setDecodedIDToken,J as setExpireTime,h as setFeatureToken,U as setIDToken,O as setIsSubsequentLiffApp,x as setLoginTmp,m as setMSIT,L as setMST,p as setMSTChallenge,D as setMSTVerifier}; | ||
import{INVALID_CONFIG as n,STORE_KEY as t,STORE_OBJECT as i}from"@liff/consts";import{isInClient as f}from"@liff/is-in-client";import{createLiffError as r,cookie as o}from"@liff/util";var u={};function e(){return u}function c(n){u=n}function T(i,o){if(!o)throw r(n,"liffId is necessary for liff.init()");var u=(f()?sessionStorage:localStorage).getItem(t+":"+o+":"+i);try{return null===u?null:JSON.parse(u)}catch(e){return null}}function E(n){return T(n,e().liffId)}function I(i,o){var u=e().liffId;if(!u)throw r(n,"liffId is necessary for liff.init()");(f()?sessionStorage:localStorage).setItem(t+":"+u+":"+i,JSON.stringify(o))}function l(){return E(i.CONTEXT)}function _(n){I(i.CONTEXT,n)}function S(){return((l()||{}).d||{}).aId}function s(){return((l()||{}).d||{}).autoplay||!1}function a(){return(l()||{}).profilePlus}function N(){return Boolean(E(i.IS_SUBSEQUENT_LIFF_APP))}function O(n){I(i.IS_SUBSEQUENT_LIFF_APP,n)}function A(){return E(i.APP_DATA)}function P(n){I(i.APP_DATA,n)}function C(){return E(i.MST_VERIFIER)}function D(n){I(i.MST_VERIFIER,n)}function L(){return E(i.MSIT)}function M(n){I(i.MSIT,n)}function d(){return E(i.MST)}function m(n){I(i.MST,n)}function g(){return E(i.MST_CHALLENGE)}function p(n){I(i.MST_CHALLENGE,n)}function R(){return E(i.CLIENT_ID)}function U(n){I(i.CLIENT_ID,n)}function v(){return E(i.RAW_CONTEXT)}function F(){return E(i.FEATURE_TOKEN)}function G(n){I(i.FEATURE_TOKEN,n)}function K(){return E(i.ID_TOKEN)}function h(n){I(i.ID_TOKEN,n)}function y(){return E(i.ACCESS_TOKEN)}function X(n){I(i.ACCESS_TOKEN,n)}function w(i){var o=e().liffId;if(!o)throw r(n,"liffId is necessary for liff.init()");(f()?sessionStorage:localStorage).removeItem(t+":"+o+":"+i)}function B(){return E(i.LOGIN_TMP)}function x(n){I(i.LOGIN_TMP,n)}function H(){w(i.LOGIN_TMP)}function J(n){var f=e();o.set(t+":"+i.EXPIRES+":"+f.liffId,n.getTime(),{expires:n.toUTCString(),path:"/",secure:null})}function Q(){var n=e();return o.get(t+":"+i.EXPIRES+":"+n.liffId)}function V(){var n=e();o.remove(t+":"+i.EXPIRES+":"+n.liffId,{path:"/"})}function b(){return E(i.DECODED_ID_TOKEN)}function j(n){I(i.DECODED_ID_TOKEN,n)}function k(){Object.keys(i).forEach((function(n){w(i[n])})),V()}function W(){return!!E(i.AUTOLOGIN_ATTEMPT)}function q(){I(i.AUTOLOGIN_ATTEMPT,!0)}function z(){I(i.AUTOLOGIN_ATTEMPT,!1)}export{k as clean,z as clearAutologinAttempt,E as get,S as getAId,y as getAccessToken,A as getAppData,W as getAutologinAttempt,T as getByLiffId,R as getClientId,e as getConfig,l as getContext,b as getDecodedIDToken,Q as getExpireTime,F as getFeatureToken,K as getIDToken,N as getIsSubsequentLiffApp,s as getIsVideoAutoPlay,B as getLoginTmp,L as getMSIT,d as getMST,g as getMSTChallenge,C as getMSTVerifier,a as getProfilePlus,v as getRawContext,w as remove,V as removeExpireTime,H as removeLoginTmp,I as set,X as setAccessToken,P as setAppData,q as setAutologinAttempt,U as setClientId,c as setConfig,_ as setContext,j as setDecodedIDToken,J as setExpireTime,G as setFeatureToken,h as setIDToken,O as setIsSubsequentLiffApp,x as setLoginTmp,M as setMSIT,m as setMST,p as setMSTChallenge,D as setMSTVerifier}; |
{ | ||
"name": "@liff/store", | ||
"version": "2.14.0", | ||
"version": "2.15.0", | ||
"description": "@liff/store", | ||
@@ -31,6 +31,6 @@ "license": "SEE LICENSE IN README.md", | ||
"dependencies": { | ||
"@liff/consts": "2.14.0", | ||
"@liff/is-in-client": "2.14.0", | ||
"@liff/types": "2.14.0", | ||
"@liff/util": "2.14.0" | ||
"@liff/consts": "2.15.0", | ||
"@liff/is-in-client": "2.15.0", | ||
"@liff/types": "2.15.0", | ||
"@liff/util": "2.15.0" | ||
}, | ||
@@ -43,3 +43,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "204d76f6ba35fd5c6019eaa9df070c2af284af42" | ||
"gitHead": "5fa5082f1dc61f3f8e09c642cf0313e9fb91c9a4" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17271
29
294
+ Added@liff/consts@2.15.0(transitive)
+ Added@liff/is-in-client@2.15.0(transitive)
+ Added@liff/logger@2.15.0(transitive)
+ Added@liff/types@2.15.0(transitive)
+ Added@liff/util@2.15.0(transitive)
- Removed@liff/consts@2.14.0(transitive)
- Removed@liff/is-in-client@2.14.0(transitive)
- Removed@liff/logger@2.14.0(transitive)
- Removed@liff/types@2.14.0(transitive)
- Removed@liff/util@2.14.0(transitive)
Updated@liff/consts@2.15.0
Updated@liff/is-in-client@2.15.0
Updated@liff/types@2.15.0
Updated@liff/util@2.15.0