@descope/vue-sdk 2.10.8 → 2.10.10
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/dist/index.cjs +1 -1
- package/dist/index.d.ts +36 -552
- package/dist/index.mjs +1 -1
- package/package.json +10 -10
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("@descope/web-component"),r=require("@descope/web-js-sdk");require("@descope/user-management-widget"),require("@descope/role-management-widget"),require("@descope/access-key-management-widget"),require("@descope/audit-management-widget"),require("@descope/user-profile-widget"),require("@descope/applications-portal-widget");const n=Symbol("$descope"),s={"x-descope-sdk-name":"vue","x-descope-sdk-version":"2.10.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("@descope/web-component"),r=require("@descope/web-js-sdk");require("@descope/user-management-widget"),require("@descope/role-management-widget"),require("@descope/access-key-management-widget"),require("@descope/audit-management-widget"),require("@descope/user-profile-widget"),require("@descope/applications-portal-widget");const n=Symbol("$descope"),s={"x-descope-sdk-name":"vue","x-descope-sdk-version":"2.10.10"},o="undefined"!=typeof window,a=()=>{const t=e.inject(n);if(!t)throw Error("Missing Descope context, make sure you are using the Descope plugin");return t},i=()=>a().options,u=()=>a().sdk,d=e=>(...t)=>{let r;try{r=e(...t)}catch(e){console.error(e)}return r};let l;const c=e=>{const t=r({persistTokens:o,storeLastAuthenticatedUser:o,autoRefresh:o,...e});return l=t,t};l=c({projectId:"temp pid"});const p=()=>o?l?.getSessionToken():(console.warn("Get session token is not supported in SSR"),""),g=()=>o?l?.getRefreshToken():(console.warn("Get refresh token is not supported in SSR"),""),m=d(((e=p(),t)=>l?.getJwtPermissions(e,t))),b=d(((e=p(),t)=>l?.getJwtRoles(e,t))),f=d(((e=p())=>l?.getCurrentTenant(e)));var y=e.defineComponent({__name:"Descope",props:{flowId:{type:String,required:!0},tenant:{type:String},theme:{type:String},locale:{type:String},debug:{type:Boolean},telemetryKey:{type:String},redirectUrl:{type:String},autoFocus:{type:Boolean||String},validateOnBlur:{type:Boolean},restartOnError:{type:Boolean},errorTransformer:{type:Function},onScreenUpdate:{type:Function},form:{type:Object},client:{type:Object},styleId:{type:String},nonce:{type:String},dismissScreenErrorOnInput:{type:Boolean}},emits:["success","error","ready"],setup(r,{emit:n}){(customElements?.get("descope-wc")||t).sdkConfigOverrides={baseHeaders:s,persistTokens:!1,hooks:{get beforeRequest(){return l.httpClient.hooks.beforeRequest},set beforeRequest(e){}}};const o=r,a=n,{projectId:d,baseUrl:c,baseStaticUrl:p,storeLastAuthenticatedUser:g,baseCdnUrl:m}=i(),b=u(),f=e.computed((()=>o.form?JSON.stringify(o.form):"")),y=e.computed((()=>o.client?JSON.stringify(o.client):"")),v=async e=>{await(b.httpClient.hooks?.afterRequest?.({},new Response(JSON.stringify(e.detail)))),a("success",e)},h=e=>a("error",e),w=e=>a("ready",e);return(t,n)=>{const s=e.resolveComponent("descope-wc");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(s,{"project-id":e.unref(d),"base-url":e.unref(c),"base-static-url":e.unref(p),"base-cdn-url":e.unref(m),"flow-id":r.flowId,"^theme":r.theme,"^locale":r.locale,"^tenant":r.tenant,"^debug":r.debug,"^telemetryKey":r.telemetryKey,"redirect-url":r.redirectUrl,"auto-focus":r.autoFocus,"style-id":r.styleId,"validate-on-blur":r.validateOnBlur,"restart-on-error":r.restartOnError,"store-last-authenticated-user":e.unref(g),".errorTransformer":r.errorTransformer,".onScreenUpdate":r.onScreenUpdate,"^form":f.value,"^client":y.value,"^nonce":r.nonce,"^dismiss-screen-error-on-input":r.dismissScreenErrorOnInput,onSuccess:v,onError:h,onReady:w},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default")])),_:3},40,["project-id","base-url","base-static-url","base-cdn-url","flow-id","^theme","^locale","^tenant","^debug","^telemetryKey","redirect-url","auto-focus","style-id","validate-on-blur","restart-on-error","store-last-authenticated-user",".errorTransformer",".onScreenUpdate","^form","^client","^nonce","^dismiss-screen-error-on-input"])])}}});y.__file="src/Descope.vue";var v=e.defineComponent({__name:"UserManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},debug:{type:Boolean}},setup(t){const{projectId:r,baseUrl:n,baseStaticUrl:s,baseCdnUrl:o}=i();return(a,i)=>{const u=e.resolveComponent("descope-user-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(u,{"project-id":e.unref(r),"base-url":e.unref(n),"base-static-url":e.unref(s),"base-cdn-url":e.unref(o),"^theme":t.theme,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^tenant","^debug","widget-id"])])}}});v.__file="src/UserManagement.vue";var h=e.defineComponent({__name:"RoleManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},debug:{type:Boolean}},setup(t){const{projectId:r,baseUrl:n,baseStaticUrl:s,baseCdnUrl:o}=i();return(a,i)=>{const u=e.resolveComponent("descope-role-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(u,{"project-id":e.unref(r),"base-url":e.unref(n),"base-cdn-url":e.unref(o),"base-static-url":e.unref(s),"^theme":t.theme,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId},null,8,["project-id","base-url","base-cdn-url","base-static-url","^theme","^tenant","^debug","widget-id"])])}}});h.__file="src/RoleManagement.vue";var w=e.defineComponent({__name:"AccessKeyManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},styleId:{type:String},debug:{type:Boolean}},setup(t){const{projectId:r,baseUrl:n,baseStaticUrl:s,baseCdnUrl:o}=i();return(a,i)=>{const u=e.resolveComponent("descope-access-key-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(u,{"project-id":e.unref(r),"base-url":e.unref(n),"base-static-url":e.unref(s),"base-cdn-url":e.unref(o),"^theme":t.theme,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^tenant","^debug","widget-id","style-id"])])}}});w.__file="src/AccessKeyManagement.vue";var S=e.defineComponent({__name:"AuditManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},styleId:{type:String},debug:{type:Boolean}},setup(t){const{projectId:r,baseUrl:n,baseStaticUrl:s,baseCdnUrl:o}=i();return(a,i)=>{const u=e.resolveComponent("descope-audit-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(u,{"project-id":e.unref(r),"base-url":e.unref(n),"base-static-url":e.unref(s),"base-cdn-url":e.unref(o),"^theme":t.theme,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^tenant","^debug","widget-id","style-id"])])}}});S.__file="src/AuditManagement.vue";var U=e.defineComponent({__name:"UserProfile",props:{widgetId:{type:String,required:!0},theme:{type:String},debug:{type:Boolean}},emits:["logout"],setup(t,{emit:r}){const s=e.inject(n),o=r,a=e=>{s?.resetAuth(),o("logout",e)},{projectId:u,baseUrl:d,baseStaticUrl:l,baseCdnUrl:c}=i();return(r,n)=>{const s=e.resolveComponent("descope-user-profile-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(s,{"project-id":e.unref(u),"base-url":e.unref(d),"base-static-url":e.unref(l),"base-cdn-url":e.unref(c),"^theme":t.theme,"^debug":t.debug,"widget-id":t.widgetId,onLogout:a},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^debug","widget-id"])])}}});U.__file="src/UserProfile.vue";var k=e.defineComponent({__name:"ApplicationsPortal",props:{widgetId:{type:String,required:!0},theme:{type:String},styleId:{type:String},debug:{type:Boolean}},setup(t){const{projectId:r,baseUrl:n,baseStaticUrl:s,baseCdnUrl:o}=i();return(a,i)=>{const u=e.resolveComponent("descope-applications-portal-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(u,{"project-id":e.unref(r),"base-url":e.unref(n),"base-static-url":e.unref(s),"base-cdn-url":e.unref(o),"^theme":t.theme,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^debug","widget-id","style-id"])])}}});k.__file="src/ApplicationsPortal.vue";const C=e.ref(null);let I;var _={install:function(t,r){const o=c({persistTokens:!0,autoRefresh:!0,...r,baseHeaders:s});I=o;const a=e.ref(null),i=e.ref(""),u=e.ref(!1),d=e.ref(null),l=e.ref(null);o.onSessionTokenChange((e=>{i.value=e})),o.onIsAuthenticatedChange((e=>{u.value=e})),o.onUserChange((e=>{l.value=e}));const p=async()=>{a.value=!0,await o.refresh(),a.value=!1},g=e.computed((()=>null===a.value)),m=e.computed((()=>null===d.value));C.value=()=>new Promise(((t,r)=>{!u.value&&g.value&&p().catch(r),e.watch((()=>a.value),(()=>!a.value&&t(!!e.unref(u))),{immediate:!0})})),t.provide(n,{session:{fetchSession:p,isLoading:e.readonly(a),session:e.readonly(i),isAuthenticated:e.readonly(u),isFetchSessionWasNeverCalled:g},user:{fetchUser:async()=>{d.value=!0,await o.me(),d.value=!1},isLoading:e.readonly(d),user:e.readonly(l),isFetchUserWasNeverCalled:m},sdk:o,options:r,resetAuth:function(){i.value="",u.value=!1,l.value=null}})}};exports.AccessKeyManagement=w,exports.ApplicationsPortal=k,exports.AuditManagement=S,exports.Descope=y,exports.RoleManagement=h,exports.UserManagement=v,exports.UserProfile=U,exports.default=_,exports.getCurrentTenant=f,exports.getJwtPermissions=m,exports.getJwtRoles=b,exports.getRefreshToken=g,exports.getSdk=()=>I,exports.getSessionToken=p,exports.isRefreshTokenExpired=(e=g())=>l?.isJwtExpired(e),exports.isSessionTokenExpired=(e=p())=>l?.isJwtExpired(e),exports.routeGuard=()=>e.unref(C)?.(),exports.useDescope=u,exports.useSession=()=>{const{session:t}=a();return t.isFetchSessionWasNeverCalled.value&&t.fetchSession(),{isLoading:e.computed((()=>t.isLoading.value||t.isFetchSessionWasNeverCalled.value)),sessionToken:t.session,isAuthenticated:t.isAuthenticated}},exports.useUser=()=>{const{user:t,session:r}=a(),n=()=>{!t.user.value&&r.session.value&&t.fetchUser()};return n(),e.watch(r.session,n),{isLoading:e.computed((()=>t.isLoading.value||t.isFetchUserWasNeverCalled.value)),user:t.user}};
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -389,6 +389,7 @@ declare const useDescope: () => ((({
|
|
|
389
389
|
locale?: string;
|
|
390
390
|
oidcPrompt?: string;
|
|
391
391
|
oidcErrorRedirectUri?: string;
|
|
392
|
+
oidcResource?: string;
|
|
392
393
|
nativeOptions?: {
|
|
393
394
|
platform: "ios" | "android";
|
|
394
395
|
oauthProvider?: string;
|
|
@@ -398,7 +399,7 @@ declare const useDescope: () => ((({
|
|
|
398
399
|
applicationScopes?: string;
|
|
399
400
|
outboundAppId?: string;
|
|
400
401
|
outboundAppScopes?: string[];
|
|
401
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
402
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
402
403
|
lastAuth?: Omit<{
|
|
403
404
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
404
405
|
oauthProvider?: string;
|
|
@@ -981,51 +982,7 @@ declare const useDescope: () => ((({
|
|
|
981
982
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
982
983
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
983
984
|
getCurrentTenant: (token: string) => string;
|
|
984
|
-
httpClient:
|
|
985
|
-
get: (path: string, config?: {
|
|
986
|
-
headers?: HeadersInit;
|
|
987
|
-
queryParams?: {
|
|
988
|
-
[key: string]: string;
|
|
989
|
-
};
|
|
990
|
-
token?: string;
|
|
991
|
-
}) => Promise<Response>;
|
|
992
|
-
post: (path: string, body?: any, config?: {
|
|
993
|
-
headers?: HeadersInit;
|
|
994
|
-
queryParams?: {
|
|
995
|
-
[key: string]: string;
|
|
996
|
-
};
|
|
997
|
-
token?: string;
|
|
998
|
-
}) => Promise<Response>;
|
|
999
|
-
patch: (path: string, body?: any, config?: {
|
|
1000
|
-
headers?: HeadersInit;
|
|
1001
|
-
queryParams?: {
|
|
1002
|
-
[key: string]: string;
|
|
1003
|
-
};
|
|
1004
|
-
token?: string;
|
|
1005
|
-
}) => Promise<Response>;
|
|
1006
|
-
put: (path: string, body?: any, config?: {
|
|
1007
|
-
headers?: HeadersInit;
|
|
1008
|
-
queryParams?: {
|
|
1009
|
-
[key: string]: string;
|
|
1010
|
-
};
|
|
1011
|
-
token?: string;
|
|
1012
|
-
}) => Promise<Response>;
|
|
1013
|
-
delete: (path: string, config?: {
|
|
1014
|
-
headers?: HeadersInit;
|
|
1015
|
-
queryParams?: {
|
|
1016
|
-
[key: string]: string;
|
|
1017
|
-
};
|
|
1018
|
-
token?: string;
|
|
1019
|
-
}) => Promise<Response>;
|
|
1020
|
-
hooks?: {
|
|
1021
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
1022
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
1023
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
1024
|
-
};
|
|
1025
|
-
buildUrl: (path: string, queryParams?: {
|
|
1026
|
-
[key: string]: string;
|
|
1027
|
-
}) => string;
|
|
1028
|
-
};
|
|
985
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
1029
986
|
} | {
|
|
1030
987
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1031
988
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
@@ -1060,6 +1017,7 @@ declare const useDescope: () => ((({
|
|
|
1060
1017
|
locale?: string;
|
|
1061
1018
|
oidcPrompt?: string;
|
|
1062
1019
|
oidcErrorRedirectUri?: string;
|
|
1020
|
+
oidcResource?: string;
|
|
1063
1021
|
nativeOptions?: {
|
|
1064
1022
|
platform: "ios" | "android";
|
|
1065
1023
|
oauthProvider?: string;
|
|
@@ -1069,7 +1027,7 @@ declare const useDescope: () => ((({
|
|
|
1069
1027
|
applicationScopes?: string;
|
|
1070
1028
|
outboundAppId?: string;
|
|
1071
1029
|
outboundAppScopes?: string[];
|
|
1072
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
1030
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
1073
1031
|
lastAuth?: Omit<{
|
|
1074
1032
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
1075
1033
|
oauthProvider?: string;
|
|
@@ -1652,51 +1610,7 @@ declare const useDescope: () => ((({
|
|
|
1652
1610
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
1653
1611
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
1654
1612
|
getCurrentTenant: (token: string) => string;
|
|
1655
|
-
httpClient:
|
|
1656
|
-
get: (path: string, config?: {
|
|
1657
|
-
headers?: HeadersInit;
|
|
1658
|
-
queryParams?: {
|
|
1659
|
-
[key: string]: string;
|
|
1660
|
-
};
|
|
1661
|
-
token?: string;
|
|
1662
|
-
}) => Promise<Response>;
|
|
1663
|
-
post: (path: string, body?: any, config?: {
|
|
1664
|
-
headers?: HeadersInit;
|
|
1665
|
-
queryParams?: {
|
|
1666
|
-
[key: string]: string;
|
|
1667
|
-
};
|
|
1668
|
-
token?: string;
|
|
1669
|
-
}) => Promise<Response>;
|
|
1670
|
-
patch: (path: string, body?: any, config?: {
|
|
1671
|
-
headers?: HeadersInit;
|
|
1672
|
-
queryParams?: {
|
|
1673
|
-
[key: string]: string;
|
|
1674
|
-
};
|
|
1675
|
-
token?: string;
|
|
1676
|
-
}) => Promise<Response>;
|
|
1677
|
-
put: (path: string, body?: any, config?: {
|
|
1678
|
-
headers?: HeadersInit;
|
|
1679
|
-
queryParams?: {
|
|
1680
|
-
[key: string]: string;
|
|
1681
|
-
};
|
|
1682
|
-
token?: string;
|
|
1683
|
-
}) => Promise<Response>;
|
|
1684
|
-
delete: (path: string, config?: {
|
|
1685
|
-
headers?: HeadersInit;
|
|
1686
|
-
queryParams?: {
|
|
1687
|
-
[key: string]: string;
|
|
1688
|
-
};
|
|
1689
|
-
token?: string;
|
|
1690
|
-
}) => Promise<Response>;
|
|
1691
|
-
hooks?: {
|
|
1692
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
1693
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
1694
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
1695
|
-
};
|
|
1696
|
-
buildUrl: (path: string, queryParams?: {
|
|
1697
|
-
[key: string]: string;
|
|
1698
|
-
}) => string;
|
|
1699
|
-
};
|
|
1613
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
1700
1614
|
} | {
|
|
1701
1615
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1702
1616
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
@@ -1731,6 +1645,7 @@ declare const useDescope: () => ((({
|
|
|
1731
1645
|
locale?: string;
|
|
1732
1646
|
oidcPrompt?: string;
|
|
1733
1647
|
oidcErrorRedirectUri?: string;
|
|
1648
|
+
oidcResource?: string;
|
|
1734
1649
|
nativeOptions?: {
|
|
1735
1650
|
platform: "ios" | "android";
|
|
1736
1651
|
oauthProvider?: string;
|
|
@@ -1740,7 +1655,7 @@ declare const useDescope: () => ((({
|
|
|
1740
1655
|
applicationScopes?: string;
|
|
1741
1656
|
outboundAppId?: string;
|
|
1742
1657
|
outboundAppScopes?: string[];
|
|
1743
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
1658
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
1744
1659
|
lastAuth?: Omit<{
|
|
1745
1660
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
1746
1661
|
oauthProvider?: string;
|
|
@@ -2323,51 +2238,7 @@ declare const useDescope: () => ((({
|
|
|
2323
2238
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
2324
2239
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
2325
2240
|
getCurrentTenant: (token: string) => string;
|
|
2326
|
-
httpClient:
|
|
2327
|
-
get: (path: string, config?: {
|
|
2328
|
-
headers?: HeadersInit;
|
|
2329
|
-
queryParams?: {
|
|
2330
|
-
[key: string]: string;
|
|
2331
|
-
};
|
|
2332
|
-
token?: string;
|
|
2333
|
-
}) => Promise<Response>;
|
|
2334
|
-
post: (path: string, body?: any, config?: {
|
|
2335
|
-
headers?: HeadersInit;
|
|
2336
|
-
queryParams?: {
|
|
2337
|
-
[key: string]: string;
|
|
2338
|
-
};
|
|
2339
|
-
token?: string;
|
|
2340
|
-
}) => Promise<Response>;
|
|
2341
|
-
patch: (path: string, body?: any, config?: {
|
|
2342
|
-
headers?: HeadersInit;
|
|
2343
|
-
queryParams?: {
|
|
2344
|
-
[key: string]: string;
|
|
2345
|
-
};
|
|
2346
|
-
token?: string;
|
|
2347
|
-
}) => Promise<Response>;
|
|
2348
|
-
put: (path: string, body?: any, config?: {
|
|
2349
|
-
headers?: HeadersInit;
|
|
2350
|
-
queryParams?: {
|
|
2351
|
-
[key: string]: string;
|
|
2352
|
-
};
|
|
2353
|
-
token?: string;
|
|
2354
|
-
}) => Promise<Response>;
|
|
2355
|
-
delete: (path: string, config?: {
|
|
2356
|
-
headers?: HeadersInit;
|
|
2357
|
-
queryParams?: {
|
|
2358
|
-
[key: string]: string;
|
|
2359
|
-
};
|
|
2360
|
-
token?: string;
|
|
2361
|
-
}) => Promise<Response>;
|
|
2362
|
-
hooks?: {
|
|
2363
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
2364
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
2365
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
2366
|
-
};
|
|
2367
|
-
buildUrl: (path: string, queryParams?: {
|
|
2368
|
-
[key: string]: string;
|
|
2369
|
-
}) => string;
|
|
2370
|
-
};
|
|
2241
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
2371
2242
|
}) & {
|
|
2372
2243
|
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
2373
2244
|
onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
|
|
@@ -2409,6 +2280,7 @@ declare const useDescope: () => ((({
|
|
|
2409
2280
|
locale?: string;
|
|
2410
2281
|
oidcPrompt?: string;
|
|
2411
2282
|
oidcErrorRedirectUri?: string;
|
|
2283
|
+
oidcResource?: string;
|
|
2412
2284
|
nativeOptions?: {
|
|
2413
2285
|
platform: "ios" | "android";
|
|
2414
2286
|
oauthProvider?: string;
|
|
@@ -2418,7 +2290,7 @@ declare const useDescope: () => ((({
|
|
|
2418
2290
|
applicationScopes?: string;
|
|
2419
2291
|
outboundAppId?: string;
|
|
2420
2292
|
outboundAppScopes?: string[];
|
|
2421
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
2293
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
2422
2294
|
lastAuth?: Omit<{
|
|
2423
2295
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
2424
2296
|
oauthProvider?: string;
|
|
@@ -3001,51 +2873,7 @@ declare const useDescope: () => ((({
|
|
|
3001
2873
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
3002
2874
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
3003
2875
|
getCurrentTenant: (token: string) => string;
|
|
3004
|
-
httpClient:
|
|
3005
|
-
get: (path: string, config?: {
|
|
3006
|
-
headers?: HeadersInit;
|
|
3007
|
-
queryParams?: {
|
|
3008
|
-
[key: string]: string;
|
|
3009
|
-
};
|
|
3010
|
-
token?: string;
|
|
3011
|
-
}) => Promise<Response>;
|
|
3012
|
-
post: (path: string, body?: any, config?: {
|
|
3013
|
-
headers?: HeadersInit;
|
|
3014
|
-
queryParams?: {
|
|
3015
|
-
[key: string]: string;
|
|
3016
|
-
};
|
|
3017
|
-
token?: string;
|
|
3018
|
-
}) => Promise<Response>;
|
|
3019
|
-
patch: (path: string, body?: any, config?: {
|
|
3020
|
-
headers?: HeadersInit;
|
|
3021
|
-
queryParams?: {
|
|
3022
|
-
[key: string]: string;
|
|
3023
|
-
};
|
|
3024
|
-
token?: string;
|
|
3025
|
-
}) => Promise<Response>;
|
|
3026
|
-
put: (path: string, body?: any, config?: {
|
|
3027
|
-
headers?: HeadersInit;
|
|
3028
|
-
queryParams?: {
|
|
3029
|
-
[key: string]: string;
|
|
3030
|
-
};
|
|
3031
|
-
token?: string;
|
|
3032
|
-
}) => Promise<Response>;
|
|
3033
|
-
delete: (path: string, config?: {
|
|
3034
|
-
headers?: HeadersInit;
|
|
3035
|
-
queryParams?: {
|
|
3036
|
-
[key: string]: string;
|
|
3037
|
-
};
|
|
3038
|
-
token?: string;
|
|
3039
|
-
}) => Promise<Response>;
|
|
3040
|
-
hooks?: {
|
|
3041
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
3042
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
3043
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
3044
|
-
};
|
|
3045
|
-
buildUrl: (path: string, queryParams?: {
|
|
3046
|
-
[key: string]: string;
|
|
3047
|
-
}) => string;
|
|
3048
|
-
};
|
|
2876
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
3049
2877
|
} | {
|
|
3050
2878
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3051
2879
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
@@ -3080,6 +2908,7 @@ declare const useDescope: () => ((({
|
|
|
3080
2908
|
locale?: string;
|
|
3081
2909
|
oidcPrompt?: string;
|
|
3082
2910
|
oidcErrorRedirectUri?: string;
|
|
2911
|
+
oidcResource?: string;
|
|
3083
2912
|
nativeOptions?: {
|
|
3084
2913
|
platform: "ios" | "android";
|
|
3085
2914
|
oauthProvider?: string;
|
|
@@ -3089,7 +2918,7 @@ declare const useDescope: () => ((({
|
|
|
3089
2918
|
applicationScopes?: string;
|
|
3090
2919
|
outboundAppId?: string;
|
|
3091
2920
|
outboundAppScopes?: string[];
|
|
3092
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
2921
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
3093
2922
|
lastAuth?: Omit<{
|
|
3094
2923
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
3095
2924
|
oauthProvider?: string;
|
|
@@ -3672,51 +3501,7 @@ declare const useDescope: () => ((({
|
|
|
3672
3501
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
3673
3502
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
3674
3503
|
getCurrentTenant: (token: string) => string;
|
|
3675
|
-
httpClient:
|
|
3676
|
-
get: (path: string, config?: {
|
|
3677
|
-
headers?: HeadersInit;
|
|
3678
|
-
queryParams?: {
|
|
3679
|
-
[key: string]: string;
|
|
3680
|
-
};
|
|
3681
|
-
token?: string;
|
|
3682
|
-
}) => Promise<Response>;
|
|
3683
|
-
post: (path: string, body?: any, config?: {
|
|
3684
|
-
headers?: HeadersInit;
|
|
3685
|
-
queryParams?: {
|
|
3686
|
-
[key: string]: string;
|
|
3687
|
-
};
|
|
3688
|
-
token?: string;
|
|
3689
|
-
}) => Promise<Response>;
|
|
3690
|
-
patch: (path: string, body?: any, config?: {
|
|
3691
|
-
headers?: HeadersInit;
|
|
3692
|
-
queryParams?: {
|
|
3693
|
-
[key: string]: string;
|
|
3694
|
-
};
|
|
3695
|
-
token?: string;
|
|
3696
|
-
}) => Promise<Response>;
|
|
3697
|
-
put: (path: string, body?: any, config?: {
|
|
3698
|
-
headers?: HeadersInit;
|
|
3699
|
-
queryParams?: {
|
|
3700
|
-
[key: string]: string;
|
|
3701
|
-
};
|
|
3702
|
-
token?: string;
|
|
3703
|
-
}) => Promise<Response>;
|
|
3704
|
-
delete: (path: string, config?: {
|
|
3705
|
-
headers?: HeadersInit;
|
|
3706
|
-
queryParams?: {
|
|
3707
|
-
[key: string]: string;
|
|
3708
|
-
};
|
|
3709
|
-
token?: string;
|
|
3710
|
-
}) => Promise<Response>;
|
|
3711
|
-
hooks?: {
|
|
3712
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
3713
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
3714
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
3715
|
-
};
|
|
3716
|
-
buildUrl: (path: string, queryParams?: {
|
|
3717
|
-
[key: string]: string;
|
|
3718
|
-
}) => string;
|
|
3719
|
-
};
|
|
3504
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
3720
3505
|
} | {
|
|
3721
3506
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3722
3507
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
@@ -3751,6 +3536,7 @@ declare const useDescope: () => ((({
|
|
|
3751
3536
|
locale?: string;
|
|
3752
3537
|
oidcPrompt?: string;
|
|
3753
3538
|
oidcErrorRedirectUri?: string;
|
|
3539
|
+
oidcResource?: string;
|
|
3754
3540
|
nativeOptions?: {
|
|
3755
3541
|
platform: "ios" | "android";
|
|
3756
3542
|
oauthProvider?: string;
|
|
@@ -3760,7 +3546,7 @@ declare const useDescope: () => ((({
|
|
|
3760
3546
|
applicationScopes?: string;
|
|
3761
3547
|
outboundAppId?: string;
|
|
3762
3548
|
outboundAppScopes?: string[];
|
|
3763
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
3549
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
3764
3550
|
lastAuth?: Omit<{
|
|
3765
3551
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
3766
3552
|
oauthProvider?: string;
|
|
@@ -4343,51 +4129,7 @@ declare const useDescope: () => ((({
|
|
|
4343
4129
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
4344
4130
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
4345
4131
|
getCurrentTenant: (token: string) => string;
|
|
4346
|
-
httpClient:
|
|
4347
|
-
get: (path: string, config?: {
|
|
4348
|
-
headers?: HeadersInit;
|
|
4349
|
-
queryParams?: {
|
|
4350
|
-
[key: string]: string;
|
|
4351
|
-
};
|
|
4352
|
-
token?: string;
|
|
4353
|
-
}) => Promise<Response>;
|
|
4354
|
-
post: (path: string, body?: any, config?: {
|
|
4355
|
-
headers?: HeadersInit;
|
|
4356
|
-
queryParams?: {
|
|
4357
|
-
[key: string]: string;
|
|
4358
|
-
};
|
|
4359
|
-
token?: string;
|
|
4360
|
-
}) => Promise<Response>;
|
|
4361
|
-
patch: (path: string, body?: any, config?: {
|
|
4362
|
-
headers?: HeadersInit;
|
|
4363
|
-
queryParams?: {
|
|
4364
|
-
[key: string]: string;
|
|
4365
|
-
};
|
|
4366
|
-
token?: string;
|
|
4367
|
-
}) => Promise<Response>;
|
|
4368
|
-
put: (path: string, body?: any, config?: {
|
|
4369
|
-
headers?: HeadersInit;
|
|
4370
|
-
queryParams?: {
|
|
4371
|
-
[key: string]: string;
|
|
4372
|
-
};
|
|
4373
|
-
token?: string;
|
|
4374
|
-
}) => Promise<Response>;
|
|
4375
|
-
delete: (path: string, config?: {
|
|
4376
|
-
headers?: HeadersInit;
|
|
4377
|
-
queryParams?: {
|
|
4378
|
-
[key: string]: string;
|
|
4379
|
-
};
|
|
4380
|
-
token?: string;
|
|
4381
|
-
}) => Promise<Response>;
|
|
4382
|
-
hooks?: {
|
|
4383
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
4384
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
4385
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
4386
|
-
};
|
|
4387
|
-
buildUrl: (path: string, queryParams?: {
|
|
4388
|
-
[key: string]: string;
|
|
4389
|
-
}) => string;
|
|
4390
|
-
};
|
|
4132
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
4391
4133
|
}) & {
|
|
4392
4134
|
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
4393
4135
|
onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
|
|
@@ -4450,6 +4192,7 @@ declare const getSdk: () => ((({
|
|
|
4450
4192
|
locale?: string;
|
|
4451
4193
|
oidcPrompt?: string;
|
|
4452
4194
|
oidcErrorRedirectUri?: string;
|
|
4195
|
+
oidcResource?: string;
|
|
4453
4196
|
nativeOptions?: {
|
|
4454
4197
|
platform: "ios" | "android";
|
|
4455
4198
|
oauthProvider?: string;
|
|
@@ -4459,7 +4202,7 @@ declare const getSdk: () => ((({
|
|
|
4459
4202
|
applicationScopes?: string;
|
|
4460
4203
|
outboundAppId?: string;
|
|
4461
4204
|
outboundAppScopes?: string[];
|
|
4462
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
4205
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
4463
4206
|
lastAuth?: Omit<{
|
|
4464
4207
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
4465
4208
|
oauthProvider?: string;
|
|
@@ -5042,51 +4785,7 @@ declare const getSdk: () => ((({
|
|
|
5042
4785
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
5043
4786
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
5044
4787
|
getCurrentTenant: (token: string) => string;
|
|
5045
|
-
httpClient:
|
|
5046
|
-
get: (path: string, config?: {
|
|
5047
|
-
headers?: HeadersInit;
|
|
5048
|
-
queryParams?: {
|
|
5049
|
-
[key: string]: string;
|
|
5050
|
-
};
|
|
5051
|
-
token?: string;
|
|
5052
|
-
}) => Promise<Response>;
|
|
5053
|
-
post: (path: string, body?: any, config?: {
|
|
5054
|
-
headers?: HeadersInit;
|
|
5055
|
-
queryParams?: {
|
|
5056
|
-
[key: string]: string;
|
|
5057
|
-
};
|
|
5058
|
-
token?: string;
|
|
5059
|
-
}) => Promise<Response>;
|
|
5060
|
-
patch: (path: string, body?: any, config?: {
|
|
5061
|
-
headers?: HeadersInit;
|
|
5062
|
-
queryParams?: {
|
|
5063
|
-
[key: string]: string;
|
|
5064
|
-
};
|
|
5065
|
-
token?: string;
|
|
5066
|
-
}) => Promise<Response>;
|
|
5067
|
-
put: (path: string, body?: any, config?: {
|
|
5068
|
-
headers?: HeadersInit;
|
|
5069
|
-
queryParams?: {
|
|
5070
|
-
[key: string]: string;
|
|
5071
|
-
};
|
|
5072
|
-
token?: string;
|
|
5073
|
-
}) => Promise<Response>;
|
|
5074
|
-
delete: (path: string, config?: {
|
|
5075
|
-
headers?: HeadersInit;
|
|
5076
|
-
queryParams?: {
|
|
5077
|
-
[key: string]: string;
|
|
5078
|
-
};
|
|
5079
|
-
token?: string;
|
|
5080
|
-
}) => Promise<Response>;
|
|
5081
|
-
hooks?: {
|
|
5082
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
5083
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
5084
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
5085
|
-
};
|
|
5086
|
-
buildUrl: (path: string, queryParams?: {
|
|
5087
|
-
[key: string]: string;
|
|
5088
|
-
}) => string;
|
|
5089
|
-
};
|
|
4788
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
5090
4789
|
} | {
|
|
5091
4790
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5092
4791
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
@@ -5121,6 +4820,7 @@ declare const getSdk: () => ((({
|
|
|
5121
4820
|
locale?: string;
|
|
5122
4821
|
oidcPrompt?: string;
|
|
5123
4822
|
oidcErrorRedirectUri?: string;
|
|
4823
|
+
oidcResource?: string;
|
|
5124
4824
|
nativeOptions?: {
|
|
5125
4825
|
platform: "ios" | "android";
|
|
5126
4826
|
oauthProvider?: string;
|
|
@@ -5130,7 +4830,7 @@ declare const getSdk: () => ((({
|
|
|
5130
4830
|
applicationScopes?: string;
|
|
5131
4831
|
outboundAppId?: string;
|
|
5132
4832
|
outboundAppScopes?: string[];
|
|
5133
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
4833
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
5134
4834
|
lastAuth?: Omit<{
|
|
5135
4835
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
5136
4836
|
oauthProvider?: string;
|
|
@@ -5713,51 +5413,7 @@ declare const getSdk: () => ((({
|
|
|
5713
5413
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
5714
5414
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
5715
5415
|
getCurrentTenant: (token: string) => string;
|
|
5716
|
-
httpClient:
|
|
5717
|
-
get: (path: string, config?: {
|
|
5718
|
-
headers?: HeadersInit;
|
|
5719
|
-
queryParams?: {
|
|
5720
|
-
[key: string]: string;
|
|
5721
|
-
};
|
|
5722
|
-
token?: string;
|
|
5723
|
-
}) => Promise<Response>;
|
|
5724
|
-
post: (path: string, body?: any, config?: {
|
|
5725
|
-
headers?: HeadersInit;
|
|
5726
|
-
queryParams?: {
|
|
5727
|
-
[key: string]: string;
|
|
5728
|
-
};
|
|
5729
|
-
token?: string;
|
|
5730
|
-
}) => Promise<Response>;
|
|
5731
|
-
patch: (path: string, body?: any, config?: {
|
|
5732
|
-
headers?: HeadersInit;
|
|
5733
|
-
queryParams?: {
|
|
5734
|
-
[key: string]: string;
|
|
5735
|
-
};
|
|
5736
|
-
token?: string;
|
|
5737
|
-
}) => Promise<Response>;
|
|
5738
|
-
put: (path: string, body?: any, config?: {
|
|
5739
|
-
headers?: HeadersInit;
|
|
5740
|
-
queryParams?: {
|
|
5741
|
-
[key: string]: string;
|
|
5742
|
-
};
|
|
5743
|
-
token?: string;
|
|
5744
|
-
}) => Promise<Response>;
|
|
5745
|
-
delete: (path: string, config?: {
|
|
5746
|
-
headers?: HeadersInit;
|
|
5747
|
-
queryParams?: {
|
|
5748
|
-
[key: string]: string;
|
|
5749
|
-
};
|
|
5750
|
-
token?: string;
|
|
5751
|
-
}) => Promise<Response>;
|
|
5752
|
-
hooks?: {
|
|
5753
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
5754
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
5755
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
5756
|
-
};
|
|
5757
|
-
buildUrl: (path: string, queryParams?: {
|
|
5758
|
-
[key: string]: string;
|
|
5759
|
-
}) => string;
|
|
5760
|
-
};
|
|
5416
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
5761
5417
|
} | {
|
|
5762
5418
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5763
5419
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
@@ -5792,6 +5448,7 @@ declare const getSdk: () => ((({
|
|
|
5792
5448
|
locale?: string;
|
|
5793
5449
|
oidcPrompt?: string;
|
|
5794
5450
|
oidcErrorRedirectUri?: string;
|
|
5451
|
+
oidcResource?: string;
|
|
5795
5452
|
nativeOptions?: {
|
|
5796
5453
|
platform: "ios" | "android";
|
|
5797
5454
|
oauthProvider?: string;
|
|
@@ -5801,7 +5458,7 @@ declare const getSdk: () => ((({
|
|
|
5801
5458
|
applicationScopes?: string;
|
|
5802
5459
|
outboundAppId?: string;
|
|
5803
5460
|
outboundAppScopes?: string[];
|
|
5804
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
5461
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
5805
5462
|
lastAuth?: Omit<{
|
|
5806
5463
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
5807
5464
|
oauthProvider?: string;
|
|
@@ -6384,51 +6041,7 @@ declare const getSdk: () => ((({
|
|
|
6384
6041
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
6385
6042
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
6386
6043
|
getCurrentTenant: (token: string) => string;
|
|
6387
|
-
httpClient:
|
|
6388
|
-
get: (path: string, config?: {
|
|
6389
|
-
headers?: HeadersInit;
|
|
6390
|
-
queryParams?: {
|
|
6391
|
-
[key: string]: string;
|
|
6392
|
-
};
|
|
6393
|
-
token?: string;
|
|
6394
|
-
}) => Promise<Response>;
|
|
6395
|
-
post: (path: string, body?: any, config?: {
|
|
6396
|
-
headers?: HeadersInit;
|
|
6397
|
-
queryParams?: {
|
|
6398
|
-
[key: string]: string;
|
|
6399
|
-
};
|
|
6400
|
-
token?: string;
|
|
6401
|
-
}) => Promise<Response>;
|
|
6402
|
-
patch: (path: string, body?: any, config?: {
|
|
6403
|
-
headers?: HeadersInit;
|
|
6404
|
-
queryParams?: {
|
|
6405
|
-
[key: string]: string;
|
|
6406
|
-
};
|
|
6407
|
-
token?: string;
|
|
6408
|
-
}) => Promise<Response>;
|
|
6409
|
-
put: (path: string, body?: any, config?: {
|
|
6410
|
-
headers?: HeadersInit;
|
|
6411
|
-
queryParams?: {
|
|
6412
|
-
[key: string]: string;
|
|
6413
|
-
};
|
|
6414
|
-
token?: string;
|
|
6415
|
-
}) => Promise<Response>;
|
|
6416
|
-
delete: (path: string, config?: {
|
|
6417
|
-
headers?: HeadersInit;
|
|
6418
|
-
queryParams?: {
|
|
6419
|
-
[key: string]: string;
|
|
6420
|
-
};
|
|
6421
|
-
token?: string;
|
|
6422
|
-
}) => Promise<Response>;
|
|
6423
|
-
hooks?: {
|
|
6424
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
6425
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
6426
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
6427
|
-
};
|
|
6428
|
-
buildUrl: (path: string, queryParams?: {
|
|
6429
|
-
[key: string]: string;
|
|
6430
|
-
}) => string;
|
|
6431
|
-
};
|
|
6044
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
6432
6045
|
}) & {
|
|
6433
6046
|
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
6434
6047
|
onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
|
|
@@ -6470,6 +6083,7 @@ declare const getSdk: () => ((({
|
|
|
6470
6083
|
locale?: string;
|
|
6471
6084
|
oidcPrompt?: string;
|
|
6472
6085
|
oidcErrorRedirectUri?: string;
|
|
6086
|
+
oidcResource?: string;
|
|
6473
6087
|
nativeOptions?: {
|
|
6474
6088
|
platform: "ios" | "android";
|
|
6475
6089
|
oauthProvider?: string;
|
|
@@ -6479,7 +6093,7 @@ declare const getSdk: () => ((({
|
|
|
6479
6093
|
applicationScopes?: string;
|
|
6480
6094
|
outboundAppId?: string;
|
|
6481
6095
|
outboundAppScopes?: string[];
|
|
6482
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
6096
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
6483
6097
|
lastAuth?: Omit<{
|
|
6484
6098
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
6485
6099
|
oauthProvider?: string;
|
|
@@ -7062,51 +6676,7 @@ declare const getSdk: () => ((({
|
|
|
7062
6676
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
7063
6677
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
7064
6678
|
getCurrentTenant: (token: string) => string;
|
|
7065
|
-
httpClient:
|
|
7066
|
-
get: (path: string, config?: {
|
|
7067
|
-
headers?: HeadersInit;
|
|
7068
|
-
queryParams?: {
|
|
7069
|
-
[key: string]: string;
|
|
7070
|
-
};
|
|
7071
|
-
token?: string;
|
|
7072
|
-
}) => Promise<Response>;
|
|
7073
|
-
post: (path: string, body?: any, config?: {
|
|
7074
|
-
headers?: HeadersInit;
|
|
7075
|
-
queryParams?: {
|
|
7076
|
-
[key: string]: string;
|
|
7077
|
-
};
|
|
7078
|
-
token?: string;
|
|
7079
|
-
}) => Promise<Response>;
|
|
7080
|
-
patch: (path: string, body?: any, config?: {
|
|
7081
|
-
headers?: HeadersInit;
|
|
7082
|
-
queryParams?: {
|
|
7083
|
-
[key: string]: string;
|
|
7084
|
-
};
|
|
7085
|
-
token?: string;
|
|
7086
|
-
}) => Promise<Response>;
|
|
7087
|
-
put: (path: string, body?: any, config?: {
|
|
7088
|
-
headers?: HeadersInit;
|
|
7089
|
-
queryParams?: {
|
|
7090
|
-
[key: string]: string;
|
|
7091
|
-
};
|
|
7092
|
-
token?: string;
|
|
7093
|
-
}) => Promise<Response>;
|
|
7094
|
-
delete: (path: string, config?: {
|
|
7095
|
-
headers?: HeadersInit;
|
|
7096
|
-
queryParams?: {
|
|
7097
|
-
[key: string]: string;
|
|
7098
|
-
};
|
|
7099
|
-
token?: string;
|
|
7100
|
-
}) => Promise<Response>;
|
|
7101
|
-
hooks?: {
|
|
7102
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
7103
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
7104
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
7105
|
-
};
|
|
7106
|
-
buildUrl: (path: string, queryParams?: {
|
|
7107
|
-
[key: string]: string;
|
|
7108
|
-
}) => string;
|
|
7109
|
-
};
|
|
6679
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
7110
6680
|
} | {
|
|
7111
6681
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7112
6682
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
@@ -7141,6 +6711,7 @@ declare const getSdk: () => ((({
|
|
|
7141
6711
|
locale?: string;
|
|
7142
6712
|
oidcPrompt?: string;
|
|
7143
6713
|
oidcErrorRedirectUri?: string;
|
|
6714
|
+
oidcResource?: string;
|
|
7144
6715
|
nativeOptions?: {
|
|
7145
6716
|
platform: "ios" | "android";
|
|
7146
6717
|
oauthProvider?: string;
|
|
@@ -7150,7 +6721,7 @@ declare const getSdk: () => ((({
|
|
|
7150
6721
|
applicationScopes?: string;
|
|
7151
6722
|
outboundAppId?: string;
|
|
7152
6723
|
outboundAppScopes?: string[];
|
|
7153
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
6724
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
7154
6725
|
lastAuth?: Omit<{
|
|
7155
6726
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
7156
6727
|
oauthProvider?: string;
|
|
@@ -7733,51 +7304,7 @@ declare const getSdk: () => ((({
|
|
|
7733
7304
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
7734
7305
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
7735
7306
|
getCurrentTenant: (token: string) => string;
|
|
7736
|
-
httpClient:
|
|
7737
|
-
get: (path: string, config?: {
|
|
7738
|
-
headers?: HeadersInit;
|
|
7739
|
-
queryParams?: {
|
|
7740
|
-
[key: string]: string;
|
|
7741
|
-
};
|
|
7742
|
-
token?: string;
|
|
7743
|
-
}) => Promise<Response>;
|
|
7744
|
-
post: (path: string, body?: any, config?: {
|
|
7745
|
-
headers?: HeadersInit;
|
|
7746
|
-
queryParams?: {
|
|
7747
|
-
[key: string]: string;
|
|
7748
|
-
};
|
|
7749
|
-
token?: string;
|
|
7750
|
-
}) => Promise<Response>;
|
|
7751
|
-
patch: (path: string, body?: any, config?: {
|
|
7752
|
-
headers?: HeadersInit;
|
|
7753
|
-
queryParams?: {
|
|
7754
|
-
[key: string]: string;
|
|
7755
|
-
};
|
|
7756
|
-
token?: string;
|
|
7757
|
-
}) => Promise<Response>;
|
|
7758
|
-
put: (path: string, body?: any, config?: {
|
|
7759
|
-
headers?: HeadersInit;
|
|
7760
|
-
queryParams?: {
|
|
7761
|
-
[key: string]: string;
|
|
7762
|
-
};
|
|
7763
|
-
token?: string;
|
|
7764
|
-
}) => Promise<Response>;
|
|
7765
|
-
delete: (path: string, config?: {
|
|
7766
|
-
headers?: HeadersInit;
|
|
7767
|
-
queryParams?: {
|
|
7768
|
-
[key: string]: string;
|
|
7769
|
-
};
|
|
7770
|
-
token?: string;
|
|
7771
|
-
}) => Promise<Response>;
|
|
7772
|
-
hooks?: {
|
|
7773
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
7774
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
7775
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
7776
|
-
};
|
|
7777
|
-
buildUrl: (path: string, queryParams?: {
|
|
7778
|
-
[key: string]: string;
|
|
7779
|
-
}) => string;
|
|
7780
|
-
};
|
|
7307
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
7781
7308
|
} | {
|
|
7782
7309
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7783
7310
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
@@ -7812,6 +7339,7 @@ declare const getSdk: () => ((({
|
|
|
7812
7339
|
locale?: string;
|
|
7813
7340
|
oidcPrompt?: string;
|
|
7814
7341
|
oidcErrorRedirectUri?: string;
|
|
7342
|
+
oidcResource?: string;
|
|
7815
7343
|
nativeOptions?: {
|
|
7816
7344
|
platform: "ios" | "android";
|
|
7817
7345
|
oauthProvider?: string;
|
|
@@ -7821,7 +7349,7 @@ declare const getSdk: () => ((({
|
|
|
7821
7349
|
applicationScopes?: string;
|
|
7822
7350
|
outboundAppId?: string;
|
|
7823
7351
|
outboundAppScopes?: string[];
|
|
7824
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
7352
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
|
|
7825
7353
|
lastAuth?: Omit<{
|
|
7826
7354
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
7827
7355
|
oauthProvider?: string;
|
|
@@ -8404,51 +7932,7 @@ declare const getSdk: () => ((({
|
|
|
8404
7932
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
8405
7933
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
8406
7934
|
getCurrentTenant: (token: string) => string;
|
|
8407
|
-
httpClient:
|
|
8408
|
-
get: (path: string, config?: {
|
|
8409
|
-
headers?: HeadersInit;
|
|
8410
|
-
queryParams?: {
|
|
8411
|
-
[key: string]: string;
|
|
8412
|
-
};
|
|
8413
|
-
token?: string;
|
|
8414
|
-
}) => Promise<Response>;
|
|
8415
|
-
post: (path: string, body?: any, config?: {
|
|
8416
|
-
headers?: HeadersInit;
|
|
8417
|
-
queryParams?: {
|
|
8418
|
-
[key: string]: string;
|
|
8419
|
-
};
|
|
8420
|
-
token?: string;
|
|
8421
|
-
}) => Promise<Response>;
|
|
8422
|
-
patch: (path: string, body?: any, config?: {
|
|
8423
|
-
headers?: HeadersInit;
|
|
8424
|
-
queryParams?: {
|
|
8425
|
-
[key: string]: string;
|
|
8426
|
-
};
|
|
8427
|
-
token?: string;
|
|
8428
|
-
}) => Promise<Response>;
|
|
8429
|
-
put: (path: string, body?: any, config?: {
|
|
8430
|
-
headers?: HeadersInit;
|
|
8431
|
-
queryParams?: {
|
|
8432
|
-
[key: string]: string;
|
|
8433
|
-
};
|
|
8434
|
-
token?: string;
|
|
8435
|
-
}) => Promise<Response>;
|
|
8436
|
-
delete: (path: string, config?: {
|
|
8437
|
-
headers?: HeadersInit;
|
|
8438
|
-
queryParams?: {
|
|
8439
|
-
[key: string]: string;
|
|
8440
|
-
};
|
|
8441
|
-
token?: string;
|
|
8442
|
-
}) => Promise<Response>;
|
|
8443
|
-
hooks?: {
|
|
8444
|
-
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
8445
|
-
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
8446
|
-
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
8447
|
-
};
|
|
8448
|
-
buildUrl: (path: string, queryParams?: {
|
|
8449
|
-
[key: string]: string;
|
|
8450
|
-
}) => string;
|
|
8451
|
-
};
|
|
7935
|
+
httpClient: _descope_core_js_sdk.HttpClient;
|
|
8452
7936
|
}) & {
|
|
8453
7937
|
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
8454
7938
|
onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{computed as e,watch as t,inject as r,defineComponent as s,resolveComponent as n,openBlock as a,createElementBlock as i,createVNode as o,unref as d,withCtx as l,renderSlot as u,ref as c,readonly as p}from"vue";import g from"@descope/web-component";import m from"@descope/web-js-sdk";import"@descope/user-management-widget";import"@descope/role-management-widget";import"@descope/access-key-management-widget";import"@descope/audit-management-widget";import"@descope/user-profile-widget";import"@descope/applications-portal-widget";const b=Symbol("$descope"),y={"x-descope-sdk-name":"vue","x-descope-sdk-version":"2.10.
|
|
1
|
+
import{computed as e,watch as t,inject as r,defineComponent as s,resolveComponent as n,openBlock as a,createElementBlock as i,createVNode as o,unref as d,withCtx as l,renderSlot as u,ref as c,readonly as p}from"vue";import g from"@descope/web-component";import m from"@descope/web-js-sdk";import"@descope/user-management-widget";import"@descope/role-management-widget";import"@descope/access-key-management-widget";import"@descope/audit-management-widget";import"@descope/user-profile-widget";import"@descope/applications-portal-widget";const b=Symbol("$descope"),y={"x-descope-sdk-name":"vue","x-descope-sdk-version":"2.10.10"},h="undefined"!=typeof window,v=()=>{const e=r(b);if(!e)throw Error("Missing Descope context, make sure you are using the Descope plugin");return e},w=()=>v().options,S=()=>v().sdk,f=()=>{const{session:t}=v();return t.isFetchSessionWasNeverCalled.value&&t.fetchSession(),{isLoading:e((()=>t.isLoading.value||t.isFetchSessionWasNeverCalled.value)),sessionToken:t.session,isAuthenticated:t.isAuthenticated}},U=()=>{const{user:r,session:s}=v(),n=()=>{!r.user.value&&s.session.value&&r.fetchUser()};return n(),t(s.session,n),{isLoading:e((()=>r.isLoading.value||r.isFetchUserWasNeverCalled.value)),user:r.user}},I=e=>(...t)=>{let r;try{r=e(...t)}catch(e){console.error(e)}return r};let _;const j=e=>{const t=m({persistTokens:h,storeLastAuthenticatedUser:h,autoRefresh:h,...e});return _=t,t};_=j({projectId:"temp pid"});const k=()=>h?_?.getSessionToken():(console.warn("Get session token is not supported in SSR"),""),C=()=>h?_?.getRefreshToken():(console.warn("Get refresh token is not supported in SSR"),""),A=(e=k())=>_?.isJwtExpired(e),q=(e=C())=>_?.isJwtExpired(e),R=I(((e=k(),t)=>_?.getJwtPermissions(e,t))),B=I(((e=k(),t)=>_?.getJwtRoles(e,t))),M=I(((e=k())=>_?.getCurrentTenant(e)));var O=s({__name:"Descope",props:{flowId:{type:String,required:!0},tenant:{type:String},theme:{type:String},locale:{type:String},debug:{type:Boolean},telemetryKey:{type:String},redirectUrl:{type:String},autoFocus:{type:Boolean||String},validateOnBlur:{type:Boolean},restartOnError:{type:Boolean},errorTransformer:{type:Function},onScreenUpdate:{type:Function},form:{type:Object},client:{type:Object},styleId:{type:String},nonce:{type:String},dismissScreenErrorOnInput:{type:Boolean}},emits:["success","error","ready"],setup(t,{emit:r}){(customElements?.get("descope-wc")||g).sdkConfigOverrides={baseHeaders:y,persistTokens:!1,hooks:{get beforeRequest(){return _.httpClient.hooks.beforeRequest},set beforeRequest(e){}}};const s=t,c=r,{projectId:p,baseUrl:m,baseStaticUrl:b,storeLastAuthenticatedUser:h,baseCdnUrl:v}=w(),f=S(),U=e((()=>s.form?JSON.stringify(s.form):"")),I=e((()=>s.client?JSON.stringify(s.client):"")),j=async e=>{await(f.httpClient.hooks?.afterRequest?.({},new Response(JSON.stringify(e.detail)))),c("success",e)},k=e=>c("error",e),C=e=>c("ready",e);return(e,r)=>{const s=n("descope-wc");return a(),i("div",null,[o(s,{"project-id":d(p),"base-url":d(m),"base-static-url":d(b),"base-cdn-url":d(v),"flow-id":t.flowId,"^theme":t.theme,"^locale":t.locale,"^tenant":t.tenant,"^debug":t.debug,"^telemetryKey":t.telemetryKey,"redirect-url":t.redirectUrl,"auto-focus":t.autoFocus,"style-id":t.styleId,"validate-on-blur":t.validateOnBlur,"restart-on-error":t.restartOnError,"store-last-authenticated-user":d(h),".errorTransformer":t.errorTransformer,".onScreenUpdate":t.onScreenUpdate,"^form":U.value,"^client":I.value,"^nonce":t.nonce,"^dismiss-screen-error-on-input":t.dismissScreenErrorOnInput,onSuccess:j,onError:k,onReady:C},{default:l((()=>[u(e.$slots,"default")])),_:3},40,["project-id","base-url","base-static-url","base-cdn-url","flow-id","^theme","^locale","^tenant","^debug","^telemetryKey","redirect-url","auto-focus","style-id","validate-on-blur","restart-on-error","store-last-authenticated-user",".errorTransformer",".onScreenUpdate","^form","^client","^nonce","^dismiss-screen-error-on-input"])])}}});O.__file="src/Descope.vue";var T=s({__name:"UserManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},debug:{type:Boolean}},setup(e){const{projectId:t,baseUrl:r,baseStaticUrl:s,baseCdnUrl:l}=w();return(u,c)=>{const p=n("descope-user-management-widget");return a(),i("div",null,[o(p,{"project-id":d(t),"base-url":d(r),"base-static-url":d(s),"base-cdn-url":d(l),"^theme":e.theme,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^tenant","^debug","widget-id"])])}}});T.__file="src/UserManagement.vue";var E=s({__name:"RoleManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},debug:{type:Boolean}},setup(e){const{projectId:t,baseUrl:r,baseStaticUrl:s,baseCdnUrl:l}=w();return(u,c)=>{const p=n("descope-role-management-widget");return a(),i("div",null,[o(p,{"project-id":d(t),"base-url":d(r),"base-cdn-url":d(l),"base-static-url":d(s),"^theme":e.theme,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId},null,8,["project-id","base-url","base-cdn-url","base-static-url","^theme","^tenant","^debug","widget-id"])])}}});E.__file="src/RoleManagement.vue";var F=s({__name:"AccessKeyManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},styleId:{type:String},debug:{type:Boolean}},setup(e){const{projectId:t,baseUrl:r,baseStaticUrl:s,baseCdnUrl:l}=w();return(u,c)=>{const p=n("descope-access-key-management-widget");return a(),i("div",null,[o(p,{"project-id":d(t),"base-url":d(r),"base-static-url":d(s),"base-cdn-url":d(l),"^theme":e.theme,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^tenant","^debug","widget-id","style-id"])])}}});F.__file="src/AccessKeyManagement.vue";var L=s({__name:"AuditManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},styleId:{type:String},debug:{type:Boolean}},setup(e){const{projectId:t,baseUrl:r,baseStaticUrl:s,baseCdnUrl:l}=w();return(u,c)=>{const p=n("descope-audit-management-widget");return a(),i("div",null,[o(p,{"project-id":d(t),"base-url":d(r),"base-static-url":d(s),"base-cdn-url":d(l),"^theme":e.theme,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^tenant","^debug","widget-id","style-id"])])}}});L.__file="src/AuditManagement.vue";var N=s({__name:"UserProfile",props:{widgetId:{type:String,required:!0},theme:{type:String},debug:{type:Boolean}},emits:["logout"],setup(e,{emit:t}){const s=r(b),l=t,u=e=>{s?.resetAuth(),l("logout",e)},{projectId:c,baseUrl:p,baseStaticUrl:g,baseCdnUrl:m}=w();return(t,r)=>{const s=n("descope-user-profile-widget");return a(),i("div",null,[o(s,{"project-id":d(c),"base-url":d(p),"base-static-url":d(g),"base-cdn-url":d(m),"^theme":e.theme,"^debug":e.debug,"widget-id":e.widgetId,onLogout:u},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^debug","widget-id"])])}}});N.__file="src/UserProfile.vue";var P=s({__name:"ApplicationsPortal",props:{widgetId:{type:String,required:!0},theme:{type:String},styleId:{type:String},debug:{type:Boolean}},setup(e){const{projectId:t,baseUrl:r,baseStaticUrl:s,baseCdnUrl:l}=w();return(u,c)=>{const p=n("descope-applications-portal-widget");return a(),i("div",null,[o(p,{"project-id":d(t),"base-url":d(r),"base-static-url":d(s),"base-cdn-url":d(l),"^theme":e.theme,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^debug","widget-id","style-id"])])}}});P.__file="src/ApplicationsPortal.vue";const J=c(null),K=()=>d(J)?.();let x;const D=()=>x;var W={install:function(r,s){const n=j({persistTokens:!0,autoRefresh:!0,...s,baseHeaders:y});x=n;const a=c(null),i=c(""),o=c(!1),l=c(null),u=c(null);n.onSessionTokenChange((e=>{i.value=e})),n.onIsAuthenticatedChange((e=>{o.value=e})),n.onUserChange((e=>{u.value=e}));const g=async()=>{a.value=!0,await n.refresh(),a.value=!1},m=e((()=>null===a.value)),h=e((()=>null===l.value));J.value=()=>new Promise(((e,r)=>{!o.value&&m.value&&g().catch(r),t((()=>a.value),(()=>!a.value&&e(!!d(o))),{immediate:!0})})),r.provide(b,{session:{fetchSession:g,isLoading:p(a),session:p(i),isAuthenticated:p(o),isFetchSessionWasNeverCalled:m},user:{fetchUser:async()=>{l.value=!0,await n.me(),l.value=!1},isLoading:p(l),user:p(u),isFetchUserWasNeverCalled:h},sdk:n,options:s,resetAuth:function(){i.value="",o.value=!1,u.value=null}})}};export{F as AccessKeyManagement,P as ApplicationsPortal,L as AuditManagement,O as Descope,E as RoleManagement,T as UserManagement,N as UserProfile,W as default,M as getCurrentTenant,R as getJwtPermissions,B as getJwtRoles,C as getRefreshToken,D as getSdk,k as getSessionToken,q as isRefreshTokenExpired,A as isSessionTokenExpired,K as routeGuard,S as useDescope,f as useSession,U as useUser};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/vue-sdk",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.10",
|
|
4
4
|
"main": "dist/index.cjs",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
]
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@descope/
|
|
29
|
-
"@descope/
|
|
30
|
-
"@descope/
|
|
31
|
-
"@descope/
|
|
32
|
-
"@descope/
|
|
33
|
-
"@descope/user-management-widget": "0.
|
|
34
|
-
"@descope/web-component": "3.
|
|
35
|
-
"@descope/
|
|
36
|
-
"@descope/
|
|
28
|
+
"@descope/audit-management-widget": "0.5.4",
|
|
29
|
+
"@descope/access-key-management-widget": "0.5.4",
|
|
30
|
+
"@descope/role-management-widget": "0.4.4",
|
|
31
|
+
"@descope/user-profile-widget": "0.6.9",
|
|
32
|
+
"@descope/applications-portal-widget": "0.4.4",
|
|
33
|
+
"@descope/user-management-widget": "0.9.1",
|
|
34
|
+
"@descope/web-component": "3.46.1",
|
|
35
|
+
"@descope/core-js-sdk": "2.46.1",
|
|
36
|
+
"@descope/web-js-sdk": "1.34.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"vue": ">=3"
|