Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

add missing types

Steven Tey13b06bf4ebc7
diff --git a/apps/web/lib/openapi/analytics/index.ts b/apps/web/lib/openapi/analytics/index.ts
index c00556ee62..d99e4b73b6 100644
--- a/apps/web/lib/openapi/analytics/index.ts
+++ b/apps/web/lib/openapi/analytics/index.ts
@@ -24,6 +24,9 @@ const retrieveAnalytics: ZodOpenApiOperationObject = {
z
.array(analyticsResponse.timeseries)
.openapi({ title: "AnalyticsTimeseries" }),
+ z
+ .array(analyticsResponse.continents)
+ .openapi({ title: "AnalyticsContinents" }),
z
.array(analyticsResponse.countries)
.openapi({ title: "AnalyticsCountries" }),
@@ -37,9 +40,15 @@ const retrieveAnalytics: ZodOpenApiOperationObject = {
.array(analyticsResponse.browsers)
.openapi({ title: "AnalyticsBrowsers" }),
z.array(analyticsResponse.os).openapi({ title: "AnalyticsOS" }),
+ z
+ .array(analyticsResponse.triggers)
+ .openapi({ title: "AnalyticsTriggers" }),
z
.array(analyticsResponse.referers)
.openapi({ title: "AnalyticsReferers" }),
+ z
+ .array(analyticsResponse.referer_urls)
+ .openapi({ title: "AnalyticsRefererUrls" }),
z
.array(analyticsResponse.top_links)
.openapi({ title: "AnalyticsTopLinks" }),
diff --git a/apps/web/lib/zod/schemas/analytics-response.ts b/apps/web/lib/zod/schemas/analytics-response.ts
index ce395edf2b..6fe221c30b 100644
--- a/apps/web/lib/zod/schemas/analytics-response.ts
+++ b/apps/web/lib/zod/schemas/analytics-response.ts
@@ -308,30 +308,4 @@ export const analyticsResponse = {
.default(0),
})
.openapi({ ref: "AnalyticsTopUrls" }),
-
- trigger: z
- .object({
- trigger: z
- .enum(["link", "qr"])
- .describe("The type of trigger method: link click or QR scan"),
- clicks: z
- .number()
- .describe("The number of clicks from this trigger method")
- .default(0),
- leads: z
- .number()
- .describe("The number of leads from this trigger method")
- .default(0),
- sales: z
- .number()
- .describe("The number of sales from this trigger method")
- .default(0),
- saleAmount: z
- .number()
- .describe(
- "The total amount of sales from this trigger method, in cents",
- )
- .default(0),
- })
- .openapi({ ref: "AnalyticsTrigger" }),
} as const;