Skip to content

API Reference & Compatibility

The inventory is generated from the package source exports.

Functions

nexloadPreset

Source
nexloadPreset(options?: NexloadPresetOptions) => Plugin[]

Exported from: @nexload-sdk/payload-preset

Public function exported by @nexload-sdk/payload-preset.

payloadLoggerPlugin

Source
payloadLoggerPlugin() => Plugin

Exported from: @nexload-sdk/payload-preset

Public function exported by @nexload-sdk/payload-preset.

persianPlugin

Source
persianPlugin() => Plugin

Exported from: @nexload-sdk/payload-preset

Public function exported by @nexload-sdk/payload-preset.

Types

AuditOperation

Source
type AuditOperation = "create" | "update" | "delete" | "read" | "auth";

Exported from: @nexload-sdk/payload-preset

Public type exported by @nexload-sdk/payload-preset.

AuditPluginOptions

Source
type AuditPluginOptions = {
  collections?: "all" | string[];
  exclude?: string[];
  operations?: AuditOperation[];
  logger?: Pick<Logger, "info">;
};

Exported from: @nexload-sdk/payload-preset

Public type exported by @nexload-sdk/payload-preset.

NexloadPresetOptions

Source
type NexloadPresetOptions = {
  persian?: boolean
  fields?: false | PayloadFieldsPluginOptions
  audit?: false | AuditPluginOptions
  logger?: boolean
  /**
   * Installs `afterCommitPlugin()` from `@nexload-sdk/payload-hooks` (default `true`).
   * It enables `runAfterCommit`, commit-exact revalidation batches and audit entries
   * written after commit. Set to `false` to leave it out.
   */
  afterCommit?: boolean
};

Exported from: @nexload-sdk/payload-preset

Public type exported by @nexload-sdk/payload-preset.

nexloadPreset(options?: NexloadPresetOptions): Plugin[] returns the enabled plugins. Options: persian, logger, afterCommit, fields, audit; each accepts false to leave that plugin out. persianPlugin() and payloadLoggerPlugin() are also available separately. The package re-exports AuditOperation and AuditPluginOptions, and exports NexloadPresetOptions.

Import payloadFieldsPlugin from @nexload-sdk/payload-fields, and auditPlugin and afterCommitPlugin from @nexload-sdk/payload-hooks. This package is ESM only and intended for Node.js Payload configuration.