aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-03-07 09:22:11 +0000
committerMohamed Bassem <me@mbassem.com>2025-03-07 09:22:11 +0000
commit33293178db718236b51263c4bca0d4d146fa757a (patch)
treefb11951d05ba71d6b2fd3ebdd782fc77a44cee67 /packages/shared
parent6bbfb8c6caf03ae2e9a0b8772a1f2e35db0c429c (diff)
downloadkarakeep-33293178db718236b51263c4bca0d4d146fa757a.tar.zst
feat: Add support for 'ai tagged' as a webhook trigger. Fixes #1092
Diffstat (limited to 'packages/shared')
-rw-r--r--packages/shared/queues.ts2
-rw-r--r--packages/shared/types/webhooks.ts7
2 files changed, 7 insertions, 2 deletions
diff --git a/packages/shared/queues.ts b/packages/shared/queues.ts
index 5484ffb2..624f2bca 100644
--- a/packages/shared/queues.ts
+++ b/packages/shared/queues.ts
@@ -170,7 +170,7 @@ export const AssetPreprocessingQueue =
// Webhook worker
export const zWebhookRequestSchema = z.object({
bookmarkId: z.string(),
- operation: z.enum(["crawled", "created", "edited"]),
+ operation: z.enum(["crawled", "created", "edited", "ai tagged"]),
});
export type ZWebhookRequest = z.infer<typeof zWebhookRequestSchema>;
export const WebhookQueue = new SqliteQueue<ZWebhookRequest>(
diff --git a/packages/shared/types/webhooks.ts b/packages/shared/types/webhooks.ts
index 8d425ad9..819951ce 100644
--- a/packages/shared/types/webhooks.ts
+++ b/packages/shared/types/webhooks.ts
@@ -3,7 +3,12 @@ import { z } from "zod";
const MAX_WEBHOOK_URL_LENGTH = 500;
const MAX_WEBHOOK_TOKEN_LENGTH = 100;
-export const zWebhookEventSchema = z.enum(["created", "edited", "crawled"]);
+export const zWebhookEventSchema = z.enum([
+ "created",
+ "edited",
+ "crawled",
+ "ai tagged",
+]);
export type ZWebhookEvent = z.infer<typeof zWebhookEventSchema>;
export const zWebhookSchema = z.object({