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.

Merge pull request #4617 from dubinc/export-applications-filters

Steven Tey1d23b66bd4b6
diff --cc apps/web/lib/zod/schemas/program-application.ts
index 37944f4fba,5fd4a991aa..a80a53f395
--- a/apps/web/lib/zod/schemas/program-application.ts
+++ b/apps/web/lib/zod/schemas/program-application.ts
@@@ -109,14 -110,22 +110,28 @@@ export const getProgramApplicationsCoun
groupBy: z.enum(["country", "groupId"]).optional(),
});
+ export const exportApplicationsQuerySchema = getProgramApplicationsQuerySchema
+ .pick({
+ status: true,
+ groupId: true,
+ country: true,
+ sortOrder: true,
+ })
+ .extend({
+ columns: z
+ .string()
+ .default(exportApplicationsColumnsDefault.join(","))
+ .transform((v) => v?.split(",")),
+ });
+
export const approveProgramApplicationSchema = z.object({
partnerId: z.string().describe("The ID of the partner to approve."),
+ applicationId: z
+ .string()
+ .optional()
+ .describe(
+ "The ID of the application to approve. If not provided, the partner's most recent pending or rejected application is used. For a partner who is already approved in the program, only a pending application is used.",
+ ),
groupId: z
.string()
.nullish()