The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Merge branch 'main' into staging-sandbox
Steven Tey3e9bd1e4bc22
diff --cc apps/web/app/(ee)/api/cron/discount-codes/create/route.tsindex bf934f09dd,444e7e29b8..ed9af3656b--- a/apps/web/app/(ee)/api/cron/discount-codes/create/route.ts+++ b/apps/web/app/(ee)/api/cron/discount-codes/create/route.ts@@@ -44,9 -45,9 +45,10 @@@ export const POST = withCron(async ({ rproject: {select: {id: true,+ webhookEnabled: true,stripeConnectId: true,shopifyStoreId: true,+ environment: true,},},},diff --cc apps/web/app/(ee)/api/cron/groups/remap-discount-codes/route.tsindex dfe557372f,e1028fa51b..2d75b8f677--- a/apps/web/app/(ee)/api/cron/groups/remap-discount-codes/route.ts+++ b/apps/web/app/(ee)/api/cron/groups/remap-discount-codes/route.ts@@@ -149,9 -147,9 +147,10 @@@ export const POST = withCron(async ({ r},select: {id: true,+ webhookEnabled: true,stripeConnectId: true,shopifyStoreId: true,+ environment: true,},});diff --cc apps/web/app/(ee)/api/cron/payouts/charge-succeeded/route.tsindex 0fb0fd61e2,37b5e0af77..96d7ce0f80--- a/apps/web/app/(ee)/api/cron/payouts/charge-succeeded/route.ts+++ b/apps/web/app/(ee)/api/cron/payouts/charge-succeeded/route.ts@@@ -1,8 -1,5 +1,7 @@@- import { handleAndReturnErrorResponse } from "@/lib/api/errors";- import { verifyQstashSignature } from "@/lib/cron/verify-qstash";+ import { withCron } from "@/lib/cron/with-cron";import { prisma } from "@/lib/prisma";+import { isProductionEnvironment } from "@/lib/sandbox/environment";+import { mockPayoutCompletion } from "@/lib/sandbox/mock-payout-completion";import { log } from "@dub/utils";import { PartnerPayoutMethod } from "@prisma/client";import * as z from "zod/v4";diff --cc apps/web/app/(ee)/api/stripe/integration/webhook/utils/sync-customer.tsindex 6cc6e8d373,9e8600771a..2b6990632a--- a/apps/web/app/(ee)/api/stripe/integration/webhook/utils/sync-customer.ts+++ b/apps/web/app/(ee)/api/stripe/integration/webhook/utils/sync-customer.ts@@@ -27,10 -29,10 +29,10 @@@ export async function syncCustomer("mode">): Promise<WebhookHandlerResponse> {const stripeCustomer = event.data.object;- const stripeAccountId = event.account as string;+ const stripeAccountId = workspace.stripeConnectId!;- const dubCustomerExternalId =- stripeCustomer.metadata?.dubCustomerExternalId ||- stripeCustomer.metadata?.dubCustomerId;+ const dubCustomerExternalId = getDubCustomerExternalIdFromMetadata(+ stripeCustomer.metadata,+ );const clickId = stripeCustomer.metadata?.dubClickId;console.log(diff --cc apps/web/app/app.dub.co/(dashboard)/layout.tsxindex b2796adfb1,a904729284..21dc229561--- a/apps/web/app/app.dub.co/(dashboard)/layout.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/layout.tsx@@@ -14,9 -14,8 +15,9 @@@ export const metadata = constructMetadaexport default async function Layout({ children }: { children: ReactNode }) {return (- <>+ <ModalProvider><div className="min-h-screen w-full bg-white">+ <WorkspaceEnvironmentBanner /><UpgradeBanner /><MainNavsidebar={AppSidebarNav}diff --cc apps/web/app/sitemap.tsindex f59d9871bf,0871ace4bf..d2d7947c04--- a/apps/web/app/sitemap.ts+++ b/apps/web/app/sitemap.ts@@@ -1,6 -1,10 +1,10 @@@import { prisma } from "@/lib/prisma";- import { PARTNERS_HOSTNAMES, SHORT_DOMAIN } from "@dub/utils";- import { Prisma, WorkspaceEnvironment } from "@prisma/client";+ import {+ getMarketplaceAllHref,+ getMarketplaceCategoryHref,+ } from "@/ui/program-marketplace/utils/urls";+ import { isAppHostname, PARTNERS_HOSTNAMES, SHORT_DOMAIN } from "@dub/utils";-import { Category, Prisma } from "@prisma/client";++import { Category, Prisma, WorkspaceEnvironment } from "@prisma/client";import { MetadataRoute } from "next";import { headers } from "next/headers";diff --cc apps/web/lib/discounts/create-discount-code.tsindex e48288031e,335a0d1674..be69c6e4cf--- a/apps/web/lib/discounts/create-discount-code.ts+++ b/apps/web/lib/discounts/create-discount-code.ts@@@ -8,7 -14,7 +14,11 @@@ const MAX_ATTEMPTS = 3interface CreateDiscountCodeArgs {workspace: Pick<Project,- "id" | "environment" | "stripeConnectId" | "shopifyStoreId"- "id" | "stripeConnectId" | "shopifyStoreId" | "webhookEnabled"++ | "id"++ | "environment"++ | "stripeConnectId"++ | "shopifyStoreId"++ | "webhookEnabled">;partner: Pick<Partner, "id" | "name">;link: Pick<Link, "id">;diff --cc apps/web/lib/discounts/generate-discount-code-for-partner.tsindex bc78a69f1e,711e79f06c..beb1b69d58--- a/apps/web/lib/discounts/generate-discount-code-for-partner.ts+++ b/apps/web/lib/discounts/generate-discount-code-for-partner.ts@@@ -3,10 -4,13 +4,17 @@@ import { Project } from "@prisma/clientimport { createDiscountCode } from "./create-discount-code";export async function generateDiscountCodeForPartner({- workspaceId,+ workspace,partner,}: {- workspaceId: string;+ workspace: Pick<+ Project,- "id" | "webhookEnabled" | "stripeConnectId" | "shopifyStoreId"++ | "id"++ | "environment"++ | "webhookEnabled"++ | "stripeConnectId"++ | "shopifyStoreId"+ >;partner: Pick<EnrolledPartnerProps, "id" | "name" | "groupId">;}) {if (!partner.groupId) {diff --cc apps/web/lib/jobs/registry.tsindex c38cd078ba,39b8d4e726..eb0d21c2f5--- a/apps/web/lib/jobs/registry.ts+++ b/apps/web/lib/jobs/registry.ts@@@ -30,15 -30,31 +30,41 @@@ const jobLoaders =(m) => m.createTremendousCampaignJob,),+ "create-staging-workspace-job": () =>+ import("./handlers/create-staging-workspace-job").then(+ (m) => m.createStagingWorkspaceJob,+ ),++ "sync-staging-workspace-job": () =>+ import("./handlers/sync-staging-workspace-job").then(+ (m) => m.syncStagingWorkspaceJob,+ ),+++ "sync-group-utm-job": () =>+ import("./handlers/sync-group-utm-job").then((m) => m.syncGroupUtmJob),++ "partner-search-sync-job": () =>+ import("./handlers/partner-search-sync-job").then(+ (m) => m.partnerSearchSyncJob,+ ),++ "process-shopify-order-job": () =>+ import("./handlers/process-shopify-order-job").then(+ (m) => m.processShopifyOrderJob,+ ),++ "welcome-user-job": () =>+ import("./handlers/welcome-user-job").then((m) => m.welcomeUserJob),++ "auto-approve-partner-job": () =>+ import("./handlers/auto-approve-partner-job").then(+ (m) => m.autoApprovePartnerJob,+ ),++ "auto-reject-partner-job": () =>+ import("./handlers/auto-reject-partner-job").then(+ (m) => m.autoRejectPartnerJob,+ ),} as const satisfies Record<string, () => Promise<JobDefinition>>;const jobCache = new Map<string, JobDefinition>();diff --cc packages/ui/src/icons/nucleo/index.tsindex 7350397a9a,a3c8dcc192..07dcb1a273--- a/packages/ui/src/icons/nucleo/index.ts+++ b/packages/ui/src/icons/nucleo/index.ts@@@ -139,9 -141,9 +141,10 @@@ export * from "./input-password"export * from "./input-password-pointer";export * from "./input-search";export * from "./invoice-dollar";+export * from "./isolated-cube";export * from "./key";export * from "./layout-sidebar";+ export * from "./layers-3";export * from "./license";export * from "./life-ring";export * from "./lines-y";