diff --git a/apps/web-tss/src/routes/app.chats.$chatId.dashboard.$dashboardId.metrics.$metricId.tsx b/apps/web-tss/src/routes/app.chats.$chatId.dashboard.$dashboardId.metrics.$metricId.tsx index c80d8d8c6..77ca0361c 100644 --- a/apps/web-tss/src/routes/app.chats.$chatId.dashboard.$dashboardId.metrics.$metricId.tsx +++ b/apps/web-tss/src/routes/app.chats.$chatId.dashboard.$dashboardId.metrics.$metricId.tsx @@ -1,8 +1,22 @@ import { createFileRoute } from '@tanstack/react-router' +// Search params interface for type safety +interface RouteSearch { + dashboard_version_number?: number + metric_version_number?: number +} + export const Route = createFileRoute( '/app/chats/$chatId/dashboard/$dashboardId/metrics/$metricId', )({ + validateSearch: (search: Record): RouteSearch => ({ + dashboard_version_number: search.dashboard_version_number + ? Number(search.dashboard_version_number) + : undefined, + metric_version_number: search.metric_version_number + ? Number(search.metric_version_number) + : undefined, + }), component: RouteComponent, }) diff --git a/apps/web-tss/src/routes/app.chats.$chatId.dashboard.$dashboardId.tsx b/apps/web-tss/src/routes/app.chats.$chatId.dashboard.$dashboardId.tsx index fe4322bff..d102e1743 100644 --- a/apps/web-tss/src/routes/app.chats.$chatId.dashboard.$dashboardId.tsx +++ b/apps/web-tss/src/routes/app.chats.$chatId.dashboard.$dashboardId.tsx @@ -1,8 +1,18 @@ import { createFileRoute } from '@tanstack/react-router' +// Search params interface for type safety +interface RouteSearch { + dashboard_version_number?: number +} + export const Route = createFileRoute( '/app/chats/$chatId/dashboard/$dashboardId', )({ + validateSearch: (search: Record): RouteSearch => ({ + dashboard_version_number: search.dashboard_version_number + ? Number(search.dashboard_version_number) + : undefined, + }), component: RouteComponent, }) diff --git a/apps/web-tss/src/routes/app.chats.$chatId.metrics.$metricId.tsx b/apps/web-tss/src/routes/app.chats.$chatId.metrics.$metricId.tsx index aab6e41ab..f5127a890 100644 --- a/apps/web-tss/src/routes/app.chats.$chatId.metrics.$metricId.tsx +++ b/apps/web-tss/src/routes/app.chats.$chatId.metrics.$metricId.tsx @@ -1,6 +1,16 @@ import { createFileRoute } from '@tanstack/react-router' +// Search params interface for type safety +interface RouteSearch { + metric_version_number?: number +} + export const Route = createFileRoute('/app/chats/$chatId/metrics/$metricId')({ + validateSearch: (search: Record): RouteSearch => ({ + metric_version_number: search.metric_version_number + ? Number(search.metric_version_number) + : undefined, + }), component: RouteComponent, }) diff --git a/apps/web-tss/src/routes/app.chats.$chatId.report.$reportId.metrics.$metricId.tsx b/apps/web-tss/src/routes/app.chats.$chatId.report.$reportId.metrics.$metricId.tsx index 76277a2ac..1a2d46294 100644 --- a/apps/web-tss/src/routes/app.chats.$chatId.report.$reportId.metrics.$metricId.tsx +++ b/apps/web-tss/src/routes/app.chats.$chatId.report.$reportId.metrics.$metricId.tsx @@ -1,8 +1,22 @@ import { createFileRoute } from '@tanstack/react-router' +// Search params interface for type safety +interface RouteSearch { + report_version_number?: number + metric_version_number?: number +} + export const Route = createFileRoute( '/app/chats/$chatId/report/$reportId/metrics/$metricId', )({ + validateSearch: (search: Record): RouteSearch => ({ + report_version_number: search.report_version_number + ? Number(search.report_version_number) + : undefined, + metric_version_number: search.metric_version_number + ? Number(search.metric_version_number) + : undefined, + }), component: RouteComponent, }) diff --git a/apps/web-tss/src/routes/app.chats.$chatId.report.$reportId.tsx b/apps/web-tss/src/routes/app.chats.$chatId.report.$reportId.tsx index 0f3d9d850..25b16976e 100644 --- a/apps/web-tss/src/routes/app.chats.$chatId.report.$reportId.tsx +++ b/apps/web-tss/src/routes/app.chats.$chatId.report.$reportId.tsx @@ -1,6 +1,16 @@ import { createFileRoute } from '@tanstack/react-router' +// Search params interface for type safety +interface RouteSearch { + report_version_number?: number +} + export const Route = createFileRoute('/app/chats/$chatId/report/$reportId')({ + validateSearch: (search: Record): RouteSearch => ({ + report_version_number: search.report_version_number + ? Number(search.report_version_number) + : undefined, + }), component: RouteComponent, }) diff --git a/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.dashboards.$dashboardId.metrics.$metricId.tsx b/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.dashboards.$dashboardId.metrics.$metricId.tsx index 39a2372f1..17951f695 100644 --- a/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.dashboards.$dashboardId.metrics.$metricId.tsx +++ b/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.dashboards.$dashboardId.metrics.$metricId.tsx @@ -1,8 +1,22 @@ import { createFileRoute } from '@tanstack/react-router' +// Search params interface for type safety +interface RouteSearch { + dashboard_version_number?: number + metric_version_number?: number +} + export const Route = createFileRoute( '/app/collections/$collectionId/chats/$chatId/dashboards/$dashboardId/metrics/$metricId', )({ + validateSearch: (search: Record): RouteSearch => ({ + dashboard_version_number: search.dashboard_version_number + ? Number(search.dashboard_version_number) + : undefined, + metric_version_number: search.metric_version_number + ? Number(search.metric_version_number) + : undefined, + }), component: RouteComponent, }) diff --git a/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.dashboards.$dashboardId.tsx b/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.dashboards.$dashboardId.tsx index a02deb836..6c36f0dfc 100644 --- a/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.dashboards.$dashboardId.tsx +++ b/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.dashboards.$dashboardId.tsx @@ -1,8 +1,18 @@ import { createFileRoute } from '@tanstack/react-router' +// Search params interface for type safety +interface RouteSearch { + dashboard_version_number?: number +} + export const Route = createFileRoute( '/app/collections/$collectionId/chats/$chatId/dashboards/$dashboardId', )({ + validateSearch: (search: Record): RouteSearch => ({ + dashboard_version_number: search.dashboard_version_number + ? Number(search.dashboard_version_number) + : undefined, + }), component: RouteComponent, }) diff --git a/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.metrics.$metricId.tsx b/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.metrics.$metricId.tsx index 063b258e2..118f33cf5 100644 --- a/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.metrics.$metricId.tsx +++ b/apps/web-tss/src/routes/app.collections.$collectionId.chats.$chatId.metrics.$metricId.tsx @@ -1,8 +1,18 @@ import { createFileRoute } from '@tanstack/react-router' +// Search params interface for type safety +interface RouteSearch { + metric_version_number?: number +} + export const Route = createFileRoute( '/app/collections/$collectionId/chats/$chatId/metrics/$metricId', )({ + validateSearch: (search: Record): RouteSearch => ({ + metric_version_number: search.metric_version_number + ? Number(search.metric_version_number) + : undefined, + }), component: RouteComponent, }) diff --git a/apps/web-tss/src/routes/app.collections.$collectionId.dashboard.$dashboardId.metrics.$metricId.tsx b/apps/web-tss/src/routes/app.collections.$collectionId.dashboard.$dashboardId.metrics.$metricId.tsx index 8ac6688e6..c865bc6ab 100644 --- a/apps/web-tss/src/routes/app.collections.$collectionId.dashboard.$dashboardId.metrics.$metricId.tsx +++ b/apps/web-tss/src/routes/app.collections.$collectionId.dashboard.$dashboardId.metrics.$metricId.tsx @@ -1,8 +1,22 @@ import { createFileRoute } from '@tanstack/react-router' +// Search params interface for type safety +interface RouteSearch { + dashboard_version_number?: number + metric_version_number?: number +} + export const Route = createFileRoute( '/app/collections/$collectionId/dashboard/$dashboardId/metrics/$metricId', )({ + validateSearch: (search: Record): RouteSearch => ({ + dashboard_version_number: search.dashboard_version_number + ? Number(search.dashboard_version_number) + : undefined, + metric_version_number: search.metric_version_number + ? Number(search.metric_version_number) + : undefined, + }), component: RouteComponent, }) diff --git a/apps/web-tss/src/routes/app.collections.$collectionId.dashboard.$dashboardId.tsx b/apps/web-tss/src/routes/app.collections.$collectionId.dashboard.$dashboardId.tsx index 81780d3cb..9552cad30 100644 --- a/apps/web-tss/src/routes/app.collections.$collectionId.dashboard.$dashboardId.tsx +++ b/apps/web-tss/src/routes/app.collections.$collectionId.dashboard.$dashboardId.tsx @@ -1,8 +1,18 @@ import { createFileRoute } from '@tanstack/react-router' +// Search params interface for type safety +interface RouteSearch { + dashboard_version_number?: number +} + export const Route = createFileRoute( '/app/collections/$collectionId/dashboard/$dashboardId', )({ + validateSearch: (search: Record): RouteSearch => ({ + dashboard_version_number: search.dashboard_version_number + ? Number(search.dashboard_version_number) + : undefined, + }), component: RouteComponent, }) diff --git a/apps/web-tss/src/routes/app.collections.$collectionId.metrics.$metricId.tsx b/apps/web-tss/src/routes/app.collections.$collectionId.metrics.$metricId.tsx index e4254c83d..eb15932e8 100644 --- a/apps/web-tss/src/routes/app.collections.$collectionId.metrics.$metricId.tsx +++ b/apps/web-tss/src/routes/app.collections.$collectionId.metrics.$metricId.tsx @@ -1,8 +1,18 @@ import { createFileRoute } from '@tanstack/react-router' +// Search params interface for type safety +interface RouteSearch { + metric_version_number?: number +} + export const Route = createFileRoute( '/app/collections/$collectionId/metrics/$metricId', )({ + validateSearch: (search: Record): RouteSearch => ({ + metric_version_number: search.metric_version_number + ? Number(search.metric_version_number) + : undefined, + }), component: RouteComponent, }) diff --git a/apps/web-tss/src/routes/app.metrics.$metricId.tsx b/apps/web-tss/src/routes/app.metrics.$metricId.tsx index 3a8de2893..b5fc8e507 100644 --- a/apps/web-tss/src/routes/app.metrics.$metricId.tsx +++ b/apps/web-tss/src/routes/app.metrics.$metricId.tsx @@ -1,6 +1,16 @@ import { createFileRoute } from '@tanstack/react-router'; +// Search params interface for type safety +interface RouteSearch { + metric_version_number?: number; +} + export const Route = createFileRoute('/app/metrics/$metricId')({ + validateSearch: (search: Record): RouteSearch => ({ + metric_version_number: search.metric_version_number + ? Number(search.metric_version_number) + : undefined, + }), component: RouteComponent, }); diff --git a/apps/web-tss/src/routes/app.reports.$reportId.tsx b/apps/web-tss/src/routes/app.reports.$reportId.tsx index a276cafd7..49bd74769 100644 --- a/apps/web-tss/src/routes/app.reports.$reportId.tsx +++ b/apps/web-tss/src/routes/app.reports.$reportId.tsx @@ -1,6 +1,16 @@ import { createFileRoute } from '@tanstack/react-router'; +// Search params interface for type safety +interface RouteSearch { + report_version_number?: number; +} + export const Route = createFileRoute('/app/reports/$reportId')({ + validateSearch: (search: Record): RouteSearch => ({ + report_version_number: search.report_version_number + ? Number(search.report_version_number) + : undefined, + }), component: RouteComponent, });