RocketChat/Rocket.Chat

View on GitHub
packages/rest-typings/src/v1/calendar/CalendarEventInfoProps.ts

Summary

Maintainability
A
1 hr
Test Coverage
import Ajv from 'ajv';
import type { JSONSchemaType } from 'ajv';

const ajv = new Ajv({
    coerceTypes: true,
});

export type CalendarEventInfoProps = { id: string };

const calendarEventInfoPropsSchema: JSONSchemaType<CalendarEventInfoProps> = {
    type: 'object',
    properties: {
        id: {
            type: 'string',
            nullable: false,
        },
    },
    required: ['id'],
    additionalProperties: false,
};

export const isCalendarEventInfoProps = ajv.compile(calendarEventInfoPropsSchema);