The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Rearrange constants files (#3084)
Steven Tey590bb546d090
diff --git a/apps/web/app/(ee)/api/cron/payouts/process/process-payouts.ts b/apps/web/app/(ee)/api/cron/payouts/process/process-payouts.tsindex 3708f7fa6a..641ad00c76 100644--- a/apps/web/app/(ee)/api/cron/payouts/process/process-payouts.ts+++ b/apps/web/app/(ee)/api/cron/payouts/process/process-payouts.ts@@ -2,12 +2,12 @@ import { recordAuditLog } from "@/lib/api/audit-logs/record-audit-log";import { exceededLimitError } from "@/lib/api/errors";import { getEffectivePayoutMode } from "@/lib/api/payouts/get-effective-payout-mode";import { getPayoutEligibilityFilter } from "@/lib/api/payouts/payout-eligibility-filter";-import { queueBatchEmail } from "@/lib/email/queue-batch-email";import {DIRECT_DEBIT_PAYMENT_METHOD_TYPES,FAST_ACH_FEE_CENTS,FOREX_MARKUP_RATE,-} from "@/lib/partners/constants";+} from "@/lib/constants/payouts";+import { queueBatchEmail } from "@/lib/email/queue-batch-email";import {CUTOFF_PERIOD,CUTOFF_PERIOD_TYPES,diff --git a/apps/web/app/(ee)/api/embed/referrals/earnings/route.ts b/apps/web/app/(ee)/api/embed/referrals/earnings/route.tsindex 841b470014..d46ac0edff 100644--- a/apps/web/app/(ee)/api/embed/referrals/earnings/route.ts+++ b/apps/web/app/(ee)/api/embed/referrals/earnings/route.ts@@ -1,6 +1,6 @@+import { REFERRALS_EMBED_EARNINGS_LIMIT } from "@/lib/constants/misc";import { withReferralsEmbedToken } from "@/lib/embed/referrals/auth";import { generateRandomName } from "@/lib/names";-import { REFERRALS_EMBED_EARNINGS_LIMIT } from "@/lib/partners/constants";import { PartnerEarningsSchema } from "@/lib/zod/schemas/partner-profile";import { prisma } from "@dub/prisma";import { NextResponse } from "next/server";diff --git a/apps/web/app/(ee)/api/partner-profile/invites/route.ts b/apps/web/app/(ee)/api/partner-profile/invites/route.tsindex dbcbcea9fb..4ee2e75781 100644--- a/apps/web/app/(ee)/api/partner-profile/invites/route.ts+++ b/apps/web/app/(ee)/api/partner-profile/invites/route.ts@@ -5,7 +5,7 @@ import { withPartnerProfile } from "@/lib/auth/partner";import {MAX_INVITES_PER_REQUEST,MAX_PARTNER_USERS,-} from "@/lib/partners/constants";+} from "@/lib/constants/partner-profile";import {getPartnerUsersQuerySchema,invitePartnerUserSchema,diff --git a/apps/web/app/(ee)/api/partner-profile/programs/[programId]/analytics/route.ts b/apps/web/app/(ee)/api/partner-profile/programs/[programId]/analytics/route.tsindex c17a863db2..c5f7916df0 100644--- a/apps/web/app/(ee)/api/partner-profile/programs/[programId]/analytics/route.ts+++ b/apps/web/app/(ee)/api/partner-profile/programs/[programId]/analytics/route.ts@@ -2,7 +2,7 @@ import { getAnalytics } from "@/lib/analytics/get-analytics";import { DubApiError } from "@/lib/api/errors";import { getProgramEnrollmentOrThrow } from "@/lib/api/programs/get-program-enrollment-or-throw";import { withPartnerProfile } from "@/lib/auth/partner";-import { LARGE_PROGRAM_MIN_TOTAL_COMMISSIONS_CENTS } from "@/lib/partners/constants";+import { LARGE_PROGRAM_MIN_TOTAL_COMMISSIONS_CENTS } from "@/lib/constants/program";import { partnerProfileAnalyticsQuerySchema } from "@/lib/zod/schemas/partner-profile";import { NextResponse } from "next/server";diff --git a/apps/web/app/(ee)/api/partner-profile/programs/[programId]/customers/[customerId]/route.ts b/apps/web/app/(ee)/api/partner-profile/programs/[programId]/customers/[customerId]/route.tsindex 41ca8de224..381cf3ac96 100644--- a/apps/web/app/(ee)/api/partner-profile/programs/[programId]/customers/[customerId]/route.ts+++ b/apps/web/app/(ee)/api/partner-profile/programs/[programId]/customers/[customerId]/route.ts@@ -3,8 +3,8 @@ import { transformCustomer } from "@/lib/api/customers/transform-customer";import { DubApiError } from "@/lib/api/errors";import { getProgramEnrollmentOrThrow } from "@/lib/api/programs/get-program-enrollment-or-throw";import { withPartnerProfile } from "@/lib/auth/partner";+import { LARGE_PROGRAM_MIN_TOTAL_COMMISSIONS_CENTS } from "@/lib/constants/program";import { generateRandomName } from "@/lib/names";-import { LARGE_PROGRAM_MIN_TOTAL_COMMISSIONS_CENTS } from "@/lib/partners/constants";import { PartnerProfileCustomerSchema } from "@/lib/zod/schemas/partner-profile";import { prisma } from "@dub/prisma";import { NextResponse } from "next/server";diff --git a/apps/web/app/(ee)/api/partner-profile/programs/[programId]/events/route.ts b/apps/web/app/(ee)/api/partner-profile/programs/[programId]/events/route.tsindex 3cfa7e768b..cb1af82131 100644--- a/apps/web/app/(ee)/api/partner-profile/programs/[programId]/events/route.ts+++ b/apps/web/app/(ee)/api/partner-profile/programs/[programId]/events/route.ts@@ -2,8 +2,8 @@ import { getEvents } from "@/lib/analytics/get-events";import { DubApiError } from "@/lib/api/errors";import { getProgramEnrollmentOrThrow } from "@/lib/api/programs/get-program-enrollment-or-throw";import { withPartnerProfile } from "@/lib/auth/partner";+import { LARGE_PROGRAM_MIN_TOTAL_COMMISSIONS_CENTS } from "@/lib/constants/program";import { generateRandomName } from "@/lib/names";-import { LARGE_PROGRAM_MIN_TOTAL_COMMISSIONS_CENTS } from "@/lib/partners/constants";import {PartnerProfileLinkSchema,partnerProfileEventsQuerySchema,diff --git a/apps/web/app/(ee)/api/stripe/webhook/utils/process-payout-invoice-failure.ts b/apps/web/app/(ee)/api/stripe/webhook/utils/process-payout-invoice-failure.tsindex 361694764d..ded6599952 100644--- a/apps/web/app/(ee)/api/stripe/webhook/utils/process-payout-invoice-failure.ts+++ b/apps/web/app/(ee)/api/stripe/webhook/utils/process-payout-invoice-failure.ts@@ -1,7 +1,7 @@import {DIRECT_DEBIT_PAYMENT_METHOD_TYPES,PAYOUT_FAILURE_FEE_CENTS,-} from "@/lib/partners/constants";+} from "@/lib/constants/payouts";import { createPaymentIntent } from "@/lib/stripe/create-payment-intent";import { sendBatchEmail } from "@dub/email";import PartnerPayoutFailed from "@dub/email/templates/partner-payout-failed";diff --git a/apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/partners/form.tsx b/apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/partners/form.tsxindex f982aa3597..2d3f6c6e06 100644--- a/apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/partners/form.tsx+++ b/apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/partners/form.tsx@@ -1,7 +1,7 @@"use client";import { onboardProgramAction } from "@/lib/actions/partners/onboard-program";-import { PROGRAM_ONBOARDING_PARTNERS_LIMIT } from "@/lib/partners/constants";+import { PROGRAM_ONBOARDING_PARTNERS_LIMIT } from "@/lib/constants/program";import useWorkspace from "@/lib/swr/use-workspace";import { ProgramData } from "@/lib/types";import { Button, Input } from "@dub/ui";diff --git a/apps/web/app/(ee)/app.dub.co/embed/referrals/earnings.tsx b/apps/web/app/(ee)/app.dub.co/embed/referrals/earnings.tsxindex e82bc58c0c..dd14e0a2f7 100644--- a/apps/web/app/(ee)/app.dub.co/embed/referrals/earnings.tsx+++ b/apps/web/app/(ee)/app.dub.co/embed/referrals/earnings.tsx@@ -1,4 +1,4 @@-import { REFERRALS_EMBED_EARNINGS_LIMIT } from "@/lib/partners/constants";+import { REFERRALS_EMBED_EARNINGS_LIMIT } from "@/lib/constants/misc";import { PartnerEarningsResponse } from "@/lib/types";import { CommissionStatusBadges } from "@/ui/partners/commission-status-badges";import {diff --git a/apps/web/app/(ee)/app.dub.co/invoices/[invoiceId]/partner-payout-invoice.tsx b/apps/web/app/(ee)/app.dub.co/invoices/[invoiceId]/partner-payout-invoice.tsxindex 12bb6c9048..1eeff7d803 100644--- a/apps/web/app/(ee)/app.dub.co/invoices/[invoiceId]/partner-payout-invoice.tsx+++ b/apps/web/app/(ee)/app.dub.co/invoices/[invoiceId]/partner-payout-invoice.tsx@@ -1,4 +1,4 @@-import { FAST_ACH_FEE_CENTS } from "@/lib/partners/constants";+import { FAST_ACH_FEE_CENTS } from "@/lib/constants/payouts";import { stripe } from "@/lib/stripe";import { prisma } from "@dub/prisma";import {diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/partner-payout-details-sheet.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/partner-payout-details-sheet.tsxindex 855d98e28a..6531fcc1a1 100644--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/partner-payout-details-sheet.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/partner-payout-details-sheet.tsx@@ -1,7 +1,7 @@import {INVOICE_AVAILABLE_PAYOUT_STATUSES,PAYOUTS_SHEET_ITEMS_LIMIT,-} from "@/lib/partners/constants";+} from "@/lib/constants/payouts";import usePartnerProfile from "@/lib/swr/use-partner-profile";import { PartnerEarningsResponse, PartnerPayoutResponse } from "@/lib/types";import { CommissionTypeIcon } from "@/ui/partners/comission-type-icon";diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/payout-stats.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/payout-stats.tsxindex b1f4641021..dbe1b5a08d 100644--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/payout-stats.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/payout-stats.tsx@@ -4,7 +4,7 @@ import { forceWithdrawalAction } from "@/lib/actions/partners/force-withdrawal";import {BELOW_MIN_WITHDRAWAL_FEE_CENTS,MIN_WITHDRAWAL_AMOUNT_CENTS,-} from "@/lib/partners/constants";+} from "@/lib/constants/payouts";import usePartnerPayoutsCount from "@/lib/swr/use-partner-payouts-count";import usePartnerProfile from "@/lib/swr/use-partner-profile";import { PayoutsCount } from "@/lib/types";diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/payout-table.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/payout-table.tsxindex 8fc5b421e8..d3b5588e04 100644--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/payout-table.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/payout-table.tsx@@ -1,6 +1,6 @@"use client";-import { INVOICE_AVAILABLE_PAYOUT_STATUSES } from "@/lib/partners/constants";+import { INVOICE_AVAILABLE_PAYOUT_STATUSES } from "@/lib/constants/payouts";import usePartnerPayouts from "@/lib/swr/use-partner-payouts";import usePartnerPayoutsCount from "@/lib/swr/use-partner-payouts-count";import { PartnerPayoutResponse } from "@/lib/types";diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/customers/[customerId]/page-client.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/customers/[customerId]/page-client.tsxindex d4294b4866..eb5511cc40 100644--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/customers/[customerId]/page-client.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/customers/[customerId]/page-client.tsx@@ -1,6 +1,6 @@"use client";-import { CUSTOMER_PAGE_EVENTS_LIMIT } from "@/lib/partners/constants";+import { CUSTOMER_PAGE_EVENTS_LIMIT } from "@/lib/constants/misc";import usePartnerCustomer from "@/lib/swr/use-partner-customer";import useProgramEnrollment from "@/lib/swr/use-program-enrollment";import { PartnerEarningsResponse } from "@/lib/types";diff --git a/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsx b/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsxindex cf96c48d08..8b2abb82dc 100644--- a/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsx+++ b/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsx@@ -1,6 +1,6 @@import { DubApiError } from "@/lib/api/errors";import { withPartnerProfile } from "@/lib/auth/partner";-import { INVOICE_AVAILABLE_PAYOUT_STATUSES } from "@/lib/partners/constants";+import { INVOICE_AVAILABLE_PAYOUT_STATUSES } from "@/lib/constants/payouts";import { prisma } from "@dub/prisma";import {currencyFormatter,@@ -252,7 +252,7 @@ export const GET = withPartnerProfile(async ({ partner, params }) => {</Document>,);- return new Response(pdf, {+ return new Response(new Uint8Array(pdf), {headers: {"Content-Type": "application/pdf","Content-Disposition": `inline; filename="payout-invoice-${payout.id}.pdf"`,diff --git a/apps/web/app/api/workspaces/[idOrSlug]/billing/payment-methods/route.ts b/apps/web/app/api/workspaces/[idOrSlug]/billing/payment-methods/route.tsindex 6943a9fd96..be46b7f27d 100644--- a/apps/web/app/api/workspaces/[idOrSlug]/billing/payment-methods/route.ts+++ b/apps/web/app/api/workspaces/[idOrSlug]/billing/payment-methods/route.ts@@ -5,7 +5,7 @@ import {DIRECT_DEBIT_PAYMENT_METHOD_TYPES,DIRECT_DEBIT_PAYMENT_TYPES_INFO,PAYMENT_METHOD_TYPES,-} from "@/lib/partners/constants";+} from "@/lib/constants/payouts";import { stripe } from "@/lib/stripe";import { APP_DOMAIN } from "@dub/utils";import { NextResponse } from "next/server";diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/customers/[customerId]/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/customers/[customerId]/page-client.tsxindex 47e7c0bff7..a128b26e03 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/customers/[customerId]/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/customers/[customerId]/page-client.tsx@@ -1,6 +1,6 @@"use client";-import { CUSTOMER_PAGE_EVENTS_LIMIT } from "@/lib/partners/constants";+import { CUSTOMER_PAGE_EVENTS_LIMIT } from "@/lib/constants/misc";import useCustomer from "@/lib/swr/use-customer";import useWorkspace from "@/lib/swr/use-workspace";import {diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-details-sheet.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-details-sheet.tsxindex 857fcc47ed..0f460c3130 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-details-sheet.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-details-sheet.tsx@@ -1,11 +1,11 @@"use client";import { approveBountySubmissionAction } from "@/lib/actions/partners/approve-bounty-submission";+import { REJECT_BOUNTY_SUBMISSION_REASONS } from "@/lib/constants/bounties";import { mutatePrefix } from "@/lib/swr/mutate";import useBounty from "@/lib/swr/use-bounty";import useWorkspace from "@/lib/swr/use-workspace";import { BountySubmissionProps } from "@/lib/types";-import { REJECT_BOUNTY_SUBMISSION_REASONS } from "@/lib/zod/schemas/bounties";import { useConfirmModal } from "@/ui/modals/confirm-modal";import { PartnerInfoSection } from "@/ui/partners/partner-info-section";import { useRejectBountySubmissionModal } from "@/ui/partners/reject-bounty-submission-modal";diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty-sheet.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty-sheet.tsxindex 896d23e536..984a61d7ed 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty-sheet.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty-sheet.tsx@@ -1,6 +1,6 @@import { generatePerformanceBountyName } from "@/lib/api/bounties/generate-performance-bounty-name";import { isCurrencyAttribute } from "@/lib/api/workflows/utils";-import { BOUNTY_DESCRIPTION_MAX_LENGTH } from "@/lib/partners/constants";+import { BOUNTY_DESCRIPTION_MAX_LENGTH } from "@/lib/constants/bounties";import { mutatePrefix } from "@/lib/swr/mutate";import { useApiMutation } from "@/lib/swr/use-api-mutation";import useProgram from "@/lib/swr/use-program";diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/import-export-buttons.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/import-export-buttons.tsxindex ba4325a131..ce21246278 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/import-export-buttons.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/import-export-buttons.tsx@@ -1,6 +1,6 @@"use client";-import { PROGRAM_IMPORT_SOURCES } from "@/lib/partners/constants";+import { PROGRAM_IMPORT_SOURCES } from "@/lib/constants/program";import useWorkspace from "@/lib/swr/use-workspace";import { useExportPartnersModal } from "@/ui/modals/export-partners-modal";import { useImportFirstPromoterModal } from "@/ui/modals/import-firstpromoter-modal";diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/payouts/payout-details-sheet.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/payouts/payout-details-sheet.tsxindex 8b546c40ac..ccba54741a 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/payouts/payout-details-sheet.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/payouts/payout-details-sheet.tsx@@ -1,4 +1,4 @@-import { PAYOUTS_SHEET_ITEMS_LIMIT } from "@/lib/partners/constants";+import { PAYOUTS_SHEET_ITEMS_LIMIT } from "@/lib/constants/payouts";import useWorkspace from "@/lib/swr/use-workspace";import { CommissionResponse, PayoutResponse } from "@/lib/types";import { CommissionTypeIcon } from "@/ui/partners/comission-type-icon";diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/payouts/program-payout-settings-sheet.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/payouts/program-payout-settings-sheet.tsxindex e54ad270e8..8221320cc8 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/payouts/program-payout-settings-sheet.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/payouts/program-payout-settings-sheet.tsx@@ -2,7 +2,7 @@import { parseActionError } from "@/lib/actions/parse-action-errors";import { updateProgramAction } from "@/lib/actions/partners/update-program";-import { ALLOWED_MIN_PAYOUT_AMOUNTS } from "@/lib/partners/constants";+import { ALLOWED_MIN_PAYOUT_AMOUNTS } from "@/lib/constants/payouts";import { mutatePrefix } from "@/lib/swr/mutate";import useProgram from "@/lib/swr/use-program";import useWorkspace from "@/lib/swr/use-workspace";diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/invoices/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/invoices/page-client.tsxindex 4dc5248584..727c169cad 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/invoices/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/invoices/page-client.tsx@@ -1,6 +1,6 @@"use client";-import { INVOICE_PAYMENT_METHODS } from "@/lib/partners/constants";+import { INVOICE_PAYMENT_METHODS } from "@/lib/constants/payouts";import useWorkspace from "@/lib/swr/use-workspace";import { InvoiceProps } from "@/lib/types";import { PayoutStatusBadges } from "@/ui/partners/payout-status-badges";diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/payment-methods.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/payment-methods.tsxindex 91678c6806..5e817fd967 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/payment-methods.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/payment-methods.tsx@@ -1,6 +1,6 @@"use client";-import { DIRECT_DEBIT_PAYMENT_METHOD_TYPES } from "@/lib/partners/constants";+import { DIRECT_DEBIT_PAYMENT_METHOD_TYPES } from "@/lib/constants/payouts";import usePaymentMethods from "@/lib/swr/use-payment-methods";import useWorkspace from "@/lib/swr/use-workspace";import { useAddPaymentMethodModal } from "@/ui/modals/add-payment-method-modal";diff --git a/apps/web/lib/actions/partners/confirm-payouts.ts b/apps/web/lib/actions/partners/confirm-payouts.tsindex 3368ca7cd5..adf7b06d62 100644--- a/apps/web/lib/actions/partners/confirm-payouts.ts+++ b/apps/web/lib/actions/partners/confirm-payouts.ts@@ -5,11 +5,11 @@ import { exceededLimitError } from "@/lib/api/errors";import { getEligiblePayouts } from "@/lib/api/payouts/get-eligible-payouts";import { getDefaultProgramIdOrThrow } from "@/lib/api/programs/get-default-program-id-or-throw";import { getProgramOrThrow } from "@/lib/api/programs/get-program-or-throw";-import { qstash } from "@/lib/cron";import {PAYMENT_METHOD_TYPES,STRIPE_PAYMENT_METHOD_NORMALIZATION,-} from "@/lib/partners/constants";+} from "@/lib/constants/payouts";+import { qstash } from "@/lib/cron";import { CUTOFF_PERIOD_ENUM } from "@/lib/partners/cutoff-period";import { stripe } from "@/lib/stripe";import { getWebhooks } from "@/lib/webhook/get-webhooks";diff --git a/apps/web/lib/actions/partners/create-bounty-submission.ts b/apps/web/lib/actions/partners/create-bounty-submission.tsindex 4f1d351f43..0f8c5631a2 100644--- a/apps/web/lib/actions/partners/create-bounty-submission.ts+++ b/apps/web/lib/actions/partners/create-bounty-submission.ts@@ -3,11 +3,13 @@import { createId } from "@/lib/api/create-id";import { getWorkspaceUsers } from "@/lib/api/get-workspace-users";import { getProgramEnrollmentOrThrow } from "@/lib/api/programs/get-program-enrollment-or-throw";+import {+ BOUNTY_MAX_SUBMISSION_DESCRIPTION_LENGTH,+ BOUNTY_MAX_SUBMISSION_FILES,+ BOUNTY_MAX_SUBMISSION_URLS,+} from "@/lib/constants/bounties";import {BountySubmissionFileSchema,- MAX_BOUNTY_SUBMISSION_DESCRIPTION_LENGTH,- MAX_SUBMISSION_FILES,- MAX_SUBMISSION_URLS,submissionRequirementsSchema,} from "@/lib/zod/schemas/bounties";import { sendBatchEmail, sendEmail } from "@dub/email";@@ -25,13 +27,13 @@ const schema = z.object({bountyId: z.string(),files: z.array(BountySubmissionFileSchema)- .max(MAX_SUBMISSION_FILES)+ .max(BOUNTY_MAX_SUBMISSION_FILES).default([]),- urls: z.array(z.string().url()).max(MAX_SUBMISSION_URLS).default([]),+ urls: z.array(z.string().url()).max(BOUNTY_MAX_SUBMISSION_URLS).default([]),description: z.string().trim()- .max(MAX_BOUNTY_SUBMISSION_DESCRIPTION_LENGTH)+ .max(BOUNTY_MAX_SUBMISSION_DESCRIPTION_LENGTH).optional(),isDraft: z.boolean()diff --git a/apps/web/lib/actions/partners/reject-bounty-submission.ts b/apps/web/lib/actions/partners/reject-bounty-submission.tsindex b0ad2bdbe7..3fe0c1b061 100644--- a/apps/web/lib/actions/partners/reject-bounty-submission.ts+++ b/apps/web/lib/actions/partners/reject-bounty-submission.ts@@ -2,9 +2,9 @@import { recordAuditLog } from "@/lib/api/audit-logs/record-audit-log";import { getDefaultProgramIdOrThrow } from "@/lib/api/programs/get-default-program-id-or-throw";+import { REJECT_BOUNTY_SUBMISSION_REASONS } from "@/lib/constants/bounties";import {BountySubmissionSchema,- REJECT_BOUNTY_SUBMISSION_REASONS,rejectBountySubmissionSchema,} from "@/lib/zod/schemas/bounties";import { sendEmail } from "@dub/email";diff --git a/apps/web/lib/constants/bounties.ts b/apps/web/lib/constants/bounties.tsnew file mode 100644index 0000000000..e14b058540--- /dev/null+++ b/apps/web/lib/constants/bounties.ts@@ -0,0 +1,19 @@+export const BOUNTY_DESCRIPTION_MAX_LENGTH = 5000;++export const BOUNTY_MAX_SUBMISSION_FILES = 4;++export const BOUNTY_MAX_SUBMISSION_URLS = 100;++export const BOUNTY_MAX_SUBMISSION_DESCRIPTION_LENGTH = 1000;++export const BOUNTY_MAX_SUBMISSION_REJECTION_NOTE_LENGTH = 5000;++export const BOUNTY_SUBMISSION_REQUIREMENTS = ["image", "url"] as const;++export const REJECT_BOUNTY_SUBMISSION_REASONS = {+ invalidProof: "Invalid proof",+ duplicateSubmission: "Duplicate submission",+ outOfTimeWindow: "Out of time window",+ didNotMeetCriteria: "Did not meet criteria",+ other: "Other",+} as const;diff --git a/apps/web/lib/constants/misc.ts b/apps/web/lib/constants/misc.tsnew file mode 100644index 0000000000..81fd4ad23b--- /dev/null+++ b/apps/web/lib/constants/misc.ts@@ -0,0 +1,2 @@+export const REFERRALS_EMBED_EARNINGS_LIMIT = 8;+export const CUSTOMER_PAGE_EVENTS_LIMIT = 8;diff --git a/apps/web/lib/constants/partner-profile.ts b/apps/web/lib/constants/partner-profile.tsnew file mode 100644index 0000000000..ed9b55214a--- /dev/null+++ b/apps/web/lib/constants/partner-profile.ts@@ -0,0 +1,2 @@+export const MAX_INVITES_PER_REQUEST = 5;+export const MAX_PARTNER_USERS = 10;diff --git a/apps/web/lib/partners/constants.ts b/apps/web/lib/constants/payouts.tssimilarity index 67%rename from apps/web/lib/partners/constants.tsrename to apps/web/lib/constants/payouts.tsindex fc05dcad26..fab66acd78 100644--- a/apps/web/lib/partners/constants.ts+++ b/apps/web/lib/constants/payouts.ts@@ -1,14 +1,7 @@import Stripe from "stripe";import { PaymentMethodOption } from "../types";-export const PROGRAM_ONBOARDING_PARTNERS_LIMIT = 5;export const PAYOUTS_SHEET_ITEMS_LIMIT = 10;-export const BOUNTY_DESCRIPTION_MAX_LENGTH = 5000;-export const REFERRALS_EMBED_EARNINGS_LIMIT = 8;-export const CUSTOMER_PAGE_EVENTS_LIMIT = 8;--export const LARGE_PROGRAM_MIN_TOTAL_COMMISSIONS_CENTS = 500000; // $5000-export const PAYOUT_FAILURE_FEE_CENTS = 1000; // 10 USDexport const FAST_ACH_FEE_CENTS = 2500; // $25export const FOREX_MARKUP_RATE = 0.005; // 0.5%@@ -17,9 +10,6 @@ export const ALLOWED_MIN_PAYOUT_AMOUNTS = [0, 1000, 2000, 5000, 10000];export const MIN_WITHDRAWAL_AMOUNT_CENTS = 1000; // $10export const BELOW_MIN_WITHDRAWAL_FEE_CENTS = 50; // $0.50-export const MAX_INVITES_PER_REQUEST = 5;-export const MAX_PARTNER_USERS = 10;-// Direct debit payment types for Partner payoutexport const DIRECT_DEBIT_PAYMENT_TYPES_INFO: {type: Stripe.PaymentMethod.Type;@@ -109,30 +99,3 @@ export const INVOICE_AVAILABLE_PAYOUT_STATUSES = ["sent","completed",];--export const PROGRAM_IMPORT_SOURCES = [- {- id: "rewardful",- value: "Rewardful",- image: "https://assets.dub.co/misc/icons/rewardful.svg",- helpUrl: "https://dub.co/help/article/migrating-from-rewardful",- },- {- id: "tolt",- value: "Tolt",- image: "https://assets.dub.co/misc/icons/tolt.svg",- helpUrl: "https://dub.co/help/article/migrating-from-tolt",- },- {- id: "partnerstack",- value: "PartnerStack",- image: "https://assets.dub.co/misc/icons/partnerstack.svg",- helpUrl: "https://dub.co/help/article/migrating-from-partnerstack",- },- {- id: "firstpromoter",- value: "FirstPromoter",- image: "https://assets.dub.co/misc/icons/firstpromoter.svg",- helpUrl: "https://dub.co/help/article/migrating-from-firstpromoter",- },-] as const;diff --git a/apps/web/lib/constants/program.ts b/apps/web/lib/constants/program.tsnew file mode 100644index 0000000000..e27083fddd--- /dev/null+++ b/apps/web/lib/constants/program.ts@@ -0,0 +1,29 @@+export const PROGRAM_ONBOARDING_PARTNERS_LIMIT = 5;+export const LARGE_PROGRAM_MIN_TOTAL_COMMISSIONS_CENTS = 500000; // $5000++export const PROGRAM_IMPORT_SOURCES = [+ {+ id: "rewardful",+ value: "Rewardful",+ image: "https://assets.dub.co/misc/icons/rewardful.svg",+ helpUrl: "https://dub.co/help/article/migrating-from-rewardful",+ },+ {+ id: "tolt",+ value: "Tolt",+ image: "https://assets.dub.co/misc/icons/tolt.svg",+ helpUrl: "https://dub.co/help/article/migrating-from-tolt",+ },+ {+ id: "partnerstack",+ value: "PartnerStack",+ image: "https://assets.dub.co/misc/icons/partnerstack.svg",+ helpUrl: "https://dub.co/help/article/migrating-from-partnerstack",+ },+ {+ id: "firstpromoter",+ value: "FirstPromoter",+ image: "https://assets.dub.co/misc/icons/firstpromoter.svg",+ helpUrl: "https://dub.co/help/article/migrating-from-firstpromoter",+ },+] as const;diff --git a/apps/web/lib/partners/create-stripe-transfer.ts b/apps/web/lib/partners/create-stripe-transfer.tsindex c9bbf2c03b..adf2dfc178 100644--- a/apps/web/lib/partners/create-stripe-transfer.ts+++ b/apps/web/lib/partners/create-stripe-transfer.ts@@ -1,11 +1,11 @@+import {+ BELOW_MIN_WITHDRAWAL_FEE_CENTS,+ MIN_WITHDRAWAL_AMOUNT_CENTS,+} from "@/lib/constants/payouts";import { stripe } from "@/lib/stripe";import { prisma } from "@dub/prisma";import { Partner, Payout } from "@dub/prisma/client";import { currencyFormatter, pluralize } from "@dub/utils";-import {- BELOW_MIN_WITHDRAWAL_FEE_CENTS,- MIN_WITHDRAWAL_AMOUNT_CENTS,-} from "./constants";type PayoutWithProgramName = Pick<Payout, "id" | "amount" | "invoiceId"> & {program: {diff --git a/apps/web/lib/stripe/payment-methods.ts b/apps/web/lib/stripe/payment-methods.tsindex d3354325d6..dcead78273 100644--- a/apps/web/lib/stripe/payment-methods.ts+++ b/apps/web/lib/stripe/payment-methods.ts@@ -1,6 +1,6 @@+import { DIRECT_DEBIT_PAYMENT_METHOD_TYPES } from "@/lib/constants/payouts";import { CreditCard, GreekTemple } from "@dub/ui";import Stripe from "stripe";-import { DIRECT_DEBIT_PAYMENT_METHOD_TYPES } from "../partners/constants";export const calculatePayoutFeeForMethod = ({paymentMethod,diff --git a/apps/web/lib/swr/use-program-enrollment.ts b/apps/web/lib/swr/use-program-enrollment.tsindex 4e96d968f0..42c89e5a8c 100644--- a/apps/web/lib/swr/use-program-enrollment.ts+++ b/apps/web/lib/swr/use-program-enrollment.ts@@ -1,8 +1,8 @@+import { LARGE_PROGRAM_MIN_TOTAL_COMMISSIONS_CENTS } from "@/lib/constants/program";import { fetcher } from "@dub/utils";import { useSession } from "next-auth/react";import { useParams } from "next/navigation";import useSWR, { SWRConfiguration } from "swr";-import { LARGE_PROGRAM_MIN_TOTAL_COMMISSIONS_CENTS } from "../partners/constants";import { ProgramEnrollmentProps } from "../types";export default function useProgramEnrollment({diff --git a/apps/web/lib/types.ts b/apps/web/lib/types.tsindex b49fffb29f..27650254f5 100644--- a/apps/web/lib/types.ts+++ b/apps/web/lib/types.ts@@ -23,6 +23,7 @@ import {} from "@dub/prisma/client";import { z } from "zod";import { RESOURCE_COLORS } from "../ui/colors";+import { BOUNTY_SUBMISSION_REQUIREMENTS } from "./constants/bounties";import {FOLDER_PERMISSIONS,FOLDER_WORKSPACE_ACCESS,@@ -33,7 +34,6 @@ import {BountySchema,BountySubmissionExtendedSchema,getBountySubmissionsQuerySchema,- SUBMISSION_REQUIREMENTS,} from "./zod/schemas/bounties";import {CampaignListSchema,@@ -591,7 +591,7 @@ export type BountySubmissionProps = z.infer<>;export type BountySubmissionRequirement =- (typeof SUBMISSION_REQUIREMENTS)[number];+ (typeof BOUNTY_SUBMISSION_REQUIREMENTS)[number];export type WorkflowCondition = z.infer<typeof workflowConditionSchema>;diff --git a/apps/web/lib/zod/schemas/bounties.ts b/apps/web/lib/zod/schemas/bounties.tsindex 9423298390..db6028aaff 100644--- a/apps/web/lib/zod/schemas/bounties.ts+++ b/apps/web/lib/zod/schemas/bounties.ts@@ -1,4 +1,8 @@-import { BOUNTY_DESCRIPTION_MAX_LENGTH } from "@/lib/partners/constants";+import {+ BOUNTY_DESCRIPTION_MAX_LENGTH,+ BOUNTY_MAX_SUBMISSION_REJECTION_NOTE_LENGTH,+ BOUNTY_SUBMISSION_REQUIREMENTS,+} from "@/lib/constants/bounties";import {BountyPerformanceScope,BountySubmissionRejectionReason,@@ -14,26 +18,8 @@ import { UserSchema } from "./users";import { parseDateSchema } from "./utils";import { workflowConditionSchema } from "./workflows";-export const SUBMISSION_REQUIREMENTS = ["image", "url"] as const;--export const MAX_SUBMISSION_FILES = 4;--export const MAX_SUBMISSION_URLS = 20;--export const MAX_BOUNTY_SUBMISSION_DESCRIPTION_LENGTH = 1000;--export const MAX_BOUNTY_SUBMISSION_REJECTION_NOTE_LENGTH = 5000;--export const REJECT_BOUNTY_SUBMISSION_REASONS = {- invalidProof: "Invalid proof",- duplicateSubmission: "Duplicate submission",- outOfTimeWindow: "Out of time window",- didNotMeetCriteria: "Did not meet criteria",- other: "Other",-} as const;-export const submissionRequirementsSchema = z- .array(z.enum(SUBMISSION_REQUIREMENTS))+ .array(z.enum(BOUNTY_SUBMISSION_REQUIREMENTS)).min(0).max(2);@@ -168,7 +154,7 @@ export const rejectBountySubmissionSchema = z.object({rejectionNote: z.string().trim()- .max(MAX_BOUNTY_SUBMISSION_REJECTION_NOTE_LENGTH)+ .max(BOUNTY_MAX_SUBMISSION_REJECTION_NOTE_LENGTH).optional(),});diff --git a/apps/web/lib/zod/schemas/program-onboarding.ts b/apps/web/lib/zod/schemas/program-onboarding.tsindex cb2d0cfb69..b7771583c3 100644--- a/apps/web/lib/zod/schemas/program-onboarding.ts+++ b/apps/web/lib/zod/schemas/program-onboarding.ts@@ -1,4 +1,4 @@-import { PROGRAM_ONBOARDING_PARTNERS_LIMIT } from "@/lib/partners/constants";+import { PROGRAM_ONBOARDING_PARTNERS_LIMIT } from "@/lib/constants/program";import { PartnerLinkStructure, RewardStructure } from "@dub/prisma/client";import { z } from "zod";import { maxDurationSchema } from "./misc";diff --git a/apps/web/lib/zod/schemas/programs.ts b/apps/web/lib/zod/schemas/programs.tsindex 698c39aa15..b78809c6f3 100644--- a/apps/web/lib/zod/schemas/programs.ts+++ b/apps/web/lib/zod/schemas/programs.ts@@ -2,7 +2,7 @@ import {DATE_RANGE_INTERVAL_PRESETS,DUB_PARTNERS_ANALYTICS_INTERVAL,} from "@/lib/analytics/constants";-import { ALLOWED_MIN_PAYOUT_AMOUNTS } from "@/lib/partners/constants";+import { ALLOWED_MIN_PAYOUT_AMOUNTS } from "@/lib/constants/payouts";import {EventType,PartnerBannedReason,diff --git a/apps/web/scripts/migrations/backfill-invoice-payment-method.ts b/apps/web/scripts/migrations/backfill-invoice-payment-method.tsindex e9f2ee37d7..3390eedc9f 100644--- a/apps/web/scripts/migrations/backfill-invoice-payment-method.ts+++ b/apps/web/scripts/migrations/backfill-invoice-payment-method.ts@@ -1,4 +1,4 @@-import { STRIPE_PAYMENT_METHOD_NORMALIZATION } from "@/lib/partners/constants";+import { STRIPE_PAYMENT_METHOD_NORMALIZATION } from "@/lib/constants/payouts";import { prisma } from "@dub/prisma";import { Invoice } from "@dub/prisma/client";import "dotenv-flow/config";diff --git a/apps/web/scripts/stripe/fix-processed-payouts.ts b/apps/web/scripts/stripe/fix-processed-payouts.tsindex ec6fb12d6f..3b2ab77fef 100644--- a/apps/web/scripts/stripe/fix-processed-payouts.ts+++ b/apps/web/scripts/stripe/fix-processed-payouts.ts@@ -1,4 +1,4 @@-import { MIN_WITHDRAWAL_AMOUNT_CENTS } from "@/lib/partners/constants";+import { MIN_WITHDRAWAL_AMOUNT_CENTS } from "@/lib/constants/payouts";import { prisma } from "@dub/prisma";import { currencyFormatter } from "@dub/utils";import "dotenv-flow/config";diff --git a/apps/web/ui/modals/add-payment-method-modal.tsx b/apps/web/ui/modals/add-payment-method-modal.tsxindex 9232bf53d7..45e0b20caf 100644--- a/apps/web/ui/modals/add-payment-method-modal.tsx+++ b/apps/web/ui/modals/add-payment-method-modal.tsx@@ -1,6 +1,6 @@"use client";-import { DIRECT_DEBIT_PAYMENT_TYPES_INFO } from "@/lib/partners/constants";+import { DIRECT_DEBIT_PAYMENT_TYPES_INFO } from "@/lib/constants/payouts";import useWorkspace from "@/lib/swr/use-workspace";import { X } from "@/ui/shared/icons";import { AnimatedSizeContainer, GreekTemple, Modal } from "@dub/ui";diff --git a/apps/web/ui/modals/invite-partner-user-modal.tsx b/apps/web/ui/modals/invite-partner-user-modal.tsxindex 273f613bb4..420d188e67 100644--- a/apps/web/ui/modals/invite-partner-user-modal.tsx+++ b/apps/web/ui/modals/invite-partner-user-modal.tsx@@ -1,4 +1,4 @@-import { MAX_INVITES_PER_REQUEST } from "@/lib/partners/constants";+import { MAX_INVITES_PER_REQUEST } from "@/lib/constants/partner-profile";import { mutatePrefix } from "@/lib/swr/mutate";import usePartnerProfile from "@/lib/swr/use-partner-profile";import { invitePartnerUserSchema } from "@/lib/zod/schemas/partner-profile";diff --git a/apps/web/ui/partners/bounties/claim-bounty-modal.tsx b/apps/web/ui/partners/bounties/claim-bounty-modal.tsxindex 410e8bacf3..4400a9f8f7 100644--- a/apps/web/ui/partners/bounties/claim-bounty-modal.tsx+++ b/apps/web/ui/partners/bounties/claim-bounty-modal.tsx@@ -1,15 +1,15 @@import { createBountySubmissionAction } from "@/lib/actions/partners/create-bounty-submission";import { uploadBountySubmissionFileAction } from "@/lib/actions/partners/upload-bounty-submission-file";+import {+ BOUNTY_MAX_SUBMISSION_DESCRIPTION_LENGTH,+ BOUNTY_MAX_SUBMISSION_FILES,+ BOUNTY_MAX_SUBMISSION_URLS,+ REJECT_BOUNTY_SUBMISSION_REASONS,+} from "@/lib/constants/bounties";import { getBountyRewardDescription } from "@/lib/partners/get-bounty-reward-description";import { mutatePrefix } from "@/lib/swr/mutate";import useProgramEnrollment from "@/lib/swr/use-program-enrollment";import { PartnerBountyProps } from "@/lib/types";-import {- MAX_BOUNTY_SUBMISSION_DESCRIPTION_LENGTH,- MAX_SUBMISSION_FILES,- MAX_SUBMISSION_URLS,- REJECT_BOUNTY_SUBMISSION_REASONS,-} from "@/lib/zod/schemas/bounties";import { useConfirmModal } from "@/ui/modals/confirm-modal";import { X } from "@/ui/shared/icons";import { Markdown } from "@/ui/shared/markdown";@@ -500,7 +500,9 @@ function ClaimBountyModalContent({ bounty }: ClaimBountyModalProps) {onChange={async ({ file }) =>await handleUpload(file)}- disabled={files.length >= MAX_SUBMISSION_FILES}+ disabled={+ files.length >= BOUNTY_MAX_SUBMISSION_FILES+ }maxFileSizeMB={5}/></div>@@ -551,7 +553,7 @@ function ClaimBountyModalContent({ bounty }: ClaimBountyModalProps) {)}</div>))}- {urls.length < MAX_SUBMISSION_URLS && (+ {urls.length < BOUNTY_MAX_SUBMISSION_URLS && (<Buttonvariant="secondary"text="Add URL"@@ -584,13 +586,13 @@ function ClaimBountyModalContent({ bounty }: ClaimBountyModalProps) {"border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500",)}minRows={2}- maxLength={MAX_BOUNTY_SUBMISSION_DESCRIPTION_LENGTH}+ maxLength={BOUNTY_MAX_SUBMISSION_DESCRIPTION_LENGTH}value={description}onChange={(e) => {const value = e.target.value;if (value.length <=- MAX_BOUNTY_SUBMISSION_DESCRIPTION_LENGTH+ BOUNTY_MAX_SUBMISSION_DESCRIPTION_LENGTH) {setDescription(value);}@@ -598,9 +600,9 @@ function ClaimBountyModalContent({ bounty }: ClaimBountyModalProps) {/><div className="mt-1 text-left"><span className="text-xs text-neutral-500">- {MAX_BOUNTY_SUBMISSION_DESCRIPTION_LENGTH -+ {BOUNTY_MAX_SUBMISSION_DESCRIPTION_LENGTH -description.length}{" "}- / {MAX_BOUNTY_SUBMISSION_DESCRIPTION_LENGTH}+ / {BOUNTY_MAX_SUBMISSION_DESCRIPTION_LENGTH}</span></div></div>diff --git a/apps/web/ui/partners/confirm-payouts-sheet.tsx b/apps/web/ui/partners/confirm-payouts-sheet.tsxindex 07c2fc5cf0..b3c757c44c 100644--- a/apps/web/ui/partners/confirm-payouts-sheet.tsx+++ b/apps/web/ui/partners/confirm-payouts-sheet.tsx@@ -4,7 +4,7 @@ import { clientAccessCheck } from "@/lib/api/tokens/permissions";import {DIRECT_DEBIT_PAYMENT_METHOD_TYPES,FAST_ACH_FEE_CENTS,-} from "@/lib/partners/constants";+} from "@/lib/constants/payouts";import {CUTOFF_PERIOD,CUTOFF_PERIOD_TYPES,diff --git a/apps/web/ui/partners/payout-status-descriptions.ts b/apps/web/ui/partners/payout-status-descriptions.tsindex fb111553a3..222cc99eea 100644--- a/apps/web/ui/partners/payout-status-descriptions.ts+++ b/apps/web/ui/partners/payout-status-descriptions.ts@@ -1,4 +1,4 @@-import { MIN_WITHDRAWAL_AMOUNT_CENTS } from "@/lib/partners/constants";+import { MIN_WITHDRAWAL_AMOUNT_CENTS } from "@/lib/constants/payouts";import { currencyFormatter } from "@dub/utils";export const PAYOUT_STATUS_DESCRIPTIONS = {diff --git a/apps/web/ui/partners/reject-bounty-submission-modal.tsx b/apps/web/ui/partners/reject-bounty-submission-modal.tsxindex ba3266ed56..5944d70be3 100644--- a/apps/web/ui/partners/reject-bounty-submission-modal.tsx+++ b/apps/web/ui/partners/reject-bounty-submission-modal.tsx@@ -1,13 +1,13 @@import { rejectBountySubmissionAction } from "@/lib/actions/partners/reject-bounty-submission";+import {+ BOUNTY_MAX_SUBMISSION_REJECTION_NOTE_LENGTH,+ REJECT_BOUNTY_SUBMISSION_REASONS,+} from "@/lib/constants/bounties";import { mutatePrefix } from "@/lib/swr/mutate";import useBounty from "@/lib/swr/use-bounty";import useWorkspace from "@/lib/swr/use-workspace";import { BountySubmissionProps } from "@/lib/types";-import {- MAX_BOUNTY_SUBMISSION_REJECTION_NOTE_LENGTH,- REJECT_BOUNTY_SUBMISSION_REASONS,- rejectBountySubmissionSchema,-} from "@/lib/zod/schemas/bounties";+import { rejectBountySubmissionSchema } from "@/lib/zod/schemas/bounties";import { Button, Modal, useKeyboardShortcut } from "@dub/ui";import { cn } from "@dub/utils";import { useAction } from "next-safe-action/hooks";@@ -140,18 +140,18 @@ const RejectBountySubmissionModal = ({</label><span className="text-xs text-neutral-400">{watch("rejectionNote")?.length || 0}/- {MAX_BOUNTY_SUBMISSION_REJECTION_NOTE_LENGTH}+ {BOUNTY_MAX_SUBMISSION_REJECTION_NOTE_LENGTH}</span></div><div className="mt-2"><textareaid="rejectionNote"{...register("rejectionNote", {- maxLength: MAX_BOUNTY_SUBMISSION_REJECTION_NOTE_LENGTH,+ maxLength: BOUNTY_MAX_SUBMISSION_REJECTION_NOTE_LENGTH,setValueAs: (value) => (value === "" ? undefined : value),})}rows={3}- maxLength={MAX_BOUNTY_SUBMISSION_REJECTION_NOTE_LENGTH}+ maxLength={BOUNTY_MAX_SUBMISSION_REJECTION_NOTE_LENGTH}className={cn("block w-full rounded-md border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",errors.rejectionNote &&