@agiflowai/dataplane-api-client
v0.0.1
Published
AGIFlow dataplan api
Downloads
2
Readme
@agiflowai/universal-analytics-client
Welcome to the @agiflowai/universal-analytics-client package! This package is designed to automatically generate a TypeScript client based on your OpenAPI specification, simplifying the process of interacting with your API.
Features
- Automatic Generation: Generate TypeScript clients directly from your OpenAPI spec.
- Type Safety: Ensure type safety with TypeScript definitions.
- Easy Integration: Seamlessly integrate with your existing projects.
- Customizable: Customize the generated client to fit your specific needs.
Installation
Install the package using npm or yarn:
npm install @agiflowai/universal-analytics-client
or
yarn add @agiflowai/universal-analytics-client
Usage with openapi-fetch
- Install openapi-fetch dependency
yarn add openapi-fetch
- Create client:
import createClient from 'openapi-fetch';
import { paths } from '@agiflowai/universal-analytics-client';
const client = createClient<paths>({
baseUrl: process.env.BASE_URL,
fetch,
});
- Use the client:
const res = await client.GET('...') // type inferred
Contributing
Contributions are welcome! If you have any suggestions or improvements, please create a pull request or open an issue.
License
This project is licensed under the MIT License - see the LICENSE file for details.