feat(api): add insights endpoints

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-09-08 22:07:09 +02:00
parent d4a1eb88b8
commit df32bb04a0
21 changed files with 1340 additions and 416 deletions

View File

@@ -1,4 +1,6 @@
import {
getChartPrevStartEndDate,
getChartStartEndDate,
getOrganizationSubscriptionChartEndDate,
getSettingsForProject,
overviewService,
@@ -10,10 +12,6 @@ import { type IChartRange, zRange } from '@openpanel/validation';
import { format } from 'date-fns';
import { z } from 'zod';
import { cacheMiddleware, createTRPCRouter, publicProcedure } from '../trpc';
import {
getChartPrevStartEndDate,
getChartStartEndDate,
} from './chart.helpers';
const cacher = cacheMiddleware((input) => {
const range = input.range as IChartRange;