refactor(db): extract reusable transaction types (#9)
Extract Transaction and DbOrTransaction types from inline definitions
in the indexer to shared type exports in @atbb/db package.
This improves code clarity and reusability by:
- Eliminating complex inline type expressions
- Providing a single source of truth for transaction types
- Adding comprehensive documentation with usage examples
- Making these types available to all consumers of @atbb/db
The Transaction type extracts the transaction callback parameter type
from Drizzle's database instance. The DbOrTransaction union type is
useful for helper functions that can work with either a database
instance or an active transaction context.