🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@velocms/plugin-types

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@velocms/plugin-types

TypeScript types for VeloCMS plugin development — re-exported from internal Zod schemas

latest
Source
npmnpm
Version
1.0.0-alpha.1
Version published
Maintainers
1
Created
Source

@velocms/plugin-types

TypeScript types for VeloCMS plugin development, derived from the internal Zod schemas.

Provides: PluginManifest, HookName, HookPayloadMap, PluginCapability, CapabilityDeclaration, PluginContext.

Install

npm install @velocms/plugin-types

Usage

import type {
  PluginManifest,
  HookName,
  PostHookPayload,
  PluginContext,
} from "@velocms/plugin-types";

export const manifest: PluginManifest = {
  id: "com.example.my-plugin",
  name: "My Plugin",
  version: "1.0.0",
  description: "Does something useful",
  capabilities: ["content:read"],
  hooks: ["afterPostPublish"],
  builtin: false,
  enabled: true,
};

export async function afterPostPublish(
  payload: PostHookPayload,
  ctx: PluginContext
): Promise<PostHookPayload> {
  ctx.log("Post published", { slug: payload.post.slug });
  return payload;
}

Types reference

ExportDescription
PluginManifestThe manifest object every plugin must export
HookNameUnion of all hook names ("afterPostCreate" | ...)
PluginCapabilityUnion of all capability strings
HookPayloadMapMaps each HookName to its payload type
PostHookPayloadPayload for post lifecycle hooks
BeforePostPublishPayloadPayload for beforePostPublish (writable)
MemberHookPayloadPayload for member lifecycle hooks
PageHookPayloadPayload for page lifecycle hooks
OrderHookPayloadPayload for commerce order hooks
PluginContextContext passed to every handler
CapabilityDeclarationHuman-readable capability description
describeCapabilities()Helper to build consent UIs

Docs

velocms.org/developers/docs

License

MIT

Keywords

velocms

FAQs

Package last updated on 19 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts