Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
import type { Board, Link, Pixel, Website } from '@/generated/prisma/client';
import { getBoard, getLink, getPixel, getWebsite } from '@/queries/prisma';
export async function getEntity(entityId: string): Promise<Website | Link | Pixel | Board | null> {
const [website, link, pixel, board] = await Promise.all([
getWebsite(entityId),
getLink(entityId),
getPixel(entityId),
getBoard(entityId),
]);
const entity = website || link || pixel || board;
return entity;
}