mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 22:27:16 +01:00
Updated reports.
This commit is contained in:
parent
28e872f219
commit
01bd21c5b4
75 changed files with 1373 additions and 980 deletions
|
|
@ -119,6 +119,26 @@ export const journeyReportSchema = z.object({
|
|||
}),
|
||||
});
|
||||
|
||||
export const retentionReportSchema = z.object({
|
||||
type: z.literal('retention'),
|
||||
});
|
||||
|
||||
export const utmReportSchema = z.object({
|
||||
type: z.literal('utm'),
|
||||
});
|
||||
|
||||
export const revenueReportSchema = z.object({
|
||||
type: z.literal('revenue'),
|
||||
});
|
||||
|
||||
export const attributionReportSchema = z.object({
|
||||
type: z.literal('attribution'),
|
||||
});
|
||||
|
||||
export const insightsReportSchema = z.object({
|
||||
type: z.literal('insights'),
|
||||
});
|
||||
|
||||
export const reportBaseSchema = z.object({
|
||||
websiteId: z.string().uuid(),
|
||||
type: reportTypeParam,
|
||||
|
|
@ -130,6 +150,11 @@ export const reportTypeSchema = z.discriminatedUnion('type', [
|
|||
goalReportSchema,
|
||||
funnelReportSchema,
|
||||
journeyReportSchema,
|
||||
retentionReportSchema,
|
||||
utmReportSchema,
|
||||
revenueReportSchema,
|
||||
attributionReportSchema,
|
||||
insightsReportSchema,
|
||||
]);
|
||||
|
||||
export const reportSchema = z.intersection(reportBaseSchema, reportTypeSchema);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue