@authowl/core 0.24.0 → 0.24.2
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/chunk-QC2AVTUB.js +1 -0
- package/dist/{config-ZhNp65dI.d.cts → config-Chtx47rL.d.cts} +19 -2
- package/dist/{config-ZhNp65dI.d.ts → config-Chtx47rL.d.ts} +19 -2
- package/dist/{idempotency-BbNZaxT8.d.ts → idempotency-Benjy1FL.d.ts} +2 -2
- package/dist/{idempotency-CG0ZpMnW.d.cts → idempotency-rqL0wN3c.d.cts} +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/messages.cjs +1 -1
- package/dist/messages.d.cts +5 -0
- package/dist/messages.d.ts +5 -0
- package/dist/messages.js +1 -1
- package/dist/native.cjs +2 -2
- package/dist/native.d.cts +5 -5
- package/dist/native.d.ts +5 -5
- package/dist/native.js +1 -1
- package/dist/privacy.d.cts +2 -2
- package/dist/privacy.d.ts +2 -2
- package/dist/{public-config-BfuiC8Ph.d.ts → public-config-B7Tth7Cs.d.ts} +12 -1
- package/dist/{public-config-DdTDwDF7.d.cts → public-config-DwlH-HqZ.d.cts} +12 -1
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunk-LBCOMERN.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-5NL5GJW6.js';import {q as q$1,p,i,r,z,s,u,A,t,x,C,F as F$1,y,B as B$1,w as w$1,v}from'./chunk-YL2FF2VS.js';import {a as a$1}from'./chunk-T5SH3ZZP.js';function io(e){let t=e?.enabledMethods??["password"],n=t.includes("password"),i=t.includes("passkey"),o=e?.authentication,a=e?.mfa;return {emailSignUp:o?.email.signUp??t.some(p=>p==="password"||p==="magic_link"||p==="email_otp"),passwordSignUp:o?.password.signUp??n,phoneSignUp:o?.phone.signUp??t.includes("phone_otp"),passwordSignIn:o?.email.signIn.includes("password")??n,passwordMinLength:o?.password.minLength??8,passwordMaxLength:o?.password.maxLength??128,magicLinkSignIn:o?.email.signIn.includes("magic_link")??t.includes("magic_link"),emailOtpSignIn:o?.email.signIn.includes("email_otp")??t.includes("email_otp"),phoneSignIn:o?.phone.signIn??t.includes("phone_otp"),usernameSignIn:o?.username.signIn??false,collectUsername:o?.username.collectOnSignUp??false,passkeySignIn:o?.passkey.signIn??i,passkeyAdd:o?.passkey.add??i,firstLastName:e?.userModel?.firstLastName??false,emailChange:e===null?false:e.userModel?.emailChange??true,accountDeletion:e?.userModel?.accountDeletion??e?.accountDeletion??false,emailVerificationRequired:e?.emailVerification?.required??e?.requireEmailVerification??false,emailVerificationMethod:e?.emailVerification?.method??"link",totp:a?.totp??e?.twoFactor??false,mfaRequired:a?.required??e?.mfaRequired??false,backupCodes:a?.backupCodes??e?.twoFactor??false,legacyNameField:e?.authentication===void 0}}var ye=class extends Error{status;requestId;constructor(t,n,i){super(`${t} request failed with status ${n.status}.`),this.name="AuthOwlHttpError",this.status=n.status,this.requestId=i;}};function ae(e,t,n={}){let i=new Headers(n.init?.headers);return i.set("x-publishable-key",e.publishableKey),q$1({fetchImpl:e.fetch,url:t,init:{...n.init,headers:i},allowHttpLoopback:e.decoded.env==="test",...n.timeoutMs===void 0?{}:{timeoutMs:n.timeoutMs},...n.maxResponseBytes===void 0?{}:{maxResponseBytes:n.maxResponseBytes},...n.decode===void 0?{}:{decode:n.decode}})}function Be(e,t){if(!e.response.ok)throw new ye(t,e.response,e.requestId);return e.data}var q=new Map,Pn=/^[a-z]{2}$/;function so(e,t){if(typeof window>"u")return ()=>{};if(t===null)return q.delete(e),()=>{};let n=t.trim().toLowerCase();if(!Pn.test(n))return ()=>{};let i=Symbol(e),o=q.get(e)??[];return o.push({token:i,locale:n}),q.set(e,o),()=>{let a=q.get(e);if(!a)return;let p=a.filter(m=>m.token!==i);p.length===0?q.delete(e):q.set(e,p);}}function je(e){return typeof window>"u"?null:q.get(e)?.at(-1)?.locale??null}var Cn="x-authowl-turnstile-token",Dn="x-authowl-locale",zn=1e4,xn=32,En=2e4;function H(e,t){return {post:(n,i,o,a)=>e.request(n,{method:"POST",body:i,fetchOptions:o,decode:a}),mutation:async(n,i)=>{let o=await n;return o.error===null&&(i===void 0||o.data!==null&&i(o.data))&&await t(),o}}}function ke(e,t=e.projectBaseURL){return {async request(n,i$1={}){let o=Un(t,n,i$1.query),a=i$1.method??(i$1.body===void 0?"GET":"POST"),p$1=new Headers(i$1.fetchOptions?.headers);i$1.fetchOptions?.authChallengeToken&&p$1.set(Cn,i$1.fetchOptions.authChallengeToken);let m=je(e.decoded.projectId);m&&p$1.set(Dn,m),i$1.body!==void 0&&p$1.set("content-type","application/json");let c={method:a,headers:p$1,credentials:i$1.credentials??"include",...i$1.body===void 0?{}:{body:JSON.stringify(i$1.body)}},h=Object.freeze({method:a,path:n});await i$1.fetchOptions?.onRequest?.(h);let r=_n(a,i$1.fetchOptions),s;try{s=await Nn(e,o,{...c,signal:i$1.fetchOptions?.signal},r);}catch(g){let A=Je(g);return await i$1.fetchOptions?.onError?.(Oe(h,A,Fn(g))),{data:null,error:A}}let{response:f,requestId:y}=s,D=Vn(n,s.data),k=D;if(f.ok)try{k=we(D),i$1.decode&&(k=i$1.decode(k));}catch{let g=Je(new p("invalid_response",y));return await i$1.fetchOptions?.onError?.(Oe(h,g,"invalid_response")),{data:null,error:g}}let u=Object.freeze({...h,status:f.status,...y===void 0?{}:{requestId:y}});if(await i$1.fetchOptions?.onResponse?.(u),!f.ok){let g=Mn(f,D,y);return g.code===i&&e.session.tokens.dropChallenge(),await i$1.fetchOptions?.onError?.(Oe(h,g,"api")),{data:null,error:g}}return await i$1.fetchOptions?.onSuccess?.(u),{data:k,error:null}}}}async function Nn(e,t,n,i){let o=Date.now()+zn;for(let a=0;a<i;a+=1){let p$1=o-Date.now();if(p$1<=0)throw new p("timeout");try{let m=await ae(e,t,{init:n,timeoutMs:Math.max(1,Math.ceil(p$1))});if(m.response.status<500||a===i-1)return m}catch(m){if(a===i-1||!(m instanceof p)||m.kind!=="network")throw m}await qn(50*2**a,n.signal,o);}throw new p("network")}function _n(e,t){if(e!=="GET"||t?.authChallengeToken)return 1;let n=t?.retry;return typeof n!="number"||!Number.isFinite(n)?1:Math.min(Math.max(Math.trunc(n),0),3)+1}function Un(e,t,n){let i=new URL(`${e}${t.startsWith("/")?t:`/${t}`}`);for(let[o,a]of Object.entries(n??{}))a!==void 0&&i.searchParams.set(o,String(a));return i.toString()}function Mn(e,t,n){let i=W(t)?t:{},o=Ln(i,e.headers);return {status:e.status,statusText:e.statusText,code:typeof i.code=="string"?i.code:void 0,...n===void 0?{}:{requestId:n},...typeof i.current_version=="number"?{currentVersion:i.current_version}:{},...o!==void 0?{retryAfterSeconds:o}:{},message:typeof i.message=="string"?i.message:typeof i.error=="string"?i.error:typeof i.detail=="string"?i.detail:e.statusText||"Request failed"}}function Ln(e,t){let n=(typeof e.retryAfterSeconds=="number"&&Number.isFinite(e.retryAfterSeconds)?e.retryAfterSeconds:void 0)??Ge(t.get("retry-after"))??Ge(t.get("x-retry-after"));if(n!==void 0)return Math.min(Math.max(Math.trunc(n),1),86400)}function Ge(e){if(!e)return;let t=e.trim();if(!/^\d+$/.test(t))return;let n=Number(t);return Number.isFinite(n)?n:void 0}function Je(e){let t=e instanceof p?e.kind:"network";return {status:0,...{aborted:{statusText:"ABORTED",code:"REQUEST_ABORTED",message:"The request was cancelled."},timeout:{statusText:"TIMEOUT",code:"REQUEST_TIMEOUT",message:"The request timed out."},response_too_large:{statusText:"INVALID_RESPONSE",code:"RESPONSE_TOO_LARGE",message:"The service response was too large."},invalid_response:{statusText:"INVALID_RESPONSE",code:"INVALID_RESPONSE",message:"The service returned an invalid response."},network:{statusText:"FETCH_ERROR",code:"FETCH_ERROR",message:"Network request failed."}}[t],...e instanceof p&&e.requestId?{requestId:e.requestId}:{}}}function Oe(e,t,n){return Object.freeze({...e,status:t.status??0,...t.requestId===void 0?{}:{requestId:t.requestId},failure:n})}function Fn(e){return e instanceof p?e.kind:"network"}function qn(e,t,n){return new Promise((i,o)=>{if(t?.aborted){o(new p("aborted"));return}let a=n-Date.now();if(a<=0){o(new p("timeout"));return}let p$1=Math.min(e,a),m=()=>{clearTimeout(c),o(new p("aborted"));},c=setTimeout(()=>{t?.removeEventListener("abort",m),Date.now()>=n?o(new p("timeout")):i();},p$1);t?.addEventListener("abort",m,{once:true}),t?.aborted&&m();})}function we(e,t="",n=0,i={nodes:0}){if(i.nodes+=1,n>xn||i.nodes>En)throw new Error("response traversal limit exceeded");if(typeof e=="string"&&/^(?:createdAt|updatedAt|expiresAt)$/.test(t)){let o=new Date(e);return Number.isNaN(o.getTime())?e:o}return Array.isArray(e)?e.map(o=>we(o,"",n+1,i)):W(e)?Object.fromEntries(Object.entries(e).map(([o,a])=>[o,Hn(o)?a:we(a,o,n+1,i)])):e}function Hn(e){return e==="metadata"||e==="public_metadata"||e==="unsafe_metadata"||e==="private_metadata"||e==="publicMetadata"||e==="unsafeMetadata"||e==="privateMetadata"}function Vn(e,t){if(e==="/list-sessions"&&Array.isArray(t))return t.map(o=>W(o)?be(o):o);if(!W(t))return t;let i=e==="/change-password"||e==="/passkey/verify-authentication"||e==="/phone-otp/verify"||e==="/sign-up/email"||e.startsWith("/sign-in/")||e.startsWith("/two-factor/verify-")?be(t):t;return e==="/sign-up/email"&&!("sessionCreated"in i)&&(i={...i,sessionCreated:typeof t.token=="string"&&t.token.length>0}),(e==="/get-session"||e==="/passkey/verify-authentication")&&W(i.session)&&(i={...i,session:be(i.session)}),i}function be(e){if(!Object.hasOwn(e,"token"))return e;let t={...e};return delete t.token,t}function W(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}var We=["access","correction","portability","erasure","restriction","objection","consent_withdrawal"];function Ao(e){return e===void 0?[...We]:We.filter(t=>e.includes(t))}function Xe(e){return {listConsentPreferences:t=>e.request("/privacy/consent-decisions",{fetchOptions:t,decode:Kn}),recordConsent:(t,n)=>e.request("/privacy/consent-decisions",{method:"POST",body:{...t,correlationId:t.correlationId??a()},fetchOptions:n,decode:jn}),listRightsRequests:t=>e.request("/privacy/rights",{fetchOptions:t,decode:Gn}),createRightsRequest:(t,n)=>e.request("/privacy/rights",{method:"POST",body:t,fetchOptions:n,decode:Jn})}}function Kn(e){let t=r(e);return Array.isArray(t.preferences)||z(),{preferences:t.preferences.map(Bn)}}function Bn(e){let t=r(e);return {purposeId:s(t.purposeId),purposeVersionId:s(t.purposeVersionId),code:s(t.code),state:Wn(t.state,["granted","refused","withdrawn"]),updatedAt:se(t.updatedAt),decidedAt:se(t.decidedAt)}}function jn(e){let t=r(e);return t.recorded!==true&&z(),{recorded:true,decision:X(t.decision,["granted","refused","withdrawn"]),decidedAt:ue(t.decidedAt)}}function Gn(e){let t=r(e);return Array.isArray(t.requests)||z(),{requests:t.requests.map(Ye)}}function Jn(e){return {request:Ye(r(e).request)}}function Ye(e){let t=r(e);return {id:s(t.id),rightType:X(t.rightType,["access","correction","portability","erasure","restriction","objection","consent_withdrawal"]),state:X(t.state,["received","identity_pending","in_progress","restricted","completed","denied","withdrawn"]),locale:X(t.locale,["en","ar"]),receivedAt:ue(t.receivedAt),acknowledgedAt:se(t.acknowledgedAt),fulfilmentDeadline:ue(t.fulfilmentDeadline),completedAt:se(t.completedAt)}}function se(e){return e===null?null:ue(e)}function ue(e){if(e instanceof Date)return u(e);typeof e!="string"&&z();let t=new Date(e);return Number.isNaN(t.getTime())&&z(),t}function X(e,t){return (typeof e!="string"||!t.includes(e))&&z(),e}function Wn(e,t){return e===null?null:X(e,t)}function $e({http:e,probe:t,tokens:n,channelName:i}){let o=new Set,a=null,p=null,m=null,c=null,h=null,r=null,s,f=O=>{k(O);};s={data:null,isPending:true,isRefetching:false,error:null,refetch:f};function y(O){s=O;for(let v of o)v();}async function D(O){return e.request("/get-session",{query:O?.query,decode:Re})}function k(O){if(O?.query?.disableCookieCache===true)return g(O);if(c)return c;if(h)return h;let v=g(O).finally(()=>{h===v&&(h=null);});return h=v,v}function u(){if(c)return c;let O=g({query:{disableCookieCache:true}}).finally(()=>{c===O&&(c=null);});return c=O,O}async function g(O){m?.abort();let v=new AbortController;m=v,y({...s,isPending:s.data===null&&s.error===null,isRefetching:s.data!==null});let J=n.beginRead(),ne=await e.request("/get-session",{query:O?.query,fetchOptions:{signal:v.signal},decode:Re});if(m===v&&(m=null,y({data:ne.data,error:ne.error,isPending:false,isRefetching:false,refetch:f}),ne.error===null)){if(ne.data===null){J.endIfDead();return}await A(J);}}async function A(O){if(n.needsProbe()){if(!O.carriedToken){O.recordCookieVerdict(true);return}return r||C(O)}}function C(O){let v=t.request("/get-session",{query:{disableCookieCache:true},decode:Re}).then(J=>{r===v&&J.error===null&&O.recordCookieVerdict(J.data!==null);}).finally(()=>{r===v&&(r=null);});return r=v,v}function z(){a?.postMessage({type:"session-changed"});}function vn(){if(typeof window>"u"||p)return;let O=()=>{k();},v=()=>{document.visibilityState==="visible"&&k();};window.addEventListener("focus",O),document.addEventListener("visibilitychange",v),typeof BroadcastChannel<"u"&&(a=new BroadcastChannel(i),a.addEventListener("message",O)),p=()=>{window.removeEventListener("focus",O),document.removeEventListener("visibilitychange",v),a?.close(),a=null,p=null;};}function Tn(O){return o.add(O),o.size===1&&(vn(),k()),()=>{if(o.delete(O),o.size===0){let v=m;m=null,h=null,c=null,v?.abort(),p?.();}}}return n.measureWith(()=>{n.needsProbe()&&C(n.beginRead());}),{store:{subscribe:Tn,getSnapshot:()=>s,refresh:u},getSession:D,notifyMutation(){z(),r&&r.catch(()=>{}).then(()=>{!n.needsProbe()&&n.hasToken()&&z();}),o.size>0&&k({query:{disableCookieCache:true}});}}}function Re(e){if(e===null)return null;let t=r(e);return (t.session===void 0||t.user===void 0)&&z(),{session:y(t.session),user:x(t.user)}}async function Qe(e,t){return e.request("/user/metadata",{fetchOptions:t,decode:et})}async function Ze(e,t,n){return e.request("/user/metadata",{method:"PATCH",body:{expected_version:t.expectedVersion,unsafe_metadata:t.unsafeMetadata},fetchOptions:n,decode:et})}function et(e){let t=r(e),n=A(t.public_metadata),i=A(t.unsafe_metadata);if(!Number.isSafeInteger(t.metadata_version)||t.metadata_version<0)throw new TypeError("Invalid AuthOwl metadata response");return {publicMetadata:n,unsafeMetadata:i,metadataVersion:t.metadata_version}}function nt(e,t){let{post:n,mutation:i}=H(e,t);return {getMetadata:o=>Qe(e,o),updateUnsafeMetadata:(o,a)=>Ze(e,o,a),updateProfile:(o,a)=>i(n("/update-user",o,a,Y)),changeEmail:(o,a)=>i(n("/change-email",o,a,Y)),changePassword:(o,a)=>i(n("/change-password",o,a,Xn)),listSessions:o=>e.request("/list-sessions",{fetchOptions:o,decode:Yn}),revokeSession:({sessionId:o},a)=>i(n("/revoke-session",{sessionId:o},a,Y)),revokeOtherSessions:o=>i(n("/revoke-other-sessions",{},o,Y)),listSocialAccounts:async o=>{let a=await e.request("/list-accounts",{fetchOptions:o,decode:$n});if(!a.data)return {data:null,error:a.error};let p=a.data.length>1;return {...a,data:a.data.filter(m=>m.providerId!=="credential").map(m=>({...m,canUnlink:p}))}},linkSocial:(o,a)=>n("/link-social",o,a,Qn),unlinkSocial:(o,a)=>i(n("/unlink-account",o,a,Y)),delete:(o={},a)=>i(n("/delete-user",o,a,Zn))}}function Y(e){let t$1=r(e);return {status:t(t$1.status)}}function Xn(e){let t=r(e);return {user:x(t.user)}}function Yn(e){return Array.isArray(e)||z(),e.map(t=>{let n=r(t);return {id:s(n.id),userId:s(n.userId),createdAt:u(n.createdAt),updatedAt:u(n.updatedAt),expiresAt:u(n.expiresAt),...tt("ipAddress",w$1(n,"ipAddress")),...tt("userAgent",w$1(n,"userAgent"))}})}function $n(e){return Array.isArray(e)||z(),e.map(t=>{let n=r(t);return {id:s(n.id),userId:s(n.userId),providerId:s(n.providerId),accountId:s(n.accountId),scopes:v(n.scopes),createdAt:u(n.createdAt),updatedAt:u(n.updatedAt)}})}function Qn(e){let t$1=r(e);return {url:s(t$1.url),redirect:t(t$1.redirect)}}function Zn(e){let t$1=r(e);return {success:t(t$1.success),message:s(t$1.message)}}function tt(e,t){return t===void 0?{}:{[e]:t}}var ei=new Set(["pending","accepted","rejected","canceled"]),Ie=1e4;function it(e){let t=r(e);return t.recipientHint!==null&&t.recipientHint!=="new_user"&&z(),{recipientHint:t.recipientHint}}function K(e,t,n){let i=r(e),o={id:w(i.id),name:w(i.name),slug:w(i.slug),createdAt:u(i.createdAt),...$("logo",w$1(i,"logo")),...$("metadata",i.metadata===void 0?void 0:B$1(i.metadata))};return _(o.id,t),_(o.slug,n),o}function ot(e){return M(e,K)}function Se(e,t,n){return e===null?null:(t===null&&z(),K(e,t,n))}function rt(e,t,n){if(e===null)return null;let i=r(e),o=K(i,t,n);return {...o,members:M(i.members,a=>At(a,o.id)),invitations:M(i.invitations,a=>L(a,void 0,o.id))}}function ve(e,t,n=false){let i=M(e,o=>Q(o));return n||ee(i.map(o=>o.organizationId),t),i}function at(e,t){let n=M(e,i=>Te(i));return ee(n.map(i=>i.teamId),t),n}function Te(e,t,n){let i=r(e),o={id:w(i.id),teamId:w(i.teamId),userId:w(i.userId),createdAt:u(i.createdAt)};return _(o.teamId,t),_(o.userId,n),o}function st(e,t,n){return e===null?null:(t===null&&z(),Q(e,t,n))}function ut(e,t){let n=r(e);return (!Number.isSafeInteger(n.total)||n.total<0)&&z(),{members:ti(n.members,t),total:n.total}}function L(e,t,n){let i=r(e),o=w(i.status);ei.has(o)||z();let a={id:w(i.id),organizationId:w(i.organizationId),email:Z(i.email),role:w(i.role),status:o,inviterId:w(i.inviterId),expiresAt:u(i.expiresAt),createdAt:u(i.createdAt)};return _(a.id,t),_(a.organizationId,n),a}function ct(e,t){let n=M(e,i=>L(i));return ee(n.map(i=>i.organizationId),t),n}function dt(e){return M(e,t=>{let n=r(t);return {...L(n),organizationName:Z(n.organizationName)}})}function lt(e,t){let n=r(e);return {...L(n,t),organizationName:w(n.organizationName),organizationSlug:w(n.organizationSlug),inviterEmail:yt(n.inviterEmail)}}function pt(e,t){let n=r(e),i=L(n.invitation,t);return {invitation:i,member:B(n.member,void 0,i.organizationId)}}function gt(e,t){let n=r(e);return n.member!==null&&z(),{invitation:n.invitation===null?null:L(n.invitation,t),member:null}}function ft(e,t){return e===null?null:L(e,t)}function mt(e,t,n){let i=r(e);return {member:B(i.member,n,t)}}function B(e,t,n){let i=r(e),o={id:w(i.id),organizationId:w(i.organizationId),userId:w(i.userId),role:w(i.role),createdAt:u(i.createdAt),...i.user===void 0?{}:{user:Ot(i.user)}};return _(o.id,t),_(o.organizationId,n),o}function ht(e,t){let n=M(e,i=>{let o=r(i);return {organizationId:w(o.organizationId),data:{role:w(o.role),...$("permission",o.permission===void 0?void 0:ni(o.permission)),...$("customPermissionKeys",o.customPermissionKeys===void 0?void 0:v(o.customPermissionKeys))}}});return ee(n.map(i=>i.organizationId),t),n.map(i=>i.data)}function Q(e,t,n){let i=r(e),o=i.updatedAt,a={id:w(i.id),name:Z(i.name),organizationId:w(i.organizationId),createdAt:u(i.createdAt),...o===void 0?{}:{updatedAt:u(o)}};return _(a.id,t),_(a.organizationId,n),a}function Pe(e){let t=r(e);return {message:Z(t.message)}}function At(e,t){let n=r(e);return {...B(n,void 0,t),user:Ot(n.user)}}function ti(e,t){let n=M(e,i=>At(i));return ee(n.map(i=>i.organizationId),t),n}function ni(e){let t=r(e),n={};for(let[i,o]of Object.entries(t))(i==="__proto__"||i==="constructor"||i==="prototype"||i.length===0||i.length>Ie||!Array.isArray(o))&&z(),n[i]=o.map(a=>w(a));return n}function w(e){let t=s(e);return (t.length===0||t.length>Ie)&&z(),t}function Z(e){if(e==null)return "";let t=s(e);return t.length>Ie&&z(),t}function yt(e){return e===null?null:w(e)}function _(e,t){t!==void 0&&e!==t&&z();}function ee(e,t){let n=t??e[0];n!==void 0&&e.some(i=>i!==n)&&z();}function Ot(e){let t=r(e);return {id:w(t.id),name:Z(t.name),email:yt(t.email),...$("image",w$1(t,"image"))}}function M(e,t){return Array.isArray(e)||z(),e.map(n=>t(n))}function $(e,t){return t===void 0?{}:{[e]:t}}function bt(e,t,n=()=>null){let{post:i,mutation:o}=H(e,t),a=new Set,p=()=>{for(let r of a)try{r();}catch{}},m=new Map,c=(r,s,f,y)=>{if(f)return e.request(r,{query:s,fetchOptions:f,decode:y});let D=`${r}\0${JSON.stringify(s??null)}`,k=m.get(D);if(k)return k;let u=e.request(r,{query:s,decode:y}).finally(()=>{m.delete(D);});return m.set(D,u),u},h=async r=>{let s=await o(r).finally(()=>m.clear());return s.error===null&&p(),s};return {subscribe(r){return a.add(r),()=>a.delete(r)},create:(r,s)=>h(i("/organization/create",r,s,K)),list:r=>c("/organization/list",void 0,r,ot),get:(r={},s)=>c("/organization/get-full-organization",{organizationId:r.organizationId,organizationSlug:r.organizationSlug,membersLimit:r.membersLimit},s,f=>rt(f,r.organizationId,r.organizationSlug)),setActive:(r,s)=>h(i("/organization/set-active",r,s,f=>Se(f,r.organizationId,r.organizationSlug))),createTeam:(r,s)=>h(i("/organization/create-team",r,s,f=>Q(f,void 0,r.organizationId))),listTeams:(r={},s)=>c("/organization/list-teams",{organizationId:r.organizationId},s,f=>ve(f,r.organizationId)),updateTeam:(r,s)=>h(i("/organization/update-team",r,s,f=>Q(f,r.teamId,r.data.organizationId))),removeTeam:(r,s)=>h(i("/organization/remove-team",r,s,Pe)),listUserTeams:r=>c("/organization/list-user-teams",void 0,r,s=>ve(s,void 0,true)),listTeamMembers:(r={},s)=>c("/organization/list-team-members",{teamId:r.teamId},s,f=>at(f,r.teamId)),addTeamMember:(r,s)=>h(i("/organization/add-team-member",r,s,f=>Te(f,r.teamId,r.userId))),removeTeamMember:(r,s)=>h(i("/organization/remove-team-member",r,s,Pe)),setActiveTeam:(r,s)=>h(i("/organization/set-active-team",r,s,f=>st(f,r.teamId))),update:(r,s)=>h(i("/organization/update",r,s,f=>Se(f,r.organizationId))),delete:(r,s)=>h(i("/organization/delete",r,s,f=>K(f,r.organizationId))),listMembers:(r={},s)=>c("/organization/list-members",{organizationId:r.organizationId,organizationSlug:r.organizationSlug,limit:r.limit,offset:r.offset,sortBy:r.sortBy,sortDirection:r.sortDirection,filterField:r.filterField,filterValue:r.filterValue,filterOperator:r.filterOperator},s,f=>ut(f,r.organizationId)),inviteMember:(r,s)=>h(i("/organization/invite-member",r,s,f=>L(f,void 0,r.organizationId))),listInvitations:(r={},s)=>c("/organization/list-invitations",{organizationId:r.organizationId},s,f=>ct(f,r.organizationId)),listUserInvitations:r=>c("/organization/list-user-invitations",void 0,r,dt),getInvitation:(r,s)=>c("/organization/get-invitation",{id:r.id},s,f=>lt(f,r.id)),getInvitationRecipientHint:(r,s)=>c("/organization/invitation-recipient-hint",{invitationId:r.invitationId},s,it),acceptInvitation:(r,s)=>h(i("/organization/accept-invitation",r,s,f=>pt(f,r.invitationId))),rejectInvitation:(r,s)=>h(i("/organization/reject-invitation",r,s,f=>gt(f,r.invitationId))),cancelInvitation:(r,s)=>h(i("/organization/cancel-invitation",r,s,f=>ft(f,r.invitationId))),removeMember:(r,s)=>h(i("/organization/remove-member",r,s,f=>mt(f,r.organizationId,r.memberIdOrEmail.includes("@")?void 0:r.memberIdOrEmail))),updateMemberRole:(r,s)=>h(i("/organization/update-member-role",r,s,f=>B(f,r.memberId,r.organizationId))),leave:(r,s)=>h(i("/organization/leave",r,s,f=>B(f,void 0,r.organizationId))),listRoles:(r={},s)=>c("/organization/list-roles",{organizationId:r.organizationId},s,f=>ht(f,r.organizationId)),has:r=>F$1(n(),r),hasPermission:r=>C(n(),r.permission)}}var wt=4096,ii=4096,oi=100,ri=256,ai=16,si=64,ui=12;function De(e){let t$1=r(e);return t$1.twoFactorRedirect===true?((t$1.user!==void 0||t$1.redirect!==void 0||t$1.url!==void 0)&&z(),{twoFactorRedirect:true,...t$1.twoFactorMethods===void 0?{}:{twoFactorMethods:Ft(t$1.twoFactorMethods,ai,si)}}):(t$1.twoFactorRedirect!==void 0&&z(),{redirect:t(t$1.redirect),...gi(t$1,"url"),user:x(t$1.user)})}function kt(e){let t=r(e);return {user:x(t.user)}}function Rt(e){let t$1=r(e);return {sessionCreated:t(t$1.sessionCreated),user:x(t$1.user)}}function It(e,t$1){let n=r(e),i=t(n.redirect);n.user===null&&z();let o=n.user!==void 0&&n.user!==null,a=n.url!==void 0&&n.url!==null;return i?((o||!a)&&z(),{redirect:true,url:Ce(n.url,t$1)}):(o===a&&z(),o?{redirect:false,user:x(n.user)}:{redirect:false,url:Ce(n.url,t$1)})}function St(e,t){let n=r(e);return (n.redirect!==true||n.user!==void 0)&&z(),{redirect:true,url:Ce(n.url,t)}}function vt(e){return {status:t(r(e).status)}}function Tt(e){return {success:t(r(e).success)}}function Pt(e){return r(e).status!=="pending"&&z(),{status:"pending"}}function Ct(e){let t$1=r(e);if(t$1.kind==="authowl_turnstile")return {kind:"authowl_turnstile"};t$1.kind!=="akedly_shield_v1_2"&&z();let n=r(t$1.turnstile),i=n.siteKey===null?null:s(n.siteKey);return {kind:"akedly_shield_v1_2",connectionId:s(t$1.connectionId),challenge:s(t$1.challenge),difficulty:ci(t$1.difficulty),challengeToken:s(t$1.challengeToken),challengeRequired:t(t$1.challengeRequired),turnstile:{required:t(n.required),siteKey:i}}}function ci(e){return (!Number.isSafeInteger(e)||Number(e)<0||Number(e)>ui)&&z(),Number(e)}function Dt(e){let t=r(e);return (t.status!==true||t.sessionCreated!==true)&&z(),{status:true,sessionCreated:true,user:di(t.user)}}function ze(e){return {status:t(r(e).status)}}function zt(e){return {status:t(r(e).status)}}function xt(e){let t$1=r(e);return {status:t(t$1.status),user:x(t$1.user)}}function Et(e){return {success:t(r(e).success)}}function Nt(e){let t=r(e);return {totpURI:pi(t.totpURI),backupCodes:Lt(t.backupCodes)}}function _t(e){return {status:t(r(e).status)}}function ce(e){return r(e).status!==true&&z(),{status:true}}function Ut(e){return {status:t(r(e).status)}}function Mt(e){let t=r(e);return t.status!==void 0&&t.status!==true&&z(),{backupCodes:Lt(t.backupCodes)}}function di(e){let t$1=r(e);return {id:j(t$1.id,512),...fi(t$1,"name",1024),phoneNumber:j(t$1.phoneNumber,64),phoneNumberVerified:t(t$1.phoneNumberVerified),...t$1.createdAt===void 0?{}:{createdAt:u(t$1.createdAt)},...t$1.updatedAt===void 0?{}:{updatedAt:u(t$1.updatedAt)}}}function Ce(e,t){let n=j(e,wt);/[\u0000-\u0020\u007f]/u.test(n)&&z();let i;try{i=new URL(n);}catch{return z()}return (i.username||i.password)&&z(),i.protocol==="https:"||t&&i.protocol==="http:"&&li(i.hostname)?i.href:z()}function li(e){let t=e.toLowerCase();return t==="localhost"||t==="127.0.0.1"||t==="[::1]"}function pi(e){let t=j(e,ii),n;try{n=new URL(t);}catch{return z()}let i=n.searchParams.get("secret");return (n.protocol!=="otpauth:"||n.hostname.toLowerCase()!=="totp"||n.username||n.password||n.hash||i===null||i.length===0||i.length>512||/\s/u.test(i))&&z(),t}function Lt(e){return Ft(e,oi,ri)}function Ft(e,t,n){(!Array.isArray(e)||e.length===0||e.length>t)&&z();let i=e.map(o=>j(o,n));return i.some(o=>o.trim().length===0)&&z(),new Set(i).size!==i.length&&z(),i}function j(e,t){let n=s(e);return (n.length===0||n.length>t)&&z(),n}function gi(e,t){let n=e[t];return n==null?{}:{[t]:j(n,wt)}}function fi(e,t,n){let i=w$1(e,t);return i===void 0?{}:(i!==null&&i.length>n&&z(),{[t]:i})}var qt=new Set([1564,8206,8207,8234,8235,8236,8237,8238,8294,8295,8296,8297]),de=new Set([9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279]);function le(e){if(e===void 0)return {valid:true,value:void 0};for(let n of e){let i=n.codePointAt(0);if(i===void 0||Vt(n,i)||Ht(i)||qt.has(i))return {valid:false}}let t=mi(e);return xe(t)?{valid:true,value:t}:{valid:false}}function xe(e){let t=0,n,i;for(let o of e){if(t+=1,t>256)return false;let a=o.codePointAt(0);if(a===void 0||Vt(o,a)||Ht(a)||qt.has(a))return false;n??=a,i=a;}return t>0&&n!==void 0&&i!==void 0&&!de.has(n)&&!de.has(i)}function pe(){return {data:null,error:{status:400,statusText:"BAD_REQUEST",code:"INVALID_PASSKEY_NAME",message:"Passkey names must contain 1 to 256 safe Unicode characters."}}}function mi(e){let t=0,n=e.length;for(;t<n;){let i=e.codePointAt(t);if(i===void 0||!de.has(i))break;t+=i>65535?2:1;}for(;n>t;){let i=e.codePointAt(n-1);if(i===void 0)break;let a=i>=56320&&i<=57343?n-2:n-1,p=e.codePointAt(a);if(p===void 0||!de.has(p))break;n=a;}return e.slice(t,n)}function Ht(e){return e>=0&&e<=31||e>=127&&e<=159}function Vt(e,t){return e.length===1&&t>=55296&&t<=57343}var jt=12,Gt=5e3,hi=8,Ai=1e3,yi=16,Kt=512,Jt=100,Wt=8192,Oi=32768,Ee=1024,Bt=256,_e=64,bi=6e5,wi=/^[A-Za-z0-9_-]+$/u,ki=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/u,Ri=/[\u0000-\u001f\u007f-\u009f\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/u,Ii=/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$/u,Si=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu,Xt=new Set(["discouraged","preferred","required"]),vi=new Set(["singleDevice","multiDevice"]),Yt=new Set(["ble","cable","hybrid","internal","nfc","smart-card","usb"]),$t=new Set(["hybrid","security-key","client-device"]),Ti=new Set(["none","indirect","direct","enterprise"]),Pi=new Set(["fido-u2f","packed","android-safetynet","android-key","tpm","apple","none"]),Ci=new Set(["platform","cross-platform"]),Di=new Set(["discouraged","preferred","required"]),zi=new Set([-8,-7,-257]);function Qt(e){let t=A(e,jt,Gt);return {challenge:cn(t.challenge),...T("timeout",sn(t.timeout)),...T("rpId",dn(t.rpId)),...T("allowCredentials",an(t.allowCredentials)),...T("userVerification",te(t.userVerification,Xt)),...T("hints",ge(t.hints,$t)),...T("extensions",un(t.extensions))}}function Zt(e){let t=A(e,jt,Gt);return {challenge:cn(t.challenge),rp:xi(t.rp),user:Ei(t.user),pubKeyCredParams:Ni(t.pubKeyCredParams),...T("timeout",sn(t.timeout)),...T("excludeCredentials",an(t.excludeCredentials)),...T("authenticatorSelection",_i(t.authenticatorSelection)),...T("attestation",te(t.attestation,Ti)),...T("attestationFormats",ge(t.attestationFormats,Pi)),...T("hints",ge(t.hints,$t)),...T("extensions",un(t.extensions))}}function en(e){let t=r(e),n=y(t.session),i=x(t.user);return n.userId!==i.id&&z(),{session:n,user:i}}function Ue(e){let t$1=r(e),n=t$1.counter;(!Number.isSafeInteger(n)||n<0)&&z();let i=Me(t$1.deviceType,vi),o=t(t$1.backedUp);return o&&i!=="multiDevice"&&z(),{id:G(t$1.id,Bt),...Li(t$1),publicKey:Ui(t$1.publicKey,Oi),userId:G(t$1.userId,Bt),credentialID:me(t$1.credentialID,Wt),counter:n,deviceType:i,backedUp:o,...Fi(t$1),createdAt:u(t$1.createdAt),...qi(t$1)}}function tn(e,t,n){let i=Ue(e);return (i.credentialID!==t||(n===void 0?i.name!==void 0&&i.name!==null:i.name!==n))&&z(),i}function nn(e){(!Array.isArray(e)||e.length>Jt)&&z();let t=e.map(Ue);return fe(t.map(n=>n.id)),fe(t.map(n=>n.credentialID)),t.length>1&&t.some(n=>n.userId!==t[0]?.userId)&&z(),t}function on(e,t,n){let i=r(e),o=Ue(i.passkey);return (o.id!==t||o.name!==n)&&z(),{passkey:o}}function rn(e){return r(e).status!==true&&z(),{status:true}}function xi(e){let t=r(e);return {name:Ne(t.name,Ee),...T("id",dn(t.id))}}function Ei(e){let t=r(e);return {id:me(t.id,128,1,64),name:Ne(t.name,Ee),displayName:Ne(t.displayName,Ee)}}function Ni(e){(!Array.isArray(e)||e.length===0||e.length>_e)&&z();let t=e.map(n=>{let i=r(n);return (i.type!=="public-key"||!Number.isSafeInteger(i.alg)||!zi.has(i.alg))&&z(),{type:"public-key",alg:i.alg}});return Hi(t.map(n=>n.alg)),t}function an(e){if(e===void 0)return;(!Array.isArray(e)||e.length>Jt)&&z();let t=e.map(n=>{let i=r(n);return i.type!=="public-key"&&z(),{type:"public-key",id:me(i.id,Wt),...T("transports",ge(i.transports,Yt))}});return fe(t.map(n=>n.id)),t}function _i(e){if(e===void 0)return;let t=r(e);t.requireResidentKey!==void 0&&typeof t.requireResidentKey!="boolean"&&z();let n=te(t.residentKey,Di);return t.requireResidentKey!==void 0&&n!==void 0&&t.requireResidentKey!==(n==="required")&&z(),{...T("authenticatorAttachment",te(t.authenticatorAttachment,Ci)),...T("residentKey",n),...T("requireResidentKey",t.requireResidentKey),...T("userVerification",te(t.userVerification,Xt))}}function sn(e){return e!==void 0&&(typeof e!="number"||!Number.isFinite(e)||e<0||e>bi)&&z(),e}function un(e){return e===void 0?void 0:A(e,hi,Ai)}function ge(e,t){if(e===void 0)return;(!Array.isArray(e)||e.length>_e)&&z();let n=e.map(i=>Me(i,t));return fe(n),n}function te(e,t){if(e!==void 0)return Me(e,t)}function cn(e){return me(e,Math.ceil(Kt*4/3),yi,Kt)}function me(e,t,n=1,i=Number.POSITIVE_INFINITY){let o=G(e,t),a=o.length%4,p=Mi(o.at(-1)??""),m=Math.floor(o.length*3/4);return (!wi.test(o)||a===1||a===2&&(p&15)!==0||a===3&&(p&3)!==0||m<n||m>i)&&z(),o}function G(e,t){let n=s(e);return (n.length===0||n.length>t)&&z(),n}function Ne(e,t){let n=G(e,t);return Ri.test(n)&&z(),n}function dn(e){if(e===void 0)return;let t=G(e,253);return t!=="localhost"&&(t.endsWith(".")||!t.includes(".")||t.split(".").some(n=>!Ii.test(n)))&&z(),t}function Ui(e,t){let n=G(e,t),i=n.endsWith("=="),o=!i&&n.endsWith("="),a=n.at(i?-3:o?-2:-1)??"",p=ln(a);return (n.length%4!==0||!ki.test(n)||i&&(p&15)!==0||o&&(p&3)!==0)&&z(),n}function Mi(e){return ln(e,true)}function ln(e,t=false){return (t?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").indexOf(e)}function Li(e){let t=w$1(e,"name");return t===void 0?{}:(t!==null&&!xe(t)&&z(),{name:t})}function Fi(e){let t=w$1(e,"transports");if(t==null||t==="")return t===void 0?{}:{transports:t};let n=t.split(",");return (n.length>_e||n.some(i=>!Yt.has(i))||new Set(n).size!==n.length)&&z(),{transports:t}}function qi(e){let t=w$1(e,"aaguid");return t==null?t===void 0?{}:{aaguid:null}:(Si.test(t)||z(),{aaguid:t})}function Me(e,t){let n=s(e);return t.has(n)||z(),n}function T(e,t){return t===void 0?{}:{[e]:t}}function fe(e){new Set(e).size!==e.length&&z();}function Hi(e){new Set(e).size!==e.length&&z();}function Vi(e,t){if(!t)return e;let n=t.catch(()=>{});return n.then(()=>{n=null;}),{async request(i,o){return n&&await n,e.request(i,o)}}}var pn=new Map;function Ki(e,t,n){let i=pn.get(n);if(!i){let o=new URLSearchParams(window.location.hash.slice(1)).get("authowl_code");if(!o)return;i=import('./session-handoff-ICVIFI3C.js').then(a=>a.completeCrossSiteSignIn(e,t,o)),pn.set(n,i);}return i}function gn(e){return !a$1()||e.idToken||e.disableRedirect?"legacy":"first-party"}function Bi(e,t=()=>{},n=Ji){let i=ke(e),o=e.session.tokens,a$2=a$1()?Ki(i,e.session,e.decoded.projectId):void 0,p=Vi(i,a$2),m=$e({http:p,probe:ke({...e,fetch:e.session.probe}),tokens:o,channelName:`authowl:${e.decoded.projectId}`});e.session.integration?.connect({authenticatedFetch:e.fetch,sessionStore:m.store,subscribeLifecycle:u=>o.subscribeLifecycle(u)});let c=()=>{m.notifyMutation(),t();},h=async()=>{await e.session.integration?.sessionEstablished(),c();},r=n(p,h),{post:s,mutation:f}=H(p,c),{mutation:y}=H(p,h),D=e.decoded.env==="test",k=u=>e.session.prepareSession({remember:u?.rememberMe!==false});return {sessionStore:m.store,getSession:m.getSession,account:nt(p,c),organization:bt(p,c,()=>m.store.getSnapshot().data?.session.membership??null),privacy:Xe(p),signIn:{email:async(u,g)=>(await k(u),y(s("/sign-in/email",u,g,De),A=>!("twoFactorRedirect"in A))),username:async(u,g)=>(await k(u),y(s("/sign-in/username",u,g,De),A=>!("twoFactorRedirect"in A))),social:async(u,g)=>{if(await k(),gn(u)==="first-party"){let{beginCrossSiteSignIn:C}=await import('./session-handoff-ICVIFI3C.js'),z=await C(e,{kind:"social",provider:u.provider,callbackURL:u.callbackURL,errorCallbackURL:u.errorCallbackURL,newUserCallbackURL:u.newUserCallbackURL,scopes:u.scopes,loginHint:u.loginHint,requestSignUp:u.requestSignUp});if(z)return window.location.assign(z),{data:{redirect:true,url:z},error:null}}let A=await y(s("/sign-in/social",u,g,C=>It(C,D)),C=>"user"in C);return A.error!==null||A.data===null||"url"in A.data&&A.data.redirect&&!u.disableRedirect&&typeof window<"u"&&window.location.assign(A.data.url),A},sso:async(u,g)=>{if(gn(u)==="first-party"){let{beginCrossSiteSignIn:C}=await import('./session-handoff-ICVIFI3C.js'),z=await C(e,{kind:"sso",email:u.email,providerId:u.providerId,domain:u.domain,organizationSlug:u.organizationSlug,callbackURL:u.callbackURL,errorCallbackURL:u.errorCallbackURL,newUserCallbackURL:u.newUserCallbackURL});if(z)return window.location.assign(z),{data:{url:z,redirect:true},error:null}}let A=await s("/sign-in/sso",u,g,C=>St(C,D));return A.error!==null||A.data===null||typeof window<"u"&&window.location.assign(A.data.url),A},magicLink:(u,g)=>s("/sign-in/magic-link",u,g,vt),emailOtp:async(u,g)=>(await k(),y(s("/sign-in/email-otp",u,g,kt))),passkey:async(u,g)=>(await k(),r.signIn(u,g))},signUp:{email:async(u,g)=>(await k(),y(s("/sign-up/email",u,g,Rt),A=>A.sessionCreated))},emailOtp:{sendVerificationOtp:(u,g)=>s("/email-otp/send-verification-otp",u,g,Tt),verifyEmail:async(u,g)=>(await k(),y(s("/email-otp/verify-email",u,g,xt)))},phoneOtp:{prepare:u=>s("/phone-otp/challenge",{},u,Ct),start:(u,g)=>s("/phone-otp/start",{...u,idempotencyKey:u.idempotencyKey??a()},g,Pt),verify:async(u,g)=>(await k(),y(s("/phone-otp/verify",u,g,Dt)))},requestPasswordReset:(u,g)=>s("/request-password-reset",u,g,ze),resetPassword:(u,g)=>s("/reset-password",u,g,ze),sendVerificationEmail:(u,g)=>s("/send-verification-email",u,g,zt),passkey:{addPasskey:(u,g)=>r.add(u,g),listUserPasskeys:()=>p.request("/passkey/list-user-passkeys",{decode:nn}),updatePasskey:async(u,g)=>{let A=le(u.name);if(!A.valid||A.value===void 0)return pe();let C=A.value;return s("/passkey/update-passkey",{...u,name:C},g,z=>on(z,u.id,C))},deletePasskey:(u,g)=>s("/passkey/delete-passkey",u,g,rn)},twoFactor:{enable:(u,g)=>s("/two-factor/enable",u,g,Nt),disable:(u,g)=>f(s("/two-factor/disable",u,g,_t),A=>A.status),verifyTotp:(u,g)=>y(s("/two-factor/verify-totp",u,g,ce)),verifyBackupCode:(u,g)=>y(s("/two-factor/verify-backup-code",u,g,ce)),sendOtp:(u={},g)=>s("/two-factor/send-otp",u,g,Ut),verifyOtp:(u,g)=>y(s("/two-factor/verify-otp",u,g,ce)),generateBackupCodes:(u,g)=>s("/two-factor/generate-backup-codes",u,g,Mt)},signOut:u=>f(p.request("/sign-out",{method:"POST",body:{},fetchOptions:u,decode:Et}).then(g=>(o.endSession(),e.session.integration?.sessionEnded().then(()=>g)??g)),g=>g.success)}}function Xo(e,t=()=>{},n){let i=Bi(e,t,n);return n?{...i,signIn:{email:i.signIn.email,username:i.signIn.username,social:fn(i),magicLink:i.signIn.magicLink,emailOtp:i.signIn.emailOtp,passkey:i.signIn.passkey},passkey:{listUserPasskeys:i.passkey.listUserPasskeys,updatePasskey:i.passkey.updatePasskey,deletePasskey:i.passkey.deletePasskey,addPasskey:i.passkey.addPasskey}}:{...i,signIn:{email:i.signIn.email,username:i.signIn.username,social:fn(i),magicLink:i.signIn.magicLink,emailOtp:i.signIn.emailOtp},passkey:{listUserPasskeys:i.passkey.listUserPasskeys,updatePasskey:i.passkey.updatePasskey,deletePasskey:i.passkey.deletePasskey}}}function fn(e){return async(t,n)=>{if(!t?.idToken||typeof t.idToken.token!="string"||t.idToken.token==="")return ji();let i=await e.signIn.social({...t,disableRedirect:true},n);return i.data!==null&&"url"in i.data?Gi():i}}function ji(){return Promise.resolve({data:null,error:{status:400,statusText:"BAD_REQUEST",code:"NATIVE_SOCIAL_ID_TOKEN_REQUIRED",message:"Native social sign-in requires a provider ID token."}})}function Gi(){return Promise.resolve({data:null,error:{status:502,statusText:"BAD_GATEWAY",code:"INVALID_NATIVE_SOCIAL_RESPONSE",message:"The server returned a redirect for native ID-token sign-in."}})}function Ji(){return {signIn:()=>mn(),add:()=>mn()}}function mn(){return Promise.resolve({data:null,error:{status:400,statusText:"BAD_REQUEST",code:"PASSKEY_BROWSER_REQUIRED",message:"This passkey ceremony requires a browser with WebAuthn."}})}function Zo(e,t,n){let i=new Map;return {async signIn(o={},a){let p=await e.request("/passkey/generate-authenticate-options");if(!p.data)return yn(p.error);let m;try{m=Qt(p.data);}catch{return hn()}let c;try{c=await n.authenticate({optionsJSON:m,useBrowserAutofill:o.autoFill});}catch(y){return On(n,y,"AUTH_CANCELLED","Passkey authentication was cancelled.")}if(!Wi(c))return An();let{clientExtensionResults:h,...r}=c,s=i.get(c.id);if(s)return s;let f=(async()=>{let y=await e.request("/passkey/verify-authentication",{method:"POST",body:{response:r},fetchOptions:a,decode:en});return y.data&&await t(),y})();i.set(c.id,f);try{return await f}finally{i.get(c.id)===f&&i.delete(c.id);}},async add(o={},a){let p=le(o.name);if(!p.valid)return pe();let m=await e.request("/passkey/generate-register-options",{query:{name:p.value,authenticatorAttachment:o.authenticatorAttachment}});if(!m.data)return yn(m.error);let c;try{c=Zt(m.data);}catch{return hn()}let h;try{h=await n.register({optionsJSON:c});}catch(y){return On(n,y,"REGISTRATION_CANCELLED","Passkey registration was cancelled.")}if(!Xi(h))return An();let{clientExtensionResults:r,...s}=h,f=await e.request("/passkey/verify-registration",{method:"POST",body:{response:s,name:p.value},fetchOptions:a,decode:y=>tn(y,h.id,p.value)});return f.data&&t(),f}}}function hn(){return {data:null,error:{status:502,statusText:"BAD_GATEWAY",code:"INVALID_WEBAUTHN_OPTIONS",message:"The server returned invalid WebAuthn options."}}}function An(){return {data:null,error:{status:400,statusText:"BAD_REQUEST",code:"INVALID_WEBAUTHN_RESPONSE",message:"The platform returned an invalid passkey response."}}}function wn(e){if(!e||typeof e!="object")return false;let t=e;return typeof t.id=="string"&&t.id.length>0&&typeof t.rawId=="string"&&t.rawId.length>0&&t.type==="public-key"&&!!t.response&&typeof t.response=="object"}function Wi(e){if(!wn(e))return false;let t=e.response;return typeof t.clientDataJSON=="string"&&typeof t.authenticatorData=="string"&&typeof t.signature=="string"&&(t.userHandle===void 0||typeof t.userHandle=="string")}function Xi(e){if(!wn(e))return false;let t=e.response;return typeof t.clientDataJSON=="string"&&typeof t.attestationObject=="string"}function yn(e){return {data:null,error:e??{status:502,statusText:"BAD_GATEWAY",code:"INVALID_WEBAUTHN_OPTIONS",message:"The server returned no WebAuthn options."}}}function On(e,t,n,i){let o=$i(t,"page does not have focus"),a=e.errorCode?.(t),p=a!==void 0?a==="ERROR_CEREMONY_ABORTED":bn(t)==="AbortError",m=n!=="AUTH_CANCELLED",c=Yi(a,bn(t),m);return {data:null,error:{status:400,statusText:"BAD_REQUEST",code:o?"PASSKEY_PAGE_NOT_FOCUSED":p?n:a??"PASSKEY_BROWSER_ERROR",message:o?"Keep this page focused while completing the passkey prompt.":p?i:c}}}function Yi(e,t,n){switch(e){case "ERROR_INVALID_DOMAIN":case "ERROR_INVALID_RP_ID":return "Passkeys are not set up for this site\u2019s domain.";case "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED":return "This device already has a passkey for this account.";case "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEY_ALGS":case "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT":case "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT":return "This device cannot create a passkey for this site.";}return t==="NotAllowedError"?n?"No passkey was created. The prompt was dismissed or timed out.":"No passkey was used. This device may not have one saved for this site yet, or the prompt was dismissed.":t==="SecurityError"?"Passkeys are not set up for this site\u2019s domain.":n?"Passkey registration did not complete.":"Passkey sign-in did not complete."}function bn(e){return e&&typeof e=="object"&&"name"in e&&typeof e.name=="string"?e.name:void 0}function $i(e,t){let n=t.toLowerCase(),i=new Set,o=e;for(;o&&typeof o=="object"&&!i.has(o);){if(i.add(o),"message"in o&&typeof o.message=="string"&&o.message.toLowerCase().includes(n))return true;o="cause"in o?o.cause:void 0;}return false}async function ir(e){let t=`${e.apiUrl}/api/projects/${e.decoded.projectId}/public-config`;return Be(await ae(e,t,{init:{method:"GET",credentials:"omit"},maxResponseBytes:256*1024,decode:n=>Qi(n,e)}),"public-config")}function Qi(e,t){let n=A(e),i=n.environmentId,o=n.environmentType,a=`${t.apiUrl}/api/projects/${t.decoded.projectId}/auth`;if(typeof n.applicationId!="string"||!Le(n.applicationId)||i!==t.decoded.projectId||o!=="development"&&o!=="production"||n.authBaseUrl!==a)throw P();let p=R(n.branding),m=R(n.legal);if(!V(n.enabledMethods,64)||!V(n.socialProviders,64)||!Sn(p,["appName","logoUrl","primaryColor"])||p.showAppName!==void 0&&typeof p.showAppName!="boolean"||p.alignment!==void 0&&p.alignment!=="left"&&p.alignment!=="center"&&p.alignment!=="right"||p.theme!==void 0&&p.theme!=="light"&&p.theme!=="dark"&&p.theme!=="system"||!Sn(m,["termsUrl","privacyUrl"])||!Number.isSafeInteger(m.version)||m.version<0||typeof m.required!="boolean")throw P();if(n.socialProviderClientIds!==void 0){let c=R(n.socialProviderClientIds);if(Object.keys(c).length>64||Object.values(c).some(h=>typeof h!="string"||h.length>2048))throw P()}if(!F(n,["requireEmailVerification","twoFactor","mfaRequired","accountDeletion","organizations","sso","badge"])||!kn(n.turnstileSiteKey)||!kn(n.authTurnstileSiteKey)||typeof n.locale!="string"||n.locale.length===0||n.locale.length>64||!Number.isSafeInteger(n.configVersion)||n.configVersion<0)throw P();if(n.jwtIssuer!==null){let c=R(n.jwtIssuer),h=new URL(c.issuer),r=`${h.origin}/api/projects/${t.decoded.projectId}/auth`;if(c.issuer!==r||c.jwksUrl!==`${r}/jwks`||c.aud!==t.decoded.projectId||h.protocol!=="https:"&&h.origin!==t.apiUrl)throw P()}if(n.signUp!==void 0){let c=R(n.signUp).mode;if(typeof c!="string"||!["open","restricted","allowlist","waitlist"].includes(c))throw P()}if(n.authentication!==void 0&&Zi(n.authentication),n.privacy!==void 0&&eo(n.privacy),n.emailVerification!==void 0){let c=R(n.emailVerification);if(!F(c,["required"])||c.method!=="link"&&c.method!=="code")throw P()}if(n.userModel!==void 0&&!F(R(n.userModel),["requireEmail","firstLastName","emailChange","accountDeletion"]))throw P();if(n.mfa!==void 0){let c=R(n.mfa);if(!F(c,["totp","required","backupCodes"])||c.emailOtpFallback!==void 0&&typeof c.emailOtpFallback!="boolean"||c.trustDevice!==void 0&&typeof c.trustDevice!="boolean"||(c.required===true||c.backupCodes===true)&&c.totp!==true)throw P()}if(n.captcha===void 0||n.captcha===null)n.captcha=typeof n.authTurnstileSiteKey=="string"&&n.authTurnstileSiteKey.length>0?{provider:"turnstile",siteKey:n.authTurnstileSiteKey}:null;else {let c=R(n.captcha);if(typeof c.provider!="string"||c.provider.length===0||c.provider.length>64||typeof c.siteKey!="string"||c.siteKey.length===0||c.siteKey.length>512)throw P();n.captcha={provider:c.provider,siteKey:c.siteKey};}if(n.privacy!==void 0&&n.privacy!==null){let c=R(n.privacy);c.availableRightTypes!==void 0&&(c.availableRightTypes=no(c.availableRightTypes));}return n}function Le(e){return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function P(){return new TypeError("public-config returned an invalid response")}function R(e){if(!e||typeof e!="object"||Array.isArray(e))throw P();return e}function kn(e){return e===null||typeof e=="string"&&e.length<=4096}function Zi(e){let t=R(e),n=R(t.email),i=R(t.password),o=i.minLength!==void 0||i.maxLength!==void 0;if(!F(n,["signUp"])||!V(n.signIn,3)||n.signIn.some(a=>a!=="password"&&a!=="magic_link"&&a!=="email_otp")||!F(R(t.phone),["signUp","signIn"])||!F(i,["signUp","add"])||o&&(!Number.isSafeInteger(i.minLength)||!Number.isSafeInteger(i.maxLength)||i.minLength<1||i.maxLength>4096||i.minLength>i.maxLength)||!F(R(t.passkey),["signIn","add"])||!to(R(t.passkey).relyingPartyId)||!F(R(t.username),["collectOnSignUp","signIn"]))throw P()}function eo(e){let t=R(e);if(!Array.isArray(t.notices)||!Array.isArray(t.consentPurposes)||t.notices.length>64||t.consentPurposes.length>64)throw P();for(let n of t.notices){let i=R(n);if(Rn(i,"noticeId","noticeVersionId"),he(i.title,512),he(i.body,1e5),In(i.digest),!V(i.activityCodes,128)||!V(i.purposeCodes,128)||typeof i.effectiveFrom!="string"||!Number.isFinite(Date.parse(i.effectiveFrom)))throw P()}for(let n of t.consentPurposes){let i=R(n);if(Rn(i,"purposeId","purposeVersionId"),he(i.title,512),he(i.description,1e4),In(i.digest),!V(i.activityCodes,128)||!V(i.dataCategories,128))throw P()}}function Rn(e,t,n){if(typeof e[t]!="string"||!Le(e[t])||typeof e[n]!="string"||!Le(e[n])||typeof e.code!="string"||!/^[a-z][a-z0-9_]{0,63}$/.test(e.code)||!Number.isSafeInteger(e.version)||e.version<1)throw P()}function he(e,t){let n=R(e);if(typeof n.en!="string"||n.en.length===0||n.en.length>t||typeof n.ar!="string"||n.ar.length===0||n.ar.length>t)throw P()}function In(e){let t=R(e);if(typeof t.en!="string"||!/^[a-f0-9]{64}$/.test(t.en)||typeof t.ar!="string"||!/^[a-f0-9]{64}$/.test(t.ar))throw P()}function to(e){return e==null||typeof e=="string"}function F(e,t){return t.every(n=>typeof e[n]=="boolean")}function Sn(e,t){return t.every(n=>e[n]===void 0||typeof e[n]=="string"&&e[n].length<=4096)}function no(e){if(!Array.isArray(e)||e.length>64)return;let t=e.filter(n=>typeof n=="string"&&n.length<=128);return t.length===e.length?t:void 0}function V(e,t){return Array.isArray(e)&&e.length<=t&&e.every(n=>typeof n=="string"&&n.length<=128)&&new Set(e).size===e.length}export{io as a,ye as b,ae as c,Be as d,so as e,je as f,Cn as g,Dn as h,ke as i,We as j,Ao as k,Xe as l,Bi as m,Xo as n,Zo as o,ir as p};
|
|
@@ -910,7 +910,24 @@ interface OrganizationClient {
|
|
|
910
910
|
|
|
911
911
|
type PrivacyLocale = 'en' | 'ar';
|
|
912
912
|
type PrivacyConsentState = 'granted' | 'refused' | 'withdrawn';
|
|
913
|
-
|
|
913
|
+
/** The closed set, as a value, and the order every surface renders it in. */
|
|
914
|
+
declare const PRIVACY_RIGHT_TYPES: readonly ["access", "correction", "portability", "erasure", "restriction", "objection", "consent_withdrawal"];
|
|
915
|
+
type PrivacyRightType = (typeof PRIVACY_RIGHT_TYPES)[number];
|
|
916
|
+
/**
|
|
917
|
+
* The rights a surface should offer, given what the server advertises.
|
|
918
|
+
*
|
|
919
|
+
* ONE OWNER for the compatibility rule this whole feature rests on:
|
|
920
|
+
* `undefined` means a server that cannot report availability, so offer
|
|
921
|
+
* everything - exactly as these surfaces behaved before the field existed -
|
|
922
|
+
* while an EMPTY list means the project accepts none, which is different and
|
|
923
|
+
* must be honoured. Getting those two confused blanks the privacy tab of every
|
|
924
|
+
* app on an older deployment.
|
|
925
|
+
*
|
|
926
|
+
* Unknown entries are ignored here rather than rejected at decode, so the
|
|
927
|
+
* server can add an eighth right type without any published SDK needing to know
|
|
928
|
+
* about it.
|
|
929
|
+
*/
|
|
930
|
+
declare function offeredRightTypes(advertised: readonly string[] | undefined): PrivacyRightType[];
|
|
914
931
|
type PrivacyRightState = 'received' | 'identity_pending' | 'in_progress' | 'restricted' | 'completed' | 'denied' | 'withdrawn';
|
|
915
932
|
interface PrivacyConsentPreference {
|
|
916
933
|
purposeId: string;
|
|
@@ -1833,4 +1850,4 @@ type ResolvedAuthTarget = Readonly<{
|
|
|
1833
1850
|
declare function resolveAuthTarget(input: Pick<AuthConfig, 'publishableKey' | 'apiUrl'>): ResolvedAuthTarget;
|
|
1834
1851
|
declare function resolveConfig(input: AuthConfig): ResolvedAuthConfig;
|
|
1835
1852
|
|
|
1836
|
-
export { type DeleteAccountData as $, type ActionFetchOptions as A, resolveConfig as B, type CreatePrivacyRightsRequestOptions as C, type DecodedPublishableKey as D, type PhoneOtpChallengeData as E, type AkedlyShieldStartProof as F, type AcceptOrganizationInvitationData as G, type HasParams as H, type AccountClient as I, type AccountSession as J, type AccountStatusData as K, type AddOrganizationTeamMemberOptions as L, type AuthErrorContext as M, type AuthOwlErrorCode as N, type Organization as O, type PasskeySignInOptions as P, type AuthRequestContext as Q, type ResolvedAuthConfig as R, type SocialIdTokenOptions as S, type AuthResponseContext as T, type ChangeEmailOptions as U, type ChangePasswordData as V, type ChangePasswordOptions as W, type ConsentAcceptResult as X, type ConsentStatus as Y, type CreateOrganizationOptions as Z, type CreateOrganizationTeamOptions as _, type AuthActionResult as a, type
|
|
1853
|
+
export { type DeleteAccountData as $, type ActionFetchOptions as A, resolveConfig as B, type CreatePrivacyRightsRequestOptions as C, type DecodedPublishableKey as D, type PhoneOtpChallengeData as E, type AkedlyShieldStartProof as F, type AcceptOrganizationInvitationData as G, type HasParams as H, type AccountClient as I, type AccountSession as J, type AccountStatusData as K, type AddOrganizationTeamMemberOptions as L, type AuthErrorContext as M, type AuthOwlErrorCode as N, type Organization as O, type PasskeySignInOptions as P, type AuthRequestContext as Q, type ResolvedAuthConfig as R, type SocialIdTokenOptions as S, type AuthResponseContext as T, type ChangeEmailOptions as U, type ChangePasswordData as V, type ChangePasswordOptions as W, type ConsentAcceptResult as X, type ConsentStatus as Y, type CreateOrganizationOptions as Z, type CreateOrganizationTeamOptions as _, type AuthActionResult as a, type RemoveOrganizationTeamOptions as a$, type DeleteAccountOptions as a0, type DeleteOrganizationOptions as a1, type DeletePasskeyData as a2, type DeletePasskeyOptions as a3, type DisableTwoFactorOptions as a4, type EmailAuthData as a5, type EmailOtpAuthData as a6, type EmailOtpSignInOptions as a7, type EmailOtpType as a8, type EmailSignInOptions as a9, type OrganizationFilterOperator as aA, type OrganizationInvitation as aB, type OrganizationInvitationActionOptions as aC, type OrganizationInvitationDetails as aD, type OrganizationInvitationStatus as aE, type OrganizationMember as aF, type OrganizationMemberUser as aG, type OrganizationMemberWithUser as aH, type OrganizationMembersData as aI, type OrganizationRoleSummary as aJ, type OrganizationSelector as aK, type OrganizationTeam as aL, type OrganizationTeamMember as aM, type OrganizationUserInvitation as aN, PRIVACY_RIGHT_TYPES as aO, type PasswordResetData as aP, type PhoneAuthUser as aQ, type PhoneOtpStartData as aR, type PhoneOtpStartOptions as aS, type PhoneOtpVerifyData as aT, type PhoneOtpVerifyOptions as aU, type RejectOrganizationInvitationData as aV, type RemoveOrganizationMemberData as aW, type RemoveOrganizationMemberOptions as aX, type RemoveOrganizationTeamData as aY, type RemoveOrganizationTeamMemberData as aZ, type RemoveOrganizationTeamMemberOptions as a_, type EmailSignUpData as aa, type EmailSignUpOptions as ab, type EnableTwoFactorOptions as ac, type GenerateBackupCodesOptions as ad, type GetOrganizationInvitationOptions as ae, type GetOrganizationOptions as af, type GetToken as ag, type GetTokenOptions as ah, INVITATION_CLAIM_MAX_AGE_MS as ai, INVITATION_QUERY_PARAM as aj, type InvitationClaim as ak, type InvitationRecipientHint as al, type InviteOrganizationMemberOptions as am, type JsonObject as an, type JsonPrimitive as ao, type JsonValue as ap, type LeaveOrganizationOptions as aq, type LinkSocialData as ar, type LinkSocialOptions as as, type ListOrganizationInvitationsOptions as at, type ListOrganizationMembersOptions as au, type ListOrganizationRolesOptions as av, type ListOrganizationTeamMembersOptions as aw, type ListOrganizationTeamsOptions as ax, type MagicLinkData as ay, type MagicLinkSignInOptions as az, type AuthOwlClient as b, type RequestPasswordResetOptions as b0, type ResetPasswordOptions as b1, type ResolvedAuthTarget as b2, type RevokeSessionOptions as b3, type SendOtpData as b4, type SendTwoFactorOtpData as b5, type SendTwoFactorOtpOptions as b6, type SendVerificationOtpOptions as b7, type SessionLifecycleEvent as b8, type SessionTransportConnection as b9, type VerifyTotpOptions as bA, type VerifyTwoFactorOtpOptions as bB, type WaitlistJoinData as bC, type WaitlistJoinOptions as bD, acceptConsent as bE, captureInvitationClaim as bF, clearInvitationClaim as bG, createAuthOwlClient as bH, createTokenClient as bI, getConsentStatus as bJ, membershipHas as bK, membershipHasPermission as bL, membershipHasRole as bM, membershipHasTeam as bN, offeredRightTypes as bO, readInvitationClaim as bP, resolveAuthTarget as bQ, withSessionTransportIntegration as bR, type SessionTransportIntegration as ba, type SetActiveTeamOptions as bb, type SignOutData as bc, type SocialAccount as bd, type SocialSignInOptions as be, type TokenClient as bf, TransportError as bg, type TransportErrorKind as bh, type TwoFactorBackupCodesData as bi, type TwoFactorEnableData as bj, type TwoFactorRedirectData as bk, type TwoFactorStatusData as bl, type TwoFactorVerifyData as bm, type UnlinkSocialOptions as bn, type UpdateOrganizationMemberRoleOptions as bo, type UpdateOrganizationOptions as bp, type UpdateOrganizationTeamOptions as bq, type UpdatePasskeyData as br, type UpdatePasskeyOptions as bs, type UpdateProfileOptions as bt, type UpdateUnsafeMetadataOptions as bu, type UserMetadata as bv, type UsernameSignInOptions as bw, type VerifyBackupCodeOptions as bx, type VerifyEmailOtpData as by, type VerifyEmailOtpOptions as bz, type PasskeyAuthData as c, type AddPasskeyOptions as d, type AuthPasskey as e, type AuthConfig as f, type AuthClientError as g, type AuthSession as h, type AuthUser as i, type OrganizationClient as j, type OrganizationDetails as k, type OrganizationMembership as l, type PrivacyClient as m, type PrivacyConsentPreference as n, type PrivacyConsentState as o, type PrivacyLocale as p, type PrivacyRightState as q, type PrivacyRightType as r, type PrivacyRightsRequest as s, type RecordPrivacyConsentOptions as t, type SessionState as u, type SessionStore as v, type SetActiveOrganizationOptions as w, type SocialAuthData as x, createMembershipHas as y, decodePublishableKey as z };
|
|
@@ -910,7 +910,24 @@ interface OrganizationClient {
|
|
|
910
910
|
|
|
911
911
|
type PrivacyLocale = 'en' | 'ar';
|
|
912
912
|
type PrivacyConsentState = 'granted' | 'refused' | 'withdrawn';
|
|
913
|
-
|
|
913
|
+
/** The closed set, as a value, and the order every surface renders it in. */
|
|
914
|
+
declare const PRIVACY_RIGHT_TYPES: readonly ["access", "correction", "portability", "erasure", "restriction", "objection", "consent_withdrawal"];
|
|
915
|
+
type PrivacyRightType = (typeof PRIVACY_RIGHT_TYPES)[number];
|
|
916
|
+
/**
|
|
917
|
+
* The rights a surface should offer, given what the server advertises.
|
|
918
|
+
*
|
|
919
|
+
* ONE OWNER for the compatibility rule this whole feature rests on:
|
|
920
|
+
* `undefined` means a server that cannot report availability, so offer
|
|
921
|
+
* everything - exactly as these surfaces behaved before the field existed -
|
|
922
|
+
* while an EMPTY list means the project accepts none, which is different and
|
|
923
|
+
* must be honoured. Getting those two confused blanks the privacy tab of every
|
|
924
|
+
* app on an older deployment.
|
|
925
|
+
*
|
|
926
|
+
* Unknown entries are ignored here rather than rejected at decode, so the
|
|
927
|
+
* server can add an eighth right type without any published SDK needing to know
|
|
928
|
+
* about it.
|
|
929
|
+
*/
|
|
930
|
+
declare function offeredRightTypes(advertised: readonly string[] | undefined): PrivacyRightType[];
|
|
914
931
|
type PrivacyRightState = 'received' | 'identity_pending' | 'in_progress' | 'restricted' | 'completed' | 'denied' | 'withdrawn';
|
|
915
932
|
interface PrivacyConsentPreference {
|
|
916
933
|
purposeId: string;
|
|
@@ -1833,4 +1850,4 @@ type ResolvedAuthTarget = Readonly<{
|
|
|
1833
1850
|
declare function resolveAuthTarget(input: Pick<AuthConfig, 'publishableKey' | 'apiUrl'>): ResolvedAuthTarget;
|
|
1834
1851
|
declare function resolveConfig(input: AuthConfig): ResolvedAuthConfig;
|
|
1835
1852
|
|
|
1836
|
-
export { type DeleteAccountData as $, type ActionFetchOptions as A, resolveConfig as B, type CreatePrivacyRightsRequestOptions as C, type DecodedPublishableKey as D, type PhoneOtpChallengeData as E, type AkedlyShieldStartProof as F, type AcceptOrganizationInvitationData as G, type HasParams as H, type AccountClient as I, type AccountSession as J, type AccountStatusData as K, type AddOrganizationTeamMemberOptions as L, type AuthErrorContext as M, type AuthOwlErrorCode as N, type Organization as O, type PasskeySignInOptions as P, type AuthRequestContext as Q, type ResolvedAuthConfig as R, type SocialIdTokenOptions as S, type AuthResponseContext as T, type ChangeEmailOptions as U, type ChangePasswordData as V, type ChangePasswordOptions as W, type ConsentAcceptResult as X, type ConsentStatus as Y, type CreateOrganizationOptions as Z, type CreateOrganizationTeamOptions as _, type AuthActionResult as a, type
|
|
1853
|
+
export { type DeleteAccountData as $, type ActionFetchOptions as A, resolveConfig as B, type CreatePrivacyRightsRequestOptions as C, type DecodedPublishableKey as D, type PhoneOtpChallengeData as E, type AkedlyShieldStartProof as F, type AcceptOrganizationInvitationData as G, type HasParams as H, type AccountClient as I, type AccountSession as J, type AccountStatusData as K, type AddOrganizationTeamMemberOptions as L, type AuthErrorContext as M, type AuthOwlErrorCode as N, type Organization as O, type PasskeySignInOptions as P, type AuthRequestContext as Q, type ResolvedAuthConfig as R, type SocialIdTokenOptions as S, type AuthResponseContext as T, type ChangeEmailOptions as U, type ChangePasswordData as V, type ChangePasswordOptions as W, type ConsentAcceptResult as X, type ConsentStatus as Y, type CreateOrganizationOptions as Z, type CreateOrganizationTeamOptions as _, type AuthActionResult as a, type RemoveOrganizationTeamOptions as a$, type DeleteAccountOptions as a0, type DeleteOrganizationOptions as a1, type DeletePasskeyData as a2, type DeletePasskeyOptions as a3, type DisableTwoFactorOptions as a4, type EmailAuthData as a5, type EmailOtpAuthData as a6, type EmailOtpSignInOptions as a7, type EmailOtpType as a8, type EmailSignInOptions as a9, type OrganizationFilterOperator as aA, type OrganizationInvitation as aB, type OrganizationInvitationActionOptions as aC, type OrganizationInvitationDetails as aD, type OrganizationInvitationStatus as aE, type OrganizationMember as aF, type OrganizationMemberUser as aG, type OrganizationMemberWithUser as aH, type OrganizationMembersData as aI, type OrganizationRoleSummary as aJ, type OrganizationSelector as aK, type OrganizationTeam as aL, type OrganizationTeamMember as aM, type OrganizationUserInvitation as aN, PRIVACY_RIGHT_TYPES as aO, type PasswordResetData as aP, type PhoneAuthUser as aQ, type PhoneOtpStartData as aR, type PhoneOtpStartOptions as aS, type PhoneOtpVerifyData as aT, type PhoneOtpVerifyOptions as aU, type RejectOrganizationInvitationData as aV, type RemoveOrganizationMemberData as aW, type RemoveOrganizationMemberOptions as aX, type RemoveOrganizationTeamData as aY, type RemoveOrganizationTeamMemberData as aZ, type RemoveOrganizationTeamMemberOptions as a_, type EmailSignUpData as aa, type EmailSignUpOptions as ab, type EnableTwoFactorOptions as ac, type GenerateBackupCodesOptions as ad, type GetOrganizationInvitationOptions as ae, type GetOrganizationOptions as af, type GetToken as ag, type GetTokenOptions as ah, INVITATION_CLAIM_MAX_AGE_MS as ai, INVITATION_QUERY_PARAM as aj, type InvitationClaim as ak, type InvitationRecipientHint as al, type InviteOrganizationMemberOptions as am, type JsonObject as an, type JsonPrimitive as ao, type JsonValue as ap, type LeaveOrganizationOptions as aq, type LinkSocialData as ar, type LinkSocialOptions as as, type ListOrganizationInvitationsOptions as at, type ListOrganizationMembersOptions as au, type ListOrganizationRolesOptions as av, type ListOrganizationTeamMembersOptions as aw, type ListOrganizationTeamsOptions as ax, type MagicLinkData as ay, type MagicLinkSignInOptions as az, type AuthOwlClient as b, type RequestPasswordResetOptions as b0, type ResetPasswordOptions as b1, type ResolvedAuthTarget as b2, type RevokeSessionOptions as b3, type SendOtpData as b4, type SendTwoFactorOtpData as b5, type SendTwoFactorOtpOptions as b6, type SendVerificationOtpOptions as b7, type SessionLifecycleEvent as b8, type SessionTransportConnection as b9, type VerifyTotpOptions as bA, type VerifyTwoFactorOtpOptions as bB, type WaitlistJoinData as bC, type WaitlistJoinOptions as bD, acceptConsent as bE, captureInvitationClaim as bF, clearInvitationClaim as bG, createAuthOwlClient as bH, createTokenClient as bI, getConsentStatus as bJ, membershipHas as bK, membershipHasPermission as bL, membershipHasRole as bM, membershipHasTeam as bN, offeredRightTypes as bO, readInvitationClaim as bP, resolveAuthTarget as bQ, withSessionTransportIntegration as bR, type SessionTransportIntegration as ba, type SetActiveTeamOptions as bb, type SignOutData as bc, type SocialAccount as bd, type SocialSignInOptions as be, type TokenClient as bf, TransportError as bg, type TransportErrorKind as bh, type TwoFactorBackupCodesData as bi, type TwoFactorEnableData as bj, type TwoFactorRedirectData as bk, type TwoFactorStatusData as bl, type TwoFactorVerifyData as bm, type UnlinkSocialOptions as bn, type UpdateOrganizationMemberRoleOptions as bo, type UpdateOrganizationOptions as bp, type UpdateOrganizationTeamOptions as bq, type UpdatePasskeyData as br, type UpdatePasskeyOptions as bs, type UpdateProfileOptions as bt, type UpdateUnsafeMetadataOptions as bu, type UserMetadata as bv, type UsernameSignInOptions as bw, type VerifyBackupCodeOptions as bx, type VerifyEmailOtpData as by, type VerifyEmailOtpOptions as bz, type PasskeyAuthData as c, type AddPasskeyOptions as d, type AuthPasskey as e, type AuthConfig as f, type AuthClientError as g, type AuthSession as h, type AuthUser as i, type OrganizationClient as j, type OrganizationDetails as k, type OrganizationMembership as l, type PrivacyClient as m, type PrivacyConsentPreference as n, type PrivacyConsentState as o, type PrivacyLocale as p, type PrivacyRightState as q, type PrivacyRightType as r, type PrivacyRightsRequest as s, type RecordPrivacyConsentOptions as t, type SessionState as u, type SessionStore as v, type SetActiveOrganizationOptions as w, type SocialAuthData as x, createMembershipHas as y, decodePublishableKey as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ResolvedAuthConfig, A as ActionFetchOptions, a as AuthActionResult } from './config-
|
|
2
|
-
import { P as PublicConfig } from './public-config-
|
|
1
|
+
import { R as ResolvedAuthConfig, A as ActionFetchOptions, a as AuthActionResult } from './config-Chtx47rL.js';
|
|
2
|
+
import { P as PublicConfig } from './public-config-B7Tth7Cs.js';
|
|
3
3
|
|
|
4
4
|
declare const AUTH_CHALLENGE_HEADER = "x-authowl-turnstile-token";
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ResolvedAuthConfig, A as ActionFetchOptions, a as AuthActionResult } from './config-
|
|
2
|
-
import { P as PublicConfig } from './public-config-
|
|
1
|
+
import { R as ResolvedAuthConfig, A as ActionFetchOptions, a as AuthActionResult } from './config-Chtx47rL.cjs';
|
|
2
|
+
import { P as PublicConfig } from './public-config-DwlH-HqZ.cjs';
|
|
3
3
|
|
|
4
4
|
declare const AUTH_CHALLENGE_HEADER = "x-authowl-turnstile-token";
|
|
5
5
|
/**
|