# CalendarQuery

**Kind:** Class

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

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

Query parameters for retrieving calendar events

`CalendarQuery` represents the query parameters supplied when retrieving calendar events. It keeps calendar retrieval inputs in a single model that can be passed between the calendar UI, service layer, and Outlook integration.

## Properties

| Property | Type |
|---|---|
| `startDateTime` | `string` |
| `endDateTime` | `string` |
| `$select` | `string` |
| `$filter` | `string` |
| `$orderby` | `string` |
| `$top` | `number` |
| `$skip` | `number` |

## Diagram

```mermaid
graph LR
  Caller[Calendar caller] --> Query[CalendarQuery]
  Query --> Retrieval[Calendar event retrieval]
  Retrieval --> Events[Calendar events]
```

## Usage

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

const query = new CalendarQuery();

// Set the query properties supported by CalendarQuery here.

const events = await calendarClient.getEvents(query);
```

## AI Coding Instructions

- Keep `CalendarQuery` focused on inputs for calendar event retrieval.
- Populate only properties declared on the model before passing it to the calendar client or service.
- Keep query validation and Outlook request mapping in the retrieval layer rather than in UI components.
- Update callers when query property names or types change.
