@descope/vue-sdk 3.1.6 → 3.1.7
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 +558 -54
- 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":"3.1.6"},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,l=()=>a().sdk,d=e=>(...t)=>{let r;try{r=e(...t)}catch(e){console.error(e)}return r};let u;const c=e=>{const t=r({persistTokens:o,storeLastAuthenticatedUser:o,autoRefresh:o,...e});return u=t,t};u=c({projectId:"temp pid"});const p=()=>o?u?.getSessionToken():(console.warn("Get session token is not supported in SSR"),""),g=()=>o?u?.getRefreshToken():(console.warn("Get refresh token is not supported in SSR"),""),m=d(((e=p(),t)=>u?.getJwtPermissions(e,t))),y=d(((e=p(),t)=>u?.getJwtRoles(e,t))),b=d(((e=p())=>u?.getCurrentTenant(e)));var f=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},sendSessionToken:{type:Boolean},errorTransformer:{type:Function},onScreenUpdate:{type:Function},form:{type:Object},client:{type:Object},styleId:{type:String},themeOverride:{type:Object},nonce:{type:String},dismissScreenErrorOnInput:{type:Boolean},popupOrigin:{type:String}},emits:["success","error","ready"],setup(r,{emit:n}){(customElements?.get("descope-wc")||t).sdkConfigOverrides={baseHeaders:s,persistTokens:!1,hooks:{get beforeRequest(){return u.httpClient.hooks.beforeRequest},set beforeRequest(e){}}};const o=r,a=n,{projectId:d,baseUrl:c,baseStaticUrl:p,storeLastAuthenticatedUser:g,baseCdnUrl:m,customStorage:y}=i(),b=l(),f=e.computed((()=>o.form?JSON.stringify(o.form):"")),v=e.computed((()=>o.client?JSON.stringify(o.client):"")),S=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,"therme-override":r.themeOverride,"validate-on-blur":r.validateOnBlur,"restart-on-error":r.restartOnError,"send-session-token":r.sendSessionToken,"store-last-authenticated-user":e.unref(g),".customStorage":e.unref(y),".errorTransformer":r.errorTransformer,".onScreenUpdate":r.onScreenUpdate,"^form":f.value,"^client":v.value,"^nonce":r.nonce,"^dismiss-screen-error-on-input":r.dismissScreenErrorOnInput,"^popup-origin":r.popupOrigin,onSuccess:S,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","therme-override","validate-on-blur","restart-on-error","send-session-token","store-last-authenticated-user",".customStorage",".errorTransformer",".onScreenUpdate","^form","^client","^nonce","^dismiss-screen-error-on-input","^popup-origin"])])}}});f.__file="src/Descope.vue";var v=e.defineComponent({__name:"UserManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(t,{emit:r}){const n=r,{projectId:s,baseUrl:o,baseStaticUrl:a,baseCdnUrl:l}=i(),d=e=>n("ready",e);return(r,n)=>{const i=e.resolveComponent("descope-user-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{"project-id":e.unref(s),"base-url":e.unref(o),"base-static-url":e.unref(a),"base-cdn-url":e.unref(l),"^theme":t.theme,"^locale":t.locale,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onReady:d},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^tenant","^debug","widget-id","style-id"])])}}});v.__file="src/UserManagement.vue";var S=e.defineComponent({__name:"RoleManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(t,{emit:r}){const n=r,{projectId:s,baseUrl:o,baseStaticUrl:a,baseCdnUrl:l}=i(),d=e=>n("ready",e);return(r,n)=>{const i=e.resolveComponent("descope-role-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{"project-id":e.unref(s),"base-url":e.unref(o),"base-cdn-url":e.unref(l),"base-static-url":e.unref(a),"^theme":t.theme,"^locale":t.locale,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onReady:d},null,8,["project-id","base-url","base-cdn-url","base-static-url","^theme","^locale","^tenant","^debug","widget-id","style-id"])])}}});S.__file="src/RoleManagement.vue";var h=e.defineComponent({__name:"AccessKeyManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(t,{emit:r}){const n=r,{projectId:s,baseUrl:o,baseStaticUrl:a,baseCdnUrl:l}=i(),d=e=>n("ready",e);return(r,n)=>{const i=e.resolveComponent("descope-access-key-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{"project-id":e.unref(s),"base-url":e.unref(o),"base-static-url":e.unref(a),"base-cdn-url":e.unref(l),"^theme":t.theme,"^locale":t.locale,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onReady:d},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^tenant","^debug","widget-id","style-id"])])}}});h.__file="src/AccessKeyManagement.vue";var w=e.defineComponent({__name:"AuditManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(t,{emit:r}){const n=r,{projectId:s,baseUrl:o,baseStaticUrl:a,baseCdnUrl:l}=i(),d=e=>n("ready",e);return(r,n)=>{const i=e.resolveComponent("descope-audit-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{"project-id":e.unref(s),"base-url":e.unref(o),"base-static-url":e.unref(a),"base-cdn-url":e.unref(l),"^theme":t.theme,"^locale":t.locale,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onReady:d},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^tenant","^debug","widget-id","style-id"])])}}});w.__file="src/AuditManagement.vue";var k=e.defineComponent({__name:"UserProfile",props:{widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["logout","ready"],setup(t,{emit:r}){const s=e.inject(n),o=r,a=e=>{s?.resetAuth(),o("logout",e)},l=e=>o("ready",e),{projectId:d,baseUrl:u,baseStaticUrl:c,baseCdnUrl:p}=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(d),"base-url":e.unref(u),"base-static-url":e.unref(c),"base-cdn-url":e.unref(p),"^theme":t.theme,"^locale":t.locale,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onLogout:a,onReady:l},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^debug","widget-id","style-id"])])}}});k.__file="src/UserProfile.vue";var U=e.defineComponent({__name:"ApplicationsPortal",props:{widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(t,{emit:r}){const n=r,{projectId:s,baseUrl:o,baseStaticUrl:a,baseCdnUrl:l}=i(),d=e=>n("ready",e);return(r,n)=>{const i=e.resolveComponent("descope-applications-portal-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{"project-id":e.unref(s),"base-url":e.unref(o),"base-static-url":e.unref(a),"base-cdn-url":e.unref(l),"^theme":t.theme,"^locale":t.locale,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onReady:d},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^debug","widget-id","style-id"])])}}});U.__file="src/ApplicationsPortal.vue";const I=e.ref(null);let C;var _={install:function(t,r){const o=c({persistTokens:!0,autoRefresh:!0,...r,baseHeaders:s});C=o;const a=e.ref(null),i=e.ref(""),l=e.ref(),d=e.ref(!1),u=e.ref(null),p=e.ref(null);o.onSessionTokenChange((e=>{i.value=e})),o.onClaimsChange((e=>{l.value=e})),o.onIsAuthenticatedChange((e=>{d.value=e})),o.onUserChange((e=>{p.value=e}));const g=async e=>{"undefined"!=typeof window&&window.descopeBridge||(a.value=!0,await o.refresh(void 0,e),a.value=!1)},m=e.computed((()=>null===a.value)),y=e.computed((()=>null===u.value));I.value=()=>new Promise(((t,r)=>{!d.value&&m.value&&g().catch(r),e.watch((()=>a.value),(()=>!a.value&&t(!!e.unref(d))),{immediate:!0})})),t.provide(n,{session:{fetchSession:g,isLoading:e.readonly(a),session:e.readonly(i),claims:e.readonly(l),isAuthenticated:e.readonly(d),isFetchSessionWasNeverCalled:m},user:{fetchUser:async()=>{u.value=!0,await o.me(),u.value=!1},isLoading:e.readonly(u),user:e.readonly(p),isFetchUserWasNeverCalled:y},sdk:o,options:r,resetAuth:function(){i.value="",d.value=!1,p.value=null}})}};exports.AccessKeyManagement=h,exports.ApplicationsPortal=U,exports.AuditManagement=w,exports.Descope=f,exports.RoleManagement=S,exports.UserManagement=v,exports.UserProfile=k,exports.default=_,exports.getCurrentTenant=b,exports.getJwtPermissions=m,exports.getJwtRoles=y,exports.getRefreshToken=g,exports.getSdk=()=>C,exports.getSessionToken=p,exports.isRefreshTokenExpired=(e=g())=>u?.isJwtExpired(e),exports.isSessionTokenExpired=(e=p())=>u?.isJwtExpired(e),exports.routeGuard=()=>e.unref(I)?.(),exports.useDescope=l,exports.useSession=()=>{const{session:t}=a();return t.isFetchSessionWasNeverCalled.value&&t.fetchSession(!0),{isLoading:e.computed((()=>t.isLoading.value||t.isFetchSessionWasNeverCalled.value)),sessionToken:t.session,claims:t.claims,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}};
|
|
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":"3.1.7"},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,l=()=>a().sdk,d=e=>(...t)=>{let r;try{r=e(...t)}catch(e){console.error(e)}return r};let u;const c=e=>{const t=r({persistTokens:o,storeLastAuthenticatedUser:o,autoRefresh:o,...e});return u=t,t};u=c({projectId:"temp pid"});const p=()=>o?u?.getSessionToken():(console.warn("Get session token is not supported in SSR"),""),g=()=>o?u?.getRefreshToken():(console.warn("Get refresh token is not supported in SSR"),""),m=d(((e=p(),t)=>u?.getJwtPermissions(e,t))),y=d(((e=p(),t)=>u?.getJwtRoles(e,t))),b=d(((e=p())=>u?.getCurrentTenant(e)));var f=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},sendSessionToken:{type:Boolean},errorTransformer:{type:Function},onScreenUpdate:{type:Function},form:{type:Object},client:{type:Object},styleId:{type:String},themeOverride:{type:Object},nonce:{type:String},dismissScreenErrorOnInput:{type:Boolean},popupOrigin:{type:String}},emits:["success","error","ready"],setup(r,{emit:n}){(customElements?.get("descope-wc")||t).sdkConfigOverrides={baseHeaders:s,persistTokens:!1,hooks:{get beforeRequest(){return u.httpClient.hooks.beforeRequest},set beforeRequest(e){}}};const o=r,a=n,{projectId:d,baseUrl:c,baseStaticUrl:p,storeLastAuthenticatedUser:g,baseCdnUrl:m,customStorage:y}=i(),b=l(),f=e.computed((()=>o.form?JSON.stringify(o.form):"")),v=e.computed((()=>o.client?JSON.stringify(o.client):"")),S=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,"therme-override":r.themeOverride,"validate-on-blur":r.validateOnBlur,"restart-on-error":r.restartOnError,"send-session-token":r.sendSessionToken,"store-last-authenticated-user":e.unref(g),".customStorage":e.unref(y),".errorTransformer":r.errorTransformer,".onScreenUpdate":r.onScreenUpdate,"^form":f.value,"^client":v.value,"^nonce":r.nonce,"^dismiss-screen-error-on-input":r.dismissScreenErrorOnInput,"^popup-origin":r.popupOrigin,onSuccess:S,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","therme-override","validate-on-blur","restart-on-error","send-session-token","store-last-authenticated-user",".customStorage",".errorTransformer",".onScreenUpdate","^form","^client","^nonce","^dismiss-screen-error-on-input","^popup-origin"])])}}});f.__file="src/Descope.vue";var v=e.defineComponent({__name:"UserManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(t,{emit:r}){const n=r,{projectId:s,baseUrl:o,baseStaticUrl:a,baseCdnUrl:l}=i(),d=e=>n("ready",e);return(r,n)=>{const i=e.resolveComponent("descope-user-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{"project-id":e.unref(s),"base-url":e.unref(o),"base-static-url":e.unref(a),"base-cdn-url":e.unref(l),"^theme":t.theme,"^locale":t.locale,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onReady:d},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^tenant","^debug","widget-id","style-id"])])}}});v.__file="src/UserManagement.vue";var S=e.defineComponent({__name:"RoleManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(t,{emit:r}){const n=r,{projectId:s,baseUrl:o,baseStaticUrl:a,baseCdnUrl:l}=i(),d=e=>n("ready",e);return(r,n)=>{const i=e.resolveComponent("descope-role-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{"project-id":e.unref(s),"base-url":e.unref(o),"base-cdn-url":e.unref(l),"base-static-url":e.unref(a),"^theme":t.theme,"^locale":t.locale,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onReady:d},null,8,["project-id","base-url","base-cdn-url","base-static-url","^theme","^locale","^tenant","^debug","widget-id","style-id"])])}}});S.__file="src/RoleManagement.vue";var h=e.defineComponent({__name:"AccessKeyManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(t,{emit:r}){const n=r,{projectId:s,baseUrl:o,baseStaticUrl:a,baseCdnUrl:l}=i(),d=e=>n("ready",e);return(r,n)=>{const i=e.resolveComponent("descope-access-key-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{"project-id":e.unref(s),"base-url":e.unref(o),"base-static-url":e.unref(a),"base-cdn-url":e.unref(l),"^theme":t.theme,"^locale":t.locale,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onReady:d},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^tenant","^debug","widget-id","style-id"])])}}});h.__file="src/AccessKeyManagement.vue";var w=e.defineComponent({__name:"AuditManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(t,{emit:r}){const n=r,{projectId:s,baseUrl:o,baseStaticUrl:a,baseCdnUrl:l}=i(),d=e=>n("ready",e);return(r,n)=>{const i=e.resolveComponent("descope-audit-management-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{"project-id":e.unref(s),"base-url":e.unref(o),"base-static-url":e.unref(a),"base-cdn-url":e.unref(l),"^theme":t.theme,"^locale":t.locale,"^tenant":t.tenant,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onReady:d},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^tenant","^debug","widget-id","style-id"])])}}});w.__file="src/AuditManagement.vue";var k=e.defineComponent({__name:"UserProfile",props:{widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["logout","ready"],setup(t,{emit:r}){const s=e.inject(n),o=r,a=e=>{s?.resetAuth(),o("logout",e)},l=e=>o("ready",e),{projectId:d,baseUrl:u,baseStaticUrl:c,baseCdnUrl:p}=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(d),"base-url":e.unref(u),"base-static-url":e.unref(c),"base-cdn-url":e.unref(p),"^theme":t.theme,"^locale":t.locale,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onLogout:a,onReady:l},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^debug","widget-id","style-id"])])}}});k.__file="src/UserProfile.vue";var U=e.defineComponent({__name:"ApplicationsPortal",props:{widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(t,{emit:r}){const n=r,{projectId:s,baseUrl:o,baseStaticUrl:a,baseCdnUrl:l}=i(),d=e=>n("ready",e);return(r,n)=>{const i=e.resolveComponent("descope-applications-portal-widget");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{"project-id":e.unref(s),"base-url":e.unref(o),"base-static-url":e.unref(a),"base-cdn-url":e.unref(l),"^theme":t.theme,"^locale":t.locale,"^debug":t.debug,"widget-id":t.widgetId,"style-id":t.styleId,onReady:d},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^debug","widget-id","style-id"])])}}});U.__file="src/ApplicationsPortal.vue";const I=e.ref(null);let C;var _={install:function(t,r){const o=c({persistTokens:!0,autoRefresh:!0,...r,baseHeaders:s});C=o;const a=e.ref(null),i=e.ref(""),l=e.ref(),d=e.ref(!1),u=e.ref(null),p=e.ref(null);o.onSessionTokenChange((e=>{i.value=e})),o.onClaimsChange((e=>{l.value=e})),o.onIsAuthenticatedChange((e=>{d.value=e})),o.onUserChange((e=>{p.value=e}));const g=async e=>{"undefined"!=typeof window&&window.descopeBridge||(a.value=!0,await o.refresh(void 0,e),a.value=!1)},m=e.computed((()=>null===a.value)),y=e.computed((()=>null===u.value));I.value=()=>new Promise(((t,r)=>{!d.value&&m.value&&g().catch(r),e.watch((()=>a.value),(()=>!a.value&&t(!!e.unref(d))),{immediate:!0})})),t.provide(n,{session:{fetchSession:g,isLoading:e.readonly(a),session:e.readonly(i),claims:e.readonly(l),isAuthenticated:e.readonly(d),isFetchSessionWasNeverCalled:m},user:{fetchUser:async()=>{u.value=!0,await o.me(),u.value=!1},isLoading:e.readonly(u),user:e.readonly(p),isFetchUserWasNeverCalled:y},sdk:o,options:r,resetAuth:function(){i.value="",d.value=!1,p.value=null}})}};exports.AccessKeyManagement=h,exports.ApplicationsPortal=U,exports.AuditManagement=w,exports.Descope=f,exports.RoleManagement=S,exports.UserManagement=v,exports.UserProfile=k,exports.default=_,exports.getCurrentTenant=b,exports.getJwtPermissions=m,exports.getJwtRoles=y,exports.getRefreshToken=g,exports.getSdk=()=>C,exports.getSessionToken=p,exports.isRefreshTokenExpired=(e=g())=>u?.isJwtExpired(e),exports.isSessionTokenExpired=(e=p())=>u?.isJwtExpired(e),exports.routeGuard=()=>e.unref(I)?.(),exports.useDescope=l,exports.useSession=()=>{const{session:t}=a();return t.isFetchSessionWasNeverCalled.value&&t.fetchSession(!0),{isLoading:e.computed((()=>t.isLoading.value||t.isFetchSessionWasNeverCalled.value)),sessionToken:t.session,claims:t.claims,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
|
@@ -505,8 +505,8 @@ declare const useDescope: () => (((({
|
|
|
505
505
|
}>>;
|
|
506
506
|
};
|
|
507
507
|
helpers: {
|
|
508
|
-
create: (options: string) => Promise<string>;
|
|
509
|
-
get: (options: string) => Promise<string>;
|
|
508
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
509
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
510
510
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
511
511
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
512
512
|
};
|
|
@@ -969,6 +969,9 @@ declare const useDescope: () => (((({
|
|
|
969
969
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
970
970
|
providerId?: string;
|
|
971
971
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
972
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
973
|
+
providerId?: string;
|
|
974
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
972
975
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
973
976
|
customClaims?: Record<string, any>;
|
|
974
977
|
templateId?: string;
|
|
@@ -979,6 +982,16 @@ declare const useDescope: () => (((({
|
|
|
979
982
|
} & {
|
|
980
983
|
providerId?: string;
|
|
981
984
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
985
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
986
|
+
customClaims?: Record<string, any>;
|
|
987
|
+
templateId?: string;
|
|
988
|
+
templateOptions?: {
|
|
989
|
+
[x: string]: string;
|
|
990
|
+
};
|
|
991
|
+
tenantId?: string;
|
|
992
|
+
} & {
|
|
993
|
+
providerId?: string;
|
|
994
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
982
995
|
signUp: (loginId: string, URI?: string, user?: {
|
|
983
996
|
email?: string;
|
|
984
997
|
name?: string;
|
|
@@ -996,6 +1009,23 @@ declare const useDescope: () => (((({
|
|
|
996
1009
|
} & {
|
|
997
1010
|
providerId?: string;
|
|
998
1011
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1012
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
1013
|
+
email?: string;
|
|
1014
|
+
name?: string;
|
|
1015
|
+
givenName?: string;
|
|
1016
|
+
middleName?: string;
|
|
1017
|
+
familyName?: string;
|
|
1018
|
+
phone?: string;
|
|
1019
|
+
}, args_3?: {
|
|
1020
|
+
customClaims?: Record<string, any>;
|
|
1021
|
+
templateId?: string;
|
|
1022
|
+
templateOptions?: {
|
|
1023
|
+
[x: string]: string;
|
|
1024
|
+
};
|
|
1025
|
+
tenantId?: string;
|
|
1026
|
+
} & {
|
|
1027
|
+
providerId?: string;
|
|
1028
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
999
1029
|
waitForSession: (pendingRef: string, config?: {
|
|
1000
1030
|
pollingIntervalMs: number;
|
|
1001
1031
|
timeoutMs: number;
|
|
@@ -1011,6 +1041,18 @@ declare const useDescope: () => (((({
|
|
|
1011
1041
|
providerId?: string;
|
|
1012
1042
|
mfa?: boolean;
|
|
1013
1043
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1044
|
+
phone: {
|
|
1045
|
+
sms: <T_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
1046
|
+
addToLoginIDs?: T_5;
|
|
1047
|
+
onMergeUseExisting?: T_5 extends true ? boolean : never;
|
|
1048
|
+
templateOptions?: {
|
|
1049
|
+
[x: string]: string;
|
|
1050
|
+
};
|
|
1051
|
+
templateId?: string;
|
|
1052
|
+
providerId?: string;
|
|
1053
|
+
mfa?: boolean;
|
|
1054
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
1055
|
+
};
|
|
1014
1056
|
};
|
|
1015
1057
|
};
|
|
1016
1058
|
oauth: {
|
|
@@ -1233,8 +1275,8 @@ declare const useDescope: () => (((({
|
|
|
1233
1275
|
}>>;
|
|
1234
1276
|
};
|
|
1235
1277
|
helpers: {
|
|
1236
|
-
create: (options: string) => Promise<string>;
|
|
1237
|
-
get: (options: string) => Promise<string>;
|
|
1278
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
1279
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
1238
1280
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
1239
1281
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
1240
1282
|
};
|
|
@@ -1405,9 +1447,9 @@ declare const useDescope: () => (((({
|
|
|
1405
1447
|
}>>;
|
|
1406
1448
|
};
|
|
1407
1449
|
update: {
|
|
1408
|
-
email: <
|
|
1409
|
-
addToLoginIDs?:
|
|
1410
|
-
onMergeUseExisting?:
|
|
1450
|
+
email: <T_6 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
1451
|
+
addToLoginIDs?: T_6;
|
|
1452
|
+
onMergeUseExisting?: T_6 extends true ? boolean : never;
|
|
1411
1453
|
templateOptions?: {
|
|
1412
1454
|
[x: string]: string;
|
|
1413
1455
|
};
|
|
@@ -1697,6 +1739,9 @@ declare const useDescope: () => (((({
|
|
|
1697
1739
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
1698
1740
|
providerId?: string;
|
|
1699
1741
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1742
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
1743
|
+
providerId?: string;
|
|
1744
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
1700
1745
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
1701
1746
|
customClaims?: Record<string, any>;
|
|
1702
1747
|
templateId?: string;
|
|
@@ -1707,6 +1752,16 @@ declare const useDescope: () => (((({
|
|
|
1707
1752
|
} & {
|
|
1708
1753
|
providerId?: string;
|
|
1709
1754
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1755
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
1756
|
+
customClaims?: Record<string, any>;
|
|
1757
|
+
templateId?: string;
|
|
1758
|
+
templateOptions?: {
|
|
1759
|
+
[x: string]: string;
|
|
1760
|
+
};
|
|
1761
|
+
tenantId?: string;
|
|
1762
|
+
} & {
|
|
1763
|
+
providerId?: string;
|
|
1764
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
1710
1765
|
signUp: (loginId: string, URI?: string, user?: {
|
|
1711
1766
|
email?: string;
|
|
1712
1767
|
name?: string;
|
|
@@ -1724,6 +1779,23 @@ declare const useDescope: () => (((({
|
|
|
1724
1779
|
} & {
|
|
1725
1780
|
providerId?: string;
|
|
1726
1781
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1782
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
1783
|
+
email?: string;
|
|
1784
|
+
name?: string;
|
|
1785
|
+
givenName?: string;
|
|
1786
|
+
middleName?: string;
|
|
1787
|
+
familyName?: string;
|
|
1788
|
+
phone?: string;
|
|
1789
|
+
}, args_3?: {
|
|
1790
|
+
customClaims?: Record<string, any>;
|
|
1791
|
+
templateId?: string;
|
|
1792
|
+
templateOptions?: {
|
|
1793
|
+
[x: string]: string;
|
|
1794
|
+
};
|
|
1795
|
+
tenantId?: string;
|
|
1796
|
+
} & {
|
|
1797
|
+
providerId?: string;
|
|
1798
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
1727
1799
|
waitForSession: (pendingRef: string, config?: {
|
|
1728
1800
|
pollingIntervalMs: number;
|
|
1729
1801
|
timeoutMs: number;
|
|
@@ -1739,6 +1811,18 @@ declare const useDescope: () => (((({
|
|
|
1739
1811
|
providerId?: string;
|
|
1740
1812
|
mfa?: boolean;
|
|
1741
1813
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1814
|
+
phone: {
|
|
1815
|
+
sms: <T_5_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
1816
|
+
addToLoginIDs?: T_5_1;
|
|
1817
|
+
onMergeUseExisting?: T_5_1 extends true ? boolean : never;
|
|
1818
|
+
templateOptions?: {
|
|
1819
|
+
[x: string]: string;
|
|
1820
|
+
};
|
|
1821
|
+
templateId?: string;
|
|
1822
|
+
providerId?: string;
|
|
1823
|
+
mfa?: boolean;
|
|
1824
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
1825
|
+
};
|
|
1742
1826
|
};
|
|
1743
1827
|
};
|
|
1744
1828
|
oauth: {
|
|
@@ -1961,8 +2045,8 @@ declare const useDescope: () => (((({
|
|
|
1961
2045
|
}>>;
|
|
1962
2046
|
};
|
|
1963
2047
|
helpers: {
|
|
1964
|
-
create: (options: string) => Promise<string>;
|
|
1965
|
-
get: (options: string) => Promise<string>;
|
|
2048
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
2049
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
1966
2050
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
1967
2051
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
1968
2052
|
};
|
|
@@ -2133,9 +2217,9 @@ declare const useDescope: () => (((({
|
|
|
2133
2217
|
}>>;
|
|
2134
2218
|
};
|
|
2135
2219
|
update: {
|
|
2136
|
-
email: <
|
|
2137
|
-
addToLoginIDs?:
|
|
2138
|
-
onMergeUseExisting?:
|
|
2220
|
+
email: <T_7 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
2221
|
+
addToLoginIDs?: T_7;
|
|
2222
|
+
onMergeUseExisting?: T_7 extends true ? boolean : never;
|
|
2139
2223
|
templateOptions?: {
|
|
2140
2224
|
[x: string]: string;
|
|
2141
2225
|
};
|
|
@@ -2425,6 +2509,9 @@ declare const useDescope: () => (((({
|
|
|
2425
2509
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
2426
2510
|
providerId?: string;
|
|
2427
2511
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2512
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
2513
|
+
providerId?: string;
|
|
2514
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
2428
2515
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
2429
2516
|
customClaims?: Record<string, any>;
|
|
2430
2517
|
templateId?: string;
|
|
@@ -2435,6 +2522,16 @@ declare const useDescope: () => (((({
|
|
|
2435
2522
|
} & {
|
|
2436
2523
|
providerId?: string;
|
|
2437
2524
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2525
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
2526
|
+
customClaims?: Record<string, any>;
|
|
2527
|
+
templateId?: string;
|
|
2528
|
+
templateOptions?: {
|
|
2529
|
+
[x: string]: string;
|
|
2530
|
+
};
|
|
2531
|
+
tenantId?: string;
|
|
2532
|
+
} & {
|
|
2533
|
+
providerId?: string;
|
|
2534
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
2438
2535
|
signUp: (loginId: string, URI?: string, user?: {
|
|
2439
2536
|
email?: string;
|
|
2440
2537
|
name?: string;
|
|
@@ -2452,6 +2549,23 @@ declare const useDescope: () => (((({
|
|
|
2452
2549
|
} & {
|
|
2453
2550
|
providerId?: string;
|
|
2454
2551
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2552
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
2553
|
+
email?: string;
|
|
2554
|
+
name?: string;
|
|
2555
|
+
givenName?: string;
|
|
2556
|
+
middleName?: string;
|
|
2557
|
+
familyName?: string;
|
|
2558
|
+
phone?: string;
|
|
2559
|
+
}, args_3?: {
|
|
2560
|
+
customClaims?: Record<string, any>;
|
|
2561
|
+
templateId?: string;
|
|
2562
|
+
templateOptions?: {
|
|
2563
|
+
[x: string]: string;
|
|
2564
|
+
};
|
|
2565
|
+
tenantId?: string;
|
|
2566
|
+
} & {
|
|
2567
|
+
providerId?: string;
|
|
2568
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
2455
2569
|
waitForSession: (pendingRef: string, config?: {
|
|
2456
2570
|
pollingIntervalMs: number;
|
|
2457
2571
|
timeoutMs: number;
|
|
@@ -2467,6 +2581,18 @@ declare const useDescope: () => (((({
|
|
|
2467
2581
|
providerId?: string;
|
|
2468
2582
|
mfa?: boolean;
|
|
2469
2583
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2584
|
+
phone: {
|
|
2585
|
+
sms: <T_5_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
2586
|
+
addToLoginIDs?: T_5_2;
|
|
2587
|
+
onMergeUseExisting?: T_5_2 extends true ? boolean : never;
|
|
2588
|
+
templateOptions?: {
|
|
2589
|
+
[x: string]: string;
|
|
2590
|
+
};
|
|
2591
|
+
templateId?: string;
|
|
2592
|
+
providerId?: string;
|
|
2593
|
+
mfa?: boolean;
|
|
2594
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
2595
|
+
};
|
|
2470
2596
|
};
|
|
2471
2597
|
};
|
|
2472
2598
|
oauth: {
|
|
@@ -2699,8 +2825,8 @@ declare const useDescope: () => (((({
|
|
|
2699
2825
|
}>>;
|
|
2700
2826
|
};
|
|
2701
2827
|
helpers: {
|
|
2702
|
-
create: (options: string) => Promise<string>;
|
|
2703
|
-
get: (options: string) => Promise<string>;
|
|
2828
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
2829
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
2704
2830
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
2705
2831
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
2706
2832
|
};
|
|
@@ -2871,9 +2997,9 @@ declare const useDescope: () => (((({
|
|
|
2871
2997
|
}>>;
|
|
2872
2998
|
};
|
|
2873
2999
|
update: {
|
|
2874
|
-
email: <
|
|
2875
|
-
addToLoginIDs?:
|
|
2876
|
-
onMergeUseExisting?:
|
|
3000
|
+
email: <T_8 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
3001
|
+
addToLoginIDs?: T_8;
|
|
3002
|
+
onMergeUseExisting?: T_8 extends true ? boolean : never;
|
|
2877
3003
|
templateOptions?: {
|
|
2878
3004
|
[x: string]: string;
|
|
2879
3005
|
};
|
|
@@ -3163,6 +3289,9 @@ declare const useDescope: () => (((({
|
|
|
3163
3289
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
3164
3290
|
providerId?: string;
|
|
3165
3291
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3292
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
3293
|
+
providerId?: string;
|
|
3294
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
3166
3295
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
3167
3296
|
customClaims?: Record<string, any>;
|
|
3168
3297
|
templateId?: string;
|
|
@@ -3173,6 +3302,16 @@ declare const useDescope: () => (((({
|
|
|
3173
3302
|
} & {
|
|
3174
3303
|
providerId?: string;
|
|
3175
3304
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3305
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
3306
|
+
customClaims?: Record<string, any>;
|
|
3307
|
+
templateId?: string;
|
|
3308
|
+
templateOptions?: {
|
|
3309
|
+
[x: string]: string;
|
|
3310
|
+
};
|
|
3311
|
+
tenantId?: string;
|
|
3312
|
+
} & {
|
|
3313
|
+
providerId?: string;
|
|
3314
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
3176
3315
|
signUp: (loginId: string, URI?: string, user?: {
|
|
3177
3316
|
email?: string;
|
|
3178
3317
|
name?: string;
|
|
@@ -3190,6 +3329,23 @@ declare const useDescope: () => (((({
|
|
|
3190
3329
|
} & {
|
|
3191
3330
|
providerId?: string;
|
|
3192
3331
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3332
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
3333
|
+
email?: string;
|
|
3334
|
+
name?: string;
|
|
3335
|
+
givenName?: string;
|
|
3336
|
+
middleName?: string;
|
|
3337
|
+
familyName?: string;
|
|
3338
|
+
phone?: string;
|
|
3339
|
+
}, args_3?: {
|
|
3340
|
+
customClaims?: Record<string, any>;
|
|
3341
|
+
templateId?: string;
|
|
3342
|
+
templateOptions?: {
|
|
3343
|
+
[x: string]: string;
|
|
3344
|
+
};
|
|
3345
|
+
tenantId?: string;
|
|
3346
|
+
} & {
|
|
3347
|
+
providerId?: string;
|
|
3348
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
3193
3349
|
waitForSession: (pendingRef: string, config?: {
|
|
3194
3350
|
pollingIntervalMs: number;
|
|
3195
3351
|
timeoutMs: number;
|
|
@@ -3205,6 +3361,18 @@ declare const useDescope: () => (((({
|
|
|
3205
3361
|
providerId?: string;
|
|
3206
3362
|
mfa?: boolean;
|
|
3207
3363
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3364
|
+
phone: {
|
|
3365
|
+
sms: <T_5_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3366
|
+
addToLoginIDs?: T_5_3;
|
|
3367
|
+
onMergeUseExisting?: T_5_3 extends true ? boolean : never;
|
|
3368
|
+
templateOptions?: {
|
|
3369
|
+
[x: string]: string;
|
|
3370
|
+
};
|
|
3371
|
+
templateId?: string;
|
|
3372
|
+
providerId?: string;
|
|
3373
|
+
mfa?: boolean;
|
|
3374
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
3375
|
+
};
|
|
3208
3376
|
};
|
|
3209
3377
|
};
|
|
3210
3378
|
oauth: {
|
|
@@ -3427,8 +3595,8 @@ declare const useDescope: () => (((({
|
|
|
3427
3595
|
}>>;
|
|
3428
3596
|
};
|
|
3429
3597
|
helpers: {
|
|
3430
|
-
create: (options: string) => Promise<string>;
|
|
3431
|
-
get: (options: string) => Promise<string>;
|
|
3598
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
3599
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
3432
3600
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
3433
3601
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
3434
3602
|
};
|
|
@@ -3599,9 +3767,9 @@ declare const useDescope: () => (((({
|
|
|
3599
3767
|
}>>;
|
|
3600
3768
|
};
|
|
3601
3769
|
update: {
|
|
3602
|
-
email: <
|
|
3603
|
-
addToLoginIDs?:
|
|
3604
|
-
onMergeUseExisting?:
|
|
3770
|
+
email: <T_9 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
3771
|
+
addToLoginIDs?: T_9;
|
|
3772
|
+
onMergeUseExisting?: T_9 extends true ? boolean : never;
|
|
3605
3773
|
templateOptions?: {
|
|
3606
3774
|
[x: string]: string;
|
|
3607
3775
|
};
|
|
@@ -3891,6 +4059,9 @@ declare const useDescope: () => (((({
|
|
|
3891
4059
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
3892
4060
|
providerId?: string;
|
|
3893
4061
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
4062
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
4063
|
+
providerId?: string;
|
|
4064
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
3894
4065
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
3895
4066
|
customClaims?: Record<string, any>;
|
|
3896
4067
|
templateId?: string;
|
|
@@ -3901,6 +4072,16 @@ declare const useDescope: () => (((({
|
|
|
3901
4072
|
} & {
|
|
3902
4073
|
providerId?: string;
|
|
3903
4074
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
4075
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
4076
|
+
customClaims?: Record<string, any>;
|
|
4077
|
+
templateId?: string;
|
|
4078
|
+
templateOptions?: {
|
|
4079
|
+
[x: string]: string;
|
|
4080
|
+
};
|
|
4081
|
+
tenantId?: string;
|
|
4082
|
+
} & {
|
|
4083
|
+
providerId?: string;
|
|
4084
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
3904
4085
|
signUp: (loginId: string, URI?: string, user?: {
|
|
3905
4086
|
email?: string;
|
|
3906
4087
|
name?: string;
|
|
@@ -3918,6 +4099,23 @@ declare const useDescope: () => (((({
|
|
|
3918
4099
|
} & {
|
|
3919
4100
|
providerId?: string;
|
|
3920
4101
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
4102
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
4103
|
+
email?: string;
|
|
4104
|
+
name?: string;
|
|
4105
|
+
givenName?: string;
|
|
4106
|
+
middleName?: string;
|
|
4107
|
+
familyName?: string;
|
|
4108
|
+
phone?: string;
|
|
4109
|
+
}, args_3?: {
|
|
4110
|
+
customClaims?: Record<string, any>;
|
|
4111
|
+
templateId?: string;
|
|
4112
|
+
templateOptions?: {
|
|
4113
|
+
[x: string]: string;
|
|
4114
|
+
};
|
|
4115
|
+
tenantId?: string;
|
|
4116
|
+
} & {
|
|
4117
|
+
providerId?: string;
|
|
4118
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
3921
4119
|
waitForSession: (pendingRef: string, config?: {
|
|
3922
4120
|
pollingIntervalMs: number;
|
|
3923
4121
|
timeoutMs: number;
|
|
@@ -3933,6 +4131,18 @@ declare const useDescope: () => (((({
|
|
|
3933
4131
|
providerId?: string;
|
|
3934
4132
|
mfa?: boolean;
|
|
3935
4133
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
4134
|
+
phone: {
|
|
4135
|
+
sms: <T_5_4 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
4136
|
+
addToLoginIDs?: T_5_4;
|
|
4137
|
+
onMergeUseExisting?: T_5_4 extends true ? boolean : never;
|
|
4138
|
+
templateOptions?: {
|
|
4139
|
+
[x: string]: string;
|
|
4140
|
+
};
|
|
4141
|
+
templateId?: string;
|
|
4142
|
+
providerId?: string;
|
|
4143
|
+
mfa?: boolean;
|
|
4144
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
4145
|
+
};
|
|
3936
4146
|
};
|
|
3937
4147
|
};
|
|
3938
4148
|
oauth: {
|
|
@@ -4155,8 +4365,8 @@ declare const useDescope: () => (((({
|
|
|
4155
4365
|
}>>;
|
|
4156
4366
|
};
|
|
4157
4367
|
helpers: {
|
|
4158
|
-
create: (options: string) => Promise<string>;
|
|
4159
|
-
get: (options: string) => Promise<string>;
|
|
4368
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
4369
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
4160
4370
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
4161
4371
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
4162
4372
|
};
|
|
@@ -4327,9 +4537,9 @@ declare const useDescope: () => (((({
|
|
|
4327
4537
|
}>>;
|
|
4328
4538
|
};
|
|
4329
4539
|
update: {
|
|
4330
|
-
email: <
|
|
4331
|
-
addToLoginIDs?:
|
|
4332
|
-
onMergeUseExisting?:
|
|
4540
|
+
email: <T_10 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
4541
|
+
addToLoginIDs?: T_10;
|
|
4542
|
+
onMergeUseExisting?: T_10 extends true ? boolean : never;
|
|
4333
4543
|
templateOptions?: {
|
|
4334
4544
|
[x: string]: string;
|
|
4335
4545
|
};
|
|
@@ -4619,6 +4829,9 @@ declare const useDescope: () => (((({
|
|
|
4619
4829
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
4620
4830
|
providerId?: string;
|
|
4621
4831
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
4832
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
4833
|
+
providerId?: string;
|
|
4834
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
4622
4835
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
4623
4836
|
customClaims?: Record<string, any>;
|
|
4624
4837
|
templateId?: string;
|
|
@@ -4629,6 +4842,16 @@ declare const useDescope: () => (((({
|
|
|
4629
4842
|
} & {
|
|
4630
4843
|
providerId?: string;
|
|
4631
4844
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
4845
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
4846
|
+
customClaims?: Record<string, any>;
|
|
4847
|
+
templateId?: string;
|
|
4848
|
+
templateOptions?: {
|
|
4849
|
+
[x: string]: string;
|
|
4850
|
+
};
|
|
4851
|
+
tenantId?: string;
|
|
4852
|
+
} & {
|
|
4853
|
+
providerId?: string;
|
|
4854
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
4632
4855
|
signUp: (loginId: string, URI?: string, user?: {
|
|
4633
4856
|
email?: string;
|
|
4634
4857
|
name?: string;
|
|
@@ -4646,6 +4869,23 @@ declare const useDescope: () => (((({
|
|
|
4646
4869
|
} & {
|
|
4647
4870
|
providerId?: string;
|
|
4648
4871
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
4872
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
4873
|
+
email?: string;
|
|
4874
|
+
name?: string;
|
|
4875
|
+
givenName?: string;
|
|
4876
|
+
middleName?: string;
|
|
4877
|
+
familyName?: string;
|
|
4878
|
+
phone?: string;
|
|
4879
|
+
}, args_3?: {
|
|
4880
|
+
customClaims?: Record<string, any>;
|
|
4881
|
+
templateId?: string;
|
|
4882
|
+
templateOptions?: {
|
|
4883
|
+
[x: string]: string;
|
|
4884
|
+
};
|
|
4885
|
+
tenantId?: string;
|
|
4886
|
+
} & {
|
|
4887
|
+
providerId?: string;
|
|
4888
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
4649
4889
|
waitForSession: (pendingRef: string, config?: {
|
|
4650
4890
|
pollingIntervalMs: number;
|
|
4651
4891
|
timeoutMs: number;
|
|
@@ -4661,6 +4901,18 @@ declare const useDescope: () => (((({
|
|
|
4661
4901
|
providerId?: string;
|
|
4662
4902
|
mfa?: boolean;
|
|
4663
4903
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
4904
|
+
phone: {
|
|
4905
|
+
sms: <T_5_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
4906
|
+
addToLoginIDs?: T_5_5;
|
|
4907
|
+
onMergeUseExisting?: T_5_5 extends true ? boolean : never;
|
|
4908
|
+
templateOptions?: {
|
|
4909
|
+
[x: string]: string;
|
|
4910
|
+
};
|
|
4911
|
+
templateId?: string;
|
|
4912
|
+
providerId?: string;
|
|
4913
|
+
mfa?: boolean;
|
|
4914
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
4915
|
+
};
|
|
4664
4916
|
};
|
|
4665
4917
|
};
|
|
4666
4918
|
oauth: {
|
|
@@ -4915,8 +5167,8 @@ declare const getSdk: () => (((({
|
|
|
4915
5167
|
}>>;
|
|
4916
5168
|
};
|
|
4917
5169
|
helpers: {
|
|
4918
|
-
create: (options: string) => Promise<string>;
|
|
4919
|
-
get: (options: string) => Promise<string>;
|
|
5170
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
5171
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
4920
5172
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
4921
5173
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
4922
5174
|
};
|
|
@@ -5379,6 +5631,9 @@ declare const getSdk: () => (((({
|
|
|
5379
5631
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
5380
5632
|
providerId?: string;
|
|
5381
5633
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
5634
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
5635
|
+
providerId?: string;
|
|
5636
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
5382
5637
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
5383
5638
|
customClaims?: Record<string, any>;
|
|
5384
5639
|
templateId?: string;
|
|
@@ -5389,6 +5644,16 @@ declare const getSdk: () => (((({
|
|
|
5389
5644
|
} & {
|
|
5390
5645
|
providerId?: string;
|
|
5391
5646
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
5647
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
5648
|
+
customClaims?: Record<string, any>;
|
|
5649
|
+
templateId?: string;
|
|
5650
|
+
templateOptions?: {
|
|
5651
|
+
[x: string]: string;
|
|
5652
|
+
};
|
|
5653
|
+
tenantId?: string;
|
|
5654
|
+
} & {
|
|
5655
|
+
providerId?: string;
|
|
5656
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
5392
5657
|
signUp: (loginId: string, URI?: string, user?: {
|
|
5393
5658
|
email?: string;
|
|
5394
5659
|
name?: string;
|
|
@@ -5406,6 +5671,23 @@ declare const getSdk: () => (((({
|
|
|
5406
5671
|
} & {
|
|
5407
5672
|
providerId?: string;
|
|
5408
5673
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
5674
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
5675
|
+
email?: string;
|
|
5676
|
+
name?: string;
|
|
5677
|
+
givenName?: string;
|
|
5678
|
+
middleName?: string;
|
|
5679
|
+
familyName?: string;
|
|
5680
|
+
phone?: string;
|
|
5681
|
+
}, args_3?: {
|
|
5682
|
+
customClaims?: Record<string, any>;
|
|
5683
|
+
templateId?: string;
|
|
5684
|
+
templateOptions?: {
|
|
5685
|
+
[x: string]: string;
|
|
5686
|
+
};
|
|
5687
|
+
tenantId?: string;
|
|
5688
|
+
} & {
|
|
5689
|
+
providerId?: string;
|
|
5690
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
5409
5691
|
waitForSession: (pendingRef: string, config?: {
|
|
5410
5692
|
pollingIntervalMs: number;
|
|
5411
5693
|
timeoutMs: number;
|
|
@@ -5421,6 +5703,18 @@ declare const getSdk: () => (((({
|
|
|
5421
5703
|
providerId?: string;
|
|
5422
5704
|
mfa?: boolean;
|
|
5423
5705
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
5706
|
+
phone: {
|
|
5707
|
+
sms: <T_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
5708
|
+
addToLoginIDs?: T_5;
|
|
5709
|
+
onMergeUseExisting?: T_5 extends true ? boolean : never;
|
|
5710
|
+
templateOptions?: {
|
|
5711
|
+
[x: string]: string;
|
|
5712
|
+
};
|
|
5713
|
+
templateId?: string;
|
|
5714
|
+
providerId?: string;
|
|
5715
|
+
mfa?: boolean;
|
|
5716
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
5717
|
+
};
|
|
5424
5718
|
};
|
|
5425
5719
|
};
|
|
5426
5720
|
oauth: {
|
|
@@ -5643,8 +5937,8 @@ declare const getSdk: () => (((({
|
|
|
5643
5937
|
}>>;
|
|
5644
5938
|
};
|
|
5645
5939
|
helpers: {
|
|
5646
|
-
create: (options: string) => Promise<string>;
|
|
5647
|
-
get: (options: string) => Promise<string>;
|
|
5940
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
5941
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
5648
5942
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
5649
5943
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
5650
5944
|
};
|
|
@@ -5815,9 +6109,9 @@ declare const getSdk: () => (((({
|
|
|
5815
6109
|
}>>;
|
|
5816
6110
|
};
|
|
5817
6111
|
update: {
|
|
5818
|
-
email: <
|
|
5819
|
-
addToLoginIDs?:
|
|
5820
|
-
onMergeUseExisting?:
|
|
6112
|
+
email: <T_6 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
6113
|
+
addToLoginIDs?: T_6;
|
|
6114
|
+
onMergeUseExisting?: T_6 extends true ? boolean : never;
|
|
5821
6115
|
templateOptions?: {
|
|
5822
6116
|
[x: string]: string;
|
|
5823
6117
|
};
|
|
@@ -6107,6 +6401,9 @@ declare const getSdk: () => (((({
|
|
|
6107
6401
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
6108
6402
|
providerId?: string;
|
|
6109
6403
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6404
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
6405
|
+
providerId?: string;
|
|
6406
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
6110
6407
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
6111
6408
|
customClaims?: Record<string, any>;
|
|
6112
6409
|
templateId?: string;
|
|
@@ -6117,6 +6414,16 @@ declare const getSdk: () => (((({
|
|
|
6117
6414
|
} & {
|
|
6118
6415
|
providerId?: string;
|
|
6119
6416
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6417
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
6418
|
+
customClaims?: Record<string, any>;
|
|
6419
|
+
templateId?: string;
|
|
6420
|
+
templateOptions?: {
|
|
6421
|
+
[x: string]: string;
|
|
6422
|
+
};
|
|
6423
|
+
tenantId?: string;
|
|
6424
|
+
} & {
|
|
6425
|
+
providerId?: string;
|
|
6426
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
6120
6427
|
signUp: (loginId: string, URI?: string, user?: {
|
|
6121
6428
|
email?: string;
|
|
6122
6429
|
name?: string;
|
|
@@ -6134,6 +6441,23 @@ declare const getSdk: () => (((({
|
|
|
6134
6441
|
} & {
|
|
6135
6442
|
providerId?: string;
|
|
6136
6443
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6444
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
6445
|
+
email?: string;
|
|
6446
|
+
name?: string;
|
|
6447
|
+
givenName?: string;
|
|
6448
|
+
middleName?: string;
|
|
6449
|
+
familyName?: string;
|
|
6450
|
+
phone?: string;
|
|
6451
|
+
}, args_3?: {
|
|
6452
|
+
customClaims?: Record<string, any>;
|
|
6453
|
+
templateId?: string;
|
|
6454
|
+
templateOptions?: {
|
|
6455
|
+
[x: string]: string;
|
|
6456
|
+
};
|
|
6457
|
+
tenantId?: string;
|
|
6458
|
+
} & {
|
|
6459
|
+
providerId?: string;
|
|
6460
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
6137
6461
|
waitForSession: (pendingRef: string, config?: {
|
|
6138
6462
|
pollingIntervalMs: number;
|
|
6139
6463
|
timeoutMs: number;
|
|
@@ -6149,6 +6473,18 @@ declare const getSdk: () => (((({
|
|
|
6149
6473
|
providerId?: string;
|
|
6150
6474
|
mfa?: boolean;
|
|
6151
6475
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6476
|
+
phone: {
|
|
6477
|
+
sms: <T_5_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
6478
|
+
addToLoginIDs?: T_5_1;
|
|
6479
|
+
onMergeUseExisting?: T_5_1 extends true ? boolean : never;
|
|
6480
|
+
templateOptions?: {
|
|
6481
|
+
[x: string]: string;
|
|
6482
|
+
};
|
|
6483
|
+
templateId?: string;
|
|
6484
|
+
providerId?: string;
|
|
6485
|
+
mfa?: boolean;
|
|
6486
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
6487
|
+
};
|
|
6152
6488
|
};
|
|
6153
6489
|
};
|
|
6154
6490
|
oauth: {
|
|
@@ -6371,8 +6707,8 @@ declare const getSdk: () => (((({
|
|
|
6371
6707
|
}>>;
|
|
6372
6708
|
};
|
|
6373
6709
|
helpers: {
|
|
6374
|
-
create: (options: string) => Promise<string>;
|
|
6375
|
-
get: (options: string) => Promise<string>;
|
|
6710
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
6711
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
6376
6712
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
6377
6713
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
6378
6714
|
};
|
|
@@ -6543,9 +6879,9 @@ declare const getSdk: () => (((({
|
|
|
6543
6879
|
}>>;
|
|
6544
6880
|
};
|
|
6545
6881
|
update: {
|
|
6546
|
-
email: <
|
|
6547
|
-
addToLoginIDs?:
|
|
6548
|
-
onMergeUseExisting?:
|
|
6882
|
+
email: <T_7 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
6883
|
+
addToLoginIDs?: T_7;
|
|
6884
|
+
onMergeUseExisting?: T_7 extends true ? boolean : never;
|
|
6549
6885
|
templateOptions?: {
|
|
6550
6886
|
[x: string]: string;
|
|
6551
6887
|
};
|
|
@@ -6835,6 +7171,9 @@ declare const getSdk: () => (((({
|
|
|
6835
7171
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
6836
7172
|
providerId?: string;
|
|
6837
7173
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
7174
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
7175
|
+
providerId?: string;
|
|
7176
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
6838
7177
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
6839
7178
|
customClaims?: Record<string, any>;
|
|
6840
7179
|
templateId?: string;
|
|
@@ -6845,6 +7184,16 @@ declare const getSdk: () => (((({
|
|
|
6845
7184
|
} & {
|
|
6846
7185
|
providerId?: string;
|
|
6847
7186
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
7187
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
7188
|
+
customClaims?: Record<string, any>;
|
|
7189
|
+
templateId?: string;
|
|
7190
|
+
templateOptions?: {
|
|
7191
|
+
[x: string]: string;
|
|
7192
|
+
};
|
|
7193
|
+
tenantId?: string;
|
|
7194
|
+
} & {
|
|
7195
|
+
providerId?: string;
|
|
7196
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
6848
7197
|
signUp: (loginId: string, URI?: string, user?: {
|
|
6849
7198
|
email?: string;
|
|
6850
7199
|
name?: string;
|
|
@@ -6862,6 +7211,23 @@ declare const getSdk: () => (((({
|
|
|
6862
7211
|
} & {
|
|
6863
7212
|
providerId?: string;
|
|
6864
7213
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
7214
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
7215
|
+
email?: string;
|
|
7216
|
+
name?: string;
|
|
7217
|
+
givenName?: string;
|
|
7218
|
+
middleName?: string;
|
|
7219
|
+
familyName?: string;
|
|
7220
|
+
phone?: string;
|
|
7221
|
+
}, args_3?: {
|
|
7222
|
+
customClaims?: Record<string, any>;
|
|
7223
|
+
templateId?: string;
|
|
7224
|
+
templateOptions?: {
|
|
7225
|
+
[x: string]: string;
|
|
7226
|
+
};
|
|
7227
|
+
tenantId?: string;
|
|
7228
|
+
} & {
|
|
7229
|
+
providerId?: string;
|
|
7230
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
6865
7231
|
waitForSession: (pendingRef: string, config?: {
|
|
6866
7232
|
pollingIntervalMs: number;
|
|
6867
7233
|
timeoutMs: number;
|
|
@@ -6877,6 +7243,18 @@ declare const getSdk: () => (((({
|
|
|
6877
7243
|
providerId?: string;
|
|
6878
7244
|
mfa?: boolean;
|
|
6879
7245
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
7246
|
+
phone: {
|
|
7247
|
+
sms: <T_5_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
7248
|
+
addToLoginIDs?: T_5_2;
|
|
7249
|
+
onMergeUseExisting?: T_5_2 extends true ? boolean : never;
|
|
7250
|
+
templateOptions?: {
|
|
7251
|
+
[x: string]: string;
|
|
7252
|
+
};
|
|
7253
|
+
templateId?: string;
|
|
7254
|
+
providerId?: string;
|
|
7255
|
+
mfa?: boolean;
|
|
7256
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
7257
|
+
};
|
|
6880
7258
|
};
|
|
6881
7259
|
};
|
|
6882
7260
|
oauth: {
|
|
@@ -7109,8 +7487,8 @@ declare const getSdk: () => (((({
|
|
|
7109
7487
|
}>>;
|
|
7110
7488
|
};
|
|
7111
7489
|
helpers: {
|
|
7112
|
-
create: (options: string) => Promise<string>;
|
|
7113
|
-
get: (options: string) => Promise<string>;
|
|
7490
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
7491
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
7114
7492
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
7115
7493
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
7116
7494
|
};
|
|
@@ -7281,9 +7659,9 @@ declare const getSdk: () => (((({
|
|
|
7281
7659
|
}>>;
|
|
7282
7660
|
};
|
|
7283
7661
|
update: {
|
|
7284
|
-
email: <
|
|
7285
|
-
addToLoginIDs?:
|
|
7286
|
-
onMergeUseExisting?:
|
|
7662
|
+
email: <T_8 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
7663
|
+
addToLoginIDs?: T_8;
|
|
7664
|
+
onMergeUseExisting?: T_8 extends true ? boolean : never;
|
|
7287
7665
|
templateOptions?: {
|
|
7288
7666
|
[x: string]: string;
|
|
7289
7667
|
};
|
|
@@ -7573,6 +7951,9 @@ declare const getSdk: () => (((({
|
|
|
7573
7951
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
7574
7952
|
providerId?: string;
|
|
7575
7953
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
7954
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
7955
|
+
providerId?: string;
|
|
7956
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
7576
7957
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
7577
7958
|
customClaims?: Record<string, any>;
|
|
7578
7959
|
templateId?: string;
|
|
@@ -7583,6 +7964,16 @@ declare const getSdk: () => (((({
|
|
|
7583
7964
|
} & {
|
|
7584
7965
|
providerId?: string;
|
|
7585
7966
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
7967
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
7968
|
+
customClaims?: Record<string, any>;
|
|
7969
|
+
templateId?: string;
|
|
7970
|
+
templateOptions?: {
|
|
7971
|
+
[x: string]: string;
|
|
7972
|
+
};
|
|
7973
|
+
tenantId?: string;
|
|
7974
|
+
} & {
|
|
7975
|
+
providerId?: string;
|
|
7976
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
7586
7977
|
signUp: (loginId: string, URI?: string, user?: {
|
|
7587
7978
|
email?: string;
|
|
7588
7979
|
name?: string;
|
|
@@ -7600,6 +7991,23 @@ declare const getSdk: () => (((({
|
|
|
7600
7991
|
} & {
|
|
7601
7992
|
providerId?: string;
|
|
7602
7993
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
7994
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
7995
|
+
email?: string;
|
|
7996
|
+
name?: string;
|
|
7997
|
+
givenName?: string;
|
|
7998
|
+
middleName?: string;
|
|
7999
|
+
familyName?: string;
|
|
8000
|
+
phone?: string;
|
|
8001
|
+
}, args_3?: {
|
|
8002
|
+
customClaims?: Record<string, any>;
|
|
8003
|
+
templateId?: string;
|
|
8004
|
+
templateOptions?: {
|
|
8005
|
+
[x: string]: string;
|
|
8006
|
+
};
|
|
8007
|
+
tenantId?: string;
|
|
8008
|
+
} & {
|
|
8009
|
+
providerId?: string;
|
|
8010
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
7603
8011
|
waitForSession: (pendingRef: string, config?: {
|
|
7604
8012
|
pollingIntervalMs: number;
|
|
7605
8013
|
timeoutMs: number;
|
|
@@ -7615,6 +8023,18 @@ declare const getSdk: () => (((({
|
|
|
7615
8023
|
providerId?: string;
|
|
7616
8024
|
mfa?: boolean;
|
|
7617
8025
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
8026
|
+
phone: {
|
|
8027
|
+
sms: <T_5_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
8028
|
+
addToLoginIDs?: T_5_3;
|
|
8029
|
+
onMergeUseExisting?: T_5_3 extends true ? boolean : never;
|
|
8030
|
+
templateOptions?: {
|
|
8031
|
+
[x: string]: string;
|
|
8032
|
+
};
|
|
8033
|
+
templateId?: string;
|
|
8034
|
+
providerId?: string;
|
|
8035
|
+
mfa?: boolean;
|
|
8036
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
8037
|
+
};
|
|
7618
8038
|
};
|
|
7619
8039
|
};
|
|
7620
8040
|
oauth: {
|
|
@@ -7837,8 +8257,8 @@ declare const getSdk: () => (((({
|
|
|
7837
8257
|
}>>;
|
|
7838
8258
|
};
|
|
7839
8259
|
helpers: {
|
|
7840
|
-
create: (options: string) => Promise<string>;
|
|
7841
|
-
get: (options: string) => Promise<string>;
|
|
8260
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
8261
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
7842
8262
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
7843
8263
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
7844
8264
|
};
|
|
@@ -8009,9 +8429,9 @@ declare const getSdk: () => (((({
|
|
|
8009
8429
|
}>>;
|
|
8010
8430
|
};
|
|
8011
8431
|
update: {
|
|
8012
|
-
email: <
|
|
8013
|
-
addToLoginIDs?:
|
|
8014
|
-
onMergeUseExisting?:
|
|
8432
|
+
email: <T_9 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
8433
|
+
addToLoginIDs?: T_9;
|
|
8434
|
+
onMergeUseExisting?: T_9 extends true ? boolean : never;
|
|
8015
8435
|
templateOptions?: {
|
|
8016
8436
|
[x: string]: string;
|
|
8017
8437
|
};
|
|
@@ -8301,6 +8721,9 @@ declare const getSdk: () => (((({
|
|
|
8301
8721
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
8302
8722
|
providerId?: string;
|
|
8303
8723
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
8724
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
8725
|
+
providerId?: string;
|
|
8726
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
8304
8727
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
8305
8728
|
customClaims?: Record<string, any>;
|
|
8306
8729
|
templateId?: string;
|
|
@@ -8311,6 +8734,16 @@ declare const getSdk: () => (((({
|
|
|
8311
8734
|
} & {
|
|
8312
8735
|
providerId?: string;
|
|
8313
8736
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
8737
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
8738
|
+
customClaims?: Record<string, any>;
|
|
8739
|
+
templateId?: string;
|
|
8740
|
+
templateOptions?: {
|
|
8741
|
+
[x: string]: string;
|
|
8742
|
+
};
|
|
8743
|
+
tenantId?: string;
|
|
8744
|
+
} & {
|
|
8745
|
+
providerId?: string;
|
|
8746
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
8314
8747
|
signUp: (loginId: string, URI?: string, user?: {
|
|
8315
8748
|
email?: string;
|
|
8316
8749
|
name?: string;
|
|
@@ -8328,6 +8761,23 @@ declare const getSdk: () => (((({
|
|
|
8328
8761
|
} & {
|
|
8329
8762
|
providerId?: string;
|
|
8330
8763
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
8764
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
8765
|
+
email?: string;
|
|
8766
|
+
name?: string;
|
|
8767
|
+
givenName?: string;
|
|
8768
|
+
middleName?: string;
|
|
8769
|
+
familyName?: string;
|
|
8770
|
+
phone?: string;
|
|
8771
|
+
}, args_3?: {
|
|
8772
|
+
customClaims?: Record<string, any>;
|
|
8773
|
+
templateId?: string;
|
|
8774
|
+
templateOptions?: {
|
|
8775
|
+
[x: string]: string;
|
|
8776
|
+
};
|
|
8777
|
+
tenantId?: string;
|
|
8778
|
+
} & {
|
|
8779
|
+
providerId?: string;
|
|
8780
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
8331
8781
|
waitForSession: (pendingRef: string, config?: {
|
|
8332
8782
|
pollingIntervalMs: number;
|
|
8333
8783
|
timeoutMs: number;
|
|
@@ -8343,6 +8793,18 @@ declare const getSdk: () => (((({
|
|
|
8343
8793
|
providerId?: string;
|
|
8344
8794
|
mfa?: boolean;
|
|
8345
8795
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
8796
|
+
phone: {
|
|
8797
|
+
sms: <T_5_4 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
8798
|
+
addToLoginIDs?: T_5_4;
|
|
8799
|
+
onMergeUseExisting?: T_5_4 extends true ? boolean : never;
|
|
8800
|
+
templateOptions?: {
|
|
8801
|
+
[x: string]: string;
|
|
8802
|
+
};
|
|
8803
|
+
templateId?: string;
|
|
8804
|
+
providerId?: string;
|
|
8805
|
+
mfa?: boolean;
|
|
8806
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
8807
|
+
};
|
|
8346
8808
|
};
|
|
8347
8809
|
};
|
|
8348
8810
|
oauth: {
|
|
@@ -8565,8 +9027,8 @@ declare const getSdk: () => (((({
|
|
|
8565
9027
|
}>>;
|
|
8566
9028
|
};
|
|
8567
9029
|
helpers: {
|
|
8568
|
-
create: (options: string) => Promise<string>;
|
|
8569
|
-
get: (options: string) => Promise<string>;
|
|
9030
|
+
create: (options: string, abort?: AbortController) => Promise<string>;
|
|
9031
|
+
get: (options: string, abort?: AbortController) => Promise<string>;
|
|
8570
9032
|
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
8571
9033
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
8572
9034
|
};
|
|
@@ -8737,9 +9199,9 @@ declare const getSdk: () => (((({
|
|
|
8737
9199
|
}>>;
|
|
8738
9200
|
};
|
|
8739
9201
|
update: {
|
|
8740
|
-
email: <
|
|
8741
|
-
addToLoginIDs?:
|
|
8742
|
-
onMergeUseExisting?:
|
|
9202
|
+
email: <T_10 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
9203
|
+
addToLoginIDs?: T_10;
|
|
9204
|
+
onMergeUseExisting?: T_10 extends true ? boolean : never;
|
|
8743
9205
|
templateOptions?: {
|
|
8744
9206
|
[x: string]: string;
|
|
8745
9207
|
};
|
|
@@ -9029,6 +9491,9 @@ declare const getSdk: () => (((({
|
|
|
9029
9491
|
signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
9030
9492
|
providerId?: string;
|
|
9031
9493
|
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
9494
|
+
signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
|
|
9495
|
+
providerId?: string;
|
|
9496
|
+
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
9032
9497
|
signUpOrIn: (loginId: string, URI?: string, args_2?: {
|
|
9033
9498
|
customClaims?: Record<string, any>;
|
|
9034
9499
|
templateId?: string;
|
|
@@ -9039,6 +9504,16 @@ declare const getSdk: () => (((({
|
|
|
9039
9504
|
} & {
|
|
9040
9505
|
providerId?: string;
|
|
9041
9506
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
9507
|
+
signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
|
|
9508
|
+
customClaims?: Record<string, any>;
|
|
9509
|
+
templateId?: string;
|
|
9510
|
+
templateOptions?: {
|
|
9511
|
+
[x: string]: string;
|
|
9512
|
+
};
|
|
9513
|
+
tenantId?: string;
|
|
9514
|
+
} & {
|
|
9515
|
+
providerId?: string;
|
|
9516
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
9042
9517
|
signUp: (loginId: string, URI?: string, user?: {
|
|
9043
9518
|
email?: string;
|
|
9044
9519
|
name?: string;
|
|
@@ -9056,6 +9531,23 @@ declare const getSdk: () => (((({
|
|
|
9056
9531
|
} & {
|
|
9057
9532
|
providerId?: string;
|
|
9058
9533
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
9534
|
+
signUpWithPhone: (loginId: string, URI?: string, user?: {
|
|
9535
|
+
email?: string;
|
|
9536
|
+
name?: string;
|
|
9537
|
+
givenName?: string;
|
|
9538
|
+
middleName?: string;
|
|
9539
|
+
familyName?: string;
|
|
9540
|
+
phone?: string;
|
|
9541
|
+
}, args_3?: {
|
|
9542
|
+
customClaims?: Record<string, any>;
|
|
9543
|
+
templateId?: string;
|
|
9544
|
+
templateOptions?: {
|
|
9545
|
+
[x: string]: string;
|
|
9546
|
+
};
|
|
9547
|
+
tenantId?: string;
|
|
9548
|
+
} & {
|
|
9549
|
+
providerId?: string;
|
|
9550
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
9059
9551
|
waitForSession: (pendingRef: string, config?: {
|
|
9060
9552
|
pollingIntervalMs: number;
|
|
9061
9553
|
timeoutMs: number;
|
|
@@ -9071,6 +9563,18 @@ declare const getSdk: () => (((({
|
|
|
9071
9563
|
providerId?: string;
|
|
9072
9564
|
mfa?: boolean;
|
|
9073
9565
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
9566
|
+
phone: {
|
|
9567
|
+
sms: <T_5_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
9568
|
+
addToLoginIDs?: T_5_5;
|
|
9569
|
+
onMergeUseExisting?: T_5_5 extends true ? boolean : never;
|
|
9570
|
+
templateOptions?: {
|
|
9571
|
+
[x: string]: string;
|
|
9572
|
+
};
|
|
9573
|
+
templateId?: string;
|
|
9574
|
+
providerId?: string;
|
|
9575
|
+
mfa?: boolean;
|
|
9576
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
|
|
9577
|
+
};
|
|
9074
9578
|
};
|
|
9075
9579
|
};
|
|
9076
9580
|
oauth: {
|
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 l,withCtx as d,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 y=Symbol("$descope"),b={"x-descope-sdk-name":"vue","x-descope-sdk-version":"3.1.6"},S="undefined"!=typeof window,h=()=>{const e=r(y);if(!e)throw Error("Missing Descope context, make sure you are using the Descope plugin");return e},v=()=>h().options,w=()=>h().sdk,f=()=>{const{session:t}=h();return t.isFetchSessionWasNeverCalled.value&&t.fetchSession(!0),{isLoading:e((()=>t.isLoading.value||t.isFetchSessionWasNeverCalled.value)),sessionToken:t.session,claims:t.claims,isAuthenticated:t.isAuthenticated}},U=()=>{const{user:r,session:s}=h(),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:S,storeLastAuthenticatedUser:S,autoRefresh:S,...e});return _=t,t};_=j({projectId:"temp pid"});const k=()=>S?_?.getSessionToken():(console.warn("Get session token is not supported in SSR"),""),C=()=>S?_?.getRefreshToken():(console.warn("Get refresh token is not supported in SSR"),""),R=(e=k())=>_?.isJwtExpired(e),A=(e=C())=>_?.isJwtExpired(e),O=I(((e=k(),t)=>_?.getJwtPermissions(e,t))),q=I(((e=k(),t)=>_?.getJwtRoles(e,t))),B=I(((e=k())=>_?.getCurrentTenant(e)));var T=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},sendSessionToken:{type:Boolean},errorTransformer:{type:Function},onScreenUpdate:{type:Function},form:{type:Object},client:{type:Object},styleId:{type:String},themeOverride:{type:Object},nonce:{type:String},dismissScreenErrorOnInput:{type:Boolean},popupOrigin:{type:String}},emits:["success","error","ready"],setup(t,{emit:r}){(customElements?.get("descope-wc")||g).sdkConfigOverrides={baseHeaders:b,persistTokens:!1,hooks:{get beforeRequest(){return _.httpClient.hooks.beforeRequest},set beforeRequest(e){}}};const s=t,c=r,{projectId:p,baseUrl:m,baseStaticUrl:y,storeLastAuthenticatedUser:S,baseCdnUrl:h,customStorage:f}=v(),U=w(),I=e((()=>s.form?JSON.stringify(s.form):"")),j=e((()=>s.client?JSON.stringify(s.client):"")),k=async e=>{await(U.httpClient.hooks?.afterRequest?.({},new Response(JSON.stringify(e.detail)))),c("success",e)},C=e=>c("error",e),R=e=>c("ready",e);return(e,r)=>{const s=n("descope-wc");return a(),i("div",null,[o(s,{"project-id":l(p),"base-url":l(m),"base-static-url":l(y),"base-cdn-url":l(h),"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,"therme-override":t.themeOverride,"validate-on-blur":t.validateOnBlur,"restart-on-error":t.restartOnError,"send-session-token":t.sendSessionToken,"store-last-authenticated-user":l(S),".customStorage":l(f),".errorTransformer":t.errorTransformer,".onScreenUpdate":t.onScreenUpdate,"^form":I.value,"^client":j.value,"^nonce":t.nonce,"^dismiss-screen-error-on-input":t.dismissScreenErrorOnInput,"^popup-origin":t.popupOrigin,onSuccess:k,onError:C,onReady:R},{default:d((()=>[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","therme-override","validate-on-blur","restart-on-error","send-session-token","store-last-authenticated-user",".customStorage",".errorTransformer",".onScreenUpdate","^form","^client","^nonce","^dismiss-screen-error-on-input","^popup-origin"])])}}});T.__file="src/Descope.vue";var M=s({__name:"UserManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(e,{emit:t}){const r=t,{projectId:s,baseUrl:d,baseStaticUrl:u,baseCdnUrl:c}=v(),p=e=>r("ready",e);return(t,r)=>{const g=n("descope-user-management-widget");return a(),i("div",null,[o(g,{"project-id":l(s),"base-url":l(d),"base-static-url":l(u),"base-cdn-url":l(c),"^theme":e.theme,"^locale":e.locale,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onReady:p},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^tenant","^debug","widget-id","style-id"])])}}});M.__file="src/UserManagement.vue";var E=s({__name:"RoleManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(e,{emit:t}){const r=t,{projectId:s,baseUrl:d,baseStaticUrl:u,baseCdnUrl:c}=v(),p=e=>r("ready",e);return(t,r)=>{const g=n("descope-role-management-widget");return a(),i("div",null,[o(g,{"project-id":l(s),"base-url":l(d),"base-cdn-url":l(c),"base-static-url":l(u),"^theme":e.theme,"^locale":e.locale,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onReady:p},null,8,["project-id","base-url","base-cdn-url","base-static-url","^theme","^locale","^tenant","^debug","widget-id","style-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},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(e,{emit:t}){const r=t,{projectId:s,baseUrl:d,baseStaticUrl:u,baseCdnUrl:c}=v(),p=e=>r("ready",e);return(t,r)=>{const g=n("descope-access-key-management-widget");return a(),i("div",null,[o(g,{"project-id":l(s),"base-url":l(d),"base-static-url":l(u),"base-cdn-url":l(c),"^theme":e.theme,"^locale":e.locale,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onReady:p},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^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},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(e,{emit:t}){const r=t,{projectId:s,baseUrl:d,baseStaticUrl:u,baseCdnUrl:c}=v(),p=e=>r("ready",e);return(t,r)=>{const g=n("descope-audit-management-widget");return a(),i("div",null,[o(g,{"project-id":l(s),"base-url":l(d),"base-static-url":l(u),"base-cdn-url":l(c),"^theme":e.theme,"^locale":e.locale,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onReady:p},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^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},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["logout","ready"],setup(e,{emit:t}){const s=r(y),d=t,u=e=>{s?.resetAuth(),d("logout",e)},c=e=>d("ready",e),{projectId:p,baseUrl:g,baseStaticUrl:m,baseCdnUrl:b}=v();return(t,r)=>{const s=n("descope-user-profile-widget");return a(),i("div",null,[o(s,{"project-id":l(p),"base-url":l(g),"base-static-url":l(m),"base-cdn-url":l(b),"^theme":e.theme,"^locale":e.locale,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onLogout:u,onReady:c},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^debug","widget-id","style-id"])])}}});N.__file="src/UserProfile.vue";var P=s({__name:"ApplicationsPortal",props:{widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(e,{emit:t}){const r=t,{projectId:s,baseUrl:d,baseStaticUrl:u,baseCdnUrl:c}=v(),p=e=>r("ready",e);return(t,r)=>{const g=n("descope-applications-portal-widget");return a(),i("div",null,[o(g,{"project-id":l(s),"base-url":l(d),"base-static-url":l(u),"base-cdn-url":l(c),"^theme":e.theme,"^locale":e.locale,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onReady:p},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^debug","widget-id","style-id"])])}}});P.__file="src/ApplicationsPortal.vue";const J=c(null),K=()=>l(J)?.();let x;const D=()=>x;var W={install:function(r,s){const n=j({persistTokens:!0,autoRefresh:!0,...s,baseHeaders:b});x=n;const a=c(null),i=c(""),o=c(),d=c(!1),u=c(null),g=c(null);n.onSessionTokenChange((e=>{i.value=e})),n.onClaimsChange((e=>{o.value=e})),n.onIsAuthenticatedChange((e=>{d.value=e})),n.onUserChange((e=>{g.value=e}));const m=async e=>{"undefined"!=typeof window&&window.descopeBridge||(a.value=!0,await n.refresh(void 0,e),a.value=!1)},S=e((()=>null===a.value)),h=e((()=>null===u.value));J.value=()=>new Promise(((e,r)=>{!d.value&&S.value&&m().catch(r),t((()=>a.value),(()=>!a.value&&e(!!l(d))),{immediate:!0})})),r.provide(y,{session:{fetchSession:m,isLoading:p(a),session:p(i),claims:p(o),isAuthenticated:p(d),isFetchSessionWasNeverCalled:S},user:{fetchUser:async()=>{u.value=!0,await n.me(),u.value=!1},isLoading:p(u),user:p(g),isFetchUserWasNeverCalled:h},sdk:n,options:s,resetAuth:function(){i.value="",d.value=!1,g.value=null}})}};export{F as AccessKeyManagement,P as ApplicationsPortal,L as AuditManagement,T as Descope,E as RoleManagement,M as UserManagement,N as UserProfile,W as default,B as getCurrentTenant,O as getJwtPermissions,q as getJwtRoles,C as getRefreshToken,D as getSdk,k as getSessionToken,A as isRefreshTokenExpired,R as isSessionTokenExpired,K as routeGuard,w as useDescope,f as useSession,U as useUser};
|
|
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 l,withCtx as d,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 y=Symbol("$descope"),b={"x-descope-sdk-name":"vue","x-descope-sdk-version":"3.1.7"},S="undefined"!=typeof window,h=()=>{const e=r(y);if(!e)throw Error("Missing Descope context, make sure you are using the Descope plugin");return e},v=()=>h().options,w=()=>h().sdk,f=()=>{const{session:t}=h();return t.isFetchSessionWasNeverCalled.value&&t.fetchSession(!0),{isLoading:e((()=>t.isLoading.value||t.isFetchSessionWasNeverCalled.value)),sessionToken:t.session,claims:t.claims,isAuthenticated:t.isAuthenticated}},U=()=>{const{user:r,session:s}=h(),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:S,storeLastAuthenticatedUser:S,autoRefresh:S,...e});return _=t,t};_=j({projectId:"temp pid"});const k=()=>S?_?.getSessionToken():(console.warn("Get session token is not supported in SSR"),""),C=()=>S?_?.getRefreshToken():(console.warn("Get refresh token is not supported in SSR"),""),R=(e=k())=>_?.isJwtExpired(e),A=(e=C())=>_?.isJwtExpired(e),O=I(((e=k(),t)=>_?.getJwtPermissions(e,t))),q=I(((e=k(),t)=>_?.getJwtRoles(e,t))),B=I(((e=k())=>_?.getCurrentTenant(e)));var T=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},sendSessionToken:{type:Boolean},errorTransformer:{type:Function},onScreenUpdate:{type:Function},form:{type:Object},client:{type:Object},styleId:{type:String},themeOverride:{type:Object},nonce:{type:String},dismissScreenErrorOnInput:{type:Boolean},popupOrigin:{type:String}},emits:["success","error","ready"],setup(t,{emit:r}){(customElements?.get("descope-wc")||g).sdkConfigOverrides={baseHeaders:b,persistTokens:!1,hooks:{get beforeRequest(){return _.httpClient.hooks.beforeRequest},set beforeRequest(e){}}};const s=t,c=r,{projectId:p,baseUrl:m,baseStaticUrl:y,storeLastAuthenticatedUser:S,baseCdnUrl:h,customStorage:f}=v(),U=w(),I=e((()=>s.form?JSON.stringify(s.form):"")),j=e((()=>s.client?JSON.stringify(s.client):"")),k=async e=>{await(U.httpClient.hooks?.afterRequest?.({},new Response(JSON.stringify(e.detail)))),c("success",e)},C=e=>c("error",e),R=e=>c("ready",e);return(e,r)=>{const s=n("descope-wc");return a(),i("div",null,[o(s,{"project-id":l(p),"base-url":l(m),"base-static-url":l(y),"base-cdn-url":l(h),"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,"therme-override":t.themeOverride,"validate-on-blur":t.validateOnBlur,"restart-on-error":t.restartOnError,"send-session-token":t.sendSessionToken,"store-last-authenticated-user":l(S),".customStorage":l(f),".errorTransformer":t.errorTransformer,".onScreenUpdate":t.onScreenUpdate,"^form":I.value,"^client":j.value,"^nonce":t.nonce,"^dismiss-screen-error-on-input":t.dismissScreenErrorOnInput,"^popup-origin":t.popupOrigin,onSuccess:k,onError:C,onReady:R},{default:d((()=>[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","therme-override","validate-on-blur","restart-on-error","send-session-token","store-last-authenticated-user",".customStorage",".errorTransformer",".onScreenUpdate","^form","^client","^nonce","^dismiss-screen-error-on-input","^popup-origin"])])}}});T.__file="src/Descope.vue";var M=s({__name:"UserManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(e,{emit:t}){const r=t,{projectId:s,baseUrl:d,baseStaticUrl:u,baseCdnUrl:c}=v(),p=e=>r("ready",e);return(t,r)=>{const g=n("descope-user-management-widget");return a(),i("div",null,[o(g,{"project-id":l(s),"base-url":l(d),"base-static-url":l(u),"base-cdn-url":l(c),"^theme":e.theme,"^locale":e.locale,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onReady:p},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^tenant","^debug","widget-id","style-id"])])}}});M.__file="src/UserManagement.vue";var E=s({__name:"RoleManagement",props:{tenant:{type:String,required:!0},widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(e,{emit:t}){const r=t,{projectId:s,baseUrl:d,baseStaticUrl:u,baseCdnUrl:c}=v(),p=e=>r("ready",e);return(t,r)=>{const g=n("descope-role-management-widget");return a(),i("div",null,[o(g,{"project-id":l(s),"base-url":l(d),"base-cdn-url":l(c),"base-static-url":l(u),"^theme":e.theme,"^locale":e.locale,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onReady:p},null,8,["project-id","base-url","base-cdn-url","base-static-url","^theme","^locale","^tenant","^debug","widget-id","style-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},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(e,{emit:t}){const r=t,{projectId:s,baseUrl:d,baseStaticUrl:u,baseCdnUrl:c}=v(),p=e=>r("ready",e);return(t,r)=>{const g=n("descope-access-key-management-widget");return a(),i("div",null,[o(g,{"project-id":l(s),"base-url":l(d),"base-static-url":l(u),"base-cdn-url":l(c),"^theme":e.theme,"^locale":e.locale,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onReady:p},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^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},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(e,{emit:t}){const r=t,{projectId:s,baseUrl:d,baseStaticUrl:u,baseCdnUrl:c}=v(),p=e=>r("ready",e);return(t,r)=>{const g=n("descope-audit-management-widget");return a(),i("div",null,[o(g,{"project-id":l(s),"base-url":l(d),"base-static-url":l(u),"base-cdn-url":l(c),"^theme":e.theme,"^locale":e.locale,"^tenant":e.tenant,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onReady:p},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^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},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["logout","ready"],setup(e,{emit:t}){const s=r(y),d=t,u=e=>{s?.resetAuth(),d("logout",e)},c=e=>d("ready",e),{projectId:p,baseUrl:g,baseStaticUrl:m,baseCdnUrl:b}=v();return(t,r)=>{const s=n("descope-user-profile-widget");return a(),i("div",null,[o(s,{"project-id":l(p),"base-url":l(g),"base-static-url":l(m),"base-cdn-url":l(b),"^theme":e.theme,"^locale":e.locale,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onLogout:u,onReady:c},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^debug","widget-id","style-id"])])}}});N.__file="src/UserProfile.vue";var P=s({__name:"ApplicationsPortal",props:{widgetId:{type:String,required:!0},theme:{type:String},locale:{type:String},styleId:{type:String},debug:{type:Boolean}},emits:["ready"],setup(e,{emit:t}){const r=t,{projectId:s,baseUrl:d,baseStaticUrl:u,baseCdnUrl:c}=v(),p=e=>r("ready",e);return(t,r)=>{const g=n("descope-applications-portal-widget");return a(),i("div",null,[o(g,{"project-id":l(s),"base-url":l(d),"base-static-url":l(u),"base-cdn-url":l(c),"^theme":e.theme,"^locale":e.locale,"^debug":e.debug,"widget-id":e.widgetId,"style-id":e.styleId,onReady:p},null,8,["project-id","base-url","base-static-url","base-cdn-url","^theme","^locale","^debug","widget-id","style-id"])])}}});P.__file="src/ApplicationsPortal.vue";const J=c(null),K=()=>l(J)?.();let x;const D=()=>x;var W={install:function(r,s){const n=j({persistTokens:!0,autoRefresh:!0,...s,baseHeaders:b});x=n;const a=c(null),i=c(""),o=c(),d=c(!1),u=c(null),g=c(null);n.onSessionTokenChange((e=>{i.value=e})),n.onClaimsChange((e=>{o.value=e})),n.onIsAuthenticatedChange((e=>{d.value=e})),n.onUserChange((e=>{g.value=e}));const m=async e=>{"undefined"!=typeof window&&window.descopeBridge||(a.value=!0,await n.refresh(void 0,e),a.value=!1)},S=e((()=>null===a.value)),h=e((()=>null===u.value));J.value=()=>new Promise(((e,r)=>{!d.value&&S.value&&m().catch(r),t((()=>a.value),(()=>!a.value&&e(!!l(d))),{immediate:!0})})),r.provide(y,{session:{fetchSession:m,isLoading:p(a),session:p(i),claims:p(o),isAuthenticated:p(d),isFetchSessionWasNeverCalled:S},user:{fetchUser:async()=>{u.value=!0,await n.me(),u.value=!1},isLoading:p(u),user:p(g),isFetchUserWasNeverCalled:h},sdk:n,options:s,resetAuth:function(){i.value="",d.value=!1,g.value=null}})}};export{F as AccessKeyManagement,P as ApplicationsPortal,L as AuditManagement,T as Descope,E as RoleManagement,M as UserManagement,N as UserProfile,W as default,B as getCurrentTenant,O as getJwtPermissions,q as getJwtRoles,C as getRefreshToken,D as getSdk,k as getSessionToken,A as isRefreshTokenExpired,R as isSessionTokenExpired,K as routeGuard,w 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": "3.1.
|
|
3
|
+
"version": "3.1.7",
|
|
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/access-key-management-widget": "0.10.
|
|
29
|
-
"@descope/
|
|
30
|
-
"@descope/
|
|
31
|
-
"@descope/user-profile-widget": "0.19.
|
|
32
|
-
"@descope/
|
|
33
|
-
"@descope/
|
|
34
|
-
"@descope/web-
|
|
35
|
-
"@descope/web-
|
|
36
|
-
"@descope/core-js-sdk": "2.
|
|
28
|
+
"@descope/access-key-management-widget": "0.10.5",
|
|
29
|
+
"@descope/audit-management-widget": "0.9.5",
|
|
30
|
+
"@descope/applications-portal-widget": "0.9.5",
|
|
31
|
+
"@descope/user-profile-widget": "0.19.2",
|
|
32
|
+
"@descope/user-management-widget": "0.20.2",
|
|
33
|
+
"@descope/role-management-widget": "0.10.5",
|
|
34
|
+
"@descope/web-component": "4.4.2",
|
|
35
|
+
"@descope/web-js-sdk": "1.53.2",
|
|
36
|
+
"@descope/core-js-sdk": "2.73.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"vue": ">=3"
|