@chittyos/types
v1.0.0
Published
Shared TypeScript types for ChittyOS Framework
Readme
@chittyos/types
Shared TypeScript types for ChittyOS Framework.
Installation
npm install @chittyos/typesUsage
import type {
ChittyIDResponse,
EntityType,
ServiceConfig,
HealthResponse
} from '@chittyos/types';
// ChittyID types
const response: ChittyIDResponse = {
chittyId: 'CHITTY-PEO-001-ABC',
entity: 'PEO',
timestamp: '2025-10-12T00:00:00Z',
version: '1.0.0'
};
// Service configuration
const config: ServiceConfig = {
url: 'https://id.chitty.cc',
token: process.env.CHITTY_ID_TOKEN,
timeout: 10000
};
// Error handling
import { ChittyIDError, ValidationError } from '@chittyos/types';
try {
// ... ChittyID operation
} catch (error) {
if (error instanceof ChittyIDError) {
console.error('ChittyID error:', error.code);
}
}Type Categories
ChittyID Types
ChittyIDFormat,EntityType,ChittyNamespaceChittyIDResponse,ChittyIDRequest,ValidationResultSessionConfig,SessionResponse,MintConfig,MintResponse
Service Types
Environment,ServiceConfig,HealthResponse,ServiceInfo
HTTP Types
HttpMethod,HttpRequestConfig,HttpResponse
Error Types
ChittyOSError,ChittyServiceError,ChittyIDErrorNetworkError,TimeoutError,ValidationError
Authentication Types
OAuthTokenResponse,JWTPayload,APIKeyInfo
Entity Types
EntityBase,PropertyEntity,CaseEntity,EvidenceEntity
Utility Types
DeepPartial,DeepRequired,KeysOfType,MaybePromise,AsyncFunction
Features
- ✅ Zero dependencies
- ✅ Tree-shakeable
- ✅ Full TypeScript support
- ✅ ESM and CJS builds
- ✅ Type-safe error classes
- ✅ Comprehensive JSDoc comments
Package Size
~8KB (gzipped)
License
MIT
