import { z } from 'zod'; declare const autoLoginSchema: z.ZodObject<{ /** * The URL of the NATS server to connect to. */ natsUrl: z.ZodString; /** * The username to use when connecting to the NATS server. */ username: z.ZodString; /** * The password to use when connecting to the NATS server. */ password: z.ZodString; }, "strip", z.ZodTypeAny, { natsUrl: string; username: string; password: string; }, { natsUrl: string; username: string; password: string; }>; /** * Attempt to auto-login using credentials stored in sessionStorage. * * The credentials will automatically be cleared if they are invalid, the * session ends, or {@link logout} is called. * * Credentials are automatically stored updated by {@link login} and * {@link logout}. * * @returns true if auto-login was successful, false otherwise */ export declare function attemptAutoLogin(): Promise; /** * Sets credentials with which to auto-login. * * If an auto-login attempt fails, the credentials will be cleared for the remainder of the session and a login form * shown to the user. If the user logs in successfully, the credentials will be updated. * * ### Security Warning * * Use this function only if user authentication is handled by a separate system. Calling this function in * your application means your NATS credentials will be hard-coded into your application, which is a security risk. * * @param credentials - The credentials to store * @deprecated No, this won't be removed anytime soon. You can ignore this warning if you're aware of the security * implications. */ export declare function setAutoLoginCredentials(credentials: z.input): void; /** * @internal * Clear auto-login credentials from sessionStorage. */ export declare function clearAutoLogin(): void; export {};