@authhero/adapter-interfaces 0.59.0 → 0.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@hono/zod-openapi"),B=t.z.object({start:t.z.number(),limit:t.z.number(),length:t.z.number()}),c=t.z.object({created_at:t.z.string(),updated_at:t.z.string()}),p=t.z.object({email:t.z.string().optional(),email_verified:t.z.boolean().optional(),name:t.z.string().optional(),username:t.z.string().optional(),given_name:t.z.string().optional(),phone_number:t.z.string().optional(),phone_verified:t.z.boolean().optional(),family_name:t.z.string().optional()}).catchall(t.z.any()),z=t.z.object({connection:t.z.string(),user_id:t.z.string(),provider:t.z.string(),isSocial:t.z.boolean(),access_token:t.z.string().optional(),access_token_secret:t.z.string().optional(),refresh_token:t.z.string().optional(),profileData:p.optional()}),s=t.z.object({email:t.z.string().optional(),username:t.z.string().optional(),phone_number:t.z.string().optional(),given_name:t.z.string().optional(),family_name:t.z.string().optional(),nickname:t.z.string().optional(),name:t.z.string().optional(),picture:t.z.string().optional(),locale:t.z.string().optional(),linked_to:t.z.string().optional(),profileData:t.z.string().optional(),user_id:t.z.string().optional(),app_metadata:t.z.any().default({}).optional(),user_metadata:t.z.any().default({}).optional()}),d=s.extend({email_verified:t.z.boolean().default(!1),verify_email:t.z.boolean().optional(),last_ip:t.z.string().optional(),last_login:t.z.string().optional(),user_id:t.z.string().optional(),provider:t.z.string().default("email"),connection:t.z.string().default("email"),is_social:t.z.boolean().optional()}),g=t.z.object({...d.shape,...c.shape,user_id:t.z.string(),is_social:t.z.boolean(),email:t.z.string().optional(),login_count:t.z.number(),identities:t.z.array(z).optional()}),W=g,q=s.extend({email:t.z.string(),login_count:t.z.number(),multifactor:t.z.array(t.z.string()).optional(),last_ip:t.z.string().optional(),last_login:t.z.string().optional(),user_id:t.z.string()}).catchall(t.z.any()),Q="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let V=(e=21)=>{let i="",o=crypto.getRandomValues(new Uint8Array(e));for(;e--;)i+=Q[o[e]&63];return i};const _=t.z.object({audience:t.z.string().optional(),recipient:t.z.string().optional(),createUpnClaim:t.z.boolean().optional(),mapUnknownClaimsAsIs:t.z.boolean().optional(),passthroughClaimsWithNoMapping:t.z.boolean().optional(),mapIdentities:t.z.boolean().optional(),signatureAlgorithm:t.z.string().optional(),digestAlgorithm:t.z.string().optional(),issuer:t.z.string().optional(),destination:t.z.string().optional(),lifetimeInSeconds:t.z.number().optional(),signResponse:t.z.boolean().optional(),nameIdentifierFormat:t.z.string().optional(),nameIdentifierProbes:t.z.array(t.z.string()).optional(),authnContextClassRef:t.z.string().optional(),mappings:t.z.record(t.z.string()).optional()}),m=t.z.object({id:t.z.string(),name:t.z.string(),callbacks:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs whitelisted to use as a callback to the client after authentication."}),allowed_origins:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level. Query strings and hash information are not taken into account when validating these URLs."}),web_origins:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode."}),allowed_logout_urls:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains."}),allowed_clients:t.z.array(t.z.string()).default([]).optional().openapi({description:"Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients"}),addons:t.z.object({samlp:_.optional()}).default({}).optional().openapi({description:"Addons associated with the client. The key is the addon's package name and the value is an object with the configuration for the addon."}),email_validation:t.z.enum(["enabled","disabled","enforced"]).default("enforced").optional().openapi({description:"Defines if it possible to sign in with an unverified email and if verification emails will be sent. This is not available in auth0"}),client_secret:t.z.string().default(()=>V()).optional(),disable_sign_ups:t.z.boolean().optional().default(!1).openapi({description:"Prevents users from signing up using the hosted login page. This is not available in auth0"})}),u=t.z.object({created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e),...m.shape});var a=(e=>(e.TOKEN="token",e.TOKEN_ID_TOKEN="token id_token",e.CODE="code",e))(a||{}),r=(e=>(e.QUERY="query",e.FRAGMENT="fragment",e.FORM_POST="form_post",e.WEB_MESSAGE="web_message",e.SAML_POST="saml_post",e))(r||{}),l=(e=>(e.S256="S256",e.Plain="plain",e))(l||{});const h=t.z.object({client_id:t.z.string(),act_as:t.z.string().optional(),response_type:t.z.nativeEnum(a).optional(),response_mode:t.z.nativeEnum(r).optional(),redirect_uri:t.z.string().optional(),audience:t.z.string().optional(),organization:t.z.string().optional(),state:t.z.string().optional(),nonce:t.z.string().optional(),scope:t.z.string().optional(),prompt:t.z.string().optional(),code_challenge_method:t.z.nativeEnum(l).optional(),code_challenge:t.z.string().optional(),username:t.z.string().optional(),ui_locales:t.z.string().optional(),vendor_id:t.z.string().optional()}),Y=t.z.object({colors:t.z.object({primary:t.z.string(),page_background:t.z.object({type:t.z.string().optional(),start:t.z.string().optional(),end:t.z.string().optional(),angle_deg:t.z.number().optional()}).optional()}).optional(),logo_url:t.z.string().optional(),favicon_url:t.z.string().optional(),font:t.z.object({url:t.z.string()}).optional()}),b=t.z.object({kid:t.z.string().optional(),team_id:t.z.string().optional(),realms:t.z.string().optional(),client_id:t.z.string().optional(),client_secret:t.z.string().optional(),app_secret:t.z.string().optional(),scope:t.z.string().optional(),authorization_endpoint:t.z.string().optional(),token_endpoint:t.z.string().optional(),userinfo_endpoint:t.z.string().optional(),jwks_uri:t.z.string().optional(),discovery_url:t.z.string().optional(),issuer:t.z.string().optional(),provider:t.z.string().optional(),from:t.z.string().optional(),twilio_sid:t.z.string().optional(),twilio_token:t.z.string().optional()}),S=t.z.object({id:t.z.string().optional(),name:t.z.string(),strategy:t.z.string(),options:b.default({}),enabled_clients:t.z.array(t.z.string()).default([]).optional(),response_type:t.z.custom().optional(),response_mode:t.z.custom().optional()}),f=t.z.object({id:t.z.string(),created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e)}).extend(S.shape),y=t.z.object({name:t.z.string(),audience:t.z.string(),sender_email:t.z.string().email(),sender_name:t.z.string(),support_url:t.z.string().url().optional(),logo:t.z.string().url().optional(),primary_color:t.z.string().optional(),secondary_color:t.z.string().optional(),language:t.z.string().optional(),id:t.z.string().optional()}),I=t.z.object({created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e),...y.shape,id:t.z.string()}),X=t.z.object({logoUrl:t.z.string(),loginBackgroundImage:t.z.string().nullish(),style:t.z.object({primaryColor:t.z.string(),buttonTextColor:t.z.string(),primaryHoverColor:t.z.string()}),supportEmail:t.z.string().nullable(),supportUrl:t.z.string().nullable(),name:t.z.string(),showGreyishBackground:t.z.boolean().optional(),termsAndConditionsUrl:t.z.string().nullable(),companyName:t.z.string().optional(),checkoutHideSocial:t.z.boolean().optional(),siteUrl:t.z.string().nullable(),manageSubscriptionsUrl:t.z.string().optional()});t.z.object({...u.shape,tenant:I,connections:t.z.array(f)});const k=t.z.enum(["password_reset","email_verification","otp","authorization_code","oauth2_state","ticket"]),w=t.z.object({code_id:t.z.string().openapi({description:"The code that will be used in for instance an email verification flow"}),login_id:t.z.string().openapi({description:"The id of the login session that the code is connected to"}),connection_id:t.z.string().optional().openapi({description:"The connection that the code is connected to"}),code_type:k,code_verifier:t.z.string().optional().openapi({description:"The code verifier used in PKCE in outbound flows"}),expires_at:t.z.string(),used_at:t.z.string().optional(),user_id:t.z.string().optional()}),J=t.z.object({...w.shape,created_at:t.z.string()}),E=t.z.object({domain:t.z.string(),custom_domain_id:t.z.string().optional(),type:t.z.enum(["auth0_managed_certs","self_managed_certs"]),verification_method:t.z.enum(["txt"]).optional(),tls_policy:t.z.enum(["recommended"]).optional(),custom_client_ip_header:t.z.enum(["true-client-ip","cf-connecting-ip","x-forwarded-for","x-azure-clientip","null"]).optional(),domain_metadata:t.z.record(t.z.string().max(255)).optional()}),C=t.z.object({name:t.z.literal("txt"),record:t.z.string(),domain:t.z.string()}),j=t.z.object({...E.shape,custom_domain_id:t.z.string(),primary:t.z.boolean(),status:t.z.enum(["disabled","pending","pending_verification","ready"]),origin_domain_name:t.z.string().optional(),verification:t.z.object({methods:t.z.array(C)}).optional(),tls_policy:t.z.string().optional()}),Z=j.extend({tenant_id:t.z.string()}),v=t.z.object({trigger_id:t.z.enum(["pre-user-signup","post-user-registration","post-user-login"]),enabled:t.z.boolean().default(!1),url:t.z.string(),hook_id:t.z.string().optional(),synchronous:t.z.boolean().default(!1),priority:t.z.number().optional()}),$=v.extend({...c.shape,hook_id:t.z.string()}),A=t.z.object({alg:t.z.enum(["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512"]),e:t.z.string(),kid:t.z.string(),kty:t.z.enum(["RSA","EC","oct"]),n:t.z.string(),x5t:t.z.string().optional(),x5c:t.z.array(t.z.string()).optional(),use:t.z.enum(["sig","enc"]).optional()}),tt=t.z.object({keys:t.z.array(A)}),et=t.z.object({issuer:t.z.string(),authorization_endpoint:t.z.string(),token_endpoint:t.z.string(),device_authorization_endpoint:t.z.string(),userinfo_endpoint:t.z.string(),mfa_challenge_endpoint:t.z.string(),jwks_uri:t.z.string(),registration_endpoint:t.z.string(),revocation_endpoint:t.z.string(),scopes_supported:t.z.array(t.z.string()),response_types_supported:t.z.array(t.z.string()),code_challenge_methods_supported:t.z.array(t.z.string()),response_modes_supported:t.z.array(t.z.string()),subject_types_supported:t.z.array(t.z.string()),id_token_signing_alg_values_supported:t.z.array(t.z.string()),token_endpoint_auth_methods_supported:t.z.array(t.z.string()),claims_supported:t.z.array(t.z.string()),request_uri_parameter_supported:t.z.boolean(),request_parameter_supported:t.z.boolean(),token_endpoint_auth_signing_alg_values_supported:t.z.array(t.z.string())}),O=t.z.object({csrf_token:t.z.string(),auth0Client:t.z.string().optional(),authParams:h,expires_at:t.z.string(),deleted_at:t.z.string().optional(),ip:t.z.string().optional(),useragent:t.z.string().optional(),session_id:t.z.string().optional(),authorization_url:t.z.string().optional()}).openapi({description:"This represents a login sesion"}),nt=t.z.object({...O.shape,id:t.z.string().openapi({description:"This is is used as the state in the universal login"}),created_at:t.z.string(),updated_at:t.z.string()});var U=(e=>(e.FAILED_SILENT_AUTH="fsa",e.FAILED_SIGNUP="fs",e.FAILED_LOGIN="f",e.FAILED_LOGIN_INCORRECT_PASSWORD="fp",e.FAILED_CHANGE_PASSWORD="fcp",e.FAILED_BY_CONNECTOR="fc",e.FAILED_LOGIN_INVALID_EMAIL_USERNAME="fu",e.FAILED_HOOK="fh",e.FAILED_CROSS_ORIGIN_AUTHENTICATION="fcoa",e.SUCCESS_API_OPERATION="sapi",e.SUCCESS_CHANGE_PASSWORD="scp",e.SUCCESS_CHANGE_PASSWORD_REQUEST="scpr",e.SUCCESS_CHANGE_USERNAME="scu",e.SUCCESS_CROSS_ORIGIN_AUTHENTICATION="scoa",e.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN="seacft",e.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN="serft",e.SUCCESS_LOGIN="s",e.SUCCESS_LOGOUT="slo",e.SUCCESS_SIGNUP="ss",e.SUCCESS_SILENT_AUTH="ssa",e.SUCCESS_VERIFICATION_EMAIL="sv",e.SUCCESS_VERIFICATION_EMAIL_REQUEST="svr",e.CODE_LINK_SENT="cls",e.BLOCKED_ACCOUNT_EMAIL="limit_wc",e.BLOCKED_ACCOUNT_IP="limit_sul",e.BLOCKED_IP_ADDRESS="limit_mu",e))(U||{});const it=t.z.enum(["cls","fsa","fs","f","fc","fcoa","fcp","fh","fp","fs","fu","s","sapi","scoa","scp","scpr","scu","seacft","serft","slo","ss","ssa","sv","svr"]),N=t.z.object({name:t.z.string(),version:t.z.string(),env:t.z.object({node:t.z.string().optional()}).optional()}),ot=t.z.object({type:it,date:t.z.string(),description:t.z.string().optional(),log_id:t.z.string().optional(),_id:t.z.string().optional(),ip:t.z.string(),user_agent:t.z.string(),details:t.z.any().optional(),isMobile:t.z.boolean(),user_id:t.z.string().optional(),user_name:t.z.string().optional(),connection:t.z.string().optional(),connection_id:t.z.string().optional(),client_id:t.z.string().optional(),client_name:t.z.string().optional(),audience:t.z.string().optional(),scope:t.z.array(t.z.string()).optional(),strategy:t.z.string().optional(),strategy_type:t.z.string().optional(),hostname:t.z.string().optional(),auth0_client:N.optional()}),R=t.z.object({user_id:t.z.string(),password:t.z.string(),algorithm:t.z.enum(["bcrypt","argon2id"]).default("argon2id")}),st=t.z.object({...R.shape,created_at:t.z.string(),updated_at:t.z.string()}),D=t.z.object({initial_user_agent:t.z.string().describe("First user agent of the device from which this user logged in"),initial_ip:t.z.string().describe("First IP address associated with this session"),initial_asn:t.z.string().describe("First autonomous system number associated with this session"),last_user_agent:t.z.string().describe("Last user agent of the device from which this user logged in"),last_ip:t.z.string().describe("Last IP address from which this user logged in"),last_asn:t.z.string().describe("Last autonomous system number from which this user logged in")}),T=t.z.object({id:t.z.string(),revoked_at:t.z.string().optional(),used_at:t.z.string().optional(),user_id:t.z.string().describe("The user ID associated with the session"),expires_at:t.z.string().optional(),idle_expires_at:t.z.string().optional(),device:D.describe("Metadata related to the device used in the session"),clients:t.z.array(t.z.string()).describe("List of client details for the session")}),at=t.z.object({created_at:t.z.string(),updated_at:t.z.string(),authenticated_at:t.z.string(),last_interaction_at:t.z.string(),...T.shape}),rt=t.z.object({kid:t.z.string().openapi({description:"The key id of the signing key"}),cert:t.z.string().openapi({description:"The public certificate of the signing key"}),fingerprint:t.z.string().openapi({description:"The cert fingerprint"}),thumbprint:t.z.string().openapi({description:"The cert thumbprint"}),pkcs7:t.z.string().optional().openapi({description:"The private key in pkcs7 format"}),current:t.z.boolean().optional().openapi({description:"True if the key is the current key"}),next:t.z.boolean().optional().openapi({description:"True if the key is the next key"}),previous:t.z.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:t.z.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:t.z.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:t.z.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:t.z.string().optional().openapi({description:"The date and time when the key was revoked"})});var x=(e=>(e.RefreshToken="refresh_token",e.AuthorizationCode="authorization_code",e.ClientCredential="client_credentials",e.Passwordless="passwordless",e.Password="password",e.OTP="http://auth0.com/oauth/grant-type/passwordless/otp",e))(x||{});const lt=t.z.object({access_token:t.z.string(),id_token:t.z.string().optional(),scope:t.z.string().optional(),state:t.z.string().optional(),refresh_token:t.z.string().optional(),token_type:t.z.string(),expires_in:t.z.number()});t.z.object({code:t.z.string(),state:t.z.string().optional()});const P=t.z.object({button_border_radius:t.z.number(),button_border_weight:t.z.number(),buttons_style:t.z.enum(["pill"]),input_border_radius:t.z.number(),input_border_weight:t.z.number(),inputs_style:t.z.enum(["pill"]),show_widget_shadow:t.z.boolean(),widget_border_weight:t.z.number(),widget_corner_radius:t.z.number()}),F=t.z.object({base_focus_color:t.z.string(),base_hover_color:t.z.string(),body_text:t.z.string(),captcha_widget_theme:t.z.enum(["auto"]),error:t.z.string(),header:t.z.string(),icons:t.z.string(),input_background:t.z.string(),input_border:t.z.string(),input_filled_text:t.z.string(),input_labels_placeholders:t.z.string(),links_focused_components:t.z.string(),primary_button:t.z.string(),primary_button_label:t.z.string(),secondary_button_border:t.z.string(),secondary_button_label:t.z.string(),success:t.z.string(),widget_background:t.z.string(),widget_border:t.z.string()}),n=t.z.object({bold:t.z.boolean(),size:t.z.number()}),H=t.z.object({body_text:n,buttons_text:n,font_url:t.z.string(),input_labels:n,links:n,links_style:t.z.enum(["normal"]),reference_text_size:t.z.number(),subtitle:n,title:n}),K=t.z.object({background_color:t.z.string(),background_image_url:t.z.string(),page_layout:t.z.enum(["center"])}),G=t.z.object({header_text_alignment:t.z.enum(["center"]),logo_height:t.z.number(),logo_position:t.z.enum(["center"]),logo_url:t.z.string(),social_buttons_layout:t.z.enum(["bottom"])}),M=t.z.object({borders:P,colors:F,displayName:t.z.string(),fonts:H,page_background:K,widget:G}),ct=M.extend({themeId:t.z.string()}),pt=t.z.object({universal_login_experience:t.z.enum(["new","classic"]).default("new"),identifier_first:t.z.boolean().default(!0),password_first:t.z.boolean().default(!1),webauthn_platform_first_factor:t.z.boolean()}),zt=t.z.object({name:t.z.string(),enabled:t.z.boolean().optional().default(!0),default_from_address:t.z.string().optional(),credentials:t.z.union([t.z.object({accessKeyId:t.z.string(),secretAccessKey:t.z.string(),region:t.z.string()}),t.z.object({smtp_host:t.z.array(t.z.string()),smtp_port:t.z.number(),smtp_user:t.z.string(),smtp_pass:t.z.string()}),t.z.object({api_key:t.z.string(),domain:t.z.string().optional()}),t.z.object({connectionString:t.z.string()}),t.z.object({tenantId:t.z.string(),clientId:t.z.string(),clientSecret:t.z.string()})]),settings:t.z.object({}).optional()}),L=t.z.object({id:t.z.string(),session_id:t.z.string(),user_id:t.z.string(),client_id:t.z.string(),expires_at:t.z.string().optional(),idle_expires_at:t.z.string().optional(),last_exchanged_at:t.z.string().optional(),device:D,resource_servers:t.z.array(t.z.object({audience:t.z.string(),scopes:t.z.string()})),rotating:t.z.boolean()}),dt=t.z.object({created_at:t.z.string(),...L.shape}),gt=t.z.object({to:t.z.string(),message:t.z.string()}),_t=t.z.object({name:t.z.string(),options:t.z.object({})});function mt(e){const[i,o]=e.split("|");if(!i||!o)throw new Error(`Invalid user_id: ${e}`);return{connection:i,id:o}}exports.Auth0Client=N;exports.AuthorizationResponseMode=r;exports.AuthorizationResponseType=a;exports.CodeChallengeMethod=l;exports.GrantType=x;exports.LogTypes=U;exports.applicationInsertSchema=m;exports.applicationSchema=u;exports.auth0UserResponseSchema=W;exports.authParamsSchema=h;exports.baseUserSchema=s;exports.bordersSchema=P;exports.brandingSchema=Y;exports.codeInsertSchema=w;exports.codeSchema=J;exports.codeTypeSchema=k;exports.colorsSchema=F;exports.connectionInsertSchema=S;exports.connectionOptionsSchema=b;exports.connectionSchema=f;exports.customDomainInsertSchema=E;exports.customDomainSchema=j;exports.customDomainWithTenantIdSchema=Z;exports.emailProviderSchema=zt;exports.fontDetailsSchema=n;exports.fontsSchema=H;exports.hookInsertSchema=v;exports.hookSchema=$;exports.identitySchema=z;exports.jwksKeySchema=tt;exports.jwksSchema=A;exports.logSchema=ot;exports.loginSessionInsertSchema=O;exports.loginSessionSchema=nt;exports.openIDConfigurationSchema=et;exports.pageBackgroundSchema=K;exports.parseUserId=mt;exports.passwordInsertSchema=R;exports.passwordSchema=st;exports.profileDataSchema=p;exports.promptSettingSchema=pt;exports.refreshTokenInsertSchema=L;exports.refreshTokenSchema=dt;exports.samlpAddon=_;exports.sessionInsertSchema=T;exports.sessionSchema=at;exports.signingKeySchema=rt;exports.smsProviderSchema=_t;exports.smsSendParamsSchema=gt;exports.tenantInsertSchema=y;exports.tenantSchema=I;exports.themeInsertSchema=M;exports.themeSchema=ct;exports.tokenResponseSchema=lt;exports.totalsSchema=B;exports.userInsertSchema=d;exports.userResponseSchema=q;exports.userSchema=g;exports.vendorSettingsSchema=X;exports.verificationMethodsSchema=C;exports.widgetSchema=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@hono/zod-openapi"),B=t.z.object({start:t.z.number(),limit:t.z.number(),length:t.z.number()}),c=t.z.object({created_at:t.z.string(),updated_at:t.z.string()}),p=t.z.object({email:t.z.string().optional(),email_verified:t.z.boolean().optional(),name:t.z.string().optional(),username:t.z.string().optional(),given_name:t.z.string().optional(),phone_number:t.z.string().optional(),phone_verified:t.z.boolean().optional(),family_name:t.z.string().optional()}).catchall(t.z.any()),z=t.z.object({connection:t.z.string(),user_id:t.z.string(),provider:t.z.string(),isSocial:t.z.boolean(),access_token:t.z.string().optional(),access_token_secret:t.z.string().optional(),refresh_token:t.z.string().optional(),profileData:p.optional()}),s=t.z.object({email:t.z.string().optional().transform(e=>e&&e.toLowerCase()),username:t.z.string().optional(),phone_number:t.z.string().optional(),given_name:t.z.string().optional(),family_name:t.z.string().optional(),nickname:t.z.string().optional(),name:t.z.string().optional(),picture:t.z.string().optional(),locale:t.z.string().optional(),linked_to:t.z.string().optional(),profileData:t.z.string().optional(),user_id:t.z.string().optional(),app_metadata:t.z.any().default({}).optional(),user_metadata:t.z.any().default({}).optional()}),d=s.extend({email_verified:t.z.boolean().default(!1),verify_email:t.z.boolean().optional(),last_ip:t.z.string().optional(),last_login:t.z.string().optional(),user_id:t.z.string().optional(),provider:t.z.string().default("email"),connection:t.z.string().default("email"),is_social:t.z.boolean().optional()}),g=t.z.object({...d.shape,...c.shape,user_id:t.z.string(),is_social:t.z.boolean(),email:t.z.string().optional(),login_count:t.z.number().default(0),identities:t.z.array(z).optional()}),W=g,q=s.extend({login_count:t.z.number(),multifactor:t.z.array(t.z.string()).optional(),last_ip:t.z.string().optional(),last_login:t.z.string().optional(),user_id:t.z.string()}).catchall(t.z.any()),Q="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let V=(e=21)=>{let i="",o=crypto.getRandomValues(new Uint8Array(e));for(;e--;)i+=Q[o[e]&63];return i};const _=t.z.object({audience:t.z.string().optional(),recipient:t.z.string().optional(),createUpnClaim:t.z.boolean().optional(),mapUnknownClaimsAsIs:t.z.boolean().optional(),passthroughClaimsWithNoMapping:t.z.boolean().optional(),mapIdentities:t.z.boolean().optional(),signatureAlgorithm:t.z.string().optional(),digestAlgorithm:t.z.string().optional(),issuer:t.z.string().optional(),destination:t.z.string().optional(),lifetimeInSeconds:t.z.number().optional(),signResponse:t.z.boolean().optional(),nameIdentifierFormat:t.z.string().optional(),nameIdentifierProbes:t.z.array(t.z.string()).optional(),authnContextClassRef:t.z.string().optional(),mappings:t.z.record(t.z.string()).optional()}),m=t.z.object({id:t.z.string(),name:t.z.string(),callbacks:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs whitelisted to use as a callback to the client after authentication."}),allowed_origins:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level. Query strings and hash information are not taken into account when validating these URLs."}),web_origins:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode."}),allowed_logout_urls:t.z.array(t.z.string()).default([]).optional().openapi({description:"Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains."}),allowed_clients:t.z.array(t.z.string()).default([]).optional().openapi({description:"Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients"}),addons:t.z.object({samlp:_.optional()}).default({}).optional().openapi({description:"Addons associated with the client. The key is the addon's package name and the value is an object with the configuration for the addon."}),email_validation:t.z.enum(["enabled","disabled","enforced"]).default("enforced").optional().openapi({description:"Defines if it possible to sign in with an unverified email and if verification emails will be sent. This is not available in auth0"}),client_secret:t.z.string().default(()=>V()).optional(),disable_sign_ups:t.z.boolean().optional().default(!1).openapi({description:"Prevents users from signing up using the hosted login page. This is not available in auth0"})}),u=t.z.object({created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e),...m.shape});var a=(e=>(e.TOKEN="token",e.TOKEN_ID_TOKEN="token id_token",e.CODE="code",e))(a||{}),r=(e=>(e.QUERY="query",e.FRAGMENT="fragment",e.FORM_POST="form_post",e.WEB_MESSAGE="web_message",e.SAML_POST="saml_post",e))(r||{}),l=(e=>(e.S256="S256",e.Plain="plain",e))(l||{});const h=t.z.object({client_id:t.z.string(),act_as:t.z.string().optional(),response_type:t.z.nativeEnum(a).optional(),response_mode:t.z.nativeEnum(r).optional(),redirect_uri:t.z.string().optional(),audience:t.z.string().optional(),organization:t.z.string().optional(),state:t.z.string().optional(),nonce:t.z.string().optional(),scope:t.z.string().optional(),prompt:t.z.string().optional(),code_challenge_method:t.z.nativeEnum(l).optional(),code_challenge:t.z.string().optional(),username:t.z.string().optional(),ui_locales:t.z.string().optional(),vendor_id:t.z.string().optional()}),Y=t.z.object({colors:t.z.object({primary:t.z.string(),page_background:t.z.object({type:t.z.string().optional(),start:t.z.string().optional(),end:t.z.string().optional(),angle_deg:t.z.number().optional()}).optional()}).optional(),logo_url:t.z.string().optional(),favicon_url:t.z.string().optional(),font:t.z.object({url:t.z.string()}).optional()}),b=t.z.object({kid:t.z.string().optional(),team_id:t.z.string().optional(),realms:t.z.string().optional(),client_id:t.z.string().optional(),client_secret:t.z.string().optional(),app_secret:t.z.string().optional(),scope:t.z.string().optional(),authorization_endpoint:t.z.string().optional(),token_endpoint:t.z.string().optional(),userinfo_endpoint:t.z.string().optional(),jwks_uri:t.z.string().optional(),discovery_url:t.z.string().optional(),issuer:t.z.string().optional(),provider:t.z.string().optional(),from:t.z.string().optional(),twilio_sid:t.z.string().optional(),twilio_token:t.z.string().optional()}),S=t.z.object({id:t.z.string().optional(),name:t.z.string(),strategy:t.z.string(),options:b.default({}),enabled_clients:t.z.array(t.z.string()).default([]).optional(),response_type:t.z.custom().optional(),response_mode:t.z.custom().optional()}),f=t.z.object({id:t.z.string(),created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e)}).extend(S.shape),y=t.z.object({name:t.z.string(),audience:t.z.string(),sender_email:t.z.string().email(),sender_name:t.z.string(),support_url:t.z.string().url().optional(),logo:t.z.string().url().optional(),primary_color:t.z.string().optional(),secondary_color:t.z.string().optional(),language:t.z.string().optional(),id:t.z.string().optional()}),I=t.z.object({created_at:t.z.string().transform(e=>e===null?"":e),updated_at:t.z.string().transform(e=>e===null?"":e),...y.shape,id:t.z.string()}),X=t.z.object({logoUrl:t.z.string(),loginBackgroundImage:t.z.string().nullish(),style:t.z.object({primaryColor:t.z.string(),buttonTextColor:t.z.string(),primaryHoverColor:t.z.string()}),supportEmail:t.z.string().nullable(),supportUrl:t.z.string().nullable(),name:t.z.string(),showGreyishBackground:t.z.boolean().optional(),termsAndConditionsUrl:t.z.string().nullable(),companyName:t.z.string().optional(),checkoutHideSocial:t.z.boolean().optional(),siteUrl:t.z.string().nullable(),manageSubscriptionsUrl:t.z.string().optional()});t.z.object({...u.shape,tenant:I,connections:t.z.array(f)});const k=t.z.enum(["password_reset","email_verification","otp","authorization_code","oauth2_state","ticket"]),w=t.z.object({code_id:t.z.string().openapi({description:"The code that will be used in for instance an email verification flow"}),login_id:t.z.string().openapi({description:"The id of the login session that the code is connected to"}),connection_id:t.z.string().optional().openapi({description:"The connection that the code is connected to"}),code_type:k,code_verifier:t.z.string().optional().openapi({description:"The code verifier used in PKCE in outbound flows"}),expires_at:t.z.string(),used_at:t.z.string().optional(),user_id:t.z.string().optional()}),J=t.z.object({...w.shape,created_at:t.z.string()}),E=t.z.object({domain:t.z.string(),custom_domain_id:t.z.string().optional(),type:t.z.enum(["auth0_managed_certs","self_managed_certs"]),verification_method:t.z.enum(["txt"]).optional(),tls_policy:t.z.enum(["recommended"]).optional(),custom_client_ip_header:t.z.enum(["true-client-ip","cf-connecting-ip","x-forwarded-for","x-azure-clientip","null"]).optional(),domain_metadata:t.z.record(t.z.string().max(255)).optional()}),C=t.z.object({name:t.z.literal("txt"),record:t.z.string(),domain:t.z.string()}),j=t.z.object({...E.shape,custom_domain_id:t.z.string(),primary:t.z.boolean(),status:t.z.enum(["disabled","pending","pending_verification","ready"]),origin_domain_name:t.z.string().optional(),verification:t.z.object({methods:t.z.array(C)}).optional(),tls_policy:t.z.string().optional()}),Z=j.extend({tenant_id:t.z.string()}),v=t.z.object({trigger_id:t.z.enum(["pre-user-signup","post-user-registration","post-user-login"]),enabled:t.z.boolean().default(!1),url:t.z.string(),hook_id:t.z.string().optional(),synchronous:t.z.boolean().default(!1),priority:t.z.number().optional()}),$=v.extend({...c.shape,hook_id:t.z.string()}),A=t.z.object({alg:t.z.enum(["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512"]),e:t.z.string(),kid:t.z.string(),kty:t.z.enum(["RSA","EC","oct"]),n:t.z.string(),x5t:t.z.string().optional(),x5c:t.z.array(t.z.string()).optional(),use:t.z.enum(["sig","enc"]).optional()}),tt=t.z.object({keys:t.z.array(A)}),et=t.z.object({issuer:t.z.string(),authorization_endpoint:t.z.string(),token_endpoint:t.z.string(),device_authorization_endpoint:t.z.string(),userinfo_endpoint:t.z.string(),mfa_challenge_endpoint:t.z.string(),jwks_uri:t.z.string(),registration_endpoint:t.z.string(),revocation_endpoint:t.z.string(),scopes_supported:t.z.array(t.z.string()),response_types_supported:t.z.array(t.z.string()),code_challenge_methods_supported:t.z.array(t.z.string()),response_modes_supported:t.z.array(t.z.string()),subject_types_supported:t.z.array(t.z.string()),id_token_signing_alg_values_supported:t.z.array(t.z.string()),token_endpoint_auth_methods_supported:t.z.array(t.z.string()),claims_supported:t.z.array(t.z.string()),request_uri_parameter_supported:t.z.boolean(),request_parameter_supported:t.z.boolean(),token_endpoint_auth_signing_alg_values_supported:t.z.array(t.z.string())}),O=t.z.object({csrf_token:t.z.string(),auth0Client:t.z.string().optional(),authParams:h,expires_at:t.z.string(),deleted_at:t.z.string().optional(),ip:t.z.string().optional(),useragent:t.z.string().optional(),session_id:t.z.string().optional(),authorization_url:t.z.string().optional()}).openapi({description:"This represents a login sesion"}),nt=t.z.object({...O.shape,id:t.z.string().openapi({description:"This is is used as the state in the universal login"}),created_at:t.z.string(),updated_at:t.z.string()});var U=(e=>(e.FAILED_SILENT_AUTH="fsa",e.FAILED_SIGNUP="fs",e.FAILED_LOGIN="f",e.FAILED_LOGIN_INCORRECT_PASSWORD="fp",e.FAILED_CHANGE_PASSWORD="fcp",e.FAILED_BY_CONNECTOR="fc",e.FAILED_LOGIN_INVALID_EMAIL_USERNAME="fu",e.FAILED_HOOK="fh",e.FAILED_CROSS_ORIGIN_AUTHENTICATION="fcoa",e.SUCCESS_API_OPERATION="sapi",e.SUCCESS_CHANGE_PASSWORD="scp",e.SUCCESS_CHANGE_PASSWORD_REQUEST="scpr",e.SUCCESS_CHANGE_USERNAME="scu",e.SUCCESS_CROSS_ORIGIN_AUTHENTICATION="scoa",e.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN="seacft",e.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN="serft",e.SUCCESS_LOGIN="s",e.SUCCESS_LOGOUT="slo",e.SUCCESS_SIGNUP="ss",e.SUCCESS_SILENT_AUTH="ssa",e.SUCCESS_VERIFICATION_EMAIL="sv",e.SUCCESS_VERIFICATION_EMAIL_REQUEST="svr",e.CODE_LINK_SENT="cls",e.BLOCKED_ACCOUNT_EMAIL="limit_wc",e.BLOCKED_ACCOUNT_IP="limit_sul",e.BLOCKED_IP_ADDRESS="limit_mu",e))(U||{});const it=t.z.enum(["cls","fsa","fs","f","fc","fcoa","fcp","fh","fp","fs","fu","s","sapi","scoa","scp","scpr","scu","seacft","serft","slo","ss","ssa","sv","svr"]),N=t.z.object({name:t.z.string(),version:t.z.string(),env:t.z.object({node:t.z.string().optional()}).optional()}),ot=t.z.object({type:it,date:t.z.string(),description:t.z.string().optional(),log_id:t.z.string().optional(),_id:t.z.string().optional(),ip:t.z.string(),user_agent:t.z.string(),details:t.z.any().optional(),isMobile:t.z.boolean(),user_id:t.z.string().optional(),user_name:t.z.string().optional(),connection:t.z.string().optional(),connection_id:t.z.string().optional(),client_id:t.z.string().optional(),client_name:t.z.string().optional(),audience:t.z.string().optional(),scope:t.z.array(t.z.string()).optional(),strategy:t.z.string().optional(),strategy_type:t.z.string().optional(),hostname:t.z.string().optional(),auth0_client:N.optional()}),R=t.z.object({user_id:t.z.string(),password:t.z.string(),algorithm:t.z.enum(["bcrypt","argon2id"]).default("argon2id")}),st=t.z.object({...R.shape,created_at:t.z.string(),updated_at:t.z.string()}),D=t.z.object({initial_user_agent:t.z.string().describe("First user agent of the device from which this user logged in"),initial_ip:t.z.string().describe("First IP address associated with this session"),initial_asn:t.z.string().describe("First autonomous system number associated with this session"),last_user_agent:t.z.string().describe("Last user agent of the device from which this user logged in"),last_ip:t.z.string().describe("Last IP address from which this user logged in"),last_asn:t.z.string().describe("Last autonomous system number from which this user logged in")}),T=t.z.object({id:t.z.string(),revoked_at:t.z.string().optional(),used_at:t.z.string().optional(),user_id:t.z.string().describe("The user ID associated with the session"),expires_at:t.z.string().optional(),idle_expires_at:t.z.string().optional(),device:D.describe("Metadata related to the device used in the session"),clients:t.z.array(t.z.string()).describe("List of client details for the session")}),at=t.z.object({created_at:t.z.string(),updated_at:t.z.string(),authenticated_at:t.z.string(),last_interaction_at:t.z.string(),...T.shape}),rt=t.z.object({kid:t.z.string().openapi({description:"The key id of the signing key"}),cert:t.z.string().openapi({description:"The public certificate of the signing key"}),fingerprint:t.z.string().openapi({description:"The cert fingerprint"}),thumbprint:t.z.string().openapi({description:"The cert thumbprint"}),pkcs7:t.z.string().optional().openapi({description:"The private key in pkcs7 format"}),current:t.z.boolean().optional().openapi({description:"True if the key is the current key"}),next:t.z.boolean().optional().openapi({description:"True if the key is the next key"}),previous:t.z.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:t.z.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:t.z.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:t.z.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:t.z.string().optional().openapi({description:"The date and time when the key was revoked"})});var x=(e=>(e.RefreshToken="refresh_token",e.AuthorizationCode="authorization_code",e.ClientCredential="client_credentials",e.Passwordless="passwordless",e.Password="password",e.OTP="http://auth0.com/oauth/grant-type/passwordless/otp",e))(x||{});const lt=t.z.object({access_token:t.z.string(),id_token:t.z.string().optional(),scope:t.z.string().optional(),state:t.z.string().optional(),refresh_token:t.z.string().optional(),token_type:t.z.string(),expires_in:t.z.number()});t.z.object({code:t.z.string(),state:t.z.string().optional()});const P=t.z.object({button_border_radius:t.z.number(),button_border_weight:t.z.number(),buttons_style:t.z.enum(["pill"]),input_border_radius:t.z.number(),input_border_weight:t.z.number(),inputs_style:t.z.enum(["pill"]),show_widget_shadow:t.z.boolean(),widget_border_weight:t.z.number(),widget_corner_radius:t.z.number()}),F=t.z.object({base_focus_color:t.z.string(),base_hover_color:t.z.string(),body_text:t.z.string(),captcha_widget_theme:t.z.enum(["auto"]),error:t.z.string(),header:t.z.string(),icons:t.z.string(),input_background:t.z.string(),input_border:t.z.string(),input_filled_text:t.z.string(),input_labels_placeholders:t.z.string(),links_focused_components:t.z.string(),primary_button:t.z.string(),primary_button_label:t.z.string(),secondary_button_border:t.z.string(),secondary_button_label:t.z.string(),success:t.z.string(),widget_background:t.z.string(),widget_border:t.z.string()}),n=t.z.object({bold:t.z.boolean(),size:t.z.number()}),H=t.z.object({body_text:n,buttons_text:n,font_url:t.z.string(),input_labels:n,links:n,links_style:t.z.enum(["normal"]),reference_text_size:t.z.number(),subtitle:n,title:n}),K=t.z.object({background_color:t.z.string(),background_image_url:t.z.string(),page_layout:t.z.enum(["center"])}),G=t.z.object({header_text_alignment:t.z.enum(["center"]),logo_height:t.z.number(),logo_position:t.z.enum(["center"]),logo_url:t.z.string(),social_buttons_layout:t.z.enum(["bottom"])}),L=t.z.object({borders:P,colors:F,displayName:t.z.string(),fonts:H,page_background:K,widget:G}),ct=L.extend({themeId:t.z.string()}),pt=t.z.object({universal_login_experience:t.z.enum(["new","classic"]).default("new"),identifier_first:t.z.boolean().default(!0),password_first:t.z.boolean().default(!1),webauthn_platform_first_factor:t.z.boolean()}),zt=t.z.object({name:t.z.string(),enabled:t.z.boolean().optional().default(!0),default_from_address:t.z.string().optional(),credentials:t.z.union([t.z.object({accessKeyId:t.z.string(),secretAccessKey:t.z.string(),region:t.z.string()}),t.z.object({smtp_host:t.z.array(t.z.string()),smtp_port:t.z.number(),smtp_user:t.z.string(),smtp_pass:t.z.string()}),t.z.object({api_key:t.z.string(),domain:t.z.string().optional()}),t.z.object({connectionString:t.z.string()}),t.z.object({tenantId:t.z.string(),clientId:t.z.string(),clientSecret:t.z.string()})]),settings:t.z.object({}).optional()}),M=t.z.object({id:t.z.string(),session_id:t.z.string(),user_id:t.z.string(),client_id:t.z.string(),expires_at:t.z.string().optional(),idle_expires_at:t.z.string().optional(),last_exchanged_at:t.z.string().optional(),device:D,resource_servers:t.z.array(t.z.object({audience:t.z.string(),scopes:t.z.string()})),rotating:t.z.boolean()}),dt=t.z.object({created_at:t.z.string(),...M.shape}),gt=t.z.object({to:t.z.string(),message:t.z.string()}),_t=t.z.object({name:t.z.string(),options:t.z.object({})});function mt(e){const[i,o]=e.split("|");if(!i||!o)throw new Error(`Invalid user_id: ${e}`);return{connection:i,id:o}}exports.Auth0Client=N;exports.AuthorizationResponseMode=r;exports.AuthorizationResponseType=a;exports.CodeChallengeMethod=l;exports.GrantType=x;exports.LogTypes=U;exports.applicationInsertSchema=m;exports.applicationSchema=u;exports.auth0UserResponseSchema=W;exports.authParamsSchema=h;exports.baseUserSchema=s;exports.bordersSchema=P;exports.brandingSchema=Y;exports.codeInsertSchema=w;exports.codeSchema=J;exports.codeTypeSchema=k;exports.colorsSchema=F;exports.connectionInsertSchema=S;exports.connectionOptionsSchema=b;exports.connectionSchema=f;exports.customDomainInsertSchema=E;exports.customDomainSchema=j;exports.customDomainWithTenantIdSchema=Z;exports.emailProviderSchema=zt;exports.fontDetailsSchema=n;exports.fontsSchema=H;exports.hookInsertSchema=v;exports.hookSchema=$;exports.identitySchema=z;exports.jwksKeySchema=tt;exports.jwksSchema=A;exports.logSchema=ot;exports.loginSessionInsertSchema=O;exports.loginSessionSchema=nt;exports.openIDConfigurationSchema=et;exports.pageBackgroundSchema=K;exports.parseUserId=mt;exports.passwordInsertSchema=R;exports.passwordSchema=st;exports.profileDataSchema=p;exports.promptSettingSchema=pt;exports.refreshTokenInsertSchema=M;exports.refreshTokenSchema=dt;exports.samlpAddon=_;exports.sessionInsertSchema=T;exports.sessionSchema=at;exports.signingKeySchema=rt;exports.smsProviderSchema=_t;exports.smsSendParamsSchema=gt;exports.tenantInsertSchema=y;exports.tenantSchema=I;exports.themeInsertSchema=L;exports.themeSchema=ct;exports.tokenResponseSchema=lt;exports.totalsSchema=B;exports.userInsertSchema=d;exports.userResponseSchema=q;exports.userSchema=g;exports.vendorSettingsSchema=X;exports.verificationMethodsSchema=C;exports.widgetSchema=G;
@@ -21,7 +21,7 @@ export interface Totals {
21
21
  length: number;
22
22
  }
23
23
  export declare const baseUserSchema: z.ZodObject<{
24
- email: z.ZodOptional<z.ZodString>;
24
+ email: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
25
25
  username: z.ZodOptional<z.ZodString>;
26
26
  phone_number: z.ZodOptional<z.ZodString>;
27
27
  given_name: z.ZodOptional<z.ZodString>;
@@ -67,8 +67,8 @@ export declare const baseUserSchema: z.ZodObject<{
67
67
  user_metadata?: any;
68
68
  }>;
69
69
  export type BaseUser = z.infer<typeof baseUserSchema>;
70
- export declare const userInsertSchema: z.ZodObject<z.objectUtil.extendShape<{
71
- email: z.ZodOptional<z.ZodString>;
70
+ export declare const userInsertSchema: z.ZodObject<{
71
+ email: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
72
72
  username: z.ZodOptional<z.ZodString>;
73
73
  phone_number: z.ZodOptional<z.ZodString>;
74
74
  given_name: z.ZodOptional<z.ZodString>;
@@ -79,10 +79,9 @@ export declare const userInsertSchema: z.ZodObject<z.objectUtil.extendShape<{
79
79
  locale: z.ZodOptional<z.ZodString>;
80
80
  linked_to: z.ZodOptional<z.ZodString>;
81
81
  profileData: z.ZodOptional<z.ZodString>;
82
- user_id: z.ZodOptional<z.ZodString>;
83
82
  app_metadata: z.ZodOptional<z.ZodDefault<z.ZodAny>>;
84
83
  user_metadata: z.ZodOptional<z.ZodDefault<z.ZodAny>>;
85
- }, {
84
+ } & {
86
85
  email_verified: z.ZodDefault<z.ZodBoolean>;
87
86
  verify_email: z.ZodOptional<z.ZodBoolean>;
88
87
  last_ip: z.ZodOptional<z.ZodString>;
@@ -91,7 +90,7 @@ export declare const userInsertSchema: z.ZodObject<z.objectUtil.extendShape<{
91
90
  provider: z.ZodDefault<z.ZodString>;
92
91
  connection: z.ZodDefault<z.ZodString>;
93
92
  is_social: z.ZodOptional<z.ZodBoolean>;
94
- }>, "strip", z.ZodTypeAny, {
93
+ }, "strip", z.ZodTypeAny, {
95
94
  email_verified: boolean;
96
95
  connection: string;
97
96
  provider: string;
@@ -141,7 +140,7 @@ export declare const userSchema: z.ZodObject<{
141
140
  user_id: z.ZodString;
142
141
  is_social: z.ZodBoolean;
143
142
  email: z.ZodOptional<z.ZodString>;
144
- login_count: z.ZodNumber;
143
+ login_count: z.ZodDefault<z.ZodNumber>;
145
144
  identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
146
145
  connection: z.ZodString;
147
146
  user_id: z.ZodString;
@@ -284,7 +283,6 @@ export declare const userSchema: z.ZodObject<{
284
283
  updated_at: string;
285
284
  user_id: string;
286
285
  is_social: boolean;
287
- login_count: number;
288
286
  email?: string | undefined;
289
287
  email_verified?: boolean | undefined;
290
288
  name?: string | undefined;
@@ -304,6 +302,7 @@ export declare const userSchema: z.ZodObject<{
304
302
  verify_email?: boolean | undefined;
305
303
  last_ip?: string | undefined;
306
304
  last_login?: string | undefined;
305
+ login_count?: number | undefined;
307
306
  identities?: {
308
307
  connection: string;
309
308
  user_id: string;
@@ -329,7 +328,7 @@ export declare const auth0UserResponseSchema: z.ZodObject<{
329
328
  user_id: z.ZodString;
330
329
  is_social: z.ZodBoolean;
331
330
  email: z.ZodOptional<z.ZodString>;
332
- login_count: z.ZodNumber;
331
+ login_count: z.ZodDefault<z.ZodNumber>;
333
332
  identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
334
333
  connection: z.ZodString;
335
334
  user_id: z.ZodString;
@@ -472,7 +471,6 @@ export declare const auth0UserResponseSchema: z.ZodObject<{
472
471
  updated_at: string;
473
472
  user_id: string;
474
473
  is_social: boolean;
475
- login_count: number;
476
474
  email?: string | undefined;
477
475
  email_verified?: boolean | undefined;
478
476
  name?: string | undefined;
@@ -492,6 +490,7 @@ export declare const auth0UserResponseSchema: z.ZodObject<{
492
490
  verify_email?: boolean | undefined;
493
491
  last_ip?: string | undefined;
494
492
  last_login?: string | undefined;
493
+ login_count?: number | undefined;
495
494
  identities?: {
496
495
  connection: string;
497
496
  user_id: string;
@@ -519,8 +518,8 @@ export interface PostUsersBody extends BaseUser {
519
518
  connection?: string;
520
519
  email_verified?: boolean;
521
520
  }
522
- export declare const userResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
523
- email: z.ZodOptional<z.ZodString>;
521
+ export declare const userResponseSchema: z.ZodObject<{
522
+ email: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
524
523
  username: z.ZodOptional<z.ZodString>;
525
524
  phone_number: z.ZodOptional<z.ZodString>;
526
525
  given_name: z.ZodOptional<z.ZodString>;
@@ -531,18 +530,16 @@ export declare const userResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
531
530
  locale: z.ZodOptional<z.ZodString>;
532
531
  linked_to: z.ZodOptional<z.ZodString>;
533
532
  profileData: z.ZodOptional<z.ZodString>;
534
- user_id: z.ZodOptional<z.ZodString>;
535
533
  app_metadata: z.ZodOptional<z.ZodDefault<z.ZodAny>>;
536
534
  user_metadata: z.ZodOptional<z.ZodDefault<z.ZodAny>>;
537
- }, {
538
- email: z.ZodString;
535
+ } & {
539
536
  login_count: z.ZodNumber;
540
537
  multifactor: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
541
538
  last_ip: z.ZodOptional<z.ZodString>;
542
539
  last_login: z.ZodOptional<z.ZodString>;
543
540
  user_id: z.ZodString;
544
- }>, "strip", z.ZodAny, z.objectOutputType<z.objectUtil.extendShape<{
545
- email: z.ZodOptional<z.ZodString>;
541
+ }, "strip", z.ZodAny, z.objectOutputType<{
542
+ email: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
546
543
  username: z.ZodOptional<z.ZodString>;
547
544
  phone_number: z.ZodOptional<z.ZodString>;
548
545
  given_name: z.ZodOptional<z.ZodString>;
@@ -553,18 +550,16 @@ export declare const userResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
553
550
  locale: z.ZodOptional<z.ZodString>;
554
551
  linked_to: z.ZodOptional<z.ZodString>;
555
552
  profileData: z.ZodOptional<z.ZodString>;
556
- user_id: z.ZodOptional<z.ZodString>;
557
553
  app_metadata: z.ZodOptional<z.ZodDefault<z.ZodAny>>;
558
554
  user_metadata: z.ZodOptional<z.ZodDefault<z.ZodAny>>;
559
- }, {
560
- email: z.ZodString;
555
+ } & {
561
556
  login_count: z.ZodNumber;
562
557
  multifactor: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
563
558
  last_ip: z.ZodOptional<z.ZodString>;
564
559
  last_login: z.ZodOptional<z.ZodString>;
565
560
  user_id: z.ZodString;
566
- }>, z.ZodAny, "strip">, z.objectInputType<z.objectUtil.extendShape<{
567
- email: z.ZodOptional<z.ZodString>;
561
+ }, z.ZodAny, "strip">, z.objectInputType<{
562
+ email: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
568
563
  username: z.ZodOptional<z.ZodString>;
569
564
  phone_number: z.ZodOptional<z.ZodString>;
570
565
  given_name: z.ZodOptional<z.ZodString>;
@@ -575,17 +570,15 @@ export declare const userResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
575
570
  locale: z.ZodOptional<z.ZodString>;
576
571
  linked_to: z.ZodOptional<z.ZodString>;
577
572
  profileData: z.ZodOptional<z.ZodString>;
578
- user_id: z.ZodOptional<z.ZodString>;
579
573
  app_metadata: z.ZodOptional<z.ZodDefault<z.ZodAny>>;
580
574
  user_metadata: z.ZodOptional<z.ZodDefault<z.ZodAny>>;
581
- }, {
582
- email: z.ZodString;
575
+ } & {
583
576
  login_count: z.ZodNumber;
584
577
  multifactor: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
585
578
  last_ip: z.ZodOptional<z.ZodString>;
586
579
  last_login: z.ZodOptional<z.ZodString>;
587
580
  user_id: z.ZodString;
588
- }>, z.ZodAny, "strip">>;
581
+ }, z.ZodAny, "strip">>;
589
582
  export type UserResponse = z.infer<typeof userResponseSchema>;
590
583
  export declare const samlpAddon: z.ZodObject<{
591
584
  audience: z.ZodOptional<z.ZodString>;
@@ -1174,11 +1167,10 @@ declare const ClientSchema: z.ZodObject<{
1174
1167
  secondary_color?: string | undefined;
1175
1168
  language?: string | undefined;
1176
1169
  }>;
1177
- connections: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
1178
- id: z.ZodString;
1170
+ connections: z.ZodArray<z.ZodObject<{
1179
1171
  created_at: z.ZodEffects<z.ZodString, string, string>;
1180
1172
  updated_at: z.ZodEffects<z.ZodString, string, string>;
1181
- }, {
1173
+ } & {
1182
1174
  id: z.ZodOptional<z.ZodString>;
1183
1175
  name: z.ZodString;
1184
1176
  strategy: z.ZodString;
@@ -1240,7 +1232,7 @@ declare const ClientSchema: z.ZodObject<{
1240
1232
  enabled_clients: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
1241
1233
  response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
1242
1234
  response_mode: z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>;
1243
- }>, "strip", z.ZodTypeAny, {
1235
+ }, "strip", z.ZodTypeAny, {
1244
1236
  options: {
1245
1237
  provider?: string | undefined;
1246
1238
  issuer?: string | undefined;
@@ -1814,11 +1806,10 @@ export declare const connectionInsertSchema: z.ZodObject<{
1814
1806
  enabled_clients?: string[] | undefined;
1815
1807
  }>;
1816
1808
  export type ConnectionInsert = z.infer<typeof connectionInsertSchema>;
1817
- export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1818
- id: z.ZodString;
1809
+ export declare const connectionSchema: z.ZodObject<{
1819
1810
  created_at: z.ZodEffects<z.ZodString, string, string>;
1820
1811
  updated_at: z.ZodEffects<z.ZodString, string, string>;
1821
- }, {
1812
+ } & {
1822
1813
  id: z.ZodOptional<z.ZodString>;
1823
1814
  name: z.ZodString;
1824
1815
  strategy: z.ZodString;
@@ -1880,7 +1871,7 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1880
1871
  enabled_clients: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
1881
1872
  response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
1882
1873
  response_mode: z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>;
1883
- }>, "strip", z.ZodTypeAny, {
1874
+ }, "strip", z.ZodTypeAny, {
1884
1875
  options: {
1885
1876
  provider?: string | undefined;
1886
1877
  issuer?: string | undefined;
@@ -2083,7 +2074,7 @@ export declare const customDomainSchema: z.ZodObject<{
2083
2074
  } | undefined;
2084
2075
  }>;
2085
2076
  export type CustomDomain = z.infer<typeof customDomainSchema>;
2086
- export declare const customDomainWithTenantIdSchema: z.ZodObject<z.objectUtil.extendShape<{
2077
+ export declare const customDomainWithTenantIdSchema: z.ZodObject<{
2087
2078
  custom_domain_id: z.ZodString;
2088
2079
  primary: z.ZodBoolean;
2089
2080
  status: z.ZodEnum<[
@@ -2137,9 +2128,9 @@ export declare const customDomainWithTenantIdSchema: z.ZodObject<z.objectUtil.ex
2137
2128
  "null"
2138
2129
  ]>>;
2139
2130
  domain_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2140
- }, {
2131
+ } & {
2141
2132
  tenant_id: z.ZodString;
2142
- }>, "strip", z.ZodTypeAny, {
2133
+ }, "strip", z.ZodTypeAny, {
2143
2134
  type: "auth0_managed_certs" | "self_managed_certs";
2144
2135
  status: "disabled" | "pending" | "pending_verification" | "ready";
2145
2136
  primary: boolean;
@@ -2206,7 +2197,7 @@ export declare const hookInsertSchema: z.ZodObject<{
2206
2197
  priority?: number | undefined;
2207
2198
  }>;
2208
2199
  export type HookInsert = z.infer<typeof hookInsertSchema>;
2209
- export declare const hookSchema: z.ZodObject<z.objectUtil.extendShape<{
2200
+ export declare const hookSchema: z.ZodObject<{
2210
2201
  trigger_id: z.ZodEnum<[
2211
2202
  "pre-user-signup",
2212
2203
  "post-user-registration",
@@ -2214,14 +2205,13 @@ export declare const hookSchema: z.ZodObject<z.objectUtil.extendShape<{
2214
2205
  ]>;
2215
2206
  enabled: z.ZodDefault<z.ZodBoolean>;
2216
2207
  url: z.ZodString;
2217
- hook_id: z.ZodOptional<z.ZodString>;
2218
2208
  synchronous: z.ZodDefault<z.ZodBoolean>;
2219
2209
  priority: z.ZodOptional<z.ZodNumber>;
2220
- }, {
2210
+ } & {
2221
2211
  hook_id: z.ZodString;
2222
2212
  created_at: z.ZodString;
2223
2213
  updated_at: z.ZodString;
2224
- }>, "strip", z.ZodTypeAny, {
2214
+ }, "strip", z.ZodTypeAny, {
2225
2215
  created_at: string;
2226
2216
  updated_at: string;
2227
2217
  enabled: boolean;
@@ -4071,7 +4061,7 @@ export declare const themeInsertSchema: z.ZodObject<{
4071
4061
  };
4072
4062
  }>;
4073
4063
  export type ThemeInsert = z.infer<typeof themeInsertSchema>;
4074
- export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
4064
+ export declare const themeSchema: z.ZodObject<{
4075
4065
  borders: z.ZodObject<{
4076
4066
  button_border_radius: z.ZodNumber;
4077
4067
  button_border_weight: z.ZodNumber;
@@ -4334,9 +4324,9 @@ export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
4334
4324
  logo_position: "center";
4335
4325
  social_buttons_layout: "bottom";
4336
4326
  }>;
4337
- }, {
4327
+ } & {
4338
4328
  themeId: z.ZodString;
4339
- }>, "strip", z.ZodTypeAny, {
4329
+ }, "strip", z.ZodTypeAny, {
4340
4330
  page_background: {
4341
4331
  background_color: string;
4342
4332
  background_image_url: string;
@@ -25,7 +25,7 @@ const V = t.object({
25
25
  refresh_token: t.string().optional(),
26
26
  profileData: d.optional()
27
27
  }), a = t.object({
28
- email: t.string().optional(),
28
+ email: t.string().optional().transform((n) => n && n.toLowerCase()),
29
29
  username: t.string().optional(),
30
30
  phone_number: t.string().optional(),
31
31
  given_name: t.string().optional(),
@@ -53,12 +53,10 @@ const V = t.object({
53
53
  ...s.shape,
54
54
  user_id: t.string(),
55
55
  is_social: t.boolean(),
56
- // TODO: this not might be correct if you use the username
57
56
  email: t.string().optional(),
58
- login_count: t.number(),
57
+ login_count: t.number().default(0),
59
58
  identities: t.array(g).optional()
60
59
  }), Y = u, X = a.extend({
61
- email: t.string(),
62
60
  login_count: t.number(),
63
61
  multifactor: t.array(t.string()).optional(),
64
62
  last_ip: t.string().optional(),
@@ -157,7 +155,7 @@ const y = t.object({
157
155
  font: t.object({
158
156
  url: t.string()
159
157
  }).optional()
160
- }), E = t.object({
158
+ }), w = t.object({
161
159
  kid: t.string().optional(),
162
160
  team_id: t.string().optional(),
163
161
  realms: t.string().optional(),
@@ -175,11 +173,11 @@ const y = t.object({
175
173
  from: t.string().optional(),
176
174
  twilio_sid: t.string().optional(),
177
175
  twilio_token: t.string().optional()
178
- }), w = t.object({
176
+ }), E = t.object({
179
177
  id: t.string().optional(),
180
178
  name: t.string(),
181
179
  strategy: t.string(),
182
- options: E.default({}),
180
+ options: w.default({}),
183
181
  enabled_clients: t.array(t.string()).default([]).optional(),
184
182
  response_type: t.custom().optional(),
185
183
  response_mode: t.custom().optional()
@@ -187,7 +185,7 @@ const y = t.object({
187
185
  id: t.string(),
188
186
  created_at: t.string().transform((n) => n === null ? "" : n),
189
187
  updated_at: t.string().transform((n) => n === null ? "" : n)
190
- }).extend(w.shape), C = t.object({
188
+ }).extend(E.shape), C = t.object({
191
189
  name: t.string(),
192
190
  audience: t.string(),
193
191
  sender_email: t.string().email(),
@@ -658,8 +656,8 @@ export {
658
656
  $ as codeSchema,
659
657
  j as codeTypeSchema,
660
658
  L as colorsSchema,
661
- w as connectionInsertSchema,
662
- E as connectionOptionsSchema,
659
+ E as connectionInsertSchema,
660
+ w as connectionOptionsSchema,
663
661
  k as connectionSchema,
664
662
  A as customDomainInsertSchema,
665
663
  N as customDomainSchema,
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "0.59.0",
14
+ "version": "0.60.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],