The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update partners.ts
Kiran K9d4fab6c4c28
diff --git a/apps/web/lib/zod/schemas/partners.ts b/apps/web/lib/zod/schemas/partners.tsindex 5fe9930818..89fc3583b0 100644--- a/apps/web/lib/zod/schemas/partners.ts+++ b/apps/web/lib/zod/schemas/partners.ts@@ -269,14 +269,32 @@ export const EnrolledPartnerBasicSchema = PartnerSchema.pick({stripeConnectId: true,payoutsEnabledAt: true,createdAt: true,-}).merge(- ProgramEnrollmentSchema.pick({- status: true,- programId: true,- tenantId: true,- links: true,- }),-);+})+ .merge(PartnerOnlinePresenceSchema)+ .merge(+ ProgramEnrollmentSchema.pick({+ programId: true,+ tenantId: true,+ links: true,+ status: true,+ }),+ )+ .extend({+ clickRewardId: z.string().nullish(),+ leadRewardId: z.string().nullish(),+ saleRewardId: z.string().nullish(),+ discountId: z.string().nullish(),+ applicationId: z+ .string()+ .nullish()+ .describe(+ "If the partner submitted an application to join the program, this is the ID of the application.",+ ),+ bannedAt: z.date().nullish(),+ bannedReason: z+ .enum(Object.keys(BAN_PARTNER_REASONS) as [PartnerBannedReason])+ .nullish(),+ });// Used externally by GET+POST /api/partners and partner.enrolled webhookexport const EnrolledPartnerSchema = EnrolledPartnerBasicSchema.extend({@@ -324,31 +342,6 @@ export const EnrolledPartnerSchema = EnrolledPartnerBasicSchema.extend({}),});-// Used internally in the Dub dashboard for partners table-export const EnrolledPartnerSchemaExtended = EnrolledPartnerSchema.merge(- PartnerOnlinePresenceSchema,-).extend({- applicationId: z- .string()- .nullish()- .describe(- "If the partner submitted an application to join the program, this is the ID of the application.",- ),- clickRewardId: z.string().nullish(),- leadRewardId: z.string().nullish(),- saleRewardId: z.string().nullish(),- discountId: z.string().nullish(),- bannedAt: z.date().nullish(),- bannedReason: z- .enum(- Object.keys(BAN_PARTNER_REASONS) as [- PartnerBannedReason,- ...PartnerBannedReason[],- ],- )- .nullish(),-});-export const LeaderboardPartnerSchema = z.object({id: z.string(),name: z.string(),