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 reattribute-customer
Steven Tey0a7ae72881a3
diff --cc apps/web/lib/upstash/ratelimit-policies.tsindex bc7cec720b,c7b824aef2..5ef9524a9a--- a/apps/web/lib/upstash/ratelimit-policies.ts+++ b/apps/web/lib/upstash/ratelimit-policies.ts@@@ -110,12 -110,70 +110,77 @@@ export const RATELIMIT_POLICIES =keyPrefix: "rl:domains:forward-dns-instructions:target",},+ // One reattribution per workspace per minute+ reattributeCustomer: {+ attempts: 1,+ window: "1 m",+ keyPrefix: "rl:customers:reattribute",+ message: ({ retryAfter }) =>+ `Customer reattribution is limited to once per minute because it updates analytics. Try again in ${retryAfter}.`,+ },+++ oauthAppReviewSubmit: {+ attempts: 1,+ window: "1 m",+ keyPrefix: "rl:oauth:app:review:submit",- message:- "Rate limit exceeded. Please try again later or contact support.",++ message: "Rate limit exceeded. Please try again later or contact support.",+ },++ verifyWorkspaceSetup: {+ attempts: 5,+ window: "1 m",+ keyPrefix: "rl:workspace:setup:verify",- message:- "Too many verification attempts. Please try again in a minute.",++ message: "Too many verification attempts. Please try again in a minute.",+ },++ createProgramApplication: {+ attempts: 3,+ window: "1 m",+ keyPrefix: "rl:program:application:create",+ },++ // Shared by start + verify so both count toward the same partner/platform budget+ socialAccountVerification: {+ attempts: 5,+ window: "1 h",+ keyPrefix: "rl:partner:social:verification",+ message: "Too many verification attempts. Please try again later.",+ },++ partnerUsernameUpdate: {+ attempts: 5,+ window: "1 h",+ keyPrefix: "rl:partner:profile:username-update",+ message:+ "You've updated your username too many times. Please try again later.",+ },++ domainTransfer: {+ attempts: 5,+ window: "1 h",+ keyPrefix: "rl:domains:transfer",+ },++ analyticsExport: {+ attempts: 1,+ window: "30 s",+ keyPrefix: "rl:analytics:export",+ message:+ "Analytics export is limited to once every 30 seconds. Please try again shortly.",+ },++ retryFailedPaypalPayout: {+ attempts: 1,+ window: "12 h",+ keyPrefix: "rl:partner:paypal:retry-failed-payout",+ message:+ "You've reached the maximum number of retry attempts for the past 24 hours. Please wait and try again later.",+ },++ identityVerificationStart: {+ attempts: 1,+ window: "1 h",+ keyPrefix: "rl:partner:identity:verification:start",+ message: "Too many verification attempts. Please try again later.",+ },} as const satisfies Record<string, RatelimitPolicy>;