@seenn/types
v0.5.0
Published
Shared TypeScript types for Seenn SDKs
Downloads
989
Maintainers
Readme
@seenn/types
Shared TypeScript types for all Seenn SDKs. This package is the single source of truth for type definitions.
Installation
npm install @seenn/types
# or
pnpm add @seenn/typesUsage
import type {
SeennJob,
JobStatus,
StageInfo,
ConnectionState,
SSEEventType,
} from '@seenn/types';SDK Sync Guidelines
When updating types in this package:
- Bump version in package.json
- Publish to npm:
npm publish - Update all SDKs to use new version:
@seenn/react-native@seenn/nodeseenn_flutter(generate from TypeScript)
Version Compatibility
| @seenn/types | @seenn/react-native | @seenn/node | seenn_flutter | |--------------|---------------------|-------------|---------------| | 0.1.0 | 0.2.6+ | 0.2.2+ | 0.1.0+ |
Type Categories
Core Types
SeennJob- Main job objectJobStatus- Status enumStageInfo,QueueInfo- Progress infoJobResult,JobError- Completion data
Parent-Child Types
ParentInfo,ChildrenStats- Relationship dataChildJobSummary- Child job infoParentWithChildren- Full parent with children
SSE Types
ConnectionState- SSE connection statesSSEEventType- All SSE event typesSSEEvent- Event wrapper
API Types
CreateJobParams,UpdateJobParams- Request typesCompleteJobParams,FailJobParams- Completion types
Live Activity Types
LiveActivityStartParams,LiveActivityUpdateParamsLiveActivityEndParams,LiveActivityResult
Flutter Integration
For Flutter SDK, generate Dart types from this package:
# In seenn-platform root
pnpm run generate:flutter-typesThis runs scripts/generate-flutter-types.ts which converts TypeScript to Dart.
License
MIT
