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.

fix PartnerSchema

Steven Tey0f19326af996
diff --git a/apps/web/lib/zod/schemas/partners.ts b/apps/web/lib/zod/schemas/partners.ts
index 1f0bea3a50..91b5d3dee2 100644
--- a/apps/web/lib/zod/schemas/partners.ts
+++ b/apps/web/lib/zod/schemas/partners.ts
@@ -109,22 +109,24 @@ export const PartnerOnlinePresenceSchema = z.object({
tiktokVerifiedAt: z.date().nullable(),
});
-export const PartnerSchema = z.object({
- id: z.string(),
- name: z.string(),
- companyName: z.string().nullable(),
- profileType: z.nativeEnum(PartnerProfileType),
- email: z.string().nullable(),
- image: z.string().nullable(),
- description: z.string().nullish(),
- country: z.string().nullable(),
- status: z.nativeEnum(PartnerStatus),
- stripeConnectId: z.string().nullable(),
- payoutsEnabledAt: z.date().nullable(),
+export const PartnerSchema = z
+ .object({
+ id: z.string(),
+ name: z.string(),
+ companyName: z.string().nullable(),
+ profileType: z.nativeEnum(PartnerProfileType),
+ email: z.string().nullable(),
+ image: z.string().nullable(),
+ description: z.string().nullish(),
+ country: z.string().nullable(),
+ status: z.nativeEnum(PartnerStatus),
+ stripeConnectId: z.string().nullable(),
+ payoutsEnabledAt: z.date().nullable(),
- createdAt: z.date(),
- updatedAt: z.date(),
-});
+ createdAt: z.date(),
+ updatedAt: z.date(),
+ })
+ .merge(PartnerOnlinePresenceSchema);
// Used externally by GET+POST /api/partners and partner.created webhook
export const EnrolledPartnerSchema = PartnerSchema.pick({