The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Merge branch 'main' into update-sale
Steven Teye13354aee0d9
diff --cc apps/web/lib/zod/schemas/partners.tsindex e87fd49479,bbc24e9a99..2b9bd93990--- a/apps/web/lib/zod/schemas/partners.ts+++ b/apps/web/lib/zod/schemas/partners.ts@@@ -351,11 -366,17 +366,26 @@@ export const partnerAnalyticsResponseSc}),} as const;+export const updateSaleSchema = z.object({+ programId: z.string(),+ invoiceId: z.string(),+ amount: z+ .number({ required_error: "Amount is required." })+ .min(0)+ .describe("The new amount for the sale."),+});+++ export const getPartnerEarningsCountQuerySchema = getSalesCountQuerySchema+ .omit({+ partnerId: true,+ })+ .extend({+ type: z.enum(["click", "lead", "sale"]).optional(),+ linkId: z.string().optional(),+ groupBy: z.enum(["linkId", "customerId", "status", "type"]).optional(),+ });++ export const partnerEarningsTimeseriesSchema =+ getPartnerEarningsCountQuerySchema.extend({+ timezone: z.string().optional(),+ });