open-index/open-npm huggingface dataset:
npm package: @katsele/types
Description: Shared TypeScript types package for the Yima monorepo. Provides consistent type definitions across web and mobile applications.
Latest version: 0.1.2

# @katsele/types

Shared TypeScript types package for the Yima monorepo. Provides consistent type definitions across web and mobile applications.

## Installation

Within the monorepo:
```bash
npm install @katsele/types
```

## Usage

### Import all types
```typescript
import { User, Shift, Team, Role, ShiftType } from '@katsele/types';
```

### Import from specific modules
```typescript
// 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 wrapper
- `PaginatedResponse<T>` - Paginated API response
- `ApiError` - Error response structure

### Shift Types (`shift.ts`)
- `Shift` - Complete shift object
- `ShiftType` - Enum: FIELD, TRAINING
- `CompensationType` - Enum: PAID, VOLUNTARY
- `ShiftStatus` - 'upcoming' | 'active' | 'completed'
- Response types: `ShiftListResponse`, `ShiftDetailResponse`, `ShiftAcceptanceResponse`

### User Types (`user.ts`)
- `User` - User object
- `Role` - Enum: EMPLOYEE, MANAGER, ADMIN
- `UserStatus` - Enum: PENDING, APPROVED, REJECTED
- `Organization` - Organization object
- `UserTeam` - Simplified team object for user context
- Response types: `UserResponse`, `UserListResponse`

### Team Types (`team.ts`)
- `Team` - Complete team object with members
- `TeamMember` - Team member information
- `TeamManager` - Team manager information
- Response types: `TeamListResponse`, `TeamDetailResponse`, `TeamMembersResponse`

## Development

### Build
```bash
npm run build
```

### Type Check
```bash
npm run type-check
```

### Clean Build Artifacts
```bash
npm run clean
```

## Publishing

The package is configured to automatically build before publishing:

```bash
npm version patch  # or minor, major
npm publish
```

The `prepublishOnly` script ensures the package is built before publishing.

## Package Structure

- `src/` - TypeScript source files
- `dist/` - Compiled JavaScript and type declarations (generated)
- All exports point to compiled files in `dist/`
- Source maps included for debugging