Introduction
@ts-ghost/admin-api
provides a strongly-typed TypeScript client to interract with the Ghost Admin API based on Zod schemas passed through all operations on composed API endpoints, read
, browse
, add
, edit
and delete
.
This client gives you Type-Safety in the inputs and outputs of your Ghost API calls, usable in the browser (not recommended since you will probably expose your Admin API Key) or in Node.js.
It is made to interract with the Ghost Admin API with authentication by key. File uploads are not supported yet.
Requirements
This client is only compatible with Ghost versions 5.x for now.
-
Ghost 5.^ (Any Ghost version after 5.0)
-
Node.js 16+
- We rely on global
fetch
being available, so you can bring your own polyfill and if you run Node 16, you'll need to run with the--experimental-fetch
flag enabled.
- We rely on global
-
TypeScript 5+, the lib make usage of const in generics and other TS5+ features.