Repository

Wrapper around Payload's Local API providing repository operations.

Community 0 29/wk MIT v1.1.2

Installation

pnpm add payload-repository

About

Payload Repository is an opinionated wrapper designed to facilitate operations with Payload's Local API. This plugin enhances type safety by allowing developers to define custom operations for Payload collections and global settings, thereby reducing boilerplate code when interacting with the data. The primary interface includes `CollectionOperations`, which developers can extend to implement collection-specific methods such as `create`, `find`, `update`, and `delete`. Similarly, the `GlobalOperations` class provides a way to manage global settings efficiently. Additional utility comes from the ability to utilize transformers, which intercept and modify arguments prior to reaching the Payload API, enabling domain-specific logic. With features like composable transformers and type safety dictated by the Payload configuration, this plugin simplifies the connection between custom logic and the underlying data management. However, it requires that users have a grasp of Payload and TypeScript to utilize its full potential.

Package info

Package name
payload-repository
Latest version
1.1.2
Unpacked size
36 kB
License
MIT
Weekly downloads
29
Last publish
Mar 24, 2026

More from bhofstaetter

View profile

Similar plugins

More in Content