Added fix for calendar update channel

This commit is contained in:
Alexis
2025-03-05 20:21:33 +01:00
parent 1aa3350da3
commit d46da12745
5 changed files with 36 additions and 21 deletions

View File

@@ -4,6 +4,7 @@ import { calendarMonthSchema, type CalendarMonth } from "./CalendarMonth"
import { dateSchema, type RPGDate } from "./Date"
import type { World } from "./World"
import type { ContentState } from "./Entity"
import type { RPGColor } from "./Color"
export interface CalendarConfig {
@@ -18,12 +19,15 @@ export interface Calendar extends CalendarConfig {
events: CalendarEvent[]
eventNb?: Array<{ count: number }>
state: ContentState
color?: string
color?: RPGColor
world?: World
createdAt?: string
updatedAt?: string
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type CalendarChannelPayload = Calendar & Record<string, any>
export const postCalendarSchema = z.object({
name: z.string(),
today: dateSchema.optional().nullable(),