@book-effect/core
v0.2.3
Published
Platform-agnostic types and abstractions for book metadata.
Readme
@book-effect/core
Platform-agnostic types and abstractions for book metadata.
This package provides shared types that serve as a common interface across all book API providers (Hardcover, Open Library, and Google Books).
Installation
pnpm add @book-effect/coreUsage
import { Book, Author, BookApiClient } from "@book-effect/core";
import type { ISBN10, ISBN13 } from "@book-effect/core";Exports
Types
- Book - Platform-agnostic book metadata schema
- Author - Author schema with name field
- ISBN10 - Branded type for 10-digit ISBNs
- ISBN13 - Branded type for 13-digit ISBNs
- BookId - Branded type for generic book identifiers
- Url - Branded type for URLs
Errors
- NetworkError - Connection/timeout errors
- NotFoundError - Book not found
- ParseError - Response parsing failures
- RateLimitError - API rate limiting
- BookApiError - Union of all error types
Services
- BookApiClient - Service interface for book API implementations
Building
nx build core