feat: group analytics

* wip

* wip

* wip

* wip

* wip

* add buffer

* wip

* wip

* fixes

* fix

* wip

* group validation

* fix group issues

* docs: add groups
This commit is contained in:
Carl-Gerhard Lindesvärd
2026-03-20 10:46:09 +01:00
committed by GitHub
parent 88a2d876ce
commit 11e9ecac1a
99 changed files with 5944 additions and 1432 deletions

View File

@@ -540,6 +540,32 @@ export const zCheckout = z.object({
});
export type ICheckout = z.infer<typeof zCheckout>;
export const zGroupId = z
.string()
.min(1)
.regex(
/^[a-z0-9_-]+$/,
'ID must only contain lowercase letters, digits, hyphens, or underscores',
);
export const zCreateGroup = z.object({
id: zGroupId,
projectId: z.string(),
type: z.string().min(1),
name: z.string().min(1),
properties: z.record(z.string()).default({}),
});
export type ICreateGroup = z.infer<typeof zCreateGroup>;
export const zUpdateGroup = z.object({
id: z.string().min(1),
projectId: z.string(),
type: z.string().min(1).optional(),
name: z.string().min(1).optional(),
properties: z.record(z.string()).optional(),
});
export type IUpdateGroup = z.infer<typeof zUpdateGroup>;
export const zEditOrganization = z.object({
id: z.string().min(2),
name: z.string().min(2),