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.

update the default

Kiran Kc6349fb64a1a
diff --git a/apps/web/lib/zod/schemas/sales.ts b/apps/web/lib/zod/schemas/sales.ts
index a6d297fa89..4e56b4d413 100644
--- a/apps/web/lib/zod/schemas/sales.ts
+++ b/apps/web/lib/zod/schemas/sales.ts
@@ -25,11 +25,11 @@ export const trackSaleRequestSchema = z.object({
.string()
.max(50)
.optional()
- .default("Purchase")
+ .default("Purchased")
.describe(
"The name of the sale event. It can be used to track different types of event for example 'Purchase', 'Subscription', 'Upgrade', etc.",
)
- .openapi({ example: "Purchase" }),
+ .openapi({ example: "Purchased" }),
invoiceId: z
.string()
.nullish()
@@ -53,6 +53,7 @@ export const trackSaleResponseSchema = z.object({
invoiceId: z.string().nullable(),
currency: z.string(),
metadata: z.record(z.unknown()).nullable(),
+ eventName: z.string(),
});
export const saleEventSchemaTB = clickEventSchemaTB
@@ -62,7 +63,7 @@ export const saleEventSchemaTB = clickEventSchemaTB
timestamp: z.string().optional(), //autogenerated by Tinybird
event_id: z.string(),
customer_id: z.string(),
- event_name: z.string().default("Purchase"),
+ event_name: z.string().default("Purchased"),
payment_processor: z.string(),
amount: z.number(),
invoice_id: z.string().default(""),