ITOTEAM-609 search event>

This commit is contained in:
Peter Maquiran
2024-06-26 13:45:25 +01:00
parent 02891dbb9a
commit 78c13d1bfb
13 changed files with 174 additions and 78 deletions
@@ -1,5 +1,5 @@
import { z } from 'zod';
import { EEventCategory, EEventOwnerType, EEventStatus, EEventType } from './enums';
import { EEventCategory, EEventOwnerType, EEventStatus, EEventType } from '../model/enums';
const OwnerSchema = z.object({
@@ -29,6 +29,7 @@ export const EventListOutputDTOSchema = z.object({
isAllDayEvent: z.boolean(),
// status: z.enum(['Approved']), // Assuming "Approved" is the only valid option based on provided data
status: z.nativeEnum(EEventStatus), // Assuming "Approved" is the only valid option based on provided data
createdAt: z.string().datetime({ offset: true }),
})
export const EventListDataOutputDTOSchema = z.object({
@@ -0,0 +1,12 @@
import { z } from 'zod';
import { EEventOwnerType } from './enums';
export const EventSearchOutputDTOSchema = z.object({
Id: z.string(),
subject: z.string(),
dateEntry: z.string(),
Data: z.string(),
entity: z.string().optional()
}).nullable();
export type EventSearchOutput = z.infer<typeof EventSearchOutputDTOSchema>;