Typesafe REST Client

Typesafe REST API client for Payload collections, globals and custom endpoints

Community 0 3/wk MIT v1.0.0

Installation

pnpm add @kyvan2x/payload-rest-client

About

Typesafe REST Client gives a TypeScript project a typed way to call the REST API of a Payload backend. Types come from the Payload config, so collection and global names, sort fields and locales are checked at compile time. Every collection and global gets find, create, update and delete calls, and auth-enabled collections also get login, logout and password reset.

Failed requests throw typed errors for validation, authentication, access, missing records and conflicts, and validation errors expose per-field messages. A safe mode returns a result tuple instead of throwing. Custom endpoints can be declared with input and output types, so routes beyond the built-in ones stay typed.

Package info

Package name
@kyvan2x/payload-rest-client
Latest version
1.0.0
Unpacked size
73 kB
License
MIT
Weekly downloads
3
Last publish
Jun 30, 2025

Type-safe client for the Payload REST API with CRUD, auth and file uploads

Framework-agnostic SDK for inline visual editing on Payload-powered sites

Angular query builder that sends list queries to Payload and other backends as signals

Registers custom drag-and-drop blocks for the Olgax page builder

Lets Puck components pull filtered Payload collection items into a resolved prop

Signed client for the VAP API, plus a Payload plugin for storefront sign-in and checkout