@banata-auth/shared

v0.1.1

Published

Shared types, schemas, constants, and utilities for the Banata Auth ecosystem

Readme

@banata-auth/shared

Shared types, schemas, constants, and utilities for the Banata Auth ecosystem.

Installation

npm install @banata-auth/shared

What's included

  • TypesUser, Session, Organization, ApiKey, WebhookEndpoint, AuditEvent, and more
  • Email block typesEmailBlock, EmailTemplateDefinition, BLOCK_PALETTE, block factories, variable interpolation, and built-in auth template definitions
  • Validation schemas — Zod schemas for emails, passwords, URLs, names
  • Constants — Rate limit defaults, webhook configuration, error codes
  • Error classesBanataAuthError, AuthenticationError, RateLimitError, etc.

Usage

import type { User, Organization } from "@banata-auth/shared";
import { emailSchema, passwordSchema } from "@banata-auth/shared";
import { BanataAuthError, NotFoundError } from "@banata-auth/shared";

License

MIT