@sudobility/testomniac_types
v0.0.69
Published
Shared TypeScript types for the Testomniac ecosystem
Readme
@sudobility/testomniac_types
Shared TypeScript type definitions for the Starter API ecosystem.
Installation
bun add @sudobility/testomniac_typesPeer dependency:
bun add @sudobility/typesUsage
import {
History,
HistoryCreateRequest,
HistoryUpdateRequest,
HistoryTotalResponse,
successResponse,
errorResponse,
BaseResponse,
NetworkClient,
} from '@sudobility/testomniac_types';
// Wrap API responses
const ok = successResponse({ items: [] }); // { success: true, data: { items: [] } }
const err = errorResponse('Not found'); // { success: false, error: "Not found" }Types
| Type | Description |
| ---------------------- | ----------------------------------------------------------------- |
| History | Core data type (id, user_id, datetime, value, timestamps) |
| HistoryCreateRequest | { datetime, value } |
| HistoryUpdateRequest | { datetime?, value? } |
| HistoryTotalResponse | { total } |
| successResponse<T> | Wraps data in BaseResponse<T> with success: true |
| errorResponse | Wraps error string in BaseResponse<never> with success: false |
Re-exports from @sudobility/types: ApiResponse, BaseResponse, NetworkClient, Optional.
Development
bun run build # Build dual ESM/CJS output
bun run dev # Watch mode
bun test # Run Vitest tests
bun run typecheck # TypeScript check
bun run lint # ESLint
bun run verify # All checks + build (use before commit)Related Packages
- testomniac_api -- Backend API server (Hono + PostgreSQL)
- testomniac_client -- API client SDK with TanStack Query hooks
- testomniac_lib -- Business logic library with Zustand stores
- testomniac_app -- React web application
- testomniac_app_rn -- React Native mobile app
All other testomniac_* projects depend on this package.
License
BUSL-1.1
