@authhero/adapter-interfaces 0.37.0 → 0.40.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"),H=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()}),K=g,G=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()),B="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let M=(e=21)=>{let i="",o=crypto.getRandomValues(new Uint8Array(e));for(;e--;)i+=B[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(()=>M()).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()}),L=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()}),y=t.z.object({created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e),id:t.z.string(),...f.shape}),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()}),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()});t.z.object({...m.shape,domains:t.z.array(W),tenant:y,connections:t.z.array(S)});const k=t.z.enum(["password_reset","email_verification","otp","authorization_code","oauth2_state","ticket"]),E=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:k,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()}),Q=t.z.object({...E.shape,created_at:t.z.string()}),I=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()}),V=a.extend({...I.shape,id:t.z.string()}),C=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()}),Y=C.extend({...a.shape,hook_id:t.z.string()}),w=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()}),X=t.z.object({keys:t.z.array(w)}),J=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"}),Z=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 $=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()}),tt=t.z.object({type:$,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")}),et=t.z.object({...O.shape,created_at:t.z.string(),updated_at:t.z.string()}),U=t.z.object({session_id:t.z.string(),client_id:t.z.string(),expires_at:t.z.string(),used_at:t.z.string(),deleted_at:t.z.string().optional(),user_id:t.z.string()}),nt=t.z.object({created_at:t.z.string(),...U.shape}),it=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 N=(e=>(e.RefreshToken="refresh_token",e.AuthorizationCode="authorization_code",e.ClientCredential="client_credentials",e.Passwordless="passwordless",e.Password="password",e))(N||{});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 R=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()}),T=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"])}),x=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"])}),F=t.z.object({borders:R,colors:D,displayName:t.z.string(),fonts:T,page_background:P,widget:x}),ot=F.extend({themeId:t.z.string()}),at=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()}),st=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()});function rt(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=N;exports.LogTypes=v;exports.applicationInsertSchema=u;exports.applicationSchema=m;exports.auth0UserResponseSchema=K;exports.authParamsSchema=h;exports.baseUserSchema=s;exports.bordersSchema=R;exports.brandingSchema=L;exports.codeInsertSchema=E;exports.codeSchema=Q;exports.codeTypeSchema=k;exports.colorsSchema=D;exports.connectionInsertSchema=b;exports.connectionSchema=S;exports.domainInsertSchema=I;exports.domainSchema=V;exports.emailProviderSchema=st;exports.fontDetailsSchema=n;exports.fontsSchema=T;exports.hookInsertSchema=C;exports.hookSchema=Y;exports.identitySchema=z;exports.jwksKeySchema=X;exports.jwksSchema=w;exports.logSchema=tt;exports.loginInsertSchema=j;exports.loginSchema=Z;exports.openIDConfigurationSchema=J;exports.pageBackgroundSchema=P;exports.parseUserId=rt;exports.passwordInsertSchema=O;exports.passwordSchema=et;exports.profileDataSchema=p;exports.promptSettingSchema=at;exports.samlpAddon=_;exports.sessionInsertSchema=U;exports.sessionSchema=nt;exports.signingKeySchema=it;exports.tenantInsertSchema=f;exports.tenantSchema=y;exports.themeInsertSchema=F;exports.themeSchema=ot;exports.totalsSchema=H;exports.userInsertSchema=d;exports.userResponseSchema=G;exports.userSchema=g;exports.vendorSettingsSchema=q;exports.widgetSchema=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@hono/zod-openapi"),K=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()}),G=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 L=(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(()=>L()).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()}),q=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()}),k=t.z.object({created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e),id:t.z.string(),...f.shape}),W=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()}),Q=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(Q),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()}),V=t.z.object({...I.shape,created_at:t.z.string()}),E=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()}),Y=a.extend({...E.shape,id:t.z.string()}),C=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()}),X=C.extend({...a.shape,hook_id:t.z.string()}),w=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()}),J=t.z.object({keys:t.z.array(w)}),Z=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"}),$=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 tt=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()}),et=t.z.object({type:tt,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")}),nt=t.z.object({...O.shape,created_at:t.z.string(),updated_at:t.z.string()}),U=t.z.object({session_id:t.z.string(),client_id:t.z.string(),expires_at:t.z.string(),used_at:t.z.string(),deleted_at:t.z.string().optional(),user_id:t.z.string()}),it=t.z.object({created_at:t.z.string(),...U.shape}),ot=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 N=(e=>(e.RefreshToken="refresh_token",e.AuthorizationCode="authorization_code",e.ClientCredential="client_credentials",e.Passwordless="passwordless",e.Password="password",e))(N||{});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 R=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()}),T=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()}),D=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"])}),x=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"])}),F=t.z.object({borders:R,colors:T,displayName:t.z.string(),fonts:D,page_background:P,widget:x}),at=F.extend({themeId:t.z.string()}),st=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()}),rt=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()}),H=t.z.object({token:t.z.string(),session_id:t.z.string(),scope:t.z.string(),audience:t.z.string(),expires_at:t.z.string(),used_at:t.z.string().optional(),revoked_at:t.z.string().optional()}),lt=t.z.object({created_at:t.z.string(),...H.shape});function ct(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=N;exports.LogTypes=v;exports.applicationInsertSchema=u;exports.applicationSchema=m;exports.auth0UserResponseSchema=G;exports.authParamsSchema=h;exports.baseUserSchema=s;exports.bordersSchema=R;exports.brandingSchema=q;exports.codeInsertSchema=I;exports.codeSchema=V;exports.codeTypeSchema=y;exports.colorsSchema=T;exports.connectionInsertSchema=b;exports.connectionSchema=S;exports.domainInsertSchema=E;exports.domainSchema=Y;exports.emailProviderSchema=rt;exports.fontDetailsSchema=n;exports.fontsSchema=D;exports.hookInsertSchema=C;exports.hookSchema=X;exports.identitySchema=z;exports.jwksKeySchema=J;exports.jwksSchema=w;exports.logSchema=et;exports.loginInsertSchema=j;exports.loginSchema=$;exports.openIDConfigurationSchema=Z;exports.pageBackgroundSchema=P;exports.parseUserId=ct;exports.passwordInsertSchema=O;exports.passwordSchema=nt;exports.profileDataSchema=p;exports.promptSettingSchema=st;exports.refreshTokenInsertSchema=H;exports.refreshTokenSchema=lt;exports.samlpAddon=_;exports.sessionInsertSchema=U;exports.sessionSchema=it;exports.signingKeySchema=ot;exports.tenantInsertSchema=f;exports.tenantSchema=k;exports.themeInsertSchema=F;exports.themeSchema=at;exports.totalsSchema=K;exports.userInsertSchema=d;exports.userResponseSchema=B;exports.userSchema=g;exports.vendorSettingsSchema=W;exports.widgetSchema=x;
@@ -2222,6 +2222,16 @@ export declare const openIDConfigurationSchema: z.ZodObject<{
2222
2222
  request_parameter_supported: boolean;
2223
2223
  token_endpoint_auth_signing_alg_values_supported: string[];
2224
2224
  }>;
2225
+ export interface ListParams {
2226
+ page: number;
2227
+ per_page: number;
2228
+ include_totals: boolean;
2229
+ q?: string;
2230
+ sort?: {
2231
+ sort_by: string;
2232
+ sort_order: "asc" | "desc";
2233
+ };
2234
+ }
2225
2235
  export declare const loginInsertSchema: z.ZodObject<{
2226
2236
  auth0Client: z.ZodOptional<z.ZodString>;
2227
2237
  authParams: z.ZodObject<{
@@ -4207,20 +4217,65 @@ export declare const emailProviderSchema: z.ZodObject<{
4207
4217
  settings?: {} | undefined;
4208
4218
  }>;
4209
4219
  export type EmailProvider = z.infer<typeof emailProviderSchema>;
4220
+ export declare const refreshTokenInsertSchema: z.ZodObject<{
4221
+ token: z.ZodString;
4222
+ session_id: z.ZodString;
4223
+ scope: z.ZodString;
4224
+ audience: z.ZodString;
4225
+ expires_at: z.ZodString;
4226
+ used_at: z.ZodOptional<z.ZodString>;
4227
+ revoked_at: z.ZodOptional<z.ZodString>;
4228
+ }, "strip", z.ZodTypeAny, {
4229
+ audience: string;
4230
+ token: string;
4231
+ scope: string;
4232
+ expires_at: string;
4233
+ session_id: string;
4234
+ used_at?: string | undefined;
4235
+ revoked_at?: string | undefined;
4236
+ }, {
4237
+ audience: string;
4238
+ token: string;
4239
+ scope: string;
4240
+ expires_at: string;
4241
+ session_id: string;
4242
+ used_at?: string | undefined;
4243
+ revoked_at?: string | undefined;
4244
+ }>;
4245
+ export type RefreshTokenInsert = z.infer<typeof refreshTokenInsertSchema>;
4246
+ export declare const refreshTokenSchema: z.ZodObject<{
4247
+ token: z.ZodString;
4248
+ session_id: z.ZodString;
4249
+ scope: z.ZodString;
4250
+ audience: z.ZodString;
4251
+ expires_at: z.ZodString;
4252
+ used_at: z.ZodOptional<z.ZodString>;
4253
+ revoked_at: z.ZodOptional<z.ZodString>;
4254
+ created_at: z.ZodString;
4255
+ }, "strip", z.ZodTypeAny, {
4256
+ created_at: string;
4257
+ audience: string;
4258
+ token: string;
4259
+ scope: string;
4260
+ expires_at: string;
4261
+ session_id: string;
4262
+ used_at?: string | undefined;
4263
+ revoked_at?: string | undefined;
4264
+ }, {
4265
+ created_at: string;
4266
+ audience: string;
4267
+ token: string;
4268
+ scope: string;
4269
+ expires_at: string;
4270
+ session_id: string;
4271
+ used_at?: string | undefined;
4272
+ revoked_at?: string | undefined;
4273
+ }>;
4274
+ export type RefreshToken = z.infer<typeof refreshTokenSchema>;
4210
4275
  export declare function parseUserId(user_id: string): {
4211
4276
  connection: string;
4212
4277
  id: string;
4213
4278
  };
4214
- export interface ListParams {
4215
- page: number;
4216
- per_page: number;
4217
- include_totals: boolean;
4218
- q?: string;
4219
- sort?: {
4220
- sort_by: string;
4221
- sort_order: "asc" | "desc";
4222
- };
4223
- }
4224
4279
  export interface ListCodesResponse extends Totals {
4225
4280
  codes: Code[];
4226
4281
  }
@@ -4354,6 +4409,16 @@ export interface EmailProvidersAdapter {
4354
4409
  create: (tenant_id: string, emailProvider: EmailProvider) => Promise<void>;
4355
4410
  get: (tenant_id: string) => Promise<EmailProvider | null>;
4356
4411
  }
4412
+ export interface ListRefreshTokenResponse extends Totals {
4413
+ refresh_tokens: RefreshToken[];
4414
+ }
4415
+ export interface RefreshTokensAdapter {
4416
+ create: (tenant_id: string, refresh_token: RefreshTokenInsert) => Promise<RefreshToken>;
4417
+ get: (tenant_id: string, id: string) => Promise<RefreshToken | null>;
4418
+ list(tenant_id: string, params?: ListParams): Promise<ListRefreshTokenResponse>;
4419
+ update: (tenant_id: string, id: string, refresh_token: Partial<RefreshToken>) => Promise<boolean>;
4420
+ remove: (tenant_id: string, id: string) => Promise<boolean>;
4421
+ }
4357
4422
  export interface DataAdapters {
4358
4423
  applications: ApplicationsAdapter;
4359
4424
  branding: BrandingAdapter;
@@ -4368,6 +4433,7 @@ export interface DataAdapters {
4368
4433
  logs: LogsDataAdapter;
4369
4434
  passwords: PasswordsAdapter;
4370
4435
  promptSettings: PromptSettingsAdapter;
4436
+ refreshTokens: RefreshTokensAdapter;
4371
4437
  sessions: SessionsAdapter;
4372
4438
  tenants: TenantsDataAdapter;
4373
4439
  themes: ThemesAdapter;
@@ -1,5 +1,5 @@
1
1
  import { z as t } from "@hono/zod-openapi";
2
- const W = t.object({
2
+ const q = t.object({
3
3
  start: t.number(),
4
4
  limit: t.number(),
5
5
  length: t.number()
@@ -15,7 +15,7 @@ const W = t.object({
15
15
  phone_number: t.string().optional(),
16
16
  phone_verified: t.boolean().optional(),
17
17
  family_name: t.string().optional()
18
- }).catchall(t.any()), d = t.object({
18
+ }).catchall(t.any()), g = t.object({
19
19
  connection: t.string(),
20
20
  user_id: t.string(),
21
21
  provider: t.string(),
@@ -38,7 +38,7 @@ const W = t.object({
38
38
  user_id: t.string().optional(),
39
39
  app_metadata: t.any().default({}).optional(),
40
40
  user_metadata: t.any().default({}).optional()
41
- }), g = s.extend({
41
+ }), d = s.extend({
42
42
  email_verified: t.boolean().default(!1),
43
43
  verify_email: t.boolean().optional(),
44
44
  last_ip: t.string().optional(),
@@ -48,15 +48,15 @@ const W = t.object({
48
48
  connection: t.string().default("email"),
49
49
  is_social: t.boolean().optional()
50
50
  }), _ = t.object({
51
- ...g.shape,
51
+ ...d.shape,
52
52
  ...a.shape,
53
53
  user_id: t.string(),
54
54
  is_social: t.boolean(),
55
55
  // TODO: this not might be correct if you use the username
56
56
  email: t.string(),
57
57
  login_count: t.number(),
58
- identities: t.array(d).optional()
59
- }), q = _, Q = s.extend({
58
+ identities: t.array(g).optional()
59
+ }), Q = _, V = s.extend({
60
60
  email: t.string(),
61
61
  login_count: t.number(),
62
62
  multifactor: t.array(t.string()).optional(),
@@ -139,7 +139,7 @@ const S = t.object({
139
139
  code_challenge: t.string().optional(),
140
140
  username: t.string().optional(),
141
141
  ui_locales: t.string().optional()
142
- }), V = t.object({
142
+ }), Y = t.object({
143
143
  colors: t.object({
144
144
  primary: t.string(),
145
145
  page_background: t.object({
@@ -195,7 +195,7 @@ const S = t.object({
195
195
  updated_at: t.string().transform((n) => n === null ? "" : n),
196
196
  id: t.string(),
197
197
  ...E.shape
198
- }), Y = t.object({
198
+ }), X = t.object({
199
199
  logoUrl: t.string(),
200
200
  loginBackgroundImage: t.string().nullish(),
201
201
  style: t.object({
@@ -249,7 +249,7 @@ const I = t.enum([
249
249
  expires_at: t.string(),
250
250
  used_at: t.string().optional(),
251
251
  user_id: t.string().optional()
252
- }), X = t.object({
252
+ }), z = t.object({
253
253
  ...j.shape,
254
254
  created_at: t.string()
255
255
  }), v = t.object({
@@ -258,7 +258,7 @@ const I = t.enum([
258
258
  dkim_public_key: t.string().optional(),
259
259
  email_api_key: t.string().optional(),
260
260
  email_service: t.string().optional()
261
- }), z = a.extend({
261
+ }), J = a.extend({
262
262
  ...v.shape,
263
263
  id: t.string()
264
264
  }), A = t.object({
@@ -272,7 +272,7 @@ const I = t.enum([
272
272
  hook_id: t.string().optional(),
273
273
  synchronous: t.boolean().default(!1),
274
274
  priority: t.number().optional()
275
- }), J = A.extend({
275
+ }), Z = A.extend({
276
276
  ...a.shape,
277
277
  hook_id: t.string()
278
278
  }), O = t.object({
@@ -294,9 +294,9 @@ const I = t.enum([
294
294
  x5t: t.string().optional(),
295
295
  x5c: t.array(t.string()).optional(),
296
296
  use: t.enum(["sig", "enc"]).optional()
297
- }), Z = t.object({
298
- keys: t.array(O)
299
297
  }), $ = t.object({
298
+ keys: t.array(O)
299
+ }), tt = t.object({
300
300
  issuer: t.string(),
301
301
  authorization_endpoint: t.string(),
302
302
  token_endpoint: t.string(),
@@ -326,7 +326,7 @@ const I = t.enum([
326
326
  useragent: t.string().optional()
327
327
  }).openapi({
328
328
  description: "This represents a login sesion"
329
- }), tt = t.object({
329
+ }), nt = t.object({
330
330
  ...N.shape,
331
331
  login_id: t.string().openapi({
332
332
  description: "This is is used as the state in the universal login"
@@ -390,7 +390,7 @@ const R = t.enum([
390
390
  env: t.object({
391
391
  node: t.string().optional()
392
392
  }).optional()
393
- }), nt = t.object({
393
+ }), et = t.object({
394
394
  type: R,
395
395
  date: t.string(),
396
396
  description: t.string().optional(),
@@ -417,7 +417,7 @@ const R = t.enum([
417
417
  user_id: t.string(),
418
418
  password: t.string(),
419
419
  algorithm: t.enum(["bcrypt", "argon2id"]).default("argon2id")
420
- }), et = t.object({
420
+ }), it = t.object({
421
421
  ...T.shape,
422
422
  created_at: t.string(),
423
423
  updated_at: t.string()
@@ -428,10 +428,10 @@ const R = t.enum([
428
428
  used_at: t.string(),
429
429
  deleted_at: t.string().optional(),
430
430
  user_id: t.string()
431
- }), it = t.object({
431
+ }), ot = t.object({
432
432
  created_at: t.string(),
433
433
  ...x.shape
434
- }), ot = t.object({
434
+ }), at = t.object({
435
435
  kid: t.string().openapi({ description: "The key id of the signing key" }),
436
436
  cert: t.string().openapi({ description: "The public certificate of the signing key" }),
437
437
  fingerprint: t.string().openapi({ description: "The cert fingerprint" }),
@@ -525,14 +525,14 @@ const F = t.object({
525
525
  fonts: K,
526
526
  page_background: G,
527
527
  widget: B
528
- }), at = L.extend({
528
+ }), st = L.extend({
529
529
  themeId: t.string()
530
- }), st = t.object({
530
+ }), rt = t.object({
531
531
  universal_login_experience: t.enum(["new", "classic"]).default("new"),
532
532
  identifier_first: t.boolean().default(!0),
533
533
  password_first: t.boolean().default(!1),
534
534
  webauthn_platform_first_factor: t.boolean()
535
- }), rt = t.object({
535
+ }), lt = t.object({
536
536
  name: t.string(),
537
537
  enabled: t.boolean().optional().default(!0),
538
538
  default_from_address: t.string().optional(),
@@ -562,8 +562,27 @@ const F = t.object({
562
562
  })
563
563
  ]),
564
564
  settings: t.object({}).optional()
565
+ }), M = t.object({
566
+ // The actual refresh token value (primary key).
567
+ token: t.string(),
568
+ // Link to the session record (foreign key).
569
+ session_id: t.string(),
570
+ // The scope and audience that was requested when the token was created.
571
+ scope: t.string(),
572
+ audience: t.string(),
573
+ // When the refresh token expires.
574
+ expires_at: t.string(),
575
+ // When the token was last used.
576
+ used_at: t.string().optional(),
577
+ // If the token is revoked or deleted.
578
+ revoked_at: t.string().optional()
579
+ }), ct = t.object({
580
+ // When the refresh token record was created.
581
+ created_at: t.string(),
582
+ // Spread in the rest of the refresh token properties.
583
+ ...M.shape
565
584
  });
566
- function lt(n) {
585
+ function pt(n) {
567
586
  const [i, o] = n.split("|");
568
587
  if (!i || !o)
569
588
  throw new Error(`Invalid user_id: ${n}`);
@@ -578,49 +597,51 @@ export {
578
597
  U as LogTypes,
579
598
  b as applicationInsertSchema,
580
599
  f as applicationSchema,
581
- q as auth0UserResponseSchema,
600
+ Q as auth0UserResponseSchema,
582
601
  S as authParamsSchema,
583
602
  s as baseUserSchema,
584
603
  F as bordersSchema,
585
- V as brandingSchema,
604
+ Y as brandingSchema,
586
605
  j as codeInsertSchema,
587
- X as codeSchema,
606
+ z as codeSchema,
588
607
  I as codeTypeSchema,
589
608
  H as colorsSchema,
590
609
  k as connectionInsertSchema,
591
610
  y as connectionSchema,
592
611
  v as domainInsertSchema,
593
- z as domainSchema,
594
- rt as emailProviderSchema,
612
+ J as domainSchema,
613
+ lt as emailProviderSchema,
595
614
  e as fontDetailsSchema,
596
615
  K as fontsSchema,
597
616
  A as hookInsertSchema,
598
- J as hookSchema,
599
- d as identitySchema,
600
- Z as jwksKeySchema,
617
+ Z as hookSchema,
618
+ g as identitySchema,
619
+ $ as jwksKeySchema,
601
620
  O as jwksSchema,
602
- nt as logSchema,
621
+ et as logSchema,
603
622
  N as loginInsertSchema,
604
- tt as loginSchema,
605
- $ as openIDConfigurationSchema,
623
+ nt as loginSchema,
624
+ tt as openIDConfigurationSchema,
606
625
  G as pageBackgroundSchema,
607
- lt as parseUserId,
626
+ pt as parseUserId,
608
627
  T as passwordInsertSchema,
609
- et as passwordSchema,
628
+ it as passwordSchema,
610
629
  p as profileDataSchema,
611
- st as promptSettingSchema,
630
+ rt as promptSettingSchema,
631
+ M as refreshTokenInsertSchema,
632
+ ct as refreshTokenSchema,
612
633
  h as samlpAddon,
613
634
  x as sessionInsertSchema,
614
- it as sessionSchema,
615
- ot as signingKeySchema,
635
+ ot as sessionSchema,
636
+ at as signingKeySchema,
616
637
  E as tenantInsertSchema,
617
638
  C as tenantSchema,
618
639
  L as themeInsertSchema,
619
- at as themeSchema,
620
- W as totalsSchema,
621
- g as userInsertSchema,
622
- Q as userResponseSchema,
640
+ st as themeSchema,
641
+ q as totalsSchema,
642
+ d as userInsertSchema,
643
+ V as userResponseSchema,
623
644
  _ as userSchema,
624
- Y as vendorSettingsSchema,
645
+ X as vendorSettingsSchema,
625
646
  B as widgetSchema
626
647
  };
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.37.0",
14
+ "version": "0.40.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],