1.0.1 ⢠Published 4 months ago
postsync v1.0.1
PostSync turns your Postman collection into a type-safe, auto-synced API client. Generate TypeScript-safe calls, streamline fetch requests, and integrate seamlessly.
š Features
- š Postman Integration ā Convert Postman collections into structured API clients.
- š Type-Safe API Calls ā Fully typed request and response handling.
- ā” Automated Fetch Requests ā No more manual API configurations.
- š ļø Standardized Error Handling ā Centralized response processing.
- š Auto-Generated Endpoints ā Keep your API in sync with your documentation.
š¦ Installation
npm install postsync
or
yarn add postsync
š§ Usage
import { createApiClient } from 'postsync';
import postmanDoc from './postman-collection.json';
const api = createApiClient(postmanDoc, {
baseUrl: 'https://api.example.com',
defaultHeaders: { 'Content-Type': 'application/json' }
});
async function getUserData(userId: string) {
const user = await api.users.get.getUserById({ pathParams: { id: userId } });
return user;
}
š Why Use PostSync?
ā
Automates API Integration ā No more repetitive fetch configurations.
ā
Keeps Documentation & Code in Sync ā Update Postman, and your client updates too.
ā
Boosts Developer Productivity ā Focus on features, not API calls.
ā
Reduces Bugs ā Type safety ensures valid requests every time.
š¤ Contributing
Contributions are welcome! Feel free to open issues or submit PRs to improve PostSync.
š License
MIT License Ā© 2025 PostSync# postsync