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.

include tenantId

Steven Tey6ae9336e7659
diff --git a/apps/web/app/api/partners/route.ts b/apps/web/app/api/partners/route.ts
index 1b84009f4d..dda2766e1a 100644
--- a/apps/web/app/api/partners/route.ts
+++ b/apps/web/app/api/partners/route.ts
@@ -139,6 +139,7 @@ export const POST = withWorkspace(
url: program.url,
key: username,
programId,
+ tenantId,
trackConversion: true,
},
workspace,
diff --git a/apps/web/lib/zod/schemas/links.ts b/apps/web/lib/zod/schemas/links.ts
index 932462be0d..ac10c5b17a 100644
--- a/apps/web/lib/zod/schemas/links.ts
+++ b/apps/web/lib/zod/schemas/links.ts
@@ -185,6 +185,10 @@ export const createLinkBodySchema = z.object({
.describe(
"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.",
),
+ programId: z
+ .string()
+ .nullish()
+ .describe("The ID of the program the short link is associated with."),
prefix: z
.string()
.optional()
@@ -339,10 +343,6 @@ export const createLinkBodySchema = z.object({
.describe(
"The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL.",
),
- programId: z
- .string()
- .nullish()
- .describe("The ID of the program the short link is associated with."),
webhookIds: z
.array(z.string())
.nullish()
@@ -632,10 +632,7 @@ export const getLinksQuerySchemaExtended = getLinksQuerySchemaBase.merge(
.transform((v) => (Array.isArray(v) ? v : v.split(",")))
.optional()
.describe("Link IDs to filter by."),
- partnerId: z
- .string()
- .optional()
- .describe("Partner ID to filter by."),
+ partnerId: z.string().optional().describe("Partner ID to filter by."),
}),
);