The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Add descriptions for bounty submissions API (#3378)
Kiran K8b1a74815ae8
diff --git a/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/page.tsx b/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/page.tsxindex 5c39a6b242..a078c58201 100644--- a/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/page.tsx+++ b/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/page.tsx@@ -1,4 +1,7 @@-import { decodeLinkIfCaseSensitive, encodeKeyIfCaseSensitive } from "@/lib/api/links/case-sensitivity";+import {+ decodeLinkIfCaseSensitive,+ encodeKeyIfCaseSensitive,+} from "@/lib/api/links/case-sensitivity";import { deepViewDataSchema } from "@/lib/zod/schemas/deep-links";import { prisma } from "@dub/prisma";import { Grid, Wordmark } from "@dub/ui";diff --git a/apps/web/lib/openapi/bounties/approve-bounty-submission.ts b/apps/web/lib/openapi/bounties/approve-bounty-submission.tsindex 993b4ddb80..0f4711d96d 100644--- a/apps/web/lib/openapi/bounties/approve-bounty-submission.ts+++ b/apps/web/lib/openapi/bounties/approve-bounty-submission.ts@@ -14,8 +14,10 @@ export const approveBountySubmission: ZodOpenApiOperationObject = {"Approve a bounty submission. Optionally specify a custom reward amount.",requestParams: {path: z.object({- bountyId: z.string(),- submissionId: z.string(),+ bountyId: z.string().meta({ description: "The ID of the bounty" }),+ submissionId: z+ .string()+ .meta({ description: "The ID of the bounty submission" }),}),},requestBody: {diff --git a/apps/web/lib/openapi/bounties/list-bounty-submissions.ts b/apps/web/lib/openapi/bounties/list-bounty-submissions.tsindex f672abb587..5070f32aba 100644--- a/apps/web/lib/openapi/bounties/list-bounty-submissions.ts+++ b/apps/web/lib/openapi/bounties/list-bounty-submissions.ts@@ -13,7 +13,7 @@ export const listBountySubmissions: ZodOpenApiOperationObject = {description: "List all submissions for a specific bounty.",requestParams: {path: z.object({- bountyId: z.string(),+ bountyId: z.string().meta({ description: "The ID of the bounty" }),}),query: getBountySubmissionsQuerySchema,},diff --git a/apps/web/lib/openapi/bounties/reject-bounty-submission.ts b/apps/web/lib/openapi/bounties/reject-bounty-submission.tsindex f8565559a2..721513551b 100644--- a/apps/web/lib/openapi/bounties/reject-bounty-submission.ts+++ b/apps/web/lib/openapi/bounties/reject-bounty-submission.ts@@ -14,8 +14,10 @@ export const rejectBountySubmission: ZodOpenApiOperationObject = {"Reject a bounty submission with a specified reason and optional note.",requestParams: {path: z.object({- bountyId: z.string(),- submissionId: z.string(),+ bountyId: z.string().meta({ description: "The ID of the bounty" }),+ submissionId: z+ .string()+ .meta({ description: "The ID of the bounty submission" }),}),},requestBody: {diff --git a/apps/web/lib/zod/schemas/bounties.ts b/apps/web/lib/zod/schemas/bounties.tsindex 5a37ed8783..22606a428f 100644--- a/apps/web/lib/zod/schemas/bounties.ts+++ b/apps/web/lib/zod/schemas/bounties.ts@@ -81,9 +81,9 @@ export const updateBountySchema = createBountySchema.partial();export const BountySubmissionFileSchema = z.object({- url: z.string(),- fileName: z.string(),- size: z.number(),+ url: z.string().describe("The URL of the uploaded file."),+ fileName: z.string().describe("The original file name."),+ size: z.number().describe("The file size in bytes."),});// used in POST, PATCH, DELETE /bounties + bounty.created, bounty.updated webhooks@@ -121,19 +121,47 @@ export const BountyListSchema = BountySchema.extend({// used in GET /bounties/{bountyId}/submissionsexport const BountySubmissionSchema = z.object({- id: z.string(),- bountyId: z.string(),- partnerId: z.string(),- description: z.string().nullable(),- urls: z.array(z.string()).nullable(),- files: z.array(BountySubmissionFileSchema).nullable(),- status: z.enum(BountySubmissionStatus),- performanceCount: z.number().nullable(),- createdAt: z.date(),- completedAt: z.date().nullable(),- reviewedAt: z.date().nullable(),- rejectionReason: z.string().nullable(),- rejectionNote: z.string().nullable(),+ id: z.string().meta({ description: "The ID of the bounty submission" }),+ bountyId: z.string().meta({ description: "The ID of the bounty" }),+ partnerId: z.string().meta({ description: "The ID of the partner" }),+ description: z+ .string()+ .nullable()+ .meta({ description: "The description of the submission" }),+ urls: z+ .array(z.string())+ .nullable()+ .meta({ description: "The URLs submitted for the submission" }),+ files: z+ .array(BountySubmissionFileSchema)+ .nullable()+ .meta({ description: "The files uploaded for the submission" }),+ status: z+ .enum(BountySubmissionStatus)+ .meta({ description: "The status of the submission" }),+ performanceCount: z+ .number()+ .nullable()+ .meta({ description: "The performance count of the submission" }),+ createdAt: z+ .date()+ .meta({ description: "The date and time the submission was created" }),+ completedAt: z+ .date()+ .nullable()+ .meta({ description: "The date and time the submission was completed" }),+ reviewedAt: z+ .date()+ .nullable()+ .meta({ description: "The date and time the submission was reviewed" }),+ rejectionReason: z+ .string()+ .nullable()+ .meta({ description: "The reason for rejecting the submission" }),+ rejectionNote: z+ .string()+ .nullable()+ .meta({ description: "The note for rejecting the submission" }),});export const BountySubmissionExtendedSchema = BountySubmissionSchema.extend({@@ -164,7 +192,13 @@ export const BountySubmissionExtendedSchema = BountySubmissionSchema.extend({});export const approveBountySubmissionBodySchema = z.object({- rewardAmount: z.number().nullish(),+ rewardAmount: z+ .number()+ .nullish()+ .meta({+ description:+ "The reward amount for the performance-based bounty. Applicable if the bounty reward amount is not set.",+ }),});export const rejectBountySubmissionBodySchema = z.object({diff --git a/apps/web/ui/modals/edit-customer-modal.tsx b/apps/web/ui/modals/edit-customer-modal.tsxindex abf0ec68d1..7596b07b49 100644--- a/apps/web/ui/modals/edit-customer-modal.tsx+++ b/apps/web/ui/modals/edit-customer-modal.tsx@@ -125,7 +125,6 @@ function EditCustomerModal({/></div>-<div><label className="text-content-emphasis text-sm font-normal">Stripe Customer IDdiff --git a/apps/web/ui/modals/mark-referral-qualified-modal.tsx b/apps/web/ui/modals/mark-referral-qualified-modal.tsxindex 3fc136bdc4..18cbc71405 100644--- a/apps/web/ui/modals/mark-referral-qualified-modal.tsx+++ b/apps/web/ui/modals/mark-referral-qualified-modal.tsx@@ -7,7 +7,14 @@ import { ReferralProps } from "@/lib/types";import { Button, Modal, useKeyboardShortcut } from "@dub/ui";import { cn } from "@dub/utils";import { useAction } from "next-safe-action/hooks";-import { Dispatch, SetStateAction, useCallback, useEffect, useRef, useState } from "react";+import {+ Dispatch,+ SetStateAction,+ useCallback,+ useEffect,+ useRef,+ useState,+} from "react";import { useForm } from "react-hook-form";import { toast } from "sonner";