@ -1,13 +1,15 @@
|
||||
import { calendar_v3 } from 'googleapis';
|
||||
import { calendar_v3 as calendarV3 } from 'googleapis';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
import { CalendarEventParticipantResponseStatus } from 'src/modules/calendar/standard-objects/calendar-event-participant.object-metadata';
|
||||
import { CalendarEventWithParticipants } from 'src/modules/calendar/types/calendar-event';
|
||||
|
||||
export const formatGoogleCalendarEvent = (
|
||||
event: calendar_v3.Schema$Event,
|
||||
event: calendarV3.Schema$Event,
|
||||
iCalUIDCalendarEventIdMap: Map<string, string>,
|
||||
): CalendarEventWithParticipants => {
|
||||
const id = v4();
|
||||
const id =
|
||||
(event.iCalUID && iCalUIDCalendarEventIdMap.get(event.iCalUID)) ?? v4();
|
||||
|
||||
const formatResponseStatus = (status: string | null | undefined) => {
|
||||
switch (status) {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
export const googleCalendarSearchFilterExcludeEmails = (
|
||||
emails: string[],
|
||||
): string => {
|
||||
): string | undefined => {
|
||||
if (emails.length === 0) {
|
||||
return '';
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return `email=-${emails.join(', -')}`;
|
||||
|
||||
Reference in New Issue
Block a user