# CreateEventRequest

**Kind:** Class

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

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

Simplified class for creating calendar events

`CreateEventRequest` is a request model for calendar event creation in the Outlook plugin. It carries event data from calendar-facing code to the event creation flow.

## Properties

| Property | Type |
|---|---|
| `subject` | `string` |
| `start` | `{ dateTime: string | Date; timeZone?: string; }` |
| `end` | `{ dateTime: string | Date; timeZone?: string; }` |
| `body` | `{ contentType?: 'text' | 'html'; content: string; }` |
| `location` | `{ displayName: string; address?: { street?: string; city?: string; state?: string; postalCode?: string; countryOrRegion?: string; }; }` |
| `attendees` | `{ emailAddress: { address: string; name?: string; }; type?: 'required' | 'optional' | 'resource'; }[]` |
| `isAllDay` | `boolean` |
| `importance` | `'low' | 'normal' | 'high'` |
| `showAs` | `'free' | 'tentative' | 'busy' | 'oof' | 'workingElsewhere'` |
| `sensitivity` | `'normal' | 'personal' | 'private' | 'confidential'` |
| `reminderMinutesBeforeStart` | `number` |
| `isReminderOn` | `boolean` |
| `categories` | `string[]` |
| `isOnlineMeeting` | `boolean` |
| `onlineMeetingProvider` | `'teamsForBusiness' | 'skypeForBusiness'` |
| `allowNewTimeProposals` | `boolean` |
| `responseRequested` | `boolean` |
| `recurrence` | `{ pattern: { type: 'daily' | 'weekly' | 'absoluteMonthly' | 'relativeMonthly' | 'absoluteYearly' | 'relativeYearly'; interval: number; daysOfWeek?: ('sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday')[]; dayOfMonth?: number; month?: number; }; range: { type: 'endDate' | 'noEnd' | 'numbered'; startDate: string; endDate?: string; numberOfOccurrences?: number; }; }` |

## Diagram

```mermaid
graph LR
  Client[Calendar UI or command] --> Request[CreateEventRequest]
  Request --> CalendarFlow[Calendar event creation flow]
  CalendarFlow --> Outlook[Outlook calendar]
```

## Usage

```ts
import { CreateEventRequest } from './calendar.model';

const request = new CreateEventRequest();

// Set the event fields declared by CreateEventRequest.

await calendarService.createEvent(request);
```

## AI Coding Instructions

- Keep event creation input in `CreateEventRequest` rather than passing unrelated objects into calendar code.
- Match field names and value types already declared in `calendar.model.ts`.
- Validate required event data before sending the request to the calendar service.
- Keep Outlook-specific API mapping in the calendar integration layer, not in UI code.
