# createSimpleEvent

**Kind:** Function

**Source:** `Outlook_plugin/src/calendar/calendar.model.ts` (line 305)

**Part of:** [Calendar](subsystem-outlook-plugin-src-calendar)

Helper function to create a simple calendar event

`createSimpleEvent` creates a simplified calendar event representation for the calendar feature. It centralizes event construction so callers can create event data in a consistent shape before displaying or processing it.

## Signature

```ts
function createSimpleEvent(subject: string, startDate: Date, endDate: Date, location: string, attendees: string[], body: string): CreateEventRequest
```

## Parameters

| Name | Type |
|---|---|
| `subject` | `string` |
| `startDate` | `Date` |
| `endDate` | `Date` |
| `location` | `string` |
| `attendees` | `string[]` |
| `body` | `string` |

**Returns:** `CreateEventRequest`

## Diagram

```mermaid
graph LR
  Caller[Calendar caller] --> Create[createSimpleEvent]
  Create --> Event[Simple calendar event]
  Event --> Calendar[Calendar UI or event workflow]
```

## Usage

```ts
import { createSimpleEvent } from "./calendar.model";

const event = createSimpleEvent({
  subject: "Project review",
  start: new Date(),
  end: new Date(),
});

console.log(event);
```

## AI Coding Instructions

- Keep event construction inside `createSimpleEvent` rather than rebuilding the event shape at call sites.
- Preserve the event fields and value formats expected by calendar consumers.
- Check the declared parameter and return types before adding fields to the created event.
- Update callers when changing the event shape so calendar rendering and event actions stay aligned.
