1 import type { RequireSome } from '../interfaces';
2 import type { CalendarCreateOrUpdateEventBlobData, CalendarEvent } from '../interfaces/calendar';
4 export const getHasSharedEventContent = (
5 data: CalendarCreateOrUpdateEventBlobData
6 ): data is RequireSome<CalendarCreateOrUpdateEventBlobData, 'SharedEventContent'> => !!data.SharedEventContent;
8 export const getHasSharedKeyPacket = (
9 data: CalendarCreateOrUpdateEventBlobData
10 ): data is RequireSome<CalendarCreateOrUpdateEventBlobData, 'SharedKeyPacket'> => !!data.SharedKeyPacket;
12 export const getHasDefaultNotifications = ({ Notifications }: CalendarEvent) => {
13 return !Notifications;
16 export const getIsAutoAddedInvite = (
18 ): event is CalendarEvent & { AddressKeyPacket: string; AddressID: string } =>
19 !!event.AddressKeyPacket && !!event.AddressID;
21 export const getIsPersonalSingleEdit = ({ IsPersonalSingleEdit }: CalendarEvent) => IsPersonalSingleEdit;