@katsele/types
v0.1.2
Published
Shared TypeScript types package for the Yima monorepo. Provides consistent type definitions across web and mobile applications.
Readme
@katsele/types
Shared TypeScript types package for the Yima monorepo. Provides consistent type definitions across web and mobile applications.
Installation
Within the monorepo:
npm install @katsele/typesUsage
Import all types
import { User, Shift, Team, Role, ShiftType } from '@katsele/types';Import from specific modules
// API types
import { ApiResponse, PaginatedResponse } from '@katsele/types/api';
// Shift types
import { Shift, ShiftType, CompensationType } from '@katsele/types/shift';
// User types
import { User, Role, UserStatus } from '@katsele/types/user';
// Team types
import { Team, TeamMember } from '@katsele/types/team';Available Types
API Types (api.ts)
ApiResponse<T>- Standard API response wrapperPaginatedResponse<T>- Paginated API responseApiError- Error response structure
Shift Types (shift.ts)
Shift- Complete shift objectShiftType- Enum: FIELD, TRAININGCompensationType- Enum: PAID, VOLUNTARYShiftStatus- 'upcoming' | 'active' | 'completed'- Response types:
ShiftListResponse,ShiftDetailResponse,ShiftAcceptanceResponse
User Types (user.ts)
User- User objectRole- Enum: EMPLOYEE, MANAGER, ADMINUserStatus- Enum: PENDING, APPROVED, REJECTEDOrganization- Organization objectUserTeam- Simplified team object for user context- Response types:
UserResponse,UserListResponse
Team Types (team.ts)
Team- Complete team object with membersTeamMember- Team member informationTeamManager- Team manager information- Response types:
TeamListResponse,TeamDetailResponse,TeamMembersResponse
Development
Build
npm run buildType Check
npm run type-checkClean Build Artifacts
npm run cleanPublishing
The package is configured to automatically build before publishing:
npm version patch # or minor, major
npm publishThe prepublishOnly script ensures the package is built before publishing.
Package Structure
src/- TypeScript source filesdist/- Compiled JavaScript and type declarations (generated)- All exports point to compiled files in
dist/ - Source maps included for debugging
