update segmentParamSchema, add typing to getEntity

This commit is contained in:
Francis Cao 2026-01-22 16:32:06 -08:00
parent d4ff7c8e3f
commit f4eaa9fd0d
3 changed files with 5 additions and 4 deletions

View file

@ -1,6 +1,7 @@
import type { Link, Pixel, Website } from '@/generated/prisma/client';
import { getLink, getPixel, getWebsite } from '@/queries/prisma';
export async function getEntity(entityId: string) {
export async function getEntity(entityId: string): Promise<Website | Link | Pixel | null> {
const website = await getWebsite(entityId);
const link = await getLink(entityId);
const pixel = await getPixel(entityId);

View file

@ -249,7 +249,7 @@ export const reportResultSchema = z.intersection(
export const segmentTypeParam = z.enum(['segment', 'cohort']);
export const segmentParametersSchema = z.object({
export const segmentParamSchema = z.object({
filters: z
.array(
z.object({