Payload Operations
Typed Payload application operations
@nexload-sdk/payload-operations
v0.1.0 Stable ReleasedTyped custom operations for Payload CMS with the native Payload REST SDK.
@nexload-sdk/payload-operations 0.1.0 defines a shared Zod contract, turns it into Payload endpoints, and exposes matching client methods beside the native PayloadSDK.
Use it for application commands and workflows that do not fit Payload’s collection CRUD API. Keep ordinary document reads and writes on cms.payload; put only project-owned operations under cms.operations.
What you get
Section titled “What you get”- recursive, statically typed operation namespaces;
- asynchronous Zod parsing at client and server boundaries;
- exact handler and partial access-control trees;
- typed domain errors plus safe framework-error downgrade;
- one plugin-aware transport shared by operations and Payload SDK calls;
- POST endpoints with matching CORS preflight endpoints.
Boundaries
Section titled “Boundaries”The package does not add query/command categories, custom HTTP verbs, batching, retries, caching, uploads, transaction wrappers, or authentication parsing. Payload remains responsible for authentication and Local API behavior. Operation handlers receive the original PayloadRequest.
Client-safe APIs are available from the root and dedicated subpaths. Import createPayloadEndpoints only from @nexload-sdk/payload-operations/server.
Learning path
Section titled “Learning path”- Install the Payload, SDK, and Zod peers.
- Build one shared contract in the quick start.
- Understand parse and error boundaries in concepts.
- Apply access, transport, and Local API patterns from guides.
- Consult the API and troubleshooting references.
See the package source, manifest, and issues. These pages document the current version only.