@authhero/adapter-interfaces 0.55.0 → 0.57.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"),L=t.z.object({start:t.z.number(),limit:t.z.number(),length:t.z.number()}),c=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()}),a=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=a.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,...c.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()}),B=g,W=a.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()),q="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Q=(e=21)=>{let i="",o=crypto.getRandomValues(new Uint8Array(e));for(;e--;)i+=q[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 s=(e=>(e.TOKEN="token",e.TOKEN_ID_TOKEN="token id_token",e.CODE="code",e))(s||{}),r=(e=>(e.QUERY="query",e.FRAGMENT="fragment",e.FORM_POST="form_post",e.WEB_MESSAGE="web_message",e.SAML_POST="saml_post",e))(r||{}),l=(e=>(e.S256="S256",e.Plain="plain",e))(l||{});const h=t.z.object({client_id:t.z.string(),act_as:t.z.string().optional(),response_type:t.z.nativeEnum(s).optional(),response_mode:t.z.nativeEnum(r).optional(),redirect_uri:t.z.string().optional(),audience:t.z.string().optional(),organization: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(l).optional(),code_challenge:t.z.string().optional(),username:t.z.string().optional(),ui_locales:t.z.string().optional(),vendor_id:t.z.string().optional()}),V=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()}),y=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()}),Y=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()});t.z.object({...m.shape,tenant:y,connections:t.z.array(S)});const I=t.z.enum(["password_reset","email_verification","otp","authorization_code","oauth2_state","ticket"]),k=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:I,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()}),X=t.z.object({...k.shape,created_at:t.z.string()}),w=t.z.object({domain:t.z.string(),custom_domain_id:t.z.string().optional(),type:t.z.enum(["auth0_managed_certs","self_managed_certs"]),verification_method:t.z.enum(["txt"]).optional(),tls_policy:t.z.enum(["recommended"]).optional(),custom_client_ip_header:t.z.enum(["true-client-ip","cf-connecting-ip","x-forwarded-for","x-azure-clientip","null"]).optional(),domain_metadata:t.z.record(t.z.string().max(255)).optional()}),E=t.z.object({name:t.z.literal("txt"),record:t.z.string(),domain:t.z.string()}),C=t.z.object({...w.shape,custom_domain_id:t.z.string(),primary:t.z.boolean(),status:t.z.enum(["disabled","pending","pending_verification","ready"]),origin_domain_name:t.z.string().optional(),verification:t.z.object({methods:t.z.array(E)}).optional(),tls_policy:t.z.string().optional()}),J=C.extend({tenant_id:t.z.string()}),j=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()}),Z=j.extend({...c.shape,hook_id:t.z.string()}),v=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()}),$=t.z.object({keys:t.z.array(v)}),tt=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())}),A=t.z.object({csrf_token:t.z.string(),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(),session_id:t.z.string().optional(),authorization_url:t.z.string().optional()}).openapi({description:"This represents a login sesion"}),et=t.z.object({...A.shape,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 O=(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))(O||{});const nt=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"]),U=t.z.object({name:t.z.string(),version:t.z.string(),env:t.z.object({node:t.z.string().optional()}).optional()}),it=t.z.object({type:nt,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:U.optional()}),N=t.z.object({user_id:t.z.string(),password:t.z.string(),algorithm:t.z.enum(["bcrypt","argon2id"]).default("argon2id")}),ot=t.z.object({...N.shape,created_at:t.z.string(),updated_at:t.z.string()}),R=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")}),D=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:R.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")}),at=t.z.object({created_at:t.z.string(),updated_at:t.z.string(),authenticated_at:t.z.string(),last_interaction_at:t.z.string(),...D.shape}),st=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 T=(e=>(e.RefreshToken="refresh_token",e.AuthorizationCode="authorization_code",e.ClientCredential="client_credentials",e.Passwordless="passwordless",e.Password="password",e))(T||{});const rt=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 x=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()}),P=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()}),F=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}),H=t.z.object({background_color:t.z.string(),background_image_url:t.z.string(),page_layout:t.z.enum(["center"])}),K=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"])}),G=t.z.object({borders:x,colors:P,displayName:t.z.string(),fonts:F,page_background:H,widget:K}),lt=G.extend({themeId:t.z.string()}),ct=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()}),pt=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()}),M=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:R,resource_servers:t.z.array(t.z.object({audience:t.z.string(),scopes:t.z.string()})),rotating:t.z.boolean()}),zt=t.z.object({created_at:t.z.string(),...M.shape});function dt(e){const[i,o]=e.split("|");if(!i||!o)throw new Error(`Invalid user_id: ${e}`);return{connection:i,id:o}}exports.Auth0Client=U;exports.AuthorizationResponseMode=r;exports.AuthorizationResponseType=s;exports.CodeChallengeMethod=l;exports.GrantType=T;exports.LogTypes=O;exports.applicationInsertSchema=u;exports.applicationSchema=m;exports.auth0UserResponseSchema=B;exports.authParamsSchema=h;exports.baseUserSchema=a;exports.bordersSchema=x;exports.brandingSchema=V;exports.codeInsertSchema=k;exports.codeSchema=X;exports.codeTypeSchema=I;exports.colorsSchema=P;exports.connectionInsertSchema=b;exports.connectionSchema=S;exports.customDomainInsertSchema=w;exports.customDomainSchema=C;exports.customDomainWithTenantIdSchema=J;exports.emailProviderSchema=pt;exports.fontDetailsSchema=n;exports.fontsSchema=F;exports.hookInsertSchema=j;exports.hookSchema=Z;exports.identitySchema=z;exports.jwksKeySchema=$;exports.jwksSchema=v;exports.logSchema=it;exports.loginSessionInsertSchema=A;exports.loginSessionSchema=et;exports.openIDConfigurationSchema=tt;exports.pageBackgroundSchema=H;exports.parseUserId=dt;exports.passwordInsertSchema=N;exports.passwordSchema=ot;exports.profileDataSchema=p;exports.promptSettingSchema=ct;exports.refreshTokenInsertSchema=M;exports.refreshTokenSchema=zt;exports.samlpAddon=_;exports.sessionInsertSchema=D;exports.sessionSchema=at;exports.signingKeySchema=st;exports.tenantInsertSchema=f;exports.tenantSchema=y;exports.themeInsertSchema=G;exports.themeSchema=lt;exports.tokenResponseSchema=rt;exports.totalsSchema=L;exports.userInsertSchema=d;exports.userResponseSchema=W;exports.userSchema=g;exports.vendorSettingsSchema=Y;exports.verificationMethodsSchema=E;exports.widgetSchema=K;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@hono/zod-openapi"),L=t.z.object({start:t.z.number(),limit:t.z.number(),length:t.z.number()}),c=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,...c.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()}),B=g,W=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()),q="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Q=(e=21)=>{let i="",o=crypto.getRandomValues(new Uint8Array(e));for(;e--;)i+=q[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()}),m=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"})}),u=t.z.object({created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e),...m.shape});var a=(e=>(e.TOKEN="token",e.TOKEN_ID_TOKEN="token id_token",e.CODE="code",e))(a||{}),r=(e=>(e.QUERY="query",e.FRAGMENT="fragment",e.FORM_POST="form_post",e.WEB_MESSAGE="web_message",e.SAML_POST="saml_post",e))(r||{}),l=(e=>(e.S256="S256",e.Plain="plain",e))(l||{});const h=t.z.object({client_id:t.z.string(),act_as:t.z.string().optional(),response_type:t.z.nativeEnum(a).optional(),response_mode:t.z.nativeEnum(r).optional(),redirect_uri:t.z.string().optional(),audience:t.z.string().optional(),organization: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(l).optional(),code_challenge:t.z.string().optional(),username:t.z.string().optional(),ui_locales:t.z.string().optional(),vendor_id:t.z.string().optional()}),V=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(),provider:t.z.string().optional(),from:t.z.string().optional(),twilio_sid:t.z.string().optional(),twilio_token:t.z.string().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()}),y=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()}),Y=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()});t.z.object({...u.shape,tenant:y,connections:t.z.array(S)});const I=t.z.enum(["password_reset","email_verification","otp","authorization_code","oauth2_state","ticket"]),k=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:I,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()}),X=t.z.object({...k.shape,created_at:t.z.string()}),w=t.z.object({domain:t.z.string(),custom_domain_id:t.z.string().optional(),type:t.z.enum(["auth0_managed_certs","self_managed_certs"]),verification_method:t.z.enum(["txt"]).optional(),tls_policy:t.z.enum(["recommended"]).optional(),custom_client_ip_header:t.z.enum(["true-client-ip","cf-connecting-ip","x-forwarded-for","x-azure-clientip","null"]).optional(),domain_metadata:t.z.record(t.z.string().max(255)).optional()}),E=t.z.object({name:t.z.literal("txt"),record:t.z.string(),domain:t.z.string()}),C=t.z.object({...w.shape,custom_domain_id:t.z.string(),primary:t.z.boolean(),status:t.z.enum(["disabled","pending","pending_verification","ready"]),origin_domain_name:t.z.string().optional(),verification:t.z.object({methods:t.z.array(E)}).optional(),tls_policy:t.z.string().optional()}),J=C.extend({tenant_id:t.z.string()}),j=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()}),Z=j.extend({...c.shape,hook_id:t.z.string()}),v=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()}),$=t.z.object({keys:t.z.array(v)}),tt=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())}),A=t.z.object({csrf_token:t.z.string(),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(),session_id:t.z.string().optional(),authorization_url:t.z.string().optional()}).openapi({description:"This represents a login sesion"}),et=t.z.object({...A.shape,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 O=(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))(O||{});const nt=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"]),U=t.z.object({name:t.z.string(),version:t.z.string(),env:t.z.object({node:t.z.string().optional()}).optional()}),it=t.z.object({type:nt,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:U.optional()}),N=t.z.object({user_id:t.z.string(),password:t.z.string(),algorithm:t.z.enum(["bcrypt","argon2id"]).default("argon2id")}),ot=t.z.object({...N.shape,created_at:t.z.string(),updated_at:t.z.string()}),R=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")}),D=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:R.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")}),st=t.z.object({created_at:t.z.string(),updated_at:t.z.string(),authenticated_at:t.z.string(),last_interaction_at:t.z.string(),...D.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 T=(e=>(e.RefreshToken="refresh_token",e.AuthorizationCode="authorization_code",e.ClientCredential="client_credentials",e.Passwordless="passwordless",e.Password="password",e.OTP="http://auth0.com/oauth/grant-type/passwordless/otp",e))(T||{});const rt=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 x=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()}),P=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()}),F=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}),H=t.z.object({background_color:t.z.string(),background_image_url:t.z.string(),page_layout:t.z.enum(["center"])}),K=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"])}),G=t.z.object({borders:x,colors:P,displayName:t.z.string(),fonts:F,page_background:H,widget:K}),lt=G.extend({themeId:t.z.string()}),ct=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()}),pt=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()}),M=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:R,resource_servers:t.z.array(t.z.object({audience:t.z.string(),scopes:t.z.string()})),rotating:t.z.boolean()}),zt=t.z.object({created_at:t.z.string(),...M.shape}),dt=t.z.object({to:t.z.string(),message:t.z.string()}),gt=t.z.object({name:t.z.string(),options:t.z.object({})});function _t(e){const[i,o]=e.split("|");if(!i||!o)throw new Error(`Invalid user_id: ${e}`);return{connection:i,id:o}}exports.Auth0Client=U;exports.AuthorizationResponseMode=r;exports.AuthorizationResponseType=a;exports.CodeChallengeMethod=l;exports.GrantType=T;exports.LogTypes=O;exports.applicationInsertSchema=m;exports.applicationSchema=u;exports.auth0UserResponseSchema=B;exports.authParamsSchema=h;exports.baseUserSchema=s;exports.bordersSchema=x;exports.brandingSchema=V;exports.codeInsertSchema=k;exports.codeSchema=X;exports.codeTypeSchema=I;exports.colorsSchema=P;exports.connectionInsertSchema=b;exports.connectionSchema=S;exports.customDomainInsertSchema=w;exports.customDomainSchema=C;exports.customDomainWithTenantIdSchema=J;exports.emailProviderSchema=pt;exports.fontDetailsSchema=n;exports.fontsSchema=F;exports.hookInsertSchema=j;exports.hookSchema=Z;exports.identitySchema=z;exports.jwksKeySchema=$;exports.jwksSchema=v;exports.logSchema=it;exports.loginSessionInsertSchema=A;exports.loginSessionSchema=et;exports.openIDConfigurationSchema=tt;exports.pageBackgroundSchema=H;exports.parseUserId=_t;exports.passwordInsertSchema=N;exports.passwordSchema=ot;exports.profileDataSchema=p;exports.promptSettingSchema=ct;exports.refreshTokenInsertSchema=M;exports.refreshTokenSchema=zt;exports.samlpAddon=_;exports.sessionInsertSchema=D;exports.sessionSchema=st;exports.signingKeySchema=at;exports.smsProviderSchema=gt;exports.smsSendParamsSchema=dt;exports.tenantInsertSchema=f;exports.tenantSchema=y;exports.themeInsertSchema=G;exports.themeSchema=lt;exports.tokenResponseSchema=rt;exports.totalsSchema=L;exports.userInsertSchema=d;exports.userResponseSchema=W;exports.userSchema=g;exports.vendorSettingsSchema=Y;exports.verificationMethodsSchema=E;exports.widgetSchema=K;
@@ -1181,7 +1181,12 @@ declare const ClientSchema: z.ZodObject<{
1181
1181
  jwks_uri: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1182
1182
  discovery_url: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1183
1183
  issuer: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1184
+ provider: z.ZodOptional<z.ZodString>;
1185
+ from: z.ZodOptional<z.ZodString>;
1186
+ twilio_sid: z.ZodOptional<z.ZodString>;
1187
+ twilio_token: z.ZodOptional<z.ZodString>;
1184
1188
  }, "strip", z.ZodTypeAny, {
1189
+ provider?: string | undefined;
1185
1190
  issuer?: string | undefined;
1186
1191
  client_secret?: string | undefined;
1187
1192
  client_id?: string | undefined;
@@ -1195,7 +1200,11 @@ declare const ClientSchema: z.ZodObject<{
1195
1200
  userinfo_endpoint?: string | undefined;
1196
1201
  jwks_uri?: string | undefined;
1197
1202
  discovery_url?: string | undefined;
1203
+ from?: string | undefined;
1204
+ twilio_sid?: string | undefined;
1205
+ twilio_token?: string | undefined;
1198
1206
  }, {
1207
+ provider?: string | undefined;
1199
1208
  issuer?: string | undefined;
1200
1209
  client_secret?: string | undefined;
1201
1210
  client_id?: string | undefined;
@@ -1209,6 +1218,9 @@ declare const ClientSchema: z.ZodObject<{
1209
1218
  userinfo_endpoint?: string | undefined;
1210
1219
  jwks_uri?: string | undefined;
1211
1220
  discovery_url?: string | undefined;
1221
+ from?: string | undefined;
1222
+ twilio_sid?: string | undefined;
1223
+ twilio_token?: string | undefined;
1212
1224
  }>>>;
1213
1225
  enabled_clients: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
1214
1226
  response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
@@ -1219,6 +1231,7 @@ declare const ClientSchema: z.ZodObject<{
1219
1231
  name: string;
1220
1232
  strategy: string;
1221
1233
  options?: {
1234
+ provider?: string | undefined;
1222
1235
  issuer?: string | undefined;
1223
1236
  client_secret?: string | undefined;
1224
1237
  client_id?: string | undefined;
@@ -1232,6 +1245,9 @@ declare const ClientSchema: z.ZodObject<{
1232
1245
  userinfo_endpoint?: string | undefined;
1233
1246
  jwks_uri?: string | undefined;
1234
1247
  discovery_url?: string | undefined;
1248
+ from?: string | undefined;
1249
+ twilio_sid?: string | undefined;
1250
+ twilio_token?: string | undefined;
1235
1251
  } | undefined;
1236
1252
  id?: string | undefined;
1237
1253
  response_type?: AuthorizationResponseType | undefined;
@@ -1243,6 +1259,7 @@ declare const ClientSchema: z.ZodObject<{
1243
1259
  name: string;
1244
1260
  strategy: string;
1245
1261
  options?: {
1262
+ provider?: string | undefined;
1246
1263
  issuer?: string | undefined;
1247
1264
  client_secret?: string | undefined;
1248
1265
  client_id?: string | undefined;
@@ -1256,6 +1273,9 @@ declare const ClientSchema: z.ZodObject<{
1256
1273
  userinfo_endpoint?: string | undefined;
1257
1274
  jwks_uri?: string | undefined;
1258
1275
  discovery_url?: string | undefined;
1276
+ from?: string | undefined;
1277
+ twilio_sid?: string | undefined;
1278
+ twilio_token?: string | undefined;
1259
1279
  } | undefined;
1260
1280
  id?: string | undefined;
1261
1281
  response_type?: AuthorizationResponseType | undefined;
@@ -1396,6 +1416,7 @@ declare const ClientSchema: z.ZodObject<{
1396
1416
  name: string;
1397
1417
  strategy: string;
1398
1418
  options?: {
1419
+ provider?: string | undefined;
1399
1420
  issuer?: string | undefined;
1400
1421
  client_secret?: string | undefined;
1401
1422
  client_id?: string | undefined;
@@ -1409,6 +1430,9 @@ declare const ClientSchema: z.ZodObject<{
1409
1430
  userinfo_endpoint?: string | undefined;
1410
1431
  jwks_uri?: string | undefined;
1411
1432
  discovery_url?: string | undefined;
1433
+ from?: string | undefined;
1434
+ twilio_sid?: string | undefined;
1435
+ twilio_token?: string | undefined;
1412
1436
  } | undefined;
1413
1437
  id?: string | undefined;
1414
1438
  response_type?: AuthorizationResponseType | undefined;
@@ -1467,6 +1491,7 @@ declare const ClientSchema: z.ZodObject<{
1467
1491
  name: string;
1468
1492
  strategy: string;
1469
1493
  options?: {
1494
+ provider?: string | undefined;
1470
1495
  issuer?: string | undefined;
1471
1496
  client_secret?: string | undefined;
1472
1497
  client_id?: string | undefined;
@@ -1480,6 +1505,9 @@ declare const ClientSchema: z.ZodObject<{
1480
1505
  userinfo_endpoint?: string | undefined;
1481
1506
  jwks_uri?: string | undefined;
1482
1507
  discovery_url?: string | undefined;
1508
+ from?: string | undefined;
1509
+ twilio_sid?: string | undefined;
1510
+ twilio_token?: string | undefined;
1483
1511
  } | undefined;
1484
1512
  id?: string | undefined;
1485
1513
  response_type?: AuthorizationResponseType | undefined;
@@ -1618,7 +1646,12 @@ export declare const connectionInsertSchema: z.ZodObject<{
1618
1646
  jwks_uri: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1619
1647
  discovery_url: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1620
1648
  issuer: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1649
+ provider: z.ZodOptional<z.ZodString>;
1650
+ from: z.ZodOptional<z.ZodString>;
1651
+ twilio_sid: z.ZodOptional<z.ZodString>;
1652
+ twilio_token: z.ZodOptional<z.ZodString>;
1621
1653
  }, "strip", z.ZodTypeAny, {
1654
+ provider?: string | undefined;
1622
1655
  issuer?: string | undefined;
1623
1656
  client_secret?: string | undefined;
1624
1657
  client_id?: string | undefined;
@@ -1632,7 +1665,11 @@ export declare const connectionInsertSchema: z.ZodObject<{
1632
1665
  userinfo_endpoint?: string | undefined;
1633
1666
  jwks_uri?: string | undefined;
1634
1667
  discovery_url?: string | undefined;
1668
+ from?: string | undefined;
1669
+ twilio_sid?: string | undefined;
1670
+ twilio_token?: string | undefined;
1635
1671
  }, {
1672
+ provider?: string | undefined;
1636
1673
  issuer?: string | undefined;
1637
1674
  client_secret?: string | undefined;
1638
1675
  client_id?: string | undefined;
@@ -1646,6 +1683,9 @@ export declare const connectionInsertSchema: z.ZodObject<{
1646
1683
  userinfo_endpoint?: string | undefined;
1647
1684
  jwks_uri?: string | undefined;
1648
1685
  discovery_url?: string | undefined;
1686
+ from?: string | undefined;
1687
+ twilio_sid?: string | undefined;
1688
+ twilio_token?: string | undefined;
1649
1689
  }>>>;
1650
1690
  enabled_clients: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
1651
1691
  response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
@@ -1654,6 +1694,7 @@ export declare const connectionInsertSchema: z.ZodObject<{
1654
1694
  name: string;
1655
1695
  strategy: string;
1656
1696
  options?: {
1697
+ provider?: string | undefined;
1657
1698
  issuer?: string | undefined;
1658
1699
  client_secret?: string | undefined;
1659
1700
  client_id?: string | undefined;
@@ -1667,6 +1708,9 @@ export declare const connectionInsertSchema: z.ZodObject<{
1667
1708
  userinfo_endpoint?: string | undefined;
1668
1709
  jwks_uri?: string | undefined;
1669
1710
  discovery_url?: string | undefined;
1711
+ from?: string | undefined;
1712
+ twilio_sid?: string | undefined;
1713
+ twilio_token?: string | undefined;
1670
1714
  } | undefined;
1671
1715
  id?: string | undefined;
1672
1716
  response_type?: AuthorizationResponseType | undefined;
@@ -1676,6 +1720,7 @@ export declare const connectionInsertSchema: z.ZodObject<{
1676
1720
  name: string;
1677
1721
  strategy: string;
1678
1722
  options?: {
1723
+ provider?: string | undefined;
1679
1724
  issuer?: string | undefined;
1680
1725
  client_secret?: string | undefined;
1681
1726
  client_id?: string | undefined;
@@ -1689,6 +1734,9 @@ export declare const connectionInsertSchema: z.ZodObject<{
1689
1734
  userinfo_endpoint?: string | undefined;
1690
1735
  jwks_uri?: string | undefined;
1691
1736
  discovery_url?: string | undefined;
1737
+ from?: string | undefined;
1738
+ twilio_sid?: string | undefined;
1739
+ twilio_token?: string | undefined;
1692
1740
  } | undefined;
1693
1741
  id?: string | undefined;
1694
1742
  response_type?: AuthorizationResponseType | undefined;
@@ -1718,7 +1766,12 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1718
1766
  jwks_uri: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1719
1767
  discovery_url: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1720
1768
  issuer: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1769
+ provider: z.ZodOptional<z.ZodString>;
1770
+ from: z.ZodOptional<z.ZodString>;
1771
+ twilio_sid: z.ZodOptional<z.ZodString>;
1772
+ twilio_token: z.ZodOptional<z.ZodString>;
1721
1773
  }, "strip", z.ZodTypeAny, {
1774
+ provider?: string | undefined;
1722
1775
  issuer?: string | undefined;
1723
1776
  client_secret?: string | undefined;
1724
1777
  client_id?: string | undefined;
@@ -1732,7 +1785,11 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1732
1785
  userinfo_endpoint?: string | undefined;
1733
1786
  jwks_uri?: string | undefined;
1734
1787
  discovery_url?: string | undefined;
1788
+ from?: string | undefined;
1789
+ twilio_sid?: string | undefined;
1790
+ twilio_token?: string | undefined;
1735
1791
  }, {
1792
+ provider?: string | undefined;
1736
1793
  issuer?: string | undefined;
1737
1794
  client_secret?: string | undefined;
1738
1795
  client_id?: string | undefined;
@@ -1746,6 +1803,9 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1746
1803
  userinfo_endpoint?: string | undefined;
1747
1804
  jwks_uri?: string | undefined;
1748
1805
  discovery_url?: string | undefined;
1806
+ from?: string | undefined;
1807
+ twilio_sid?: string | undefined;
1808
+ twilio_token?: string | undefined;
1749
1809
  }>>>;
1750
1810
  enabled_clients: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
1751
1811
  response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
@@ -1756,6 +1816,7 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1756
1816
  name: string;
1757
1817
  strategy: string;
1758
1818
  options?: {
1819
+ provider?: string | undefined;
1759
1820
  issuer?: string | undefined;
1760
1821
  client_secret?: string | undefined;
1761
1822
  client_id?: string | undefined;
@@ -1769,6 +1830,9 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1769
1830
  userinfo_endpoint?: string | undefined;
1770
1831
  jwks_uri?: string | undefined;
1771
1832
  discovery_url?: string | undefined;
1833
+ from?: string | undefined;
1834
+ twilio_sid?: string | undefined;
1835
+ twilio_token?: string | undefined;
1772
1836
  } | undefined;
1773
1837
  id?: string | undefined;
1774
1838
  response_type?: AuthorizationResponseType | undefined;
@@ -1780,6 +1844,7 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1780
1844
  name: string;
1781
1845
  strategy: string;
1782
1846
  options?: {
1847
+ provider?: string | undefined;
1783
1848
  issuer?: string | undefined;
1784
1849
  client_secret?: string | undefined;
1785
1850
  client_id?: string | undefined;
@@ -1793,6 +1858,9 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1793
1858
  userinfo_endpoint?: string | undefined;
1794
1859
  jwks_uri?: string | undefined;
1795
1860
  discovery_url?: string | undefined;
1861
+ from?: string | undefined;
1862
+ twilio_sid?: string | undefined;
1863
+ twilio_token?: string | undefined;
1796
1864
  } | undefined;
1797
1865
  id?: string | undefined;
1798
1866
  response_type?: AuthorizationResponseType | undefined;
@@ -3207,7 +3275,8 @@ export declare enum GrantType {
3207
3275
  AuthorizationCode = "authorization_code",
3208
3276
  ClientCredential = "client_credentials",
3209
3277
  Passwordless = "passwordless",
3210
- Password = "password"
3278
+ Password = "password",
3279
+ OTP = "http://auth0.com/oauth/grant-type/passwordless/otp"
3211
3280
  }
3212
3281
  export declare const tokenResponseSchema: z.ZodObject<{
3213
3282
  access_token: z.ZodString;
@@ -4660,6 +4729,28 @@ export declare const refreshTokenSchema: z.ZodObject<{
4660
4729
  last_exchanged_at?: string | undefined;
4661
4730
  }>;
4662
4731
  export type RefreshToken = z.infer<typeof refreshTokenSchema>;
4732
+ export declare const smsSendParamsSchema: z.ZodObject<{
4733
+ to: z.ZodString;
4734
+ message: z.ZodString;
4735
+ }, "strip", z.ZodTypeAny, {
4736
+ message: string;
4737
+ to: string;
4738
+ }, {
4739
+ message: string;
4740
+ to: string;
4741
+ }>;
4742
+ export type SmsSendParams = z.infer<typeof smsSendParamsSchema>;
4743
+ export declare const smsProviderSchema: z.ZodObject<{
4744
+ name: z.ZodString;
4745
+ options: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
4746
+ }, "strip", z.ZodTypeAny, {
4747
+ options: {};
4748
+ name: string;
4749
+ }, {
4750
+ options: {};
4751
+ name: string;
4752
+ }>;
4753
+ export type SmsProvider = z.infer<typeof smsProviderSchema>;
4663
4754
  export declare function parseUserId(user_id: string): {
4664
4755
  connection: string;
4665
4756
  id: string;
@@ -173,16 +173,20 @@ const y = t.object({
173
173
  userinfo_endpoint: t.string().default("").optional(),
174
174
  jwks_uri: t.string().default("").optional(),
175
175
  discovery_url: t.string().default("").optional(),
176
- issuer: t.string().default("").optional()
176
+ issuer: t.string().default("").optional(),
177
+ provider: t.string().optional(),
178
+ from: t.string().optional(),
179
+ twilio_sid: t.string().optional(),
180
+ twilio_token: t.string().optional()
177
181
  }).default({}).optional(),
178
182
  enabled_clients: t.array(t.string()).default([]).optional(),
179
183
  response_type: t.custom().optional(),
180
184
  response_mode: t.custom().optional()
181
- }), k = t.object({
185
+ }), w = t.object({
182
186
  id: t.string(),
183
187
  created_at: t.string().transform((e) => e === null ? "" : e),
184
188
  updated_at: t.string().transform((e) => e === null ? "" : e)
185
- }).extend(E.shape), w = t.object({
189
+ }).extend(E.shape), k = t.object({
186
190
  name: t.string(),
187
191
  audience: t.string(),
188
192
  sender_email: t.string().email(),
@@ -196,7 +200,7 @@ const y = t.object({
196
200
  }), C = t.object({
197
201
  created_at: t.string().transform((e) => e === null ? "" : e),
198
202
  updated_at: t.string().transform((e) => e === null ? "" : e),
199
- ...w.shape,
203
+ ...k.shape,
200
204
  id: t.string()
201
205
  }), J = t.object({
202
206
  logoUrl: t.string(),
@@ -219,7 +223,7 @@ const y = t.object({
219
223
  t.object({
220
224
  ...S.shape,
221
225
  tenant: C,
222
- connections: t.array(k)
226
+ connections: t.array(w)
223
227
  });
224
228
  const I = t.enum([
225
229
  "password_reset",
@@ -485,7 +489,7 @@ const x = t.enum([
485
489
  revoked: t.boolean().optional().openapi({ description: "True if the key is revoked" }),
486
490
  revoked_at: t.string().optional().openapi({ description: "The date and time when the key was revoked" })
487
491
  });
488
- var H = /* @__PURE__ */ ((e) => (e.RefreshToken = "refresh_token", e.AuthorizationCode = "authorization_code", e.ClientCredential = "client_credentials", e.Passwordless = "passwordless", e.Password = "password", e))(H || {});
492
+ var H = /* @__PURE__ */ ((e) => (e.RefreshToken = "refresh_token", e.AuthorizationCode = "authorization_code", e.ClientCredential = "client_credentials", e.Passwordless = "passwordless", e.Password = "password", e.OTP = "http://auth0.com/oauth/grant-type/passwordless/otp", e))(H || {});
489
493
  const lt = t.object({
490
494
  access_token: t.string(),
491
495
  id_token: t.string().optional(),
@@ -622,8 +626,14 @@ const K = t.object({
622
626
  created_at: t.string(),
623
627
  // Spread in the rest of the refresh token properties.
624
628
  ...q.shape
629
+ }), _t = t.object({
630
+ to: t.string(),
631
+ message: t.string()
632
+ }), ut = t.object({
633
+ name: t.string(),
634
+ options: t.object({})
625
635
  });
626
- function _t(e) {
636
+ function mt(e) {
627
637
  const [i, o] = e.split("|");
628
638
  if (!i || !o)
629
639
  throw new Error(`Invalid user_id: ${e}`);
@@ -648,7 +658,7 @@ export {
648
658
  I as codeTypeSchema,
649
659
  G as colorsSchema,
650
660
  E as connectionInsertSchema,
651
- k as connectionSchema,
661
+ w as connectionSchema,
652
662
  v as customDomainInsertSchema,
653
663
  O as customDomainSchema,
654
664
  $ as customDomainWithTenantIdSchema,
@@ -665,7 +675,7 @@ export {
665
675
  it as loginSessionSchema,
666
676
  nt as openIDConfigurationSchema,
667
677
  B as pageBackgroundSchema,
668
- _t as parseUserId,
678
+ mt as parseUserId,
669
679
  P as passwordInsertSchema,
670
680
  st as passwordSchema,
671
681
  d as profileDataSchema,
@@ -676,7 +686,9 @@ export {
676
686
  F as sessionInsertSchema,
677
687
  at as sessionSchema,
678
688
  rt as signingKeySchema,
679
- w as tenantInsertSchema,
689
+ ut as smsProviderSchema,
690
+ _t as smsSendParamsSchema,
691
+ k as tenantInsertSchema,
680
692
  C as tenantSchema,
681
693
  W as themeInsertSchema,
682
694
  ct as themeSchema,
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.55.0",
14
+ "version": "0.57.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],
@@ -26,7 +26,7 @@
26
26
  }
27
27
  },
28
28
  "devDependencies": {
29
- "@hono/zod-openapi": "^0.18.0",
29
+ "@hono/zod-openapi": "^0.19.2",
30
30
  "@rollup/plugin-commonjs": "^28.0.1",
31
31
  "@rollup/plugin-node-resolve": "^15.3.0",
32
32
  "@types/node": "^22.9.1",
@@ -35,7 +35,7 @@
35
35
  "vite": "^5.4.11"
36
36
  },
37
37
  "peerDependencies": {
38
- "@hono/zod-openapi": "^0.16.4"
38
+ "@hono/zod-openapi": "^0.19.2"
39
39
  },
40
40
  "dependencies": {
41
41
  "nanoid": "^5.0.8"