README
Installation
npm install @grovepath/portal-db-ts-sdk openapi-fetchUsage
Basic GET Request
import createClient from 'openapi-fetch';
import type { paths } from '@grovepath/portal-db-ts-sdk';
const client = createClient<paths>({
baseUrl: 'http://localhost:3000',
headers: {
'Authorization': `Bearer ${JWT_TOKEN}`,
},
});
// Fetch all services
const { data, error } = await client.GET('/services');
if (error) {
console.error('Error:', error);
} else {
console.log('Services:', data);
}Query with Filters
React with @tanstack/react-query
Documentation
Was this helpful?
