N
Neon16mo ago
genetic-orange

TypeScript library for neonctl?

Does anyone have advice for how to interact with the Neon "control" API (like neonctl), but from TypeScript? All of my CI scripts are written in TypeScript, and I would like to avoid untyped shell calls & untyped API calls since it's harder to maintain without docs in IDE. So, if I want to have typescript types, should I generate an API client from OpenAPI specs, or is there something existing I can use?
5 Replies
genetic-orange
genetic-orangeOP16mo ago
Perhaps @neondatabase/api-client ?
ratty-blush
ratty-blush16mo ago
yes! Also we document our http API
genetic-orange
genetic-orangeOP16mo ago
Great! Thanks
conscious-sapphire
conscious-sapphire16mo ago
conscious-sapphire
conscious-sapphire16mo ago
I wanted to try something like openapi-typescript similar to this https://ruanmartinelli.com/blog/tanstack-query-openapi
Type-safe TanStack Query with OpenAPI | Ruan Martinelli
Ruan Martinelli is a software developer, freelancer, and technical writer based in Portugal. This is his website, come on in.

Did you find this page helpful?