mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-21 02:53:06 +00:00
- Add calendarFeed collection with secret slug credential - Add iCal feed endpoint at /campanha/agenda/ical/[secret] (unauthenticated) - Add server actions for creating and revoking calendar feeds - Add CalendarFeedButton UI component in agenda filters bar - Add unit tests for iCal generation - Fail-closed access: feed re-evaluates creator's municipality scope on each read - Leader lockdown preserved; no PII in feed output
14 lines
503 B
TypeScript
14 lines
503 B
TypeScript
import { z } from 'zod'
|
|
|
|
import { positiveRelationshipId } from '@/lib/schemas/primitives'
|
|
|
|
const MAX_CALENDAR_FEED_LABEL_LENGTH = 120
|
|
|
|
export const calendarFeedCreateSchema = z.object({
|
|
label: z.string().trim().min(1).max(MAX_CALENDAR_FEED_LABEL_LENGTH),
|
|
filterMunicipality: positiveRelationshipId.optional(),
|
|
filterDeputyPresent: z.boolean().optional(),
|
|
filterTag: z.string().trim().min(1).max(80).optional(),
|
|
})
|
|
|
|
export type CalendarFeedCreateInput = z.input<typeof calendarFeedCreateSchema>
|