import { AppKitError } from "./base.js";

//#region src/errors/authentication.d.ts

/**
 * Error thrown when authentication fails.
 * Use for missing tokens, invalid credentials, or authorization failures.
 *
 * @example
 * ```typescript
 * throw new AuthenticationError("User token is required");
 * throw new AuthenticationError("Failed to generate credentials", { cause: originalError });
 * ```
 */
declare class AuthenticationError extends AppKitError {
  readonly code = "AUTHENTICATION_ERROR";
  readonly statusCode = 401;
  readonly isRetryable = false;
  /**
   * Create an authentication error for missing token
   */
  static missingToken(tokenType?: string): AuthenticationError;
  /**
   * Create an authentication error for missing user identity
   */
  static missingUserId(): AuthenticationError;
  /**
   * Create an authentication error for credential generation failure
   */
  static credentialsFailed(instance: string, cause?: Error): AuthenticationError;
  /**
   * Create an authentication error for failed user lookup
   */
  static userLookupFailed(cause?: Error): AuthenticationError;
}
//#endregion
export { AuthenticationError };
//# sourceMappingURL=authentication.d.ts.map