MCPcopy Index your code
hub / github.com/simstudioai/sim / simplifyEvent

Function simplifyEvent

apps/sim/lib/webhooks/polling/google-calendar.ts:266–286  ·  view source on GitHub ↗
(
  event: CalendarEvent,
  eventType?: 'created' | 'updated' | 'cancelled'
)

Source from the content-addressed store, hash-verified

264}
265
266function simplifyEvent(
267 event: CalendarEvent,
268 eventType?: 'created' | 'updated' | 'cancelled'
269): SimplifiedCalendarEvent {
270 return {
271 id: event.id,
272 status: event.status,
273 eventType: eventType ?? determineEventType(event),
274 summary: event.summary ?? null,
275 eventDescription: event.description ?? null,
276 location: event.location ?? null,
277 htmlLink: event.htmlLink ?? null,
278 start: event.start ?? null,
279 end: event.end ?? null,
280 created: event.created ?? null,
281 updated: event.updated ?? null,
282 attendees: event.attendees ?? null,
283 creator: event.creator ?? null,
284 organizer: event.organizer ?? null,
285 }
286}
287
288async function processEvents(
289 events: CalendarEvent[],

Callers 1

processEventsFunction · 0.85

Calls 1

determineEventTypeFunction · 0.85

Tested by

no test coverage detected