Fills localized Payload content in other locales with Google, OpenAI or copy resolvers
TypeScript-Safe API Client
Typed REST client for Payload with the same query syntax as the Local API
Installation
pnpm add @payload-enchants/sdk About
TypeScript-Safe API Client is a typed client for the REST API of a Payload site. It uses the same query shape as the Local API, so find, create, update and delete calls look the same on the server and in a frontend app. Documents come back typed against your generated Payload types, so misspelled field names fail at compile time.
Each request goes through a fetch function you can replace, which is the place to add an API key or a session header. A field selection option narrows the returned type to the fields you ask for. Update and delete by ID are included as extra operations.
Package info
- Package name
@payload-enchants/sdk- Latest version
1.2.2- Unpacked size
- 31 kB
- License
- MIT
- Weekly downloads
- 102
- Last publish
- Jul 16, 2024
More from r1tsuu
View profileLets API requests pick which fields come back, like GraphQL field selection
Caches local Payload reads for pages and clears them on content changes
Lets each collection compute its admin document title from a custom function
Adds SEO meta fields to collections with OpenAI-generated titles and descriptions
Shows each localized field's value in every locale tab in the admin panel
Similar tools
More in API clients & SDKsType-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