@authhero/adapter-interfaces 0.44.0 → 0.46.0

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@hono/zod-openapi"),G=t.z.object({start:t.z.number(),limit:t.z.number(),length:t.z.number()}),a=t.z.object({created_at:t.z.string(),updated_at:t.z.string()}),p=t.z.object({email:t.z.string().optional(),email_verified:t.z.boolean().optional(),name:t.z.string().optional(),username:t.z.string().optional(),given_name:t.z.string().optional(),phone_number:t.z.string().optional(),phone_verified:t.z.boolean().optional(),family_name:t.z.string().optional()}).catchall(t.z.any()),z=t.z.object({connection:t.z.string(),user_id:t.z.string(),provider:t.z.string(),isSocial:t.z.boolean(),access_token:t.z.string().optional(),access_token_secret:t.z.string().optional(),refresh_token:t.z.string().optional(),profileData:p.optional()}),s=t.z.object({email:t.z.string().optional(),username:t.z.string().optional(),given_name:t.z.string().optional(),family_name:t.z.string().optional(),nickname:t.z.string().optional(),name:t.z.string().optional(),picture:t.z.string().optional(),locale:t.z.string().optional(),linked_to:t.z.string().optional(),profileData:t.z.string().optional(),user_id:t.z.string().optional(),app_metadata:t.z.any().default({}).optional(),user_metadata:t.z.any().default({}).optional()}),d=s.extend({email_verified:t.z.boolean().default(!1),verify_email:t.z.boolean().optional(),last_ip:t.z.string().optional(),last_login:t.z.string().optional(),user_id:t.z.string().optional(),provider:t.z.string().default("email"),connection:t.z.string().default("email"),is_social:t.z.boolean().optional()}),g=t.z.object({...d.shape,...a.shape,user_id:t.z.string(),is_social:t.z.boolean(),email:t.z.string(),login_count:t.z.number(),identities:t.z.array(z).optional()}),L=g,B=s.extend({email:t.z.string(),login_count:t.z.number(),multifactor:t.z.array(t.z.string()).optional(),last_ip:t.z.string().optional(),last_login:t.z.string().optional(),user_id:t.z.string()}).catchall(t.z.any()),M="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let q=(e=21)=>{let i="",o=crypto.getRandomValues(new Uint8Array(e));for(;e--;)i+=M[o[e]&63];return i};const _=t.z.object({audience:t.z.string().optional(),recipient:t.z.string().optional(),createUpnClaim:t.z.boolean().optional(),mapUnknownClaimsAsIs:t.z.boolean().optional(),passthroughClaimsWithNoMapping:t.z.boolean().optional(),mapIdentities:t.z.boolean().optional(),signatureAlgorithm:t.z.string().optional(),digestAlgorithm:t.z.string().optional(),issuer:t.z.string().optional(),destination:t.z.string().optional(),lifetimeInSeconds:t.z.number().optional(),signResponse:t.z.boolean().optional(),nameIdentifierFormat:t.z.string().optional(),nameIdentifierProbes:t.z.array(t.z.string()).optional(),authnContextClassRef:t.z.string().optional(),mappings:t.z.record(t.z.string()).optional()}),u=t.z.object({id:t.z.string(),name:t.z.string(),callbacks:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs whitelisted to use as a callback to the client after authentication."}),allowed_origins:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level. Query strings and hash information are not taken into account when validating these URLs."}),web_origins:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode."}),allowed_logout_urls:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains."}),allowed_clients:t.z.array(t.z.string()).default([]).optional().openapi({description:"Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients"}),addons:t.z.object({samlp:_.optional()}).default({}).optional().openapi({description:"Addons associated with the client. The key is the addon's package name and the value is an object with the configuration for the addon."}),email_validation:t.z.enum(["enabled","disabled","enforced"]).default("enforced").optional().openapi({description:"Defines if it possible to sign in with an unverified email and if verification emails will be sent. This is not available in auth0"}),client_secret:t.z.string().default(()=>q()).optional(),disable_sign_ups:t.z.boolean().optional().default(!1).openapi({description:"Prevents users from signing up using the hosted login page. This is not available in auth0"})}),m=t.z.object({created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e),...u.shape});var r=(e=>(e.TOKEN="token",e.TOKEN_ID_TOKEN="token id_token",e.CODE="code",e))(r||{}),l=(e=>(e.QUERY="query",e.FRAGMENT="fragment",e.FORM_POST="form_post",e.WEB_MESSAGE="web_message",e.SAML_POST="saml_post",e))(l||{}),c=(e=>(e.S256="S256",e.Plain="plain",e))(c||{});const h=t.z.object({client_id:t.z.string(),vendor_id:t.z.string().optional(),act_as:t.z.string().optional(),response_type:t.z.nativeEnum(r).optional(),response_mode:t.z.nativeEnum(l).optional(),redirect_uri:t.z.string().optional(),audience:t.z.string().optional(),state:t.z.string().optional(),nonce:t.z.string().optional(),scope:t.z.string().optional(),prompt:t.z.string().optional(),code_challenge_method:t.z.nativeEnum(c).optional(),code_challenge:t.z.string().optional(),username:t.z.string().optional(),ui_locales:t.z.string().optional()}),W=t.z.object({colors:t.z.object({primary:t.z.string(),page_background:t.z.object({type:t.z.string().optional(),start:t.z.string().optional(),end:t.z.string().optional(),angle_deg:t.z.number().optional()}).optional()}).optional(),logo_url:t.z.string().optional(),favicon_url:t.z.string().optional(),font:t.z.object({url:t.z.string()}).optional()}),b=t.z.object({id:t.z.string().optional(),name:t.z.string(),strategy:t.z.string(),options:t.z.object({kid:t.z.string().optional(),team_id:t.z.string().optional(),realms:t.z.string().optional(),client_id:t.z.string().optional(),client_secret:t.z.string().optional(),app_secret:t.z.string().optional(),scope:t.z.string().optional(),authorization_endpoint:t.z.string().default("").optional(),token_endpoint:t.z.string().default("").optional(),userinfo_endpoint:t.z.string().default("").optional(),jwks_uri:t.z.string().default("").optional(),discovery_url:t.z.string().default("").optional(),issuer:t.z.string().default("").optional()}).default({}).optional(),enabled_clients:t.z.array(t.z.string()).default([]).optional(),response_type:t.z.custom().optional(),response_mode:t.z.custom().optional()}),S=t.z.object({id:t.z.string(),created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e)}).extend(b.shape),f=t.z.object({name:t.z.string(),audience:t.z.string(),sender_email:t.z.string().email(),sender_name:t.z.string(),support_url:t.z.string().url().optional(),logo:t.z.string().url().optional(),primary_color:t.z.string().optional(),secondary_color:t.z.string().optional(),language:t.z.string().optional(),id:t.z.string().optional()}),k=t.z.object({created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e),...f.shape,id:t.z.string()}),Q=t.z.object({logoUrl:t.z.string(),loginBackgroundImage:t.z.string().nullish(),style:t.z.object({primaryColor:t.z.string(),buttonTextColor:t.z.string(),primaryHoverColor:t.z.string()}),supportEmail:t.z.string().nullable(),supportUrl:t.z.string().nullable(),name:t.z.string(),showGreyishBackground:t.z.boolean().optional(),termsAndConditionsUrl:t.z.string().nullable(),companyName:t.z.string().optional(),checkoutHideSocial:t.z.boolean().optional(),siteUrl:t.z.string().nullable(),manageSubscriptionsUrl:t.z.string().optional()}),V=t.z.object({domain:t.z.string(),dkim_private_key:t.z.string().optional(),dkim_public_key:t.z.string().optional(),email_api_key:t.z.string().optional(),email_service:t.z.string().optional()});t.z.object({...m.shape,domains:t.z.array(V),tenant:k,connections:t.z.array(S)});const y=t.z.enum(["password_reset","email_verification","otp","authorization_code","oauth2_state","ticket"]),I=t.z.object({code_id:t.z.string().openapi({description:"The code that will be used in for instance an email verification flow"}),login_id:t.z.string().openapi({description:"The id of the login session that the code is connected to"}),connection_id:t.z.string().optional().openapi({description:"The connection that the code is connected to"}),code_type:y,code_verifier:t.z.string().optional().openapi({description:"The code verifier used in PKCE in outbound flows"}),expires_at:t.z.string(),used_at:t.z.string().optional(),user_id:t.z.string().optional()}),Y=t.z.object({...I.shape,created_at:t.z.string()}),w=t.z.object({domain:t.z.string(),dkim_private_key:t.z.string().optional(),dkim_public_key:t.z.string().optional(),email_api_key:t.z.string().optional(),email_service:t.z.string().optional()}),X=a.extend({...w.shape,id:t.z.string()}),E=t.z.object({trigger_id:t.z.enum(["pre-user-signup","post-user-registration","post-user-login"]),enabled:t.z.boolean().default(!1),url:t.z.string(),hook_id:t.z.string().optional(),synchronous:t.z.boolean().default(!1),priority:t.z.number().optional()}),J=E.extend({...a.shape,hook_id:t.z.string()}),C=t.z.object({alg:t.z.enum(["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512"]),e:t.z.string(),kid:t.z.string(),kty:t.z.enum(["RSA","EC","oct"]),n:t.z.string(),x5t:t.z.string().optional(),x5c:t.z.array(t.z.string()).optional(),use:t.z.enum(["sig","enc"]).optional()}),Z=t.z.object({keys:t.z.array(C)}),$=t.z.object({issuer:t.z.string(),authorization_endpoint:t.z.string(),token_endpoint:t.z.string(),device_authorization_endpoint:t.z.string(),userinfo_endpoint:t.z.string(),mfa_challenge_endpoint:t.z.string(),jwks_uri:t.z.string(),registration_endpoint:t.z.string(),revocation_endpoint:t.z.string(),scopes_supported:t.z.array(t.z.string()),response_types_supported:t.z.array(t.z.string()),code_challenge_methods_supported:t.z.array(t.z.string()),response_modes_supported:t.z.array(t.z.string()),subject_types_supported:t.z.array(t.z.string()),id_token_signing_alg_values_supported:t.z.array(t.z.string()),token_endpoint_auth_methods_supported:t.z.array(t.z.string()),claims_supported:t.z.array(t.z.string()),request_uri_parameter_supported:t.z.boolean(),request_parameter_supported:t.z.boolean(),token_endpoint_auth_signing_alg_values_supported:t.z.array(t.z.string())}),j=t.z.object({auth0Client:t.z.string().optional(),authParams:h,expires_at:t.z.string(),deleted_at:t.z.string().optional(),ip:t.z.string().optional(),useragent:t.z.string().optional()}).openapi({description:"This represents a login sesion"}),tt=t.z.object({...j.shape,login_id:t.z.string().openapi({description:"This is is used as the state in the universal login"}),created_at:t.z.string(),updated_at:t.z.string()});var v=(e=>(e.FAILED_SILENT_AUTH="fsa",e.FAILED_SIGNUP="fs",e.FAILED_LOGIN="f",e.FAILED_LOGIN_INCORRECT_PASSWORD="fp",e.FAILED_CHANGE_PASSWORD="fcp",e.FAILED_BY_CONNECTOR="fc",e.FAILED_LOGIN_INVALID_EMAIL_USERNAME="fu",e.FAILED_HOOK="fh",e.FAILED_CROSS_ORIGIN_AUTHENTICATION="fcoa",e.SUCCESS_API_OPERATION="sapi",e.SUCCESS_CHANGE_PASSWORD="scp",e.SUCCESS_CHANGE_PASSWORD_REQUEST="scpr",e.SUCCESS_CHANGE_USERNAME="scu",e.SUCCESS_CROSS_ORIGIN_AUTHENTICATION="scoa",e.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN="seacft",e.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN="serft",e.SUCCESS_LOGIN="s",e.SUCCESS_LOGOUT="slo",e.SUCCESS_SIGNUP="ss",e.SUCCESS_SILENT_AUTH="ssa",e.SUCCESS_VERIFICATION_EMAIL="sv",e.SUCCESS_VERIFICATION_EMAIL_REQUEST="svr",e.CODE_LINK_SENT="cls",e.BLOCKED_ACCOUNT_EMAIL="limit_wc",e.BLOCKED_ACCOUNT_IP="limit_sul",e.BLOCKED_IP_ADDRESS="limit_mu",e))(v||{});const et=t.z.enum(["cls","fsa","fs","f","fc","fcoa","fcp","fh","fp","fs","fu","s","sapi","scoa","scp","scpr","scu","seacft","serft","slo","ss","ssa","sv","svr"]),A=t.z.object({name:t.z.string(),version:t.z.string(),env:t.z.object({node:t.z.string().optional()}).optional()}),nt=t.z.object({type:et,date:t.z.string(),description:t.z.string().optional(),log_id:t.z.string().optional(),_id:t.z.string().optional(),ip:t.z.string(),user_agent:t.z.string(),details:t.z.any().optional(),isMobile:t.z.boolean(),user_id:t.z.string().optional(),user_name:t.z.string().optional(),connection:t.z.string().optional(),connection_id:t.z.string().optional(),client_id:t.z.string().optional(),client_name:t.z.string().optional(),audience:t.z.string().optional(),scope:t.z.array(t.z.string()).optional(),strategy:t.z.string().optional(),strategy_type:t.z.string().optional(),hostname:t.z.string().optional(),auth0_client:A.optional()}),O=t.z.object({user_id:t.z.string(),password:t.z.string(),algorithm:t.z.enum(["bcrypt","argon2id"]).default("argon2id")}),it=t.z.object({...O.shape,created_at:t.z.string(),updated_at:t.z.string()}),U=t.z.object({initial_user_agent:t.z.string().describe("First user agent of the device from which this user logged in"),initial_ip:t.z.string().describe("First IP address associated with this session"),initial_asn:t.z.string().describe("First autonomous system number associated with this session"),last_user_agent:t.z.string().describe("Last user agent of the device from which this user logged in"),last_ip:t.z.string().describe("Last IP address from which this user logged in"),last_asn:t.z.string().describe("Last autonomous system number from which this user logged in")}),N=t.z.object({id:t.z.string(),client_id:t.z.string(),revoked_at:t.z.string().optional(),used_at:t.z.string(),user_id:t.z.string().describe("The user ID associated with the session"),expires_at:t.z.string().optional(),idle_expires_at:t.z.string().optional(),device:U.describe("Metadata related to the device used in the session"),clients:t.z.array(t.z.string()).describe("List of client details for the session")}),ot=t.z.object({created_at:t.z.string(),updated_at:t.z.string(),authenticated_at:t.z.string(),last_interaction_at:t.z.string(),...N.shape}),at=t.z.object({kid:t.z.string().openapi({description:"The key id of the signing key"}),cert:t.z.string().openapi({description:"The public certificate of the signing key"}),fingerprint:t.z.string().openapi({description:"The cert fingerprint"}),thumbprint:t.z.string().openapi({description:"The cert thumbprint"}),pkcs7:t.z.string().optional().openapi({description:"The private key in pkcs7 format"}),current:t.z.boolean().optional().openapi({description:"True if the key is the current key"}),next:t.z.boolean().optional().openapi({description:"True if the key is the next key"}),previous:t.z.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:t.z.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:t.z.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:t.z.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:t.z.string().optional().openapi({description:"The date and time when the key was revoked"})});var R=(e=>(e.RefreshToken="refresh_token",e.AuthorizationCode="authorization_code",e.ClientCredential="client_credentials",e.Passwordless="passwordless",e.Password="password",e))(R||{});const st=t.z.object({access_token:t.z.string(),id_token:t.z.string().optional(),scope:t.z.string().optional(),state:t.z.string().optional(),refresh_token:t.z.string().optional(),token_type:t.z.string(),expires_in:t.z.number()});t.z.object({code:t.z.string(),state:t.z.string().optional()});const T=t.z.object({button_border_radius:t.z.number(),button_border_weight:t.z.number(),buttons_style:t.z.enum(["pill"]),input_border_radius:t.z.number(),input_border_weight:t.z.number(),inputs_style:t.z.enum(["pill"]),show_widget_shadow:t.z.boolean(),widget_border_weight:t.z.number(),widget_corner_radius:t.z.number()}),D=t.z.object({base_focus_color:t.z.string(),base_hover_color:t.z.string(),body_text:t.z.string(),captcha_widget_theme:t.z.enum(["auto"]),error:t.z.string(),header:t.z.string(),icons:t.z.string(),input_background:t.z.string(),input_border:t.z.string(),input_filled_text:t.z.string(),input_labels_placeholders:t.z.string(),links_focused_components:t.z.string(),primary_button:t.z.string(),primary_button_label:t.z.string(),secondary_button_border:t.z.string(),secondary_button_label:t.z.string(),success:t.z.string(),widget_background:t.z.string(),widget_border:t.z.string()}),n=t.z.object({bold:t.z.boolean(),size:t.z.number()}),x=t.z.object({body_text:n,buttons_text:n,font_url:t.z.string(),input_labels:n,links:n,links_style:t.z.enum(["normal"]),reference_text_size:t.z.number(),subtitle:n,title:n}),P=t.z.object({background_color:t.z.string(),background_image_url:t.z.string(),page_layout:t.z.enum(["center"])}),F=t.z.object({header_text_alignment:t.z.enum(["center"]),logo_height:t.z.number(),logo_position:t.z.enum(["center"]),logo_url:t.z.string(),social_buttons_layout:t.z.enum(["bottom"])}),H=t.z.object({borders:T,colors:D,displayName:t.z.string(),fonts:x,page_background:P,widget:F}),rt=H.extend({themeId:t.z.string()}),lt=t.z.object({universal_login_experience:t.z.enum(["new","classic"]).default("new"),identifier_first:t.z.boolean().default(!0),password_first:t.z.boolean().default(!1),webauthn_platform_first_factor:t.z.boolean()}),ct=t.z.object({name:t.z.string(),enabled:t.z.boolean().optional().default(!0),default_from_address:t.z.string().optional(),credentials:t.z.union([t.z.object({accessKeyId:t.z.string(),secretAccessKey:t.z.string(),region:t.z.string()}),t.z.object({smtp_host:t.z.array(t.z.string()),smtp_port:t.z.number(),smtp_user:t.z.string(),smtp_pass:t.z.string()}),t.z.object({api_key:t.z.string(),domain:t.z.string().optional()}),t.z.object({connectionString:t.z.string()}),t.z.object({tenantId:t.z.string(),clientId:t.z.string(),clientSecret:t.z.string()})]),settings:t.z.object({}).optional()}),K=t.z.object({token:t.z.string(),session_id:t.z.string(),user_id:t.z.string(),expires_at:t.z.string().optional(),idle_expires_at:t.z.string().optional(),last_exchanged_at:t.z.string().optional(),device:U.optional(),resource_servers:t.z.array(t.z.object({audience:t.z.string(),scopes:t.z.string()})),rotating:t.z.boolean()}),pt=t.z.object({created_at:t.z.string(),...K.shape});function zt(e){const[i,o]=e.split("|");if(!i||!o)throw new Error(`Invalid user_id: ${e}`);return{connection:i,id:o}}exports.Auth0Client=A;exports.AuthorizationResponseMode=l;exports.AuthorizationResponseType=r;exports.CodeChallengeMethod=c;exports.GrantType=R;exports.LogTypes=v;exports.applicationInsertSchema=u;exports.applicationSchema=m;exports.auth0UserResponseSchema=L;exports.authParamsSchema=h;exports.baseUserSchema=s;exports.bordersSchema=T;exports.brandingSchema=W;exports.codeInsertSchema=I;exports.codeSchema=Y;exports.codeTypeSchema=y;exports.colorsSchema=D;exports.connectionInsertSchema=b;exports.connectionSchema=S;exports.domainInsertSchema=w;exports.domainSchema=X;exports.emailProviderSchema=ct;exports.fontDetailsSchema=n;exports.fontsSchema=x;exports.hookInsertSchema=E;exports.hookSchema=J;exports.identitySchema=z;exports.jwksKeySchema=Z;exports.jwksSchema=C;exports.logSchema=nt;exports.loginInsertSchema=j;exports.loginSchema=tt;exports.openIDConfigurationSchema=$;exports.pageBackgroundSchema=P;exports.parseUserId=zt;exports.passwordInsertSchema=O;exports.passwordSchema=it;exports.profileDataSchema=p;exports.promptSettingSchema=lt;exports.refreshTokenInsertSchema=K;exports.refreshTokenSchema=pt;exports.samlpAddon=_;exports.sessionInsertSchema=N;exports.sessionSchema=ot;exports.signingKeySchema=at;exports.tenantInsertSchema=f;exports.tenantSchema=k;exports.themeInsertSchema=H;exports.themeSchema=rt;exports.tokenResponseSchema=st;exports.totalsSchema=G;exports.userInsertSchema=d;exports.userResponseSchema=B;exports.userSchema=g;exports.vendorSettingsSchema=Q;exports.widgetSchema=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@hono/zod-openapi"),G=t.z.object({start:t.z.number(),limit:t.z.number(),length:t.z.number()}),a=t.z.object({created_at:t.z.string(),updated_at:t.z.string()}),p=t.z.object({email:t.z.string().optional(),email_verified:t.z.boolean().optional(),name:t.z.string().optional(),username:t.z.string().optional(),given_name:t.z.string().optional(),phone_number:t.z.string().optional(),phone_verified:t.z.boolean().optional(),family_name:t.z.string().optional()}).catchall(t.z.any()),z=t.z.object({connection:t.z.string(),user_id:t.z.string(),provider:t.z.string(),isSocial:t.z.boolean(),access_token:t.z.string().optional(),access_token_secret:t.z.string().optional(),refresh_token:t.z.string().optional(),profileData:p.optional()}),s=t.z.object({email:t.z.string().optional(),username:t.z.string().optional(),given_name:t.z.string().optional(),family_name:t.z.string().optional(),nickname:t.z.string().optional(),name:t.z.string().optional(),picture:t.z.string().optional(),locale:t.z.string().optional(),linked_to:t.z.string().optional(),profileData:t.z.string().optional(),user_id:t.z.string().optional(),app_metadata:t.z.any().default({}).optional(),user_metadata:t.z.any().default({}).optional()}),d=s.extend({email_verified:t.z.boolean().default(!1),verify_email:t.z.boolean().optional(),last_ip:t.z.string().optional(),last_login:t.z.string().optional(),user_id:t.z.string().optional(),provider:t.z.string().default("email"),connection:t.z.string().default("email"),is_social:t.z.boolean().optional()}),g=t.z.object({...d.shape,...a.shape,user_id:t.z.string(),is_social:t.z.boolean(),email:t.z.string(),login_count:t.z.number(),identities:t.z.array(z).optional()}),L=g,B=s.extend({email:t.z.string(),login_count:t.z.number(),multifactor:t.z.array(t.z.string()).optional(),last_ip:t.z.string().optional(),last_login:t.z.string().optional(),user_id:t.z.string()}).catchall(t.z.any()),M="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let q=(e=21)=>{let i="",o=crypto.getRandomValues(new Uint8Array(e));for(;e--;)i+=M[o[e]&63];return i};const _=t.z.object({audience:t.z.string().optional(),recipient:t.z.string().optional(),createUpnClaim:t.z.boolean().optional(),mapUnknownClaimsAsIs:t.z.boolean().optional(),passthroughClaimsWithNoMapping:t.z.boolean().optional(),mapIdentities:t.z.boolean().optional(),signatureAlgorithm:t.z.string().optional(),digestAlgorithm:t.z.string().optional(),issuer:t.z.string().optional(),destination:t.z.string().optional(),lifetimeInSeconds:t.z.number().optional(),signResponse:t.z.boolean().optional(),nameIdentifierFormat:t.z.string().optional(),nameIdentifierProbes:t.z.array(t.z.string()).optional(),authnContextClassRef:t.z.string().optional(),mappings:t.z.record(t.z.string()).optional()}),u=t.z.object({id:t.z.string(),name:t.z.string(),callbacks:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs whitelisted to use as a callback to the client after authentication."}),allowed_origins:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level. Query strings and hash information are not taken into account when validating these URLs."}),web_origins:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode."}),allowed_logout_urls:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains."}),allowed_clients:t.z.array(t.z.string()).default([]).optional().openapi({description:"Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients"}),addons:t.z.object({samlp:_.optional()}).default({}).optional().openapi({description:"Addons associated with the client. The key is the addon's package name and the value is an object with the configuration for the addon."}),email_validation:t.z.enum(["enabled","disabled","enforced"]).default("enforced").optional().openapi({description:"Defines if it possible to sign in with an unverified email and if verification emails will be sent. This is not available in auth0"}),client_secret:t.z.string().default(()=>q()).optional(),disable_sign_ups:t.z.boolean().optional().default(!1).openapi({description:"Prevents users from signing up using the hosted login page. This is not available in auth0"})}),m=t.z.object({created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e),...u.shape});var r=(e=>(e.TOKEN="token",e.TOKEN_ID_TOKEN="token id_token",e.CODE="code",e))(r||{}),l=(e=>(e.QUERY="query",e.FRAGMENT="fragment",e.FORM_POST="form_post",e.WEB_MESSAGE="web_message",e.SAML_POST="saml_post",e))(l||{}),c=(e=>(e.S256="S256",e.Plain="plain",e))(c||{});const h=t.z.object({client_id:t.z.string(),vendor_id:t.z.string().optional(),act_as:t.z.string().optional(),response_type:t.z.nativeEnum(r).optional(),response_mode:t.z.nativeEnum(l).optional(),redirect_uri:t.z.string().optional(),audience:t.z.string().optional(),state:t.z.string().optional(),nonce:t.z.string().optional(),scope:t.z.string().optional(),prompt:t.z.string().optional(),code_challenge_method:t.z.nativeEnum(c).optional(),code_challenge:t.z.string().optional(),username:t.z.string().optional(),ui_locales:t.z.string().optional()}),W=t.z.object({colors:t.z.object({primary:t.z.string(),page_background:t.z.object({type:t.z.string().optional(),start:t.z.string().optional(),end:t.z.string().optional(),angle_deg:t.z.number().optional()}).optional()}).optional(),logo_url:t.z.string().optional(),favicon_url:t.z.string().optional(),font:t.z.object({url:t.z.string()}).optional()}),b=t.z.object({id:t.z.string().optional(),name:t.z.string(),strategy:t.z.string(),options:t.z.object({kid:t.z.string().optional(),team_id:t.z.string().optional(),realms:t.z.string().optional(),client_id:t.z.string().optional(),client_secret:t.z.string().optional(),app_secret:t.z.string().optional(),scope:t.z.string().optional(),authorization_endpoint:t.z.string().default("").optional(),token_endpoint:t.z.string().default("").optional(),userinfo_endpoint:t.z.string().default("").optional(),jwks_uri:t.z.string().default("").optional(),discovery_url:t.z.string().default("").optional(),issuer:t.z.string().default("").optional()}).default({}).optional(),enabled_clients:t.z.array(t.z.string()).default([]).optional(),response_type:t.z.custom().optional(),response_mode:t.z.custom().optional()}),S=t.z.object({id:t.z.string(),created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e)}).extend(b.shape),f=t.z.object({name:t.z.string(),audience:t.z.string(),sender_email:t.z.string().email(),sender_name:t.z.string(),support_url:t.z.string().url().optional(),logo:t.z.string().url().optional(),primary_color:t.z.string().optional(),secondary_color:t.z.string().optional(),language:t.z.string().optional(),id:t.z.string().optional()}),k=t.z.object({created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e),...f.shape,id:t.z.string()}),Q=t.z.object({logoUrl:t.z.string(),loginBackgroundImage:t.z.string().nullish(),style:t.z.object({primaryColor:t.z.string(),buttonTextColor:t.z.string(),primaryHoverColor:t.z.string()}),supportEmail:t.z.string().nullable(),supportUrl:t.z.string().nullable(),name:t.z.string(),showGreyishBackground:t.z.boolean().optional(),termsAndConditionsUrl:t.z.string().nullable(),companyName:t.z.string().optional(),checkoutHideSocial:t.z.boolean().optional(),siteUrl:t.z.string().nullable(),manageSubscriptionsUrl:t.z.string().optional()}),V=t.z.object({domain:t.z.string(),dkim_private_key:t.z.string().optional(),dkim_public_key:t.z.string().optional(),email_api_key:t.z.string().optional(),email_service:t.z.string().optional()});t.z.object({...m.shape,domains:t.z.array(V),tenant:k,connections:t.z.array(S)});const y=t.z.enum(["password_reset","email_verification","otp","authorization_code","oauth2_state","ticket"]),I=t.z.object({code_id:t.z.string().openapi({description:"The code that will be used in for instance an email verification flow"}),login_id:t.z.string().openapi({description:"The id of the login session that the code is connected to"}),connection_id:t.z.string().optional().openapi({description:"The connection that the code is connected to"}),code_type:y,code_verifier:t.z.string().optional().openapi({description:"The code verifier used in PKCE in outbound flows"}),expires_at:t.z.string(),used_at:t.z.string().optional(),user_id:t.z.string().optional()}),Y=t.z.object({...I.shape,created_at:t.z.string()}),w=t.z.object({domain:t.z.string(),dkim_private_key:t.z.string().optional(),dkim_public_key:t.z.string().optional(),email_api_key:t.z.string().optional(),email_service:t.z.string().optional()}),X=a.extend({...w.shape,id:t.z.string()}),E=t.z.object({trigger_id:t.z.enum(["pre-user-signup","post-user-registration","post-user-login"]),enabled:t.z.boolean().default(!1),url:t.z.string(),hook_id:t.z.string().optional(),synchronous:t.z.boolean().default(!1),priority:t.z.number().optional()}),J=E.extend({...a.shape,hook_id:t.z.string()}),C=t.z.object({alg:t.z.enum(["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512"]),e:t.z.string(),kid:t.z.string(),kty:t.z.enum(["RSA","EC","oct"]),n:t.z.string(),x5t:t.z.string().optional(),x5c:t.z.array(t.z.string()).optional(),use:t.z.enum(["sig","enc"]).optional()}),Z=t.z.object({keys:t.z.array(C)}),$=t.z.object({issuer:t.z.string(),authorization_endpoint:t.z.string(),token_endpoint:t.z.string(),device_authorization_endpoint:t.z.string(),userinfo_endpoint:t.z.string(),mfa_challenge_endpoint:t.z.string(),jwks_uri:t.z.string(),registration_endpoint:t.z.string(),revocation_endpoint:t.z.string(),scopes_supported:t.z.array(t.z.string()),response_types_supported:t.z.array(t.z.string()),code_challenge_methods_supported:t.z.array(t.z.string()),response_modes_supported:t.z.array(t.z.string()),subject_types_supported:t.z.array(t.z.string()),id_token_signing_alg_values_supported:t.z.array(t.z.string()),token_endpoint_auth_methods_supported:t.z.array(t.z.string()),claims_supported:t.z.array(t.z.string()),request_uri_parameter_supported:t.z.boolean(),request_parameter_supported:t.z.boolean(),token_endpoint_auth_signing_alg_values_supported:t.z.array(t.z.string())}),j=t.z.object({auth0Client:t.z.string().optional(),authParams:h,expires_at:t.z.string(),deleted_at:t.z.string().optional(),ip:t.z.string().optional(),useragent:t.z.string().optional()}).openapi({description:"This represents a login sesion"}),tt=t.z.object({...j.shape,login_id:t.z.string().openapi({description:"This is is used as the state in the universal login"}),created_at:t.z.string(),updated_at:t.z.string()});var v=(e=>(e.FAILED_SILENT_AUTH="fsa",e.FAILED_SIGNUP="fs",e.FAILED_LOGIN="f",e.FAILED_LOGIN_INCORRECT_PASSWORD="fp",e.FAILED_CHANGE_PASSWORD="fcp",e.FAILED_BY_CONNECTOR="fc",e.FAILED_LOGIN_INVALID_EMAIL_USERNAME="fu",e.FAILED_HOOK="fh",e.FAILED_CROSS_ORIGIN_AUTHENTICATION="fcoa",e.SUCCESS_API_OPERATION="sapi",e.SUCCESS_CHANGE_PASSWORD="scp",e.SUCCESS_CHANGE_PASSWORD_REQUEST="scpr",e.SUCCESS_CHANGE_USERNAME="scu",e.SUCCESS_CROSS_ORIGIN_AUTHENTICATION="scoa",e.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN="seacft",e.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN="serft",e.SUCCESS_LOGIN="s",e.SUCCESS_LOGOUT="slo",e.SUCCESS_SIGNUP="ss",e.SUCCESS_SILENT_AUTH="ssa",e.SUCCESS_VERIFICATION_EMAIL="sv",e.SUCCESS_VERIFICATION_EMAIL_REQUEST="svr",e.CODE_LINK_SENT="cls",e.BLOCKED_ACCOUNT_EMAIL="limit_wc",e.BLOCKED_ACCOUNT_IP="limit_sul",e.BLOCKED_IP_ADDRESS="limit_mu",e))(v||{});const et=t.z.enum(["cls","fsa","fs","f","fc","fcoa","fcp","fh","fp","fs","fu","s","sapi","scoa","scp","scpr","scu","seacft","serft","slo","ss","ssa","sv","svr"]),A=t.z.object({name:t.z.string(),version:t.z.string(),env:t.z.object({node:t.z.string().optional()}).optional()}),nt=t.z.object({type:et,date:t.z.string(),description:t.z.string().optional(),log_id:t.z.string().optional(),_id:t.z.string().optional(),ip:t.z.string(),user_agent:t.z.string(),details:t.z.any().optional(),isMobile:t.z.boolean(),user_id:t.z.string().optional(),user_name:t.z.string().optional(),connection:t.z.string().optional(),connection_id:t.z.string().optional(),client_id:t.z.string().optional(),client_name:t.z.string().optional(),audience:t.z.string().optional(),scope:t.z.array(t.z.string()).optional(),strategy:t.z.string().optional(),strategy_type:t.z.string().optional(),hostname:t.z.string().optional(),auth0_client:A.optional()}),O=t.z.object({user_id:t.z.string(),password:t.z.string(),algorithm:t.z.enum(["bcrypt","argon2id"]).default("argon2id")}),it=t.z.object({...O.shape,created_at:t.z.string(),updated_at:t.z.string()}),U=t.z.object({initial_user_agent:t.z.string().describe("First user agent of the device from which this user logged in"),initial_ip:t.z.string().describe("First IP address associated with this session"),initial_asn:t.z.string().describe("First autonomous system number associated with this session"),last_user_agent:t.z.string().describe("Last user agent of the device from which this user logged in"),last_ip:t.z.string().describe("Last IP address from which this user logged in"),last_asn:t.z.string().describe("Last autonomous system number from which this user logged in")}),N=t.z.object({id:t.z.string(),revoked_at:t.z.string().optional(),used_at:t.z.string().optional(),user_id:t.z.string().describe("The user ID associated with the session"),expires_at:t.z.string().optional(),idle_expires_at:t.z.string().optional(),device:U.describe("Metadata related to the device used in the session"),clients:t.z.array(t.z.string()).describe("List of client details for the session")}),ot=t.z.object({created_at:t.z.string(),updated_at:t.z.string(),authenticated_at:t.z.string(),last_interaction_at:t.z.string(),...N.shape}),at=t.z.object({kid:t.z.string().openapi({description:"The key id of the signing key"}),cert:t.z.string().openapi({description:"The public certificate of the signing key"}),fingerprint:t.z.string().openapi({description:"The cert fingerprint"}),thumbprint:t.z.string().openapi({description:"The cert thumbprint"}),pkcs7:t.z.string().optional().openapi({description:"The private key in pkcs7 format"}),current:t.z.boolean().optional().openapi({description:"True if the key is the current key"}),next:t.z.boolean().optional().openapi({description:"True if the key is the next key"}),previous:t.z.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:t.z.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:t.z.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:t.z.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:t.z.string().optional().openapi({description:"The date and time when the key was revoked"})});var R=(e=>(e.RefreshToken="refresh_token",e.AuthorizationCode="authorization_code",e.ClientCredential="client_credentials",e.Passwordless="passwordless",e.Password="password",e))(R||{});const st=t.z.object({access_token:t.z.string(),id_token:t.z.string().optional(),scope:t.z.string().optional(),state:t.z.string().optional(),refresh_token:t.z.string().optional(),token_type:t.z.string(),expires_in:t.z.number()});t.z.object({code:t.z.string(),state:t.z.string().optional()});const T=t.z.object({button_border_radius:t.z.number(),button_border_weight:t.z.number(),buttons_style:t.z.enum(["pill"]),input_border_radius:t.z.number(),input_border_weight:t.z.number(),inputs_style:t.z.enum(["pill"]),show_widget_shadow:t.z.boolean(),widget_border_weight:t.z.number(),widget_corner_radius:t.z.number()}),D=t.z.object({base_focus_color:t.z.string(),base_hover_color:t.z.string(),body_text:t.z.string(),captcha_widget_theme:t.z.enum(["auto"]),error:t.z.string(),header:t.z.string(),icons:t.z.string(),input_background:t.z.string(),input_border:t.z.string(),input_filled_text:t.z.string(),input_labels_placeholders:t.z.string(),links_focused_components:t.z.string(),primary_button:t.z.string(),primary_button_label:t.z.string(),secondary_button_border:t.z.string(),secondary_button_label:t.z.string(),success:t.z.string(),widget_background:t.z.string(),widget_border:t.z.string()}),n=t.z.object({bold:t.z.boolean(),size:t.z.number()}),x=t.z.object({body_text:n,buttons_text:n,font_url:t.z.string(),input_labels:n,links:n,links_style:t.z.enum(["normal"]),reference_text_size:t.z.number(),subtitle:n,title:n}),P=t.z.object({background_color:t.z.string(),background_image_url:t.z.string(),page_layout:t.z.enum(["center"])}),F=t.z.object({header_text_alignment:t.z.enum(["center"]),logo_height:t.z.number(),logo_position:t.z.enum(["center"]),logo_url:t.z.string(),social_buttons_layout:t.z.enum(["bottom"])}),H=t.z.object({borders:T,colors:D,displayName:t.z.string(),fonts:x,page_background:P,widget:F}),rt=H.extend({themeId:t.z.string()}),lt=t.z.object({universal_login_experience:t.z.enum(["new","classic"]).default("new"),identifier_first:t.z.boolean().default(!0),password_first:t.z.boolean().default(!1),webauthn_platform_first_factor:t.z.boolean()}),ct=t.z.object({name:t.z.string(),enabled:t.z.boolean().optional().default(!0),default_from_address:t.z.string().optional(),credentials:t.z.union([t.z.object({accessKeyId:t.z.string(),secretAccessKey:t.z.string(),region:t.z.string()}),t.z.object({smtp_host:t.z.array(t.z.string()),smtp_port:t.z.number(),smtp_user:t.z.string(),smtp_pass:t.z.string()}),t.z.object({api_key:t.z.string(),domain:t.z.string().optional()}),t.z.object({connectionString:t.z.string()}),t.z.object({tenantId:t.z.string(),clientId:t.z.string(),clientSecret:t.z.string()})]),settings:t.z.object({}).optional()}),K=t.z.object({id:t.z.string(),session_id:t.z.string(),user_id:t.z.string(),client_id:t.z.string(),expires_at:t.z.string().optional(),idle_expires_at:t.z.string().optional(),last_exchanged_at:t.z.string().optional(),device:U,resource_servers:t.z.array(t.z.object({audience:t.z.string(),scopes:t.z.string()})),rotating:t.z.boolean()}),pt=t.z.object({created_at:t.z.string(),...K.shape});function zt(e){const[i,o]=e.split("|");if(!i||!o)throw new Error(`Invalid user_id: ${e}`);return{connection:i,id:o}}exports.Auth0Client=A;exports.AuthorizationResponseMode=l;exports.AuthorizationResponseType=r;exports.CodeChallengeMethod=c;exports.GrantType=R;exports.LogTypes=v;exports.applicationInsertSchema=u;exports.applicationSchema=m;exports.auth0UserResponseSchema=L;exports.authParamsSchema=h;exports.baseUserSchema=s;exports.bordersSchema=T;exports.brandingSchema=W;exports.codeInsertSchema=I;exports.codeSchema=Y;exports.codeTypeSchema=y;exports.colorsSchema=D;exports.connectionInsertSchema=b;exports.connectionSchema=S;exports.domainInsertSchema=w;exports.domainSchema=X;exports.emailProviderSchema=ct;exports.fontDetailsSchema=n;exports.fontsSchema=x;exports.hookInsertSchema=E;exports.hookSchema=J;exports.identitySchema=z;exports.jwksKeySchema=Z;exports.jwksSchema=C;exports.logSchema=nt;exports.loginInsertSchema=j;exports.loginSchema=tt;exports.openIDConfigurationSchema=$;exports.pageBackgroundSchema=P;exports.parseUserId=zt;exports.passwordInsertSchema=O;exports.passwordSchema=it;exports.profileDataSchema=p;exports.promptSettingSchema=lt;exports.refreshTokenInsertSchema=K;exports.refreshTokenSchema=pt;exports.samlpAddon=_;exports.sessionInsertSchema=N;exports.sessionSchema=ot;exports.signingKeySchema=at;exports.tenantInsertSchema=f;exports.tenantSchema=k;exports.themeInsertSchema=H;exports.themeSchema=rt;exports.tokenResponseSchema=st;exports.totalsSchema=G;exports.userInsertSchema=d;exports.userResponseSchema=B;exports.userSchema=g;exports.vendorSettingsSchema=Q;exports.widgetSchema=F;
@@ -2698,9 +2698,8 @@ export declare const passwordSchema: z.ZodObject<{
2698
2698
  export type Password = z.infer<typeof passwordSchema>;
2699
2699
  export declare const sessionInsertSchema: z.ZodObject<{
2700
2700
  id: z.ZodString;
2701
- client_id: z.ZodString;
2702
2701
  revoked_at: z.ZodOptional<z.ZodString>;
2703
- used_at: z.ZodString;
2702
+ used_at: z.ZodOptional<z.ZodString>;
2704
2703
  user_id: z.ZodString;
2705
2704
  expires_at: z.ZodOptional<z.ZodString>;
2706
2705
  idle_expires_at: z.ZodOptional<z.ZodString>;
@@ -2730,8 +2729,6 @@ export declare const sessionInsertSchema: z.ZodObject<{
2730
2729
  }, "strip", z.ZodTypeAny, {
2731
2730
  user_id: string;
2732
2731
  id: string;
2733
- client_id: string;
2734
- used_at: string;
2735
2732
  device: {
2736
2733
  last_ip: string;
2737
2734
  initial_user_agent: string;
@@ -2742,13 +2739,12 @@ export declare const sessionInsertSchema: z.ZodObject<{
2742
2739
  };
2743
2740
  clients: string[];
2744
2741
  expires_at?: string | undefined;
2742
+ used_at?: string | undefined;
2745
2743
  revoked_at?: string | undefined;
2746
2744
  idle_expires_at?: string | undefined;
2747
2745
  }, {
2748
2746
  user_id: string;
2749
2747
  id: string;
2750
- client_id: string;
2751
- used_at: string;
2752
2748
  device: {
2753
2749
  last_ip: string;
2754
2750
  initial_user_agent: string;
@@ -2759,15 +2755,15 @@ export declare const sessionInsertSchema: z.ZodObject<{
2759
2755
  };
2760
2756
  clients: string[];
2761
2757
  expires_at?: string | undefined;
2758
+ used_at?: string | undefined;
2762
2759
  revoked_at?: string | undefined;
2763
2760
  idle_expires_at?: string | undefined;
2764
2761
  }>;
2765
2762
  export type SessionInsert = z.infer<typeof sessionInsertSchema>;
2766
2763
  export declare const sessionSchema: z.ZodObject<{
2767
2764
  id: z.ZodString;
2768
- client_id: z.ZodString;
2769
2765
  revoked_at: z.ZodOptional<z.ZodString>;
2770
- used_at: z.ZodString;
2766
+ used_at: z.ZodOptional<z.ZodString>;
2771
2767
  user_id: z.ZodString;
2772
2768
  expires_at: z.ZodOptional<z.ZodString>;
2773
2769
  idle_expires_at: z.ZodOptional<z.ZodString>;
@@ -2803,8 +2799,6 @@ export declare const sessionSchema: z.ZodObject<{
2803
2799
  updated_at: string;
2804
2800
  user_id: string;
2805
2801
  id: string;
2806
- client_id: string;
2807
- used_at: string;
2808
2802
  device: {
2809
2803
  last_ip: string;
2810
2804
  initial_user_agent: string;
@@ -2817,6 +2811,7 @@ export declare const sessionSchema: z.ZodObject<{
2817
2811
  authenticated_at: string;
2818
2812
  last_interaction_at: string;
2819
2813
  expires_at?: string | undefined;
2814
+ used_at?: string | undefined;
2820
2815
  revoked_at?: string | undefined;
2821
2816
  idle_expires_at?: string | undefined;
2822
2817
  }, {
@@ -2824,8 +2819,6 @@ export declare const sessionSchema: z.ZodObject<{
2824
2819
  updated_at: string;
2825
2820
  user_id: string;
2826
2821
  id: string;
2827
- client_id: string;
2828
- used_at: string;
2829
2822
  device: {
2830
2823
  last_ip: string;
2831
2824
  initial_user_agent: string;
@@ -2838,6 +2831,7 @@ export declare const sessionSchema: z.ZodObject<{
2838
2831
  authenticated_at: string;
2839
2832
  last_interaction_at: string;
2840
2833
  expires_at?: string | undefined;
2834
+ used_at?: string | undefined;
2841
2835
  revoked_at?: string | undefined;
2842
2836
  idle_expires_at?: string | undefined;
2843
2837
  }>;
@@ -4305,13 +4299,14 @@ export declare const emailProviderSchema: z.ZodObject<{
4305
4299
  }>;
4306
4300
  export type EmailProvider = z.infer<typeof emailProviderSchema>;
4307
4301
  export declare const refreshTokenInsertSchema: z.ZodObject<{
4308
- token: z.ZodString;
4302
+ id: z.ZodString;
4309
4303
  session_id: z.ZodString;
4310
4304
  user_id: z.ZodString;
4305
+ client_id: z.ZodString;
4311
4306
  expires_at: z.ZodOptional<z.ZodString>;
4312
4307
  idle_expires_at: z.ZodOptional<z.ZodString>;
4313
4308
  last_exchanged_at: z.ZodOptional<z.ZodString>;
4314
- device: z.ZodOptional<z.ZodObject<{
4309
+ device: z.ZodObject<{
4315
4310
  initial_user_agent: z.ZodString;
4316
4311
  initial_ip: z.ZodString;
4317
4312
  initial_asn: z.ZodString;
@@ -4332,7 +4327,7 @@ export declare const refreshTokenInsertSchema: z.ZodObject<{
4332
4327
  initial_asn: string;
4333
4328
  last_user_agent: string;
4334
4329
  last_asn: string;
4335
- }>>;
4330
+ }>;
4336
4331
  resource_servers: z.ZodArray<z.ZodObject<{
4337
4332
  audience: z.ZodString;
4338
4333
  scopes: z.ZodString;
@@ -4346,7 +4341,16 @@ export declare const refreshTokenInsertSchema: z.ZodObject<{
4346
4341
  rotating: z.ZodBoolean;
4347
4342
  }, "strip", z.ZodTypeAny, {
4348
4343
  user_id: string;
4349
- token: string;
4344
+ id: string;
4345
+ client_id: string;
4346
+ device: {
4347
+ last_ip: string;
4348
+ initial_user_agent: string;
4349
+ initial_ip: string;
4350
+ initial_asn: string;
4351
+ last_user_agent: string;
4352
+ last_asn: string;
4353
+ };
4350
4354
  session_id: string;
4351
4355
  resource_servers: {
4352
4356
  audience: string;
@@ -4355,18 +4359,19 @@ export declare const refreshTokenInsertSchema: z.ZodObject<{
4355
4359
  rotating: boolean;
4356
4360
  expires_at?: string | undefined;
4357
4361
  idle_expires_at?: string | undefined;
4358
- device?: {
4362
+ last_exchanged_at?: string | undefined;
4363
+ }, {
4364
+ user_id: string;
4365
+ id: string;
4366
+ client_id: string;
4367
+ device: {
4359
4368
  last_ip: string;
4360
4369
  initial_user_agent: string;
4361
4370
  initial_ip: string;
4362
4371
  initial_asn: string;
4363
4372
  last_user_agent: string;
4364
4373
  last_asn: string;
4365
- } | undefined;
4366
- last_exchanged_at?: string | undefined;
4367
- }, {
4368
- user_id: string;
4369
- token: string;
4374
+ };
4370
4375
  session_id: string;
4371
4376
  resource_servers: {
4372
4377
  audience: string;
@@ -4375,25 +4380,18 @@ export declare const refreshTokenInsertSchema: z.ZodObject<{
4375
4380
  rotating: boolean;
4376
4381
  expires_at?: string | undefined;
4377
4382
  idle_expires_at?: string | undefined;
4378
- device?: {
4379
- last_ip: string;
4380
- initial_user_agent: string;
4381
- initial_ip: string;
4382
- initial_asn: string;
4383
- last_user_agent: string;
4384
- last_asn: string;
4385
- } | undefined;
4386
4383
  last_exchanged_at?: string | undefined;
4387
4384
  }>;
4388
4385
  export type RefreshTokenInsert = z.infer<typeof refreshTokenInsertSchema>;
4389
4386
  export declare const refreshTokenSchema: z.ZodObject<{
4390
- token: z.ZodString;
4387
+ id: z.ZodString;
4391
4388
  session_id: z.ZodString;
4392
4389
  user_id: z.ZodString;
4390
+ client_id: z.ZodString;
4393
4391
  expires_at: z.ZodOptional<z.ZodString>;
4394
4392
  idle_expires_at: z.ZodOptional<z.ZodString>;
4395
4393
  last_exchanged_at: z.ZodOptional<z.ZodString>;
4396
- device: z.ZodOptional<z.ZodObject<{
4394
+ device: z.ZodObject<{
4397
4395
  initial_user_agent: z.ZodString;
4398
4396
  initial_ip: z.ZodString;
4399
4397
  initial_asn: z.ZodString;
@@ -4414,7 +4412,7 @@ export declare const refreshTokenSchema: z.ZodObject<{
4414
4412
  initial_asn: string;
4415
4413
  last_user_agent: string;
4416
4414
  last_asn: string;
4417
- }>>;
4415
+ }>;
4418
4416
  resource_servers: z.ZodArray<z.ZodObject<{
4419
4417
  audience: z.ZodString;
4420
4418
  scopes: z.ZodString;
@@ -4430,7 +4428,16 @@ export declare const refreshTokenSchema: z.ZodObject<{
4430
4428
  }, "strip", z.ZodTypeAny, {
4431
4429
  created_at: string;
4432
4430
  user_id: string;
4433
- token: string;
4431
+ id: string;
4432
+ client_id: string;
4433
+ device: {
4434
+ last_ip: string;
4435
+ initial_user_agent: string;
4436
+ initial_ip: string;
4437
+ initial_asn: string;
4438
+ last_user_agent: string;
4439
+ last_asn: string;
4440
+ };
4434
4441
  session_id: string;
4435
4442
  resource_servers: {
4436
4443
  audience: string;
@@ -4439,19 +4446,20 @@ export declare const refreshTokenSchema: z.ZodObject<{
4439
4446
  rotating: boolean;
4440
4447
  expires_at?: string | undefined;
4441
4448
  idle_expires_at?: string | undefined;
4442
- device?: {
4449
+ last_exchanged_at?: string | undefined;
4450
+ }, {
4451
+ created_at: string;
4452
+ user_id: string;
4453
+ id: string;
4454
+ client_id: string;
4455
+ device: {
4443
4456
  last_ip: string;
4444
4457
  initial_user_agent: string;
4445
4458
  initial_ip: string;
4446
4459
  initial_asn: string;
4447
4460
  last_user_agent: string;
4448
4461
  last_asn: string;
4449
- } | undefined;
4450
- last_exchanged_at?: string | undefined;
4451
- }, {
4452
- created_at: string;
4453
- user_id: string;
4454
- token: string;
4462
+ };
4455
4463
  session_id: string;
4456
4464
  resource_servers: {
4457
4465
  audience: string;
@@ -4460,14 +4468,6 @@ export declare const refreshTokenSchema: z.ZodObject<{
4460
4468
  rotating: boolean;
4461
4469
  expires_at?: string | undefined;
4462
4470
  idle_expires_at?: string | undefined;
4463
- device?: {
4464
- last_ip: string;
4465
- initial_user_agent: string;
4466
- initial_ip: string;
4467
- initial_asn: string;
4468
- last_user_agent: string;
4469
- last_asn: string;
4470
- } | undefined;
4471
4471
  last_exchanged_at?: string | undefined;
4472
4472
  }>;
4473
4473
  export type RefreshToken = z.infer<typeof refreshTokenSchema>;
@@ -431,9 +431,8 @@ const D = t.enum([
431
431
  last_asn: t.string().describe("Last autonomous system number from which this user logged in")
432
432
  }), P = t.object({
433
433
  id: t.string(),
434
- client_id: t.string(),
435
434
  revoked_at: t.string().optional(),
436
- used_at: t.string(),
435
+ used_at: t.string().optional(),
437
436
  user_id: t.string().describe("The user ID associated with the session"),
438
437
  expires_at: t.string().optional(),
439
438
  idle_expires_at: t.string().optional(),
@@ -580,17 +579,18 @@ const H = t.object({
580
579
  settings: t.object({}).optional()
581
580
  }), W = t.object({
582
581
  // The actual refresh token value (primary key).
583
- token: t.string(),
582
+ id: t.string(),
584
583
  // Link to the session record
585
584
  session_id: t.string(),
586
585
  // Link to user (foreign key)
587
586
  user_id: t.string(),
587
+ client_id: t.string(),
588
588
  // When the refresh token expires.
589
589
  expires_at: t.string().optional(),
590
590
  idle_expires_at: t.string().optional(),
591
591
  // When the token was last used.
592
592
  last_exchanged_at: t.string().optional(),
593
- device: p.optional(),
593
+ device: p,
594
594
  resource_servers: t.array(
595
595
  t.object({
596
596
  audience: t.string(),
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "0.44.0",
14
+ "version": "0.46.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],