Skip to content

fells-code/seamless-auth-types

Repository files navigation

@seamless-auth/types

Shared TypeScript types and Zod schemas for the SeamlessAuth ecosystem.

This package provides a single source of truth for domain models like Users, Credentials, Sessions, and Auth Events, ensuring consistency across:

  • API servers
  • SDKs
  • Frontend applications
  • CLI tools

Features

  • Zod-first schemas with runtime validation and type inference
  • Strict typing across all models
  • Framework-agnostic
  • Minimal dependencies (Zod only)

Installation

npm install @seamless-auth/types

Usage

Import schemas

import { UserSchema } from '@seamless-auth/types';

Validate data

const user = UserSchema.parse(data);

Infer types

import type { User } from '@seamless-auth/types';

function handleUser(user: User) {
  console.log(user.email);
}

Zod as the Source of Truth

All models are defined using Zod:

export const UserSchema = z.object({
  id: z.string().uuid(),
  email: z.string().email(),
});

Types are inferred:

export type User = z.infer<typeof UserSchema>;

Versioning

This package follows semantic versioning:

  • PATCH for fixes and non-breaking improvements
  • MINOR for additive changes such as new fields or models
  • MAJOR for breaking changes such as field removals or type changes

Development

# build
npm run build

# watch mode
npm run dev

# type check
npm run typecheck

Contributing

Contributions are welcome.

Please ensure:

  • strict TypeScript compliance
  • schemas remain Zod-based
  • no framework-specific dependencies are introduced

License

AGPL-3.0 © Fells Code, LLC


Links

About

Offical types library for Fells Code's Seamless Auth ecosystem

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors