The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
omit `groupBy` from query params for old endpoints
Kiran Kcad3999b0d66
diff --git a/apps/web/lib/openapi/analytics/browser.ts b/apps/web/lib/openapi/analytics/browser.tsindex b997929143..6ca3f78d65 100644--- a/apps/web/lib/openapi/analytics/browser.ts+++ b/apps/web/lib/openapi/analytics/browser.ts@@ -15,7 +15,9 @@ export const getBrowserAnalytics: ZodOpenApiOperationObject = {description:"Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {- query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema),+ query: workspaceParamsSchema.merge(+ clickAnalyticsQuerySchema.omit({ groupBy: true }),+ ),},responses: {"200": {diff --git a/apps/web/lib/openapi/analytics/city.ts b/apps/web/lib/openapi/analytics/city.tsindex bbc5211e2b..192af82457 100644--- a/apps/web/lib/openapi/analytics/city.ts+++ b/apps/web/lib/openapi/analytics/city.ts@@ -15,7 +15,7 @@ export const getCityAnalytics: ZodOpenApiOperationObject = {description:"Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {- query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema),+ query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema.omit({ groupBy: true }),),},responses: {"200": {diff --git a/apps/web/lib/openapi/analytics/country.ts b/apps/web/lib/openapi/analytics/country.tsindex d117a632cb..5c053b4831 100644--- a/apps/web/lib/openapi/analytics/country.ts+++ b/apps/web/lib/openapi/analytics/country.ts@@ -15,7 +15,7 @@ export const getCountryAnalytics: ZodOpenApiOperationObject = {description:"Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {- query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema),+ query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema.omit({ groupBy: true }),),},responses: {"200": {diff --git a/apps/web/lib/openapi/analytics/device.ts b/apps/web/lib/openapi/analytics/device.tsindex 4ce1f96fb5..aebdb56053 100644--- a/apps/web/lib/openapi/analytics/device.ts+++ b/apps/web/lib/openapi/analytics/device.ts@@ -15,7 +15,7 @@ export const getDeviceAnalytics: ZodOpenApiOperationObject = {description:"Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {- query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema),+ query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema.omit({ groupBy: true }),),},responses: {"200": {diff --git a/apps/web/lib/openapi/analytics/os.ts b/apps/web/lib/openapi/analytics/os.tsindex 421cd68e6a..42f687d686 100644--- a/apps/web/lib/openapi/analytics/os.ts+++ b/apps/web/lib/openapi/analytics/os.ts@@ -15,7 +15,7 @@ export const getOSAnalytics: ZodOpenApiOperationObject = {description:"Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {- query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema),+ query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema.omit({ groupBy: true }),),},responses: {"200": {diff --git a/apps/web/lib/openapi/analytics/referer.ts b/apps/web/lib/openapi/analytics/referer.tsindex f7bfaa949d..fcc68760bb 100644--- a/apps/web/lib/openapi/analytics/referer.ts+++ b/apps/web/lib/openapi/analytics/referer.ts@@ -15,7 +15,7 @@ export const getRefererAnalytics: ZodOpenApiOperationObject = {description:"Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {- query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema),+ query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema.omit({ groupBy: true }),),},responses: {"200": {diff --git a/apps/web/lib/openapi/analytics/timeseries.ts b/apps/web/lib/openapi/analytics/timeseries.tsindex 47238c8f2c..92d19f8c95 100644--- a/apps/web/lib/openapi/analytics/timeseries.ts+++ b/apps/web/lib/openapi/analytics/timeseries.ts@@ -15,7 +15,7 @@ export const getTimeseriesAnalytics: ZodOpenApiOperationObject = {description:"Retrieve the number of clicks for a link, a domain, or the authenticated workspace over a period of time.",requestParams: {- query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema),+ query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema.omit({ groupBy: true }),),},responses: {"200": {diff --git a/apps/web/lib/openapi/analytics/top-links.ts b/apps/web/lib/openapi/analytics/top-links.tsindex 3425822833..086a14e153 100644--- a/apps/web/lib/openapi/analytics/top-links.ts+++ b/apps/web/lib/openapi/analytics/top-links.ts@@ -15,7 +15,7 @@ export const getTopLinks: ZodOpenApiOperationObject = {description:"Retrieve the top links by number of clicks for a domain or the authenticated workspace.",requestParams: {- query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema),+ query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema.omit({ groupBy: true }),),},responses: {"200": {diff --git a/apps/web/lib/openapi/analytics/top-urls.ts b/apps/web/lib/openapi/analytics/top-urls.tsindex e207430dd7..86fc2d4ae0 100644--- a/apps/web/lib/openapi/analytics/top-urls.ts+++ b/apps/web/lib/openapi/analytics/top-urls.ts@@ -15,7 +15,7 @@ export const getTopURLs: ZodOpenApiOperationObject = {description:"Retrieve the top URLs by number of clicks for a given short link.",requestParams: {- query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema),+ query: workspaceParamsSchema.merge(clickAnalyticsQuerySchema.omit({ groupBy: true }),),},responses: {"200": {