https://github.com/iietmoon/postsync
PostSync turns your Postman collection into a type-safe, auto-synced API client.
https://github.com/iietmoon/postsync
fetch fetch-api nodejs npm postman
Last synced: 5 months ago
JSON representation
PostSync turns your Postman collection into a type-safe, auto-synced API client.
- Host: GitHub
- URL: https://github.com/iietmoon/postsync
- Owner: iietmoon
- License: mit
- Created: 2025-03-07T14:57:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-05T21:32:58.000Z (12 months ago)
- Last Synced: 2025-08-17T01:48:06.179Z (7 months ago)
- Topics: fetch, fetch-api, nodejs, npm, postman
- Language: TypeScript
- Homepage: https://iietmoon.github.io/postsync/
- Size: 364 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
Sync Your Postman Docs. Power Your API.
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
```sh
npm install postsync
```
or
```sh
yarn add postsync
```
## 🔧 Usage
```typescript
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