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.

Remove unsupported fields from `createPartnerSchema` (#3254)

Steven Teyef4e2b57043e
diff --git a/apps/web/lib/zod/schemas/partners.ts b/apps/web/lib/zod/schemas/partners.ts
index 00dfcd5640..6846fb663a 100644
--- a/apps/web/lib/zod/schemas/partners.ts
+++ b/apps/web/lib/zod/schemas/partners.ts
@@ -564,13 +564,25 @@ export const createPartnerSchema = z.object({
url: true,
domain: true,
key: true,
+ // default programId / partnerId fields
+ programId: true,
+ partnerId: true,
+ // partner links always track conversions
+ trackConversion: true,
+ // folderId is set to the program's defaultFolderId
+ folderId: true,
+ // UTM params are derived from the partner's group settings
+ utm_source: true,
+ utm_medium: true,
+ utm_campaign: true,
+ utm_term: true,
+ utm_content: true,
+ ref: true,
+ // additional unsupported fields
publicStats: true,
tagId: true,
geo: true,
- programId: true,
- partnerId: true,
webhookIds: true,
- trackConversion: true,
})
.partial()
.optional()