Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
import * as z from "zod";
/**
* Activity event type naming convention: {entity}.{sub-entity}.{past-tense-verb}
*/
export const activityEventTypes = [
"poll.response.submitted",
"poll.comment.added",
] as const;
export type ActivityEventType = (typeof activityEventTypes)[number];
export const notificationPreferencesSchema = z.record(
z.enum(activityEventTypes),
z.boolean(),
);
export const updateNotificationPreferenceSchema = z.object({
eventType: z.enum(activityEventTypes),
enabled: z.boolean(),
});
export type NotificationPreferences = Record<ActivityEventType, boolean>;
export const unsubscribeWithTokenSchema = z.object({
token: z.string().min(1),
});