idexx-neo-api
v0.4.0
Published
A robust, type-safe TypeScript client for the IDEXX Neo Veterinary Practice Management System API.
Downloads
34
Readme
IDEXX Neo TypeScript API Client
A robust, type-safe TypeScript client for the IDEXX Neo Veterinary Practice Management System API.
Installation
npm install idexx-neo-apiQuick Start
import { createNeoClient } from 'idexx-neo-api';
const neo = createNeoClient('your-api-key', { sandbox: true });
// List patients
const patients = await neo.patients.list({ limit: 10 });
console.log(`Found ${patients.meta.total} patients`);
// Get patient by ID
const patient = await neo.patients.get('patient-123');
console.log(`Patient: ${patient.name}`);
// Create new patient
const newPatient = await neo.patients.create({
name: 'Fluffy',
species: 'Feline',
breed: 'Persian',
clientId: 'client-456',
dateOfBirth: '2020-01-01',
sex: 'female',
});
// Error handling
import { isNeoApiError } from 'idexx-neo-api';
try {
const patient = await neo.patients.get('non-existent');
} catch (error) {
if (isNeoApiError(error) && error.status === 404) {
console.error('Patient not found');
} else {
console.error('An unexpected error occurred', error);
}
}Configuration
apiKey: Your IDEXX Neo API key (required)sandbox: Use sandbox environment (default: false)timeout: Request timeout in ms (default: 5000)retries: Number of retry attempts (default: 3)baseUrl: Override API base URL
Error Handling
All errors thrown by the client are instances of NeoApiError. Use the isNeoApiError type guard to check and handle errors.
Contributing
See CONTRIBUTING.md for guidelines.
Changelog
See CHANGELOG.md for version history.
License
This project is licensed under the MIT License.
Examples
See the examples/ directory for sample usage scenarios:
- Basic client setup
- Patient management
- Appointment scheduling
- Client management
- Error handling
- Bulk operations
