From df2b04fbb619915ef37458ff76d0143eab6c261a Mon Sep 17 00:00:00 2001 From: Facundo Farias Date: Mon, 16 Nov 2026 14:53:41 +0100 Subject: [PATCH] feat: support enrichment webhook events --- package-lock.json | 4 ++-- package.json | 2 +- src/commands/webhooks.ts | 5 ++++- src/lib/client.ts | 2 +- tests/commands/webhooks.test.ts | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 34aa3d8..2fed47f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pixelvault-cli", - "version": "0.23.0", + "version": "0.23.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pixelvault-cli", - "version": "0.23.0", + "version": "0.23.1", "license": "MIT", "dependencies": { "citty": "^0.1.6" diff --git a/package.json b/package.json index fb1f734..03ad31a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixelvault-cli", - "version": "0.23.0", + "version": "0.23.1", "description": "CLI for PixelVault — agent-first media hosting for images, PDFs, and video", "type": "module", "bin": { diff --git a/src/commands/webhooks.ts b/src/commands/webhooks.ts index a73a79a..d5c9e11 100644 --- a/src/commands/webhooks.ts +++ b/src/commands/webhooks.ts @@ -15,6 +15,8 @@ const EVENT_ALIASES = { "export.failed": "export.failed", "video.optimization.completed": "video.optimization.completed", "video.optimization.failed": "video.optimization.failed", + "video.enrichment.completed": "video.enrichment.completed", + "video.enrichment.failed": "video.enrichment.failed", } as const; type WebhookEvent = (typeof EVENT_ALIASES)[keyof typeof EVENT_ALIASES]; @@ -50,7 +52,8 @@ function parseEvents(value: string | undefined): WebhookEvent[] | undefined { if (!event) { throw new CliError( `Unknown webhook event ${part}. Use media.created, media.deleted, image.description.completed, ` + - "image.description.failed, export.completed, export.failed, video.optimization.completed, or video.optimization.failed.", + "image.description.failed, export.completed, export.failed, video.optimization.completed, " + + "video.optimization.failed, video.enrichment.completed, or video.enrichment.failed.", 1, ); } diff --git a/src/lib/client.ts b/src/lib/client.ts index 92b95ad..85129d8 100644 --- a/src/lib/client.ts +++ b/src/lib/client.ts @@ -18,7 +18,7 @@ interface ApiError { // this channel (server reads X-PixelVault-Client at register/device-login — see // pixelvault docs/specs/lead-attribution.md). Keep the version in sync with // package.json on release (tests/lib/version.test.ts fails if they drift). -export const VERSION = "0.23.0"; +export const VERSION = "0.23.1"; const CLIENT_ID = `pixelvault-cli/${VERSION}`; /** CliError carrying the API's machine-readable error details. */ diff --git a/tests/commands/webhooks.test.ts b/tests/commands/webhooks.test.ts index 302a81a..09f1603 100644 --- a/tests/commands/webhooks.test.ts +++ b/tests/commands/webhooks.test.ts @@ -61,7 +61,7 @@ describe("webhooks commands", () => { args: { url: "https://hooks.example.com/pv", description: "social", - events: "media.created,media.created", + events: "video.enrichment.completed,video.enrichment.completed,video.enrichment.failed", json: false, }, }); @@ -74,7 +74,7 @@ describe("webhooks commands", () => { body: JSON.stringify({ url: "https://hooks.example.com/pv", description: "social", - events: ["media.created"], + events: ["video.enrichment.completed", "video.enrichment.failed"], }), }), );