@authhero/adapter-interfaces 1.10.0 → 1.10.1

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 e=require("@hono/zod-openapi"),r=e.z.object({created_at:e.z.string(),updated_at:e.z.string()}),F=e.z.object({id:e.z.string(),version:e.z.string().optional()}),x=e.z.object({name:e.z.string(),version:e.z.string()}),P=e.z.object({name:e.z.string(),value:e.z.string()}),I=e.z.object({name:e.z.string().max(255),code:e.z.string().max(1e5),supported_triggers:e.z.array(F).optional(),runtime:e.z.string().max(50).optional(),dependencies:e.z.array(x).optional(),secrets:e.z.array(P).optional()}),Gt=I.partial().extend({status:e.z.enum(["draft","built"]).optional(),deployed_at:e.z.string().optional()}),Bt=I.extend({id:e.z.string(),tenant_id:e.z.string(),status:e.z.enum(["draft","built"]).default("built"),deployed_at:e.z.string().optional(),secrets:e.z.array(e.z.object({name:e.z.string(),value:e.z.string().optional()})).optional(),...r.shape}),M=e.z.enum(["user_action","admin_action","system","api"]),H=e.z.object({type:e.z.enum(["user","admin","system","api_key","client_credentials"]),id:e.z.string().optional(),email:e.z.string().optional(),org_id:e.z.string().optional(),org_name:e.z.string().optional(),scopes:e.z.array(e.z.string()).optional(),client_id:e.z.string().optional()}),G=e.z.object({type:e.z.string(),id:e.z.string(),before:e.z.record(e.z.unknown()).optional(),after:e.z.record(e.z.unknown()).optional(),diff:e.z.record(e.z.object({old:e.z.unknown(),new:e.z.unknown()})).optional()}),B=e.z.object({method:e.z.string(),path:e.z.string(),query:e.z.record(e.z.string()).optional(),body:e.z.unknown().optional(),ip:e.z.string(),user_agent:e.z.string().optional(),correlation_id:e.z.string().optional()}),W=e.z.object({status_code:e.z.number(),body:e.z.unknown().optional()}),K=e.z.object({country_code:e.z.string(),city_name:e.z.string(),latitude:e.z.string(),longitude:e.z.string(),time_zone:e.z.string(),continent_code:e.z.string()}),q=e.z.object({name:e.z.string(),version:e.z.string(),env:e.z.record(e.z.string()).optional()}),V=e.z.object({tenant_id:e.z.string(),event_type:e.z.string(),log_type:e.z.string(),description:e.z.string().optional(),category:M,actor:H,target:G,request:B,response:W.optional(),connection:e.z.string().optional(),strategy:e.z.string().optional(),strategy_type:e.z.string().optional(),audience:e.z.string().optional(),scope:e.z.string().optional(),location:K.optional(),auth0_client:q.optional(),hostname:e.z.string(),is_mobile:e.z.boolean().optional(),timestamp:e.z.string()}),Wt=V.extend({id:e.z.string()}),Kt=e.z.enum(["AUTH0","EMAIL","REDIRECT"]),qt=e.z.enum(["CREATE_USER","GET_USER","UPDATE_USER","SEND_REQUEST","SEND_EMAIL"]),Vt=e.z.enum(["VERIFY_EMAIL"]),X=e.z.object({require_mx_record:e.z.boolean().optional(),block_aliases:e.z.boolean().optional(),block_free_emails:e.z.boolean().optional(),block_disposable_emails:e.z.boolean().optional(),blocklist:e.z.array(e.z.string()).optional(),allowlist:e.z.array(e.z.string()).optional()}),Y=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("AUTH0"),action:e.z.literal("UPDATE_USER"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({connection_id:e.z.string().optional(),user_id:e.z.string(),changes:e.z.record(e.z.string(),e.z.any())})}),Q=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("EMAIL"),action:e.z.literal("VERIFY_EMAIL"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({email:e.z.string(),rules:X.optional()})}),Z=e.z.enum(["change-email","account","custom"]),$=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("REDIRECT"),action:e.z.literal("REDIRECT_USER"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({target:Z.openapi({description:"The predefined target to redirect to, or 'custom' for a custom URL"}),custom_url:e.z.string().optional().openapi({description:"Custom URL to redirect to when target is 'custom'"})})}),J=e.z.union([Y,Q,$]),ee=e.z.object({name:e.z.string().min(1).max(150).openapi({description:"The name of the flow"}),actions:e.z.array(J).optional().default([]).openapi({description:"The list of actions to execute in sequence"})}),Xt=ee.extend({...r.shape,id:e.z.string().openapi({description:"Unique identifier for the flow",example:"af_12tMpdJ3iek7svMyZkSh5M"})}),Yt=e.z.object({page:e.z.string().min(0).optional().default("0").transform(t=>parseInt(t,10)).openapi({description:"The page number where 0 is the first page"}),per_page:e.z.string().min(1).optional().default("10").transform(t=>parseInt(t,10)).openapi({description:"The number of items per page"}),include_totals:e.z.string().optional().default("false").transform(t=>t==="true").openapi({description:"If the total number of items should be included in the response"}),sort:e.z.string().regex(/^.+:(-1|1)$/).optional().openapi({description:"A property that should have the format 'string:-1' or 'string:1'"}),q:e.z.string().optional().openapi({description:"A lucene query string used to filter the results"})}),Qt=e.z.object({start:e.z.number(),limit:e.z.number(),length:e.z.number(),total:e.z.number().optional()}),te=e.z.object({email:e.z.string().optional(),email_verified:e.z.boolean().optional(),name:e.z.string().optional(),username:e.z.string().optional(),given_name:e.z.string().optional(),phone_number:e.z.string().optional(),phone_verified:e.z.boolean().optional(),family_name:e.z.string().optional()}).catchall(e.z.any()),oe=e.z.object({connection:e.z.string(),user_id:e.z.string(),provider:e.z.string(),isSocial:e.z.boolean(),email:e.z.string().optional(),email_verified:e.z.boolean().optional(),phone_number:e.z.string().optional(),phone_verified:e.z.boolean().optional(),username:e.z.string().optional(),access_token:e.z.string().optional(),access_token_secret:e.z.string().optional(),refresh_token:e.z.string().optional(),profileData:te.optional()}),ne=e.z.object({formatted:e.z.string().optional(),street_address:e.z.string().optional(),locality:e.z.string().optional(),region:e.z.string().optional(),postal_code:e.z.string().optional(),country:e.z.string().optional()}).optional(),C=e.z.object({email:e.z.string().optional().transform(t=>t&&t.toLowerCase()),username:e.z.string().refine(t=>!t.includes("@"),{message:'Usernames must not contain "@". Use the email field for email addresses.'}).optional(),phone_number:e.z.string().optional(),phone_verified:e.z.boolean().optional(),given_name:e.z.string().optional(),family_name:e.z.string().optional(),nickname:e.z.string().optional(),name:e.z.string().optional(),picture:e.z.string().optional(),locale:e.z.string().optional(),linked_to:e.z.string().optional(),profileData:e.z.string().optional(),user_id:e.z.string().optional(),app_metadata:e.z.any().default({}).optional(),user_metadata:e.z.any().default({}).optional(),middle_name:e.z.string().optional(),preferred_username:e.z.string().optional(),profile:e.z.string().optional(),website:e.z.string().optional(),gender:e.z.string().optional(),birthdate:e.z.string().optional(),zoneinfo:e.z.string().optional(),address:ne}),ie=C.extend({email_verified:e.z.boolean().default(!1),verify_email:e.z.boolean().optional(),last_ip:e.z.string().optional(),last_login:e.z.string().optional(),user_id:e.z.string().optional(),provider:e.z.string().optional(),connection:e.z.string(),is_social:e.z.boolean().optional(),registration_completed_at:e.z.string().optional(),password:e.z.object({hash:e.z.string(),algorithm:e.z.string()}).optional()}),ae=e.z.object({...ie.omit({password:!0}).shape,...r.shape,user_id:e.z.string(),provider:e.z.string(),is_social:e.z.boolean(),email:e.z.string().optional(),login_count:e.z.number().default(0),identities:e.z.array(oe).optional()}),Zt=ae.omit({registration_completed_at:!0}),$t=C.extend({login_count:e.z.number(),multifactor:e.z.array(e.z.string()).optional(),last_ip:e.z.string().optional(),last_login:e.z.string().optional(),user_id:e.z.string()}).catchall(e.z.any());let Jt="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",eo=(t=21)=>{let o="",i=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)o+=Jt[i[t]&63];return o};const re=e.z.object({client_id:e.z.string().openapi({description:"ID of this client."}),name:e.z.string().min(1).openapi({description:"Name of this client (min length: 1 character, does not allow < or >)."}),description:e.z.string().max(140).optional().openapi({description:"Free text description of this client (max length: 140 characters)."}),global:e.z.boolean().default(!1).openapi({description:"Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false)."}),client_secret:e.z.string().default(()=>eo()).optional().openapi({description:"Client secret (which you must not make public)."}),app_type:e.z.enum(["native","spa","regular_web","non_interactive","resource_server","express_configuration","rms","box","cloudbees","concur","dropbox","mscrm","echosign","egnyte","newrelic","office365","salesforce","sentry","sharepoint","slack","springcm","zendesk","zoom","sso_integration","oag"]).default("regular_web").optional().openapi({description:"The type of application this client represents"}),logo_uri:e.z.string().url().optional().openapi({description:"URL of the logo to display for this client. Recommended size is 150x150 pixels."}),is_first_party:e.z.boolean().default(!1).openapi({description:"Whether this client a first party client (true) or not (false)."}),oidc_conformant:e.z.boolean().default(!0).openapi({description:"Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false)."}),auth0_conformant:e.z.boolean().default(!0).openapi({description:"Whether this client follows Auth0-compatible behavior (true) or strict OIDC behavior (false). When true, profile/email claims are included in the ID token when scopes are requested. When false, these claims are only available from the userinfo endpoint (strict OIDC 5.4 compliance)."}),callbacks:e.z.array(e.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication."}),allowed_origins:e.z.array(e.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 (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs."}),web_origins:e.z.array(e.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."}),client_aliases:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of audiences/realms for SAML protocol. Used by the wsfed addon."}),allowed_clients:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed."}),connections:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of connection IDs enabled for this client. The order determines the display order on the login page."}),allowed_logout_urls:e.z.array(e.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."}),session_transfer:e.z.record(e.z.any()).default({}).optional().openapi({description:"Native to Web SSO Configuration"}),oidc_logout:e.z.record(e.z.any()).default({}).optional().openapi({description:"Configuration for OIDC backchannel logout"}),grant_types:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of grant types supported for this application. Can include authorization_code, implicit, refresh_token, client_credentials, password, http://auth0.com/oauth/grant-type/password-realm, http://auth0.com/oauth/grant-type/mfa-oob, http://auth0.com/oauth/grant-type/mfa-otp, http://auth0.com/oauth/grant-type/mfa-recovery-code, urn:openid:params:grant-type:ciba, and urn:ietf:params:oauth:grant-type:device_code."}),jwt_configuration:e.z.record(e.z.any()).default({}).optional().openapi({description:"Configuration related to JWTs for the client."}),signing_keys:e.z.array(e.z.record(e.z.any())).default([]).optional().openapi({description:"Signing certificates associated with this client."}),encryption_key:e.z.record(e.z.any()).default({}).optional().openapi({description:"Encryption used for WsFed responses with this client."}),sso:e.z.boolean().default(!1).openapi({description:"Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false)."}),sso_disabled:e.z.boolean().default(!1).openapi({description:"Whether Single Sign On is disabled for this client. When true, existing SSO sessions will not be reused and users must authenticate every time."}),cross_origin_authentication:e.z.boolean().default(!1).openapi({description:"Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false)."}),cross_origin_loc:e.z.string().url().optional().openapi({description:"URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page."}),custom_login_page_on:e.z.boolean().default(!1).openapi({description:"Whether a custom login page is to be used (true) or the default provided login page (false)."}),custom_login_page:e.z.string().optional().openapi({description:"The content (HTML, CSS, JS) of the custom login page."}),custom_login_page_preview:e.z.string().optional().openapi({description:"The content (HTML, CSS, JS) of the custom login page. (Used on Previews)"}),form_template:e.z.string().optional().openapi({description:"HTML form template to be used for WS-Federation."}),addons:e.z.record(e.z.any()).default({}).optional().openapi({description:"Addons enabled for this client and their associated configurations."}),token_endpoint_auth_method:e.z.enum(["none","client_secret_post","client_secret_basic"]).default("client_secret_basic").optional().openapi({description:"Defines the requested authentication method for the token endpoint. Can be none (public client without a client secret), client_secret_post (client uses HTTP POST parameters), or client_secret_basic (client uses HTTP Basic)."}),client_metadata:e.z.record(e.z.string().max(255)).default({}).optional().openapi({description:'Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: :,-+=_*?"/()<>@ [Tab][Space]'}),mobile:e.z.record(e.z.any()).default({}).optional().openapi({description:"Additional configuration for native mobile apps."}),initiate_login_uri:e.z.string().url().optional().openapi({description:"Initiate login uri, must be https"}),native_social_login:e.z.record(e.z.any()).default({}).optional(),refresh_token:e.z.record(e.z.any()).default({}).optional().openapi({description:"Refresh token configuration"}),default_organization:e.z.record(e.z.any()).default({}).optional().openapi({description:"Defines the default Organization ID and flows"}),organization_usage:e.z.enum(["deny","allow","require"]).default("deny").optional().openapi({description:"Defines how to proceed during an authentication transaction with regards an organization. Can be deny (default), allow or require."}),organization_require_behavior:e.z.enum(["no_prompt","pre_login_prompt","post_login_prompt"]).default("no_prompt").optional().openapi({description:"Defines how to proceed during an authentication transaction when client.organization_usage: 'require'. Can be no_prompt (default), pre_login_prompt or post_login_prompt. post_login_prompt requires oidc_conformant: true."}),client_authentication_methods:e.z.record(e.z.any()).default({}).optional().openapi({description:"Defines client authentication methods."}),require_pushed_authorization_requests:e.z.boolean().default(!1).openapi({description:"Makes the use of Pushed Authorization Requests mandatory for this client"}),require_proof_of_possession:e.z.boolean().default(!1).openapi({description:"Makes the use of Proof-of-Possession mandatory for this client"}),signed_request_object:e.z.record(e.z.any()).default({}).optional().openapi({description:"JWT-secured Authorization Requests (JAR) settings."}),compliance_level:e.z.enum(["none","fapi1_adv_pkj_par","fapi1_adv_mtls_par","fapi2_sp_pkj_mtls","fapi2_sp_mtls_mtls"]).optional().openapi({description:"Defines the compliance level for this client, which may restrict it's capabilities"}),par_request_expiry:e.z.number().optional().openapi({description:"Specifies how long, in seconds, a Pushed Authorization Request URI remains valid"}),token_quota:e.z.record(e.z.any()).default({}).optional(),owner_user_id:e.z.string().optional().openapi({description:"User ID of the consenting user when this client was created via IAT-gated Dynamic Client Registration. NULL for clients created via the Management API or open DCR."}),registration_type:e.z.enum(["manual","open_dcr","iat_dcr"]).optional().openapi({description:"Provenance of this client. `manual` = Management API; `open_dcr` = RFC 7591 without IAT; `iat_dcr` = RFC 7591 with an Initial Access Token."}),registration_metadata:e.z.record(e.z.any()).default({}).optional().openapi({description:"Arbitrary metadata captured at Dynamic Client Registration time that isn't a first-class client field (e.g. integration_type, domain). Also stores `iat_constraints` for clients created via IAT so RFC 7592 PUT can enforce field immutability."})}),to=e.z.object({created_at:e.z.string(),updated_at:e.z.string(),...re.shape}),se=e.z.object({client_id:e.z.string().min(1).openapi({description:"ID of the client."}),audience:e.z.string().min(1).openapi({description:"The audience (API identifier) of this client grant."}),scope:e.z.array(e.z.string()).optional().openapi({description:"Scopes allowed for this client grant."}),organization_usage:e.z.enum(["deny","allow","require"]).optional().openapi({description:"Defines whether organizations can be used with client credentials exchanges for this grant."}),allow_any_organization:e.z.boolean().optional().openapi({description:"If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations."}),is_system:e.z.boolean().optional().openapi({description:"If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly."}),subject_type:e.z.enum(["client","user"]).optional().openapi({description:"The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement."}),authorization_details_types:e.z.array(e.z.string()).optional().openapi({description:"Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement."})}),le=e.z.object({id:e.z.string().openapi({description:"ID of the client grant."}),...se.shape,created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),oo=e.z.array(le),ce=e.z.enum(["iat","rat"]),pe=e.z.object({id:e.z.string(),token_hash:e.z.string(),type:ce,client_id:e.z.string().optional(),sub:e.z.string().optional(),constraints:e.z.record(e.z.unknown()).optional(),single_use:e.z.boolean().default(!1),expires_at:e.z.string().optional()}),no=e.z.object({created_at:e.z.string(),used_at:e.z.string().optional(),revoked_at:e.z.string().optional(),...pe.shape}),z=e.z.object({x:e.z.number(),y:e.z.number()});var T=(t=>(t.RICH_TEXT="RICH_TEXT",t.NEXT_BUTTON="NEXT_BUTTON",t.BACK_BUTTON="BACK_BUTTON",t.SUBMIT_BUTTON="SUBMIT_BUTTON",t.DIVIDER="DIVIDER",t.TEXT="TEXT",t.EMAIL="EMAIL",t.PASSWORD="PASSWORD",t.NUMBER="NUMBER",t.PHONE="PHONE",t.DATE="DATE",t.CHECKBOX="CHECKBOX",t.RADIO="RADIO",t.SELECT="SELECT",t.HIDDEN="HIDDEN",t.LEGAL="LEGAL",t))(T||{}),O=(t=>(t.BLOCK="BLOCK",t.FIELD="FIELD",t))(O||{});const A=e.z.object({id:e.z.string(),category:e.z.nativeEnum(O),type:e.z.nativeEnum(T)}),de=A.extend({category:e.z.literal("BLOCK"),type:e.z.literal("RICH_TEXT"),config:e.z.object({content:e.z.string()}).passthrough()}),_e=A.extend({category:e.z.literal("BLOCK"),type:e.z.union([e.z.literal("NEXT_BUTTON"),e.z.literal("BACK_BUTTON"),e.z.literal("SUBMIT_BUTTON")]),config:e.z.object({text:e.z.string()}).passthrough()}),ze=A.extend({category:e.z.literal("FIELD"),type:e.z.literal("LEGAL"),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional(),config:e.z.object({text:e.z.string()}).passthrough()}),ge=A.extend({category:e.z.literal("FIELD"),type:e.z.union([e.z.literal("TEXT"),e.z.literal("EMAIL"),e.z.literal("PASSWORD"),e.z.literal("NUMBER"),e.z.literal("PHONE"),e.z.literal("DATE"),e.z.literal("CHECKBOX"),e.z.literal("RADIO"),e.z.literal("SELECT"),e.z.literal("HIDDEN")]),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional(),config:e.z.object({label:e.z.string().optional(),placeholder:e.z.string().optional()}).passthrough()}),me=e.z.object({id:e.z.string(),category:e.z.string(),type:e.z.string()}).passthrough(),ue=e.z.union([de,_e,ze,ge,me]);var he=(t=>(t.STEP="STEP",t.FLOW="FLOW",t.CONDITION="CONDITION",t.ACTION="ACTION",t))(he||{});const be=e.z.object({id:e.z.string(),type:e.z.literal("STEP"),coordinates:z,alias:e.z.string().optional(),config:e.z.object({components:e.z.array(ue),next_node:e.z.string()}).passthrough()}),fe=e.z.object({id:e.z.string(),type:e.z.literal("FLOW"),coordinates:z,alias:e.z.string().optional(),config:e.z.object({flow_id:e.z.string(),next_node:e.z.string()})}),Se=e.z.object({id:e.z.string(),type:e.z.literal("ACTION"),coordinates:z,alias:e.z.string().optional(),config:e.z.object({action_type:e.z.enum(["REDIRECT"]).openapi({description:"The type of action to perform"}),target:e.z.enum(["change-email","account","custom"]).openapi({description:"The predefined target to redirect to"}),custom_url:e.z.string().optional().openapi({description:"Custom URL when target is 'custom'"}),next_node:e.z.string().openapi({description:"The next node to navigate to after action (for non-redirect actions)"})}).passthrough()}),Ee=e.z.object({id:e.z.string(),type:e.z.string(),coordinates:z}).passthrough(),ye=e.z.union([be,fe,Se,Ee]),Ae=e.z.object({next_node:e.z.string(),coordinates:z}).passthrough(),Ie=e.z.object({resume_flow:e.z.boolean().optional(),coordinates:z}).passthrough(),Ce=e.z.object({id:e.z.string(),name:e.z.string(),languages:e.z.object({primary:e.z.string()}).passthrough(),nodes:e.z.array(ye),start:Ae,ending:Ie,created_at:e.z.string(),updated_at:e.z.string(),links:e.z.object({sdkSrc:e.z.string().optional(),sdk_src:e.z.string().optional()}).passthrough()}).passthrough(),io=Ce.omit({id:!0,created_at:!0,updated_at:!0});var N=(t=>(t.TOKEN="token",t.ID_TOKEN="id_token",t.TOKEN_ID_TOKEN="token id_token",t.CODE="code",t))(N||{}),w=(t=>(t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post",t.WEB_MESSAGE="web_message",t.SAML_POST="saml_post",t))(w||{}),R=(t=>(t.S256="S256",t.Plain="plain",t))(R||{});const Te=e.z.object({client_id:e.z.string(),act_as:e.z.string().optional(),response_type:e.z.nativeEnum(N).optional(),response_mode:e.z.nativeEnum(w).optional(),redirect_uri:e.z.string().optional(),audience:e.z.string().optional(),organization:e.z.string().optional(),state:e.z.string().optional(),nonce:e.z.string().optional(),scope:e.z.string().optional(),prompt:e.z.string().optional(),code_challenge_method:e.z.nativeEnum(R).optional(),code_challenge:e.z.string().optional(),username:e.z.string().optional(),ui_locales:e.z.string().optional(),max_age:e.z.number().optional(),acr_values:e.z.string().optional(),vendor_id:e.z.string().optional()}),ao=e.z.object({colors:e.z.object({primary:e.z.string(),page_background:e.z.object({type:e.z.string().optional(),start:e.z.string().optional(),end:e.z.string().optional(),angle_deg:e.z.number().optional()}).optional()}).optional(),logo_url:e.z.string().optional(),favicon_url:e.z.string().optional(),powered_by_logo_url:e.z.string().optional(),font:e.z.object({url:e.z.string()}).optional()}),Oe=e.z.enum(["password_reset","email_verification","otp","mfa_otp","authorization_code","oauth2_state","ticket"]),Ne=e.z.object({code_id:e.z.string().openapi({description:"The code that will be used in for instance an email verification flow"}),login_id:e.z.string().openapi({description:"The id of the login session that the code is connected to"}),connection_id:e.z.string().optional().openapi({description:"The connection that the code is connected to"}),code_type:Oe,code_verifier:e.z.string().optional().openapi({description:"The code verifier used in PKCE in outbound flows"}),code_challenge:e.z.string().optional().openapi({description:"The code challenge used in PKCE in outbound flows"}),code_challenge_method:e.z.enum(["plain","S256"]).optional().openapi({description:"The code challenge method used in PKCE in outbound flows"}),redirect_uri:e.z.string().optional().openapi({description:"The redirect URI associated with the code"}),otp:e.z.string().optional().openapi({description:"The one-time password value for OTP-based flows"}),nonce:e.z.string().optional().openapi({description:"The nonce value used for security in OIDC flows"}),state:e.z.string().optional().openapi({description:"The state parameter used for CSRF protection in OAuth flows"}),expires_at:e.z.string(),used_at:e.z.string().optional(),user_id:e.z.string().optional()}),ro=e.z.object({...Ne.shape,created_at:e.z.string()}),we=e.z.object({kid:e.z.string().optional(),team_id:e.z.string().optional(),realms:e.z.string().optional(),authentication_method:e.z.string().optional(),client_id:e.z.string().optional(),client_secret:e.z.string().optional(),app_secret:e.z.string().optional(),scope:e.z.string().optional(),authorization_endpoint:e.z.string().optional(),token_endpoint:e.z.string().optional(),userinfo_endpoint:e.z.string().optional(),jwks_uri:e.z.string().optional(),discovery_url:e.z.string().optional(),issuer:e.z.string().optional(),provider:e.z.string().optional(),from:e.z.string().optional(),twilio_sid:e.z.string().optional(),twilio_token:e.z.string().optional(),icon_url:e.z.string().optional(),passwordPolicy:e.z.enum(["none","low","fair","good","excellent"]).optional(),password_complexity_options:e.z.object({min_length:e.z.number().optional()}).optional(),password_history:e.z.object({enable:e.z.boolean().optional(),size:e.z.number().optional()}).optional(),password_no_personal_info:e.z.object({enable:e.z.boolean().optional()}).optional(),password_dictionary:e.z.object({enable:e.z.boolean().optional(),dictionary:e.z.array(e.z.string()).optional()}).optional(),disable_signup:e.z.boolean().optional(),brute_force_protection:e.z.boolean().optional(),import_mode:e.z.boolean().optional(),attributes:e.z.object({email:e.z.object({identifier:e.z.object({active:e.z.boolean().optional()}).optional(),signup:e.z.object({status:e.z.enum(["required","optional","disabled"]).optional(),verification:e.z.object({active:e.z.boolean().optional()}).optional()}).optional(),validation:e.z.object({allowed:e.z.boolean().optional()}).optional(),unique:e.z.boolean().optional(),profile_required:e.z.boolean().optional(),verification_method:e.z.enum(["link","code"]).optional()}).optional(),username:e.z.object({identifier:e.z.object({active:e.z.boolean().optional()}).optional(),signup:e.z.object({status:e.z.enum(["required","optional","disabled"]).optional()}).optional(),validation:e.z.object({max_length:e.z.number().optional(),min_length:e.z.number().optional(),allowed_types:e.z.object({email:e.z.boolean().optional(),phone_number:e.z.boolean().optional()}).optional()}).optional(),profile_required:e.z.boolean().optional()}).optional(),phone_number:e.z.object({identifier:e.z.object({active:e.z.boolean().optional()}).optional(),signup:e.z.object({status:e.z.enum(["required","optional","disabled"]).optional()}).optional()}).optional()}).optional(),authentication_methods:e.z.object({password:e.z.object({enabled:e.z.boolean().optional()}).optional(),passkey:e.z.object({enabled:e.z.boolean().optional()}).optional()}).optional(),passkey_options:e.z.object({challenge_ui:e.z.enum(["both","autofill","button"]).optional(),local_enrollment_enabled:e.z.boolean().optional(),progressive_enrollment_enabled:e.z.boolean().optional()}).optional(),requires_username:e.z.boolean().optional(),validation:e.z.object({username:e.z.object({min:e.z.number().optional(),max:e.z.number().optional()}).optional()}).optional(),set_user_root_attributes:e.z.enum(["on_each_login","on_first_login","never_on_login"]).optional()}),Re=e.z.object({id:e.z.string().optional(),name:e.z.string(),display_name:e.z.string().optional(),strategy:e.z.string(),options:we.default({}),enabled_clients:e.z.array(e.z.string()).default([]).optional(),response_type:e.z.custom().optional(),response_mode:e.z.custom().optional(),is_domain_connection:e.z.boolean().optional(),show_as_button:e.z.boolean().optional(),metadata:e.z.record(e.z.any()).optional(),is_system:e.z.boolean().optional()}),so=e.z.object({id:e.z.string(),created_at:e.z.string().transform(t=>t===null?"":t),updated_at:e.z.string().transform(t=>t===null?"":t)}).extend(Re.shape),je=e.z.object({domain:e.z.string(),custom_domain_id:e.z.string().optional(),type:e.z.enum(["auth0_managed_certs","self_managed_certs"]),verification_method:e.z.enum(["txt"]).optional(),tls_policy:e.z.enum(["recommended"]).optional(),custom_client_ip_header:e.z.enum(["true-client-ip","cf-connecting-ip","x-forwarded-for","x-azure-clientip","null"]).optional(),domain_metadata:e.z.record(e.z.string().max(255)).optional()}),De=e.z.discriminatedUnion("name",[e.z.object({name:e.z.literal("txt"),record:e.z.string(),domain:e.z.string()}),e.z.object({name:e.z.literal("http"),http_body:e.z.string(),http_url:e.z.string()})]),ve=e.z.object({...je.shape,custom_domain_id:e.z.string(),primary:e.z.boolean(),status:e.z.enum(["disabled","pending","pending_verification","ready"]),origin_domain_name:e.z.string().optional(),verification:e.z.object({methods:e.z.array(De)}).optional(),tls_policy:e.z.string().optional()}),lo=ve.extend({tenant_id:e.z.string()}),j=e.z.object({id:e.z.string(),order:e.z.number().optional(),visible:e.z.boolean().optional().default(!0)}),l=j.extend({category:e.z.literal("BLOCK").optional()}),co=l.extend({type:e.z.literal("DIVIDER"),config:e.z.object({text:e.z.string().optional()}).optional()}),po=l.extend({type:e.z.literal("HTML"),config:e.z.object({content:e.z.string().optional()}).optional()}),_o=l.extend({type:e.z.literal("IMAGE"),config:e.z.object({src:e.z.string().optional(),alt:e.z.string().optional(),width:e.z.number().optional(),height:e.z.number().optional()}).optional()}),zo=l.extend({type:e.z.literal("JUMP_BUTTON"),config:e.z.object({text:e.z.string().optional(),target_step:e.z.string().optional()})}),go=l.extend({type:e.z.literal("RESEND_BUTTON"),config:e.z.object({text:e.z.string().optional(),resend_action:e.z.string().optional()})}),mo=l.extend({type:e.z.literal("NEXT_BUTTON"),config:e.z.object({text:e.z.string().optional()})}),uo=l.extend({type:e.z.literal("PREVIOUS_BUTTON"),config:e.z.object({text:e.z.string().optional()})}),ho=l.extend({type:e.z.literal("RICH_TEXT"),config:e.z.object({content:e.z.string().optional()}).optional()}),D=j.extend({category:e.z.literal("WIDGET").optional(),label:e.z.string().min(1).optional(),hint:e.z.string().min(1).max(500).optional(),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional()}),bo=D.extend({type:e.z.literal("AUTH0_VERIFIABLE_CREDENTIALS"),config:e.z.object({credential_type:e.z.string().optional()})}),fo=D.extend({type:e.z.literal("GMAPS_ADDRESS"),config:e.z.object({api_key:e.z.string().optional()})}),So=D.extend({type:e.z.literal("RECAPTCHA"),config:e.z.object({site_key:e.z.string().optional()})}),n=j.extend({category:e.z.literal("FIELD").optional(),label:e.z.string().min(1).optional(),hint:e.z.string().min(1).max(500).optional(),messages:e.z.array(e.z.object({id:e.z.number().optional(),text:e.z.string(),type:e.z.enum(["info","error","success","warning"])})).optional(),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional()}),Eo=n.extend({type:e.z.literal("BOOLEAN"),config:e.z.object({default_value:e.z.boolean().optional()}).optional()}),yo=n.extend({type:e.z.literal("CARDS"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string(),description:e.z.string().optional(),image:e.z.string().optional()})).optional(),multi_select:e.z.boolean().optional()}).optional()}),Ao=n.extend({type:e.z.literal("CHOICE"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string()})).optional(),display:e.z.enum(["radio","checkbox"]).optional(),multiple:e.z.boolean().optional(),default_value:e.z.union([e.z.string(),e.z.array(e.z.string())]).optional()}).optional()}),Io=n.extend({type:e.z.literal("CUSTOM"),config:e.z.object({component:e.z.string().optional(),props:e.z.record(e.z.any()).optional(),schema:e.z.record(e.z.any()).optional(),code:e.z.string().optional()})}),Co=n.extend({type:e.z.literal("DATE"),config:e.z.object({format:e.z.string().optional(),min:e.z.string().optional(),max:e.z.string().optional(),default_value:e.z.string().optional()}).optional()}),To=n.extend({type:e.z.literal("DROPDOWN"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string()})).optional(),placeholder:e.z.string().optional(),searchable:e.z.boolean().optional(),multiple:e.z.boolean().optional(),default_value:e.z.union([e.z.string(),e.z.array(e.z.string())]).optional()}).optional()}),Oo=n.extend({type:e.z.literal("EMAIL"),config:e.z.object({placeholder:e.z.string().optional(),default_value:e.z.string().optional()}).optional()}),No=n.extend({type:e.z.literal("FILE"),config:e.z.object({accept:e.z.string().optional(),max_size:e.z.number().optional(),multiple:e.z.boolean().optional()}).optional()}),wo=n.extend({type:e.z.literal("LEGAL"),config:e.z.object({text:e.z.string(),html:e.z.boolean().optional()}).optional()}),Ro=n.extend({type:e.z.literal("NUMBER"),config:e.z.object({placeholder:e.z.string().optional(),min:e.z.number().optional(),max:e.z.number().optional(),step:e.z.number().optional(),default_value:e.z.string().optional()}).optional()}),jo=n.extend({type:e.z.literal("PASSWORD"),config:e.z.object({placeholder:e.z.string().optional(),min_length:e.z.number().optional(),show_toggle:e.z.boolean().optional(),forgot_password_link:e.z.string().optional(),default_value:e.z.string().optional()}).optional()}),Do=n.extend({type:e.z.literal("PAYMENT"),config:e.z.object({provider:e.z.string().optional(),currency:e.z.string().optional()}).optional()}),vo=n.extend({type:e.z.literal("SOCIAL"),config:e.z.object({providers:e.z.array(e.z.string()).optional(),provider_details:e.z.array(e.z.object({name:e.z.string(),strategy:e.z.string().optional(),display_name:e.z.string().optional(),icon_url:e.z.string().optional(),href:e.z.string().optional()})).optional()}).optional()}),Lo=n.extend({type:e.z.literal("TEL"),config:e.z.object({placeholder:e.z.string().optional(),default_country:e.z.string().optional(),default_value:e.z.string().optional(),allow_email:e.z.boolean().optional()}).optional()}),ko=n.extend({type:e.z.literal("TEXT"),config:e.z.object({placeholder:e.z.string().optional(),multiline:e.z.boolean().optional(),max_length:e.z.number().optional(),default_value:e.z.string().optional()}).optional()}),Uo=n.extend({type:e.z.literal("COUNTRY"),config:e.z.object({placeholder:e.z.string().optional(),default_value:e.z.string().optional()}).optional()}),Fo=n.extend({type:e.z.literal("URL"),config:e.z.object({placeholder:e.z.string().optional(),default_value:e.z.string().optional()}).optional()}),Le=e.z.discriminatedUnion("type",[co,po,_o,zo,go,mo,uo,ho]),ke=e.z.discriminatedUnion("type",[bo,fo,So]),Ue=e.z.discriminatedUnion("type",[Eo,yo,Ao,Uo,Io,Co,To,Oo,No,wo,Ro,jo,Do,vo,Lo,ko,Fo]),v=e.z.union([Le,ke,Ue]),xo=new Set(["BOOLEAN","CARDS","CHOICE","COUNTRY","DATE","DROPDOWN","EMAIL","LEGAL","NUMBER","PASSWORD","TEL","TEXT","URL"]),Po=e.z.object({id:e.z.string(),type:e.z.literal("submit"),label:e.z.string(),className:e.z.string().optional(),disabled:e.z.boolean().optional().default(!1),order:e.z.number().optional(),visible:e.z.boolean().optional().default(!0),customizations:e.z.record(e.z.string(),e.z.any()).optional()}),b=e.z.object({x:e.z.number(),y:e.z.number()}),Mo=e.z.object({id:e.z.string(),type:e.z.literal("FLOW"),coordinates:b,alias:e.z.string().min(1).max(150).optional(),config:e.z.object({flow_id:e.z.string().max(30),next_node:e.z.string().optional()})}),Ho=e.z.object({id:e.z.string(),type:e.z.literal("ROUTER"),coordinates:b,alias:e.z.string().min(1).max(150),config:e.z.object({rules:e.z.array(e.z.object({id:e.z.string(),alias:e.z.string().min(1).max(150).optional(),condition:e.z.any(),next_node:e.z.string()})),fallback:e.z.string()})}),Go=e.z.object({id:e.z.string(),type:e.z.literal("STEP"),coordinates:b,alias:e.z.string().min(1).max(150).optional(),config:e.z.object({components:e.z.array(v),next_node:e.z.string().optional()})}),Fe=e.z.discriminatedUnion("type",[Mo,Ho,Go]),xe=e.z.object({name:e.z.string().openapi({description:"The name of the form"}),messages:e.z.object({errors:e.z.record(e.z.string(),e.z.any()).optional(),custom:e.z.record(e.z.string(),e.z.any()).optional()}).optional(),languages:e.z.object({primary:e.z.string().optional(),default:e.z.string().optional()}).optional(),translations:e.z.record(e.z.string(),e.z.any()).optional(),nodes:e.z.array(Fe).optional(),start:e.z.object({hidden_fields:e.z.array(e.z.object({key:e.z.string(),value:e.z.string()})).optional(),next_node:e.z.string().optional(),coordinates:b.optional()}).optional(),ending:e.z.object({redirection:e.z.object({delay:e.z.number().optional(),target:e.z.string().optional()}).optional(),after_submit:e.z.object({flow_id:e.z.string().optional()}).optional(),coordinates:b.optional(),resume_flow:e.z.boolean().optional()}).optional(),style:e.z.object({css:e.z.string().optional()}).optional(),links:e.z.object({sdkSrc:e.z.string().optional(),sdk_src:e.z.string().optional()}).optional()}).openapi({description:"Schema for flow-based forms (matches Auth0 Forms structure)"}),Bo=e.z.object({...r.shape,...xe.shape,id:e.z.string()}),Pe=e.z.object({id:e.z.number().optional(),text:e.z.string(),type:e.z.enum(["info","error","success","warning"])}),Me=e.z.object({id:e.z.string().optional(),text:e.z.string(),href:e.z.string(),linkText:e.z.string().optional()}),Wo=e.z.object({name:e.z.string().optional(),action:e.z.string(),method:e.z.enum(["POST","GET"]),title:e.z.string().optional(),description:e.z.string().optional(),components:e.z.array(v),messages:e.z.array(Pe).optional(),links:e.z.array(Me).optional(),footer:e.z.string().optional()});function Ko(t){return t.category==="BLOCK"}function qo(t){return t.category==="WIDGET"}function Vo(t){return t.category==="FIELD"}const He=e.z.enum(["pre-user-registration","post-user-registration","post-user-login","validate-registration-username","pre-user-deletion","post-user-deletion"]),Ge=e.z.enum(["pre-user-registration","post-user-registration","post-user-login","validate-registration-username","pre-user-deletion","post-user-deletion"]),Be=e.z.enum(["post-user-login","credentials-exchange"]),We=e.z.enum(["post-user-login","credentials-exchange","pre-user-registration","post-user-registration"]),L=e.z.enum(["ensure-username","set-preferred-username"]),Xo={"ensure-username":{name:"Ensure Username",description:"Automatically assigns a username to users who sign in without one. Creates a linked username account for social/email users.",trigger_id:"post-user-login"},"set-preferred-username":{name:"Set Preferred Username",description:"Sets the preferred_username claim on tokens based on the username from the primary or linked user.",trigger_id:"credentials-exchange"}},c={enabled:e.z.boolean().default(!1),synchronous:e.z.boolean().default(!1),priority:e.z.number().optional(),hook_id:e.z.string().optional()},Yo=e.z.object({...c,trigger_id:He,url:e.z.string()}),Qo=e.z.object({...c,trigger_id:Ge,form_id:e.z.string()}),Zo=e.z.object({...c,trigger_id:Be,template_id:L}),$o=e.z.object({...c,trigger_id:We,code_id:e.z.string()}),Jo=e.z.union([Yo,Qo,Zo,$o]),en=e.z.object({...c,trigger_id:He,...r.shape,hook_id:e.z.string(),url:e.z.string()}),tn=e.z.object({...c,trigger_id:Ge,...r.shape,hook_id:e.z.string(),form_id:e.z.string()}),on=e.z.object({...c,trigger_id:Be,...r.shape,hook_id:e.z.string(),template_id:L}),nn=e.z.object({...c,trigger_id:We,...r.shape,hook_id:e.z.string(),code_id:e.z.string()}),an=e.z.union([en,tn,on,nn]),Ke=e.z.object({code:e.z.string().max(1e5),secrets:e.z.record(e.z.string()).optional()}),rn=Ke.extend({id:e.z.string(),tenant_id:e.z.string(),...r.shape}),qe=e.z.object({name:e.z.string().optional()}),Ve=e.z.object({email:e.z.string().optional()}),Xe=e.z.object({organization_id:e.z.string().max(50),inviter:qe,invitee:Ve,invitation_url:e.z.string().url(),client_id:e.z.string(),connection_id:e.z.string().optional(),app_metadata:e.z.record(e.z.any()).default({}).optional(),user_metadata:e.z.record(e.z.any()).default({}).optional(),ttl_sec:e.z.number().int().max(2592e3).default(604800).optional(),roles:e.z.array(e.z.string()).default([]).optional(),send_invitation_email:e.z.boolean().default(!0).optional()}),sn=e.z.object({id:e.z.string(),organization_id:e.z.string().max(50),created_at:e.z.string().datetime(),expires_at:e.z.string().datetime(),ticket_id:e.z.string().optional()}).extend(Xe.shape),Ye=e.z.object({alg:e.z.enum(["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512"]),e:e.z.string(),kid:e.z.string(),kty:e.z.enum(["RSA","EC","oct"]),n:e.z.string(),x5t:e.z.string().optional(),x5c:e.z.array(e.z.string()).optional(),use:e.z.enum(["sig","enc"]).optional()}),ln=e.z.object({keys:e.z.array(Ye)}),cn=e.z.object({issuer:e.z.string(),authorization_endpoint:e.z.string(),token_endpoint:e.z.string(),device_authorization_endpoint:e.z.string(),userinfo_endpoint:e.z.string(),mfa_challenge_endpoint:e.z.string(),jwks_uri:e.z.string(),registration_endpoint:e.z.string().optional(),revocation_endpoint:e.z.string(),scopes_supported:e.z.array(e.z.string()),response_types_supported:e.z.array(e.z.string()),code_challenge_methods_supported:e.z.array(e.z.string()),response_modes_supported:e.z.array(e.z.string()),subject_types_supported:e.z.array(e.z.string()),id_token_signing_alg_values_supported:e.z.array(e.z.string()),token_endpoint_auth_methods_supported:e.z.array(e.z.string()),claims_supported:e.z.array(e.z.string()),request_uri_parameter_supported:e.z.boolean(),request_parameter_supported:e.z.boolean(),token_endpoint_auth_signing_alg_values_supported:e.z.array(e.z.string())});var k=(t=>(t.PENDING="pending",t.AUTHENTICATED="authenticated",t.AWAITING_EMAIL_VERIFICATION="awaiting_email_verification",t.AWAITING_MFA="awaiting_mfa",t.AWAITING_HOOK="awaiting_hook",t.AWAITING_CONTINUATION="awaiting_continuation",t.COMPLETED="completed",t.FAILED="failed",t.EXPIRED="expired",t))(k||{});const Qe=e.z.nativeEnum(k),Ze=e.z.object({strategy:e.z.string(),strategy_type:e.z.string()}),$e=e.z.object({csrf_token:e.z.string(),auth0Client:e.z.string().optional(),authParams:Te,expires_at:e.z.string(),deleted_at:e.z.string().optional(),ip:e.z.string().optional(),useragent:e.z.string().optional(),session_id:e.z.string().optional(),authorization_url:e.z.string().optional(),state:Qe.optional().default("pending"),state_data:e.z.string().optional(),failure_reason:e.z.string().optional(),user_id:e.z.string().optional(),auth_connection:e.z.string().optional(),auth_strategy:Ze.optional(),authenticated_at:e.z.string().optional()}).openapi({description:"This represents a login sesion"}),pn=e.z.object({...$e.shape,id:e.z.string().openapi({description:"This is is used as the state in the universal login"}),created_at:e.z.string(),updated_at:e.z.string()}),Je={ACLS_SUMMARY:"acls_summary",ACTIONS_EXECUTION_FAILED:"actions_execution_failed",API_LIMIT:"api_limit",API_LIMIT_WARNING:"api_limit_warning",APPI:"appi",CIBA_EXCHANGE_FAILED:"ciba_exchange_failed",CIBA_EXCHANGE_SUCCEEDED:"ciba_exchange_succeeded",CIBA_START_FAILED:"ciba_start_failed",CIBA_START_SUCCEEDED:"ciba_start_succeeded",CODE_LINK_SENT:"cls",CODE_SENT:"cs",DEPRECATION_NOTICE:"depnote",FAILED_LOGIN:"f",FAILED_BY_CONNECTOR:"fc",FAILED_CHANGE_EMAIL:"fce",FAILED_BY_CORS:"fco",FAILED_CROSS_ORIGIN_AUTHENTICATION:"fcoa",FAILED_CHANGE_PASSWORD:"fcp",FAILED_POST_CHANGE_PASSWORD_HOOK:"fcph",FAILED_CHANGE_PHONE_NUMBER:"fcpn",FAILED_CHANGE_PASSWORD_REQUEST:"fcpr",FAILED_CONNECTOR_PROVISIONING:"fcpro",FAILED_CHANGE_USERNAME:"fcu",FAILED_DELEGATION:"fd",FAILED_DEVICE_ACTIVATION:"fdeac",FAILED_DEVICE_AUTHORIZATION_REQUEST:"fdeaz",USER_CANCELED_DEVICE_CONFIRMATION:"fdecc",FAILED_USER_DELETION:"fdu",FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:"feacft",FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:"feccft",FAILED_EXCHANGE_CUSTOM_TOKEN:"fecte",FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:"fede",FAILED_FEDERATED_LOGOUT:"federated_logout_failed",FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN:"fens",FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:"feoobft",FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:"feotpft",FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:"fepft",FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:"fepotpft",FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:"fercft",FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN:"ferrt",FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:"fertft",FAILED_HOOK:"fh",FAILED_IMPERSONATION:"fimp",FAILED_INVITE_ACCEPT:"fi",FAILED_LOGOUT:"flo",FLOWS_EXECUTION_COMPLETED:"flows_execution_completed",FLOWS_EXECUTION_FAILED:"flows_execution_failed",FAILED_SENDING_NOTIFICATION:"fn",FORMS_SUBMISSION_FAILED:"forms_submission_failed",FORMS_SUBMISSION_SUCCEEDED:"forms_submission_succeeded",FAILED_LOGIN_INCORRECT_PASSWORD:"fp",FAILED_PUSHED_AUTHORIZATION_REQUEST:"fpar",FAILED_POST_USER_REGISTRATION_HOOK:"fpurh",FAILED_SIGNUP:"fs",FAILED_SILENT_AUTH:"fsa",FAILED_LOGIN_INVALID_EMAIL_USERNAME:"fu",FAILED_USERS_IMPORT:"fui",FAILED_VERIFICATION_EMAIL:"fv",FAILED_VERIFICATION_EMAIL_REQUEST:"fvr",EMAIL_VERIFICATION_CONFIRMED:"gd_auth_email_verification",EMAIL_VERIFICATION_FAILED:"gd_auth_fail_email_verification",MFA_AUTH_FAILED:"gd_auth_failed",MFA_AUTH_REJECTED:"gd_auth_rejected",MFA_AUTH_SUCCESS:"gd_auth_succeed",MFA_ENROLLMENT_COMPLETE:"gd_enrollment_complete",TOO_MANY_MFA_FAILURES:"gd_otp_rate_limit_exceed",MFA_RECOVERY_FAILED:"gd_recovery_failed",MFA_RECOVERY_RATE_LIMIT_EXCEED:"gd_recovery_rate_limit_exceed",MFA_RECOVERY_SUCCESS:"gd_recovery_succeed",MFA_EMAIL_SENT:"gd_send_email",EMAIL_VERIFICATION_SENT:"gd_send_email_verification",EMAIL_VERIFICATION_SEND_FAILURE:"gd_send_email_verification_failure",PUSH_NOTIFICATION_SENT:"gd_send_pn",ERROR_SENDING_MFA_PUSH_NOTIFICATION:"gd_send_pn_failure",MFA_SMS_SENT:"gd_send_sms",ERROR_SENDING_MFA_SMS:"gd_send_sms_failure",MFA_VOICE_CALL_SUCCESS:"gd_send_voice",MFA_VOICE_CALL_FAILED:"gd_send_voice_failure",SECOND_FACTOR_STARTED:"gd_start_auth",MFA_ENROLL_STARTED:"gd_start_enroll",MFA_ENROLLMENT_FAILED:"gd_start_enroll_failed",GUARDIAN_TENANT_UPDATE:"gd_tenant_update",UNENROLL_DEVICE_ACCOUNT:"gd_unenroll",UPDATE_DEVICE_ACCOUNT:"gd_update_device_account",WEBAUTHN_CHALLENGE_FAILED:"gd_webauthn_challenge_failed",WEBAUTHN_ENROLLMENT_FAILED:"gd_webauthn_enrollment_failed",FAILED_KMS_API_OPERATION:"kms_key_management_failure",SUCCESS_KMS_API_OPERATION:"kms_key_management_success",KMS_KEY_STATE_CHANGED:"kms_key_state_changed",TOO_MANY_CALLS_TO_DELEGATION:"limit_delegation",BLOCKED_IP_ADDRESS:"limit_mu",BLOCKED_ACCOUNT_IP:"limit_sul",BLOCKED_ACCOUNT_EMAIL:"limit_wc",MFA_REQUIRED:"mfar",MANAGEMENT_API_READ_OPERATION:"mgmt_api_read",FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:"my_account_authentication_method_failed",SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:"my_account_authentication_method_succeeded",FAILED_OIDC_BACKCHANNEL_LOGOUT:"oidc_backchannel_logout_failed",SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT:"oidc_backchannel_logout_succeeded",ORGANIZATION_MEMBER_ADDED:"organization_member_added",PASSKEY_CHALLENGE_FAILED:"passkey_challenge_failed",PASSKEY_CHALLENGE_STARTED:"passkey_challenge_started",PRE_LOGIN_ASSESSMENT:"pla",BREACHED_PASSWORD:"pwd_leak",BREACHED_PASSWORD_ON_RESET:"reset_pwd_leak",SUCCESS_RESOURCE_CLEANUP:"resource_cleanup",RICH_CONSENTS_ACCESS_ERROR:"rich_consents_access_error",SUCCESS_LOGIN:"s",SUCCESS_API_OPERATION:"sapi",FAILED_API_OPERATION:"fapi",SUCCESS_CHANGE_EMAIL:"sce",SUCCESS_CROSS_ORIGIN_AUTHENTICATION:"scoa",SUCCESS_CHANGE_PASSWORD:"scp",SUCCESS_CHANGE_PHONE_NUMBER:"scpn",SUCCESS_CHANGE_PASSWORD_REQUEST:"scpr",SUCCESS_CHANGE_USERNAME:"scu",SUCCESS_CREDENTIAL_VALIDATION:"scv",SUCCESS_DELEGATION:"sd",SUCCESS_USER_DELETION:"sdu",SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:"seacft",SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:"seccft",SUCCESS_EXCHANGE_CUSTOM_TOKEN:"secte",SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:"sede",SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN:"sens",SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:"seoobft",SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:"seotpft",SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:"sepft",SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN:"sepkoobft",SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN:"sepkotpft",SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN:"sepkrcft",SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:"sercft",SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:"sertft",SUCCESS_IMPERSONATION:"simp",SUCCESSFULLY_ACCEPTED_USER_INVITE:"si",BREACHED_PASSWORD_ON_SIGNUP:"signup_pwd_leak",SUCCESS_LOGOUT:"slo",SUCCESS_REVOCATION:"srrt",SUCCESS_SIGNUP:"ss",FAILED_SS_SSO_OPERATION:"ss_sso_failure",INFORMATION_FROM_SS_SSO_OPERATION:"ss_sso_info",SUCCESS_SS_SSO_OPERATION:"ss_sso_success",SUCCESS_SILENT_AUTH:"ssa",SUCCESSFUL_SCIM_OPERATION:"sscim",SUCCESSFULLY_IMPORTED_USERS:"sui",SUCCESS_VERIFICATION_EMAIL:"sv",SUCCESS_VERIFICATION_EMAIL_REQUEST:"svr",MAX_AMOUNT_OF_AUTHENTICATORS:"too_many_records",USER_LOGIN_BLOCK_RELEASED:"ublkdu",FAILED_UNIVERSAL_LOGOUT:"universal_logout_failed",SUCCESSFUL_UNIVERSAL_LOGOUT:"universal_logout_succeeded",WARNING_DURING_LOGIN:"w",WARNING_SENDING_NOTIFICATION:"wn",WARNING_USER_MANAGEMENT:"wum"},dn=e.z.string().refine(t=>Object.values(Je).includes(t),{message:"Invalid log type"}),et=e.z.object({name:e.z.string(),version:e.z.string(),env:e.z.object({node:e.z.string().optional()}).optional()}),tt=e.z.object({country_code:e.z.string().length(2),city_name:e.z.string(),latitude:e.z.string(),longitude:e.z.string(),time_zone:e.z.string(),continent_code:e.z.string()}),ot=e.z.object({type:dn,date:e.z.string(),description:e.z.string().optional(),ip:e.z.string().optional(),user_agent:e.z.string().optional(),details:e.z.any().optional(),isMobile:e.z.boolean(),user_id:e.z.string().optional(),user_name:e.z.string().optional(),connection:e.z.string().optional(),connection_id:e.z.string().optional(),client_id:e.z.string().optional(),client_name:e.z.string().optional(),audience:e.z.string().optional(),scope:e.z.string().optional(),strategy:e.z.string().optional(),strategy_type:e.z.string().optional(),hostname:e.z.string().optional(),auth0_client:et.optional(),log_id:e.z.string().optional(),location_info:tt.optional()}),_n=e.z.object({...ot.shape,log_id:e.z.string()}),nt=e.z.object({id:e.z.string().optional(),user_id:e.z.string(),password:e.z.string(),algorithm:e.z.enum(["bcrypt","argon2id"]).default("argon2id"),is_current:e.z.boolean().default(!0)}),zn=nt.extend({id:e.z.string(),created_at:e.z.string(),updated_at:e.z.string()}),it=e.z.object({initial_user_agent:e.z.string().describe("First user agent of the device from which this user logged in"),initial_ip:e.z.string().describe("First IP address associated with this session"),initial_asn:e.z.string().describe("First autonomous system number associated with this session"),last_user_agent:e.z.string().describe("Last user agent of the device from which this user logged in"),last_ip:e.z.string().describe("Last IP address from which this user logged in"),last_asn:e.z.string().describe("Last autonomous system number from which this user logged in")}),at=e.z.object({id:e.z.string(),revoked_at:e.z.string().optional(),used_at:e.z.string().optional(),user_id:e.z.string().describe("The user ID associated with the session"),expires_at:e.z.string().optional(),login_session_id:e.z.string(),idle_expires_at:e.z.string().optional(),device:it.describe("Metadata related to the device used in the session"),clients:e.z.array(e.z.string()).describe("List of client details for the session")}),gn=e.z.object({created_at:e.z.string(),updated_at:e.z.string(),authenticated_at:e.z.string(),last_interaction_at:e.z.string(),...at.shape}),mn=e.z.object({kid:e.z.string().openapi({description:"The key id of the signing key"}),cert:e.z.string().openapi({description:"The public certificate of the signing key"}),fingerprint:e.z.string().openapi({description:"The cert fingerprint"}),thumbprint:e.z.string().openapi({description:"The cert thumbprint"}),pkcs7:e.z.string().optional().openapi({description:"The private key in pkcs7 format"}),current:e.z.boolean().optional().openapi({description:"True if the key is the current key"}),next:e.z.boolean().optional().openapi({description:"True if the key is the next key"}),previous:e.z.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:e.z.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:e.z.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:e.z.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:e.z.string().optional().openapi({description:"The date and time when the key was revoked"}),connection:e.z.string().optional().openapi({description:"The connection identifier associated with the key"}),type:e.z.enum(["jwt_signing","saml_encryption"]).openapi({description:"The type of the signing key"})}),rt=e.z.object({id:e.z.string().optional(),audience:e.z.string(),friendly_name:e.z.string(),picture_url:e.z.string().optional(),support_email:e.z.string().optional(),support_url:e.z.string().optional(),sender_email:e.z.string().email(),sender_name:e.z.string(),session_lifetime:e.z.number().optional(),idle_session_lifetime:e.z.number().optional(),ephemeral_session_lifetime:e.z.number().optional(),idle_ephemeral_session_lifetime:e.z.number().optional(),session_cookie:e.z.object({mode:e.z.enum(["persistent","non-persistent"]).optional()}).optional(),allowed_logout_urls:e.z.array(e.z.string()).optional(),default_redirection_uri:e.z.string().optional(),enabled_locales:e.z.array(e.z.string()).optional(),default_directory:e.z.string().optional(),error_page:e.z.object({html:e.z.string().optional(),show_log_link:e.z.boolean().optional(),url:e.z.string().optional()}).optional(),flags:e.z.object({allow_changing_enable_sso:e.z.boolean().optional(),allow_legacy_delegation_grant_types:e.z.boolean().optional(),allow_legacy_ro_grant_types:e.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:e.z.boolean().optional(),change_pwd_flow_v1:e.z.boolean().optional(),custom_domains_provisioning:e.z.boolean().optional(),dashboard_insights_view:e.z.boolean().optional(),dashboard_log_streams_next:e.z.boolean().optional(),disable_clickjack_protection_headers:e.z.boolean().optional(),disable_fields_map_fix:e.z.boolean().optional(),disable_impersonation:e.z.boolean().optional(),disable_management_api_sms_obfuscation:e.z.boolean().optional(),enable_adfs_waad_email_verification:e.z.boolean().optional(),enable_apis_section:e.z.boolean().optional(),enable_client_connections:e.z.boolean().optional(),enable_custom_domain_in_emails:e.z.boolean().optional(),enable_dynamic_client_registration:e.z.boolean().optional(),dcr_require_initial_access_token:e.z.boolean().optional(),dcr_allowed_grant_types:e.z.array(e.z.string()).optional(),allow_http_return_to:e.z.array(e.z.string().refine(t=>{try{const o=new URL(t);return o.protocol==="http:"&&(o.pathname===""||o.pathname==="/")&&!o.search&&!o.hash&&t===o.origin}catch{return!1}},{message:"must be a fully-qualified http origin (scheme + host + port, no path)"})).optional(),enable_idtoken_api2:e.z.boolean().optional(),enable_legacy_logs_search_v2:e.z.boolean().optional(),enable_legacy_profile:e.z.boolean().optional(),enable_pipeline2:e.z.boolean().optional(),enable_public_signup_user_exists_error:e.z.boolean().optional(),enable_sso:e.z.boolean().optional(),enforce_client_authentication_on_passwordless_start:e.z.boolean().optional(),genai_trial:e.z.boolean().optional(),improved_signup_bot_detection_in_classic:e.z.boolean().optional(),mfa_show_factor_list_on_enrollment:e.z.boolean().optional(),no_disclose_enterprise_connections:e.z.boolean().optional(),remove_alg_from_jwks:e.z.boolean().optional(),revoke_refresh_token_grant:e.z.boolean().optional(),trust_azure_adfs_email_verified_connection_property:e.z.boolean().optional(),use_scope_descriptions_for_consent:e.z.boolean().optional(),inherit_global_permissions_in_organizations:e.z.boolean().optional()}).optional(),sandbox_version:e.z.string().optional(),legacy_sandbox_version:e.z.string().optional(),sandbox_versions_available:e.z.array(e.z.string()).optional(),change_password:e.z.object({enabled:e.z.boolean().optional(),html:e.z.string().optional()}).optional(),guardian_mfa_page:e.z.object({enabled:e.z.boolean().optional(),html:e.z.string().optional()}).optional(),device_flow:e.z.object({charset:e.z.enum(["base20","digits"]).optional(),mask:e.z.string().max(20).optional()}).optional(),default_token_quota:e.z.object({clients:e.z.object({client_credentials:e.z.record(e.z.any()).optional()}).optional(),organizations:e.z.object({client_credentials:e.z.record(e.z.any()).optional()}).optional()}).optional(),default_audience:e.z.string().optional(),default_organization:e.z.string().optional(),sessions:e.z.object({oidc_logout_prompt_enabled:e.z.boolean().optional()}).optional(),oidc_logout:e.z.object({rp_logout_end_session_endpoint_discovery:e.z.boolean().optional()}).optional(),allow_organization_name_in_authentication_api:e.z.boolean().optional(),customize_mfa_in_postlogin_action:e.z.boolean().optional(),acr_values_supported:e.z.array(e.z.string()).optional(),mtls:e.z.object({enable_endpoint_aliases:e.z.boolean().optional()}).optional(),pushed_authorization_requests_supported:e.z.boolean().optional(),authorization_response_iss_parameter_supported:e.z.boolean().optional(),mfa:e.z.object({policy:e.z.enum(["never","always"]).default("never").optional(),factors:e.z.object({sms:e.z.boolean().default(!1),otp:e.z.boolean().default(!1),email:e.z.boolean().default(!1),push_notification:e.z.boolean().default(!1),webauthn_roaming:e.z.boolean().default(!1),webauthn_platform:e.z.boolean().default(!1),recovery_code:e.z.boolean().default(!1),duo:e.z.boolean().default(!1)}).optional(),sms_provider:e.z.object({provider:e.z.enum(["twilio","vonage","aws_sns","phone_message_hook"]).optional()}).optional(),twilio:e.z.object({sid:e.z.string().optional(),auth_token:e.z.string().optional(),from:e.z.string().optional(),messaging_service_sid:e.z.string().optional()}).optional(),phone_message:e.z.object({message:e.z.string().optional()}).optional()}).optional()}),un=e.z.object({created_at:e.z.string().nullable().transform(t=>t??""),updated_at:e.z.string().nullable().transform(t=>t??""),...rt.shape,id:e.z.string()});var st=(t=>(t.RefreshToken="refresh_token",t.AuthorizationCode="authorization_code",t.ClientCredential="client_credentials",t.Passwordless="passwordless",t.Password="password",t.OTP="http://auth0.com/oauth/grant-type/passwordless/otp",t))(st||{});const hn=e.z.object({access_token:e.z.string(),id_token:e.z.string().optional(),scope:e.z.string().optional(),state:e.z.string().optional(),refresh_token:e.z.string().optional(),token_type:e.z.string(),expires_in:e.z.number()});e.z.object({code:e.z.string(),state:e.z.string().optional()});const lt=e.z.object({button_border_radius:e.z.number(),button_border_weight:e.z.number(),buttons_style:e.z.enum(["pill","rounded","sharp"]),input_border_radius:e.z.number(),input_border_weight:e.z.number(),inputs_style:e.z.enum(["pill","rounded","sharp"]),show_widget_shadow:e.z.boolean(),widget_border_weight:e.z.number(),widget_corner_radius:e.z.number()}),ct=e.z.object({base_focus_color:e.z.string(),base_hover_color:e.z.string(),body_text:e.z.string(),captcha_widget_theme:e.z.enum(["auto","dark","light"]),error:e.z.string(),header:e.z.string(),icons:e.z.string(),input_background:e.z.string(),input_border:e.z.string(),input_filled_text:e.z.string(),input_labels_placeholders:e.z.string(),links_focused_components:e.z.string(),primary_button:e.z.string(),primary_button_label:e.z.string(),secondary_button_border:e.z.string(),secondary_button_label:e.z.string(),success:e.z.string(),widget_background:e.z.string(),widget_border:e.z.string()}),_=e.z.object({bold:e.z.boolean(),size:e.z.number()}),pt=e.z.object({body_text:_,buttons_text:_,font_url:e.z.string(),input_labels:_,links:_,links_style:e.z.enum(["normal","underlined"]),reference_text_size:e.z.number(),subtitle:_,title:_}),dt=e.z.object({background_color:e.z.string(),background_image_url:e.z.string(),page_layout:e.z.enum(["center","left","right"])}),_t=e.z.object({header_text_alignment:e.z.enum(["center","left","right"]),logo_height:e.z.number(),logo_position:e.z.enum(["center","left","none","right"]),logo_url:e.z.string(),social_buttons_layout:e.z.enum(["bottom","top"])}),zt=e.z.object({borders:lt,colors:ct,displayName:e.z.string(),fonts:pt,page_background:dt,widget:_t}),bn=zt.extend({themeId:e.z.string()}),fn=e.z.object({universal_login_experience:e.z.enum(["new","classic"]).default("new"),identifier_first:e.z.boolean().default(!0),password_first:e.z.boolean().default(!1),webauthn_platform_first_factor:e.z.boolean()}),Sn=e.z.object({name:e.z.string(),enabled:e.z.boolean().optional().default(!0),default_from_address:e.z.string().optional(),credentials:e.z.union([e.z.object({accessKeyId:e.z.string(),secretAccessKey:e.z.string(),region:e.z.string()}),e.z.object({smtp_host:e.z.array(e.z.string()),smtp_port:e.z.number(),smtp_user:e.z.string(),smtp_pass:e.z.string()}),e.z.object({api_key:e.z.string(),domain:e.z.string().optional()}),e.z.object({connectionString:e.z.string()}),e.z.object({tenantId:e.z.string(),clientId:e.z.string(),clientSecret:e.z.string()})]),settings:e.z.object({}).optional()}),gt=e.z.object({id:e.z.string(),login_id:e.z.string(),user_id:e.z.string(),client_id:e.z.string(),expires_at:e.z.string().optional(),idle_expires_at:e.z.string().optional(),last_exchanged_at:e.z.string().optional(),device:it,resource_servers:e.z.array(e.z.object({audience:e.z.string(),scopes:e.z.string()})),rotating:e.z.boolean()}),En=e.z.object({created_at:e.z.string(),revoked_at:e.z.string().optional(),...gt.shape}),yn=e.z.object({to:e.z.string(),message:e.z.string()}),An=e.z.object({name:e.z.string(),options:e.z.object({})}),mt=e.z.object({value:e.z.string(),description:e.z.string().optional()}),ut=e.z.object({token_dialect:e.z.enum(["access_token","access_token_authz"]).optional(),enforce_policies:e.z.boolean().optional(),allow_skipping_userinfo:e.z.boolean().optional(),skip_userinfo:e.z.boolean().optional(),persist_client_authorization:e.z.boolean().optional(),enable_introspection_endpoint:e.z.boolean().optional(),mtls:e.z.object({bound_access_tokens:e.z.boolean().optional()}).optional()}),ht=e.z.object({id:e.z.string().optional(),name:e.z.string(),identifier:e.z.string(),scopes:e.z.array(mt).optional(),signing_alg:e.z.string().optional(),signing_secret:e.z.string().optional(),token_lifetime:e.z.number().default(86400),token_lifetime_for_web:e.z.number().default(7200),skip_consent_for_verifiable_first_party_clients:e.z.boolean().optional(),allow_offline_access:e.z.boolean().optional(),verificationKey:e.z.string().optional(),options:ut.optional(),is_system:e.z.boolean().optional(),metadata:e.z.record(e.z.any()).optional()}),bt=e.z.object({...ht.shape,created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),In=e.z.array(bt),ft=e.z.object({role_id:e.z.string(),resource_server_identifier:e.z.string(),permission_name:e.z.string()}),St=e.z.object({...ft.shape,created_at:e.z.string()}),Cn=e.z.array(St),Et=e.z.object({user_id:e.z.string(),resource_server_identifier:e.z.string(),permission_name:e.z.string(),organization_id:e.z.string().optional()}),yt=e.z.object({...Et.shape,tenant_id:e.z.string(),created_at:e.z.string().optional()}),Tn=e.z.array(yt),At=e.z.object({user_id:e.z.string(),resource_server_identifier:e.z.string(),resource_server_name:e.z.string(),permission_name:e.z.string(),description:e.z.string().nullable().optional(),created_at:e.z.string().optional(),organization_id:e.z.string().optional()}),On=e.z.array(At),It=e.z.object({user_id:e.z.string(),role_id:e.z.string(),organization_id:e.z.string().optional()}),Ct=e.z.object({...It.shape,tenant_id:e.z.string(),created_at:e.z.string().optional()}),Nn=e.z.array(Ct),Tt=e.z.object({id:e.z.string().optional().openapi({description:"The unique identifier of the role. If not provided, one will be generated."}),name:e.z.string().min(1).max(50).openapi({description:"The name of the role. Cannot include '<' or '>'"}),description:e.z.string().max(255).optional().openapi({description:"The description of the role"}),is_system:e.z.boolean().optional(),metadata:e.z.record(e.z.any()).optional().openapi({description:"Metadata associated with the role. Can be used to control sync behavior in multi-tenancy scenarios."})}),Ot=Tt.extend({id:e.z.string().openapi({description:"The unique identifier of the role"}),created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),wn=e.z.array(Ot),Nt=e.z.object({logo_url:e.z.string().optional().openapi({description:"URL of the organization's logo"}),colors:e.z.object({primary:e.z.string().optional().openapi({description:"Primary color in hex format (e.g., #FF0000)"}),page_background:e.z.string().optional().openapi({description:"Page background color in hex format (e.g., #FFFFFF)"})}).optional()}).optional(),wt=e.z.object({connection_id:e.z.string().openapi({description:"ID of the connection"}),assign_membership_on_login:e.z.boolean().default(!1).openapi({description:"Whether to assign membership to the organization on login"}),show_as_button:e.z.boolean().default(!0).openapi({description:"Whether to show this connection as a button in the login screen"}),is_signup_enabled:e.z.boolean().default(!0).openapi({description:"Whether signup is enabled for this connection"})}),Rt=e.z.object({client_credentials:e.z.object({enforce:e.z.boolean().default(!1).openapi({description:"Whether to enforce token quota limits"}),per_day:e.z.number().min(0).default(0).openapi({description:"Maximum tokens per day (0 = unlimited)"}),per_hour:e.z.number().min(0).default(0).openapi({description:"Maximum tokens per hour (0 = unlimited)"})}).optional()}).optional(),jt=e.z.object({id:e.z.string().optional(),name:e.z.string().min(1).regex(/^[a-z0-9_-]+$/,{message:"Organization name must be lowercase and can only contain letters, numbers, hyphens, and underscores"}).openapi({description:"The name of the organization. Must be lowercase and can only contain letters, numbers, hyphens, and underscores."}),display_name:e.z.string().optional().openapi({description:"The display name of the organization"}),branding:Nt,metadata:e.z.record(e.z.any()).default({}).optional().openapi({description:"Custom metadata for the organization"}),enabled_connections:e.z.array(wt).default([]).optional().openapi({description:"List of enabled connections for the organization"}),token_quota:Rt}),Rn=e.z.object({...jt.shape,...r.shape,id:e.z.string(),name:e.z.string().min(1).openapi({description:"The name of the organization"})}),Dt=e.z.object({user_id:e.z.string().openapi({description:"ID of the user"}),organization_id:e.z.string().openapi({description:"ID of the organization"})}),jn=e.z.object({...Dt.shape,...r.shape,id:e.z.string()}),Dn=e.z.object({idle_session_lifetime:e.z.number().default(72),session_lifetime:e.z.number().default(168),session_cookie:e.z.object({mode:e.z.enum(["persistent","non-persistent"]).optional()}).optional(),enable_client_connections:e.z.boolean().optional(),default_redirection_uri:e.z.string().optional(),enabled_locales:e.z.array(e.z.string()).optional(),default_directory:e.z.string().optional(),error_page:e.z.object({html:e.z.string().optional(),show_log_link:e.z.boolean().optional(),url:e.z.string().optional()}).optional(),flags:e.z.object({allow_legacy_delegation_grant_types:e.z.boolean().optional(),allow_legacy_ro_grant_types:e.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:e.z.boolean().optional(),disable_clickjack_protection_headers:e.z.boolean().optional(),enable_apis_section:e.z.boolean().optional(),enable_client_connections:e.z.boolean().optional(),enable_custom_domain_in_emails:e.z.boolean().optional(),enable_dynamic_client_registration:e.z.boolean().optional(),enable_idtoken_api2:e.z.boolean().optional(),enable_legacy_logs_search_v2:e.z.boolean().optional(),enable_legacy_profile:e.z.boolean().optional(),enable_pipeline2:e.z.boolean().optional(),enable_public_signup_user_exists_error:e.z.boolean().optional(),use_scope_descriptions_for_consent:e.z.boolean().optional(),disable_management_api_sms_obfuscation:e.z.boolean().optional(),enable_adfs_waad_email_verification:e.z.boolean().optional(),revoke_refresh_token_grant:e.z.boolean().optional(),dashboard_log_streams_next:e.z.boolean().optional(),dashboard_insights_view:e.z.boolean().optional(),disable_fields_map_fix:e.z.boolean().optional(),mfa_show_factor_list_on_enrollment:e.z.boolean().optional()}).optional(),friendly_name:e.z.string().optional(),picture_url:e.z.string().optional(),support_email:e.z.string().optional(),support_url:e.z.string().optional(),sandbox_version:e.z.string().optional(),sandbox_versions_available:e.z.array(e.z.string()).optional(),change_password:e.z.object({enabled:e.z.boolean(),html:e.z.string()}).optional(),guardian_mfa_page:e.z.object({enabled:e.z.boolean(),html:e.z.string()}).optional(),default_audience:e.z.string().optional(),default_organization:e.z.string().optional(),sessions:e.z.object({oidc_logout_prompt_enabled:e.z.boolean().optional()}).optional(),mfa:e.z.object({policy:e.z.enum(["never","always"]).default("never").optional(),factors:e.z.object({sms:e.z.boolean().default(!1),otp:e.z.boolean().default(!1),email:e.z.boolean().default(!1),push_notification:e.z.boolean().default(!1),webauthn_roaming:e.z.boolean().default(!1),webauthn_platform:e.z.boolean().default(!1),recovery_code:e.z.boolean().default(!1),duo:e.z.boolean().default(!1)}).optional(),sms_provider:e.z.object({provider:e.z.enum(["twilio","vonage","aws_sns","phone_message_hook"]).optional()}).optional(),twilio:e.z.object({sid:e.z.string().optional(),auth_token:e.z.string().optional(),from:e.z.string().optional(),messaging_service_sid:e.z.string().optional()}).optional(),phone_message:e.z.object({message:e.z.string().optional()}).optional()}).optional()}),vn=e.z.object({date:e.z.string().openapi({description:"Date these events occurred in ISO 8601 format",example:"2025-12-19"}),logins:e.z.number().openapi({description:"Number of logins on this date",example:150}),signups:e.z.number().openapi({description:"Number of signups on this date",example:25}),leaked_passwords:e.z.number().openapi({description:"Number of breached-password detections on this date (subscription required)",example:0}),updated_at:e.z.string().openapi({description:"Date and time this stats entry was last updated in ISO 8601 format",example:"2025-12-19T10:30:00.000Z"}),created_at:e.z.string().openapi({description:"Approximate date and time the first event occurred in ISO 8601 format",example:"2025-12-19T00:00:00.000Z"})}),Ln=e.z.number().openapi({description:"Number of active users in the last 30 days",example:1234}),vt=e.z.enum(["login","login-id","login-password","signup","signup-id","signup-password","reset-password","consent","mfa","mfa-push","mfa-otp","mfa-voice","mfa-phone","mfa-webauthn","mfa-email","mfa-recovery-code","status","device-flow","email-verification","email-otp-challenge","organizations","invitation","common","passkeys","captcha","custom-form","login-passwordless","mfa-login-options"]),Lt=e.z.record(e.z.string(),e.z.record(e.z.string(),e.z.string())).openapi({type:"object",additionalProperties:{type:"object",additionalProperties:{type:"string"}}}),kn=e.z.object({prompt:vt,language:e.z.string(),custom_text:Lt}),Un={EMAIL:"email",SMS:"sms",USERNAME_PASSWORD:"Username-Password-Authentication",GOOGLE_OAUTH2:"google-oauth2",APPLE:"apple",FACEBOOK:"facebook",GITHUB:"github",MICROSOFT:"microsoft",VIPPS:"vipps",OIDC:"oidc",OAUTH2:"oauth2",SAMLP:"samlp",WAAD:"waad",ADFS:"adfs"},Fn={DATABASE:"database",SOCIAL:"social",PASSWORDLESS:"passwordless"},kt=e.z.enum(["phone","totp","email","push","webauthn-roaming","webauthn-platform","passkey"]),Ut=e.z.object({user_id:e.z.string(),type:kt,phone_number:e.z.string().optional(),totp_secret:e.z.string().optional(),credential_id:e.z.string().optional(),public_key:e.z.string().optional(),sign_count:e.z.number().int().nonnegative().optional(),credential_backed_up:e.z.boolean().optional(),transports:e.z.array(e.z.string()).optional(),friendly_name:e.z.string().optional(),confirmed:e.z.boolean().default(!1)});function Ft(t,o){t.type==="phone"&&!t.phone_number&&o.addIssue({code:e.z.ZodIssueCode.custom,message:"phone_number is required when type is 'phone'",path:["phone_number"]}),t.type==="totp"&&!t.totp_secret&&o.addIssue({code:e.z.ZodIssueCode.custom,message:"totp_secret is required when type is 'totp'",path:["totp_secret"]}),["webauthn-roaming","webauthn-platform","passkey"].includes(t.type)&&(t.credential_id||o.addIssue({code:e.z.ZodIssueCode.custom,message:`credential_id is required when type is '${t.type}'`,path:["credential_id"]}),t.public_key||o.addIssue({code:e.z.ZodIssueCode.custom,message:`public_key is required when type is '${t.type}'`,path:["public_key"]}))}const xn=Ut.superRefine(Ft),Pn=e.z.object({...Ut.shape,id:e.z.string(),created_at:e.z.string(),updated_at:e.z.string()}).superRefine(Ft);function Mn(t){const[o,i]=t.split("|");if(!o||!i)throw new Error(`Invalid user_id: ${t}`);return{connection:o,id:i}}function Hn(t){const{primary:o,secondaries:i,syncMethods:U=["create","rawCreate","update","remove","delete","set"]}=t,f={get(p,a){if(typeof a=="symbol")return p[a];const d=p[a];return typeof d!="function"?d:U.includes(a)?async(...g)=>{const S=await d.apply(p,g),m=[];for(const s of i){const u=s.adapter[a];if(typeof u!="function")continue;const E=(async()=>{try{await u.apply(s.adapter,g)}catch(h){try{s.onError?s.onError(h,a,g):console.error(`Passthrough adapter: secondary write failed for ${a}:`,h)}catch(y){console.error(`Passthrough adapter: onError handler threw for ${a}:`,y)}}})();s.blocking&&m.push(E)}return m.length>0&&await Promise.all(m),S}:d.bind(p)}};return new Proxy(o,f)}function Gn(t){return t}function Bn(t){var f,p,a,d,g,S,m,s,u,E,h,y;const o=t==null?void 0:t.options;if(!o)return{usernameIdentifierActive:!1,emailIdentifierActive:!0,usernameMinLength:1,usernameMaxLength:15};const i=o.attributes;if(i){const xt=((p=(f=i.username)==null?void 0:f.identifier)==null?void 0:p.active)===!0,Pt=((d=(a=i.email)==null?void 0:a.identifier)==null?void 0:d.active)!==!1,Mt=((S=(g=i.username)==null?void 0:g.validation)==null?void 0:S.min_length)??1,Ht=((s=(m=i.username)==null?void 0:m.validation)==null?void 0:s.max_length)??15;return{usernameIdentifierActive:xt,emailIdentifierActive:Pt,usernameMinLength:Mt,usernameMaxLength:Ht}}return{usernameIdentifierActive:o.requires_username===!0,emailIdentifierActive:!0,usernameMinLength:((E=(u=o.validation)==null?void 0:u.username)==null?void 0:E.min)??1,usernameMaxLength:((y=(h=o.validation)==null?void 0:h.username)==null?void 0:y.max)??15}}function Wn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}exports.Auth0ActionEnum=qt;exports.Auth0Client=et;exports.AuthorizationResponseMode=w;exports.AuthorizationResponseType=N;exports.CodeChallengeMethod=R;exports.ComponentCategory=O;exports.ComponentType=T;exports.EmailActionEnum=Vt;exports.FORM_FIELD_TYPES=xo;exports.FlowActionTypeEnum=Kt;exports.GrantType=st;exports.LocationInfo=tt;exports.LogTypes=Je;exports.LoginSessionState=k;exports.NodeType=he;exports.RedirectTargetEnum=Z;exports.Strategy=Un;exports.StrategyType=Fn;exports.actionDependencySchema=x;exports.actionInsertSchema=I;exports.actionNodeSchema=Se;exports.actionSchema=Bt;exports.actionSecretSchema=P;exports.actionTriggerSchema=F;exports.actionUpdateSchema=Gt;exports.activeUsersResponseSchema=Ln;exports.actorSchema=H;exports.addressSchema=ne;exports.auditCategorySchema=M;exports.auditEventInsertSchema=V;exports.auditEventSchema=Wt;exports.auth0ClientSchema=q;exports.auth0FlowInsertSchema=io;exports.auth0FlowSchema=Ce;exports.auth0QuerySchema=Yt;exports.auth0UpdateUserActionSchema=Y;exports.auth0UserResponseSchema=Zt;exports.authParamsSchema=Te;exports.authenticationMethodInsertSchema=xn;exports.authenticationMethodSchema=Pn;exports.authenticationMethodTypeSchema=kt;exports.baseUserSchema=C;exports.blockComponentSchema=Le;exports.bordersSchema=lt;exports.brandingSchema=ao;exports.buttonComponentSchema=_e;exports.clientGrantInsertSchema=se;exports.clientGrantListSchema=oo;exports.clientGrantSchema=le;exports.clientInsertSchema=re;exports.clientRegistrationTokenInsertSchema=pe;exports.clientRegistrationTokenSchema=no;exports.clientRegistrationTokenTypeSchema=ce;exports.clientSchema=to;exports.codeInsertSchema=Ne;exports.codeSchema=ro;exports.codeTypeSchema=Oe;exports.colorsSchema=ct;exports.componentMessageSchema=Pe;exports.componentSchema=ue;exports.connectionInsertSchema=Re;exports.connectionOptionsSchema=we;exports.connectionSchema=so;exports.coordinatesSchema=z;exports.createPassthroughAdapter=Hn;exports.createWriteOnlyAdapter=Gn;exports.customDomainInsertSchema=je;exports.customDomainSchema=ve;exports.customDomainWithTenantIdSchema=lo;exports.customTextEntrySchema=kn;exports.customTextSchema=Lt;exports.dailyStatsSchema=vn;exports.emailProviderSchema=Sn;exports.emailVerificationRulesSchema=X;exports.emailVerifyActionSchema=Q;exports.endingSchema=Ie;exports.fieldComponentSchema=Ue;exports.flowActionStepSchema=J;exports.flowInsertSchema=ee;exports.flowSchema=Xt;exports.flowsFieldComponentSchema=ge;exports.flowsFlowNodeSchema=fe;exports.flowsStepNodeSchema=be;exports.fontDetailsSchema=_;exports.fontsSchema=pt;exports.formControlSchema=Po;exports.formInsertSchema=xe;exports.formNodeComponentDefinition=v;exports.formNodeSchema=Fe;exports.formSchema=Bo;exports.genericComponentSchema=me;exports.genericNodeSchema=Ee;exports.getConnectionIdentifierConfig=Bn;exports.hookCodeInsertSchema=Ke;exports.hookCodeSchema=rn;exports.hookInsertSchema=Jo;exports.hookSchema=an;exports.hookTemplateId=L;exports.hookTemplates=Xo;exports.identitySchema=oe;exports.inviteInsertSchema=Xe;exports.inviteSchema=sn;exports.inviteeSchema=Ve;exports.inviterSchema=qe;exports.isBlockComponent=Ko;exports.isFieldComponent=Vo;exports.isPlainObject=Wn;exports.isWidgetComponent=qo;exports.jwksKeySchema=ln;exports.jwksSchema=Ye;exports.legalComponentSchema=ze;exports.locationInfoSchema=K;exports.logInsertSchema=ot;exports.logSchema=_n;exports.loginSessionAuthStrategySchema=Ze;exports.loginSessionInsertSchema=$e;exports.loginSessionSchema=pn;exports.loginSessionStateSchema=Qe;exports.nodeSchema=ye;exports.openIDConfigurationSchema=cn;exports.organizationBrandingSchema=Nt;exports.organizationEnabledConnectionSchema=wt;exports.organizationInsertSchema=jt;exports.organizationSchema=Rn;exports.organizationTokenQuotaSchema=Rt;exports.pageBackgroundSchema=dt;exports.parseUserId=Mn;exports.passwordInsertSchema=nt;exports.passwordSchema=zn;exports.profileDataSchema=te;exports.promptScreenSchema=vt;exports.promptSettingSchema=fn;exports.redirectActionSchema=$;exports.refreshTokenInsertSchema=gt;exports.refreshTokenSchema=En;exports.requestContextSchema=B;exports.resourceServerInsertSchema=ht;exports.resourceServerListSchema=In;exports.resourceServerOptionsSchema=ut;exports.resourceServerSchema=bt;exports.resourceServerScopeSchema=mt;exports.responseContextSchema=W;exports.richTextComponentSchema=de;exports.roleInsertSchema=Tt;exports.roleListSchema=wn;exports.rolePermissionInsertSchema=ft;exports.rolePermissionListSchema=Cn;exports.rolePermissionSchema=St;exports.roleSchema=Ot;exports.screenLinkSchema=Me;exports.sessionInsertSchema=at;exports.sessionSchema=gn;exports.signingKeySchema=mn;exports.smsProviderSchema=An;exports.smsSendParamsSchema=yn;exports.startSchema=Ae;exports.targetSchema=G;exports.tenantInsertSchema=rt;exports.tenantSchema=un;exports.tenantSettingsSchema=Dn;exports.themeInsertSchema=zt;exports.themeSchema=bn;exports.tokenResponseSchema=hn;exports.totalsSchema=Qt;exports.uiScreenSchema=Wo;exports.userInsertSchema=ie;exports.userOrganizationInsertSchema=Dt;exports.userOrganizationSchema=jn;exports.userPermissionInsertSchema=Et;exports.userPermissionListSchema=Tn;exports.userPermissionSchema=yt;exports.userPermissionWithDetailsListSchema=On;exports.userPermissionWithDetailsSchema=At;exports.userResponseSchema=$t;exports.userRoleInsertSchema=It;exports.userRoleListSchema=Nn;exports.userRoleSchema=Ct;exports.userSchema=ae;exports.verificationMethodsSchema=De;exports.widgetComponentSchema=ke;exports.widgetSchema=_t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@hono/zod-openapi"),s=e.z.object({created_at:e.z.string(),updated_at:e.z.string()}),F=e.z.object({id:e.z.string(),version:e.z.string().optional()}),x=e.z.object({name:e.z.string(),version:e.z.string()}),P=e.z.object({name:e.z.string(),value:e.z.string()}),I=e.z.object({name:e.z.string().max(255),code:e.z.string().max(1e5),supported_triggers:e.z.array(F).optional(),runtime:e.z.string().max(50).optional(),dependencies:e.z.array(x).optional(),secrets:e.z.array(P).optional()}),Gt=I.partial().extend({status:e.z.enum(["draft","built"]).optional(),deployed_at:e.z.string().optional()}),Bt=I.extend({id:e.z.string(),tenant_id:e.z.string(),status:e.z.enum(["draft","built"]).default("built"),deployed_at:e.z.string().optional(),secrets:e.z.array(e.z.object({name:e.z.string(),value:e.z.string().optional()})).optional(),...s.shape}),M=e.z.enum(["user_action","admin_action","system","api"]),H=e.z.object({type:e.z.enum(["user","admin","system","api_key","client_credentials"]),id:e.z.string().optional(),email:e.z.string().optional(),org_id:e.z.string().optional(),org_name:e.z.string().optional(),scopes:e.z.array(e.z.string()).optional(),client_id:e.z.string().optional()}),G=e.z.object({type:e.z.string(),id:e.z.string(),before:e.z.record(e.z.unknown()).optional(),after:e.z.record(e.z.unknown()).optional(),diff:e.z.record(e.z.object({old:e.z.unknown(),new:e.z.unknown()})).optional()}),B=e.z.object({method:e.z.string(),path:e.z.string(),query:e.z.record(e.z.string()).optional(),body:e.z.unknown().optional(),ip:e.z.string(),user_agent:e.z.string().optional(),correlation_id:e.z.string().optional()}),W=e.z.object({status_code:e.z.number(),body:e.z.unknown().optional()}),K=e.z.object({country_code:e.z.string(),city_name:e.z.string(),latitude:e.z.string(),longitude:e.z.string(),time_zone:e.z.string(),continent_code:e.z.string()}),q=e.z.object({name:e.z.string(),version:e.z.string(),env:e.z.record(e.z.string()).optional()}),V=e.z.object({tenant_id:e.z.string(),event_type:e.z.string(),log_type:e.z.string(),description:e.z.string().optional(),category:M,actor:H,target:G,request:B,response:W.optional(),connection:e.z.string().optional(),strategy:e.z.string().optional(),strategy_type:e.z.string().optional(),audience:e.z.string().optional(),scope:e.z.string().optional(),location:K.optional(),auth0_client:q.optional(),hostname:e.z.string(),is_mobile:e.z.boolean().optional(),timestamp:e.z.string()}),Wt=V.extend({id:e.z.string()}),Kt=e.z.enum(["AUTH0","EMAIL","REDIRECT"]),qt=e.z.enum(["CREATE_USER","GET_USER","UPDATE_USER","SEND_REQUEST","SEND_EMAIL"]),Vt=e.z.enum(["VERIFY_EMAIL"]),X=e.z.object({require_mx_record:e.z.boolean().optional(),block_aliases:e.z.boolean().optional(),block_free_emails:e.z.boolean().optional(),block_disposable_emails:e.z.boolean().optional(),blocklist:e.z.array(e.z.string()).optional(),allowlist:e.z.array(e.z.string()).optional()}),Y=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("AUTH0"),action:e.z.literal("UPDATE_USER"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({connection_id:e.z.string().optional(),user_id:e.z.string(),changes:e.z.record(e.z.string(),e.z.any())})}),Q=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("EMAIL"),action:e.z.literal("VERIFY_EMAIL"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({email:e.z.string(),rules:X.optional()})}),Z=e.z.enum(["change-email","account","custom"]),$=e.z.object({id:e.z.string(),alias:e.z.string().max(100).optional(),type:e.z.literal("REDIRECT"),action:e.z.literal("REDIRECT_USER"),allow_failure:e.z.boolean().optional(),mask_output:e.z.boolean().optional(),params:e.z.object({target:Z.openapi({description:"The predefined target to redirect to, or 'custom' for a custom URL"}),custom_url:e.z.string().optional().openapi({description:"Custom URL to redirect to when target is 'custom'"})})}),J=e.z.union([Y,Q,$]),ee=e.z.object({name:e.z.string().min(1).max(150).openapi({description:"The name of the flow"}),actions:e.z.array(J).optional().default([]).openapi({description:"The list of actions to execute in sequence"})}),Xt=ee.extend({...s.shape,id:e.z.string().openapi({description:"Unique identifier for the flow",example:"af_12tMpdJ3iek7svMyZkSh5M"})}),Yt=e.z.object({page:e.z.string().min(0).optional().default("0").transform(t=>parseInt(t,10)).openapi({description:"The page number where 0 is the first page"}),per_page:e.z.string().min(1).optional().default("10").transform(t=>parseInt(t,10)).openapi({description:"The number of items per page"}),include_totals:e.z.string().optional().default("false").transform(t=>t==="true").openapi({description:"If the total number of items should be included in the response"}),sort:e.z.string().regex(/^.+:(-1|1)$/).optional().openapi({description:"A property that should have the format 'string:-1' or 'string:1'"}),q:e.z.string().optional().openapi({description:"A lucene query string used to filter the results"})}),Qt=e.z.object({start:e.z.number(),limit:e.z.number(),length:e.z.number(),total:e.z.number().optional()}),te=e.z.object({email:e.z.string().optional(),email_verified:e.z.boolean().optional(),name:e.z.string().optional(),username:e.z.string().optional(),given_name:e.z.string().optional(),phone_number:e.z.string().optional(),phone_verified:e.z.boolean().optional(),family_name:e.z.string().optional()}).catchall(e.z.any()),oe=e.z.object({connection:e.z.string(),user_id:e.z.string(),provider:e.z.string(),isSocial:e.z.boolean(),email:e.z.string().optional(),email_verified:e.z.boolean().optional(),phone_number:e.z.string().optional(),phone_verified:e.z.boolean().optional(),username:e.z.string().optional(),access_token:e.z.string().optional(),access_token_secret:e.z.string().optional(),refresh_token:e.z.string().optional(),profileData:te.optional()}),ne=e.z.object({formatted:e.z.string().optional(),street_address:e.z.string().optional(),locality:e.z.string().optional(),region:e.z.string().optional(),postal_code:e.z.string().optional(),country:e.z.string().optional()}).optional(),C=e.z.object({email:e.z.string().optional().transform(t=>t&&t.toLowerCase()),username:e.z.string().refine(t=>!t.includes("@"),{message:'Usernames must not contain "@". Use the email field for email addresses.'}).optional(),phone_number:e.z.string().optional(),phone_verified:e.z.boolean().optional(),given_name:e.z.string().optional(),family_name:e.z.string().optional(),nickname:e.z.string().optional(),name:e.z.string().optional(),picture:e.z.string().optional(),locale:e.z.string().optional(),linked_to:e.z.string().optional(),profileData:e.z.string().optional(),user_id:e.z.string().optional(),app_metadata:e.z.any().default({}).optional(),user_metadata:e.z.any().default({}).optional(),middle_name:e.z.string().optional(),preferred_username:e.z.string().optional(),profile:e.z.string().optional(),website:e.z.string().optional(),gender:e.z.string().optional(),birthdate:e.z.string().optional(),zoneinfo:e.z.string().optional(),address:ne}),ie=C.extend({email_verified:e.z.boolean().default(!1),verify_email:e.z.boolean().optional(),last_ip:e.z.string().optional(),last_login:e.z.string().optional(),user_id:e.z.string().optional(),provider:e.z.string().optional(),connection:e.z.string(),is_social:e.z.boolean().optional(),registration_completed_at:e.z.string().optional(),password:e.z.object({hash:e.z.string(),algorithm:e.z.string()}).optional()}),ae=e.z.object({...ie.omit({password:!0}).shape,...s.shape,user_id:e.z.string(),provider:e.z.string(),is_social:e.z.boolean(),email:e.z.string().optional(),login_count:e.z.number().default(0),identities:e.z.array(oe).optional()}),Zt=ae.omit({registration_completed_at:!0}),$t=C.extend({login_count:e.z.number(),multifactor:e.z.array(e.z.string()).optional(),last_ip:e.z.string().optional(),last_login:e.z.string().optional(),user_id:e.z.string()}).catchall(e.z.any());let Jt="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",eo=(t=21)=>{let o="",i=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)o+=Jt[i[t]&63];return o};const se=e.z.object({client_id:e.z.string().openapi({description:"ID of this client."}),name:e.z.string().min(1).openapi({description:"Name of this client (min length: 1 character, does not allow < or >)."}),description:e.z.string().max(140).optional().openapi({description:"Free text description of this client (max length: 140 characters)."}),global:e.z.boolean().default(!1).openapi({description:"Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false)."}),client_secret:e.z.string().default(()=>eo()).optional().openapi({description:"Client secret (which you must not make public)."}),app_type:e.z.enum(["native","spa","regular_web","non_interactive","resource_server","express_configuration","rms","box","cloudbees","concur","dropbox","mscrm","echosign","egnyte","newrelic","office365","salesforce","sentry","sharepoint","slack","springcm","zendesk","zoom","sso_integration","oag"]).default("regular_web").optional().openapi({description:"The type of application this client represents"}),logo_uri:e.z.string().url().optional().openapi({description:"URL of the logo to display for this client. Recommended size is 150x150 pixels."}),is_first_party:e.z.boolean().default(!1).openapi({description:"Whether this client a first party client (true) or not (false)."}),oidc_conformant:e.z.boolean().default(!0).openapi({description:"Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false)."}),auth0_conformant:e.z.boolean().default(!0).openapi({description:"Whether this client follows Auth0-compatible behavior (true) or strict OIDC behavior (false). When true, profile/email claims are included in the ID token when scopes are requested. When false, these claims are only available from the userinfo endpoint (strict OIDC 5.4 compliance)."}),callbacks:e.z.array(e.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication."}),allowed_origins:e.z.array(e.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 (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs."}),web_origins:e.z.array(e.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."}),client_aliases:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of audiences/realms for SAML protocol. Used by the wsfed addon."}),allowed_clients:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed."}),connections:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of connection IDs enabled for this client. The order determines the display order on the login page."}),allowed_logout_urls:e.z.array(e.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."}),session_transfer:e.z.record(e.z.any()).default({}).optional().openapi({description:"Native to Web SSO Configuration"}),oidc_logout:e.z.record(e.z.any()).default({}).optional().openapi({description:"Configuration for OIDC backchannel logout"}),grant_types:e.z.array(e.z.string()).default([]).optional().openapi({description:"List of grant types supported for this application. Can include authorization_code, implicit, refresh_token, client_credentials, password, http://auth0.com/oauth/grant-type/password-realm, http://auth0.com/oauth/grant-type/mfa-oob, http://auth0.com/oauth/grant-type/mfa-otp, http://auth0.com/oauth/grant-type/mfa-recovery-code, urn:openid:params:grant-type:ciba, and urn:ietf:params:oauth:grant-type:device_code."}),jwt_configuration:e.z.record(e.z.any()).default({}).optional().openapi({description:"Configuration related to JWTs for the client."}),signing_keys:e.z.array(e.z.record(e.z.any())).default([]).optional().openapi({description:"Signing certificates associated with this client."}),encryption_key:e.z.record(e.z.any()).default({}).optional().openapi({description:"Encryption used for WsFed responses with this client."}),sso:e.z.boolean().default(!1).openapi({description:"Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false)."}),sso_disabled:e.z.boolean().default(!1).openapi({description:"Whether Single Sign On is disabled for this client. When true, existing SSO sessions will not be reused and users must authenticate every time."}),cross_origin_authentication:e.z.boolean().default(!1).openapi({description:"Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false)."}),cross_origin_loc:e.z.string().url().optional().openapi({description:"URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page."}),custom_login_page_on:e.z.boolean().default(!1).openapi({description:"Whether a custom login page is to be used (true) or the default provided login page (false)."}),custom_login_page:e.z.string().optional().openapi({description:"The content (HTML, CSS, JS) of the custom login page."}),custom_login_page_preview:e.z.string().optional().openapi({description:"The content (HTML, CSS, JS) of the custom login page. (Used on Previews)"}),form_template:e.z.string().optional().openapi({description:"HTML form template to be used for WS-Federation."}),addons:e.z.record(e.z.any()).default({}).optional().openapi({description:"Addons enabled for this client and their associated configurations."}),token_endpoint_auth_method:e.z.enum(["none","client_secret_post","client_secret_basic"]).default("client_secret_basic").optional().openapi({description:"Defines the requested authentication method for the token endpoint. Can be none (public client without a client secret), client_secret_post (client uses HTTP POST parameters), or client_secret_basic (client uses HTTP Basic)."}),client_metadata:e.z.record(e.z.string().max(255)).default({}).optional().openapi({description:'Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: :,-+=_*?"/()<>@ [Tab][Space]'}),mobile:e.z.record(e.z.any()).default({}).optional().openapi({description:"Additional configuration for native mobile apps."}),initiate_login_uri:e.z.string().url().optional().openapi({description:"Initiate login uri, must be https"}),native_social_login:e.z.record(e.z.any()).default({}).optional(),refresh_token:e.z.record(e.z.any()).default({}).optional().openapi({description:"Refresh token configuration"}),default_organization:e.z.record(e.z.any()).default({}).optional().openapi({description:"Defines the default Organization ID and flows"}),organization_usage:e.z.enum(["deny","allow","require"]).default("deny").optional().openapi({description:"Defines how to proceed during an authentication transaction with regards an organization. Can be deny (default), allow or require."}),organization_require_behavior:e.z.enum(["no_prompt","pre_login_prompt","post_login_prompt"]).default("no_prompt").optional().openapi({description:"Defines how to proceed during an authentication transaction when client.organization_usage: 'require'. Can be no_prompt (default), pre_login_prompt or post_login_prompt. post_login_prompt requires oidc_conformant: true."}),client_authentication_methods:e.z.record(e.z.any()).default({}).optional().openapi({description:"Defines client authentication methods."}),require_pushed_authorization_requests:e.z.boolean().default(!1).openapi({description:"Makes the use of Pushed Authorization Requests mandatory for this client"}),require_proof_of_possession:e.z.boolean().default(!1).openapi({description:"Makes the use of Proof-of-Possession mandatory for this client"}),signed_request_object:e.z.record(e.z.any()).default({}).optional().openapi({description:"JWT-secured Authorization Requests (JAR) settings."}),compliance_level:e.z.enum(["none","fapi1_adv_pkj_par","fapi1_adv_mtls_par","fapi2_sp_pkj_mtls","fapi2_sp_mtls_mtls"]).optional().openapi({description:"Defines the compliance level for this client, which may restrict it's capabilities"}),par_request_expiry:e.z.number().optional().openapi({description:"Specifies how long, in seconds, a Pushed Authorization Request URI remains valid"}),token_quota:e.z.record(e.z.any()).default({}).optional(),owner_user_id:e.z.string().optional().openapi({description:"User ID of the consenting user when this client was created via IAT-gated Dynamic Client Registration. NULL for clients created via the Management API or open DCR."}),registration_type:e.z.enum(["manual","open_dcr","iat_dcr"]).optional().openapi({description:"Provenance of this client. `manual` = Management API; `open_dcr` = RFC 7591 without IAT; `iat_dcr` = RFC 7591 with an Initial Access Token."}),registration_metadata:e.z.record(e.z.any()).default({}).optional().openapi({description:"Arbitrary metadata captured at Dynamic Client Registration time that isn't a first-class client field (e.g. integration_type, domain). Also stores `iat_constraints` for clients created via IAT so RFC 7592 PUT can enforce field immutability."}),user_linking_mode:e.z.enum(["builtin","off"]).optional().openapi({description:"Per-client override for the built-in email-based user-linking path. `builtin` runs the legacy in-process linking at user creation/email update. `off` disables the legacy path; linking only happens if the tenant has enabled the `account-linking` template hook. When unset, the service-level `userLinkingMode` default applies."})}),to=e.z.object({created_at:e.z.string(),updated_at:e.z.string(),...se.shape}),re=e.z.object({client_id:e.z.string().min(1).openapi({description:"ID of the client."}),audience:e.z.string().min(1).openapi({description:"The audience (API identifier) of this client grant."}),scope:e.z.array(e.z.string()).optional().openapi({description:"Scopes allowed for this client grant."}),organization_usage:e.z.enum(["deny","allow","require"]).optional().openapi({description:"Defines whether organizations can be used with client credentials exchanges for this grant."}),allow_any_organization:e.z.boolean().optional().openapi({description:"If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations."}),is_system:e.z.boolean().optional().openapi({description:"If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly."}),subject_type:e.z.enum(["client","user"]).optional().openapi({description:"The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement."}),authorization_details_types:e.z.array(e.z.string()).optional().openapi({description:"Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement."})}),le=e.z.object({id:e.z.string().openapi({description:"ID of the client grant."}),...re.shape,created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),oo=e.z.array(le),ce=e.z.enum(["iat","rat"]),pe=e.z.object({id:e.z.string(),token_hash:e.z.string(),type:ce,client_id:e.z.string().optional(),sub:e.z.string().optional(),constraints:e.z.record(e.z.unknown()).optional(),single_use:e.z.boolean().default(!1),expires_at:e.z.string().optional()}),no=e.z.object({created_at:e.z.string(),used_at:e.z.string().optional(),revoked_at:e.z.string().optional(),...pe.shape}),z=e.z.object({x:e.z.number(),y:e.z.number()});var T=(t=>(t.RICH_TEXT="RICH_TEXT",t.NEXT_BUTTON="NEXT_BUTTON",t.BACK_BUTTON="BACK_BUTTON",t.SUBMIT_BUTTON="SUBMIT_BUTTON",t.DIVIDER="DIVIDER",t.TEXT="TEXT",t.EMAIL="EMAIL",t.PASSWORD="PASSWORD",t.NUMBER="NUMBER",t.PHONE="PHONE",t.DATE="DATE",t.CHECKBOX="CHECKBOX",t.RADIO="RADIO",t.SELECT="SELECT",t.HIDDEN="HIDDEN",t.LEGAL="LEGAL",t))(T||{}),O=(t=>(t.BLOCK="BLOCK",t.FIELD="FIELD",t))(O||{});const A=e.z.object({id:e.z.string(),category:e.z.nativeEnum(O),type:e.z.nativeEnum(T)}),de=A.extend({category:e.z.literal("BLOCK"),type:e.z.literal("RICH_TEXT"),config:e.z.object({content:e.z.string()}).passthrough()}),_e=A.extend({category:e.z.literal("BLOCK"),type:e.z.union([e.z.literal("NEXT_BUTTON"),e.z.literal("BACK_BUTTON"),e.z.literal("SUBMIT_BUTTON")]),config:e.z.object({text:e.z.string()}).passthrough()}),ze=A.extend({category:e.z.literal("FIELD"),type:e.z.literal("LEGAL"),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional(),config:e.z.object({text:e.z.string()}).passthrough()}),ge=A.extend({category:e.z.literal("FIELD"),type:e.z.union([e.z.literal("TEXT"),e.z.literal("EMAIL"),e.z.literal("PASSWORD"),e.z.literal("NUMBER"),e.z.literal("PHONE"),e.z.literal("DATE"),e.z.literal("CHECKBOX"),e.z.literal("RADIO"),e.z.literal("SELECT"),e.z.literal("HIDDEN")]),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional(),config:e.z.object({label:e.z.string().optional(),placeholder:e.z.string().optional()}).passthrough()}),me=e.z.object({id:e.z.string(),category:e.z.string(),type:e.z.string()}).passthrough(),ue=e.z.union([de,_e,ze,ge,me]);var he=(t=>(t.STEP="STEP",t.FLOW="FLOW",t.CONDITION="CONDITION",t.ACTION="ACTION",t))(he||{});const be=e.z.object({id:e.z.string(),type:e.z.literal("STEP"),coordinates:z,alias:e.z.string().optional(),config:e.z.object({components:e.z.array(ue),next_node:e.z.string()}).passthrough()}),fe=e.z.object({id:e.z.string(),type:e.z.literal("FLOW"),coordinates:z,alias:e.z.string().optional(),config:e.z.object({flow_id:e.z.string(),next_node:e.z.string()})}),Se=e.z.object({id:e.z.string(),type:e.z.literal("ACTION"),coordinates:z,alias:e.z.string().optional(),config:e.z.object({action_type:e.z.enum(["REDIRECT"]).openapi({description:"The type of action to perform"}),target:e.z.enum(["change-email","account","custom"]).openapi({description:"The predefined target to redirect to"}),custom_url:e.z.string().optional().openapi({description:"Custom URL when target is 'custom'"}),next_node:e.z.string().openapi({description:"The next node to navigate to after action (for non-redirect actions)"})}).passthrough()}),Ee=e.z.object({id:e.z.string(),type:e.z.string(),coordinates:z}).passthrough(),ye=e.z.union([be,fe,Se,Ee]),Ae=e.z.object({next_node:e.z.string(),coordinates:z}).passthrough(),Ie=e.z.object({resume_flow:e.z.boolean().optional(),coordinates:z}).passthrough(),Ce=e.z.object({id:e.z.string(),name:e.z.string(),languages:e.z.object({primary:e.z.string()}).passthrough(),nodes:e.z.array(ye),start:Ae,ending:Ie,created_at:e.z.string(),updated_at:e.z.string(),links:e.z.object({sdkSrc:e.z.string().optional(),sdk_src:e.z.string().optional()}).passthrough()}).passthrough(),io=Ce.omit({id:!0,created_at:!0,updated_at:!0});var N=(t=>(t.TOKEN="token",t.ID_TOKEN="id_token",t.TOKEN_ID_TOKEN="token id_token",t.CODE="code",t))(N||{}),w=(t=>(t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post",t.WEB_MESSAGE="web_message",t.SAML_POST="saml_post",t))(w||{}),R=(t=>(t.S256="S256",t.Plain="plain",t))(R||{});const Te=e.z.object({client_id:e.z.string(),act_as:e.z.string().optional(),response_type:e.z.nativeEnum(N).optional(),response_mode:e.z.nativeEnum(w).optional(),redirect_uri:e.z.string().optional(),audience:e.z.string().optional(),organization:e.z.string().optional(),state:e.z.string().optional(),nonce:e.z.string().optional(),scope:e.z.string().optional(),prompt:e.z.string().optional(),code_challenge_method:e.z.nativeEnum(R).optional(),code_challenge:e.z.string().optional(),username:e.z.string().optional(),ui_locales:e.z.string().optional(),max_age:e.z.number().optional(),acr_values:e.z.string().optional(),vendor_id:e.z.string().optional()}),ao=e.z.object({colors:e.z.object({primary:e.z.string(),page_background:e.z.object({type:e.z.string().optional(),start:e.z.string().optional(),end:e.z.string().optional(),angle_deg:e.z.number().optional()}).optional()}).optional(),logo_url:e.z.string().optional(),favicon_url:e.z.string().optional(),powered_by_logo_url:e.z.string().optional(),font:e.z.object({url:e.z.string()}).optional()}),Oe=e.z.enum(["password_reset","email_verification","otp","mfa_otp","authorization_code","oauth2_state","ticket"]),Ne=e.z.object({code_id:e.z.string().openapi({description:"The code that will be used in for instance an email verification flow"}),login_id:e.z.string().openapi({description:"The id of the login session that the code is connected to"}),connection_id:e.z.string().optional().openapi({description:"The connection that the code is connected to"}),code_type:Oe,code_verifier:e.z.string().optional().openapi({description:"The code verifier used in PKCE in outbound flows"}),code_challenge:e.z.string().optional().openapi({description:"The code challenge used in PKCE in outbound flows"}),code_challenge_method:e.z.enum(["plain","S256"]).optional().openapi({description:"The code challenge method used in PKCE in outbound flows"}),redirect_uri:e.z.string().optional().openapi({description:"The redirect URI associated with the code"}),otp:e.z.string().optional().openapi({description:"The one-time password value for OTP-based flows"}),nonce:e.z.string().optional().openapi({description:"The nonce value used for security in OIDC flows"}),state:e.z.string().optional().openapi({description:"The state parameter used for CSRF protection in OAuth flows"}),expires_at:e.z.string(),used_at:e.z.string().optional(),user_id:e.z.string().optional()}),so=e.z.object({...Ne.shape,created_at:e.z.string()}),we=e.z.object({kid:e.z.string().optional(),team_id:e.z.string().optional(),realms:e.z.string().optional(),authentication_method:e.z.string().optional(),client_id:e.z.string().optional(),client_secret:e.z.string().optional(),app_secret:e.z.string().optional(),scope:e.z.string().optional(),authorization_endpoint:e.z.string().optional(),token_endpoint:e.z.string().optional(),userinfo_endpoint:e.z.string().optional(),jwks_uri:e.z.string().optional(),discovery_url:e.z.string().optional(),issuer:e.z.string().optional(),provider:e.z.string().optional(),from:e.z.string().optional(),twilio_sid:e.z.string().optional(),twilio_token:e.z.string().optional(),icon_url:e.z.string().optional(),passwordPolicy:e.z.enum(["none","low","fair","good","excellent"]).optional(),password_complexity_options:e.z.object({min_length:e.z.number().optional()}).optional(),password_history:e.z.object({enable:e.z.boolean().optional(),size:e.z.number().optional()}).optional(),password_no_personal_info:e.z.object({enable:e.z.boolean().optional()}).optional(),password_dictionary:e.z.object({enable:e.z.boolean().optional(),dictionary:e.z.array(e.z.string()).optional()}).optional(),disable_signup:e.z.boolean().optional(),brute_force_protection:e.z.boolean().optional(),import_mode:e.z.boolean().optional(),attributes:e.z.object({email:e.z.object({identifier:e.z.object({active:e.z.boolean().optional()}).optional(),signup:e.z.object({status:e.z.enum(["required","optional","disabled"]).optional(),verification:e.z.object({active:e.z.boolean().optional()}).optional()}).optional(),validation:e.z.object({allowed:e.z.boolean().optional()}).optional(),unique:e.z.boolean().optional(),profile_required:e.z.boolean().optional(),verification_method:e.z.enum(["link","code"]).optional()}).optional(),username:e.z.object({identifier:e.z.object({active:e.z.boolean().optional()}).optional(),signup:e.z.object({status:e.z.enum(["required","optional","disabled"]).optional()}).optional(),validation:e.z.object({max_length:e.z.number().optional(),min_length:e.z.number().optional(),allowed_types:e.z.object({email:e.z.boolean().optional(),phone_number:e.z.boolean().optional()}).optional()}).optional(),profile_required:e.z.boolean().optional()}).optional(),phone_number:e.z.object({identifier:e.z.object({active:e.z.boolean().optional()}).optional(),signup:e.z.object({status:e.z.enum(["required","optional","disabled"]).optional()}).optional()}).optional()}).optional(),authentication_methods:e.z.object({password:e.z.object({enabled:e.z.boolean().optional()}).optional(),passkey:e.z.object({enabled:e.z.boolean().optional()}).optional()}).optional(),passkey_options:e.z.object({challenge_ui:e.z.enum(["both","autofill","button"]).optional(),local_enrollment_enabled:e.z.boolean().optional(),progressive_enrollment_enabled:e.z.boolean().optional()}).optional(),requires_username:e.z.boolean().optional(),validation:e.z.object({username:e.z.object({min:e.z.number().optional(),max:e.z.number().optional()}).optional()}).optional(),set_user_root_attributes:e.z.enum(["on_each_login","on_first_login","never_on_login"]).optional()}),Re=e.z.object({id:e.z.string().optional(),name:e.z.string(),display_name:e.z.string().optional(),strategy:e.z.string(),options:we.default({}),enabled_clients:e.z.array(e.z.string()).default([]).optional(),response_type:e.z.custom().optional(),response_mode:e.z.custom().optional(),is_domain_connection:e.z.boolean().optional(),show_as_button:e.z.boolean().optional(),metadata:e.z.record(e.z.any()).optional(),is_system:e.z.boolean().optional()}),ro=e.z.object({id:e.z.string(),created_at:e.z.string().transform(t=>t===null?"":t),updated_at:e.z.string().transform(t=>t===null?"":t)}).extend(Re.shape),je=e.z.object({domain:e.z.string(),custom_domain_id:e.z.string().optional(),type:e.z.enum(["auth0_managed_certs","self_managed_certs"]),verification_method:e.z.enum(["txt"]).optional(),tls_policy:e.z.enum(["recommended"]).optional(),custom_client_ip_header:e.z.enum(["true-client-ip","cf-connecting-ip","x-forwarded-for","x-azure-clientip","null"]).optional(),domain_metadata:e.z.record(e.z.string().max(255)).optional()}),ve=e.z.discriminatedUnion("name",[e.z.object({name:e.z.literal("txt"),record:e.z.string(),domain:e.z.string()}),e.z.object({name:e.z.literal("http"),http_body:e.z.string(),http_url:e.z.string()})]),ke=e.z.object({...je.shape,custom_domain_id:e.z.string(),primary:e.z.boolean(),status:e.z.enum(["disabled","pending","pending_verification","ready"]),origin_domain_name:e.z.string().optional(),verification:e.z.object({methods:e.z.array(ve)}).optional(),tls_policy:e.z.string().optional()}),lo=ke.extend({tenant_id:e.z.string()}),j=e.z.object({id:e.z.string(),order:e.z.number().optional(),visible:e.z.boolean().optional().default(!0)}),l=j.extend({category:e.z.literal("BLOCK").optional()}),co=l.extend({type:e.z.literal("DIVIDER"),config:e.z.object({text:e.z.string().optional()}).optional()}),po=l.extend({type:e.z.literal("HTML"),config:e.z.object({content:e.z.string().optional()}).optional()}),_o=l.extend({type:e.z.literal("IMAGE"),config:e.z.object({src:e.z.string().optional(),alt:e.z.string().optional(),width:e.z.number().optional(),height:e.z.number().optional()}).optional()}),zo=l.extend({type:e.z.literal("JUMP_BUTTON"),config:e.z.object({text:e.z.string().optional(),target_step:e.z.string().optional()})}),go=l.extend({type:e.z.literal("RESEND_BUTTON"),config:e.z.object({text:e.z.string().optional(),resend_action:e.z.string().optional()})}),mo=l.extend({type:e.z.literal("NEXT_BUTTON"),config:e.z.object({text:e.z.string().optional()})}),uo=l.extend({type:e.z.literal("PREVIOUS_BUTTON"),config:e.z.object({text:e.z.string().optional()})}),ho=l.extend({type:e.z.literal("RICH_TEXT"),config:e.z.object({content:e.z.string().optional()}).optional()}),v=j.extend({category:e.z.literal("WIDGET").optional(),label:e.z.string().min(1).optional(),hint:e.z.string().min(1).max(500).optional(),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional()}),bo=v.extend({type:e.z.literal("AUTH0_VERIFIABLE_CREDENTIALS"),config:e.z.object({credential_type:e.z.string().optional()})}),fo=v.extend({type:e.z.literal("GMAPS_ADDRESS"),config:e.z.object({api_key:e.z.string().optional()})}),So=v.extend({type:e.z.literal("RECAPTCHA"),config:e.z.object({site_key:e.z.string().optional()})}),n=j.extend({category:e.z.literal("FIELD").optional(),label:e.z.string().min(1).optional(),hint:e.z.string().min(1).max(500).optional(),messages:e.z.array(e.z.object({id:e.z.number().optional(),text:e.z.string(),type:e.z.enum(["info","error","success","warning"])})).optional(),required:e.z.boolean().optional(),sensitive:e.z.boolean().optional()}),Eo=n.extend({type:e.z.literal("BOOLEAN"),config:e.z.object({default_value:e.z.boolean().optional()}).optional()}),yo=n.extend({type:e.z.literal("CARDS"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string(),description:e.z.string().optional(),image:e.z.string().optional()})).optional(),multi_select:e.z.boolean().optional()}).optional()}),Ao=n.extend({type:e.z.literal("CHOICE"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string()})).optional(),display:e.z.enum(["radio","checkbox"]).optional(),multiple:e.z.boolean().optional(),default_value:e.z.union([e.z.string(),e.z.array(e.z.string())]).optional()}).optional()}),Io=n.extend({type:e.z.literal("CUSTOM"),config:e.z.object({component:e.z.string().optional(),props:e.z.record(e.z.any()).optional(),schema:e.z.record(e.z.any()).optional(),code:e.z.string().optional()})}),Co=n.extend({type:e.z.literal("DATE"),config:e.z.object({format:e.z.string().optional(),min:e.z.string().optional(),max:e.z.string().optional(),default_value:e.z.string().optional()}).optional()}),To=n.extend({type:e.z.literal("DROPDOWN"),config:e.z.object({options:e.z.array(e.z.object({value:e.z.string(),label:e.z.string()})).optional(),placeholder:e.z.string().optional(),searchable:e.z.boolean().optional(),multiple:e.z.boolean().optional(),default_value:e.z.union([e.z.string(),e.z.array(e.z.string())]).optional()}).optional()}),Oo=n.extend({type:e.z.literal("EMAIL"),config:e.z.object({placeholder:e.z.string().optional(),default_value:e.z.string().optional()}).optional()}),No=n.extend({type:e.z.literal("FILE"),config:e.z.object({accept:e.z.string().optional(),max_size:e.z.number().optional(),multiple:e.z.boolean().optional()}).optional()}),wo=n.extend({type:e.z.literal("LEGAL"),config:e.z.object({text:e.z.string(),html:e.z.boolean().optional()}).optional()}),Ro=n.extend({type:e.z.literal("NUMBER"),config:e.z.object({placeholder:e.z.string().optional(),min:e.z.number().optional(),max:e.z.number().optional(),step:e.z.number().optional(),default_value:e.z.string().optional()}).optional()}),jo=n.extend({type:e.z.literal("PASSWORD"),config:e.z.object({placeholder:e.z.string().optional(),min_length:e.z.number().optional(),show_toggle:e.z.boolean().optional(),forgot_password_link:e.z.string().optional(),default_value:e.z.string().optional()}).optional()}),vo=n.extend({type:e.z.literal("PAYMENT"),config:e.z.object({provider:e.z.string().optional(),currency:e.z.string().optional()}).optional()}),ko=n.extend({type:e.z.literal("SOCIAL"),config:e.z.object({providers:e.z.array(e.z.string()).optional(),provider_details:e.z.array(e.z.object({name:e.z.string(),strategy:e.z.string().optional(),display_name:e.z.string().optional(),icon_url:e.z.string().optional(),href:e.z.string().optional()})).optional()}).optional()}),Lo=n.extend({type:e.z.literal("TEL"),config:e.z.object({placeholder:e.z.string().optional(),default_country:e.z.string().optional(),default_value:e.z.string().optional(),allow_email:e.z.boolean().optional()}).optional()}),Do=n.extend({type:e.z.literal("TEXT"),config:e.z.object({placeholder:e.z.string().optional(),multiline:e.z.boolean().optional(),max_length:e.z.number().optional(),default_value:e.z.string().optional()}).optional()}),Uo=n.extend({type:e.z.literal("COUNTRY"),config:e.z.object({placeholder:e.z.string().optional(),default_value:e.z.string().optional()}).optional()}),Fo=n.extend({type:e.z.literal("URL"),config:e.z.object({placeholder:e.z.string().optional(),default_value:e.z.string().optional()}).optional()}),Le=e.z.discriminatedUnion("type",[co,po,_o,zo,go,mo,uo,ho]),De=e.z.discriminatedUnion("type",[bo,fo,So]),Ue=e.z.discriminatedUnion("type",[Eo,yo,Ao,Uo,Io,Co,To,Oo,No,wo,Ro,jo,vo,ko,Lo,Do,Fo]),k=e.z.union([Le,De,Ue]),xo=new Set(["BOOLEAN","CARDS","CHOICE","COUNTRY","DATE","DROPDOWN","EMAIL","LEGAL","NUMBER","PASSWORD","TEL","TEXT","URL"]),Po=e.z.object({id:e.z.string(),type:e.z.literal("submit"),label:e.z.string(),className:e.z.string().optional(),disabled:e.z.boolean().optional().default(!1),order:e.z.number().optional(),visible:e.z.boolean().optional().default(!0),customizations:e.z.record(e.z.string(),e.z.any()).optional()}),b=e.z.object({x:e.z.number(),y:e.z.number()}),Mo=e.z.object({id:e.z.string(),type:e.z.literal("FLOW"),coordinates:b,alias:e.z.string().min(1).max(150).optional(),config:e.z.object({flow_id:e.z.string().max(30),next_node:e.z.string().optional()})}),Ho=e.z.object({id:e.z.string(),type:e.z.literal("ROUTER"),coordinates:b,alias:e.z.string().min(1).max(150),config:e.z.object({rules:e.z.array(e.z.object({id:e.z.string(),alias:e.z.string().min(1).max(150).optional(),condition:e.z.any(),next_node:e.z.string()})),fallback:e.z.string()})}),Go=e.z.object({id:e.z.string(),type:e.z.literal("STEP"),coordinates:b,alias:e.z.string().min(1).max(150).optional(),config:e.z.object({components:e.z.array(k),next_node:e.z.string().optional()})}),Fe=e.z.discriminatedUnion("type",[Mo,Ho,Go]),xe=e.z.object({name:e.z.string().openapi({description:"The name of the form"}),messages:e.z.object({errors:e.z.record(e.z.string(),e.z.any()).optional(),custom:e.z.record(e.z.string(),e.z.any()).optional()}).optional(),languages:e.z.object({primary:e.z.string().optional(),default:e.z.string().optional()}).optional(),translations:e.z.record(e.z.string(),e.z.any()).optional(),nodes:e.z.array(Fe).optional(),start:e.z.object({hidden_fields:e.z.array(e.z.object({key:e.z.string(),value:e.z.string()})).optional(),next_node:e.z.string().optional(),coordinates:b.optional()}).optional(),ending:e.z.object({redirection:e.z.object({delay:e.z.number().optional(),target:e.z.string().optional()}).optional(),after_submit:e.z.object({flow_id:e.z.string().optional()}).optional(),coordinates:b.optional(),resume_flow:e.z.boolean().optional()}).optional(),style:e.z.object({css:e.z.string().optional()}).optional(),links:e.z.object({sdkSrc:e.z.string().optional(),sdk_src:e.z.string().optional()}).optional()}).openapi({description:"Schema for flow-based forms (matches Auth0 Forms structure)"}),Bo=e.z.object({...s.shape,...xe.shape,id:e.z.string()}),Pe=e.z.object({id:e.z.number().optional(),text:e.z.string(),type:e.z.enum(["info","error","success","warning"])}),Me=e.z.object({id:e.z.string().optional(),text:e.z.string(),href:e.z.string(),linkText:e.z.string().optional()}),Wo=e.z.object({name:e.z.string().optional(),action:e.z.string(),method:e.z.enum(["POST","GET"]),title:e.z.string().optional(),description:e.z.string().optional(),components:e.z.array(k),messages:e.z.array(Pe).optional(),links:e.z.array(Me).optional(),footer:e.z.string().optional()});function Ko(t){return t.category==="BLOCK"}function qo(t){return t.category==="WIDGET"}function Vo(t){return t.category==="FIELD"}const He=e.z.enum(["pre-user-registration","post-user-registration","post-user-login","post-user-update","validate-registration-username","pre-user-deletion","post-user-deletion"]),Ge=e.z.enum(["pre-user-registration","post-user-registration","post-user-login","validate-registration-username","pre-user-deletion","post-user-deletion"]),Be=e.z.enum(["post-user-login","post-user-registration","post-user-update","credentials-exchange"]),We=e.z.enum(["post-user-login","credentials-exchange","pre-user-registration","post-user-registration"]),L=e.z.enum(["ensure-username","set-preferred-username","account-linking"]),Xo={"ensure-username":{name:"Ensure Username",description:"Automatically assigns a username to users who sign in without one. Creates a linked username account for social/email users.",trigger_ids:["post-user-login"]},"set-preferred-username":{name:"Set Preferred Username",description:"Sets the preferred_username claim on tokens based on the username from the primary or linked user.",trigger_ids:["credentials-exchange"]},"account-linking":{name:"Account Linking",description:"Links a user to an existing primary account with the same verified email. Idempotent — safe to run on every login, registration, and email update.",trigger_ids:["post-user-login","post-user-registration","post-user-update"]}},c={enabled:e.z.boolean().default(!1),synchronous:e.z.boolean().default(!1),priority:e.z.number().optional(),hook_id:e.z.string().optional()},Yo=e.z.object({...c,trigger_id:He,url:e.z.string()}),Qo=e.z.object({...c,trigger_id:Ge,form_id:e.z.string()}),Zo=e.z.object({...c,trigger_id:Be,template_id:L}),$o=e.z.object({...c,trigger_id:We,code_id:e.z.string()}),Jo=e.z.union([Yo,Qo,Zo,$o]),en=e.z.object({...c,trigger_id:He,...s.shape,hook_id:e.z.string(),url:e.z.string()}),tn=e.z.object({...c,trigger_id:Ge,...s.shape,hook_id:e.z.string(),form_id:e.z.string()}),on=e.z.object({...c,trigger_id:Be,...s.shape,hook_id:e.z.string(),template_id:L}),nn=e.z.object({...c,trigger_id:We,...s.shape,hook_id:e.z.string(),code_id:e.z.string()}),an=e.z.union([en,tn,on,nn]),Ke=e.z.object({code:e.z.string().max(1e5),secrets:e.z.record(e.z.string()).optional()}),sn=Ke.extend({id:e.z.string(),tenant_id:e.z.string(),...s.shape}),qe=e.z.object({name:e.z.string().optional()}),Ve=e.z.object({email:e.z.string().optional()}),Xe=e.z.object({organization_id:e.z.string().max(50),inviter:qe,invitee:Ve,invitation_url:e.z.string().url(),client_id:e.z.string(),connection_id:e.z.string().optional(),app_metadata:e.z.record(e.z.any()).default({}).optional(),user_metadata:e.z.record(e.z.any()).default({}).optional(),ttl_sec:e.z.number().int().max(2592e3).default(604800).optional(),roles:e.z.array(e.z.string()).default([]).optional(),send_invitation_email:e.z.boolean().default(!0).optional()}),rn=e.z.object({id:e.z.string(),organization_id:e.z.string().max(50),created_at:e.z.string().datetime(),expires_at:e.z.string().datetime(),ticket_id:e.z.string().optional()}).extend(Xe.shape),Ye=e.z.object({alg:e.z.enum(["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512"]),e:e.z.string(),kid:e.z.string(),kty:e.z.enum(["RSA","EC","oct"]),n:e.z.string(),x5t:e.z.string().optional(),x5c:e.z.array(e.z.string()).optional(),use:e.z.enum(["sig","enc"]).optional()}),ln=e.z.object({keys:e.z.array(Ye)}),cn=e.z.object({issuer:e.z.string(),authorization_endpoint:e.z.string(),token_endpoint:e.z.string(),device_authorization_endpoint:e.z.string(),userinfo_endpoint:e.z.string(),mfa_challenge_endpoint:e.z.string(),jwks_uri:e.z.string(),registration_endpoint:e.z.string().optional(),revocation_endpoint:e.z.string(),scopes_supported:e.z.array(e.z.string()),response_types_supported:e.z.array(e.z.string()),code_challenge_methods_supported:e.z.array(e.z.string()),response_modes_supported:e.z.array(e.z.string()),subject_types_supported:e.z.array(e.z.string()),id_token_signing_alg_values_supported:e.z.array(e.z.string()),token_endpoint_auth_methods_supported:e.z.array(e.z.string()),claims_supported:e.z.array(e.z.string()),request_uri_parameter_supported:e.z.boolean(),request_parameter_supported:e.z.boolean(),token_endpoint_auth_signing_alg_values_supported:e.z.array(e.z.string())});var D=(t=>(t.PENDING="pending",t.AUTHENTICATED="authenticated",t.AWAITING_EMAIL_VERIFICATION="awaiting_email_verification",t.AWAITING_MFA="awaiting_mfa",t.AWAITING_HOOK="awaiting_hook",t.AWAITING_CONTINUATION="awaiting_continuation",t.COMPLETED="completed",t.FAILED="failed",t.EXPIRED="expired",t))(D||{});const Qe=e.z.nativeEnum(D),Ze=e.z.object({strategy:e.z.string(),strategy_type:e.z.string()}),$e=e.z.object({csrf_token:e.z.string(),auth0Client:e.z.string().optional(),authParams:Te,expires_at:e.z.string(),deleted_at:e.z.string().optional(),ip:e.z.string().optional(),useragent:e.z.string().optional(),session_id:e.z.string().optional(),authorization_url:e.z.string().optional(),state:Qe.optional().default("pending"),state_data:e.z.string().optional(),failure_reason:e.z.string().optional(),user_id:e.z.string().optional(),auth_connection:e.z.string().optional(),auth_strategy:Ze.optional(),authenticated_at:e.z.string().optional()}).openapi({description:"This represents a login sesion"}),pn=e.z.object({...$e.shape,id:e.z.string().openapi({description:"This is is used as the state in the universal login"}),created_at:e.z.string(),updated_at:e.z.string()}),Je={ACLS_SUMMARY:"acls_summary",ACTIONS_EXECUTION_FAILED:"actions_execution_failed",API_LIMIT:"api_limit",API_LIMIT_WARNING:"api_limit_warning",APPI:"appi",CIBA_EXCHANGE_FAILED:"ciba_exchange_failed",CIBA_EXCHANGE_SUCCEEDED:"ciba_exchange_succeeded",CIBA_START_FAILED:"ciba_start_failed",CIBA_START_SUCCEEDED:"ciba_start_succeeded",CODE_LINK_SENT:"cls",CODE_SENT:"cs",DEPRECATION_NOTICE:"depnote",FAILED_LOGIN:"f",FAILED_BY_CONNECTOR:"fc",FAILED_CHANGE_EMAIL:"fce",FAILED_BY_CORS:"fco",FAILED_CROSS_ORIGIN_AUTHENTICATION:"fcoa",FAILED_CHANGE_PASSWORD:"fcp",FAILED_POST_CHANGE_PASSWORD_HOOK:"fcph",FAILED_CHANGE_PHONE_NUMBER:"fcpn",FAILED_CHANGE_PASSWORD_REQUEST:"fcpr",FAILED_CONNECTOR_PROVISIONING:"fcpro",FAILED_CHANGE_USERNAME:"fcu",FAILED_DELEGATION:"fd",FAILED_DEVICE_ACTIVATION:"fdeac",FAILED_DEVICE_AUTHORIZATION_REQUEST:"fdeaz",USER_CANCELED_DEVICE_CONFIRMATION:"fdecc",FAILED_USER_DELETION:"fdu",FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:"feacft",FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:"feccft",FAILED_EXCHANGE_CUSTOM_TOKEN:"fecte",FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:"fede",FAILED_FEDERATED_LOGOUT:"federated_logout_failed",FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN:"fens",FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:"feoobft",FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:"feotpft",FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:"fepft",FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN:"fepotpft",FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:"fercft",FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN:"ferrt",FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:"fertft",FAILED_HOOK:"fh",FAILED_IMPERSONATION:"fimp",FAILED_INVITE_ACCEPT:"fi",FAILED_LOGOUT:"flo",FLOWS_EXECUTION_COMPLETED:"flows_execution_completed",FLOWS_EXECUTION_FAILED:"flows_execution_failed",FAILED_SENDING_NOTIFICATION:"fn",FORMS_SUBMISSION_FAILED:"forms_submission_failed",FORMS_SUBMISSION_SUCCEEDED:"forms_submission_succeeded",FAILED_LOGIN_INCORRECT_PASSWORD:"fp",FAILED_PUSHED_AUTHORIZATION_REQUEST:"fpar",FAILED_POST_USER_REGISTRATION_HOOK:"fpurh",FAILED_SIGNUP:"fs",FAILED_SILENT_AUTH:"fsa",FAILED_LOGIN_INVALID_EMAIL_USERNAME:"fu",FAILED_USERS_IMPORT:"fui",FAILED_VERIFICATION_EMAIL:"fv",FAILED_VERIFICATION_EMAIL_REQUEST:"fvr",EMAIL_VERIFICATION_CONFIRMED:"gd_auth_email_verification",EMAIL_VERIFICATION_FAILED:"gd_auth_fail_email_verification",MFA_AUTH_FAILED:"gd_auth_failed",MFA_AUTH_REJECTED:"gd_auth_rejected",MFA_AUTH_SUCCESS:"gd_auth_succeed",MFA_ENROLLMENT_COMPLETE:"gd_enrollment_complete",TOO_MANY_MFA_FAILURES:"gd_otp_rate_limit_exceed",MFA_RECOVERY_FAILED:"gd_recovery_failed",MFA_RECOVERY_RATE_LIMIT_EXCEED:"gd_recovery_rate_limit_exceed",MFA_RECOVERY_SUCCESS:"gd_recovery_succeed",MFA_EMAIL_SENT:"gd_send_email",EMAIL_VERIFICATION_SENT:"gd_send_email_verification",EMAIL_VERIFICATION_SEND_FAILURE:"gd_send_email_verification_failure",PUSH_NOTIFICATION_SENT:"gd_send_pn",ERROR_SENDING_MFA_PUSH_NOTIFICATION:"gd_send_pn_failure",MFA_SMS_SENT:"gd_send_sms",ERROR_SENDING_MFA_SMS:"gd_send_sms_failure",MFA_VOICE_CALL_SUCCESS:"gd_send_voice",MFA_VOICE_CALL_FAILED:"gd_send_voice_failure",SECOND_FACTOR_STARTED:"gd_start_auth",MFA_ENROLL_STARTED:"gd_start_enroll",MFA_ENROLLMENT_FAILED:"gd_start_enroll_failed",GUARDIAN_TENANT_UPDATE:"gd_tenant_update",UNENROLL_DEVICE_ACCOUNT:"gd_unenroll",UPDATE_DEVICE_ACCOUNT:"gd_update_device_account",WEBAUTHN_CHALLENGE_FAILED:"gd_webauthn_challenge_failed",WEBAUTHN_ENROLLMENT_FAILED:"gd_webauthn_enrollment_failed",FAILED_KMS_API_OPERATION:"kms_key_management_failure",SUCCESS_KMS_API_OPERATION:"kms_key_management_success",KMS_KEY_STATE_CHANGED:"kms_key_state_changed",TOO_MANY_CALLS_TO_DELEGATION:"limit_delegation",BLOCKED_IP_ADDRESS:"limit_mu",BLOCKED_ACCOUNT_IP:"limit_sul",BLOCKED_ACCOUNT_EMAIL:"limit_wc",MFA_REQUIRED:"mfar",MANAGEMENT_API_READ_OPERATION:"mgmt_api_read",FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:"my_account_authentication_method_failed",SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT:"my_account_authentication_method_succeeded",FAILED_OIDC_BACKCHANNEL_LOGOUT:"oidc_backchannel_logout_failed",SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT:"oidc_backchannel_logout_succeeded",ORGANIZATION_MEMBER_ADDED:"organization_member_added",PASSKEY_CHALLENGE_FAILED:"passkey_challenge_failed",PASSKEY_CHALLENGE_STARTED:"passkey_challenge_started",PRE_LOGIN_ASSESSMENT:"pla",BREACHED_PASSWORD:"pwd_leak",BREACHED_PASSWORD_ON_RESET:"reset_pwd_leak",SUCCESS_RESOURCE_CLEANUP:"resource_cleanup",RICH_CONSENTS_ACCESS_ERROR:"rich_consents_access_error",SUCCESS_LOGIN:"s",SUCCESS_API_OPERATION:"sapi",FAILED_API_OPERATION:"fapi",SUCCESS_CHANGE_EMAIL:"sce",SUCCESS_CROSS_ORIGIN_AUTHENTICATION:"scoa",SUCCESS_CHANGE_PASSWORD:"scp",SUCCESS_CHANGE_PHONE_NUMBER:"scpn",SUCCESS_CHANGE_PASSWORD_REQUEST:"scpr",SUCCESS_CHANGE_USERNAME:"scu",SUCCESS_CREDENTIAL_VALIDATION:"scv",SUCCESS_DELEGATION:"sd",SUCCESS_USER_DELETION:"sdu",SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN:"seacft",SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS:"seccft",SUCCESS_EXCHANGE_CUSTOM_TOKEN:"secte",SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN:"sede",SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN:"sens",SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN:"seoobft",SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN:"seotpft",SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN:"sepft",SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN:"sepkoobft",SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN:"sepkotpft",SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN:"sepkrcft",SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN:"sercft",SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN:"sertft",SUCCESS_IMPERSONATION:"simp",SUCCESSFULLY_ACCEPTED_USER_INVITE:"si",BREACHED_PASSWORD_ON_SIGNUP:"signup_pwd_leak",SUCCESS_LOGOUT:"slo",SUCCESS_REVOCATION:"srrt",SUCCESS_SIGNUP:"ss",FAILED_SS_SSO_OPERATION:"ss_sso_failure",INFORMATION_FROM_SS_SSO_OPERATION:"ss_sso_info",SUCCESS_SS_SSO_OPERATION:"ss_sso_success",SUCCESS_SILENT_AUTH:"ssa",SUCCESSFUL_SCIM_OPERATION:"sscim",SUCCESSFULLY_IMPORTED_USERS:"sui",SUCCESS_VERIFICATION_EMAIL:"sv",SUCCESS_VERIFICATION_EMAIL_REQUEST:"svr",MAX_AMOUNT_OF_AUTHENTICATORS:"too_many_records",USER_LOGIN_BLOCK_RELEASED:"ublkdu",FAILED_UNIVERSAL_LOGOUT:"universal_logout_failed",SUCCESSFUL_UNIVERSAL_LOGOUT:"universal_logout_succeeded",WARNING_DURING_LOGIN:"w",WARNING_SENDING_NOTIFICATION:"wn",WARNING_USER_MANAGEMENT:"wum"},dn=e.z.string().refine(t=>Object.values(Je).includes(t),{message:"Invalid log type"}),et=e.z.object({name:e.z.string(),version:e.z.string(),env:e.z.object({node:e.z.string().optional()}).optional()}),tt=e.z.object({country_code:e.z.string().length(2),city_name:e.z.string(),latitude:e.z.string(),longitude:e.z.string(),time_zone:e.z.string(),continent_code:e.z.string()}),ot=e.z.object({type:dn,date:e.z.string(),description:e.z.string().optional(),ip:e.z.string().optional(),user_agent:e.z.string().optional(),details:e.z.any().optional(),isMobile:e.z.boolean(),user_id:e.z.string().optional(),user_name:e.z.string().optional(),connection:e.z.string().optional(),connection_id:e.z.string().optional(),client_id:e.z.string().optional(),client_name:e.z.string().optional(),audience:e.z.string().optional(),scope:e.z.string().optional(),strategy:e.z.string().optional(),strategy_type:e.z.string().optional(),hostname:e.z.string().optional(),auth0_client:et.optional(),log_id:e.z.string().optional(),location_info:tt.optional()}),_n=e.z.object({...ot.shape,log_id:e.z.string()}),nt=e.z.object({id:e.z.string().optional(),user_id:e.z.string(),password:e.z.string(),algorithm:e.z.enum(["bcrypt","argon2id"]).default("argon2id"),is_current:e.z.boolean().default(!0)}),zn=nt.extend({id:e.z.string(),created_at:e.z.string(),updated_at:e.z.string()}),it=e.z.object({initial_user_agent:e.z.string().describe("First user agent of the device from which this user logged in"),initial_ip:e.z.string().describe("First IP address associated with this session"),initial_asn:e.z.string().describe("First autonomous system number associated with this session"),last_user_agent:e.z.string().describe("Last user agent of the device from which this user logged in"),last_ip:e.z.string().describe("Last IP address from which this user logged in"),last_asn:e.z.string().describe("Last autonomous system number from which this user logged in")}),at=e.z.object({id:e.z.string(),revoked_at:e.z.string().optional(),used_at:e.z.string().optional(),user_id:e.z.string().describe("The user ID associated with the session"),expires_at:e.z.string().optional(),login_session_id:e.z.string(),idle_expires_at:e.z.string().optional(),device:it.describe("Metadata related to the device used in the session"),clients:e.z.array(e.z.string()).describe("List of client details for the session")}),gn=e.z.object({created_at:e.z.string(),updated_at:e.z.string(),authenticated_at:e.z.string(),last_interaction_at:e.z.string(),...at.shape}),mn=e.z.object({kid:e.z.string().openapi({description:"The key id of the signing key"}),cert:e.z.string().openapi({description:"The public certificate of the signing key"}),fingerprint:e.z.string().openapi({description:"The cert fingerprint"}),thumbprint:e.z.string().openapi({description:"The cert thumbprint"}),pkcs7:e.z.string().optional().openapi({description:"The private key in pkcs7 format"}),current:e.z.boolean().optional().openapi({description:"True if the key is the current key"}),next:e.z.boolean().optional().openapi({description:"True if the key is the next key"}),previous:e.z.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:e.z.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:e.z.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:e.z.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:e.z.string().optional().openapi({description:"The date and time when the key was revoked"}),connection:e.z.string().optional().openapi({description:"The connection identifier associated with the key"}),type:e.z.enum(["jwt_signing","saml_encryption"]).openapi({description:"The type of the signing key"})}),st=e.z.object({id:e.z.string().optional(),audience:e.z.string(),friendly_name:e.z.string(),picture_url:e.z.string().optional(),support_email:e.z.string().optional(),support_url:e.z.string().optional(),sender_email:e.z.string().email(),sender_name:e.z.string(),session_lifetime:e.z.number().optional(),idle_session_lifetime:e.z.number().optional(),ephemeral_session_lifetime:e.z.number().optional(),idle_ephemeral_session_lifetime:e.z.number().optional(),session_cookie:e.z.object({mode:e.z.enum(["persistent","non-persistent"]).optional()}).optional(),allowed_logout_urls:e.z.array(e.z.string()).optional(),default_redirection_uri:e.z.string().optional(),enabled_locales:e.z.array(e.z.string()).optional(),default_directory:e.z.string().optional(),error_page:e.z.object({html:e.z.string().optional(),show_log_link:e.z.boolean().optional(),url:e.z.string().optional()}).optional(),flags:e.z.object({allow_changing_enable_sso:e.z.boolean().optional(),allow_legacy_delegation_grant_types:e.z.boolean().optional(),allow_legacy_ro_grant_types:e.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:e.z.boolean().optional(),change_pwd_flow_v1:e.z.boolean().optional(),custom_domains_provisioning:e.z.boolean().optional(),dashboard_insights_view:e.z.boolean().optional(),dashboard_log_streams_next:e.z.boolean().optional(),disable_clickjack_protection_headers:e.z.boolean().optional(),disable_fields_map_fix:e.z.boolean().optional(),disable_impersonation:e.z.boolean().optional(),disable_management_api_sms_obfuscation:e.z.boolean().optional(),enable_adfs_waad_email_verification:e.z.boolean().optional(),enable_apis_section:e.z.boolean().optional(),enable_client_connections:e.z.boolean().optional(),enable_custom_domain_in_emails:e.z.boolean().optional(),enable_dynamic_client_registration:e.z.boolean().optional(),dcr_require_initial_access_token:e.z.boolean().optional(),dcr_allowed_grant_types:e.z.array(e.z.string()).optional(),allow_http_return_to:e.z.array(e.z.string().refine(t=>{try{const o=new URL(t);return o.protocol==="http:"&&(o.pathname===""||o.pathname==="/")&&!o.search&&!o.hash&&t===o.origin}catch{return!1}},{message:"must be a fully-qualified http origin (scheme + host + port, no path)"})).optional(),enable_idtoken_api2:e.z.boolean().optional(),enable_legacy_logs_search_v2:e.z.boolean().optional(),enable_legacy_profile:e.z.boolean().optional(),enable_pipeline2:e.z.boolean().optional(),enable_public_signup_user_exists_error:e.z.boolean().optional(),enable_sso:e.z.boolean().optional(),enforce_client_authentication_on_passwordless_start:e.z.boolean().optional(),genai_trial:e.z.boolean().optional(),improved_signup_bot_detection_in_classic:e.z.boolean().optional(),mfa_show_factor_list_on_enrollment:e.z.boolean().optional(),no_disclose_enterprise_connections:e.z.boolean().optional(),remove_alg_from_jwks:e.z.boolean().optional(),revoke_refresh_token_grant:e.z.boolean().optional(),trust_azure_adfs_email_verified_connection_property:e.z.boolean().optional(),use_scope_descriptions_for_consent:e.z.boolean().optional(),inherit_global_permissions_in_organizations:e.z.boolean().optional()}).optional(),sandbox_version:e.z.string().optional(),legacy_sandbox_version:e.z.string().optional(),sandbox_versions_available:e.z.array(e.z.string()).optional(),change_password:e.z.object({enabled:e.z.boolean().optional(),html:e.z.string().optional()}).optional(),guardian_mfa_page:e.z.object({enabled:e.z.boolean().optional(),html:e.z.string().optional()}).optional(),device_flow:e.z.object({charset:e.z.enum(["base20","digits"]).optional(),mask:e.z.string().max(20).optional()}).optional(),default_token_quota:e.z.object({clients:e.z.object({client_credentials:e.z.record(e.z.any()).optional()}).optional(),organizations:e.z.object({client_credentials:e.z.record(e.z.any()).optional()}).optional()}).optional(),default_audience:e.z.string().optional(),default_organization:e.z.string().optional(),sessions:e.z.object({oidc_logout_prompt_enabled:e.z.boolean().optional()}).optional(),oidc_logout:e.z.object({rp_logout_end_session_endpoint_discovery:e.z.boolean().optional()}).optional(),allow_organization_name_in_authentication_api:e.z.boolean().optional(),customize_mfa_in_postlogin_action:e.z.boolean().optional(),acr_values_supported:e.z.array(e.z.string()).optional(),mtls:e.z.object({enable_endpoint_aliases:e.z.boolean().optional()}).optional(),pushed_authorization_requests_supported:e.z.boolean().optional(),authorization_response_iss_parameter_supported:e.z.boolean().optional(),mfa:e.z.object({policy:e.z.enum(["never","always"]).default("never").optional(),factors:e.z.object({sms:e.z.boolean().default(!1),otp:e.z.boolean().default(!1),email:e.z.boolean().default(!1),push_notification:e.z.boolean().default(!1),webauthn_roaming:e.z.boolean().default(!1),webauthn_platform:e.z.boolean().default(!1),recovery_code:e.z.boolean().default(!1),duo:e.z.boolean().default(!1)}).optional(),sms_provider:e.z.object({provider:e.z.enum(["twilio","vonage","aws_sns","phone_message_hook"]).optional()}).optional(),twilio:e.z.object({sid:e.z.string().optional(),auth_token:e.z.string().optional(),from:e.z.string().optional(),messaging_service_sid:e.z.string().optional()}).optional(),phone_message:e.z.object({message:e.z.string().optional()}).optional()}).optional()}),un=e.z.object({created_at:e.z.string().nullable().transform(t=>t??""),updated_at:e.z.string().nullable().transform(t=>t??""),...st.shape,id:e.z.string()});var rt=(t=>(t.RefreshToken="refresh_token",t.AuthorizationCode="authorization_code",t.ClientCredential="client_credentials",t.Passwordless="passwordless",t.Password="password",t.OTP="http://auth0.com/oauth/grant-type/passwordless/otp",t))(rt||{});const hn=e.z.object({access_token:e.z.string(),id_token:e.z.string().optional(),scope:e.z.string().optional(),state:e.z.string().optional(),refresh_token:e.z.string().optional(),token_type:e.z.string(),expires_in:e.z.number()});e.z.object({code:e.z.string(),state:e.z.string().optional()});const lt=e.z.object({button_border_radius:e.z.number(),button_border_weight:e.z.number(),buttons_style:e.z.enum(["pill","rounded","sharp"]),input_border_radius:e.z.number(),input_border_weight:e.z.number(),inputs_style:e.z.enum(["pill","rounded","sharp"]),show_widget_shadow:e.z.boolean(),widget_border_weight:e.z.number(),widget_corner_radius:e.z.number()}),ct=e.z.object({base_focus_color:e.z.string(),base_hover_color:e.z.string(),body_text:e.z.string(),captcha_widget_theme:e.z.enum(["auto","dark","light"]),error:e.z.string(),header:e.z.string(),icons:e.z.string(),input_background:e.z.string(),input_border:e.z.string(),input_filled_text:e.z.string(),input_labels_placeholders:e.z.string(),links_focused_components:e.z.string(),primary_button:e.z.string(),primary_button_label:e.z.string(),secondary_button_border:e.z.string(),secondary_button_label:e.z.string(),success:e.z.string(),widget_background:e.z.string(),widget_border:e.z.string()}),_=e.z.object({bold:e.z.boolean(),size:e.z.number()}),pt=e.z.object({body_text:_,buttons_text:_,font_url:e.z.string(),input_labels:_,links:_,links_style:e.z.enum(["normal","underlined"]),reference_text_size:e.z.number(),subtitle:_,title:_}),dt=e.z.object({background_color:e.z.string(),background_image_url:e.z.string(),page_layout:e.z.enum(["center","left","right"])}),_t=e.z.object({header_text_alignment:e.z.enum(["center","left","right"]),logo_height:e.z.number(),logo_position:e.z.enum(["center","left","none","right"]),logo_url:e.z.string(),social_buttons_layout:e.z.enum(["bottom","top"])}),zt=e.z.object({borders:lt,colors:ct,displayName:e.z.string(),fonts:pt,page_background:dt,widget:_t}),bn=zt.extend({themeId:e.z.string()}),fn=e.z.object({universal_login_experience:e.z.enum(["new","classic"]).default("new"),identifier_first:e.z.boolean().default(!0),password_first:e.z.boolean().default(!1),webauthn_platform_first_factor:e.z.boolean()}),Sn=e.z.object({name:e.z.string(),enabled:e.z.boolean().optional().default(!0),default_from_address:e.z.string().optional(),credentials:e.z.union([e.z.object({accessKeyId:e.z.string(),secretAccessKey:e.z.string(),region:e.z.string()}),e.z.object({smtp_host:e.z.array(e.z.string()),smtp_port:e.z.number(),smtp_user:e.z.string(),smtp_pass:e.z.string()}),e.z.object({api_key:e.z.string(),domain:e.z.string().optional()}),e.z.object({connectionString:e.z.string()}),e.z.object({tenantId:e.z.string(),clientId:e.z.string(),clientSecret:e.z.string()})]),settings:e.z.object({}).optional()}),gt=e.z.object({id:e.z.string(),login_id:e.z.string(),user_id:e.z.string(),client_id:e.z.string(),expires_at:e.z.string().optional(),idle_expires_at:e.z.string().optional(),last_exchanged_at:e.z.string().optional(),device:it,resource_servers:e.z.array(e.z.object({audience:e.z.string(),scopes:e.z.string()})),rotating:e.z.boolean()}),En=e.z.object({created_at:e.z.string(),revoked_at:e.z.string().optional(),...gt.shape}),yn=e.z.object({to:e.z.string(),message:e.z.string()}),An=e.z.object({name:e.z.string(),options:e.z.object({})}),mt=e.z.object({value:e.z.string(),description:e.z.string().optional()}),ut=e.z.object({token_dialect:e.z.enum(["access_token","access_token_authz"]).optional(),enforce_policies:e.z.boolean().optional(),allow_skipping_userinfo:e.z.boolean().optional(),skip_userinfo:e.z.boolean().optional(),persist_client_authorization:e.z.boolean().optional(),enable_introspection_endpoint:e.z.boolean().optional(),mtls:e.z.object({bound_access_tokens:e.z.boolean().optional()}).optional()}),ht=e.z.object({id:e.z.string().optional(),name:e.z.string(),identifier:e.z.string(),scopes:e.z.array(mt).optional(),signing_alg:e.z.string().optional(),signing_secret:e.z.string().optional(),token_lifetime:e.z.number().default(86400),token_lifetime_for_web:e.z.number().default(7200),skip_consent_for_verifiable_first_party_clients:e.z.boolean().optional(),allow_offline_access:e.z.boolean().optional(),verificationKey:e.z.string().optional(),options:ut.optional(),is_system:e.z.boolean().optional(),metadata:e.z.record(e.z.any()).optional()}),bt=e.z.object({...ht.shape,created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),In=e.z.array(bt),ft=e.z.object({role_id:e.z.string(),resource_server_identifier:e.z.string(),permission_name:e.z.string()}),St=e.z.object({...ft.shape,created_at:e.z.string()}),Cn=e.z.array(St),Et=e.z.object({user_id:e.z.string(),resource_server_identifier:e.z.string(),permission_name:e.z.string(),organization_id:e.z.string().optional()}),yt=e.z.object({...Et.shape,tenant_id:e.z.string(),created_at:e.z.string().optional()}),Tn=e.z.array(yt),At=e.z.object({user_id:e.z.string(),resource_server_identifier:e.z.string(),resource_server_name:e.z.string(),permission_name:e.z.string(),description:e.z.string().nullable().optional(),created_at:e.z.string().optional(),organization_id:e.z.string().optional()}),On=e.z.array(At),It=e.z.object({user_id:e.z.string(),role_id:e.z.string(),organization_id:e.z.string().optional()}),Ct=e.z.object({...It.shape,tenant_id:e.z.string(),created_at:e.z.string().optional()}),Nn=e.z.array(Ct),Tt=e.z.object({id:e.z.string().optional().openapi({description:"The unique identifier of the role. If not provided, one will be generated."}),name:e.z.string().min(1).max(50).openapi({description:"The name of the role. Cannot include '<' or '>'"}),description:e.z.string().max(255).optional().openapi({description:"The description of the role"}),is_system:e.z.boolean().optional(),metadata:e.z.record(e.z.any()).optional().openapi({description:"Metadata associated with the role. Can be used to control sync behavior in multi-tenancy scenarios."})}),Ot=Tt.extend({id:e.z.string().openapi({description:"The unique identifier of the role"}),created_at:e.z.string().optional(),updated_at:e.z.string().optional()}),wn=e.z.array(Ot),Nt=e.z.object({logo_url:e.z.string().optional().openapi({description:"URL of the organization's logo"}),colors:e.z.object({primary:e.z.string().optional().openapi({description:"Primary color in hex format (e.g., #FF0000)"}),page_background:e.z.string().optional().openapi({description:"Page background color in hex format (e.g., #FFFFFF)"})}).optional()}).optional(),wt=e.z.object({connection_id:e.z.string().openapi({description:"ID of the connection"}),assign_membership_on_login:e.z.boolean().default(!1).openapi({description:"Whether to assign membership to the organization on login"}),show_as_button:e.z.boolean().default(!0).openapi({description:"Whether to show this connection as a button in the login screen"}),is_signup_enabled:e.z.boolean().default(!0).openapi({description:"Whether signup is enabled for this connection"})}),Rt=e.z.object({client_credentials:e.z.object({enforce:e.z.boolean().default(!1).openapi({description:"Whether to enforce token quota limits"}),per_day:e.z.number().min(0).default(0).openapi({description:"Maximum tokens per day (0 = unlimited)"}),per_hour:e.z.number().min(0).default(0).openapi({description:"Maximum tokens per hour (0 = unlimited)"})}).optional()}).optional(),jt=e.z.object({id:e.z.string().optional(),name:e.z.string().min(1).regex(/^[a-z0-9_-]+$/,{message:"Organization name must be lowercase and can only contain letters, numbers, hyphens, and underscores"}).openapi({description:"The name of the organization. Must be lowercase and can only contain letters, numbers, hyphens, and underscores."}),display_name:e.z.string().optional().openapi({description:"The display name of the organization"}),branding:Nt,metadata:e.z.record(e.z.any()).default({}).optional().openapi({description:"Custom metadata for the organization"}),enabled_connections:e.z.array(wt).default([]).optional().openapi({description:"List of enabled connections for the organization"}),token_quota:Rt}),Rn=e.z.object({...jt.shape,...s.shape,id:e.z.string(),name:e.z.string().min(1).openapi({description:"The name of the organization"})}),vt=e.z.object({user_id:e.z.string().openapi({description:"ID of the user"}),organization_id:e.z.string().openapi({description:"ID of the organization"})}),jn=e.z.object({...vt.shape,...s.shape,id:e.z.string()}),vn=e.z.object({idle_session_lifetime:e.z.number().default(72),session_lifetime:e.z.number().default(168),session_cookie:e.z.object({mode:e.z.enum(["persistent","non-persistent"]).optional()}).optional(),enable_client_connections:e.z.boolean().optional(),default_redirection_uri:e.z.string().optional(),enabled_locales:e.z.array(e.z.string()).optional(),default_directory:e.z.string().optional(),error_page:e.z.object({html:e.z.string().optional(),show_log_link:e.z.boolean().optional(),url:e.z.string().optional()}).optional(),flags:e.z.object({allow_legacy_delegation_grant_types:e.z.boolean().optional(),allow_legacy_ro_grant_types:e.z.boolean().optional(),allow_legacy_tokeninfo_endpoint:e.z.boolean().optional(),disable_clickjack_protection_headers:e.z.boolean().optional(),enable_apis_section:e.z.boolean().optional(),enable_client_connections:e.z.boolean().optional(),enable_custom_domain_in_emails:e.z.boolean().optional(),enable_dynamic_client_registration:e.z.boolean().optional(),enable_idtoken_api2:e.z.boolean().optional(),enable_legacy_logs_search_v2:e.z.boolean().optional(),enable_legacy_profile:e.z.boolean().optional(),enable_pipeline2:e.z.boolean().optional(),enable_public_signup_user_exists_error:e.z.boolean().optional(),use_scope_descriptions_for_consent:e.z.boolean().optional(),disable_management_api_sms_obfuscation:e.z.boolean().optional(),enable_adfs_waad_email_verification:e.z.boolean().optional(),revoke_refresh_token_grant:e.z.boolean().optional(),dashboard_log_streams_next:e.z.boolean().optional(),dashboard_insights_view:e.z.boolean().optional(),disable_fields_map_fix:e.z.boolean().optional(),mfa_show_factor_list_on_enrollment:e.z.boolean().optional()}).optional(),friendly_name:e.z.string().optional(),picture_url:e.z.string().optional(),support_email:e.z.string().optional(),support_url:e.z.string().optional(),sandbox_version:e.z.string().optional(),sandbox_versions_available:e.z.array(e.z.string()).optional(),change_password:e.z.object({enabled:e.z.boolean(),html:e.z.string()}).optional(),guardian_mfa_page:e.z.object({enabled:e.z.boolean(),html:e.z.string()}).optional(),default_audience:e.z.string().optional(),default_organization:e.z.string().optional(),sessions:e.z.object({oidc_logout_prompt_enabled:e.z.boolean().optional()}).optional(),mfa:e.z.object({policy:e.z.enum(["never","always"]).default("never").optional(),factors:e.z.object({sms:e.z.boolean().default(!1),otp:e.z.boolean().default(!1),email:e.z.boolean().default(!1),push_notification:e.z.boolean().default(!1),webauthn_roaming:e.z.boolean().default(!1),webauthn_platform:e.z.boolean().default(!1),recovery_code:e.z.boolean().default(!1),duo:e.z.boolean().default(!1)}).optional(),sms_provider:e.z.object({provider:e.z.enum(["twilio","vonage","aws_sns","phone_message_hook"]).optional()}).optional(),twilio:e.z.object({sid:e.z.string().optional(),auth_token:e.z.string().optional(),from:e.z.string().optional(),messaging_service_sid:e.z.string().optional()}).optional(),phone_message:e.z.object({message:e.z.string().optional()}).optional()}).optional()}),kn=e.z.object({date:e.z.string().openapi({description:"Date these events occurred in ISO 8601 format",example:"2025-12-19"}),logins:e.z.number().openapi({description:"Number of logins on this date",example:150}),signups:e.z.number().openapi({description:"Number of signups on this date",example:25}),leaked_passwords:e.z.number().openapi({description:"Number of breached-password detections on this date (subscription required)",example:0}),updated_at:e.z.string().openapi({description:"Date and time this stats entry was last updated in ISO 8601 format",example:"2025-12-19T10:30:00.000Z"}),created_at:e.z.string().openapi({description:"Approximate date and time the first event occurred in ISO 8601 format",example:"2025-12-19T00:00:00.000Z"})}),Ln=e.z.number().openapi({description:"Number of active users in the last 30 days",example:1234}),kt=e.z.enum(["login","login-id","login-password","signup","signup-id","signup-password","reset-password","consent","mfa","mfa-push","mfa-otp","mfa-voice","mfa-phone","mfa-webauthn","mfa-email","mfa-recovery-code","status","device-flow","email-verification","email-otp-challenge","organizations","invitation","common","passkeys","captcha","custom-form","login-passwordless","mfa-login-options"]),Lt=e.z.record(e.z.string(),e.z.record(e.z.string(),e.z.string())).openapi({type:"object",additionalProperties:{type:"object",additionalProperties:{type:"string"}}}),Dn=e.z.object({prompt:kt,language:e.z.string(),custom_text:Lt}),Un={EMAIL:"email",SMS:"sms",USERNAME_PASSWORD:"Username-Password-Authentication",GOOGLE_OAUTH2:"google-oauth2",APPLE:"apple",FACEBOOK:"facebook",GITHUB:"github",MICROSOFT:"microsoft",VIPPS:"vipps",OIDC:"oidc",OAUTH2:"oauth2",SAMLP:"samlp",WAAD:"waad",ADFS:"adfs"},Fn={DATABASE:"database",SOCIAL:"social",PASSWORDLESS:"passwordless"},Dt=e.z.enum(["phone","totp","email","push","webauthn-roaming","webauthn-platform","passkey"]),Ut=e.z.object({user_id:e.z.string(),type:Dt,phone_number:e.z.string().optional(),totp_secret:e.z.string().optional(),credential_id:e.z.string().optional(),public_key:e.z.string().optional(),sign_count:e.z.number().int().nonnegative().optional(),credential_backed_up:e.z.boolean().optional(),transports:e.z.array(e.z.string()).optional(),friendly_name:e.z.string().optional(),confirmed:e.z.boolean().default(!1)});function Ft(t,o){t.type==="phone"&&!t.phone_number&&o.addIssue({code:e.z.ZodIssueCode.custom,message:"phone_number is required when type is 'phone'",path:["phone_number"]}),t.type==="totp"&&!t.totp_secret&&o.addIssue({code:e.z.ZodIssueCode.custom,message:"totp_secret is required when type is 'totp'",path:["totp_secret"]}),["webauthn-roaming","webauthn-platform","passkey"].includes(t.type)&&(t.credential_id||o.addIssue({code:e.z.ZodIssueCode.custom,message:`credential_id is required when type is '${t.type}'`,path:["credential_id"]}),t.public_key||o.addIssue({code:e.z.ZodIssueCode.custom,message:`public_key is required when type is '${t.type}'`,path:["public_key"]}))}const xn=Ut.superRefine(Ft),Pn=e.z.object({...Ut.shape,id:e.z.string(),created_at:e.z.string(),updated_at:e.z.string()}).superRefine(Ft);function Mn(t){const[o,i]=t.split("|");if(!o||!i)throw new Error(`Invalid user_id: ${t}`);return{connection:o,id:i}}function Hn(t){const{primary:o,secondaries:i,syncMethods:U=["create","rawCreate","update","remove","delete","set"]}=t,f={get(p,a){if(typeof a=="symbol")return p[a];const d=p[a];return typeof d!="function"?d:U.includes(a)?async(...g)=>{const S=await d.apply(p,g),m=[];for(const r of i){const u=r.adapter[a];if(typeof u!="function")continue;const E=(async()=>{try{await u.apply(r.adapter,g)}catch(h){try{r.onError?r.onError(h,a,g):console.error(`Passthrough adapter: secondary write failed for ${a}:`,h)}catch(y){console.error(`Passthrough adapter: onError handler threw for ${a}:`,y)}}})();r.blocking&&m.push(E)}return m.length>0&&await Promise.all(m),S}:d.bind(p)}};return new Proxy(o,f)}function Gn(t){return t}function Bn(t){var f,p,a,d,g,S,m,r,u,E,h,y;const o=t==null?void 0:t.options;if(!o)return{usernameIdentifierActive:!1,emailIdentifierActive:!0,usernameMinLength:1,usernameMaxLength:15};const i=o.attributes;if(i){const xt=((p=(f=i.username)==null?void 0:f.identifier)==null?void 0:p.active)===!0,Pt=((d=(a=i.email)==null?void 0:a.identifier)==null?void 0:d.active)!==!1,Mt=((S=(g=i.username)==null?void 0:g.validation)==null?void 0:S.min_length)??1,Ht=((r=(m=i.username)==null?void 0:m.validation)==null?void 0:r.max_length)??15;return{usernameIdentifierActive:xt,emailIdentifierActive:Pt,usernameMinLength:Mt,usernameMaxLength:Ht}}return{usernameIdentifierActive:o.requires_username===!0,emailIdentifierActive:!0,usernameMinLength:((E=(u=o.validation)==null?void 0:u.username)==null?void 0:E.min)??1,usernameMaxLength:((y=(h=o.validation)==null?void 0:h.username)==null?void 0:y.max)??15}}function Wn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}exports.Auth0ActionEnum=qt;exports.Auth0Client=et;exports.AuthorizationResponseMode=w;exports.AuthorizationResponseType=N;exports.CodeChallengeMethod=R;exports.ComponentCategory=O;exports.ComponentType=T;exports.EmailActionEnum=Vt;exports.FORM_FIELD_TYPES=xo;exports.FlowActionTypeEnum=Kt;exports.GrantType=rt;exports.LocationInfo=tt;exports.LogTypes=Je;exports.LoginSessionState=D;exports.NodeType=he;exports.RedirectTargetEnum=Z;exports.Strategy=Un;exports.StrategyType=Fn;exports.actionDependencySchema=x;exports.actionInsertSchema=I;exports.actionNodeSchema=Se;exports.actionSchema=Bt;exports.actionSecretSchema=P;exports.actionTriggerSchema=F;exports.actionUpdateSchema=Gt;exports.activeUsersResponseSchema=Ln;exports.actorSchema=H;exports.addressSchema=ne;exports.auditCategorySchema=M;exports.auditEventInsertSchema=V;exports.auditEventSchema=Wt;exports.auth0ClientSchema=q;exports.auth0FlowInsertSchema=io;exports.auth0FlowSchema=Ce;exports.auth0QuerySchema=Yt;exports.auth0UpdateUserActionSchema=Y;exports.auth0UserResponseSchema=Zt;exports.authParamsSchema=Te;exports.authenticationMethodInsertSchema=xn;exports.authenticationMethodSchema=Pn;exports.authenticationMethodTypeSchema=Dt;exports.baseUserSchema=C;exports.blockComponentSchema=Le;exports.bordersSchema=lt;exports.brandingSchema=ao;exports.buttonComponentSchema=_e;exports.clientGrantInsertSchema=re;exports.clientGrantListSchema=oo;exports.clientGrantSchema=le;exports.clientInsertSchema=se;exports.clientRegistrationTokenInsertSchema=pe;exports.clientRegistrationTokenSchema=no;exports.clientRegistrationTokenTypeSchema=ce;exports.clientSchema=to;exports.codeInsertSchema=Ne;exports.codeSchema=so;exports.codeTypeSchema=Oe;exports.colorsSchema=ct;exports.componentMessageSchema=Pe;exports.componentSchema=ue;exports.connectionInsertSchema=Re;exports.connectionOptionsSchema=we;exports.connectionSchema=ro;exports.coordinatesSchema=z;exports.createPassthroughAdapter=Hn;exports.createWriteOnlyAdapter=Gn;exports.customDomainInsertSchema=je;exports.customDomainSchema=ke;exports.customDomainWithTenantIdSchema=lo;exports.customTextEntrySchema=Dn;exports.customTextSchema=Lt;exports.dailyStatsSchema=kn;exports.emailProviderSchema=Sn;exports.emailVerificationRulesSchema=X;exports.emailVerifyActionSchema=Q;exports.endingSchema=Ie;exports.fieldComponentSchema=Ue;exports.flowActionStepSchema=J;exports.flowInsertSchema=ee;exports.flowSchema=Xt;exports.flowsFieldComponentSchema=ge;exports.flowsFlowNodeSchema=fe;exports.flowsStepNodeSchema=be;exports.fontDetailsSchema=_;exports.fontsSchema=pt;exports.formControlSchema=Po;exports.formInsertSchema=xe;exports.formNodeComponentDefinition=k;exports.formNodeSchema=Fe;exports.formSchema=Bo;exports.genericComponentSchema=me;exports.genericNodeSchema=Ee;exports.getConnectionIdentifierConfig=Bn;exports.hookCodeInsertSchema=Ke;exports.hookCodeSchema=sn;exports.hookInsertSchema=Jo;exports.hookSchema=an;exports.hookTemplateId=L;exports.hookTemplates=Xo;exports.identitySchema=oe;exports.inviteInsertSchema=Xe;exports.inviteSchema=rn;exports.inviteeSchema=Ve;exports.inviterSchema=qe;exports.isBlockComponent=Ko;exports.isFieldComponent=Vo;exports.isPlainObject=Wn;exports.isWidgetComponent=qo;exports.jwksKeySchema=ln;exports.jwksSchema=Ye;exports.legalComponentSchema=ze;exports.locationInfoSchema=K;exports.logInsertSchema=ot;exports.logSchema=_n;exports.loginSessionAuthStrategySchema=Ze;exports.loginSessionInsertSchema=$e;exports.loginSessionSchema=pn;exports.loginSessionStateSchema=Qe;exports.nodeSchema=ye;exports.openIDConfigurationSchema=cn;exports.organizationBrandingSchema=Nt;exports.organizationEnabledConnectionSchema=wt;exports.organizationInsertSchema=jt;exports.organizationSchema=Rn;exports.organizationTokenQuotaSchema=Rt;exports.pageBackgroundSchema=dt;exports.parseUserId=Mn;exports.passwordInsertSchema=nt;exports.passwordSchema=zn;exports.profileDataSchema=te;exports.promptScreenSchema=kt;exports.promptSettingSchema=fn;exports.redirectActionSchema=$;exports.refreshTokenInsertSchema=gt;exports.refreshTokenSchema=En;exports.requestContextSchema=B;exports.resourceServerInsertSchema=ht;exports.resourceServerListSchema=In;exports.resourceServerOptionsSchema=ut;exports.resourceServerSchema=bt;exports.resourceServerScopeSchema=mt;exports.responseContextSchema=W;exports.richTextComponentSchema=de;exports.roleInsertSchema=Tt;exports.roleListSchema=wn;exports.rolePermissionInsertSchema=ft;exports.rolePermissionListSchema=Cn;exports.rolePermissionSchema=St;exports.roleSchema=Ot;exports.screenLinkSchema=Me;exports.sessionInsertSchema=at;exports.sessionSchema=gn;exports.signingKeySchema=mn;exports.smsProviderSchema=An;exports.smsSendParamsSchema=yn;exports.startSchema=Ae;exports.targetSchema=G;exports.tenantInsertSchema=st;exports.tenantSchema=un;exports.tenantSettingsSchema=vn;exports.themeInsertSchema=zt;exports.themeSchema=bn;exports.tokenResponseSchema=hn;exports.totalsSchema=Qt;exports.uiScreenSchema=Wo;exports.userInsertSchema=ie;exports.userOrganizationInsertSchema=vt;exports.userOrganizationSchema=jn;exports.userPermissionInsertSchema=Et;exports.userPermissionListSchema=Tn;exports.userPermissionSchema=yt;exports.userPermissionWithDetailsListSchema=On;exports.userPermissionWithDetailsSchema=At;exports.userResponseSchema=$t;exports.userRoleInsertSchema=It;exports.userRoleListSchema=Nn;exports.userRoleSchema=Ct;exports.userSchema=ae;exports.verificationMethodsSchema=ve;exports.widgetComponentSchema=De;exports.widgetSchema=_t;
@@ -3098,6 +3098,10 @@ export declare const clientInsertSchema: z.ZodObject<{
3098
3098
  "iat_dcr"
3099
3099
  ]>>;
3100
3100
  registration_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
3101
+ user_linking_mode: z.ZodOptional<z.ZodEnum<[
3102
+ "builtin",
3103
+ "off"
3104
+ ]>>;
3101
3105
  }, "strip", z.ZodTypeAny, {
3102
3106
  name: string;
3103
3107
  client_id: string;
@@ -3150,6 +3154,7 @@ export declare const clientInsertSchema: z.ZodObject<{
3150
3154
  owner_user_id?: string | undefined;
3151
3155
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
3152
3156
  registration_metadata?: Record<string, any> | undefined;
3157
+ user_linking_mode?: "builtin" | "off" | undefined;
3153
3158
  }, {
3154
3159
  name: string;
3155
3160
  client_id: string;
@@ -3202,6 +3207,7 @@ export declare const clientInsertSchema: z.ZodObject<{
3202
3207
  owner_user_id?: string | undefined;
3203
3208
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
3204
3209
  registration_metadata?: Record<string, any> | undefined;
3210
+ user_linking_mode?: "builtin" | "off" | undefined;
3205
3211
  }>;
3206
3212
  export type ClientInsert = z.input<typeof clientInsertSchema>;
3207
3213
  export declare const clientSchema: z.ZodObject<{
@@ -3304,6 +3310,10 @@ export declare const clientSchema: z.ZodObject<{
3304
3310
  "iat_dcr"
3305
3311
  ]>>;
3306
3312
  registration_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
3313
+ user_linking_mode: z.ZodOptional<z.ZodEnum<[
3314
+ "builtin",
3315
+ "off"
3316
+ ]>>;
3307
3317
  created_at: z.ZodString;
3308
3318
  updated_at: z.ZodString;
3309
3319
  }, "strip", z.ZodTypeAny, {
@@ -3360,6 +3370,7 @@ export declare const clientSchema: z.ZodObject<{
3360
3370
  owner_user_id?: string | undefined;
3361
3371
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
3362
3372
  registration_metadata?: Record<string, any> | undefined;
3373
+ user_linking_mode?: "builtin" | "off" | undefined;
3363
3374
  }, {
3364
3375
  created_at: string;
3365
3376
  updated_at: string;
@@ -3414,6 +3425,7 @@ export declare const clientSchema: z.ZodObject<{
3414
3425
  owner_user_id?: string | undefined;
3415
3426
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
3416
3427
  registration_metadata?: Record<string, any> | undefined;
3428
+ user_linking_mode?: "builtin" | "off" | undefined;
3417
3429
  }>;
3418
3430
  export type Client = z.infer<typeof clientSchema>;
3419
3431
  export declare const clientGrantInsertSchema: z.ZodObject<{
@@ -42341,17 +42353,20 @@ export declare function isWidgetComponent(component: FormNodeComponent): compone
42341
42353
  export declare function isFieldComponent(component: FormNodeComponent): component is FieldComponent$1;
42342
42354
  export declare const hookTemplateId: z.ZodEnum<[
42343
42355
  "ensure-username",
42344
- "set-preferred-username"
42356
+ "set-preferred-username",
42357
+ "account-linking"
42345
42358
  ]>;
42346
42359
  export type HookTemplateId = z.infer<typeof hookTemplateId>;
42347
42360
  /**
42348
42361
  * Registry of available hook templates.
42349
- * Maps template IDs to their metadata and allowed triggers.
42362
+ * Maps template IDs to their metadata and allowed triggers. Some templates
42363
+ * (e.g. `account-linking`) can bind to more than one trigger; in that case
42364
+ * `trigger_ids` lists every trigger the template supports.
42350
42365
  */
42351
42366
  export declare const hookTemplates: Record<HookTemplateId, {
42352
42367
  name: string;
42353
42368
  description: string;
42354
- trigger_id: string;
42369
+ trigger_ids: string[];
42355
42370
  }>;
42356
42371
  export declare const hookInsertSchema: z.ZodUnion<[
42357
42372
  z.ZodObject<{
@@ -42359,6 +42374,7 @@ export declare const hookInsertSchema: z.ZodUnion<[
42359
42374
  "pre-user-registration",
42360
42375
  "post-user-registration",
42361
42376
  "post-user-login",
42377
+ "post-user-update",
42362
42378
  "validate-registration-username",
42363
42379
  "pre-user-deletion",
42364
42380
  "post-user-deletion"
@@ -42371,13 +42387,13 @@ export declare const hookInsertSchema: z.ZodUnion<[
42371
42387
  }, "strip", z.ZodTypeAny, {
42372
42388
  url: string;
42373
42389
  enabled: boolean;
42374
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42390
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42375
42391
  synchronous: boolean;
42376
42392
  priority?: number | undefined;
42377
42393
  hook_id?: string | undefined;
42378
42394
  }, {
42379
42395
  url: string;
42380
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42396
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42381
42397
  enabled?: boolean | undefined;
42382
42398
  synchronous?: boolean | undefined;
42383
42399
  priority?: number | undefined;
@@ -42415,11 +42431,14 @@ export declare const hookInsertSchema: z.ZodUnion<[
42415
42431
  z.ZodObject<{
42416
42432
  trigger_id: z.ZodEnum<[
42417
42433
  "post-user-login",
42434
+ "post-user-registration",
42435
+ "post-user-update",
42418
42436
  "credentials-exchange"
42419
42437
  ]>;
42420
42438
  template_id: z.ZodEnum<[
42421
42439
  "ensure-username",
42422
- "set-preferred-username"
42440
+ "set-preferred-username",
42441
+ "account-linking"
42423
42442
  ]>;
42424
42443
  enabled: z.ZodDefault<z.ZodBoolean>;
42425
42444
  synchronous: z.ZodDefault<z.ZodBoolean>;
@@ -42427,14 +42446,14 @@ export declare const hookInsertSchema: z.ZodUnion<[
42427
42446
  hook_id: z.ZodOptional<z.ZodString>;
42428
42447
  }, "strip", z.ZodTypeAny, {
42429
42448
  enabled: boolean;
42430
- trigger_id: "post-user-login" | "credentials-exchange";
42449
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
42431
42450
  synchronous: boolean;
42432
- template_id: "ensure-username" | "set-preferred-username";
42451
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
42433
42452
  priority?: number | undefined;
42434
42453
  hook_id?: string | undefined;
42435
42454
  }, {
42436
- trigger_id: "post-user-login" | "credentials-exchange";
42437
- template_id: "ensure-username" | "set-preferred-username";
42455
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
42456
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
42438
42457
  enabled?: boolean | undefined;
42439
42458
  synchronous?: boolean | undefined;
42440
42459
  priority?: number | undefined;
@@ -42479,6 +42498,7 @@ export declare const hookSchema: z.ZodUnion<[
42479
42498
  "pre-user-registration",
42480
42499
  "post-user-registration",
42481
42500
  "post-user-login",
42501
+ "post-user-update",
42482
42502
  "validate-registration-username",
42483
42503
  "pre-user-deletion",
42484
42504
  "post-user-deletion"
@@ -42491,7 +42511,7 @@ export declare const hookSchema: z.ZodUnion<[
42491
42511
  updated_at: string;
42492
42512
  url: string;
42493
42513
  enabled: boolean;
42494
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42514
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42495
42515
  synchronous: boolean;
42496
42516
  hook_id: string;
42497
42517
  priority?: number | undefined;
@@ -42499,7 +42519,7 @@ export declare const hookSchema: z.ZodUnion<[
42499
42519
  created_at: string;
42500
42520
  updated_at: string;
42501
42521
  url: string;
42502
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42522
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42503
42523
  hook_id: string;
42504
42524
  enabled?: boolean | undefined;
42505
42525
  synchronous?: boolean | undefined;
@@ -42544,12 +42564,15 @@ export declare const hookSchema: z.ZodUnion<[
42544
42564
  hook_id: z.ZodString;
42545
42565
  template_id: z.ZodEnum<[
42546
42566
  "ensure-username",
42547
- "set-preferred-username"
42567
+ "set-preferred-username",
42568
+ "account-linking"
42548
42569
  ]>;
42549
42570
  created_at: z.ZodString;
42550
42571
  updated_at: z.ZodString;
42551
42572
  trigger_id: z.ZodEnum<[
42552
42573
  "post-user-login",
42574
+ "post-user-registration",
42575
+ "post-user-update",
42553
42576
  "credentials-exchange"
42554
42577
  ]>;
42555
42578
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -42559,17 +42582,17 @@ export declare const hookSchema: z.ZodUnion<[
42559
42582
  created_at: string;
42560
42583
  updated_at: string;
42561
42584
  enabled: boolean;
42562
- trigger_id: "post-user-login" | "credentials-exchange";
42585
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
42563
42586
  synchronous: boolean;
42564
42587
  hook_id: string;
42565
- template_id: "ensure-username" | "set-preferred-username";
42588
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
42566
42589
  priority?: number | undefined;
42567
42590
  }, {
42568
42591
  created_at: string;
42569
42592
  updated_at: string;
42570
- trigger_id: "post-user-login" | "credentials-exchange";
42593
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
42571
42594
  hook_id: string;
42572
- template_id: "ensure-username" | "set-preferred-username";
42595
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
42573
42596
  enabled?: boolean | undefined;
42574
42597
  synchronous?: boolean | undefined;
42575
42598
  priority?: number | undefined;
@@ -484,6 +484,9 @@ const Ee = e.object({
484
484
  }),
485
485
  registration_metadata: e.record(e.any()).default({}).optional().openapi({
486
486
  description: "Arbitrary metadata captured at Dynamic Client Registration time that isn't a first-class client field (e.g. integration_type, domain). Also stores `iat_constraints` for clients created via IAT so RFC 7592 PUT can enforce field immutability."
487
+ }),
488
+ user_linking_mode: e.enum(["builtin", "off"]).optional().openapi({
489
+ description: "Per-client override for the built-in email-based user-linking path. `builtin` runs the legacy in-process linking at user creation/email update. `off` disables the legacy path; linking only happens if the tenant has enabled the `account-linking` template hook. When unset, the service-level `userLinkingMode` default applies."
487
490
  })
488
491
  }), Wo = e.object({
489
492
  created_at: e.string(),
@@ -514,17 +517,17 @@ const Ee = e.object({
514
517
  authorization_details_types: e.array(e.string()).optional().openapi({
515
518
  description: "Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement."
516
519
  })
517
- }), Ae = e.object({
520
+ }), ye = e.object({
518
521
  id: e.string().openapi({
519
522
  description: "ID of the client grant."
520
523
  }),
521
524
  ...Se.shape,
522
525
  created_at: e.string().optional(),
523
526
  updated_at: e.string().optional()
524
- }), Ko = e.array(Ae), ye = e.enum(["iat", "rat"]), Ie = e.object({
527
+ }), Ko = e.array(ye), Ae = e.enum(["iat", "rat"]), Ie = e.object({
525
528
  id: e.string(),
526
529
  token_hash: e.string(),
527
- type: ye,
530
+ type: Ae,
528
531
  client_id: e.string().optional(),
529
532
  sub: e.string().optional(),
530
533
  constraints: e.record(e.unknown()).optional(),
@@ -1223,7 +1226,7 @@ const Me = e.object({
1223
1226
  placeholder: e.string().optional(),
1224
1227
  default_value: e.string().optional()
1225
1228
  }).optional()
1226
- }), At = e.discriminatedUnion("type", [
1229
+ }), yt = e.discriminatedUnion("type", [
1227
1230
  Xe,
1228
1231
  Ve,
1229
1232
  Ye,
@@ -1232,7 +1235,7 @@ const Me = e.object({
1232
1235
  $e,
1233
1236
  Je,
1234
1237
  et
1235
- ]), yt = e.discriminatedUnion("type", [
1238
+ ]), At = e.discriminatedUnion("type", [
1236
1239
  tt,
1237
1240
  ot,
1238
1241
  nt
@@ -1255,8 +1258,8 @@ const Me = e.object({
1255
1258
  ft,
1256
1259
  St
1257
1260
  ]), k = e.union([
1258
- At,
1259
1261
  yt,
1262
+ At,
1260
1263
  It
1261
1264
  ]), Zo = /* @__PURE__ */ new Set([
1262
1265
  "BOOLEAN",
@@ -1396,6 +1399,7 @@ const U = e.enum([
1396
1399
  "pre-user-registration",
1397
1400
  "post-user-registration",
1398
1401
  "post-user-login",
1402
+ "post-user-update",
1399
1403
  "validate-registration-username",
1400
1404
  "pre-user-deletion",
1401
1405
  "post-user-deletion"
@@ -1409,6 +1413,8 @@ const U = e.enum([
1409
1413
  "post-user-deletion"
1410
1414
  ]), x = e.enum([
1411
1415
  "post-user-login",
1416
+ "post-user-registration",
1417
+ "post-user-update",
1412
1418
  "credentials-exchange"
1413
1419
  ]), P = e.enum([
1414
1420
  "post-user-login",
@@ -1417,17 +1423,27 @@ const U = e.enum([
1417
1423
  "post-user-registration"
1418
1424
  ]), M = e.enum([
1419
1425
  "ensure-username",
1420
- "set-preferred-username"
1426
+ "set-preferred-username",
1427
+ "account-linking"
1421
1428
  ]), an = {
1422
1429
  "ensure-username": {
1423
1430
  name: "Ensure Username",
1424
1431
  description: "Automatically assigns a username to users who sign in without one. Creates a linked username account for social/email users.",
1425
- trigger_id: "post-user-login"
1432
+ trigger_ids: ["post-user-login"]
1426
1433
  },
1427
1434
  "set-preferred-username": {
1428
1435
  name: "Set Preferred Username",
1429
1436
  description: "Sets the preferred_username claim on tokens based on the username from the primary or linked user.",
1430
- trigger_id: "credentials-exchange"
1437
+ trigger_ids: ["credentials-exchange"]
1438
+ },
1439
+ "account-linking": {
1440
+ name: "Account Linking",
1441
+ description: "Links a user to an existing primary account with the same verified email. Idempotent — safe to run on every login, registration, and email update.",
1442
+ trigger_ids: [
1443
+ "post-user-login",
1444
+ "post-user-registration",
1445
+ "post-user-update"
1446
+ ]
1431
1447
  }
1432
1448
  }, c = {
1433
1449
  enabled: e.boolean().default(!1),
@@ -2132,7 +2148,7 @@ const oo = e.object({
2132
2148
  identifier_first: e.boolean().default(!0),
2133
2149
  password_first: e.boolean().default(!1),
2134
2150
  webauthn_platform_first_factor: e.boolean()
2135
- }), An = e.object({
2151
+ }), yn = e.object({
2136
2152
  name: e.string(),
2137
2153
  enabled: e.boolean().optional().default(!0),
2138
2154
  default_from_address: e.string().optional(),
@@ -2183,7 +2199,7 @@ const oo = e.object({
2183
2199
  })
2184
2200
  ),
2185
2201
  rotating: e.boolean()
2186
- }), yn = e.object({
2202
+ }), An = e.object({
2187
2203
  // When the refresh token record was created.
2188
2204
  created_at: e.string(),
2189
2205
  // When the token was explicitly revoked (null = still active).
@@ -2262,7 +2278,7 @@ const oo = e.object({
2262
2278
  ...Eo.shape,
2263
2279
  tenant_id: e.string(),
2264
2280
  created_at: e.string().optional()
2265
- }), jn = e.array(So), Ao = e.object({
2281
+ }), jn = e.array(So), yo = e.object({
2266
2282
  id: e.string().optional().openapi({
2267
2283
  description: "The unique identifier of the role. If not provided, one will be generated."
2268
2284
  }),
@@ -2276,13 +2292,13 @@ const oo = e.object({
2276
2292
  metadata: e.record(e.any()).optional().openapi({
2277
2293
  description: "Metadata associated with the role. Can be used to control sync behavior in multi-tenancy scenarios."
2278
2294
  })
2279
- }), yo = Ao.extend({
2295
+ }), Ao = yo.extend({
2280
2296
  id: e.string().openapi({
2281
2297
  description: "The unique identifier of the role"
2282
2298
  }),
2283
2299
  created_at: e.string().optional(),
2284
2300
  updated_at: e.string().optional()
2285
- }), Rn = e.array(yo), Io = e.object({
2301
+ }), Rn = e.array(Ao), Io = e.object({
2286
2302
  logo_url: e.string().optional().openapi({
2287
2303
  description: "URL of the organization's logo"
2288
2304
  }),
@@ -2614,7 +2630,7 @@ function Bn(t) {
2614
2630
  const h = r.adapter[a];
2615
2631
  if (typeof h != "function")
2616
2632
  continue;
2617
- const A = (async () => {
2633
+ const y = (async () => {
2618
2634
  try {
2619
2635
  await h.apply(r.adapter, d);
2620
2636
  } catch (b) {
@@ -2623,15 +2639,15 @@ function Bn(t) {
2623
2639
  `Passthrough adapter: secondary write failed for ${a}:`,
2624
2640
  b
2625
2641
  );
2626
- } catch (y) {
2642
+ } catch (A) {
2627
2643
  console.error(
2628
2644
  `Passthrough adapter: onError handler threw for ${a}:`,
2629
- y
2645
+ A
2630
2646
  );
2631
2647
  }
2632
2648
  }
2633
2649
  })();
2634
- r.blocking && g.push(A);
2650
+ r.blocking && g.push(y);
2635
2651
  }
2636
2652
  return g.length > 0 && await Promise.all(g), S;
2637
2653
  } : _.bind(p);
@@ -2643,7 +2659,7 @@ function Wn(t) {
2643
2659
  return t;
2644
2660
  }
2645
2661
  function Kn(t) {
2646
- var E, p, a, _, d, S, g, r, h, A, b, y;
2662
+ var E, p, a, _, d, S, g, r, h, y, b, A;
2647
2663
  const o = t == null ? void 0 : t.options;
2648
2664
  if (!o)
2649
2665
  return {
@@ -2665,8 +2681,8 @@ function Kn(t) {
2665
2681
  return {
2666
2682
  usernameIdentifierActive: o.requires_username === !0,
2667
2683
  emailIdentifierActive: !0,
2668
- usernameMinLength: ((A = (h = o.validation) == null ? void 0 : h.username) == null ? void 0 : A.min) ?? 1,
2669
- usernameMaxLength: ((y = (b = o.validation) == null ? void 0 : b.username) == null ? void 0 : y.max) ?? 15
2684
+ usernameMinLength: ((y = (h = o.validation) == null ? void 0 : h.username) == null ? void 0 : y.min) ?? 1,
2685
+ usernameMaxLength: ((A = (b = o.validation) == null ? void 0 : b.username) == null ? void 0 : A.max) ?? 15
2670
2686
  };
2671
2687
  }
2672
2688
  function zn(t) {
@@ -2715,17 +2731,17 @@ export {
2715
2731
  Hn as authenticationMethodSchema,
2716
2732
  Ro as authenticationMethodTypeSchema,
2717
2733
  w as baseUserSchema,
2718
- At as blockComponentSchema,
2734
+ yt as blockComponentSchema,
2719
2735
  oo as bordersSchema,
2720
2736
  Xo as brandingSchema,
2721
2737
  Te as buttonComponentSchema,
2722
2738
  Se as clientGrantInsertSchema,
2723
2739
  Ko as clientGrantListSchema,
2724
- Ae as clientGrantSchema,
2740
+ ye as clientGrantSchema,
2725
2741
  Ee as clientInsertSchema,
2726
2742
  Ie as clientRegistrationTokenInsertSchema,
2727
2743
  zo as clientRegistrationTokenSchema,
2728
- ye as clientRegistrationTokenTypeSchema,
2744
+ Ae as clientRegistrationTokenTypeSchema,
2729
2745
  Wo as clientSchema,
2730
2746
  Ge as codeInsertSchema,
2731
2747
  Vo as codeSchema,
@@ -2745,7 +2761,7 @@ export {
2745
2761
  Fn as customTextEntrySchema,
2746
2762
  jo as customTextSchema,
2747
2763
  kn as dailyStatsSchema,
2748
- An as emailProviderSchema,
2764
+ yn as emailProviderSchema,
2749
2765
  ae as emailVerificationRulesSchema,
2750
2766
  re as emailVerifyActionSchema,
2751
2767
  xe as endingSchema,
@@ -2807,7 +2823,7 @@ export {
2807
2823
  Sn as promptSettingSchema,
2808
2824
  ce as redirectActionSchema,
2809
2825
  lo as refreshTokenInsertSchema,
2810
- yn as refreshTokenSchema,
2826
+ An as refreshTokenSchema,
2811
2827
  ee as requestContextSchema,
2812
2828
  _o as resourceServerInsertSchema,
2813
2829
  Tn as resourceServerListSchema,
@@ -2816,12 +2832,12 @@ export {
2816
2832
  co as resourceServerScopeSchema,
2817
2833
  te as responseContextSchema,
2818
2834
  Ce as richTextComponentSchema,
2819
- Ao as roleInsertSchema,
2835
+ yo as roleInsertSchema,
2820
2836
  Rn as roleListSchema,
2821
2837
  uo as rolePermissionInsertSchema,
2822
2838
  On as rolePermissionListSchema,
2823
2839
  mo as rolePermissionSchema,
2824
- yo as roleSchema,
2840
+ Ao as roleSchema,
2825
2841
  Rt as screenLinkSchema,
2826
2842
  Jt as sessionInsertSchema,
2827
2843
  mn as sessionSchema,
@@ -2852,6 +2868,6 @@ export {
2852
2868
  So as userRoleSchema,
2853
2869
  he as userSchema,
2854
2870
  ze as verificationMethodsSchema,
2855
- yt as widgetComponentSchema,
2871
+ At as widgetComponentSchema,
2856
2872
  so as widgetSchema
2857
2873
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "1.10.0",
14
+ "version": "1.10.1",
15
15
  "files": [
16
16
  "dist"
17
17
  ],