1.0.1 • Published 4 months ago

postsync v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

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

1.0.1

4 months ago

1.0.0

4 months ago