Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Resolve knip-related issues

Blue Moused42f2deac06b
diff --git a/backend/apps/cloud/src/ai/entity/ai-chat.entity.ts b/backend/apps/cloud/src/ai/entity/ai-chat.entity.ts
index 1c183010d..a075f8674 100644
--- a/backend/apps/cloud/src/ai/entity/ai-chat.entity.ts
+++ b/backend/apps/cloud/src/ai/entity/ai-chat.entity.ts
@@ -11,7 +11,7 @@ import { ApiProperty } from '@nestjs/swagger'
import { Project } from '../../project/entity/project.entity'
import { User } from '../../user/entities/user.entity'
-export interface ChatMessageToolCall {
+interface ChatMessageToolCall {
toolName: string
args?: unknown
timestamp?: string
diff --git a/backend/apps/cloud/src/analytics/bot-detection.service.ts b/backend/apps/cloud/src/analytics/bot-detection.service.ts
index cab195c09..0e740b7e1 100644
--- a/backend/apps/cloud/src/analytics/bot-detection.service.ts
+++ b/backend/apps/cloud/src/analytics/bot-detection.service.ts
@@ -8,7 +8,7 @@ import { BotsProtectionLevel, Project } from '../project/entity/project.entity'
import { ProjectService } from '../project/project.service'
import { getIPDetails } from '../common/utils'
-export type BotReason =
+type BotReason =
| 'user_agent'
| 'headless_browser'
| 'suspicious_headers'
diff --git a/backend/apps/cloud/src/notification-channel/alert-context.ts b/backend/apps/cloud/src/notification-channel/alert-context.ts
index c000eef96..a5cd310b2 100644
--- a/backend/apps/cloud/src/notification-channel/alert-context.ts
+++ b/backend/apps/cloud/src/notification-channel/alert-context.ts
@@ -1,6 +1,6 @@
import { QueryCondition, QueryMetric, QueryTime } from '../alert/dto/alert.dto'
-export interface AlertContextBase {
+interface AlertContextBase {
alert_name: string
project_name: string
project_id: string
@@ -20,18 +20,18 @@ export interface AlertContextErrors extends AlertContextBase {
is_new_only: boolean
}
-export interface AlertContextCustomEvents extends AlertContextBase {
+interface AlertContextCustomEvents extends AlertContextBase {
event_name: string
event_count: number
every_event_mode: boolean
}
-export interface AlertContextPageViews extends AlertContextBase {
+interface AlertContextPageViews extends AlertContextBase {
views?: number
unique_views?: number
}
-export interface AlertContextOnline extends AlertContextBase {
+interface AlertContextOnline extends AlertContextBase {
online_count: number
}
diff --git a/backend/apps/community/src/analytics/bot-detection.service.ts b/backend/apps/community/src/analytics/bot-detection.service.ts
index 8bf54ddc6..b5f43a9ba 100644
--- a/backend/apps/community/src/analytics/bot-detection.service.ts
+++ b/backend/apps/community/src/analytics/bot-detection.service.ts
@@ -8,7 +8,7 @@ import { BotsProtectionLevel, Project } from '../project/entity/project.entity'
import { ProjectService } from '../project/project.service'
import { getIPDetails } from '../common/utils'
-export type BotReason =
+type BotReason =
| 'user_agent'
| 'headless_browser'
| 'suspicious_headers'
diff --git a/backend/package-lock.json b/backend/package-lock.json
index 9acb9e348..aa18c31be 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -52,6 +52,7 @@
"jwks-rsa": "^4.0.1",
"lodash": "^4.18.1",
"maxmind": "^5.0.6",
+ "multer": "^2.1.1",
"mysql2": "^3.22.3",
"nestjs-i18n": "^10.8.4",
"nestjs-telegraf": "^2.9.1",
diff --git a/backend/package.json b/backend/package.json
index 752baa127..a5a267262 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -73,6 +73,7 @@
"jwks-rsa": "^4.0.1",
"lodash": "^4.18.1",
"maxmind": "^5.0.6",
+ "multer": "^2.1.1",
"mysql2": "^3.22.3",
"nestjs-i18n": "^10.8.4",
"nestjs-telegraf": "^2.9.1",
diff --git a/web/app/api/api.server.ts b/web/app/api/api.server.ts
index 258dc8bb5..10bab7675 100644
--- a/web/app/api/api.server.ts
+++ b/web/app/api/api.server.ts
@@ -1468,7 +1468,7 @@ export async function getFeatureFlagProfilesServer(
export type GoalConditionRelation = 'AND' | 'OR'
-export type GoalConditionOperator =
+type GoalConditionOperator =
| 'equals'
| 'not_equals'
| 'contains'
@@ -1476,7 +1476,7 @@ export type GoalConditionOperator =
| 'exists'
| 'not_exists'
-export type GoalConditionEventType = 'any' | 'pageview' | 'custom_event'
+type GoalConditionEventType = 'any' | 'pageview' | 'custom_event'
export interface GoalCondition {
id?: string
@@ -1510,13 +1510,13 @@ export interface GoalsResponse {
total: number
}
-export interface ConversionTimeBucket {
+interface ConversionTimeBucket {
average: number | null
median: number | null
p75: number | null
}
-export interface ConversionTimeToConvert {
+interface ConversionTimeToConvert {
fromSessionStart?: ConversionTimeBucket
fromFirstPage?: ConversionTimeBucket
fromFirstFunnelStep?: ConversionTimeBucket
@@ -1803,7 +1803,7 @@ export interface ExperimentChartData {
winProbability: Record<string, number[]>
}
-export interface ExperimentResultWindow {
+interface ExperimentResultWindow {
mode: 'selected' | 'active_overlap' | 'final'
from: string
to: string
@@ -2490,7 +2490,7 @@ interface UserFlowLink {
value: number
}
-export interface UserFlowData {
+interface UserFlowData {
nodes: UserFlowNode[]
links: UserFlowLink[]
}
diff --git a/web/app/lib/models/NotificationChannel.ts b/web/app/lib/models/NotificationChannel.ts
index 3eb85b2a4..cecf59fbc 100644
--- a/web/app/lib/models/NotificationChannel.ts
+++ b/web/app/lib/models/NotificationChannel.ts
@@ -6,7 +6,7 @@ export type NotificationChannelType =
| 'webhook'
| 'webpush'
-export type NotificationChannelScope = 'user' | 'organisation' | 'project'
+type NotificationChannelScope = 'user' | 'organisation' | 'project'
export interface NotificationChannel {
id: string
diff --git a/web/app/pages/Project/tabs/AskAI/exportHelpers.ts b/web/app/pages/Project/tabs/AskAI/exportHelpers.ts
index a4a59b01e..cb242a927 100644
--- a/web/app/pages/Project/tabs/AskAI/exportHelpers.ts
+++ b/web/app/pages/Project/tabs/AskAI/exportHelpers.ts
@@ -4,14 +4,14 @@ import { downloadText } from '~/utils/download'
import { parseSegments } from './contentSegments'
-export interface ExportMessagePart {
+interface ExportMessagePart {
type: 'text' | 'toolCall'
text?: string
toolName?: string
args?: unknown
}
-export interface ExportMessageToolCall {
+interface ExportMessageToolCall {
toolName: string
args?: unknown
timestamp?: string
diff --git a/web/app/pages/Project/tabs/AskAI/toolFormatters.ts b/web/app/pages/Project/tabs/AskAI/toolFormatters.ts
index 5c6ef7c55..82daccf0c 100644
--- a/web/app/pages/Project/tabs/AskAI/toolFormatters.ts
+++ b/web/app/pages/Project/tabs/AskAI/toolFormatters.ts
@@ -9,7 +9,7 @@ interface ToolCallFilter {
isContains?: boolean
}
-export interface ToolCallParam {
+interface ToolCallParam {
/** Locale key under project.askAi.params (with fallback) */
labelKey: string
/** Fallback label if no translation exists */
diff --git a/web/app/pages/Project/tabs/SEO/seo-utils.ts b/web/app/pages/Project/tabs/SEO/seo-utils.ts
index 788147699..e5c55028f 100644
--- a/web/app/pages/Project/tabs/SEO/seo-utils.ts
+++ b/web/app/pages/Project/tabs/SEO/seo-utils.ts
@@ -30,9 +30,9 @@ export const SEO_ORGANIC_POSITION_BUCKETS = [
{ key: 'pos51Plus', label: '51+', color: '#e2e8f0' },
] as const
-export type SEOImpressionPositionBucketKey =
+type SEOImpressionPositionBucketKey =
(typeof SEO_IMPRESSION_POSITION_BUCKETS)[number]['key']
-export type SEOOrganicPositionBucketKey =
+type SEOOrganicPositionBucketKey =
(typeof SEO_ORGANIC_POSITION_BUCKETS)[number]['key']
export interface ImpressionsByPositionEntry {
diff --git a/web/app/ui/MultiSelect.tsx b/web/app/ui/MultiSelect.tsx
index 0a3d74e82..c43c2588f 100644
--- a/web/app/ui/MultiSelect.tsx
+++ b/web/app/ui/MultiSelect.tsx
@@ -170,7 +170,6 @@ const MultiSelect = ({
<input
ref={inputRef}
type='text'
- role='combobox'
aria-expanded={isOpen}
aria-controls={listboxId}
aria-autocomplete='list'
diff --git a/web/app/ui/TimezonePicker.tsx b/web/app/ui/TimezonePicker.tsx
index 45a35f33f..8138ea8c2 100644
--- a/web/app/ui/TimezonePicker.tsx
+++ b/web/app/ui/TimezonePicker.tsx
@@ -439,7 +439,6 @@ const TimezoneSelect = ({ value, onChange }: TimezoneSelectProps) => {
setSearchValue(event.target.value)
}}
onKeyDown={handleInputKeyDown}
- role='combobox'
aria-expanded={isOpen}
aria-controls={listboxId}
aria-activedescendant={
diff --git a/web/app/utils/authMethod.ts b/web/app/utils/authMethod.ts
index 09a311ff4..d9a3635ff 100644
--- a/web/app/utils/authMethod.ts
+++ b/web/app/utils/authMethod.ts
@@ -1,7 +1,7 @@
export const LAST_AUTH_METHOD_COOKIE = 'swx_last_auth_method'
export const LAST_AUTH_METHOD_MAX_AGE = 31536000
-export const LAST_AUTH_METHODS = [
+const LAST_AUTH_METHODS = [
'email',
'google',
'github',