open-index/open-npm huggingface dataset:
npm package: @livetronics/pipesurf-types
Description: Shared TypeScript types for PipeSurf applications
Author: PipeSurf Team
Latest version: 1.1.15

# @pipesurf/types

Shared TypeScript types for PipeSurf applications.

## Installation

```bash
# From npm (when published)
npm install @pipesurf/types

# From local path (for development)
npm install ../packages/types
```

## Usage

```typescript
import type {
	User,
	Project,
	ApiResponse,
	CreateProjectRequest
} from '@pipesurf/types'

// Use in API calls
const response: ApiResponse<Project[]> = await fetch('/api/projects').then(
	(res) => res.json()
)

// Use in forms
const newProject: CreateProjectRequest = {
	code: 'PRJ-001',
	name: 'New Pipeline Project',
	clientName: 'Client Corp',
	startDate: '2024-01-01',
	endDate: '2024-12-31',
	location: 'Houston, TX',
	phases: ['FIT_UP', 'WELDING', 'NDT']
}

// Use in components
interface ProjectCardProps {
	project: Project
	onEdit?: (id: number) => void
}
```

## Available Types

### Entities

- `User`, `Company`, `Project`, `ProjectPhase`
- `Welder`, `WPS`, `WPSEntry`
- `Draft`, `DraftJoint`, `DraftSheet`, `DraftSpool`
- `Joint`, `Sheet`, `Spool`
- `MaterialGrade`, `WeldingProcess`, `WeldingCode`, `Schedule`

### Request/Response Types

- `ApiResponse<T>`, `PaginatedResponse<T>`
- `CreateUserRequest`, `UpdateUserRequest`
- `CreateProjectRequest`, `UpdateProjectRequest`
- `CreateWelderRequest`, `UpdateWelderRequest`
- `CreateWPSRequest`, `AddWPSEntriesRequest`
- `CreateEditDraftRequest`, `CreateDeleteDraftRequest`
- `SendOTPRequest`, `LoginViaOTPRequest`, `LoginResponse`

### Query Parameter Types

- `UsersQueryParams`, `ProjectsQueryParams`
- `DraftsQueryParams`, `WeldersQueryParams`, `WPSQueryParams`

### Enums/Unions

- `UserRole`, `UserStatus`, `UserGender`
- `ProjectStatus`, `ProjectPhaseType`, `ProjectRole`
- `DraftType`, `DraftStatus`
- `JointStatus`, `WelderStatus`, `CompanyStatus`
- `MaterialGradeType`, `MaterialCategory`

## Development

```bash
# Build the package
npm run build

# Watch mode
npm run dev

# Clean build artifacts
npm run clean
```

## Integration with React/React Native

This package is designed to be used with:

- **pipesurf-web** (React)
- **pipesurf-mobile** (React Native)

Types are compatible with:

- React Query / TanStack Query
- Axios / Fetch
- React Hook Form
- Zod (for runtime validation)