Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Merge branch 'main' into filter-events-by-metadata

Steven Tey56de4b2fe223
diff --cc apps/web/lib/zod/schemas/analytics.ts
index e9cce39716,8cd70e5096..d66136bd39
--- a/apps/web/lib/zod/schemas/analytics.ts
+++ b/apps/web/lib/zod/schemas/analytics.ts
@@@ -226,15 -226,12 +226,21 @@@ export const analyticsQuerySchema =
.describe(
"Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.",
),
+ saleType: z
+ .enum(["new", "recurring"])
+ .optional()
+ .describe(
+ "Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both.",
+ ),
+ query: z
+ .string()
+ .optional()
+ .describe(
+ "Search the events by a custom metadata value. Only available for lead and sale events.",
+ )
+ .openapi({
+ example: "metadata['key']:'value'",
+ }),
})
.merge(utmTagsSchema);