@authhero/adapter-interfaces 0.54.0 → 0.55.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"),M=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()}),L=g,B=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 W=(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(()=>W()).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()}),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(),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()}),V=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 k=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: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()}),Y=t.z.object({...I.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()}),X=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()}),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()}),J=C.extend({...c.shape,hook_id:t.z.string()}),j=t.z.object({alg:t.z.enum(["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512"]),e:t.z.string(),kid:t.z.string(),kty:t.z.enum(["RSA","EC","oct"]),n:t.z.string(),x5t:t.z.string().optional(),x5c:t.z.array(t.z.string()).optional(),use:t.z.enum(["sig","enc"]).optional()}),Z=t.z.object({keys:t.z.array(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())}),v=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"}),tt=t.z.object({...v.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 A=(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))(A||{});const et=t.z.enum(["cls","fsa","fs","f","fc","fcoa","fcp","fh","fp","fs","fu","s","sapi","scoa","scp","scpr","scu","seacft","serft","slo","ss","ssa","sv","svr"]),O=t.z.object({name:t.z.string(),version:t.z.string(),env:t.z.object({node:t.z.string().optional()}).optional()}),nt=t.z.object({type:et,date:t.z.string(),description:t.z.string().optional(),log_id:t.z.string().optional(),_id:t.z.string().optional(),ip:t.z.string(),user_agent:t.z.string(),details:t.z.any().optional(),isMobile:t.z.boolean(),user_id:t.z.string().optional(),user_name:t.z.string().optional(),connection:t.z.string().optional(),connection_id:t.z.string().optional(),client_id:t.z.string().optional(),client_name:t.z.string().optional(),audience:t.z.string().optional(),scope:t.z.array(t.z.string()).optional(),strategy:t.z.string().optional(),strategy_type:t.z.string().optional(),hostname:t.z.string().optional(),auth0_client:O.optional()}),U=t.z.object({user_id:t.z.string(),password:t.z.string(),algorithm:t.z.enum(["bcrypt","argon2id"]).default("argon2id")}),it=t.z.object({...U.shape,created_at:t.z.string(),updated_at:t.z.string()}),N=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")}),R=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:N.describe("Metadata related to the device used in the session"),clients:t.z.array(t.z.string()).describe("List of client details for the session")}),ot=t.z.object({created_at:t.z.string(),updated_at:t.z.string(),authenticated_at:t.z.string(),last_interaction_at:t.z.string(),...R.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 D=(e=>(e.RefreshToken="refresh_token",e.AuthorizationCode="authorization_code",e.ClientCredential="client_credentials",e.Passwordless="passwordless",e.Password="password",e))(D||{});const st=t.z.object({access_token:t.z.string(),id_token:t.z.string().optional(),scope:t.z.string().optional(),state:t.z.string().optional(),refresh_token:t.z.string().optional(),token_type:t.z.string(),expires_in:t.z.number()});t.z.object({code:t.z.string(),state:t.z.string().optional()});const T=t.z.object({button_border_radius:t.z.number(),button_border_weight:t.z.number(),buttons_style:t.z.enum(["pill"]),input_border_radius:t.z.number(),input_border_weight:t.z.number(),inputs_style:t.z.enum(["pill"]),show_widget_shadow:t.z.boolean(),widget_border_weight:t.z.number(),widget_corner_radius:t.z.number()}),x=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()}),P=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}),F=t.z.object({background_color:t.z.string(),background_image_url:t.z.string(),page_layout:t.z.enum(["center"])}),H=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"])}),K=t.z.object({borders:T,colors:x,displayName:t.z.string(),fonts:P,page_background:F,widget:H}),rt=K.extend({themeId:t.z.string()}),lt=t.z.object({universal_login_experience:t.z.enum(["new","classic"]).default("new"),identifier_first:t.z.boolean().default(!0),password_first:t.z.boolean().default(!1),webauthn_platform_first_factor:t.z.boolean()}),ct=t.z.object({name:t.z.string(),enabled:t.z.boolean().optional().default(!0),default_from_address:t.z.string().optional(),credentials:t.z.union([t.z.object({accessKeyId:t.z.string(),secretAccessKey:t.z.string(),region:t.z.string()}),t.z.object({smtp_host:t.z.array(t.z.string()),smtp_port:t.z.number(),smtp_user:t.z.string(),smtp_pass:t.z.string()}),t.z.object({api_key:t.z.string(),domain:t.z.string().optional()}),t.z.object({connectionString:t.z.string()}),t.z.object({tenantId:t.z.string(),clientId:t.z.string(),clientSecret:t.z.string()})]),settings:t.z.object({}).optional()}),G=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:N,resource_servers:t.z.array(t.z.object({audience:t.z.string(),scopes:t.z.string()})),rotating:t.z.boolean()}),pt=t.z.object({created_at:t.z.string(),...G.shape});function zt(e){const[i,o]=e.split("|");if(!i||!o)throw new Error(`Invalid user_id: ${e}`);return{connection:i,id:o}}exports.Auth0Client=O;exports.AuthorizationResponseMode=r;exports.AuthorizationResponseType=s;exports.CodeChallengeMethod=l;exports.GrantType=D;exports.LogTypes=A;exports.applicationInsertSchema=u;exports.applicationSchema=m;exports.auth0UserResponseSchema=L;exports.authParamsSchema=h;exports.baseUserSchema=a;exports.bordersSchema=T;exports.brandingSchema=Q;exports.codeInsertSchema=I;exports.codeSchema=Y;exports.codeTypeSchema=k;exports.colorsSchema=x;exports.connectionInsertSchema=b;exports.connectionSchema=S;exports.customDomainInsertSchema=w;exports.customDomainSchema=X;exports.emailProviderSchema=ct;exports.fontDetailsSchema=n;exports.fontsSchema=P;exports.hookInsertSchema=C;exports.hookSchema=J;exports.identitySchema=z;exports.jwksKeySchema=Z;exports.jwksSchema=j;exports.logSchema=nt;exports.loginSessionInsertSchema=v;exports.loginSessionSchema=tt;exports.openIDConfigurationSchema=$;exports.pageBackgroundSchema=F;exports.parseUserId=zt;exports.passwordInsertSchema=U;exports.passwordSchema=it;exports.profileDataSchema=p;exports.promptSettingSchema=lt;exports.refreshTokenInsertSchema=G;exports.refreshTokenSchema=pt;exports.samlpAddon=_;exports.sessionInsertSchema=R;exports.sessionSchema=ot;exports.signingKeySchema=at;exports.tenantInsertSchema=f;exports.tenantSchema=y;exports.themeInsertSchema=K;exports.themeSchema=rt;exports.tokenResponseSchema=st;exports.totalsSchema=M;exports.userInsertSchema=d;exports.userResponseSchema=B;exports.userSchema=g;exports.vendorSettingsSchema=V;exports.verificationMethodsSchema=E;exports.widgetSchema=H;
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;
@@ -1945,6 +1945,102 @@ export declare const customDomainSchema: z.ZodObject<{
1945
1945
  } | undefined;
1946
1946
  }>;
1947
1947
  export type CustomDomain = z.infer<typeof customDomainSchema>;
1948
+ export declare const customDomainWithTenantIdSchema: z.ZodObject<z.objectUtil.extendShape<{
1949
+ custom_domain_id: z.ZodString;
1950
+ primary: z.ZodBoolean;
1951
+ status: z.ZodEnum<[
1952
+ "disabled",
1953
+ "pending",
1954
+ "pending_verification",
1955
+ "ready"
1956
+ ]>;
1957
+ origin_domain_name: z.ZodOptional<z.ZodString>;
1958
+ verification: z.ZodOptional<z.ZodObject<{
1959
+ methods: z.ZodArray<z.ZodObject<{
1960
+ name: z.ZodLiteral<"txt">;
1961
+ record: z.ZodString;
1962
+ domain: z.ZodString;
1963
+ }, "strip", z.ZodTypeAny, {
1964
+ name: "txt";
1965
+ domain: string;
1966
+ record: string;
1967
+ }, {
1968
+ name: "txt";
1969
+ domain: string;
1970
+ record: string;
1971
+ }>, "many">;
1972
+ }, "strip", z.ZodTypeAny, {
1973
+ methods: {
1974
+ name: "txt";
1975
+ domain: string;
1976
+ record: string;
1977
+ }[];
1978
+ }, {
1979
+ methods: {
1980
+ name: "txt";
1981
+ domain: string;
1982
+ record: string;
1983
+ }[];
1984
+ }>>;
1985
+ tls_policy: z.ZodOptional<z.ZodString>;
1986
+ domain: z.ZodString;
1987
+ type: z.ZodEnum<[
1988
+ "auth0_managed_certs",
1989
+ "self_managed_certs"
1990
+ ]>;
1991
+ verification_method: z.ZodOptional<z.ZodEnum<[
1992
+ "txt"
1993
+ ]>>;
1994
+ custom_client_ip_header: z.ZodOptional<z.ZodEnum<[
1995
+ "true-client-ip",
1996
+ "cf-connecting-ip",
1997
+ "x-forwarded-for",
1998
+ "x-azure-clientip",
1999
+ "null"
2000
+ ]>>;
2001
+ domain_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2002
+ }, {
2003
+ tenant_id: z.ZodString;
2004
+ }>, "strip", z.ZodTypeAny, {
2005
+ type: "auth0_managed_certs" | "self_managed_certs";
2006
+ status: "disabled" | "pending" | "pending_verification" | "ready";
2007
+ primary: boolean;
2008
+ domain: string;
2009
+ custom_domain_id: string;
2010
+ tenant_id: string;
2011
+ verification_method?: "txt" | undefined;
2012
+ tls_policy?: string | undefined;
2013
+ custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
2014
+ domain_metadata?: Record<string, string> | undefined;
2015
+ origin_domain_name?: string | undefined;
2016
+ verification?: {
2017
+ methods: {
2018
+ name: "txt";
2019
+ domain: string;
2020
+ record: string;
2021
+ }[];
2022
+ } | undefined;
2023
+ }, {
2024
+ type: "auth0_managed_certs" | "self_managed_certs";
2025
+ status: "disabled" | "pending" | "pending_verification" | "ready";
2026
+ primary: boolean;
2027
+ domain: string;
2028
+ custom_domain_id: string;
2029
+ tenant_id: string;
2030
+ verification_method?: "txt" | undefined;
2031
+ tls_policy?: string | undefined;
2032
+ custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
2033
+ domain_metadata?: Record<string, string> | undefined;
2034
+ origin_domain_name?: string | undefined;
2035
+ verification?: {
2036
+ methods: {
2037
+ name: "txt";
2038
+ domain: string;
2039
+ record: string;
2040
+ }[];
2041
+ } | undefined;
2042
+ }>;
2043
+ export type CustomDomainWithTenantId = z.infer<typeof customDomainWithTenantIdSchema>;
1948
2044
  export declare const hookInsertSchema: z.ZodObject<{
1949
2045
  trigger_id: z.ZodEnum<[
1950
2046
  "pre-user-signup",
@@ -4652,6 +4748,7 @@ export interface ConnectionsAdapter {
4652
4748
  export interface CustomDomainsAdapter {
4653
4749
  create: (tenant_id: string, custom_domain: CustomDomainInsert) => Promise<CustomDomain>;
4654
4750
  get: (tenant_id: string, id: string) => Promise<CustomDomain | null>;
4751
+ getByDomain: (domain: string) => Promise<CustomDomainWithTenantId | null>;
4655
4752
  list: (tenant_id: string) => Promise<CustomDomain[]>;
4656
4753
  remove: (tenant_id: string, id: string) => Promise<boolean>;
4657
4754
  update: (tenant_id: string, id: string, custom_domain: Partial<CustomDomain>) => Promise<boolean>;
@@ -1,5 +1,5 @@
1
1
  import { z as t } from "@hono/zod-openapi";
2
- const z = t.object({
2
+ const Q = t.object({
3
3
  start: t.number(),
4
4
  limit: t.number(),
5
5
  length: t.number()
@@ -56,7 +56,7 @@ const z = t.object({
56
56
  email: t.string(),
57
57
  login_count: t.number(),
58
58
  identities: t.array(g).optional()
59
- }), Q = u, V = a.extend({
59
+ }), V = u, Y = a.extend({
60
60
  email: t.string(),
61
61
  login_count: t.number(),
62
62
  multifactor: t.array(t.string()).optional(),
@@ -141,7 +141,7 @@ const y = t.object({
141
141
  ui_locales: t.string().optional(),
142
142
  // The following fields are not available in Auth0
143
143
  vendor_id: t.string().optional()
144
- }), Y = t.object({
144
+ }), X = t.object({
145
145
  colors: t.object({
146
146
  primary: t.string(),
147
147
  page_background: t.object({
@@ -198,7 +198,7 @@ const y = t.object({
198
198
  updated_at: t.string().transform((e) => e === null ? "" : e),
199
199
  ...w.shape,
200
200
  id: t.string()
201
- }), X = t.object({
201
+ }), J = t.object({
202
202
  logoUrl: t.string(),
203
203
  loginBackgroundImage: t.string().nullish(),
204
204
  style: t.object({
@@ -245,7 +245,7 @@ const I = t.enum([
245
245
  expires_at: t.string(),
246
246
  used_at: t.string().optional(),
247
247
  user_id: t.string().optional()
248
- }), J = t.object({
248
+ }), Z = t.object({
249
249
  ...j.shape,
250
250
  created_at: t.string()
251
251
  }), v = t.object({
@@ -266,7 +266,7 @@ const I = t.enum([
266
266
  name: t.literal("txt"),
267
267
  record: t.string(),
268
268
  domain: t.string()
269
- }), Z = t.object({
269
+ }), O = t.object({
270
270
  ...v.shape,
271
271
  custom_domain_id: t.string(),
272
272
  primary: t.boolean(),
@@ -276,7 +276,9 @@ const I = t.enum([
276
276
  methods: t.array(A)
277
277
  }).optional(),
278
278
  tls_policy: t.string().optional()
279
- }), O = t.object({
279
+ }), $ = O.extend({
280
+ tenant_id: t.string()
281
+ }), N = t.object({
280
282
  trigger_id: t.enum([
281
283
  "pre-user-signup",
282
284
  "post-user-registration",
@@ -287,10 +289,10 @@ const I = t.enum([
287
289
  hook_id: t.string().optional(),
288
290
  synchronous: t.boolean().default(!1),
289
291
  priority: t.number().optional()
290
- }), $ = O.extend({
292
+ }), tt = N.extend({
291
293
  ...s.shape,
292
294
  hook_id: t.string()
293
- }), N = t.object({
295
+ }), U = t.object({
294
296
  alg: t.enum([
295
297
  "RS256",
296
298
  "RS384",
@@ -309,9 +311,9 @@ const I = t.enum([
309
311
  x5t: t.string().optional(),
310
312
  x5c: t.array(t.string()).optional(),
311
313
  use: t.enum(["sig", "enc"]).optional()
312
- }), tt = t.object({
313
- keys: t.array(N)
314
314
  }), et = t.object({
315
+ keys: t.array(U)
316
+ }), nt = t.object({
315
317
  issuer: t.string(),
316
318
  authorization_endpoint: t.string(),
317
319
  token_endpoint: t.string(),
@@ -332,7 +334,7 @@ const I = t.enum([
332
334
  request_uri_parameter_supported: t.boolean(),
333
335
  request_parameter_supported: t.boolean(),
334
336
  token_endpoint_auth_signing_alg_values_supported: t.array(t.string())
335
- }), U = t.object({
337
+ }), R = t.object({
336
338
  csrf_token: t.string(),
337
339
  auth0Client: t.string().optional(),
338
340
  authParams: y,
@@ -344,16 +346,16 @@ const I = t.enum([
344
346
  authorization_url: t.string().optional()
345
347
  }).openapi({
346
348
  description: "This represents a login sesion"
347
- }), nt = t.object({
348
- ...U.shape,
349
+ }), it = t.object({
350
+ ...R.shape,
349
351
  id: t.string().openapi({
350
352
  description: "This is is used as the state in the universal login"
351
353
  }),
352
354
  created_at: t.string(),
353
355
  updated_at: t.string()
354
356
  });
355
- var R = /* @__PURE__ */ ((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))(R || {});
356
- const D = t.enum([
357
+ var D = /* @__PURE__ */ ((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))(D || {});
358
+ const x = t.enum([
357
359
  "cls",
358
360
  // CODE_LINK_SENT
359
361
  "fsa",
@@ -402,14 +404,14 @@ const D = t.enum([
402
404
  // SUCCESS_VERIFICATION_EMAIL
403
405
  "svr"
404
406
  // SUCCESS_VERIFICATION_EMAIL_REQUEST
405
- ]), x = t.object({
407
+ ]), T = t.object({
406
408
  name: t.string(),
407
409
  version: t.string(),
408
410
  env: t.object({
409
411
  node: t.string().optional()
410
412
  }).optional()
411
- }), it = t.object({
412
- type: D,
413
+ }), ot = t.object({
414
+ type: x,
413
415
  date: t.string(),
414
416
  description: t.string().optional(),
415
417
  log_id: t.string().optional(),
@@ -430,13 +432,13 @@ const D = t.enum([
430
432
  strategy: t.string().optional(),
431
433
  strategy_type: t.string().optional(),
432
434
  hostname: t.string().optional(),
433
- auth0_client: x.optional()
434
- }), T = t.object({
435
+ auth0_client: T.optional()
436
+ }), P = t.object({
435
437
  user_id: t.string(),
436
438
  password: t.string(),
437
439
  algorithm: t.enum(["bcrypt", "argon2id"]).default("argon2id")
438
- }), ot = t.object({
439
- ...T.shape,
440
+ }), st = t.object({
441
+ ...P.shape,
440
442
  created_at: t.string(),
441
443
  updated_at: t.string()
442
444
  }), p = t.object({
@@ -446,7 +448,7 @@ const D = t.enum([
446
448
  last_user_agent: t.string().describe("Last user agent of the device from which this user logged in"),
447
449
  last_ip: t.string().describe("Last IP address from which this user logged in"),
448
450
  last_asn: t.string().describe("Last autonomous system number from which this user logged in")
449
- }), P = t.object({
451
+ }), F = t.object({
450
452
  id: t.string(),
451
453
  revoked_at: t.string().optional(),
452
454
  used_at: t.string().optional(),
@@ -457,13 +459,13 @@ const D = t.enum([
457
459
  "Metadata related to the device used in the session"
458
460
  ),
459
461
  clients: t.array(t.string()).describe("List of client details for the session")
460
- }), st = t.object({
462
+ }), at = t.object({
461
463
  created_at: t.string(),
462
464
  updated_at: t.string(),
463
465
  authenticated_at: t.string(),
464
466
  last_interaction_at: t.string(),
465
- ...P.shape
466
- }), at = t.object({
467
+ ...F.shape
468
+ }), rt = t.object({
467
469
  kid: t.string().openapi({ description: "The key id of the signing key" }),
468
470
  cert: t.string().openapi({ description: "The public certificate of the signing key" }),
469
471
  fingerprint: t.string().openapi({ description: "The cert fingerprint" }),
@@ -483,8 +485,8 @@ const D = t.enum([
483
485
  revoked: t.boolean().optional().openapi({ description: "True if the key is revoked" }),
484
486
  revoked_at: t.string().optional().openapi({ description: "The date and time when the key was revoked" })
485
487
  });
486
- var F = /* @__PURE__ */ ((e) => (e.RefreshToken = "refresh_token", e.AuthorizationCode = "authorization_code", e.ClientCredential = "client_credentials", e.Passwordless = "passwordless", e.Password = "password", e))(F || {});
487
- const rt = t.object({
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 || {});
489
+ const lt = t.object({
488
490
  access_token: t.string(),
489
491
  id_token: t.string().optional(),
490
492
  scope: t.string().optional(),
@@ -497,7 +499,7 @@ t.object({
497
499
  code: t.string(),
498
500
  state: t.string().optional()
499
501
  });
500
- const H = t.object({
502
+ const K = t.object({
501
503
  button_border_radius: t.number(),
502
504
  button_border_weight: t.number(),
503
505
  buttons_style: t.enum(["pill"]),
@@ -507,7 +509,7 @@ const H = t.object({
507
509
  show_widget_shadow: t.boolean(),
508
510
  widget_border_weight: t.number(),
509
511
  widget_corner_radius: t.number()
510
- }), K = t.object({
512
+ }), G = t.object({
511
513
  base_focus_color: t.string(),
512
514
  base_hover_color: t.string(),
513
515
  body_text: t.string(),
@@ -530,7 +532,7 @@ const H = t.object({
530
532
  }), n = t.object({
531
533
  bold: t.boolean(),
532
534
  size: t.number()
533
- }), G = t.object({
535
+ }), L = t.object({
534
536
  body_text: n,
535
537
  buttons_text: n,
536
538
  font_url: t.string(),
@@ -540,31 +542,31 @@ const H = t.object({
540
542
  reference_text_size: t.number(),
541
543
  subtitle: n,
542
544
  title: n
543
- }), L = t.object({
545
+ }), B = t.object({
544
546
  background_color: t.string(),
545
547
  background_image_url: t.string(),
546
548
  page_layout: t.enum(["center"])
547
- }), B = t.object({
549
+ }), M = t.object({
548
550
  header_text_alignment: t.enum(["center"]),
549
551
  logo_height: t.number(),
550
552
  logo_position: t.enum(["center"]),
551
553
  logo_url: t.string(),
552
554
  social_buttons_layout: t.enum(["bottom"])
553
- }), M = t.object({
554
- borders: H,
555
- colors: K,
555
+ }), W = t.object({
556
+ borders: K,
557
+ colors: G,
556
558
  displayName: t.string(),
557
- fonts: G,
558
- page_background: L,
559
- widget: B
560
- }), lt = M.extend({
559
+ fonts: L,
560
+ page_background: B,
561
+ widget: M
562
+ }), ct = W.extend({
561
563
  themeId: t.string()
562
- }), ct = t.object({
564
+ }), pt = t.object({
563
565
  universal_login_experience: t.enum(["new", "classic"]).default("new"),
564
566
  identifier_first: t.boolean().default(!0),
565
567
  password_first: t.boolean().default(!1),
566
568
  webauthn_platform_first_factor: t.boolean()
567
- }), pt = t.object({
569
+ }), dt = t.object({
568
570
  name: t.string(),
569
571
  enabled: t.boolean().optional().default(!0),
570
572
  default_from_address: t.string().optional(),
@@ -594,7 +596,7 @@ const H = t.object({
594
596
  })
595
597
  ]),
596
598
  settings: t.object({}).optional()
597
- }), W = t.object({
599
+ }), q = t.object({
598
600
  // The actual refresh token value (primary key).
599
601
  id: t.string(),
600
602
  // Link to the session record
@@ -615,74 +617,75 @@ const H = t.object({
615
617
  })
616
618
  ),
617
619
  rotating: t.boolean()
618
- }), dt = t.object({
620
+ }), gt = t.object({
619
621
  // When the refresh token record was created.
620
622
  created_at: t.string(),
621
623
  // Spread in the rest of the refresh token properties.
622
- ...W.shape
624
+ ...q.shape
623
625
  });
624
- function gt(e) {
626
+ function _t(e) {
625
627
  const [i, o] = e.split("|");
626
628
  if (!i || !o)
627
629
  throw new Error(`Invalid user_id: ${e}`);
628
630
  return { connection: i, id: o };
629
631
  }
630
632
  export {
631
- x as Auth0Client,
633
+ T as Auth0Client,
632
634
  l as AuthorizationResponseMode,
633
635
  r as AuthorizationResponseType,
634
636
  c as CodeChallengeMethod,
635
- F as GrantType,
636
- R as LogTypes,
637
+ H as GrantType,
638
+ D as LogTypes,
637
639
  f as applicationInsertSchema,
638
640
  S as applicationSchema,
639
- Q as auth0UserResponseSchema,
641
+ V as auth0UserResponseSchema,
640
642
  y as authParamsSchema,
641
643
  a as baseUserSchema,
642
- H as bordersSchema,
643
- Y as brandingSchema,
644
+ K as bordersSchema,
645
+ X as brandingSchema,
644
646
  j as codeInsertSchema,
645
- J as codeSchema,
647
+ Z as codeSchema,
646
648
  I as codeTypeSchema,
647
- K as colorsSchema,
649
+ G as colorsSchema,
648
650
  E as connectionInsertSchema,
649
651
  k as connectionSchema,
650
652
  v as customDomainInsertSchema,
651
- Z as customDomainSchema,
652
- pt as emailProviderSchema,
653
+ O as customDomainSchema,
654
+ $ as customDomainWithTenantIdSchema,
655
+ dt as emailProviderSchema,
653
656
  n as fontDetailsSchema,
654
- G as fontsSchema,
655
- O as hookInsertSchema,
656
- $ as hookSchema,
657
+ L as fontsSchema,
658
+ N as hookInsertSchema,
659
+ tt as hookSchema,
657
660
  g as identitySchema,
658
- tt as jwksKeySchema,
659
- N as jwksSchema,
660
- it as logSchema,
661
- U as loginSessionInsertSchema,
662
- nt as loginSessionSchema,
663
- et as openIDConfigurationSchema,
664
- L as pageBackgroundSchema,
665
- gt as parseUserId,
666
- T as passwordInsertSchema,
667
- ot as passwordSchema,
661
+ et as jwksKeySchema,
662
+ U as jwksSchema,
663
+ ot as logSchema,
664
+ R as loginSessionInsertSchema,
665
+ it as loginSessionSchema,
666
+ nt as openIDConfigurationSchema,
667
+ B as pageBackgroundSchema,
668
+ _t as parseUserId,
669
+ P as passwordInsertSchema,
670
+ st as passwordSchema,
668
671
  d as profileDataSchema,
669
- ct as promptSettingSchema,
670
- W as refreshTokenInsertSchema,
671
- dt as refreshTokenSchema,
672
+ pt as promptSettingSchema,
673
+ q as refreshTokenInsertSchema,
674
+ gt as refreshTokenSchema,
672
675
  b as samlpAddon,
673
- P as sessionInsertSchema,
674
- st as sessionSchema,
675
- at as signingKeySchema,
676
+ F as sessionInsertSchema,
677
+ at as sessionSchema,
678
+ rt as signingKeySchema,
676
679
  w as tenantInsertSchema,
677
680
  C as tenantSchema,
678
- M as themeInsertSchema,
679
- lt as themeSchema,
680
- rt as tokenResponseSchema,
681
- z as totalsSchema,
681
+ W as themeInsertSchema,
682
+ ct as themeSchema,
683
+ lt as tokenResponseSchema,
684
+ Q as totalsSchema,
682
685
  _ as userInsertSchema,
683
- V as userResponseSchema,
686
+ Y as userResponseSchema,
684
687
  u as userSchema,
685
- X as vendorSettingsSchema,
688
+ J as vendorSettingsSchema,
686
689
  A as verificationMethodsSchema,
687
- B as widgetSchema
690
+ M as widgetSchema
688
691
  };
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.54.0",
14
+ "version": "0.55.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],